API change to better accommodate for the 1..* cardinality of HTTPType and addition of Constraint

This commit is contained in:
ahocevar
2011-11-07 16:47:33 +01:00
parent 4076c1af99
commit ffafa93168
4 changed files with 23 additions and 23 deletions

View File

@@ -171,24 +171,24 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
this.readChildNodes(node, dcp.http);
},
"Get": function(node, http) {
http.get = this.getAttributeNS(node,
this.namespaces.xlink, "href");
if (!http.constraints) {
http.constraints = {};
if (!http.get) {
http.get = [];
}
var obj = {};
var obj = {
url: this.getAttributeNS(node, this.namespaces.xlink, "href")
};
this.readChildNodes(node, obj);
http.constraints.get = obj.constraints;
http.get.push(obj);
},
"Post": function(node, http) {
http.post = this.getAttributeNS(node,
this.namespaces.xlink, "href");
if (!http.constraints) {
http.constraints = {};
if (!http.post) {
http.post = [];
}
var obj = {};
var obj = {
url: this.getAttributeNS(node, this.namespaces.xlink, "href")
};
this.readChildNodes(node, obj);
http.constraints.post = obj.constraints;
http.post.push(obj);
},
"Parameter": function(node, operation) {
if (!operation.parameters) {