|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.common.model.opensearch.OpenSearchQuery
public class OpenSearchQuery
The "Query" element per OpenSearch specification
The "Query" element Describes a specific search request that can be made by the search client. Attributes: role - Contains a string identifying how the search client should interpret the search request defined by this Query element. Restrictions: See the role values specification for allowed role values. Requirements: This attribute is required. title - Contains a human-readable plain text string describing the search request. Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This attribute is optional. totalResults - Contains the expected number of results to be found if the search request were made. Restrictions: The value is a non-negative integer. Requirements: This attribute is optional. searchTerms - Contains the value representing the "searchTerms" as an OpenSearch 1.1 parameter. Restrictions: See the "searchTerms" parameter. Requirements: This attribute is optional. count - Contains the value representing the "count" as a OpenSearch 1.1 parameter. Restrictions: See the "count" parameter. Requirements: This attribute is optional. startIndex - Contains the value representing the "startIndex" as an OpenSearch 1.1 parameter. Restrictions: See the "startIndex" parameter. Requirements: This attribute is optional. startPage - Contains the value representing the "startPage" as an OpenSearch 1.1 parameter. Restrictions: See the "startPage" parameter. Requirements: This attribute is optional. language - Contains the value representing the "language" as an OpenSearch 1.1 parameter. Restrictions: See the "language" parameter. Requirements: This attribute is optional. inputEncoding - Contains the value representing the "inputEncoding" as an OpenSearch 1.1 parameter. Restrictions: See the "inputEncoding" parameter. Requirements: This attribute is optional. outputEncoding - Contains the value representing the "outputEncoding" as an OpenSearch 1.1 parameter. Restrictions: See the "outputEncoding" parameter. Requirements: This attribute is optional. Example: <Query role="example" searchTerms="cat" /> o Query element extensibility The Query element may contain additional attributes if the extended attributes are associated with a namespace. Search clients should interpret extended attributes to represent the corresponding template parameter by the same name in the specified namespace. Example of a Query element representing a search request that contains an extended attribute that corresponds to an extended search parameter: <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:custom="http://example.com/opensearchextensions/1.0/"> <Url type="text/html" template="http://example.com/search?color={custom:color?}" /> <Query role="example" custom:color="blue" /> <!-- ... --> </OpenSearchDescription> o Role values A role value consists of an optional prefix followed by the local role value. If the prefix is present it will be separated from the local role value with the ":" character. All role values are associated with a namespace, either implicitly in the case of local role values, or explicitly via a prefix in the case of fully qualified role values. Role extensibility The role attribute may take on values beyond those specified in this document provided they are fully qualified with a prefix and associated with a declared namespace. Clients that encounter unrecognized role values should continue to process the document as if the Query element containing the unrecognized role value did not appear. Role prefix A role prefix associates a local role name with a namespace. All prefixes must be previously declared as an XML namespace prefix on the containing Query element or ancestor elements. Local role values Local role values are not preceded by a prefix. Local role values are associated with the OpenSearch 1.1 namespace. The following role values are identified with the OpenSearch 1.1 namespace. The list is exhaustive; only the role values listed below may appear in the OpenSearch 1.1 namespace. Role values: "request" Represents the search query that can be performed to retrieve the same set of search results. "example" Represents a search query that can be performed to demonstrate the search engine. "related" Represents a search query that can be performed to retrieve similar but different search results. "correction" Represents a search query that can be performed to improve the result set, such as with a spelling correction. "subset" Represents a search query that will narrow the current set of search results. "superset" Represents a search query that will broaden the current set of search results. Example of a local role value: <Query role="related" title="A related search" searchTerms="tiger" /> o Fully qualified role values Fully qualified role values are preceded by a prefix. Fully qualified role values are associated with the namespace identified by the prefix on the containing Query element or ancestor elements. Example of a fully qualified role value: <Query xmlns:custom="http://example.com/opensearchextensions/1.0/" role="custom:synonym" title="Synonyms of 'cat'" searchTerms="feline" />
Nested Class Summary | |
---|---|
static class |
OpenSearchQuery.QueryRole
|
Field Summary | |
---|---|
protected java.math.BigInteger |
count
|
protected java.lang.String |
inputEncoding
|
protected java.lang.String |
language
|
protected java.lang.String |
outputEncoding
|
protected java.lang.String |
role
|
protected java.lang.String |
searchTerms
|
protected java.math.BigInteger |
startIndex
|
protected java.math.BigInteger |
startPage
|
protected java.lang.String |
title
|
protected java.math.BigInteger |
totalResults
|
Constructor Summary | |
---|---|
OpenSearchQuery()
|
Method Summary | |
---|---|
java.math.BigInteger |
getCount()
Gets the value of the count property. |
java.lang.String |
getInputEncoding()
Gets the value of the inputEncoding property. |
java.lang.String |
getLanguage()
Gets the value of the language property. |
java.util.Map<javax.xml.namespace.QName,java.lang.String> |
getOtherAttributes()
Gets a map that contains attributes that aren't bound to any typed property on this class. |
java.lang.String |
getOutputEncoding()
Gets the value of the outputEncoding property. |
java.lang.String |
getRole()
Gets the value of the role property. |
java.lang.String |
getSearchTerms()
Gets the value of the searchTerms property. |
java.math.BigInteger |
getStartIndex()
Gets the value of the startIndex property. |
java.math.BigInteger |
getStartPage()
Gets the value of the startPage property. |
java.lang.String |
getTitle()
Gets the value of the title property. |
java.math.BigInteger |
getTotalResults()
Gets the value of the totalResults property. |
void |
setCount(java.math.BigInteger value)
Sets the value of the count property. |
void |
setInputEncoding(java.lang.String value)
Sets the value of the inputEncoding property. |
void |
setLanguage(java.lang.String value)
Sets the value of the language property. |
void |
setOutputEncoding(java.lang.String value)
Sets the value of the outputEncoding property. |
void |
setRole(java.lang.String value)
Sets the value of the role property. |
void |
setSearchTerms(java.lang.String value)
Sets the value of the searchTerms property. |
void |
setStartIndex(java.math.BigInteger value)
Sets the value of the startIndex property. |
void |
setStartPage(java.math.BigInteger value)
Sets the value of the startPage property. |
void |
setTitle(java.lang.String value)
Sets the value of the title property. |
void |
setTotalResults(java.math.BigInteger value)
Sets the value of the totalResults property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String role
protected java.lang.String searchTerms
protected java.lang.String title
protected java.math.BigInteger totalResults
protected java.math.BigInteger count
protected java.math.BigInteger startPage
protected java.math.BigInteger startIndex
protected java.lang.String language
protected java.lang.String inputEncoding
protected java.lang.String outputEncoding
Constructor Detail |
---|
public OpenSearchQuery()
Method Detail |
---|
public java.lang.String getRole()
String
public void setRole(java.lang.String value)
value
- allowed object is String
public java.lang.String getSearchTerms()
String
public void setSearchTerms(java.lang.String value)
value
- allowed object is String
public java.lang.String getTitle()
String
public void setTitle(java.lang.String value)
value
- allowed object is String
public java.math.BigInteger getTotalResults()
BigInteger
public void setTotalResults(java.math.BigInteger value)
value
- allowed object is BigInteger
public java.math.BigInteger getCount()
BigInteger
public void setCount(java.math.BigInteger value)
value
- allowed object is BigInteger
public java.math.BigInteger getStartPage()
BigInteger
public void setStartPage(java.math.BigInteger value)
value
- allowed object is BigInteger
public java.math.BigInteger getStartIndex()
BigInteger
public void setStartIndex(java.math.BigInteger value)
value
- allowed object is BigInteger
public java.lang.String getLanguage()
String
public void setLanguage(java.lang.String value)
value
- allowed object is String
public java.lang.String getInputEncoding()
String
public void setInputEncoding(java.lang.String value)
value
- allowed object is String
public java.lang.String getOutputEncoding()
String
public void setOutputEncoding(java.lang.String value)
value
- allowed object is String
public java.util.Map<javax.xml.namespace.QName,java.lang.String> getOtherAttributes()
the map is keyed by the name of the attribute and the value is the string value of the attribute. the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |