add formats for WPS GetCapabilities, WPS DescribeProcess and WPS Execute, thanks ahocevar for the great rework on the patch, r=ahocevar, see #3307)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12124 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -232,6 +232,9 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
delete obj.bottom;
|
||||
delete obj.right;
|
||||
delete obj.top;
|
||||
},
|
||||
"Language": function(node, obj) {
|
||||
obj.language = this.getChildValue(node);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -264,11 +267,21 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
value: options.bounds.right + " " + options.bounds.top });
|
||||
return node;
|
||||
},
|
||||
"Identifier": function(identifier) {
|
||||
var node = this.createElementNSPlus("ows:Identifier", {
|
||||
value: identifier });
|
||||
return node;
|
||||
},
|
||||
"Title": function(title) {
|
||||
var node = this.createElementNSPlus("ows:Title", {
|
||||
value: title });
|
||||
return node;
|
||||
},
|
||||
"Abstract": function(abstractValue) {
|
||||
var node = this.createElementNSPlus("ows:Abstract", {
|
||||
value: abstractValue });
|
||||
return node;
|
||||
},
|
||||
"OutputFormat": function(format) {
|
||||
var node = this.createElementNSPlus("ows:OutputFormat", {
|
||||
value: format });
|
||||
|
||||
@@ -47,6 +47,9 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo
|
||||
"AnyValue": function(node, parameter) {
|
||||
parameter.anyValue = true;
|
||||
},
|
||||
"DataType": function(node, parameter) {
|
||||
parameter.dataType = this.getChildValue(node);
|
||||
},
|
||||
"Range": function(node, allowedValues) {
|
||||
allowedValues.range = {};
|
||||
this.readChildNodes(node, allowedValues.range);
|
||||
@@ -65,7 +68,46 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo
|
||||
}
|
||||
}, OpenLayers.Format.OWSCommon.v1.prototype.readers["ows"])
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Property: writers
|
||||
* As a compliment to the readers property, this structure contains public
|
||||
* writing functions grouped by namespace alias and named like the
|
||||
* node names they produce.
|
||||
*/
|
||||
writers: {
|
||||
"ows": OpenLayers.Util.applyDefaults({
|
||||
"Range": function(range) {
|
||||
var node = this.createElementNSPlus("ows:Range", {
|
||||
attributes: {
|
||||
'ows:rangeClosure': range.closure
|
||||
}
|
||||
});
|
||||
this.writeNode("ows:MinimumValue", range.minValue, node);
|
||||
this.writeNode("ows:MaximumValue", range.maxValue, node);
|
||||
return node;
|
||||
},
|
||||
"MinimumValue": function(minValue) {
|
||||
var node = this.createElementNSPlus("ows:MinimumValue", {
|
||||
value: minValue
|
||||
});
|
||||
return node;
|
||||
},
|
||||
"MaximumValue": function(maxValue) {
|
||||
var node = this.createElementNSPlus("ows:MaximumValue", {
|
||||
value: maxValue
|
||||
});
|
||||
return node;
|
||||
},
|
||||
"Value": function(value) {
|
||||
var node = this.createElementNSPlus("ows:Value", {
|
||||
value: value
|
||||
});
|
||||
return node;
|
||||
}
|
||||
}, OpenLayers.Format.OWSCommon.v1.prototype.writers["ows"])
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Format.OWSCommon.v1_1_0"
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user