|
||||||||||
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.OpenSearchUrl
public class OpenSearchUrl
The "Url" element per OpenSearch specification
The "Url" element Describes an interface by which a search client can make search requests of the search engine. OpenSearch provides support for both index-based and page-based search engines. By default, both the first search result and the first page of search results are numbered "1". Search engines can use the "indexOffset" and "pageOffset" attributes to inform search clients of different starting values. Parent: OpenSearchDescription Attributes: template - Contains the search URL template to be processed according to the OpenSearch URL template syntax. Requirements: This attribute is required. type - Contains the MIME type of the search result format. Restrictions: The value must be a valid MIME type. Requirements: This attribute is required. indexOffset - Contains the index number of the first search result. Restrictions: The value must be an integer. Default: "1" Requirements: This attribute is optional. pageOffset - Contains the page number of the first set of search results. Restrictions: The value must be an integer. Default: "1". Requirements: This attribute is optional. Requirements: This element must appear one or more times. Example of a Url element describing the interface used to retrieve search results over RSS: <Url type="application/rss+xml" template="http://example.com/?q={searchTerms}&pw={startPage?}" /> Example of a Url element describing the interface used to retrieve 0-based search results over XHTML: <Url type="application/xhtml+xml" indexOffset="0" template="http://example.com/search?q={searchTerms}&start={startIndex?}" />
Field Summary | |
---|---|
protected java.lang.String |
template
|
protected java.lang.String |
type
|
Constructor Summary | |
---|---|
OpenSearchUrl()
|
Method Summary | |
---|---|
void |
addOpenSearchParameter(OpenSearchParameter openSearchParameter)
Add OpenSearch parameter to the list of Open Search Parameters |
java.lang.String |
generateOpenSearchUrlTemplate()
Builds OpenSearchUrl template based on base URI and the list of Open Search openSearchParametersParameters |
java.lang.String |
getBaseUri()
Get Search base URI |
java.util.List<OpenSearchParameter> |
getOpenSearchParameters()
Gets the value of the openSearchParameters property. |
java.lang.String |
getTemplate()
Gets the value of the template property. |
java.lang.String |
getType()
Gets the value of the type property. |
void |
setBaseUri(java.lang.String baseUri)
Set Search base URI |
void |
setTemplate(java.lang.String value)
Sets the value of the template property. |
void |
setType(java.lang.String value)
Sets the value of the type 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 type
protected java.lang.String template
Constructor Detail |
---|
public OpenSearchUrl()
Method Detail |
---|
public java.lang.String getType()
String
public void setType(java.lang.String value)
value
- allowed object is String
public java.lang.String getTemplate()
String
public void setTemplate(java.lang.String value)
value
- allowed object is String
public void addOpenSearchParameter(OpenSearchParameter openSearchParameter)
openSearchParameter
- allowed object is OpenSearchParameter
public java.util.List<OpenSearchParameter> getOpenSearchParameters()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside openSearchParameters object.
For example, to add a new item, do as follows:
getOpenSearchParameters().add(openSearchParameter);
Objects of the following type(s) are allowed in the list String
public java.lang.String generateOpenSearchUrlTemplate()
public java.lang.String getBaseUri()
public void setBaseUri(java.lang.String baseUri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |