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/OWSCommon/v1.js
|
8
|
*/
|
9
|
|
10
|
/**
|
11
|
* Class: OpenLayers.Format.OWSCommon.v1_0_0
|
12
|
* Parser for OWS Common version 1.0.0.
|
13
|
*
|
14
|
* Inherits from:
|
15
|
* - <OpenLayers.Format.OWSCommon.v1>
|
16
|
*/
|
17
|
OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, {
|
18
|
|
19
|
/**
|
20
|
* Property: namespaces
|
21
|
* {Object} Mapping of namespace aliases to namespace URIs.
|
22
|
*/
|
23
|
namespaces: {
|
24
|
ows: "http://www.opengis.net/ows",
|
25
|
xlink: "http://www.w3.org/1999/xlink"
|
26
|
},
|
27
|
|
28
|
/**
|
29
|
* Property: readers
|
30
|
* Contains public functions, grouped by namespace prefix, that will
|
31
|
* be applied when a namespaced node is found matching the function
|
32
|
* name. The function will be applied in the scope of this parser
|
33
|
* with two arguments: the node being read and a context object passed
|
34
|
* from the parent.
|
35
|
*/
|
36
|
readers: {
|
37
|
"ows": OpenLayers.Util.applyDefaults({
|
38
|
"ExceptionReport": function(node, obj) {
|
39
|
obj.success = false;
|
40
|
obj.exceptionReport = {
|
41
|
version: node.getAttribute('version'),
|
42
|
language: node.getAttribute('language'),
|
43
|
exceptions: []
|
44
|
};
|
45
|
this.readChildNodes(node, obj.exceptionReport);
|
46
|
}
|
47
|
}, OpenLayers.Format.OWSCommon.v1.prototype.readers.ows)
|
48
|
},
|
49
|
|
50
|
/**
|
51
|
* Property: writers
|
52
|
* As a compliment to the readers property, this structure contains public
|
53
|
* writing functions grouped by namespace alias and named like the
|
54
|
* node names they produce.
|
55
|
*/
|
56
|
writers: {
|
57
|
"ows": OpenLayers.Format.OWSCommon.v1.prototype.writers.ows
|
58
|
},
|
59
|
|
60
|
CLASS_NAME: "OpenLayers.Format.OWSCommon.v1_0_0"
|
61
|
|
62
|
});
|