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
-
- Direct Known Subclasses:
BundleRenderer,CapabilityStatementRenderer,CompartmentDefinitionRenderer,DiagnosticReportRenderer,EncounterRenderer,ImplementationGuideRenderer,LibraryRenderer,LiquidRenderer,ListRenderer,NamingSystemRenderer,OperationOutcomeRenderer,ParametersRenderer,PatientRenderer,ProfileDrivenRenderer,ProvenanceRenderer,QuestionnaireResponseRenderer,StructureDefinitionRenderer,TerminologyRenderer
public abstract class ResourceRenderer extends DataRenderer
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanforResourceprotected Resolver.ResourceContextrcontextprotected XVerExtensionManagerxverManager-
Fields inherited from class org.hl7.fhir.r5.renderers.Renderer
context, RENDER_BUNDLE_ETAG, RENDER_BUNDLE_HEADER_ENTRY, RENDER_BUNDLE_HEADER_ENTRY_URL, RENDER_BUNDLE_HEADER_ROOT, RENDER_BUNDLE_IF_MATCH, RENDER_BUNDLE_IF_MOD, RENDER_BUNDLE_IF_NON_MATCH, RENDER_BUNDLE_IF_NONE, RENDER_BUNDLE_LAST_MOD, RENDER_BUNDLE_LOCATION, RENDER_BUNDLE_REQUEST, RENDER_BUNDLE_RESOURCE, RENDER_BUNDLE_RESPONSE, RENDER_BUNDLE_SEARCH, RENDER_BUNDLE_SEARCH_MODE, RENDER_BUNDLE_SEARCH_SCORE
-
-
Constructor Summary
Constructors Constructor Description ResourceRenderer(RenderingContext context)ResourceRenderer(RenderingContext context, Resolver.ResourceContext rcontext)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.hl7.fhir.utilities.xhtml.XhtmlNodebuild(Resource dr)booleancanRender(Resource resource)voiddescribe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Resource r)voiddescribe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.ResourceWrapper r)protected StringdescribeStatus(Enumerations.PublicationStatus status, boolean experimental)abstract Stringdisplay(Resource r)abstract Stringdisplay(BaseWrappers.ResourceWrapper r)StringdisplayReference(Resource res, Reference r)protected BaseWrappers.ResourceWrapperfetchResource(BaseWrappers.BaseWrapper subject)protected voidgenerateCopyright(org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cs)protected BaseWrappers.PropertyWrappergetProperty(BaseWrappers.BaseWrapper res, String name)protected BaseWrappers.PropertyWrappergetProperty(BaseWrappers.ResourceWrapper res, String name)static voidinject(DomainResource r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Narrative.NarrativeStatus status)static StringmakeInternalBundleLink(String fullUrl)BaseparseType(String string, String type)voidrender(DomainResource r)given a resource, update it's narrative with the best rendering availableorg.hl7.fhir.utilities.xhtml.XhtmlNoderender(BaseWrappers.ResourceWrapper r)abstract booleanrender(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Resource r)booleanrender(org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.ResourceWrapper r)voidrenderCanonical(Resource res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url)voidrenderCanonical(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url)voidrenderCanonical(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url, boolean allowLinks)protected voidrenderCommitteeLink(org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cr)voidrenderOrError(DomainResource dr)voidrenderReference(Resource res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r)voidrenderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r)voidrenderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r, boolean allowLinks)voidrenderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.BaseWrapper r)protected voidrenderResourceHeader(BaseWrappers.ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x)protected Resolver.ResourceWithReferenceresolveReference(BaseWrappers.ResourceWrapper res, String url)protected booleanvalued(BaseWrappers.PropertyWrapper pw)-
Methods inherited from class org.hl7.fhir.r5.renderers.DataRenderer
addMarkdown, addTelecom, describeLang, describeSystem, describeVersion, display, display, display, displayBase, displayCodeableConcept, displayCoding, displayCoding, displayContactPoint, displayContactPoint, displayHumanName, displayPeriod, displayQuantity, displayRange, displaySystem, getContext, getLinkForCode, getLocalizedBigDecimalValue, gt, makeAnchor, makeExceptionXhtml, render, render, renderAddress, renderAnnotation, renderAnnotation, renderBase, renderCodeableConcept, renderCodeableConcept, renderCodeableReference, renderCoding, renderCoding, renderCoding, renderCodingWithDetails, renderContactPoint, renderDataRequirement, renderDateTime, renderDateTime, renderExpression, renderHumanName, renderIdentifier, renderMoney, renderPeriod, renderQuantity, renderQuantity, renderRange, renderSampledData, renderTiming, renderUri, renderUri, smartAddText, systemFromCanonical, translate, versionFromCanonical
-
Methods inherited from class org.hl7.fhir.r5.renderers.Renderer
formatMessage
-
-
-
-
Field Detail
-
rcontext
protected Resolver.ResourceContext rcontext
-
xverManager
protected XVerExtensionManager xverManager
-
forResource
protected boolean forResource
-
-
Constructor Detail
-
ResourceRenderer
public ResourceRenderer(RenderingContext context)
-
ResourceRenderer
public ResourceRenderer(RenderingContext context, Resolver.ResourceContext rcontext)
-
-
Method Detail
-
build
public org.hl7.fhir.utilities.xhtml.XhtmlNode build(Resource dr) 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
-
render
public void render(DomainResource r) throws IOException, org.hl7.fhir.exceptions.FHIRException, EOperationOutcome
given a resource, update it's narrative with the best rendering available- Parameters:
r- - the domain resource in question- Throws:
IOExceptionEOperationOutcomeorg.hl7.fhir.exceptions.FHIRException
-
render
public org.hl7.fhir.utilities.xhtml.XhtmlNode render(BaseWrappers.ResourceWrapper r) throws IOException, org.hl7.fhir.exceptions.FHIRException, EOperationOutcome
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRExceptionEOperationOutcome
-
render
public abstract boolean render(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Resource 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
-
render
public boolean render(org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.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
-
describe
public void describe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Resource r) throws UnsupportedEncodingException, IOException
-
describe
public void describe(org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.ResourceWrapper r) throws UnsupportedEncodingException, IOException
-
display
public abstract String display(Resource r) throws UnsupportedEncodingException, IOException
-
display
public abstract String display(BaseWrappers.ResourceWrapper r) throws UnsupportedEncodingException, IOException
-
inject
public static void inject(DomainResource r, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Narrative.NarrativeStatus status)
-
renderCanonical
public void renderCanonical(Resource res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url) throws UnsupportedEncodingException, IOException
-
renderCanonical
public void renderCanonical(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url) throws UnsupportedEncodingException, IOException
-
renderCanonical
public void renderCanonical(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, String url, boolean allowLinks) throws UnsupportedEncodingException, IOException
-
renderReference
public void renderReference(Resource res, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r) throws UnsupportedEncodingException, IOException
-
renderReference
public void renderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r) throws UnsupportedEncodingException, IOException
-
renderReference
public void renderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Reference r, boolean allowLinks) throws UnsupportedEncodingException, IOException
-
renderReference
public void renderReference(BaseWrappers.ResourceWrapper rw, org.hl7.fhir.utilities.xhtml.XhtmlNode x, BaseWrappers.BaseWrapper r) throws UnsupportedEncodingException, IOException
-
resolveReference
protected Resolver.ResourceWithReference resolveReference(BaseWrappers.ResourceWrapper res, String url)
-
generateCopyright
protected void generateCopyright(org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cs)
-
displayReference
public String displayReference(Resource res, Reference r) throws UnsupportedEncodingException, IOException
-
getProperty
protected BaseWrappers.PropertyWrapper getProperty(BaseWrappers.ResourceWrapper res, String name)
-
getProperty
protected BaseWrappers.PropertyWrapper getProperty(BaseWrappers.BaseWrapper res, String name)
-
valued
protected boolean valued(BaseWrappers.PropertyWrapper pw)
-
fetchResource
protected BaseWrappers.ResourceWrapper fetchResource(BaseWrappers.BaseWrapper subject) throws UnsupportedEncodingException, org.hl7.fhir.exceptions.FHIRException, IOException
- Throws:
UnsupportedEncodingExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOException
-
describeStatus
protected String describeStatus(Enumerations.PublicationStatus status, boolean experimental)
-
renderCommitteeLink
protected void renderCommitteeLink(org.hl7.fhir.utilities.xhtml.XhtmlNode x, CanonicalResource cr)
-
makeInternalBundleLink
public static String makeInternalBundleLink(String fullUrl)
-
renderResourceHeader
protected void renderResourceHeader(BaseWrappers.ResourceWrapper r, org.hl7.fhir.utilities.xhtml.XhtmlNode x) throws UnsupportedEncodingException, org.hl7.fhir.exceptions.FHIRException, IOException
- Throws:
UnsupportedEncodingExceptionorg.hl7.fhir.exceptions.FHIRExceptionIOException
-
renderOrError
public void renderOrError(DomainResource dr)
-
-