Class ResourceWrapperR4

java.lang.Object
org.hl7.fhir.r5.renderers.utils.ResourceWrapper
org.hl7.fhir.convertors.wrapper.ResourceWrapperR4

public class ResourceWrapperR4 extends org.hl7.fhir.r5.renderers.utils.ResourceWrapper
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
    Modifier and Type
    Field
    Description
    protected org.hl7.fhir.r4.model.Base
     

    Fields inherited from class org.hl7.fhir.r5.renderers.utils.ResourceWrapper

    children, contextUtils, index, kind, name, parent
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
     
    org.hl7.fhir.r5.model.Base
     
     
     
     
    org.hl7.fhir.utilities.xhtml.XhtmlNode
     
    org.hl7.fhir.r5.model.Resource
     
     
    org.hl7.fhir.utilities.xhtml.XhtmlNode
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    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)
     
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • element

      protected org.hl7.fhir.r4.model.Base element
  • Method Details

    • fhirVersion

      public String fhirVersion()
      Specified by:
      fhirVersion in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • isPrimitive

      public boolean isPrimitive()
      Specified by:
      isPrimitive in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • hasPrimitiveValue

      public boolean hasPrimitiveValue()
      Specified by:
      hasPrimitiveValue in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • primitiveValue

      Specified by:
      primitiveValue in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • loadTheChildren

      protected void loadTheChildren()
      Specified by:
      loadTheChildren in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • isResource

      public boolean isResource()
      Specified by:
      isResource in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • canHaveNarrative

      public boolean canHaveNarrative()
      Specified by:
      canHaveNarrative in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getNarrative

      public org.hl7.fhir.utilities.xhtml.XhtmlNode getNarrative()
      Specified by:
      getNarrative in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • hasNarrative

      public boolean hasNarrative()
      Specified by:
      hasNarrative in class org.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 class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • markLanguage

      public void markLanguage(org.hl7.fhir.utilities.xhtml.XhtmlNode x, Locale locale)
      Overrides:
      markLanguage in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getId

      public String getId()
      Specified by:
      getId in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getResourceNative

      public org.hl7.fhir.r5.model.Resource getResourceNative()
      Specified by:
      getResourceNative in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • hasFormatComment

      public boolean hasFormatComment()
      Specified by:
      hasFormatComment in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getFormatCommentsPre

      Specified by:
      getFormatCommentsPre in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getXhtml

      public org.hl7.fhir.utilities.xhtml.XhtmlNode getXhtml()
      Specified by:
      getXhtml in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getBase

      public org.hl7.fhir.r5.model.Base getBase()
      Specified by:
      getBase in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • isDirect

      public boolean isDirect()
      Specified by:
      isDirect in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getWebPath

      public String getWebPath()
      Specified by:
      getWebPath in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper
    • getCodeSystemUri

      Specified by:
      getCodeSystemUri in class org.hl7.fhir.r5.renderers.utils.ResourceWrapper