use of org.ehrbase.serialisation.flatencoding.FlatFormat in project openEHR_SDK by ehrbase.
the class Helper method getFlatJson.
public static RMDataFormat getFlatJson(String template, FlatFormat flatFormat) throws XmlException, IOException {
TemplateDocument templateDocument = TemplateDocument.Factory.parse(IOUtils.toInputStream(template, StandardCharsets.UTF_8));
RMDataFormat flatJson = new FlatJasonProvider(t -> Optional.ofNullable(templateDocument.getTemplate())).buildFlatJson(flatFormat, templateDocument.getTemplate().getTemplateId().getValue());
return flatJson;
}
Aggregations