use of org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.TableModel in project kindling by HL7.
the class ResourceDependencyGenerator method initTable.
private TableModel initTable(HierarchicalTableGenerator gen, String prefix, boolean b, String id) {
TableModel model = gen.new TableModel(id, true);
model.getTitles().add(gen.new Title(null, model.getDocoRef(), "Name", "The logical name of the element", null, 0));
model.getTitles().add(gen.new Title(null, model.getDocoRef(), "Card.", "Minimum and Maximum # of times the the element can appear in the instance", null, 0));
model.getTitles().add(gen.new Title(null, model.getDocoRef(), "Type", "Reference to the type of the element", null, 100));
model.getTitles().add(gen.new Title(null, model.getDocoRef(), "Dependency Analysis", "Additional information about the element", null, 0));
return model;
}
use of org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.TableModel in project org.hl7.fhir.core by hapifhir.
the class CapabilityStatementComparer method renderStatements.
// 6 columns: path | left value | left doco | right value | right doco | comments
public XhtmlNode renderStatements(CapabilityStatementComparison comparison, String id, String prefix) throws FHIRException, IOException {
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
TableModel model = gen.new TableModel(id, true);
model.setAlternating(true);
model.getTitles().add(gen.new Title(null, null, "Type", "The type of item", null, 100));
model.getTitles().add(gen.new Title(null, null, "Left Value", "The left value for the item", null, 200, 1));
model.getTitles().add(gen.new Title(null, null, "Left Doco", "The left documentation for the item", null, 200, 1));
model.getTitles().add(gen.new Title(null, null, "Right Value", "The right value for the item", null, 200, 1));
model.getTitles().add(gen.new Title(null, null, "Right Doco", "The right documentation for the item", null, 200, 1));
model.getTitles().add(gen.new Title(null, null, "Comments", "Additional information about the comparison", null, 200));
for (StructuralMatch<Element> t : comparison.getCombined().getChildren()) {
addRow(gen, model.getRows(), t, comparison);
}
return gen.generate(model, prefix, 0, null);
}
use of org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.TableModel in project org.hl7.fhir.core by hapifhir.
the class ProfileComparer method renderStructure.
public XhtmlNode renderStructure(ProfileComparison comp, String id, String prefix, String corePath) throws FHIRException, IOException {
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false, true);
gen.setTranslator(session.getContextRight().translator());
TableModel model = gen.initComparisonTable(corePath, id);
genElementComp(null, /* oome back to this later */
gen, model.getRows(), comp.combined, corePath, prefix, null, true);
return gen.generate(model, prefix, 0, null);
}
use of org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.TableModel in project org.hl7.fhir.core by hapifhir.
the class CanonicalResourceComparer method renderMetadata.
public XhtmlNode renderMetadata(CanonicalResourceComparison<? extends CanonicalResource> comparison, String id, String prefix) throws FHIRException, IOException {
// columns: code, display (left|right), properties (left|right)
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
TableModel model = gen.new TableModel(id, true);
model.setAlternating(true);
model.getTitles().add(gen.new Title(null, null, "Name", "Property Name", null, 100));
model.getTitles().add(gen.new Title(null, null, "Value", "The value of the property", null, 200, 2));
model.getTitles().add(gen.new Title(null, null, "Comments", "Additional information about the comparison", null, 200));
for (String n : sorted(comparison.getMetadata().keySet())) {
StructuralMatch<String> t = comparison.getMetadata().get(n);
addRow(gen, model.getRows(), n, t);
}
return gen.generate(model, prefix, 0, null);
}
use of org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.TableModel in project org.hl7.fhir.core by hapifhir.
the class ProfileUtilities method generateGrid.
public XhtmlNode generateGrid(String defFile, StructureDefinition profile, String imageFolder, boolean inlineGraphics, String profileBaseFileName, String corePath, String imagePath, Set<String> outputTracker) throws IOException, FHIRException {
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
gen.setTranslator(getTranslator());
TableModel model = gen.initGridTable(corePath, profile.getId());
List<ElementDefinition> list = profile.getSnapshot().getElement();
List<StructureDefinition> profiles = new ArrayList<StructureDefinition>();
profiles.add(profile);
genGridElement(defFile == null ? null : defFile + "#", gen, model.getRows(), list.get(0), list, profiles, true, profileBaseFileName, null, corePath, imagePath, true, profile.getDerivation() == TypeDerivationRule.CONSTRAINT && usesMustSupport(list));
try {
return gen.generate(model, imagePath, 1, outputTracker);
} catch (org.hl7.fhir.exceptions.FHIRException e) {
throw new FHIRException(e.getMessage(), e);
}
}
Aggregations