Package org.hl7.fhir.convertors.wrapper
Class ResourceWrapperR4
java.lang.Object
org.hl7.fhir.r5.renderers.utils.ResourceWrapper
org.hl7.fhir.convertors.wrapper.ResourceWrapperR4
An R4 wrapper for the R5 rendering framework - use this to feed R4 resources directly
into the R5 framework.
The R5 framework is fine to render R4 resources, and has R4 (etc) specific code where
appropriate (or will be modified to do so).
Note that in order to use this, you need an R5 IWorkerContext. You can create a
R5 SimpleWorkerContext and load it with all the definitions from R4 (that's how the
validator works internally, so this is well tested code). But you only need to set
up the R5 context once; then you can create instances of these to wrap the objects you
want rendered on the fly. (is thread safe)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
org.hl7.fhir.r5.renderers.utils.ResourceWrapper.ElementKind, org.hl7.fhir.r5.renderers.utils.ResourceWrapper.NamedResourceWrapperList
-
Field Summary
Fields inherited from class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
children, contextUtils, index, kind, name, parent
-
Method Summary
Modifier and TypeMethodDescriptionboolean
fhirType()
org.hl7.fhir.r5.model.Base
getBase()
getId()
org.hl7.fhir.utilities.xhtml.XhtmlNode
org.hl7.fhir.r5.model.Resource
org.hl7.fhir.utilities.xhtml.XhtmlNode
getXhtml()
boolean
boolean
boolean
boolean
isDirect()
boolean
boolean
protected void
void
markLanguage
(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Locale locale) void
setNarrative
(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String status, boolean multiLangMode, Locale locale, boolean isPretty) toString()
Methods inherited from class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
basePath, child, childMN, children, children, childrenInGroups, childrenMN, extension, extensions, extensions, extensionString, extensionValue, extensionValues, firstChild, firstPrimitiveValue, forResource, forResource, forResource, forResource, forType, forType, forType, getContained, getContextUtilities, getResourceWrapper, getScopedId, has, hasChildren, hasExtension, hasMN, hasPrimitiveValue, index, isEmpty, isPrimitive, kind, matches, name, parent, path, primitiveValue, primitiveValueMN, resource
-
Field Details
-
element
-
-
Method Details
-
fhirVersion
- Specified by:
fhirVersion
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
fhirType
- Specified by:
fhirType
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
isPrimitive
- Specified by:
isPrimitive
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
hasPrimitiveValue
- Specified by:
hasPrimitiveValue
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
primitiveValue
- Specified by:
primitiveValue
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
loadTheChildren
- Specified by:
loadTheChildren
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
isResource
- Specified by:
isResource
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
canHaveNarrative
- Specified by:
canHaveNarrative
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getNarrative
- Specified by:
getNarrative
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
hasNarrative
- Specified by:
hasNarrative
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
setNarrative
public void setNarrative(org.hl7.fhir.utilities.xhtml.XhtmlNode x, String status, boolean multiLangMode, Locale locale, boolean isPretty) - Specified by:
setNarrative
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
markLanguage
- Overrides:
markLanguage
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getId
- Specified by:
getId
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
toString
-
getResourceNative
- Specified by:
getResourceNative
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
hasFormatComment
- Specified by:
hasFormatComment
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getFormatCommentsPre
- Specified by:
getFormatCommentsPre
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getXhtml
- Specified by:
getXhtml
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getBase
- Specified by:
getBase
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
isDirect
- Specified by:
isDirect
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getWebPath
- Specified by:
getWebPath
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-
getCodeSystemUri
- Specified by:
getCodeSystemUri
in classorg.hl7.fhir.r5.renderers.utils.ResourceWrapper
-