@Test public void testContainmentMetaData() throws Exception { String fileId = "IDCR-LabReportRAW1"; String templateId = "IDCR - Laboratory Test Report.v0"; I_FlatJsonCompositionConverter jsonCompositionConverter = FlatJsonCompositionConverter.getInstance(knowledge); FileReader fileReader = new FileReader(resourcePath+"/samples/"+fileId+"_FLATJSON.json"); Map map = FlatJsonUtil.inputStream2Map(fileReader); Composition lastComposition = jsonCompositionConverter.toComposition(templateId, map); assertNotNull(lastComposition); I_CompositionSerializer inspector = I_CompositionSerializer.getInstance(CompositionSerializer.WalkerOutputMode.PATH); Map<String, Object>retmap = inspector.process(lastComposition); Map<String, String> ltreeMap = inspector.getLtreeMap(); FileWriter fileWriter = new FileWriter("target/test-classes/samples/"+fileId+"_CONTAINS.txt"); for (Map.Entry entry: ltreeMap.entrySet()){ fileWriter.write(inspector.getTreeRootArchetype()+"."+entry.getKey().toString()); fileWriter.write(","); fileWriter.write(entry.getValue().toString()); fileWriter.write("\n"); fileWriter.flush(); } }
@Override public Map<String, String> getLtreeMap() { return ltreeMap; }
ContentBuilder implements I_ContentBuilder { @Override public Map<String, String> getLtreeMap() { return ltreeMap; } }
ContentBuilder implements I_ContentBuilder { @Override public Map<String, String> getLtreeMap() { return ltreeMap; } ContentBuilder(Map<SystemValue, Object> values, I_KnowledgeCache knowledge, String templateId); }
ContentBuilder implements I_ContentBuilder { @Override public Map<String, String> getLtreeMap() { return ltreeMap; } ContentBuilder(Map<SystemValue, Object> values, I_KnowledgeCache knowledge, String templateId); @Override void setEntryData(Composition composition); @Override Object insertCloneInPath(Locatable locatable, Map<String, Object> definition, String path); @Override Composition importCanonicalXML(InputStream inputStream); @Override Composition importAsRM(Composition composition); @Override byte[] exportCanonicalXML(String jsonData, boolean prettyPrint); @Override byte[] exportCanonicalXML(Composition composition, boolean prettyPrint); @Override byte[] exportCanonicalXML(Composition composition, boolean prettyPrint, boolean anyElement); @Override byte[] exportCanonicalXML(Locatable locatable, boolean prettyPrint); @Override byte[] exportCanonicalXML(Locatable locatable, boolean prettyPrint, boolean anyElement); static byte[] canonicalExporter(Composition composition, boolean prettyPrint, boolean anyElement); static Locatable parseOtherDetailsXML(InputStream otherDetailsXmlStream); static byte[] canonicalExporter(Locatable locatable, boolean prettyPrint, boolean anyElement); @Override Composition buildCompositionFromJson(String jsonData); @Override Locatable buildLocatableFromJson(String jsonData); @Override void bindOtherContextFromJson(Composition composition, String jsonData); @Override void bindItemStructureFromJson(ItemStructure itemStructure, String jsonData); @Override String getEntry(); @Override String getTemplateId(); @Override void setTemplateId(String templateId); @Override Composition getComposition(); @Override String getRootArchetypeId(); @Override Map<String, String> getLtreeMap(); void setCompositionParameters(Map<SystemValue, Object> values); void setCompositionAttributes(Composition composition); @Override void setLenient(boolean lenient); @Override Boolean isLenient(); @Override ConstraintMapper getConstraintMapper(); @Override Map<String, Integer> getArrayItemPathMap(); }
ContentBuilder implements I_ContentBuilder { @Override public Map<String, String> getLtreeMap() { return ltreeMap; } ContentBuilder(Map<SystemValue, Object> values, I_KnowledgeCache knowledge, String templateId); @Override void setEntryData(Composition composition); @Override Object insertCloneInPath(Locatable locatable, Map<String, Object> definition, String path); @Override Composition importCanonicalXML(InputStream inputStream); @Override Composition importAsRM(Composition composition); @Override byte[] exportCanonicalXML(String jsonData, boolean prettyPrint); @Override byte[] exportCanonicalXML(Composition composition, boolean prettyPrint); @Override byte[] exportCanonicalXML(Composition composition, boolean prettyPrint, boolean anyElement); @Override byte[] exportCanonicalXML(Locatable locatable, boolean prettyPrint); @Override byte[] exportCanonicalXML(Locatable locatable, boolean prettyPrint, boolean anyElement); static byte[] canonicalExporter(Composition composition, boolean prettyPrint, boolean anyElement); static Locatable parseOtherDetailsXML(InputStream otherDetailsXmlStream); static byte[] canonicalExporter(Locatable locatable, boolean prettyPrint, boolean anyElement); @Override Composition buildCompositionFromJson(String jsonData); @Override Locatable buildLocatableFromJson(String jsonData); @Override void bindOtherContextFromJson(Composition composition, String jsonData); @Override void bindItemStructureFromJson(ItemStructure itemStructure, String jsonData); @Override String getEntry(); @Override String getTemplateId(); @Override void setTemplateId(String templateId); @Override Composition getComposition(); @Override String getRootArchetypeId(); @Override Map<String, String> getLtreeMap(); void setCompositionParameters(Map<SystemValue, Object> values); void setCompositionAttributes(Composition composition); @Override void setLenient(boolean lenient); @Override Boolean isLenient(); @Override ConstraintMapper getConstraintMapper(); @Override Map<String, Integer> getArrayItemPathMap(); static final String SCHEMA_XSI; static final String SCHEMA_OPENEHR_ORG_V1; }