use of org.hl7.fhir.definitions.generators.specification.DataTypeTableGenerator in project kindling by HL7.
the class Publisher method genXhtmlProfile.
private void genXhtmlProfile() throws Exception {
StructureDefinition profile = new ProfileGenerator(page.getDefinitions(), page.getWorkerContext(), page, page.getGenDate(), page.getVersion(), dataElements, fpUsages, page.getFolders().rootDir, page.getUml(), page.getRc()).generateXhtml();
if (page.getProfiles().has(profile.getUrl()))
throw new Exception("Duplicate Profile URL " + profile.getUrl());
page.getProfiles().see(profile, page.packageInfo());
// DataTypeTableGenerator dtg = new DataTypeTableGenerator(page.getFolders().dstDir, page, t.getCode(), true);
// t.setProfile(profile);
// t.getProfile().getText().setDiv(new XhtmlNode(NodeType.Element, "div"));
// t.getProfile().getText().getDiv().getChildNodes().add(dtg.generate(t));
}
use of org.hl7.fhir.definitions.generators.specification.DataTypeTableGenerator in project kindling by HL7.
the class Publisher method genPrimitiveTypeProfile.
private void genPrimitiveTypeProfile(PrimitiveType t) throws Exception {
StructureDefinition profile = new ProfileGenerator(page.getDefinitions(), page.getWorkerContext(), page, page.getGenDate(), page.getVersion(), dataElements, fpUsages, page.getFolders().rootDir, page.getUml(), page.getRc()).generate(t);
if (page.getProfiles().has(profile.getUrl()))
throw new Exception("Duplicate Profile URL " + profile.getUrl());
page.getProfiles().see(profile, page.packageInfo());
t.setProfile(profile);
// DataTypeTableGenerator dtg = new DataTypeTableGenerator(page.getFolders().dstDir, page, t.getCode(), true);
// t.setProfile(profile);
// t.getProfile().getText().setDiv(new XhtmlNode(NodeType.Element, "div"));
// t.getProfile().getText().getDiv().getChildNodes().add(dtg.generate(t));
}
use of org.hl7.fhir.definitions.generators.specification.DataTypeTableGenerator in project kindling by HL7.
the class Publisher method genPrimitiveTypeProfile.
private void genPrimitiveTypeProfile(DefinedStringPattern t) throws Exception {
StructureDefinition profile = new ProfileGenerator(page.getDefinitions(), page.getWorkerContext(), page, page.getGenDate(), page.getVersion(), dataElements, fpUsages, page.getFolders().rootDir, page.getUml(), page.getRc()).generate(t);
if (page.getProfiles().has(profile.getUrl()))
throw new Exception("Duplicate Profile URL " + profile.getUrl());
page.getProfiles().see(profile, page.packageInfo());
t.setProfile(profile);
// DataTypeTableGenerator dtg = new DataTypeTableGenerator(page.getFolders().dstDir, page, t.getCode(), true);
// t.setProfile(profile);
// t.getProfile().getText().setDiv(new XhtmlNode(NodeType.Element, "div"));
// t.getProfile().getText().getDiv().getChildNodes().add(dtg.generate(t));
}
use of org.hl7.fhir.definitions.generators.specification.DataTypeTableGenerator in project kindling by HL7.
the class SourceParser method genTypeProfile.
private void genTypeProfile(org.hl7.fhir.definitions.model.TypeDefn t) throws Exception {
StructureDefinition profile;
try {
profile = new ProfileGenerator(definitions, context, page, genDate, version, null, fpUsages, page.getFolders().rootDir, page.getUml(), page.getRc()).generate(t);
t.setProfile(profile);
DataTypeTableGenerator dtg = new DataTypeTableGenerator(dstDir, page, t.getName(), true, version);
t.getProfile().getText().setDiv(new XhtmlNode(NodeType.Element, "div"));
t.getProfile().getText().getDiv().getChildNodes().add(dtg.generate(t, null, false));
if (context.hasResource(StructureDefinition.class, t.getProfile().getUrl()))
throw new Exception("Duplicate Profile " + t.getProfile().getUrl());
context.cacheResource(t.getProfile());
} catch (Exception e) {
throw new Exception("Error generating profile for '" + t.getName() + "': " + e.getMessage(), e);
}
}
use of org.hl7.fhir.definitions.generators.specification.DataTypeTableGenerator in project kindling by HL7.
the class Publisher method genTypeProfile.
private void genTypeProfile(TypeDefn t) throws Exception {
StructureDefinition profile;
try {
profile = new ProfileGenerator(page.getDefinitions(), page.getWorkerContext(), page, page.getGenDate(), page.getVersion(), dataElements, fpUsages, page.getFolders().rootDir, page.getUml(), page.getRc()).generate(t);
page.getProfiles().see(profile, page.packageInfo());
t.setProfile(profile);
DataTypeTableGenerator dtg = new DataTypeTableGenerator(page.getFolders().dstDir, page, t.getName(), true, page.getVersion());
t.getProfile().getText().setDiv(new XhtmlNode(NodeType.Element, "div"));
t.getProfile().getText().getDiv().getChildNodes().add(dtg.generate(t, null, false));
} catch (Exception e) {
throw new Exception("Error generating profile for '" + t.getName() + "': " + e.getMessage(), e);
}
}
Aggregations