diff --git a/lib/OpenLayers/Protocol/CSW.js b/lib/OpenLayers/Protocol/CSW.js index 5c7e215883..11703d9ffb 100644 --- a/lib/OpenLayers/Protocol/CSW.js +++ b/lib/OpenLayers/Protocol/CSW.js @@ -9,10 +9,7 @@ /** * Class: OpenLayers.Protocol.CSW - * Used to create a versioned CSW protocol. Default version is 2.0.2. - * - * Inherits from: - * - + * Used to create a versioned CSW protocol. Default version is 2.0.2. */ OpenLayers.Protocol.CSW = function(options) { options = OpenLayers.Util.applyDefaults( diff --git a/lib/OpenLayers/Protocol/CSW/v2_0_2.js b/lib/OpenLayers/Protocol/CSW/v2_0_2.js index 31295fea70..74418f3acd 100644 --- a/lib/OpenLayers/Protocol/CSW/v2_0_2.js +++ b/lib/OpenLayers/Protocol/CSW/v2_0_2.js @@ -5,11 +5,12 @@ /** * @requires OpenLayers/Protocol/CSW.js + * @requires OpenLayers/Format/CSWGetRecords/v2_0_2.js */ /** * Class: OpenLayers.Protocol.CSW.v2_0_2 - * Abstract class for for v2_0_2 protocol. + * CS-W (Catalogue services for the Web) version 2.0.2 protocol. * * Inherits from: * - @@ -24,8 +25,8 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { formatOptions: null, /** - * Constructor: OpenLayers.Protocol.CSW - * A class for CSW protocol management. + * Constructor: OpenLayers.Protocol.CSW.v2_0_2 + * A class for CSW version 2.0.2 protocol management. * * Parameters: * options - {Object} Optional object whose properties will be set on the @@ -34,7 +35,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { initialize: function(options) { OpenLayers.Protocol.prototype.initialize.apply(this, [options]); if(!options.format) { - /* not tested */ this.format = new OpenLayers.Format.CSWGetRecords.v2_0_2(OpenLayers.Util.extend({ }, this.formatOptions)); } @@ -71,11 +71,7 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { /** * Method: read - * Construct a request for reading new features. Since WFS splits the - * basic CRUD operations into GetFeature requests (for read) and - * Transactions (for all others), this method does not make use of the - * format's read method (that is only about reading transaction - * responses). + * Construct a request for reading new records from the Catalogue. */ read: function(options) { options = OpenLayers.Util.extend({}, options); @@ -102,7 +98,7 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { * Parameters: * response - {} The response object to pass * to the user callback. - * This response is given a code property, and optionally a records one. + * This response is given a code property, and optionally a data property. * The latter represents the CSW records as returned by the call to * the CSW format read method. * options - {Object} The user options passed to the read call. @@ -118,7 +114,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { // failure response.code = OpenLayers.Protocol.Response.FAILURE; } - options.callback.call(options.scope, response); } }, @@ -141,7 +136,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { if(!doc || doc.length <= 0) { return null; } - return this.format.read(doc); }, diff --git a/tests/Protocol/CSW.html b/tests/Protocol/CSW.html index cd2926c9f3..11b4b5e997 100644 --- a/tests/Protocol/CSW.html +++ b/tests/Protocol/CSW.html @@ -4,11 +4,15 @@