Changeset 101 for trunk/zoo-api
- Timestamp:
- Jan 31, 2011, 4:49:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-api/js/ZOO-api.js
r86 r101 3628 3628 result.uom = node.@uom; 3629 3629 return result; 3630 }, 3631 /** 3632 * Method: parseData.reference 3633 * Given an Object representing the WPS reference response. 3634 * 3635 * Parameters: 3636 * node - {E4XElement} A WPS node. 3637 * 3638 * Returns: 3639 * {Object} A WPS reference response. 3640 */ 3641 'reference': function(node) { 3642 var result = {type:'reference',value:node.*::href}; 3643 return result; 3630 3644 } 3631 3645 }, … … 3849 3863 }); 3850 3864 /** 3851 * Function: OpenLayers.Geometry.fromWKT3865 * Function: ZOO.Geometry.fromWKT 3852 3866 * Generate a geometry given a Well-Known Text string. 3853 3867 * … … 3992 4006 }; 3993 4007 /** 3994 * Class: OpenLayers.Geometry.Collection4008 * Class: ZOO.Geometry.Collection 3995 4009 * A Collection is exactly what it sounds like: A collection of different 3996 4010 * Geometries. These are stored in the local parameter <components> (which … … 5260 5274 * 5261 5275 * Inherits: 5262 * - < OpenLayers.Geometry.LineString>5276 * - <ZOO.Geometry.LineString> 5263 5277 */ 5264 5278 ZOO.Geometry.LinearRing = ZOO.Class( … … 5272 5286 componentTypes: ["ZOO.Geometry.Point"], 5273 5287 /** 5274 * Constructor: OpenLayers.Geometry.LinearRing5288 * Constructor: ZOO.Geometry.LinearRing 5275 5289 * Linear rings are constructed with an array of points. This array 5276 5290 * can represent a closed or open ring. If the ring is open (the last … … 5786 5800 componentTypes: ["ZOO.Geometry.LinearRing"], 5787 5801 /** 5788 * Constructor: OpenLayers.Geometry.Polygon5802 * Constructor: ZOO.Geometry.Polygon 5789 5803 * Constructor for a Polygon geometry. 5790 5804 * The first ring (this.component[0])is the outer bounds of the polygon and … … 5977 5991 componentTypes: ["ZOO.Geometry.Polygon"], 5978 5992 /** 5979 * Constructor: OpenLayers.Geometry.MultiPolygon5993 * Constructor: ZOO.Geometry.MultiPolygon 5980 5994 * Create a new MultiPolygon geometry 5981 5995 * … … 5990 6004 CLASS_NAME: "ZOO.Geometry.MultiPolygon" 5991 6005 }); 5992 6006 /** 6007 * Class: ZOO.Process 6008 * Used to query OGC WPS process defined by its URL and its identifier. 6009 * Usefull for chaining localhost process. 6010 */ 5993 6011 ZOO.Process = ZOO.Class({ 6012 /** 6013 * Property: schemaLocation 6014 * {String} Schema location for a particular minor version. 6015 */ 5994 6016 schemaLocation: "http://www.opengis.net/wps/1.0.0/../wpsExecute_request.xsd", 6017 /** 6018 * Property: namespaces 6019 * {Object} Mapping of namespace aliases to namespace URIs. 6020 */ 5995 6021 namespaces: { 5996 6022 ows: "http://www.opengis.net/ows/1.1", … … 5999 6025 xsi: "http://www.w3.org/2001/XMLSchema-instance", 6000 6026 }, 6027 /** 6028 * Property: url 6029 * {String} The OGC's Web PRocessing Service URL, 6030 * default is http://localhost/zoo. 6031 */ 6001 6032 url: 'http://localhost/zoo', 6033 /** 6034 * Property: identifier 6035 * {String} Process identifier in the OGC's Web Processing Service. 6036 */ 6002 6037 identifier: null, 6038 /** 6039 * Constructor: ZOO.Process 6040 * Create a new Process 6041 * 6042 * Parameters: 6043 * url - {String} The OGC's Web Processing Service URL. 6044 * identifier - {String} The process identifier in the OGC's Web Processing Service. 6045 * 6046 */ 6003 6047 initialize: function(url,identifier) { 6004 6048 this.url = url; 6005 6049 this.identifier = identifier; 6006 6050 }, 6051 /** 6052 * Method: Execute 6053 * Query the OGC's Web PRocessing Servcie to Execute the process. 6054 * 6055 * Parameters: 6056 * inputs - {Object} 6057 * 6058 * Returns: 6059 * {String} The OGC's Web processing Service XML response. The result 6060 * needs to be interpreted. 6061 */ 6007 6062 Execute: function(inputs) { 6008 6063 if (this.identifier == null) … … 6013 6068 return response; 6014 6069 }, 6070 /** 6071 * Property: buildInput 6072 * Object containing methods to build WPS inputs. 6073 */ 6015 6074 buildInput: { 6075 /** 6076 * Method: buildInput.complex 6077 * Given an E4XElement representing the WPS complex data input. 6078 * 6079 * Parameters: 6080 * identifier - {String} the input indetifier 6081 * data - {Object} A WPS complex data input. 6082 * 6083 * Returns: 6084 * {E4XElement} A WPS Input node. 6085 */ 6016 6086 'complex': function(identifier,data) { 6017 6087 var input = new XML('<wps:Input xmlns:wps="'+this.namespaces['wps']+'"><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier><wps:Data><wps:ComplexData>'+data.value+'</wps:ComplexData></wps:Data></wps:Input>'); … … 6024 6094 return input; 6025 6095 }, 6096 /** 6097 * Method: buildInput.reference 6098 * Given an E4XElement representing the WPS reference input. 6099 * 6100 * Parameters: 6101 * identifier - {String} the input indetifier 6102 * data - {Object} A WPS reference input. 6103 * 6104 * Returns: 6105 * {E4XElement} A WPS Input node. 6106 */ 6026 6107 'reference': function(identifier,data) { 6027 6108 return '<wps:Input xmlns:wps="'+this.namespaces['wps']+'"><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier><wps:Reference xmlns:xlink="'+this.namespaces['xlink']+'" xlink:href="'+data.value.replace('&','&','gi')+'"/></wps:Input>'; 6028 6109 }, 6110 /** 6111 * Method: buildInput.literal 6112 * Given an E4XElement representing the WPS literal data input. 6113 * 6114 * Parameters: 6115 * identifier - {String} the input indetifier 6116 * data - {Object} A WPS literal data input. 6117 * 6118 * Returns: 6119 * {E4XElement} The WPS Input node. 6120 */ 6029 6121 'literal': function(identifier,data) { 6030 6122 var input = new XML('<wps:Input xmlns:wps="'+this.namespaces['wps']+'"><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier><wps:Data><wps:LiteralData>'+data.value+'</wps:LiteralData></wps:Data></wps:Input>'); … … 6037 6129 } 6038 6130 }, 6131 /** 6132 * Method: buildDataInputsNode 6133 * Method to build the WPS DataInputs element. 6134 * 6135 * Parameters: 6136 * inputs - {Object} 6137 * 6138 * Returns: 6139 * {E4XElement} The WPS DataInputs node for Execute query. 6140 */ 6039 6141 buildDataInputsNode:function(inputs){ 6040 6142 var data, builder, inputsArray=[];
Note: See TracChangeset
for help on using the changeset viewer.