
Package org.hl7.fhir.dstu3.model
Class UriType
- java.lang.Object
-
- org.hl7.fhir.dstu3.model.Base
-
- org.hl7.fhir.dstu3.model.Element
-
- org.hl7.fhir.dstu3.model.Type
-
- org.hl7.fhir.dstu3.model.PrimitiveType<String>
-
- org.hl7.fhir.dstu3.model.UriType
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement
,Externalizable
,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>
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UriType
copy()
protected String
encode(String theValue)
Subclasses must override to convert a "coerced" value into an encoded one.boolean
equals(String theString)
Compares the given string to the string representation of this URI.boolean
equalsDeep(Base obj)
String
fhirType()
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).int
hashCode()
protected String
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one-
Methods inherited from class org.hl7.fhir.dstu3.model.PrimitiveType
asStringValue, equalsShallow, fromStringValue, getProperty, getValue, getValueAsString, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, primitiveValue, readExternal, setProperty, setProperty, setValue, setValueAsString, toString, typedCopy, updateStringValue, writeExternal
-
Methods inherited from class org.hl7.fhir.dstu3.model.Element
addChild, addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, getTypesForProperty, hasExtension, hasExtension, hasId, hasIdElement, listChildren, makeProperty, setExtension, setId, setIdBase, setIdElement
-
Methods inherited from class org.hl7.fhir.dstu3.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
-
-
-
Method Detail
-
copy
public UriType copy()
- Specified by:
copy
in classPrimitiveType<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 classPrimitiveType<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 standardObject.equals(Object)
method, since that method returnsfalse
unless it is passed an instance ofUriType
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPrimitiveType<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 classPrimitiveType<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 anull
value)- Returns:
- A new UriDt instance
-
equalsDeep
public boolean equalsDeep(Base obj)
- Overrides:
equalsDeep
in classPrimitiveType<String>
-
-