[OpenLayers-Commits] r11926 - in sandbox/august/trunk: lib lib/OpenLayers lib/OpenLayers/Format/WPSCommon lib/OpenLayers/Layer lib/OpenLayers/Test playground/wps

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Apr 28 20:52:09 EDT 2011


Author: augusttown
Date: 2011-04-28 17:52:08 -0700 (Thu, 28 Apr 2011)
New Revision: 11926

Added:
   sandbox/august/trunk/lib/OpenLayers/Layer/Process.js
   sandbox/august/trunk/lib/OpenLayers/Test/AgsRestAdmin.js
Modified:
   sandbox/august/trunk/lib/OpenLayers.js
   sandbox/august/trunk/lib/OpenLayers/Format/WPSCommon/v1_0_0.js
   sandbox/august/trunk/lib/OpenLayers/Test.js
   sandbox/august/trunk/lib/OpenLayers/Test/AgsOgcRegression.js
   sandbox/august/trunk/playground/wps/wps-process-ags.js
Log:
Update

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WPSCommon/v1_0_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WPSCommon/v1_0_0.js	2011-04-28 17:38:33 UTC (rev 11925)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WPSCommon/v1_0_0.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -125,7 +125,7 @@
         }
         this.readNode(data, respObj);
         return respObj;             
-    },
+    },    
     /**
      * Property: readers
      * Contains public functions, grouped by namespace prefix, that will

Added: sandbox/august/trunk/lib/OpenLayers/Layer/Process.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Process.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Process.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -0,0 +1,57 @@
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
+ * full list of contributors). Published under the Clear BSD license.  
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+
+/**
+ * @requires OpenLayers/Layer.js
+ */
+
+/**
+ * Class: OpenLayers.Layer.Process
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Layer> 
+ */
+OpenLayers.Layer.Process = OpenLayers.Class(OpenLayers.Layer, {
+    
+    /** 
+     * APIProperty: isBaseLayer 
+     * {Boolean} Process layer is never a base layer.  
+     */
+    isBaseLayer: false,
+    
+    /** 
+     * APIProperty: isBaseLayer   
+     */
+    displayInLayerSwitcher: false,
+    
+    /** 
+     * APIProperty: visibility   
+     */
+    visibility: false,
+        
+    /**
+     * Constructor: OpenLayers.Layer.Process 
+     * Create a Markers layer.
+     *
+     * Parameters:
+     * name - {String} 
+     * options - {Object} Hashtable of extra options to tag onto the layer
+     */
+    initialize: function(name, options) {
+        OpenLayers.Layer.prototype.initialize.apply(this, arguments);        
+    },
+    
+    /**
+     * APIMethod: destroy 
+     */
+    /*
+    destroy: function() {
+        OpenLayers.Layer.prototype.destroy.apply(this, arguments);
+    },
+    */
+
+    CLASS_NAME: "OpenLayers.Layer.Process"
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Test/AgsOgcRegression.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Test/AgsOgcRegression.js	2011-04-28 17:38:33 UTC (rev 11925)
+++ sandbox/august/trunk/lib/OpenLayers/Test/AgsOgcRegression.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -148,33 +148,7 @@
 	        data: postReqXmlStr
 	    }); 
 	},
