public TokenParam(String theSystem, String theValue) { setSystem(theSystem); setValue(theValue); }
public TokenParam(String theSystem, String theValue, boolean theText) { if (theText && isNotBlank(theSystem)) { throw new IllegalArgumentException("theSystem can not be non-blank if theText is true (:text searches do not include a system). In other words, set the first parameter to null for a text search"); } setSystem(theSystem); setValue(theValue); setText(theText); }
/** * {@inheritDoc} */ @Override void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theParameter) { setModifier(null); if (theQualifier != null) { TokenParamModifier modifier = TokenParamModifier.forValue(theQualifier); setModifier(modifier); if (modifier == TokenParamModifier.TEXT) { setSystem(null); setValue(ParameterUtil.unescape(theParameter)); return; } } setSystem(null); if (theParameter == null) { setValue(null); } else { int barIndex = ParameterUtil.nonEscapedIndexOf(theParameter, '|'); if (barIndex != -1) { setSystem(theParameter.substring(0, barIndex)); setValue(ParameterUtil.unescape(theParameter.substring(barIndex + 1))); } else { setValue(ParameterUtil.unescape(theParameter)); } } }
public TokenParam(String theSystem, String theValue) { setSystem(theSystem); setValue(theValue); }
public TokenParam(String theSystem, String theValue, boolean theText) { if (theText && isNotBlank(theSystem)) { throw new IllegalArgumentException("theSystem can not be non-blank if theText is true (:text searches do not include a system). In other words, set the first parameter to null for a text search"); } setSystem(theSystem); setValue(theValue); setText(theText); }
/** * {@inheritDoc} */ @Override void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theParameter) { setModifier(null); if (theQualifier != null) { TokenParamModifier modifier = TokenParamModifier.forValue(theQualifier); setModifier(modifier); if (modifier == TokenParamModifier.TEXT) { setSystem(null); setValue(ParameterUtil.unescape(theParameter)); return; } } setSystem(null); if (theParameter == null) { setValue(null); } else { int barIndex = ParameterUtil.nonEscapedIndexOf(theParameter, '|'); if (barIndex != -1) { setSystem(theParameter.substring(0, barIndex)); setValue(ParameterUtil.unescape(theParameter.substring(barIndex + 1))); } else { setValue(ParameterUtil.unescape(theParameter)); } } }