|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ohf.ihe.xds.consumer.query.QueryBuilderUtils
public class QueryBuilderUtils
Static utilites to aid in building XDS consumer SQL query clauses and other components for use by developers wishing to extends query capabilites of the IHE XDS Consumer (Transaction ITI-16: Query Registry)
for example use,
for example use| Constructor Summary | |
|---|---|
QueryBuilderUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
buildCodeClause(java.lang.String codeUUID,
CodedMetadataType[] codes)
Builds a code query sub clause (Classification): conjuncts the atoms ( metadataCode.classifiedObject = doc.id, metadataCode.classificationSchemd = XDS uuid of the code selected, code.nodeRepresentation (= or IN) codes) |
static java.lang.String |
buildDateTimeClause(java.lang.String slotName,
java.lang.String from,
java.lang.String to)
Builds the date/time range query sub clause (included the lower time bound, but excludes the upper time bound). |
static java.lang.String |
buildIdClause(java.lang.String idSchemeUUID,
java.lang.String[] idValues)
Builds a id query sub clause (ExternalIdentifier): conjuncts the atoms (metadataId.registryObject = DocEntry || SubSet || Folder, metadataId.identificationScheme = XDS uuid of the id selected, metadataId.value (= or IN) idValues) |
static java.lang.String |
buildListArgs(java.lang.String[] args)
Builds coma separade list of arguments |
static java.lang.String |
buildStatusClause(java.lang.String metadataUUID,
AvailabilityStatusType[] status)
Builds the status sub clause of a query |
static java.lang.String |
checkForSingleQuote(java.lang.String s)
For SQL any query parameter value that happens to contain a single quote (') must "escape" the single quote with another (''). |
static java.lang.String |
convert(java.lang.String input)
XML escapes any '&' found in the parameter. |
static int |
validCodeList(CodedMetadataType[] codes)
Checks to see if the code list provided has one coding scheme documented for each code, or none at all |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryBuilderUtils()
| Method Detail |
|---|
public static java.lang.String convert(java.lang.String input)
input - string to XML escape
public static java.lang.String buildCodeClause(java.lang.String codeUUID,
CodedMetadataType[] codes)
throws MalformedQueryException
codeUUID - uuid of metadata code element (see UUIDs),
non nullcodes - list of coded values and corresponding code scheme names, non null, and must have at least one
(non-null) element at index zero.
MalformedQueryException - if null parameters were given or the codeUUID could not be identified
public static java.lang.String buildIdClause(java.lang.String idSchemeUUID,
java.lang.String[] idValues)
throws MalformedQueryException
idSchemeUUID - IHE assigned identification scheme UUID (see UUIDs)idValues - list of ids represented as strings, non null, and must have at least one
(non-null) element at index zero.
MalformedQueryException - if null parameters were given or the idSchemeUUID could not be identified
public static java.lang.String buildDateTimeClause(java.lang.String slotName,
java.lang.String from,
java.lang.String to)
throws MalformedQueryException
slotName - date/time metadata attribute name to be selected among metadata time slot name constants
provided in DocumentEntryConstants,
SubmissionSetConstants or
FolderConstants , non nullfrom - start time, non nullto - end time, non null
MalformedQueryException - if null parameters were given or the slotName could not be identified
public static java.lang.String buildStatusClause(java.lang.String metadataUUID,
AvailabilityStatusType[] status)
throws MalformedQueryException
metadataUUID - obj id of metadata componnet: doc entry, sub set or folder, non nullstatus - list of status, non null
MalformedQueryException - if null parameters were given or the metadataUUID could not be identifiedpublic static java.lang.String buildListArgs(java.lang.String[] args)
public static java.lang.String checkForSingleQuote(java.lang.String s)
s - the string to check.
public static int validCodeList(CodedMetadataType[] codes)
codes - array of CodedMetadataTypes to validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||