@Test void getPMMLRequestData() { final String modelName = "MODEL_NAME"; final Map<String, Object> parameters = getParameters(); final PMMLRequestData retrieved = PMMLUtils.getPMMLRequestData(modelName, parameters); assertNotNull(retrieved); assertEquals(modelName, retrieved.getModelName()); final Map<String, ParameterInfo> parameterInfos = retrieved.getMappedRequestParams(); assertEquals(parameters.size(), parameterInfos.size()); parameters.forEach((key, value) -> { assertTrue(parameterInfos.containsKey(key)); ParameterInfo parameterInfo = parameterInfos.get(key); assertEquals(value, parameterInfo.getValue()); assertEquals(value.getClass(), parameterInfo.getType()); }); }
public static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters) { PMMLRequestDataBuilder pmmlRequestDataBuilder = new PMMLRequestDataBuilder(CORRELATION_ID, modelName); for (Map.Entry<String, Object> entry : parameters.entrySet()) { Object pValue = entry.getValue(); Class class1 = pValue.getClass(); pmmlRequestDataBuilder.addParameter(entry.getKey(), pValue, class1); } return pmmlRequestDataBuilder.build(); }
PMMLUtils { public static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters) { PMMLRequestDataBuilder pmmlRequestDataBuilder = new PMMLRequestDataBuilder(CORRELATION_ID, modelName); for (Map.Entry<String, Object> entry : parameters.entrySet()) { Object pValue = entry.getValue(); Class class1 = pValue.getClass(); pmmlRequestDataBuilder.addParameter(entry.getKey(), pValue, class1); } return pmmlRequestDataBuilder.build(); } }
PMMLUtils { public static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters) { PMMLRequestDataBuilder pmmlRequestDataBuilder = new PMMLRequestDataBuilder(CORRELATION_ID, modelName); for (Map.Entry<String, Object> entry : parameters.entrySet()) { Object pValue = entry.getValue(); Class class1 = pValue.getClass(); pmmlRequestDataBuilder.addParameter(entry.getKey(), pValue, class1); } return pmmlRequestDataBuilder.build(); } private  PMMLUtils(); }
PMMLUtils { public static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters) { PMMLRequestDataBuilder pmmlRequestDataBuilder = new PMMLRequestDataBuilder(CORRELATION_ID, modelName); for (Map.Entry<String, Object> entry : parameters.entrySet()) { Object pValue = entry.getValue(); Class class1 = pValue.getClass(); pmmlRequestDataBuilder.addParameter(entry.getKey(), pValue, class1); } return pmmlRequestDataBuilder.build(); } private  PMMLUtils(); static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters); }
PMMLUtils { public static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters) { PMMLRequestDataBuilder pmmlRequestDataBuilder = new PMMLRequestDataBuilder(CORRELATION_ID, modelName); for (Map.Entry<String, Object> entry : parameters.entrySet()) { Object pValue = entry.getValue(); Class class1 = pValue.getClass(); pmmlRequestDataBuilder.addParameter(entry.getKey(), pValue, class1); } return pmmlRequestDataBuilder.build(); } private  PMMLUtils(); static PMMLRequestData getPMMLRequestData(String modelName, Map<String, Object> parameters);  }