public class TokenParam extends Object
| Constructor and Description |
|---|
TokenParam()
Constructor
|
TokenParam(BaseCodingDt theCodingDt)
Constructor which copies the
system and
code from a InternalCodingDt instance and adds it as a parameter |
TokenParam(BaseIdentifierDt theIdentifierDt)
Constructor which copies the
system and
value from a BaseIdentifierDt instance and adds it as a
parameter |
TokenParam(String theSystem,
String theValue) |
TokenParam(String theSystem,
String theValue,
boolean theText) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getMissing()
If set to non-null value, indicates that this parameter has been populated with a "[name]:missing=true" or "[name]:missing=false" vale instead of a normal value
|
TokenParamModifier |
getModifier()
Returns the modifier for this token
|
String |
getQueryParameterQualifier()
This method will return any qualifier that should be appended to the parameter name (e.g ":exact")
|
String |
getSystem()
Returns the system for this token.
|
String |
getValue()
Returns the value for the token (generally the value to the right of the
vertical bar on the URL)
|
InternalCodingDt |
getValueAsCoding() |
String |
getValueAsQueryToken(FhirContext theContext)
Returns a representation of this parameter's value as it will be represented "over the wire".
|
String |
getValueNotNull() |
boolean |
isEmpty() |
protected boolean |
isSupportsChain()
Does this parameter type support chained parameters (only reference should return
true for this) |
boolean |
isText()
Returns true if
getModifier() returns TokenParamModifier.TEXT |
ca.uhn.fhir.rest.param.BaseParam |
setMissing(Boolean theMissing)
If set to non-null value, indicates that this parameter has been populated
with a "[name]:missing=true" or "[name]:missing=false" vale instead of a
normal value
|
TokenParam |
setModifier(TokenParamModifier theModifier) |
TokenParam |
setSystem(String theSystem) |
TokenParam |
setText(boolean theText)
Deprecated.
Use
setModifier(TokenParamModifier) instead |
TokenParam |
setValue(String theValue) |
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.
|
String |
toString() |
public TokenParam()
public TokenParam(BaseCodingDt theCodingDt)
system and
code from a InternalCodingDt instance and adds it as a parametertheCodingDt - The codingpublic TokenParam(BaseIdentifierDt theIdentifierDt)
system and
value from a BaseIdentifierDt instance and adds it as a
parametertheIdentifierDt - The identifierpublic TokenParam(String theSystem, String theValue)
public TokenParam(String theSystem, String theValue, boolean theText)
public TokenParamModifier getModifier()
public String getSystem()
getModifier() is being used, the entire value of the
parameter will be placed in value and this method will return null.
null or "" (empty string) and that
each of these have a different meaning. When a token is passed on a URL and it has no
vertical bar (often meaning "return values that match the given code in any codesystem")
this method will return null. When a token is passed on a URL and it has
a vetical bar but nothing before the bar (often meaning "return values that match the
given code but that have no codesystem) this method will return ""
public String getValue()
public InternalCodingDt getValueAsCoding()
public String getValueNotNull()
public boolean isEmpty()
public boolean isText()
getModifier() returns TokenParamModifier.TEXTpublic TokenParam setModifier(TokenParamModifier theModifier)
public TokenParam setSystem(String theSystem)
@Deprecated public TokenParam setText(boolean theText)
setModifier(TokenParamModifier) insteadpublic TokenParam setValue(String theValue)
public Boolean getMissing()
getMissing in interface IQueryParameterTypepublic final String getQueryParameterQualifier()
IQueryParameterTypegetQueryParameterQualifier in interface IQueryParameterTypepublic final String getValueAsQueryToken(FhirContext theContext)
IQueryParameterTypeSee FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
getValueAsQueryToken in interface IQueryParameterTypetheContext - TODOprotected boolean isSupportsChain()
true for this)public ca.uhn.fhir.rest.param.BaseParam setMissing(Boolean theMissing)
setMissing in interface IQueryParameterTypethis for easier method chainingpublic final void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue)
IQueryParameterTypeSee FHIR specification 2.2.2 Search SearchParameter Types for information on the token format
setValueAsQueryToken in interface IQueryParameterTypetheContext - TODOtheParamName - TODOtheQualifier - The parameter name qualifier that accompanied this value. For example, if the complete query was
http://foo?name:exact=John, qualifier would be ":exact"theValue - The actual parameter value. For example, if the complete query was
http://foo?name:exact=John, the value would be "John"Copyright © 2014–2017 University Health Network. All rights reserved.