Class Base

java.lang.Object
org.hl7.fhir.dstu2.model.Base
All Implemented Interfaces:
Serializable, org.hl7.fhir.instance.model.api.IBase
Direct Known Subclasses:
BaseResource, Element

public abstract class Base extends Object implements Serializable, org.hl7.fhir.instance.model.api.IBase
See Also:
  • Constructor Details

    • Base

      public Base()
  • Method Details

    • getUserData

      public Object getUserData(String name)
      Specified by:
      getUserData in interface org.hl7.fhir.instance.model.api.IBase
    • setUserData

      public void setUserData(String name, Object value)
      Specified by:
      setUserData in interface org.hl7.fhir.instance.model.api.IBase
    • setUserDataINN

      public void setUserDataINN(String name, Object value)
    • hasUserData

      public boolean hasUserData(String name)
    • getUserString

      public String getUserString(String name)
    • getUserInt

      public int getUserInt(String name)
    • hasFormatComment

      public boolean hasFormatComment()
      Specified by:
      hasFormatComment in interface org.hl7.fhir.instance.model.api.IBase
    • getFormatCommentsPre

      Specified by:
      getFormatCommentsPre in interface org.hl7.fhir.instance.model.api.IBase
    • getFormatCommentsPost

      Specified by:
      getFormatCommentsPost in interface org.hl7.fhir.instance.model.api.IBase
    • isPrimitive

      public boolean isPrimitive()
    • primitiveValue

    • fhirType

      public abstract String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
    • hasType

      public boolean hasType(String... name)
    • listChildren

      protected abstract void listChildren(List<Property> result)
    • setProperty

      public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • children

      public List<Property> children()
      Supports iterating the children elements in some generic processor or browser All defined children will be listed, even if they have no value on this instance Note that the actual content of primitive or xhtml elements is not iterated explicitly. To find these, the processing code must recognise the element as a primitive, typecast the value to a Type, and examine the value
      Returns:
      a list of all the children defined for this element
    • getChildByName

    • listChildrenByName

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
    • equalsDeep

      public boolean equalsDeep(Base other)
    • equalsShallow

      public boolean equalsShallow(Base other)
    • compareDeep

      public static boolean compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull)
    • compareDeep

      public static boolean compareDeep(Base e1, Base e2, boolean allowNull)
    • compareDeep

      public static boolean compareDeep(org.hl7.fhir.utilities.xhtml.XhtmlNode div1, org.hl7.fhir.utilities.xhtml.XhtmlNode div2, boolean allowNull)
    • compareValues

      public static boolean compareValues(List<? extends PrimitiveType> e1, List<? extends PrimitiveType> e2, boolean allowNull)
    • compareValues

      public static boolean compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull)
    • castToBoolean

      public BooleanType castToBoolean(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToInteger

      public IntegerType castToInteger(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToDecimal

      public DecimalType castToDecimal(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToBase64Binary

      public Base64BinaryType castToBase64Binary(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToInstant

      public InstantType castToInstant(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToString

      public StringType castToString(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToUri

      public UriType castToUri(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToDate

      public DateType castToDate(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToDateTime

      public DateTimeType castToDateTime(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToTime

      public TimeType castToTime(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToCode

      public CodeType castToCode(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToOid

      public OidType castToOid(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToId

      public IdType castToId(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToUnsignedInt

      public UnsignedIntType castToUnsignedInt(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToPositiveInt

      public PositiveIntType castToPositiveInt(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToMarkdown

      public MarkdownType castToMarkdown(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToAnnotation

      public Annotation castToAnnotation(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToAttachment

      public Attachment castToAttachment(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToIdentifier

      public Identifier castToIdentifier(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToCodeableConcept

      public CodeableConcept castToCodeableConcept(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToCoding

      public Coding castToCoding(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToQuantity

      public Quantity castToQuantity(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToMoney

      public Money castToMoney(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToDuration

      public Duration castToDuration(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToSimpleQuantity

      public SimpleQuantity castToSimpleQuantity(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToRange

      public Range castToRange(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToPeriod

      public Period castToPeriod(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToRatio

      public Ratio castToRatio(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToSampledData

      public SampledData castToSampledData(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToSignature

      public Signature castToSignature(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToHumanName

      public HumanName castToHumanName(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToAddress

      public Address castToAddress(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToContactPoint

      public ContactPoint castToContactPoint(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToTiming

      public Timing castToTiming(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToReference

      public Reference castToReference(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToMeta

      public Meta castToMeta(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToExtension

      public Extension castToExtension(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToResource

      public Resource castToResource(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToNarrative

      public Narrative castToNarrative(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToElementDefinition

      public ElementDefinition castToElementDefinition(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • isMetadataBased

      protected boolean isMetadataBased()
    • equals

      public static boolean equals(String v1, String v2)