Class: OpenSearchDescriptionDocument

OpenSearchDescriptionDocument(xmlRoot)

Represents an Open Search Description Document. This object holds as properties the fields specified in the Open Search Description Document. Most fields can be accessed as properties named according to their document names converted to camel case. For example: "shortName" and "urls".

Constructor

new OpenSearchDescriptionDocument(xmlRoot)

Constructs an OpenSearchDescriptionDocument from a XML DOM.
Parameters:
Name Type Description
xmlRoot Node An XML DOM representing the Open Search Description Document.
Source:
Throws:
If the specified XML DOM is null or undefined.
Type
ArgumentError

Members

adultContent :String

Contains a value that should be set to true if the search results may contain material intended only for adults.
Type:
  • String
Source:

attribution :String

Contains a list of all sources or entities that should be credited for the content contained in the search feed.
Type:
  • String
Source:

contact :String

Contains an email address at which the maintainer of the description document can be reached.
Type:
  • String
Source:

description :String

Contains a human-readable text description of the search engine.
Type:
  • String
Source:

developer :String

Contains the human-readable name or identifier of the creator or maintainer of the description document.
Type:
  • String
Source:

inputEncodings :Array.<String>

Contains a list of strings that indicates that the search engine supports search requests encoded with the specified character encoding.
Type:
  • Array.<String>
Source:

languages :Array.<String>

Contains a list of strings that indicates that the search engine supports search results in the specified language.
Type:
  • Array.<String>
Source:

longName :String

Contains an extended human-readable title that identifies the search engine.
Type:
  • String
Source:

outputEncodings :Array.<String>

Contains a list of strings that indicates that the search engine supports responses encoded with the specified character encoding.
Type:
  • Array.<String>
Source:

queries :Array.<Object>

Defines a search query that can be performed by search clients.
Type:
  • Array.<Object>
Source:

shortName :String

Contains a brief human-readable title that identifies the search engine.
Type:
  • String
Source:

syndicationRight :String

Contains a value that indicates the degree to which the search results provided by this search engine can be queried, displayed, and redistributed.
Type:
  • String
Source:

tags :Array.<String>

Contains a set of words that are used as keywords to identify and categorize this search content.
Type:
  • Array.<String>
Source:

urls :Array.<OpenSearchUrl>

Describes an interface by which a client can make requests for an external resource, such as search results, or additional description documents.
Type:
Source:

Methods

findFirstSearchUrl(filter) → {OpenSearchUrl|null}

It returns the first URL from the Search document that matches the criteria.
Parameters:
Name Type Description
filter Object
Properties
Name Type Description
supportedFormats Array.<String> | null The list of search parameters for the query.
requestOptions OpenSearchRequest The request options.
searchParams Array | null The list of search parameters for the query.
Source:
Returns:
The first matching URL or null.
Type
OpenSearchUrl | null

hasExtension(extensionType)

Indicates whether a particular extension is supported, e.g. geo, time and parameter
Parameters:
Name Type Description
extensionType String The extension type supported in this case. E.g. http://a9.com/-/opensearch/extensions/geo/1.0/
Source:
Returns:
Boolean True if given extension is supported

parseQuery(node) → {Object}

Internal use. Applications should not call this method. Parses an Query node.
Parameters:
Name Type Description
node Node The Query node to parse.
Source:
Returns:
The resulting object.
Type
Object

Type Definitions

image

Contains information that identifies the location of an image that can be used in association with this search content.
Type:
  • Object
Source: