
Package org.hl7.fhir.r5.renderers
Class ResourceRenderer
java.lang.Object
org.hl7.fhir.r5.renderers.Renderer
org.hl7.fhir.r5.renderers.DataRenderer
org.hl7.fhir.r5.renderers.ResourceRenderer
- All Implemented Interfaces:
CodeResolver
- Direct Known Subclasses:
ActorDefinitionRenderer,BundleRenderer,CapabilityStatementRenderer,CompartmentDefinitionRenderer,DiagnosticReportRenderer,FeatureDefinitionRenderer,ImplementationGuideRenderer,LibraryRenderer,LiquidRenderer,ListRenderer,NamingSystemRenderer,OperationOutcomeRenderer,ParametersRenderer,PatientRenderer,ProfileDrivenRenderer,ProvenanceRenderer,QuestionnaireResponseRenderer,RequirementsRenderer,StructureDefinitionRenderer,SubscriptionTopicRenderer,TerminologyRenderer,TestPlanRenderer,ViewDefinitionRenderer,WebTemplateRenderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclassclassNested classes/interfaces inherited from class org.hl7.fhir.r5.renderers.Renderer
Renderer.RenderingStatusNested classes/interfaces inherited from interface org.hl7.fhir.r5.renderers.CodeResolver
CodeResolver.CodeResolution -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected XVerExtensionManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContained(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, List<ResourceWrapper> list) abstract voidbuildNarrative(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) org.hl7.fhir.utilities.xhtml.XhtmlNodeJust build the narrative that would go in the resource (per @renderResource()), but don't put it in the resourcevoidbuildSummary(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) abstract Stringbooleanorg.hl7.fhir.utilities.xhtml.XhtmlNodevoiddescribe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) protected StringdescribeStatus(String status, String experimental, ResourceWrapper dt, String deprecated) protected StringdescribeStatus(Enumerations.PublicationStatus status, boolean experimental) protected StringdescribeStatus(Enumerations.PublicationStatus status, boolean experimental, DateTimeType dt, Boolean deprecated) protected StringdescribeStatus(Renderer.RenderingStatus status, CanonicalResource cr) protected StringdescribeStatus(Renderer.RenderingStatus status, ResourceWrapper cr) protected StringdisplayCanonical(ResourceWrapper canonical) displayReference(Resource res, Reference r) protected Stringprotected <T extends Resource>
TfindCanonical(Class<T> class_, String canonical, ResourceWrapper sourceOfReference) protected <T extends Resource>
TfindCanonical(Class<T> class_, UriType canonical, ResourceWrapper sourceOfReference) Eventually this will be retired if and when there's no more direct renderersprotected voidgenerateCopyright(org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cs) protected voidgenerateCopyrightTableRow(org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, ResourceWrapper cs) voidgenSummaryTable(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cr) booleangenSummaryTable(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cr) protected voidgenSummaryTableContent(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, CanonicalResource cr) protected voidgenSummaryTableContent(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, ResourceWrapper cr) protected StringgetNameForResource(ResourceWrapper resource) protected booleanhasAnchorName(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String an) voidinject(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Narrative.NarrativeStatus status) booleanisInner()booleanprotected Stringstatic StringmakeInternalBundleLink(ResourceWrapper bundle, String fullUrl) voidmarkLanguage(org.hl7.fhir.utilities.xhtml.XhtmlNode x) protected org.hl7.fhir.utilities.xhtml.XhtmlNodeplateStyle(org.hl7.fhir.utilities.xhtml.XhtmlNode para) <T extends Resource>
voidrenderCanonical(Renderer.RenderingStatus status, ResourceWrapper res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Class<T> class_, CanonicalType canonical) <T extends Resource>
voidrenderCanonical(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Class<T> class_, ResourceWrapper canonical) protected voidrenderCanonical(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) protected voidrenderCommitteeLink(org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cr) protected voidrenderCommitteeLink(org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cr) booleanvoidvoidrenderReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) this is overridden in ResourceRenderer where a better rendering is performedvoidrenderReference(ResourceWrapper res, org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Reference r, boolean allowLinks) voidrenderReference(ResourceWrapper res, org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper r, boolean allowLinks) voidgiven a resource, update it's narrative with the best rendering available.protected org.hl7.fhir.utilities.xhtml.XhtmlNoderenderResourceTechDetails(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x) protected org.hl7.fhir.utilities.xhtml.XhtmlNoderenderResourceTechDetails(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String id) voidrenderTable(Renderer.RenderingStatus status, ResourceRenderer.TableData provider, org.hl7.fhir.utilities.xhtml.XhtmlNode x) protected voidrenderUri(Renderer.RenderingStatus status, ResourceWrapper resource, org.hl7.fhir.utilities.xhtml.XhtmlNode x, UriType uri) protected voidrenderUri(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper uri) protected Resolver.ResourceWithReferenceresolveReference(ResourceWrapper reference) protected Resolver.ResourceWithReferenceresolveReference(ResourceWrapper resource, String url, boolean followLinks) protected voidsetInner(boolean inner) setMultiLangMode(boolean multiLangMode) protected booleanMethods inherited from class org.hl7.fhir.r5.renderers.DataRenderer
addMarkdown, addMarkdown, addTelecom, canRenderDataType, checkRenderExtensions, describeLang, describeVersion, display, displayBase, displayCodeableConcept, displayCodeSource, displayCoding, displayCoding, displayContactDetail, displayContactPoint, displayContactPoint, displayDataType, displayDataType, displayDateTime, displayHumanName, displayIdentifier, displayPeriod, displayQuantity, displayRange, displaySystem, getContext, getLinkForCode, getLinkForSystem, getLocalizedBigDecimalValue, gt, gt, hasRenderableExtensions, hasRenderableExtensions, hasRenderableExtensions, isInKnownUrlSpace, lookupCode, makeAnchor, makeExceptionXhtml, processRelativeUrls, renderAddress, renderAnnotation, renderBase, renderCodeableConcept, renderCodeableReference, renderCoding, renderCoding, renderCoding, renderCoding, renderCodingWithDetails, renderContactPoint, renderDataRequirement, renderDataType, renderDataType, renderExpression, renderExtensionsInList, renderExtensionsInText, renderHumanName, renderIdentifier, renderMoney, renderPeriod, renderPrimitiveWithNoValue, renderPrimitiveWithNoValue, renderQuantity, renderQuantity, renderQuantity, renderRange, renderSampledData, renderTiming, renderTriggerDefinition, renderUsageContext, resolveCode, resolveCode, resolveCode, resolveCode, systemFromCanonical, tail, utail, versionFromCanonicalMethods inherited from class org.hl7.fhir.r5.renderers.Renderer
egt, formatPhrase, genStandardsStatus, getTranslatedCode, markBoilerplate, markGenerated, renderStatus, renderStatusDiv, renderStatusRow, renderStatusSummary, spanIfTracking, toStr, toStr, wrap, wrapNC, wrapWC, xlinkNarrative
-
Field Details
-
xverManager
-
multiLangMode
-
inner
-
-
Constructor Details
-
ResourceRenderer
-
-
Method Details
-
isMultiLangMode
-
setMultiLangMode
-
renderingUsesValidation
-
isInner
-
setInner
-
buildNarrative
public org.hl7.fhir.utilities.xhtml.XhtmlNode buildNarrative(ResourceWrapper dr) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, org.hl7.fhir.exceptions.FHIRException, IOException, EOperationOutcome Just build the narrative that would go in the resource (per @renderResource()), but don't put it in the resource- Parameters:
dr-- Returns:
- Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOExceptionEOperationOutcome
-
renderResource
public void renderResource(ResourceWrapper r) throws IOException, org.hl7.fhir.exceptions.FHIRException, EOperationOutcome given a resource, update it's narrative with the best rendering available. ResourceWrapper is a facade to either a org.hl7.fhir.r5.model Resource, or to a org.hl7.fhir.r5.elementModel (which might a resource of any version). Note that some resource renderers - only canonical ones - only render native resources, and not element model ones. These may be migrated in the future (only reason not to is the sheer size of the task, though performance might be a factor)- Parameters:
r- - the domain resource in question- Throws:
IOExceptionEOperationOutcomeorg.hl7.fhir.exceptions.FHIRException
-
checkNarrative
public org.hl7.fhir.utilities.xhtml.XhtmlNode checkNarrative(ResourceWrapper r) throws IOException, org.hl7.fhir.exceptions.FHIRException, EOperationOutcome - Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRExceptionEOperationOutcome
-
hasAnchorName
-
buildNarrative
public abstract void buildNarrative(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException, org.hl7.fhir.exceptions.FHIRException, EOperationOutcome - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRExceptionEOperationOutcome
-
buildSummary
public abstract String buildSummary(ResourceWrapper r) throws UnsupportedEncodingException, IOException -
buildSummary
public void buildSummary(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) throws UnsupportedEncodingException, IOException -
canonicalTitle
-
describe
public void describe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper r) throws UnsupportedEncodingException, IOException -
inject
public void inject(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Narrative.NarrativeStatus status) throws IOException - Throws:
IOException
-
markLanguage
-
renderCanonical
protected void renderCanonical(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Overrides:
renderCanonicalin classDataRenderer- Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderCanonical
public <T extends Resource> void renderCanonical(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Class<T> class_, ResourceWrapper canonical) throws UnsupportedEncodingException, IOException -
displayCanonical
-
displayReference
- Overrides:
displayReferencein classDataRenderer
-
renderCanonical
public <T extends Resource> void renderCanonical(Renderer.RenderingStatus status, ResourceWrapper res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Class<T> class_, CanonicalType canonical) throws UnsupportedEncodingException, IOException - Type Parameters:
T-- Parameters:
status-res-x-class_- - makes resolution faster, but can just be Resource.classcanonical-- Throws:
UnsupportedEncodingExceptionIOException
-
renderReference
public void renderReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException Description copied from class:DataRendererthis is overridden in ResourceRenderer where a better rendering is performed- Overrides:
renderReferencein classDataRenderer- Parameters:
status-x-type-- Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderReference
public void renderReference(ResourceWrapper res, org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Reference r, boolean allowLinks) throws UnsupportedEncodingException, IOException -
renderReference
public void renderReference(ResourceWrapper res, org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper r, boolean allowLinks) throws UnsupportedEncodingException, IOException -
getNameForResource
-
renderUri
protected void renderUri(Renderer.RenderingStatus status, ResourceWrapper resource, org.hl7.fhir.utilities.xhtml.XhtmlNode x, UriType uri) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderUri
protected void renderUri(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper uri) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Overrides:
renderUriin classDataRenderer- Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
findCanonical
protected <T extends Resource> T findCanonical(Class<T> class_, UriType canonical, ResourceWrapper sourceOfReference) Eventually this will be retired if and when there's no more direct renderers- Type Parameters:
T-
-
findCanonical
protected <T extends Resource> T findCanonical(Class<T> class_, String canonical, ResourceWrapper sourceOfReference) -
resolveReference
protected Resolver.ResourceWithReference resolveReference(ResourceWrapper resource, String url, boolean followLinks) throws IOException - Throws:
IOException
-
resolveReference
-
makeIdFromBundleEntry
-
generateCopyright
-
generateCopyrightTableRow
protected void generateCopyrightTableRow(org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, ResourceWrapper cs) -
displayReference
public String displayReference(Resource res, Reference r) throws UnsupportedEncodingException, IOException -
parseType
-
describeStatus
-
renderCommitteeLink
-
makeInternalBundleLink
-
canRender
-
renderResourceTechDetails
protected org.hl7.fhir.utilities.xhtml.XhtmlNode renderResourceTechDetails(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x) throws UnsupportedEncodingException, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
UnsupportedEncodingExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOException
-
renderResourceTechDetails
protected org.hl7.fhir.utilities.xhtml.XhtmlNode renderResourceTechDetails(ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String id) throws UnsupportedEncodingException, org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
UnsupportedEncodingExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOException
-
willRenderId
-
plateStyle
protected org.hl7.fhir.utilities.xhtml.XhtmlNode plateStyle(org.hl7.fhir.utilities.xhtml.XhtmlNode para) -
getRendererType
-
renderTable
public void renderTable(Renderer.RenderingStatus status, ResourceRenderer.TableData provider, org.hl7.fhir.utilities.xhtml.XhtmlNode x) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderOrError
- Throws:
IOException
-
genSummaryTable
public boolean genSummaryTable(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cr) throws IOException - Throws:
IOException
-
genSummaryTableContent
protected void genSummaryTableContent(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, ResourceWrapper cr) throws IOException - Throws:
IOException
-
genSummaryTable
public void genSummaryTable(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cr) throws IOException - Throws:
IOException
-
genSummaryTableContent
protected void genSummaryTableContent(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode tbl, CanonicalResource cr) throws IOException - Throws:
IOException
-
renderCommitteeLink
-
describeStatus
-
describeStatus
-
describeStatus
protected String describeStatus(Enumerations.PublicationStatus status, boolean experimental, DateTimeType dt, Boolean deprecated) -
describeStatus
protected String describeStatus(String status, String experimental, ResourceWrapper dt, String deprecated) -
addContained
protected void addContained(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, List<ResourceWrapper> list) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, org.hl7.fhir.exceptions.FHIRException, IOException, EOperationOutcome - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOExceptionEOperationOutcome
-
selfLink
-