1
|
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
|
2
|
* full list of contributors). Published under the 2-clause BSD license.
|
3
|
* See license.txt in the OpenLayers distribution or repository for the
|
4
|
* full text of the license. */
|
5
|
|
6
|
/**
|
7
|
* @requires OpenLayers/Format.js
|
8
|
*/
|
9
|
|
10
|
/**
|
11
|
* Class: OpenLayers.Format.CSWGetRecords
|
12
|
* Default version is 2.0.2.
|
13
|
*
|
14
|
* Returns:
|
15
|
* {<OpenLayers.Format>} A CSWGetRecords format of the given version.
|
16
|
*/
|
17
|
OpenLayers.Format.CSWGetRecords = function(options) {
|
18
|
options = OpenLayers.Util.applyDefaults(
|
19
|
options, OpenLayers.Format.CSWGetRecords.DEFAULTS
|
20
|
);
|
21
|
var cls = OpenLayers.Format.CSWGetRecords["v"+options.version.replace(/\./g, "_")];
|
22
|
if(!cls) {
|
23
|
throw "Unsupported CSWGetRecords version: " + options.version;
|
24
|
}
|
25
|
return new cls(options);
|
26
|
};
|
27
|
|
28
|
/**
|
29
|
* Constant: DEFAULTS
|
30
|
* {Object} Default properties for the CSWGetRecords format.
|
31
|
*/
|
32
|
OpenLayers.Format.CSWGetRecords.DEFAULTS = {
|
33
|
"version": "2.0.2"
|
34
|
};
|