Class UriDt

All Implemented Interfaces:
IDatatype, IElement, IIdentifiableElement, IPrimitiveDatatype<String>, ISupportsUndeclaredExtensions, Externalizable, Serializable, IBase, IBaseDatatype, IPrimitiveType<String>
Direct Known Subclasses:
IdDt, OidDt

public class UriDt extends BasePrimitive<String>
See Also:
Serialized Form
  • Constructor Details

    • UriDt

      public UriDt()
      Create a new String
    • UriDt

      public UriDt(String theValue)
      Create a new String
  • Method Details

    • encode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class BasePrimitive<String>
    • 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 equals(Object) method, since that method returns false unless it is passed an instance of UriDt
    • hashCode

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

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

      public static UriDt fromOid(String theOid)
      Creates a new UriDt instance which uses the given OID as the content (and prepends "urn:oid:" to the OID string in the value of the newly created UriDt, 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