Class Base

java.lang.Object
org.hl7.fhir.dstu3.model.Base
All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase
Direct Known Subclasses:
BaseResource, Element, Element, GraphQLEngine.SearchEdge, GraphQLEngine.SearchWrapper

public abstract class Base extends Object implements Serializable, org.hl7.fhir.instance.model.api.IBase, ca.uhn.fhir.model.api.IElement
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
    • clearUserData

      public void clearUserData(String name)
    • 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()
    • isBooleanPrimitive

      public boolean isBooleanPrimitive()
    • hasPrimitiveValue

      public boolean hasPrimitiveValue()
    • 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 Base 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

      public List<Base> listChildrenByName(String name) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • listChildrenByName

      public Base[] listChildrenByName(String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • 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)
    • castToType

      public Type castToType(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • 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
    • castToDosage

      public Dosage castToDosage(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
    • castToContactDetail

      public ContactDetail castToContactDetail(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToContributor

      public Contributor castToContributor(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToUsageContext

      public UsageContext castToUsageContext(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToRelatedArtifact

      public RelatedArtifact castToRelatedArtifact(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
    • castToDataRequirement

      public DataRequirement castToDataRequirement(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToParameterDefinition

      public ParameterDefinition castToParameterDefinition(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToTriggerDefinition

      public TriggerDefinition castToTriggerDefinition(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToXhtml

      public org.hl7.fhir.utilities.xhtml.XhtmlNode castToXhtml(Base b) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • castToXhtmlString

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

      protected boolean isMetadataBased()
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • equals

      public static boolean equals(String v1, String v2)
    • isResource

      public boolean isResource()
    • getIdBase

      public abstract String getIdBase()
    • setIdBase

      public abstract void setIdBase(String value)
    • getNamedProperty

      public Property getNamedProperty(String _name) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException