public class SelectionCriteriaHelper
extends java.lang.Object
This class helps to build the OAGIS GET verb selection criteria expression. A GET selection criteria expression consists of an XPath expression and a series of control parameters that provide additional information.
For example, consider the following selection criteria expression: {_wcf.ap=IBM_Admin_Details;_wcf.dataLanguageIds='-1,-2'}/CatalogEntry[CatalogEntryIdentifier[(UniqueID=10001)]]
This expression contains:
To create the above expression using the SelectionCriteriaHelper:
SelectionCriteriaHelper selectionCriteriaHelper = new SelectionCriteriaHelper("/CatalogEntry[CatalogEntryIdentifier[(UniqueID=10001)]]");
selectionCriteriaHelper.addAccessProfile("IBM_Admin_Details");
selectionCriteriaHelper.setDataLanguageIds("-1,-2");
ExpressionType queryExpression = selectionCriteriaHelper.getSelectionCriteriaExpression();
Use the addNameValuePair(RelationalExpression)
method to add additional control parameters.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
STR_ACCESS_PROFILE_PARAMETER
Name of the access profile NVP
|
static java.lang.String |
STR_DATA_LANG_IDS_PARAMETER
Name of the language ids NVP
|
static java.lang.String |
STR_DATA_RETRIEVAL_PARAMETER
Name of the data retrieval parameter.
|
static java.lang.String |
STR_NVP_SEPARATOR
Name-value pair separator in the extended query expression.
|
static java.lang.String |
STR_SEARCH_PROFILE_PARAMETER
Name of the search profile NVP
|
static java.lang.String |
STR_USAGE_PARAMETER
Name of the usage NVP
|
static java.lang.String |
STR_XPATH_LANG
XPath language
|
Constructor and Description |
---|
SelectionCriteriaHelper(java.lang.String astrXPath)
Initializes a newly created SelectionCriteriaHelper.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccessProfile(java.lang.String astrAccessProfile)
Add an access profile to the extended query expression.
|
void |
addNameValuePair(RelationalExpression aNVP)
Add a name-value pair to the extended query expression.
|
java.lang.StringBuffer |
appendThisToString(java.lang.StringBuffer asbBuffer,
int additionalCapacity)
Append the String object that represents this class to the specified buffer.
|
ExpressionType |
getSelectionCriteriaExpression()
Returns an OAGIS selection criteria expression.
|
java.lang.String |
getXPath()
Get the XPath expression
|
void |
setDataLanguageIds(java.lang.String astrDataLanguageIds)
Set data language identifiers to the extended query expression.
|
void |
setSearchProfile(java.lang.String astrSearchProfile)
Add a search profile to the extended query expression.
|
void |
setUsage(java.lang.String astrUsage)
Add an usage to the extended query expression.
|
void |
setXPath(java.lang.String path)
Set the XPath expression
|
java.lang.String |
toString()
Returns the String object that represents this class.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String STR_XPATH_LANG
public static final java.lang.String STR_ACCESS_PROFILE_PARAMETER
public static final java.lang.String STR_DATA_LANG_IDS_PARAMETER
public static final java.lang.String STR_DATA_RETRIEVAL_PARAMETER
public static final java.lang.String STR_SEARCH_PROFILE_PARAMETER
public static final java.lang.String STR_USAGE_PARAMETER
public static final java.lang.String STR_NVP_SEPARATOR
public SelectionCriteriaHelper(java.lang.String astrXPath)
astrXPath
- - the XPath expression used for this selection criteria.public ExpressionType getSelectionCriteriaExpression()
public final java.lang.StringBuffer appendThisToString(java.lang.StringBuffer asbBuffer, int additionalCapacity)
asbBuffer
- the buffer. If this is null, a new buffer is created and returned.additionalCapacity
- the buffer returned will have at least the specified additonal
capacity.public java.lang.String toString()
The following is the String representation for the example discussed in the Class Javadoc:
{_wcf.ap=IBM_Admin_Details;_wcf.dataLanguageIds='-1,-2'}/CatalogEntry[CatalogEntryIdentifier[(UniqueID=10001)]]
toString
in class java.lang.Object
public final void addAccessProfile(java.lang.String astrAccessProfile)
astrAccessProfile
- - access profile namepublic final void setDataLanguageIds(java.lang.String astrDataLanguageIds)
astrDataLanguageIds
- comma separated list of language identifierspublic final void addNameValuePair(RelationalExpression aNVP)
aNVP
- - name value pairpublic final java.lang.String getXPath()
public final void setXPath(java.lang.String path)
path
- - xpath expressionpublic final void setSearchProfile(java.lang.String astrSearchProfile)
astrSearchProfile
- - search profile namepublic final void setUsage(java.lang.String astrUsage)
astrUsage
- - usage name