1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id: WpsDescribeProcess.js 3657 2007-11-29 09:04:26Z gjvoosten $
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/model/ModelBase.js");
|
8
|
|
9
|
/**
|
10
|
* Stores a Web Processing service (WPS) Capabilities document as defined by the
|
11
|
* Open Geospatial Consortium (http://www.opengeospatial.org/).
|
12
|
*
|
13
|
* @constructor
|
14
|
* @base ModelBase
|
15
|
* @author Mike Adair
|
16
|
* @param modelNode The model's XML object node from the configuration document.
|
17
|
* @param parent The model object that this widget belongs to.
|
18
|
*/
|
19
|
function WpsDescribeProcess(modelNode, parent) {
|
20
|
// Inherit the ModelBase functions and parameters
|
21
|
ModelBase.apply(this, new Array(modelNode, parent));
|
22
|
|
23
|
this.namespace = "xmlns:wps='http://www.opengis.net/wps' xmlns:ows='http://www.opengis.net/ows' xmlns:xlink='http://www.w3.org/1999/xlink'";
|
24
|
|
25
|
/**
|
26
|
* Returns the serverUrl for the WFS request passed in with the specified
|
27
|
* HTTP method from the capabilities doc.
|
28
|
* @param requestName the WFS request to get the URL for
|
29
|
* @param method http method for the request
|
30
|
* @param feature ignored for WFS docs
|
31
|
* @return URL for the specified request with the specified method
|
32
|
*/
|
33
|
this.getServerUrl = function(requestName, method, feature) {
|
34
|
return this.parentModel.getServerUrl(requestName, method, feature);
|
35
|
}
|
36
|
|
37
|
/**
|
38
|
* Returns the version for the wps
|
39
|
* @return the wps version
|
40
|
*/
|
41
|
this.getVersion = function() {
|
42
|
var xpath = "/wps:ProcessDescription";
|
43
|
return this.doc.selectSingleNode(xpath).getAttribute("version");
|
44
|
}
|
45
|
|
46
|
/**
|
47
|
* Get HTTP method used to retreive this model
|
48
|
* @return the HTTP method
|
49
|
*/
|
50
|
this.getMethod = function() {
|
51
|
return this.method;
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* Returns the featureType node with the specified name from the list of nodes
|
56
|
* selected by the nodeSelectXpath from the capabilities doc.
|
57
|
* @param featureName name of the featureType to look up
|
58
|
* @return the featureType node with the specified name.
|
59
|
*/
|
60
|
this.getFeatureNode = function(featureName) {
|
61
|
return this.doc.selectSingleNode(this.nodeSelectXpath+"[wps:Name='"+featureName+"']");
|
62
|
}
|
63
|
|
64
|
}
|
65
|
|