Package org.hl7.fhir.r4.model
Class UriType
- java.lang.Object
-
- org.hl7.fhir.r4.model.Base
-
- org.hl7.fhir.r4.model.Element
-
- org.hl7.fhir.r4.model.Type
-
- org.hl7.fhir.r4.model.PrimitiveType<String>
-
- org.hl7.fhir.r4.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 UriTypecopy()protected Stringencode(String theValue)Subclasses must override to convert a "coerced" value into an encoded one.booleanequals(String theString)Compares the given string to the string representation of this URI.booleanequalsDeep(Base obj)StringfhirType()static OidTypefromOid(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).inthashCode()protected Stringparse(String theValue)Subclasses must override to convert an encoded representation of this datatype into a "coerced" one-
Methods inherited from class org.hl7.fhir.r4.model.PrimitiveType
asStringValue, equalsShallow, forceStringValue, fromStringValue, getProperty, getTypesForProperty, getValue, getValueAsString, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, makeProperty, primitiveValue, readExternal, setProperty, setProperty, setValue, setValueAsString, toString, typedCopy, updateStringValue, writeExternal
-
Methods inherited from class org.hl7.fhir.r4.model.Element
addChild, addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement
-
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isDateTime, 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:
copyin classPrimitiveType<String>
-
encode
protected String encode(String theValue)
Description copied from class:PrimitiveTypeSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein 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 returnsfalseunless it is passed an instance ofUriType
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPrimitiveType<String>
-
parse
protected String parse(String theValue)
Description copied from class:PrimitiveTypeSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein 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 (nullis acceptable and will result in a UriDt instance with anullvalue)- Returns:
- A new UriDt instance
-
equalsDeep
public boolean equalsDeep(Base obj)
- Overrides:
equalsDeepin classPrimitiveType<String>
-
-