public class QuerySlotHelper extends Object
This class ensures that the various encoding rules of query parameter values are met.
Note that this class is only used for ebXML 3.0!
Constructor and Description |
---|
QuerySlotHelper(EbXMLAdhocQueryRequest ebXML)
Constructs the wrapper.
|
Modifier and Type | Method and Description |
---|---|
static String |
decodeString(String value) |
static List<String> |
decodeStringList(String list) |
static String |
encodeAsString(String value) |
static String |
encodeAsStringList(String value) |
void |
fromAssociationType(QueryParameter param,
List<AssociationType> associationTypes)
Stores an association parameter into a slot.
|
void |
fromCode(QueryParameter param,
List<Code> codes)
Stores a list of codes into a slot.
|
void |
fromCode(QueryParameter param,
QueryList<Code> queryList)
Stores a code list with AND/OR semantics into a set of slots with the same name.
|
void |
fromDocumentAvailability(QueryParameter param,
List<DocumentAvailability> status)
Stores a status parameter into a slot.
|
void |
fromDocumentEntryType(QueryParameter param,
List<DocumentEntryType> documentEntryTypes) |
void |
fromInteger(QueryParameter param,
Integer value)
Stores a numbered parameter into a slot.
|
void |
fromNumber(QueryParameter param,
String value)
Stores a numbered parameter into a slot.
|
void |
fromPatientIdList(QueryParameter param,
List<Identifiable> values)
Stores a list of patient IDs into a slot.
|
void |
fromStatus(QueryParameter param,
List<AvailabilityStatus> status)
Stores a status parameter into a slot.
|
void |
fromString(QueryParameter param,
String value)
Stores a string-valued parameter into a slot.
|
void |
fromStringList(QueryParameter param,
List<String> values)
Stores a list of strings into a slot.
|
void |
fromStringList(QueryParameter param,
QueryList<String> queryList)
Stores a string list with AND/OR semantics into a set of slots with the same name.
|
void |
fromStringList(String slotName,
List<String> values)
Stores a list of strings into a slot.
|
void |
fromStringList(String slotName,
QueryList<String> queryList)
Stores a string list with AND/OR semantics into a set of slots with the same name.
|
static <C extends ca.uhn.hl7v2.model.Composite,T extends Hl7v2Based<C>> |
parse(List<String> source,
Class<T> targetClass) |
static <C extends ca.uhn.hl7v2.model.Composite,T extends Hl7v2Based<C>> |
parse(QueryList<String> source,
Class<T> targetClass) |
static <T extends Hl7v2Based> |
render(List<T> source) |
static <T extends Hl7v2Based> |
render(QueryList<T> source) |
List<AssociationType> |
toAssociationType(QueryParameter param)
Retrieves an association parameter from a slot.
|
static List<Code> |
toCode(List<String> slotValues) |
List<Code> |
toCodeList(QueryParameter param)
Retrieves a list of codes from a slot.
|
QueryList<Code> |
toCodeQueryList(QueryParameter param,
QueryParameter schemeParam)
Retrieves a code list with AND/OR semantics from a set of slots with the same name.
|
List<DocumentAvailability> |
toDocumentAvailability(QueryParameter param)
Retrieves a status parameter from a slot.
|
List<DocumentEntryType> |
toDocumentEntryType(QueryParameter param) |
Integer |
toInteger(QueryParameter param)
Retrieves a numbered parameter from a slot.
|
String |
toNumber(QueryParameter param)
Retrieves a numbered parameter from a slot.
|
List<Identifiable> |
toPatientIdList(QueryParameter param)
Retrieves a list of patient IDs from a slot.
|
List<AvailabilityStatus> |
toStatus(QueryParameter param)
Retrieves a status parameter from a slot.
|
String |
toString(QueryParameter param)
Retrieves a string-valued parameter from a slot.
|
List<String> |
toStringList(QueryParameter param)
Retrieves a list of strings from a slot.
|
QueryList<String> |
toStringQueryList(QueryParameter param)
Retrieves a string list with AND/OR semantics from a set of slots with the same name.
|
QueryList<String> |
toStringQueryList(String slotName)
Retrieves a string list with AND/OR semantics from a set of slots with the same name.
|
public QuerySlotHelper(EbXMLAdhocQueryRequest ebXML)
ebXML
- the wrapped object.public String toString(QueryParameter param)
param
- the parameter.public void fromString(QueryParameter param, String value)
param
- the parameter.value
- the string value.public void fromCode(QueryParameter param, List<Code> codes)
param
- the parameter.codes
- the list of codes.public void fromCode(QueryParameter param, QueryList<Code> queryList)
param
- standard query parameter (implies the name of the slots).queryList
- the list of codes.public QueryList<String> toStringQueryList(QueryParameter param)
param
- standard query parameter (implies the name of the slots).public QueryList<String> toStringQueryList(String slotName)
slotName
- name of the source slots, may correspond to either
a standard query parameter or an extra parameter.public void fromStringList(QueryParameter param, List<String> values)
param
- standard query parameter (implies the name of the slots).values
- the string list.public void fromStringList(String slotName, List<String> values)
slotName
- name of the target slot, may correspond to either
a standard query parameter or an extra parameter.values
- the string list.public void fromStringList(QueryParameter param, QueryList<String> queryList)
param
- standard query parameter (implies the name of the slots).queryList
- the list of strings.public void fromStringList(String slotName, QueryList<String> queryList)
slotName
- name of the target slots, may correspond to either
a standard query parameter or an extra parameter.queryList
- the list of strings.public List<String> toStringList(QueryParameter param)
param
- the parameter.public void fromPatientIdList(QueryParameter param, List<Identifiable> values)
param
- the parameter.values
- the patient ID list.public List<Identifiable> toPatientIdList(QueryParameter param)
param
- the parameter.public List<Code> toCodeList(QueryParameter param)
param
- the parameter.public QueryList<Code> toCodeQueryList(QueryParameter param, QueryParameter schemeParam)
param
- standard query parameter (implies the name of the slots).schemeParam
- the code scheme parameter.public void fromNumber(QueryParameter param, String value)
param
- the parameter.value
- the value.public String toNumber(QueryParameter param)
param
- the parameter.public void fromStatus(QueryParameter param, List<AvailabilityStatus> status)
param
- the parameter.status
- the list of status values.public List<AvailabilityStatus> toStatus(QueryParameter param)
param
- the parameter.public void fromAssociationType(QueryParameter param, List<AssociationType> associationTypes)
param
- the parameter.associationTypes
- the list of association types.public List<AssociationType> toAssociationType(QueryParameter param)
param
- the parameter.public void fromDocumentEntryType(QueryParameter param, List<DocumentEntryType> documentEntryTypes)
public List<DocumentEntryType> toDocumentEntryType(QueryParameter param)
public void fromDocumentAvailability(QueryParameter param, List<DocumentAvailability> status)
param
- the parameter.status
- the list of documentAvailability values.public List<DocumentAvailability> toDocumentAvailability(QueryParameter param)
param
- the parameter.public void fromInteger(QueryParameter param, Integer value)
param
- the parameter.value
- the value.public Integer toInteger(QueryParameter param)
param
- the parameter.public static <T extends Hl7v2Based> QueryList<String> render(QueryList<T> source)
public static <T extends Hl7v2Based> List<String> render(List<T> source)
public static <C extends ca.uhn.hl7v2.model.Composite,T extends Hl7v2Based<C>> QueryList<T> parse(QueryList<String> source, Class<T> targetClass)
public static <C extends ca.uhn.hl7v2.model.Composite,T extends Hl7v2Based<C>> List<T> parse(List<String> source, Class<T> targetClass)
Copyright © 2018 Open eHealth Foundation. All rights reserved.