use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.
the class AdditionalBindingsRenderer method seeMaxBinding.
public void seeMaxBinding(Extension ext) {
AdditionalBindingDetail abr = new AdditionalBindingDetail();
abr.purpose = "maximum";
abr.valueSet = ext.getValue().primitiveValue();
abr.unchanged = ext.hasUserData(ProfileUtilities.DERIVATION_EQUALS);
bindings.add(abr);
}
use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.
the class AdditionalBindingsRenderer method makeNullBr.
private BindingResolution makeNullBr(AdditionalBindingDetail binding) {
BindingResolution br = new BindingResolution();
br.url = "http://none.none/none";
br.display = "todo";
return br;
}
use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.
the class AdditionalBindingsRenderer method render.
private void render(List<XhtmlNode> children, boolean doDoco) throws FHIRFormatError, DefinitionException, IOException {
boolean doco = false;
boolean usage = false;
boolean any = false;
for (AdditionalBindingDetail binding : bindings) {
doco = doco || (doDoco && binding.doco != null);
usage = usage || binding.usage != null;
any = any || binding.any;
}
XhtmlNode tr = new XhtmlNode(NodeType.Element, "tr");
children.add(tr);
tr.td().style("font-size: 11px").b().tx("Additional Bindings");
tr.td().style("font-size: 11px").tx("Purpose");
if (usage) {
tr.td().style("font-size: 11px").tx("Usage");
}
if (any) {
tr.td().style("font-size: 11px").tx("Any");
}
if (doco) {
tr.td().style("font-size: 11px").tx("Documentation");
}
for (AdditionalBindingDetail binding : bindings) {
tr = new XhtmlNode(NodeType.Element, "tr");
if (binding.unchanged) {
tr.style("opacity: 0.5");
}
children.add(tr);
BindingResolution br = pkp == null ? makeNullBr(binding) : pkp.resolveBinding(profile, binding.valueSet, path);
if (br.url != null) {
tr.td().style("font-size: 11px").ah(Utilities.isAbsoluteUrl(br.url) || !pkp.prependLinks() ? br.url : corePath + br.url, binding.valueSet).tx(br.display);
} else {
tr.td().style("font-size: 11px").span(null, binding.valueSet).tx(br.display);
}
renderPurpose(tr.td().style("font-size: 11px"), binding.purpose);
if (usage) {
if (binding.usage != null) {
new DataRenderer(context).render(tr.td(), binding.usage);
} else {
tr.td();
}
}
if (any) {
if (binding.any) {
tr.td().style("font-size: 11px").tx("Any repeat");
} else {
tr.td().style("font-size: 11px").tx("All repeats");
}
}
if (doco) {
if (binding.doco != null) {
String d = md.processMarkdown("Binding.description", binding.doco);
tr.td().style("font-size: 11px").innerHTML(d);
} else {
tr.td().style("font-size: 11px");
}
}
}
}
use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.
the class AdditionalBindingsRenderer method seeMaxBinding.
public void seeMaxBinding(Extension ext) {
AdditionalBindingDetail abr = new AdditionalBindingDetail();
abr.purpose = "maximum";
abr.valueSet = ext.getValue().primitiveValue();
abr.unchanged = ext.hasUserData(ProfileUtilities.DERIVATION_EQUALS);
bindings.add(abr);
}
use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.
the class AdditionalBindingsRenderer method makeNullBr.
private BindingResolution makeNullBr(AdditionalBindingDetail binding) {
BindingResolution br = new BindingResolution();
br.url = "http://none.none/none";
br.display = "todo";
return br;
}
Aggregations