@Test public void testDumpTemplate(){ try { Map<String, String> map = CompositionUtil.dumpTemplateMap(knowledge, templateId, CompositionSerializer.WalkerOutputMode.EXPANDED); assertNotNull(map); GsonBuilder builder = new GsonBuilder(); Gson gson = builder.setPrettyPrinting().create(); String jsonString = gson.toJson(map); System.out.println(jsonString); map = CompositionUtil.dumpTemplateMap(knowledge, templateId, CompositionSerializer.WalkerOutputMode.PATH); assertNotNull(map); jsonString = gson.toJson(map); System.out.println(jsonString); } catch (Exception e) { e.printStackTrace(); } }
public static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode) throws Exception { Map<SystemValue, Object> map = new HashMap<>(); I_ContentBuilder contentBuilder = I_ContentBuilder.getInstance(map, knowledge, templateId); Composition composition = contentBuilder.generateNewComposition(); Map<String, String> testRetMap = new EcisFlattener(true, mode).render(composition); return testRetMap; }
CompositionUtil { public static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode) throws Exception { Map<SystemValue, Object> map = new HashMap<>(); I_ContentBuilder contentBuilder = I_ContentBuilder.getInstance(map, knowledge, templateId); Composition composition = contentBuilder.generateNewComposition(); Map<String, String> testRetMap = new EcisFlattener(true, mode).render(composition); return testRetMap; } }
CompositionUtil { public static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode) throws Exception { Map<SystemValue, Object> map = new HashMap<>(); I_ContentBuilder contentBuilder = I_ContentBuilder.getInstance(map, knowledge, templateId); Composition composition = contentBuilder.generateNewComposition(); Map<String, String> testRetMap = new EcisFlattener(true, mode).render(composition); return testRetMap; }  }
CompositionUtil { public static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode) throws Exception { Map<SystemValue, Object> map = new HashMap<>(); I_ContentBuilder contentBuilder = I_ContentBuilder.getInstance(map, knowledge, templateId); Composition composition = contentBuilder.generateNewComposition(); Map<String, String> testRetMap = new EcisFlattener(true, mode).render(composition); return testRetMap; }  static String dumpFlat(I_CompositionAccess compositionAccess); static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode); static void main(String[] args); }
CompositionUtil { public static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode) throws Exception { Map<SystemValue, Object> map = new HashMap<>(); I_ContentBuilder contentBuilder = I_ContentBuilder.getInstance(map, knowledge, templateId); Composition composition = contentBuilder.generateNewComposition(); Map<String, String> testRetMap = new EcisFlattener(true, mode).render(composition); return testRetMap; }  static String dumpFlat(I_CompositionAccess compositionAccess); static Map<String, String> dumpTemplateMap(I_KnowledgeCache knowledge, String templateId, CompositionSerializer.WalkerOutputMode mode); static void main(String[] args);  }