
Package org.hl7.fhir.r5.renderers
Class DataRenderer
java.lang.Object
org.hl7.fhir.r5.renderers.Renderer
org.hl7.fhir.r5.renderers.DataRenderer
- All Implemented Interfaces:
CodeResolver
- Direct Known Subclasses:
ResourceRenderer
-
Nested Class Summary
Nested 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMarkdown(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String text) protected voidaddMarkdown(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String text, String path) protected voidaddTelecom(org.hl7.fhir.utilities.xhtml.XhtmlNode p, ResourceWrapper c) booleancanRenderDataType(String type) protected voidcheckRenderExtensions(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper element) protected StringdescribeLang(String lang) static StringdescribeVersion(String version) static Stringdisplay(IWorkerContext context, DataType type) displayBase(Base b) displayCodeSource(String system, String version) displayCoding(List<Coding> list) displayContactDetail(ResourceWrapper contact) displayContactPoint(ResourceWrapper contact) protected voiddisplayContactPoint(org.hl7.fhir.utilities.xhtml.XhtmlNode p, ContactPoint c) displayDataType(DataType type) protected Stringstatic Stringprotected Stringprotected Stringprotected StringdisplaySystem(String system) getLinkForCode(String system, String version, String code) getLinkForSystem(String system, String version) protected StringgetLocalizedBigDecimalValue(BigDecimal input, Currency c) gt(PrimitiveType value) gt(ResourceWrapper value) booleanhasRenderableExtensions(BackboneType element) booleanhasRenderableExtensions(DataType element) booleanhasRenderableExtensions(ResourceWrapper element) protected booleanisInKnownUrlSpace(String url) when we run into an unknown (canonical) URL, we assume that it's a pointer to something we don't know about, and render it as an 'a href=' in case it is valid.lookupCode(String system, String version, String code) protected StringmakeAnchor(String codeSystem, String code) org.hl7.fhir.utilities.xhtml.XhtmlNodemakeExceptionXhtml(Exception e, String function) static StringprocessRelativeUrls(String markdown, String path) protected voidrenderAddress(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper address) protected voidrenderAnnotation(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode parent, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper a) voidrenderBase(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Base b) protected voidrenderCanonical(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) protected voidrenderCodeableConcept(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cc) protected voidrenderCodeableReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper e) protected voidrenderCoding(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c) protected voidrenderCoding(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c, boolean details) protected voidrenderCoding(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Coding c) protected voidrenderCoding(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper c) protected voidrenderCodingWithDetails(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c) protected voidrenderContactPoint(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper contact) voidrenderDataRequirement(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper dr) booleanrenderDataType(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) booleanrenderDataType(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode parent, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) protected voidrenderExpression(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper expr) voidrenderExtensionsInList(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode ul, ResourceWrapper element) voidrenderExtensionsInText(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper element, String sep) protected voidrenderHumanName(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper name) protected voidrenderIdentifier(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper ii) protected voidrenderMoney(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper money) voidrenderPeriod(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper p) protected booleanrenderPrimitiveWithNoValue(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, PrimitiveType<?> prim) protected booleanrenderPrimitiveWithNoValue(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper prim) protected voidrenderQuantity(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper q) protected voidrenderQuantity(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Quantity q, boolean showCodeDetails) protected voidrenderQuantity(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper q, boolean showCodeDetails) protected voidrenderRange(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper q) protected voidrenderReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper ref) this is overridden in ResourceRenderer where a better rendering is performedprotected voidrenderSampledData(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper sampledData) protected voidrenderTiming(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper s) voidrenderTriggerDefinition(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper td) protected voidrenderUri(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper uri) voidrenderUsageContext(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper u) resolveCode(String system, String code) resolveCode(CodeableConcept code) resolveCode(Coding code) protected StringsystemFromCanonical(String system) protected Stringprotected Stringprotected StringversionFromCanonical(String system) Methods 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
-
Constructor Details
-
DataRenderer
-
DataRenderer
-
-
Method Details
-
processRelativeUrls
-
addMarkdown
protected void addMarkdown(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String text, String path) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException, org.hl7.fhir.exceptions.DefinitionException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrorIOExceptionorg.hl7.fhir.exceptions.DefinitionException
-
addMarkdown
protected void addMarkdown(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String text) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException, org.hl7.fhir.exceptions.DefinitionException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrorIOExceptionorg.hl7.fhir.exceptions.DefinitionException
-
describeVersion
-
displaySystem
-
makeAnchor
-
lookupCode
-
describeLang
-
gt
-
gt
-
hasRenderableExtensions
-
hasRenderableExtensions
-
hasRenderableExtensions
-
renderExtensionsInList
public void renderExtensionsInList(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode ul, ResourceWrapper element) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderExtensionsInText
public void renderExtensionsInText(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper element, String sep) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
checkRenderExtensions
protected void checkRenderExtensions(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper element) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
display
-
displayBase
-
displayDataType
-
displayDataType
-
displayReference
-
displayDateTime
-
renderBase
public void renderBase(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, Base b) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
canRenderDataType
-
renderDataType
public boolean renderDataType(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderDataType
public boolean renderDataType(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode parent, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper type) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
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 - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderReference
protected void renderReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper ref) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException this is overridden in ResourceRenderer where a better rendering is performed- Parameters:
status-x-ref-- Throws:
IOExceptionorg.hl7.fhir.exceptions.DefinitionExceptionorg.hl7.fhir.exceptions.FHIRFormatError
-
renderPrimitiveWithNoValue
protected boolean renderPrimitiveWithNoValue(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, PrimitiveType<?> prim) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderPrimitiveWithNoValue
protected boolean renderPrimitiveWithNoValue(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper prim) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
tail
-
utail
-
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 - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderAnnotation
protected void renderAnnotation(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode parent, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper a) throws org.hl7.fhir.exceptions.FHIRException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOException
-
displayCoding
-
displayCodeSource
-
displayCoding
-
renderCoding
protected void renderCoding(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Coding c) -
renderCoding
protected void renderCoding(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper c) -
getLinkForSystem
-
getLinkForCode
-
resolveCode
- Specified by:
resolveCodein interfaceCodeResolver
-
resolveCode
-
resolveCode
- Specified by:
resolveCodein interfaceCodeResolver
-
resolveCode
- Specified by:
resolveCodein interfaceCodeResolver
-
renderCodingWithDetails
protected void renderCodingWithDetails(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderCoding
protected void renderCoding(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c) -
renderCoding
protected void renderCoding(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper c, boolean details) -
displayCodeableConcept
-
renderCodeableReference
protected void renderCodeableReference(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper e) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderCodeableConcept
protected void renderCodeableConcept(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper cc) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
displayIdentifier
-
renderIdentifier
protected void renderIdentifier(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper ii) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
displayHumanName
-
renderHumanName
protected void renderHumanName(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper name) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderAddress
protected void renderAddress(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper address) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
displayContactPoint
-
displayContactDetail
-
getLocalizedBigDecimalValue
-
renderMoney
protected void renderMoney(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper money) -
renderExpression
protected void renderExpression(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper expr) -
renderContactPoint
protected void renderContactPoint(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper contact) -
displayContactPoint
-
addTelecom
-
displayQuantity
-
renderQuantity
protected void renderQuantity(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper q) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderQuantity
protected void renderQuantity(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, ResourceWrapper q, boolean showCodeDetails) -
renderQuantity
protected void renderQuantity(org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator gen, List<org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece> pieces, Quantity q, boolean showCodeDetails) -
displayRange
-
renderRange
protected void renderRange(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper q) -
displayPeriod
-
renderPeriod
public void renderPeriod(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper p) -
renderUsageContext
public void renderUsageContext(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper u) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderTriggerDefinition
public void renderTriggerDefinition(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper td) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderDataRequirement
public void renderDataRequirement(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper dr) throws org.hl7.fhir.exceptions.FHIRFormatError, org.hl7.fhir.exceptions.DefinitionException, IOException - Throws:
org.hl7.fhir.exceptions.FHIRFormatErrororg.hl7.fhir.exceptions.DefinitionExceptionIOException
-
renderTiming
protected void renderTiming(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper s) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
renderSampledData
protected void renderSampledData(Renderer.RenderingStatus status, org.hl7.fhir.utilities.xhtml.XhtmlNode x, ResourceWrapper sampledData) -
getContext
-
makeExceptionXhtml
-
systemFromCanonical
-
versionFromCanonical
-
isInKnownUrlSpace
when we run into an unknown (canonical) URL, we assume that it's a pointer to something we don't know about, and render it as an 'a href=' in case it is valid. But in the 'known' domains, where we reasonably expect to know everything , we don't make them links- Returns:
-