@Test public void declareTypes() { List<DataField> dataFields = Arrays.asList(getTypeDataField(), getDottedTypeDataField(), getTypeDataField(), getDottedTypeDataField()); DataDictionary dataDictionary = new DataDictionary(dataFields); final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = new HashMap<>(); List<KiePMMLDroolsType> retrieved = KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareTypes(dataDictionary); assertNotNull(retrieved); assertEquals(dataFields.size(), retrieved.size()); IntStream.range(0, dataFields.size()).forEach(i -> commonVerifyTypeDeclarationDescr(dataFields.get(i), fieldTypeMap, retrieved.get(i))); }
public List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary) { return dataDictionary.getDataFields().stream().map(this::declareType).collect(Collectors.toList()); }
KiePMMLDataDictionaryASTFactory { public List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary) { return dataDictionary.getDataFields().stream().map(this::declareType).collect(Collectors.toList()); } }
KiePMMLDataDictionaryASTFactory { public List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary) { return dataDictionary.getDataFields().stream().map(this::declareType).collect(Collectors.toList()); } private  KiePMMLDataDictionaryASTFactory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); }
KiePMMLDataDictionaryASTFactory { public List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary) { return dataDictionary.getDataFields().stream().map(this::declareType).collect(Collectors.toList()); } private  KiePMMLDataDictionaryASTFactory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); static KiePMMLDataDictionaryASTFactory factory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary); KiePMMLDroolsType declareType(DataField dataField); }
KiePMMLDataDictionaryASTFactory { public List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary) { return dataDictionary.getDataFields().stream().map(this::declareType).collect(Collectors.toList()); } private  KiePMMLDataDictionaryASTFactory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); static KiePMMLDataDictionaryASTFactory factory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary); KiePMMLDroolsType declareType(DataField dataField);  }