Package org.hl7.fhir.dstu2.model
Class Reference
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.Element
-
- org.hl7.fhir.dstu2.model.Type
-
- org.hl7.fhir.dstu2.model.BaseReference
-
- org.hl7.fhir.dstu2.model.Reference
-
- 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.IBaseReference,org.hl7.fhir.instance.model.api.ICompositeType
public class Reference extends BaseReference implements org.hl7.fhir.instance.model.api.IBaseReference, org.hl7.fhir.instance.model.api.ICompositeType
A reference from one resource to another.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringTypedisplayPlain text narrative that identifies the resource in addition to the resource reference.protected StringTypereferenceA reference to a location at which the other resource is found.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseaddChild(String name)Referencecopy()booleanequalsDeep(Base other)booleanequalsShallow(Base other)StringfhirType()StringgetDisplay()StringTypegetDisplayElement()StringgetReference()booleanhasDisplay()booleanhasDisplayElement()booleanhasReference()booleanhasReferenceElement()booleanisEmpty()protected voidlistChildren(List<Property> childrenList)ReferencesetDisplay(String value)ReferencesetDisplayElement(StringType value)voidsetProperty(String name, Base value)ReferencesetReference(String value)ReferencesetReferenceElement(StringType value)protected ReferencetypedCopy()-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseReference
getReferenceElement, getResource, setResource
-
Methods inherited from class org.hl7.fhir.dstu2.model.Element
addExtension, addExtension, copyValues, getExtension, getExtensionsByUrl, getExtensionString, getId, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, setId, setIdElement
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
-
-
-
Field Detail
-
reference
protected StringType reference
A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
-
display
protected StringType display
Plain text narrative that identifies the resource in addition to the resource reference.
-
-
Constructor Detail
-
Reference
public Reference()
-
Reference
public Reference(String theReference)
Constructor- Parameters:
theReference- The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123")
-
Reference
public Reference(IdType theReference)
Constructor- Parameters:
theReference- The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123")
-
Reference
public Reference(org.hl7.fhir.instance.model.api.IAnyResource theResource)
Constructor- Parameters:
theResource- The resource represented by this reference
-
-
Method Detail
-
hasReferenceElement
public boolean hasReferenceElement()
- Returns:
reference(A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
-
hasReference
public boolean hasReference()
-
setReferenceElement
public Reference setReferenceElement(StringType value)
- Parameters:
value-reference(A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
-
getReference
public String getReference()
- Returns:
- A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
-
setReference
public Reference setReference(String value)
- Specified by:
setReferencein interfaceorg.hl7.fhir.instance.model.api.IBaseReference- Parameters:
value- A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
-
getDisplayElement
public StringType getDisplayElement()
- Specified by:
getDisplayElementin interfaceorg.hl7.fhir.instance.model.api.IBaseReference- Returns:
display(Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
-
hasDisplayElement
public boolean hasDisplayElement()
-
hasDisplay
public boolean hasDisplay()
-
setDisplayElement
public Reference setDisplayElement(StringType value)
- Parameters:
value-display(Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
-
getDisplay
public String getDisplay()
- Returns:
- Plain text narrative that identifies the resource in addition to the resource reference.
-
setDisplay
public Reference setDisplay(String value)
- Specified by:
setDisplayin interfaceorg.hl7.fhir.instance.model.api.IBaseReference- Parameters:
value- Plain text narrative that identifies the resource in addition to the resource reference.
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classElement
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classElement- Throws:
org.hl7.fhir.exceptions.FHIRException
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classElement
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classElement
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classBaseReference
-
-