The GEOSS Discovery And Access Broker APIs
Authors: Fabrizio Papeschi, Mattia Santoro, Stefano Nativi
API version: 1.4.3-beta

DABSource

Extends GINode
Module: Core

This kind of node represents a source brokered by a DAB instance. DAB sources can be retrieved with the sources method. Since the DAB sources are first level nodes (the DAB direct "children"), they can also be retrieved as result of the first call of the expand method.

Including or excluding a source from the discover

By default all the sources brokered by the DAB are included in the discover. If a source is included, its content (depending on the given constraints) will be added to the result set, otherwise it is ignored and its content is not added to the result set.
At least one source must be included in the discover so the exclusion of all the sources is equivalent to include them all

Distributed and harvested content

The content of the sources brokered by the DAB can be "distributed" or "harvested":

  • distributed: the content of the source is retrieved "on demand" during the discover process. The response time is affected by the source latency and several features (such as term frequency) are not available for distributed content. The retrieved content is always up to date
  • harvested: the content of the source is permanently stored in database accessed by the DAB. The response time of a discover is much faster than for harvested sources and several features (such as term frequency) are available only for harvested content. Not all the sources content can be harvested, and (depending on the harvesting frequency) then content can be out of date

Methods

accessOptions

(
  • onResponse
)
async

Inherited from GINode:

If this node is accessible, retrieves one or more objects containing a list of validOptions, the defaultOption and the reducedOption to use as options for the accessLink method.
If this node is not accessible, this method does nothing.

Each returned object contains a validOptions array, and a defaultOption and a reducedOption. E.g.:

var options = {
    "validOptions": [
          {
             "CRS": "EPSG:4326",
              "format": "IMAGE_PNG",
              "firstAxisSize": {
                "label": "Lat",
                "value": 300
              },
             "secondAxisSize": {
                "label": "Lon",
                "value": 300
             },
             "spatialSubset": {
                 "south": -60.0,
                 "west": -180.0,
                 "north": 90.000007823,
                 "east": 180.000018775
             },
             "temporalSubset": {
                 "from" : "2000-01-01T00:00:00Z",
                 "to": "2013-01-01"        
             }
          },
          {
             "CRS": "EPSG:3857",
              "format": "IMAGE_JPEG",
              "firstAxisSize": {
                "label": "X",
                "value": 455
              },
             "secondAxisSize": {
                "label": "Y",
                "value": 300
             },
             "spatialSubset": {
                 "south": -60.0,
                 "west": -180.0,
                 "north": 90.000007823,
                 "east": 180.000018775
             },
             "temporalSubset": {
                 "from" : "2000-01-01T00:00:00Z",
                 "to": "2013-01-01"        
             }
          }],
    "defaultOption": 
        {
             "CRS": "EPSG:4326",
              "format": "IMAGE_PNG",
              "firstAxisSize": {
                "label": "Lat",
                "value": 300
              },
             "secondAxisSize": {
                "label": "Lon",
                "value": 300
             },
             "spatialSubset": {
                 "south": -60.0,
                 "west": -180.0,
                 "north": 90.000007823,
                 "east": 180.000018775
             },
             "temporalSubset": {
                 "from" : "2000-01-01T00:00:00Z",
                 "to": "2013-01-01"        
             }
          },
    "reducedOption": 
        {
             "CRS": "EPSG:4326",
              "format": "IMAGE_PNG",
              "firstAxisSize": {
                "label": "Lat",
                "value": 395
              },
             "secondAxisSize": {
                "label": "Lon",
                "value": 600
             },
             "spatialSubset": {
                 "south": -60.0,
                 "west": -180.0,
                 "north": 90.000007823,
                 "east": 180.000018775
             },
             "temporalSubset": {
                 "from" : "2013-01-01",
                 "to": "2013-01-01"        
             }
          }
    }

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

    • options Object

      the access options; in case of error this argument is set to null

    • [error] String optional

      In case of error this argument contains a message which describes the problem occurred

contentType

()

Returns the content type of this source; see here for more info

Returns:

returns the content type of this source; possible values are "distributed" and "harvested"

expand

(
  • onResponse
  • [pageSize=10]
)
async

Inherited from GINode:

If this node is composed, the result of the expansion is a result set split in pages (possibly one if the matched nodes are minor than the result set page size).
The result set contains the underlying first level nodes (this node children). If this node is a DAB instance, than the first call of this method returns the correspondent sources.
If the result set is split in more than one page use the expandNext method to retrieve the next ones. If this is a simple node, the result set is empty

Parameters:

expandNext

(
  • onResponse
  • [execute]
)
Boolean async

Inherited from GINode:

If this node has already been expanded, this method tests if other pages in the result set are available. If the test is positive and the execute argument is true, retrieves the next result set page. If this node is a composed node but it has never been expanded, an Exception is thrown.
If this is a simple node, this method returns false

Parameters:

  • onResponse Function

    onResponse Callback function for receiving asynchronous query response. See onResponse for more info

  • [execute] Boolean optional

    If omitted or set to false, this method tests if other pages in the result set are available and returns the test result. If set to true and the test is positive, this method retrieves the next result set page and returns true. If set to true and the test is negative this method returns false

Returns:

Boolean:

true if other pages in the result set are available, false otherwise

googleImageMapType

(
  • map
  • [initOptions]
)
google.maps.ImageMapType[]

Inherited from GINode:

Retrieves an array of google.maps.ImageMapType; if the current node does not provide any layer an empty array is returned.
All the available ImageMapTypeOptions are allowed; this method implements the getTileUrl function in order to build the correct WMS GetMap request.

