Class UriType

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IPrimitiveType<String>
Direct Known Subclasses:
IdType, OidType, SidType, UuidType

public class UriType extends PrimitiveType<String>
Primitive type "uri" in FHIR: any valid URI. Sometimes constrained to be only an absolute URI, and sometimes constrained to be a literal reference
See Also:
  • Constructor Details

  • Method Details

    • copy

      public UriType copy()
      Specified by:
      copy in class PrimitiveType<String>
    • encode

      protected String encode(String theValue)
      Description copied from class: PrimitiveType
      Subclasses must override to convert a "coerced" value into an encoded one.
      Specified by:
      encode in class PrimitiveType<String>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • equals

      public boolean equals(String theString)
      Compares the given string to the string representation of this URI. In many cases it is preferable to use this instead of the standard Object.equals(Object) method, since that method returns false unless it is passed an instance of UriType
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PrimitiveType<String>
    • parse

      protected String parse(String theValue)
      Description copied from class: PrimitiveType
      Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
      Specified by:
      parse in class PrimitiveType<String>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • fromOid

      public static OidType fromOid(String theOid)
      Creates a new OidType instance which uses the given OID as the content (and prepends "urn:oid:" to the OID string in the value of the newly created OidType, per the FHIR specification).
      Parameters:
      theOid - The OID to use (null is acceptable and will result in a UriDt instance with a null value)
      Returns:
      A new UriDt instance
    • equalsDeep

      public boolean equalsDeep(Base obj)
      Overrides:
      equalsDeep in class PrimitiveType<String>
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class Element