Package ca.uhn.fhir.model.primitive
Class StringDt
- java.lang.Object
-
- ca.uhn.fhir.model.api.BaseElement
-
- ca.uhn.fhir.model.api.BaseIdentifiableElement
-
- ca.uhn.fhir.model.api.BasePrimitive<String>
-
- ca.uhn.fhir.model.primitive.StringDt
-
- All Implemented Interfaces:
IDatatype,IElement,IIdentifiableElement,IPrimitiveDatatype<String>,IQueryParameterType,ISupportsUndeclaredExtensions,Externalizable,Serializable,IBase,IBaseDatatype,IPrimitiveType<String>
- Direct Known Subclasses:
MarkdownDt,TimeDt
public class StringDt extends BasePrimitive<String> implements IQueryParameterType
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Stringencode(String theValue)Subclasses must override to convert a "coerced" value into an encoded one.booleanequals(Object obj)BooleangetMissing()Deprecated.get/setMissing is not supported in StringDt.StringgetQueryParameterQualifier()This method will return any qualifier that should be appended to the parameter name (e.g ":exact").StringgetValueAsQueryToken(FhirContext theContext)Returns a representation of this parameter's value as it will be represented "over the wire".StringgetValueNotNull()inthashCode()booleanisEmpty()Returnstrueif this datatype has no extensions, and has either anullvalue or an empty ("") value.protected Stringparse(String theValue)Subclasses must override to convert an encoded representation of this datatype into a "coerced" oneIQueryParameterTypesetMissing(Boolean theMissing)Deprecated.get/setMissing is not supported in StringDt.voidsetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)This method is generally only called by HAPI itself, and should not need to be called from user code.StringtoString()Returns the value of this string, ornull-
Methods inherited from class ca.uhn.fhir.model.api.BasePrimitive
getValue, getValueAsString, hasValue, readExternal, setValue, setValueAsString, updateStringValue, writeExternal
-
Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setId
-
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserData
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
-
-
-
Method Detail
-
getValueNotNull
public String getValueNotNull()
-
toString
public String toString()
Returns the value of this string, ornull- Overrides:
toStringin classBasePrimitive<String>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasePrimitive<String>
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classBasePrimitive<String>
-
setValueAsQueryToken
public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)
This method is generally only called by HAPI itself, and should not need to be called from user code.See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
setValueAsQueryTokenin interfaceIQueryParameterType- Parameters:
theContext- TODOtheParamName- TODOtheQualifier- The parameter name qualifier that accompanied this value. For example, if the complete query washttp://foo?name:exact=John, qualifier would be ":exact"theValue- The actual parameter value. For example, if the complete query washttp://foo?name:exact=John, the value would be "John"
-
getValueAsQueryToken
public String getValueAsQueryToken(FhirContext theContext)
Returns a representation of this parameter's value as it will be represented "over the wire". In other words, how it will be presented in a URL (although not URL escaped)See FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
- Specified by:
getValueAsQueryTokenin interfaceIQueryParameterType- Parameters:
theContext- TODO- Returns:
- Returns a representation of this parameter's value as it will be represented "over the wire". In other words, how it will be presented in a URL (although not URL escaped)
-
isEmpty
public boolean isEmpty()
Returnstrueif this datatype has no extensions, and has either anullvalue or an empty ("") value.- Specified by:
isEmptyin interfaceIBase- Overrides:
isEmptyin classBasePrimitive<String>
-
getQueryParameterQualifier
public String getQueryParameterQualifier()
Description copied from interface:IQueryParameterTypeThis method will return any qualifier that should be appended to the parameter name (e.g ":exact"). Returns null if none are present.- Specified by:
getQueryParameterQualifierin interfaceIQueryParameterType
-
parse
protected String parse(String theValue)
Description copied from class:BasePrimitiveSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein classBasePrimitive<String>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
encode
protected String encode(String theValue)
Description copied from class:BasePrimitiveSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein classBasePrimitive<String>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
getMissing
@Deprecated public Boolean getMissing()
Deprecated.get/setMissing is not supported in StringDt. UseStringParaminstead if you need this functionalityNot supported!- Specified by:
getMissingin interfaceIQueryParameterType
-
setMissing
@Deprecated public IQueryParameterType setMissing(Boolean theMissing)
Deprecated.get/setMissing is not supported in StringDt. UseStringParaminstead if you need this functionalityNot supported!- Specified by:
setMissingin interfaceIQueryParameterType- Returns:
- Returns a reference to
thisfor easier method chaining
-
-