com.ibm.portal.resolver.opensearch
Interface OpenSearchContentHandler

All Superinterfaces:
org.xml.sax.ContentHandler, ResettableContentHandler
All Known Subinterfaces:
DefaultOpenSearchContentHandler, ResettableOpenSearchContentHandler

public interface OpenSearchContentHandler
extends ResettableContentHandler

JAXP content handler extension that defines semantic callbacks for sitemap specific events. For each event in the sitemap namespace these semantic events should be called instead of the untyped SAX events. For all events outside of the ATOM namespace the methods on ContentHandler should be called.


Method Summary
 void endAdultContent()
           
 void endAttribution()
           
 void endContact()
           
 void endDescription()
           
 void endDeveloper()
           
 void endImage()
           
 void endInputEncoding()
           
 void endItemsPerPage()
           
 void endLanguage()
           
 void endLongName()
           
 void endOpenSearchDescription()
           
 void endOutputEncoding()
           
 void endQuery()
           
 void endShortName()
           
 void endStartIndex()
           
 void endSyndicationRight()
           
 void endTags()
           
 void endTotalResults()
           
 void endUrl()
           
 void startAdultContent(org.xml.sax.Attributes attrs)
           Contains a boolean value that should be set to true if the search results may contain material intended only for adults.
 void startAttribution(org.xml.sax.Attributes attrs)
          ontains a list of all sources or entities that should be credited for the content contained in the search feed.
 void startContact(org.xml.sax.Attributes attrs)
           Contains an email address at which the maintainer of the description document can be reached.
 void startDescription(org.xml.sax.Attributes attrs)
           Contains a human-readable text description of the search engine.
 void startDeveloper(org.xml.sax.Attributes attrs)
           Contains the human-readable name or identifier of the creator or maintainer of the description document.
 void startImage(java.lang.String oWidth, java.lang.String oHeight, java.lang.String oType, org.xml.sax.Attributes attrs)
           Contains a URL that identifies the location of an image that can be used in association with this search content.
 void startInputEncoding(org.xml.sax.Attributes attrs)
           Contains a string that indicates that the search engine supports search requests encoded with the specified character encoding.
 void startItemsPerPage(org.xml.sax.Attributes attrs)
           The number of search results returned per page.
 void startLanguage(org.xml.sax.Attributes attrs)
           Contains a string that indicates that the search engine supports search results in the specified language.
 void startLongName(org.xml.sax.Attributes attrs)
           Contains an extended human-readable title that identifies this search engine.
 void startOpenSearchDescription(org.xml.sax.Attributes attrs)
          The root node of the OpenSearch description document.
 void startOutputEncoding(org.xml.sax.Attributes attrs)
           Contains a string that indicates that the search engine supports search responses encoded with the specified character encoding.
 void startQuery(java.lang.String rRole, java.lang.String oTitle, java.lang.String oTotalResults, java.lang.String oSearchTerms, java.lang.String oCount, java.lang.String oStartIndex, java.lang.String oStartPage, java.lang.String oLanguage, java.lang.String oInputEncoding, java.lang.String oOutputEncoding, org.xml.sax.Attributes attrs)
           Describes a specific search request that can be made by the search client.
 void startShortName(org.xml.sax.Attributes attrs)
           Contains a brief human-readable title that identifies this search engine.
 void startStartIndex(org.xml.sax.Attributes attrs)
           The index of the first search result in the current set of search results.
 void startSyndicationRight(org.xml.sax.Attributes attrs)
           Contains a value that indicates the degree to which the search results provided by this search engine can be queried, displayed, and redistributed.
 void startTags(org.xml.sax.Attributes attrs)
           Contains a set of words that are used as keywords to identify and categorize this search content.
 void startTotalResults(org.xml.sax.Attributes attrs)
           The number of search results available for the current search.
 void startUrl(java.lang.String rTemplate, java.lang.String rType, java.lang.String oIndexOffset, java.lang.String oPageOffset, org.xml.sax.Attributes attrs)
           Describes an interface by which a search client can make search requests of the search engine.
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Method Detail

endAdultContent

void endAdultContent()
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endAttribution

void endAttribution()
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endContact

void endContact()
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endDescription

void endDescription()
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endDeveloper

void endDeveloper()
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endImage

void endImage()
              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endInputEncoding

void endInputEncoding()
                      throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endItemsPerPage