Parameters:

Returns:

google.maps.ImageMapType[]:

array (possible empty) of google.maps.ImageMapType

has_olVector_Layer

() String[]

Inherited from GINode:

This method checks if the node provides one or more layers of type OpenLayers.Layer.Vector. The method returns an array of Strings, each string is the name of an available vector layer.

Returns:

String[]:

the Array of names of available OpenLayers.Layer.Vector layers.

include

(
  • include
)

Includes or excludes this source from/in the discover

Parameters:

isAccessible

()

Inherited from GINode:

Tests if this node is accessible.
See also accessOptions and accessLink methods

Returns:

true if this node is linked to one or more data and it is asynchronously accessible, false otherwise

isDirectlyAccessible

()

Inherited from GINode:

Tests if this node is directly accessible.

See also directAccessLinks method.
See also OnlineInfo.accessType property

Returns:

true if this node is linked to one or more data and it has one or more direct access links, false otherwise.

ol3WMS_Layer

(
  • [opt_options]
)
ol.source.TileWMS []

Inherited from GINode:

Retrieves an array of ol.source.TileWMS ; if the current node does not provide any layer an empty array is returned.
As explained in the ol.source.TileWMS constructor documentation, the returned layers can be optionally created with additional parameters and options for the GetMap request (see opt_options argument). E.g.:

var opt_options = {};
opt_options.params = {LAYERS: name, TRANSPARENT: true}; //WMS request parameters. At least a LAYERS param is required.
opt_options.attributions = new ol.Attribution({
                                       html: 'All maps © ' + 'ExampleMap'
                                 }); 

var layers = giNode.ol3WMS_Layer(opt_options);

Parameters:

Returns:

ol.source.TileWMS []:

Array of ol.source.TileWMS possible empty if this node does not provide any

olTiles_Layer

(
  • [initOptions]
)
OpenLayers.Layer.WMS[]

Inherited from GINode:

Retrieves an array of OpenLayers.Layer.WMS (TiledMapService type); if the current node does not provide any layer an empty array is returned.
As explained in the OpenLayers.Layer.WMS constructor documentation, the returned layers can be optionally created with additional parameters and options for the GetMap request (see initOptions argument). E.g.:

var initOptions = {};
initOptions.params = {transparent: true}; // corresponds to the OpenLayers.Layer.WMS params argument
initOptions.options = {opacity: 0.5}; // corresponds to the OpenLayers.Layer.WMS options argument

var layers = giNode.olTiles_Layer(initOptions);

Parameters:

Returns:

OpenLayers.Layer.WMS[]:

Array of OpenLayers.Layer.WMS possible empty if this node does not provide any

olVector_Layer

(
  • onResponse
)
async

Inherited from GINode:

Retrieves an array of OpenLayers.Layer.Vector; if the current node does not provide any layer an empty array is returned.
Besides, client applications are required (at the moment) to handle the cross-origin nature of the request which is executed (GML is an XML encoding)

Parameters:

olWMS_Layer

(
  • [initOptions]
)
OpenLayers.Layer.WMS[]

Inherited from GINode:

Retrieves an array of OpenLayers.Layer.WMS; if the current node does not provide any layer an empty array is returned.
As explained in the OpenLayers.Layer.WMS constructor documentation, the returned layers can be optionally created with additional parameters and options for the GetMap request (see initOptions argument). E.g.:

var initOptions = {};
initOptions.params = {transparent: true}; // corresponds to the OpenLayers.Layer.WMS params argument
initOptions.options = {opacity: 0.5}; // corresponds to the OpenLayers.Layer.WMS options argument

var layers = giNode.olWMS_Layer(initOptions);

Parameters:

Returns:

OpenLayers.Layer.WMS[]:

Array of OpenLayers.Layer.WMS possible empty if this node does not provide any

overview

(
  • id
  • onResponse
  • [options]
)
Boolean async

Inherited from GINode:

If this node has an overview, creates an <img> having as source the overview link at the given options.index (0 if not specified) and appends <img> to the element having the given id.
The overview property can be available also if this node is not accessible.

The method throws an Exception if id does not correspond to an element or if options.index does not respect the following statement: index >= 0 && index <= overview.length - 1

Parameters:

  • id String

    the id of an element in which to append the <img> element of the selected overview

  • onResponse Function

    Callback function for receiving asynchronous request status

    • status String

      possible status are 'success' and 'error'

    • [message] String optional

      in case of 'error' status this argument contains the error message

    • [image] String optional

      the loaded image element or null in case of error

  • [options] Object optional
    • [index=0] Number optional

      index of this node overview array

    • [size="medium"] String optional

      The overview size (aspect ration is preserved). Possible values are:

      • "extra small": 48x48 px
      • "small": 96x96 px
      • "medium": 144x144 px
      • "large": 288x288 px
      • "original": the original size of the target overview image

    • [force=false] Boolean optional

      If set to true a "no overview" image is used in case of error or in case an overview is not available

    • [backgroundURL] String optional

      URL of an additional image to load as background of the overview image (use this only if the overview image is transparent)

Returns:

Boolean:

true if this node has an overview, false otherwise

report

(
  • [newReport]
)
Report

Inherited from GINode:

Retrieves and optionally set a new report

Parameters:

Returns:

Report:

The node report

Properties

uiId

String

Inherited from GINode:

Identifier created with random method which contains only alphanumeric characters and can be used inside the attributes of DOM elements