1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id: OwsCatResources.js 2546 2007-01-23 12:07:39Z gjvoosten $
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/model/FeatureCollection.js");
|
8
|
|
9
|
/**
|
10
|
* Generic Model object for models where no specialization is required. This is
|
11
|
* just an instance of a abstract ModelBase.
|
12
|
* @constructor
|
13
|
* @base FeatureCollection
|
14
|
* @author Mike Adair
|
15
|
* @param modelNode The model's XML object node from the configuration document
|
16
|
* @param parent Parent of this model, set to null if there is no parent.
|
17
|
*/
|
18
|
function OwsCatResources(modelNode, parent) {
|
19
|
// Inherit the ModelBase functions and parameters
|
20
|
FeatureCollection.apply(this, new Array(modelNode, parent));
|
21
|
|
22
|
this.namespace = "xmlns:owscat='http://www.ec.gc.ca/owscat' xmlns:gml='http://www.opengis.net/gml' xmlns:wfs='http://www.opengis.net/wfs'";
|
23
|
}
|
24
|
|
25
|
/**
|
26
|
* Returns the featureType node with the specified name from the list of nodes
|
27
|
* selected by the nodeSelectXpath from the capabilities doc.
|
28
|
* @param featureName name of the featureType to look up
|
29
|
* @return the featureType node with the specified name.
|
30
|
*/
|
31
|
OwsCatResources.prototype.getFeatureNode = function(featureName) {
|
32
|
return this.doc.selectSingleNode(this.nodeSelectXpath+"[owscat:name='"+featureName+"']");
|
33
|
}
|
34
|
|