@Test public void createTopLevelFactModelTreeRecursiveTypes() throws WrongDMNTypeException { SortedMap<String, FactModelTree> hiddenFacts = new TreeMap<>(); FactModelTree person = dmnTypeServiceImpl.createTopLevelFactModelTree("person", getRecursivePersonComposite(false), hiddenFacts, FactModelTree.Type.DECISION); assertNotNull(person); assertTrue(person.getExpandableProperties().containsKey("parent")); assertEquals("tPerson", person.getExpandableProperties().get("parent")); assertTrue(hiddenFacts.containsKey("tPerson")); hiddenFacts = new TreeMap<>(); FactModelTree personCollection = dmnTypeServiceImpl.createTopLevelFactModelTree("person", getRecursivePersonComposite(true), hiddenFacts, FactModelTree.Type.DECISION); assertNotNull(personCollection); assertTrue(personCollection.getGenericTypesMap().containsKey(VALUE)); assertEquals("tPerson", personCollection.getGenericTypeInfo(VALUE).get(0)); assertTrue(hiddenFacts.containsKey("tPerson")); assertTrue(hiddenFacts.containsKey("tPersonList")); }
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);  }