@Test public void createTopLevelFactModelTreeCompositeCollection() throws WrongDMNTypeException { DMNType compositePerson = getCompositeCollection(); TreeMap<String, FactModelTree> hiddenFactSimpleCollection = new TreeMap<>(); FactModelTree retrieved = dmnTypeServiceImpl.createTopLevelFactModelTree("testPath", compositePerson, hiddenFactSimpleCollection, FactModelTree.Type.INPUT); assertNotNull(retrieved); assertEquals("testPath", retrieved.getFactName()); assertEquals(1, retrieved.getSimpleProperties().size()); assertTrue(retrieved.getSimpleProperties().containsKey(VALUE)); assertEquals("java.util.List", retrieved.getSimpleProperties().get(VALUE).getTypeName()); assertFalse(retrieved.getSimpleProperties().get(VALUE).getBaseTypeName().isPresent()); assertEquals("java.util.List", retrieved.getSimpleProperties().get(VALUE).getPropertyTypeNameToVisualize()); assertTrue(retrieved.getExpandableProperties().isEmpty()); assertEquals(1, retrieved.getGenericTypesMap().size()); assertTrue(retrieved.getGenericTypesMap().containsKey(VALUE)); assertNotNull(retrieved.getGenericTypesMap().get(VALUE)); assertEquals(1, retrieved.getGenericTypesMap().get(VALUE).size()); assertEquals(compositePerson.getName(), retrieved.getGenericTypesMap().get(VALUE).get(0)); }
protected FactModelTree createTopLevelFactModelTree(String factName, DMNType type, SortedMap<String, FactModelTree> hiddenFacts, FactModelTree.Type fmType) throws WrongDMNTypeException { return isToBeManagedAsCollection(type) ? createFactModelTreeForCollection(new HashMap<>(), factName, type, hiddenFacts, fmType, new ArrayList<>()) : createFactModelTreeForNoCollection(new HashMap<>(), factName, factName, type.getName(), type, hiddenFacts, fmType, new ArrayList<>()); }
DMNTypeServiceImpl extends AbstractKieContainerService implements DMNTypeService { protected FactModelTree createTopLevelFactModelTree(String factName, DMNType type, SortedMap<String, FactModelTree> hiddenFacts, FactModelTree.Type fmType) throws WrongDMNTypeException { return isToBeManagedAsCollection(type) ? createFactModelTreeForCollection(new HashMap<>(), factName, type, hiddenFacts, fmType, new ArrayList<>()) : createFactModelTreeForNoCollection(new HashMap<>(), factName, factName, type.getName(), type, hiddenFacts, fmType, new ArrayList<>()); } }
DMNTypeServiceImpl extends AbstractKieContainerService implements DMNTypeService { protected FactModelTree createTopLevelFactModelTree(String factName, DMNType type, SortedMap<String, FactModelTree> hiddenFacts, FactModelTree.Type fmType) throws WrongDMNTypeException { return isToBeManagedAsCollection(type) ? createFactModelTreeForCollection(new HashMap<>(), factName, type, hiddenFacts, fmType, new ArrayList<>()) : createFactModelTreeForNoCollection(new HashMap<>(), factName, factName, type.getName(), type, hiddenFacts, fmType, new ArrayList<>()); }  }
DMNTypeServiceImpl extends AbstractKieContainerService implements DMNTypeService { protected FactModelTree createTopLevelFactModelTree(String factName, DMNType type, SortedMap<String, FactModelTree> hiddenFacts, FactModelTree.Type fmType) throws WrongDMNTypeException { return isToBeManagedAsCollection(type) ? createFactModelTreeForCollection(new HashMap<>(), factName, type, hiddenFacts, fmType, new ArrayList<>()) : createFactModelTreeForNoCollection(new HashMap<>(), factName, factName, type.getName(), type, hiddenFacts, fmType, new ArrayList<>()); }  @Override FactModelTuple retrieveFactModelTuple(Path path, String dmnPath); @Override void initializeNameAndNamespace(Settings settings, Path path, String dmnPath); DMNModel getDMNModel(Path path, String dmnPath); DMNRuntime getDMNRuntime(Path path); }
DMNTypeServiceImpl extends AbstractKieContainerService implements DMNTypeService { protected FactModelTree createTopLevelFactModelTree(String factName, DMNType type, SortedMap<String, FactModelTree> hiddenFacts, FactModelTree.Type fmType) throws WrongDMNTypeException { return isToBeManagedAsCollection(type) ? createFactModelTreeForCollection(new HashMap<>(), factName, type, hiddenFacts, fmType, new ArrayList<>()) : createFactModelTreeForNoCollection(new HashMap<>(), factName, factName, type.getName(), type, hiddenFacts, fmType, new ArrayList<>()); }  @Override FactModelTuple retrieveFactModelTuple(Path path, String dmnPath); @Override void initializeNameAndNamespace(Settings settings, Path path, String dmnPath); DMNModel getDMNModel(Path path, String dmnPath); DMNRuntime getDMNRuntime(Path path);  }