-		
-	_run_admin_post_: function(reqId, options, t) {
-		var jsonFormat = new OpenLayers.Format.JSON();
-		var postReqJsonStr = document.getElementById(reqId).firstChild.nodeValue;
-		var postReqJsonObj = jsonFormat.read(postReqJsonStr);
-		
-		postReqJsonObj.properties.filePath = options['filePath'] || ""; 
-		// TODO: add other options
-		postReqJsonStr = jsonFormat.write(postReqJsonObj);		
-		var caller = this;
-		OpenLayers.Request.POST({
-	        url: this.url,
-	        success: function(response) {				
-				t.ok(true, response);
-			},
-			failure: function(response) {			
-				t.ok(false, response);
-			},
-	        params: {},
-	        headers: {
-	        	"CONTENT-TYPE": "text/json"
-	        },
-	        data: postReqJsonStr
-	    }); 		
-	},
-	
-	
+			
 	_verify_features_number: function(reqParams, featureType, expectedNumOfFeatures, t) {
 		var caller = this;		
 		OpenLayers.Request.GET({

Added: sandbox/august/trunk/lib/OpenLayers/Test/AgsRestAdmin.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Test/AgsRestAdmin.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Test/AgsRestAdmin.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -0,0 +1,76 @@
+/**
+ * @requires OpenLayers/Test.js
+ */
+OpenLayers.Test.AgsRestAdmin = OpenLayers.Class(OpenLayers.Test, {
+	/**
+	 * 
+	 */
+	url: "",
+	
+	/**
+	 * APIMethod: _run_admin_createService_post_
+	 */
+	_run_admin_createService_post_: function(reqId, options, t) {
+		
+		var successMsg = "...create service success...";
+		var failureMsg = "...create service failure...";
+		
+		var jsonFormat = new OpenLayers.Format.JSON();
+		var postReqJsonStr = document.getElementById(reqId).firstChild.nodeValue;
+		/*
+		var postReqJsonObj = jsonFormat.read(postReqJsonStr);	
+		postReqJsonObj.properties.filePath = options['filePath'] || ""; 
+		// TODO: add other options
+		postReqJsonStr = jsonFormat.write(postReqJsonObj);
+		*/		
+		var caller = this;
+		OpenLayers.Request.POST({
+	        url: this.url + "/createService",
+	        success: function(response) {	        	
+	        	if(response.responseText.indexOf("success") != -1) {
+	        		t.ok(true, successMsg);
+	        	} else {
+	        		t.ok(false, failureMsg);
+	        	}			
+			},
+			failure: function(response) {			
+				t.ok(false, failureMsg);
+			},
+	        params: {
+	        	'service': postReqJsonStr        	
+	        },
+	        headers: {}       
+	    }); 		
+	},
+	
+	/**
+	 * APIMethod: _run_admin_deleteService_post_
+	 */
+	_run_admin_deleteService_post_: function(reqId, options, t) {		
+		var successMsg = "...delete service success...";
+		var failureMsg = "...delete service failure...";
+				
+		var serviceNameStr = document.getElementById(reqId).firstChild.nodeValue;
+		
+		var caller = this;
+		OpenLayers.Request.POST({
+	        url: this.url + "/" + serviceNameStr + "/delete",
+	        success: function(response) {	        	
+	        	if(response.responseText.indexOf("success") != -1) {
+	        		t.ok(true, successMsg);
+	        	} else {
+	        		t.ok(false, failureMsg);
+	        	}			
+			},
+			failure: function(response) {			
+				t.ok(false, failureMsg);
+			},
+	        params: {
+	        	'f': "json"        	
+	        },
+	        headers: {}       
+	    });
+	},
+	
+	CLASS_NAME: "OpenLayers.Test.AgsRestAdmin"
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Test.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Test.js	2011-04-28 17:38:33 UTC (rev 11925)
+++ sandbox/august/trunk/lib/OpenLayers/Test.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -1,5 +1,6 @@
 /**
  * @requires OpenLayers/Format/XML.js
+ * @requires OpenLayers/Format/JSON.js
  * @requires OpenLayers/Format/WPSCommon.js
  */
 OpenLayers.Test = OpenLayers.Class({

Modified: sandbox/august/trunk/lib/OpenLayers.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers.js	2011-04-28 17:38:33 UTC (rev 11925)
+++ sandbox/august/trunk/lib/OpenLayers.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -155,6 +155,7 @@
             "OpenLayers/Layer/TMS.js",
             "OpenLayers/Layer/TileCache.js",
             "OpenLayers/Layer/Zoomify.js",
+            "OpenLayers/Layer/Process.js",
             "OpenLayers/Popup/Anchored.js",
             "OpenLayers/Popup/AnchoredBubble.js",
             "OpenLayers/Popup/Framed.js",
@@ -366,6 +367,7 @@
             "OpenLayers/Process/WPS.js",
             "OpenLayers/Test.js",
             "OpenLayers/Test/AgsOgcRegression.js",
+            "OpenLayers/Test/AgsRestAdmin.js",
             "OpenLayers/Lang.js",
             "OpenLayers/Lang/en.js"         
         ); // etc.

Modified: sandbox/august/trunk/playground/wps/wps-process-ags.js
===================================================================
--- sandbox/august/trunk/playground/wps/wps-process-ags.js	2011-04-28 17:38:33 UTC (rev 11925)
+++ sandbox/august/trunk/playground/wps/wps-process-ags.js	2011-04-29 00:52:08 UTC (rev 11926)
@@ -204,7 +204,7 @@
         	}
         );
     wfs_layer_line.setVisibility(false);
-    //map.addLayer(wfs_layer_line);   
+    map.addLayer(wfs_layer_line);   
     
     wfs_layer_polygon = new OpenLayers.Layer.Vector(
     		"wfs_layer_polygon", 
@@ -276,8 +276,7 @@
 				)    			
 			}
     	}
-    );    
-    
+    );        
     map.addControl(select_control);
     select_control.activate();
     
@@ -317,7 +316,7 @@
 	if(!process) {
 		process = new OpenLayers.Process.WPS({
 			map: map,
-			url: "http://augusttown0:6080/arcgis/services/regression.advanced.services/GPServer/WPSServer?",
+			url: "http://sazabiii:6080/arcgis/services/regression.advanced.services/GPServer/WPSServer?",
 			identifier: "buffer"
 			// TODO: more settings
 		});
@@ -498,9 +497,8 @@
 	
 	if(!clip_process) {
 		clip_process = new OpenLayers.Process.WPS({
-			map: map,
-			//url: "http://augusttown0/arcgis/services/regression.advanced.services/GPServer/WPSServer?",
-			url: "http://augusttown0:6080/arcgis/services/regression.advanced.services/GPServer/WPSServer?",
+			map: map,			
+			url: "http://sazabiii:6080/arcgis/services/regression.advanced.services/GPServer/WPSServer?",
 			identifier: "clip"
 			// TODO: more settings
 		});
@@ -621,7 +619,7 @@
 	});
 }
 
-function doWCS2Contour() {	
+function doWCS2Polygons() {	
 	
 	if(!clip_process) {
 		clip_process = new OpenLayers.Process.WPS({



More information about the Commits mailing list