void endItemsPerPage()
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endLanguage

void endLanguage()
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endLongName

void endLongName()
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endOpenSearchDescription

void endOpenSearchDescription()
                              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endOutputEncoding

void endOutputEncoding()
                       throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endQuery

void endQuery()
              throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endShortName

void endShortName()
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endStartIndex

void endStartIndex()
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endSyndicationRight

void endSyndicationRight()
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endTags

void endTags()
             throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endTotalResults

void endTotalResults()
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endUrl

void endUrl()
            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

startAdultContent

void startAdultContent(org.xml.sax.Attributes attrs)
                       throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startAttribution

void startAttribution(org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException
ontains 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. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startContact

void startContact(org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException

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. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startDescription

void startDescription(org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startDeveloper

void startDeveloper(org.xml.sax.Attributes attrs)
                    throws org.xml.sax.SAXException

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. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startInputEncoding

void startInputEncoding(org.xml.sax.Attributes attrs)
                        throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startItemsPerPage

void startItemsPerPage(org.xml.sax.Attributes attrs)
                       throws org.xml.sax.SAXException

The number of search results returned per page.

If the itemsPerPage element does not appear on the page then the search client should use the number of items of the current page as the default page size.

Restrictions: The value must a non-negative integer.
Default: The default value is equal to the number of search results on the current page.
Requirements: The element may appear zero or one time.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startLanguage

void startLanguage(org.xml.sax.Attributes attrs)
                   throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startLongName

void startLongName(org.xml.sax.Attributes attrs)
                   throws org.xml.sax.SAXException

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. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startOpenSearchDescription

void startOpenSearchDescription(org.xml.sax.Attributes attrs)
                                throws org.xml.sax.SAXException
The root node of the OpenSearch description document.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startOutputEncoding

void startOutputEncoding(org.xml.sax.Attributes attrs)
                         throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startQuery

void startQuery(java.lang.String rRole,
                java.lang.String oTitle,
                java.lang.String oTotalResults,
                java.lang.String oSearchTerms,
                java.lang.String oCount,
                java.lang.String oStartIndex,
                java.lang.String oStartPage,
                java.lang.String oLanguage,
                java.lang.String oInputEncoding,
                java.lang.String oOutputEncoding,
                org.xml.sax.Attributes attrs)
                throws org.xml.sax.SAXException

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.

Throws:
org.xml.sax.SAXException

startShortName

void startShortName(org.xml.sax.Attributes attrs)
                    throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startStartIndex

void startStartIndex(org.xml.sax.Attributes attrs)
                     throws org.xml.sax.SAXException

The index of the first search result in the current set of search results.

If the startIndex element does not appear on the page then the search client should consider the current page to be the first page of search results.

Restrictions: The value must an integer.
Default: The default value is equal to the value of the "indexOffset" attribute of the "Url" element" in the OpenSearch description document.
Requirements: The element may appear zero or one time.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startSyndicationRight

void startSyndicationRight(org.xml.sax.Attributes attrs)
                           throws org.xml.sax.SAXException

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.

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startTags

void startTags(org.xml.sax.Attributes attrs)
               throws org.xml.sax.SAXException

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. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startTotalResults

void startTotalResults(org.xml.sax.Attributes attrs)
                       throws org.xml.sax.SAXException

The number of search results available for the current search.

If the totalResults element does not appear on the page then the search client should consider the current page to be the last page of search results.

Restrictions: The value must be a non-negative integer.
Default: The default value is equal to the offset index of the last search result on the current page.
Requirements: The element may appear zero or one time. *

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startUrl

void startUrl(java.lang.String rTemplate,
              java.lang.String rType,
              java.lang.String oIndexOffset,
              java.lang.String oPageOffset,
              org.xml.sax.Attributes attrs)
              throws org.xml.sax.SAXException

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}&amp;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}&amp;start={startIndex?}" />        
 

Parameters:
attrs -
Throws:
org.xml.sax.SAXException

startImage

void startImage(java.lang.String oWidth,
                java.lang.String oHeight,
                java.lang.String oType,
                org.xml.sax.Attributes attrs)
                throws org.xml.sax.SAXException

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. *

Parameters:
oWidth -
oHeight -
oType -
attrs -
Throws:
org.xml.sax.SAXException
See Also:
com.ibm.wps.resolver.model.xml.helper.MIME_Types.ICON