File: /home/alex/dev/work/webapps/branches/scopes/doc/src/bindings/src/search-metadata.js
/**
*
* Metadata passed with search requests.
*
* Two forms of construction are allowed depending on the number
* and types of the parameters:
* - with locale and form factor
* or
* - with cardinality, locale, and form factor.
*
* @module ScopeJS
* @class SearchMetaData
*
* @constructor
* @param cardinality maximum number of search results
* @param locale locale string, eg. en_EN
* @param form_factor form factor name, e.g. phone, desktop, phone-version etc.
* @param category The category for the result.*/
function SearchMetaData(){}
SearchMetaData.prototype = {
/**
* Set cardinality.
* @method set_cardinality
* @param cardinality {Int}
*/
set_cardinality: function(cardinality) {
},
/**
* Get cardinality.
* @method cardinality
* @return {Int}
*/
cardinality: function() {
},
/**
* Set location.
* @method set_location
* @param location {Location} data
*/
set_location: function(location) {
},
/**
* Get location.
* @method location
* @return {Location} data representing the current location, including attributes such as city and country.
*/
location: function() {
},
/**
* Does the SearchMetadata have a location.
* @method has_location
* @return {Boolean} True if there is a location property.
*/
has_location: function() {
},
/**
* Remove location data entirely.
* This method does nothing if no location data is present.
* @method remove_location
*/
remove_location: function() {
},
/**
* Set the list of scope keywords used to initiate this search request.
* @method set_aggregated_keywords
* @param aggregated_keywords {Array of String} The list of scope keywords used to initiate this search request.
*/
set_aggregated_keywords: function() {
},
/**
* Get the list of scope keywords used to initiate this search request.
* @method aggregated_keywords
* @return {Array of String} The list of scope keywords used to initiate this search request.
*/
aggregated_keywords: function() {
},
/**
* Check if this search request originated from an aggregator scope.
* @method is_aggregated
* @return {Boolean} True if this search request originated from an aggregator scope.
*/
is_aggregated: function() {
},
/**
* Sets a hint.
* @method set_hint
* @param key {String} The name of the hint.
* @param value Hint value
*/
set_hint: function(key, value) {
},
/**
* Get all hints.
* @method hints
* @return {Dictionary}
*/
hints: function() {
},
/**
* Check if this SearchMetadata has a hint.
* @method contains_hint
* @param key {String} The hint name.
* @return {Boolean} True if the hint is set.
*/
contains_hint: function(key) {
},
/**
* Set the value of an attribute
* @method set
* @param key {String}
* @param value {String}, {Number} or {Object}
*/
set: function(key, value) {
},
/**
* Get the value of an attribute
* @method get
* @param key {String}
* @return {String}, {Number} or {Object}
*/
get: function(key) {
},
/**
* Get the form factor string.
* @method form_factor
* @return The form factor string
*/
form_factor: function() {
},
/**
* Get the locale string.
* @method locale
* @return The locale string
*/
locale: function() {
},
/**
* Get internet connectivity status.
* @method internet_connectivity
* @return {ConnectivityStatus} The internet connectivity status.
*/
internet_connectivity: function() {
},
/**
* Set internet connectivity status.
* @method set_internet_connectivity
* @param {ConnectivityStatus} The internet connectivity status.
*/
set_internet_connectivity: function(connectivity_status) {
}
};