|
|||||||||||
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.OpenSearchDescription
public class OpenSearchDescription
The "OpenSearchDescription" element per OpenSearch specification
The "OpenSearchDescription" element The root node of the OpenSearch description document. Parent: None Requirements: The element must appear exactly once as the root node of the document. Example: <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <!--- ... ---> </OpenSearchDescription> o The "ShortName" element Contains a brief human-readable title that identifies this search engine. Parent: OpenSearchDescription Restrictions: The value must contain 16 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element must appear exactly once. Example: <ShortName>Web Search</ShortName> o The "Description" element Contains a human-readable text description of the search engine. Parent: OpenSearchDescription Restrictions: The value must contain 1024 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element must appear exactly once. Example: <Description>Use Example.com to search the Web.</Description> o 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?}" /> o The "Contact" element Contains an email address at which the maintainer of the description document can be reached. Parent: OpenSearchDescription Restrictions: The value must conform to the requirements of Section 3.4.1 "Addr-spec specification" in RFC 2822. Requirements: This element may appear zero or one time. Example: <Contact>admin@example.com</Contact> o The "Tags" element Contains a set of words that are used as keywords to identify and categorize this search content. Tags must be a single word and are delimited by the space character (' '). Parent: OpenSearchDescription Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element may appear zero or one time. Example: <Tags>example web</Tags> o The "LongName" element Contains an extended human-readable title that identifies this search engine. Search clients should use the value of the ShortName element if this element is not available. Parent: OpenSearchDescription Restrictions: The value must contain 48 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element may appear zero or one time. Example: <LongName>Example.com Web Search</LongName> o The "Image" element Contains a URL that identifies the location of an image that can be used in association with this search content. Image sizes are offered as a hint to the search client. The search client will chose the most appropriate image for the available space and should give preference to those listed first in the OpenSearch description document. Square aspect ratios are recommended. When possible, search engines should offer a 16x16 image of type "image/x-icon" or "image/vnd.microsoft.icon" (the Microsoft ICON format) and a 64x64 image of type "image/jpeg" or "image/png". Parent: OpenSearchDescription Attributes: height - Contains the height, in pixels, of this image. Restrictions: The value must be a non-negative integer. Requirements: This attribute is optional. width - Contains the width, in pixels, of this image. Restrictions: The value must be a non-negative integer. Requirements: This attribute is optional. type - Contains the the MIME type of this image. Restrictions: The value must be a valid MIME type. Requirements: This attribute is optional. Restrictions: The value must be a URI. Requirements: This element may appear zero, one, or more times. Example: <Image height="16" width="16" type="image/x-icon">http://example.com/favicon.ico</Image> <Image height="64" width="64" type="image/png">http://example.com/websearch.png</Image> o The "Query" element Defines a search query that can be performed by search clients. Please see the OpenSearch Query element specification for more information. OpenSearch description documents should include at least one Query element of role="example" that is expected to return search results. Search clients may use this example query to validate that the search engine is working properly. Parent: OpenSearchDescription Requirements: This element may appear zero or more times. Example: <Query role="example" searchTerms="cat" /> o The "Developer" element Contains the human-readable name or identifier of the creator or maintainer of the description document. The developer is the person or entity that created the description document, and may or may not be the owner, author, or copyright holder of the source of the content itself. Parent: OpenSearchDescription Restrictions: The value must contain 64 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element may appear zero or one time. Example: <Developer>Example.com Development Team</Developer> o The "Attribution" element Contains a list of all sources or entities that should be credited for the content contained in the search feed. Parent: OpenSearchDescription Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. Requirements: This element may appear zero or one time. Example: <Attribution>Search data copyright Example.com, Inc.</Attribution> o The "SyndicationRight" element Contains a value that indicates the degree to which the search results provided by this search engine can be queried, displayed, and redistributed. Parent: OpenSearchDescription Values: The value must be one of the following strings (case insensitive): "open" - The search client may request search results. The search client may display the search results to end users. The search client may send the search results to other search clients. "limited" - The search client may request search results. The search client may display the search results to end users. The search client may not send the search results to other search clients. "private" - The search client may request search results. The search client may not display the search results to end users. The search client may not send the search results to other search clients. "closed" - The search client may not request search results. Default: "open" Requirements: This element may appear zero or one time. Example: <SyndicationRight>open</SyndicationRight> o The "AdultContent" element Contains a boolean value that should be set to true if the search results may contain material intended only for adults. As there are no universally applicable guidelines as to what constitutes "adult" content, the search engine should make a good faith effort to indicate when there is a possibility that search results may contain material inappropriate for all audiences. Parent: OpenSearchDescription Values: The values "false", "FALSE", "0", "no", and "NO" will be considered boolean FALSE; all other strings will be considered boolean TRUE. Default: "false" Requirements: This element may appear zero or one time. Example: <AdultContent>false</AdultContent> o The "Language" element Contains a string that indicates that the search engine supports search results in the specified language. An OpenSearch description document should include one "Language" element for each language that the search engine supports. If the search engine also supports queries for any arbitrary language then the OpenSearch description document should include a Language element with a value of "*". The "language" template parameter in the OpenSearch URL template can be used to allow the search client to choose among the available languages. Parent: OpenSearchDescription Restrictions: The value must conform to the XML 1.0 Language Identification, as specified by RFC 3066. In addition, the value of "*" will signify that the search engine does not restrict search results to any particular language. Default: "*". Requirements: This element may appear zero, one, or more times. Example: <Language>en-us</Language> <Language>*</Language> o The "InputEncoding" element Contains a string that indicates that the search engine supports search requests encoded with the specified character encoding. An OpenSearch description document should include one "InputEncoding" element for each character encoding that can be used to encode search requests. The "inputEncoding" template parameter in the OpenSearch URL template can be used to require the search client to identify which encoding is being used to encode the current search request. Parent: OpenSearchDescription Restrictions: The value must conform to the XML 1.0 Character Encodings, as specified by the IANA Character Set Assignments. Default: "UTF-8". Requirements: This element may appear zero, one, or more times. Example: <InputEncoding>UTF-8</InputEncoding> o The "OutputEncoding" element Contains a string that indicates that the search engine supports search responses encoded with the specified character encoding. An OpenSearch description document should include one "OutputEncoding" element for each character encoding that can be used to encode search responses. The "outputEncoding" template parameter in the OpenSearch URL template can be used to allow the search client to choose a character encoding in the search response. Parent: OpenSearchDescription Restrictions: The value must conform to the XML 1.0 Character Encodings, as specified by the IANA Character Set Assignments. Default: "UTF-8". Requirements: This element may appear zero, one, or more times. Example: <OutputEncoding>UTF-8</OutputEncoding>
Field Summary | |
---|---|
protected java.lang.String |
adultContent
|
protected java.lang.String |
attribution
|
protected java.lang.String |
contact
|
protected java.lang.String |
description
|
protected java.lang.String |
developer
|
protected java.util.List<OpenSearchImage> |
image
|
protected java.util.List<java.lang.String> |
inputEncoding
|
protected java.util.List<java.lang.String> |
language
|
protected java.lang.String |
longName
|
protected java.util.List<java.lang.String> |
outputEncoding
|
protected java.util.List<OpenSearchQuery> |
query
|
protected java.lang.String |
shortName
|
protected java.lang.String |
syndicationRight
|
protected java.lang.String |
tags
|
protected java.util.List<OpenSearchUrl> |
url
|
Constructor Summary | |
---|---|
OpenSearchDescription()
|
Method Summary | |
---|---|
void |
addInputEncoding(java.lang.String encoding)
Adds InputEncoding to the list of supported Input Encoding |
void |
addLanguage(java.lang.String language)
Add "Language". |
void |
addNewImage(OpenSearchImage openSearchImage)
Adds new Image to the list |
void |
addOutputEncoding(java.lang.String encoding)
Adds OutputEncoding to the list of supported Output Encoding |
void |
addQuery(OpenSearchQuery openSearchQuery)
Adds OpenSearchQuery to the list of Open Search Queries |
void |
addUrl(OpenSearchUrl openSearchUrl)
Adds OpenSearchUrl to the list of Open Search Urls. |
java.lang.String |
getAdultContent()
Gets the value of the adultContent property. |
java.lang.String |
getAttribution()
Gets the value of the attribution property. |
java.lang.String |
getContact()
Gets the value of the contact property. |
java.lang.String |
getDescription()
Gets the value of the description property. |
java.lang.String |
getDeveloper()
Gets the value of the developer property. |
java.util.List<OpenSearchImage> |
getImage()
Gets the value of the image property. |
java.util.List<java.lang.String> |
getInputEncoding()
Gets the value of the inputEncoding property. |
java.util.List<java.lang.String> |
getLanguage()
Gets the value of the language property. |
java.lang.String |
getLongName()
Gets the value of the longName property. |
static javax.xml.bind.Marshaller |
getMarshaller()
|
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.util.List<java.lang.String> |
getOutputEncoding()
Gets the value of the outputEncoding property. |
java.util.List<OpenSearchQuery> |
getQuery()
Gets the value of the query property. |
java.lang.String |
getShortName()
Gets the value of the shortName property. |
java.lang.String |
getSyndicationRight()
Gets the value of the syndicationRight property. |
java.lang.String |
getTags()
Gets the value of the tags property. |
static javax.xml.bind.Unmarshaller |
getUnmarshaller()
|
java.util.List<OpenSearchUrl> |
getUrl()
Gets the value of the url property. |
void |
setAdultContent(java.lang.String value)
Sets the value of the adultContent property. |
void |
setAttribution(java.lang.String value)
Sets the value of the attribution property. |
void |
setContact(java.lang.String value)
Sets the value of the contact property. |
void |
setDescription(java.lang.String value)
Sets the value of the description property. |
void |
setDeveloper(java.lang.String value)
Sets the value of the developer property. |
void |
setLongName(java.lang.String value)
Sets the value of the longName property. |
void |
setShortName(java.lang.String value)
Sets the value of the shortName property. |
void |
setSyndicationRight(java.lang.String value)
Sets the value of the syndicationRight property. |
void |
setTags(java.lang.String value)
Sets the value of the tags 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 shortName
protected java.lang.String description
protected java.lang.String tags
protected java.lang.String contact
protected java.util.List<OpenSearchUrl> url
protected java.lang.String longName
protected java.util.List<OpenSearchImage> image
protected java.util.List<OpenSearchQuery> query
protected java.lang.String developer
protected java.lang.String attribution
protected java.lang.String syndicationRight
protected java.lang.String adultContent
protected java.util.List<java.lang.String> language
protected java.util.List<java.lang.String> outputEncoding
protected java.util.List<java.lang.String> inputEncoding
Constructor Detail |
---|
public OpenSearchDescription()
Method Detail |
---|
public static javax.xml.bind.Marshaller getMarshaller()
public static javax.xml.bind.Unmarshaller getUnmarshaller()
public java.lang.String getShortName()
String
public void setShortName(java.lang.String value)
value
- allowed object is String
public java.lang.String getDescription()
String
public void setDescription(java.lang.String value)
value
- allowed object is String
public java.lang.String getTags()
String
public void setTags(java.lang.String value)
value
- allowed object is String
public java.lang.String getContact()
String
public void setContact(java.lang.String value)
value
- allowed object is String
public java.util.List<OpenSearchUrl> getUrl()
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 the JAXB object. This is why there is not a
set
method for the url property.
For example, to add a new item, do as follows:
getUrl().add(newItem);
Objects of the following type(s) are allowed in the list
OpenSearchUrl
public void addUrl(OpenSearchUrl openSearchUrl)
openSearchUrl
- possible object is OpenSearchUrl
public java.lang.String getLongName()
String
public void setLongName(java.lang.String value)
value
- allowed object is String
public java.util.List<OpenSearchImage> getImage()
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 the JAXB object. This is why there is not a
set
method for the image property.
For example, to add a new item, do as follows:
getImage().add(newItem);
Objects of the following type(s) are allowed in the list
OpenSearchImage
public void addNewImage(OpenSearchImage openSearchImage)
openSearchImage
- allowed object is OpenSearchImage
public java.util.List<OpenSearchQuery> getQuery()
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 the JAXB object. This is why there is not a
set
method for the query property.
For example, to add a new item, do as follows:
getQuery().add(newItem);
Objects of the following type(s) are allowed in the list
OpenSearchQuery
public void addQuery(OpenSearchQuery openSearchQuery)
openSearchQuery
- possible object is OpenSearchQuery
public java.lang.String getDeveloper()
String
public void setDeveloper(java.lang.String value)
value
- allowed object is String
public java.lang.String getAttribution()
String
public void setAttribution(java.lang.String value)
value
- allowed object is String
public java.lang.String getSyndicationRight()
String
public void setSyndicationRight(java.lang.String value)
value
- allowed object is String
public java.lang.String getAdultContent()
String
public void setAdultContent(java.lang.String value)
value
- allowed object is String
public java.util.List<java.lang.String> getLanguage()
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 the JAXB object. This is why there is not a
set
method for the language property.
For example, to add a new item, do as follows:
getLanguage().add(newItem);
Objects of the following type(s) are allowed in the list String
public void addLanguage(java.lang.String language)
language
- allowed object is String
public java.util.List<java.lang.String> getOutputEncoding()
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 the JAXB object. This is why there is not a
set
method for the outputEncoding property.
For example, to add a new item, do as follows:
getOutputEncoding().add(newItem);
Objects of the following type(s) are allowed in the list String
public void addOutputEncoding(java.lang.String encoding)
encoding
- allowed object is String
public java.util.List<java.lang.String> getInputEncoding()
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 the JAXB object. This is why there is not a
set
method for the inputEncoding property.
For example, to add a new item, do as follows:
getInputEncoding().add(newItem);
Objects of the following type(s) are allowed in the list String
public void addInputEncoding(java.lang.String encoding)
encoding
- 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 |