[OpenLayers-Commits] r12451 - sandbox/camptocamp/ifremer/openlayers/lib/OpenLayers/Format/CSWGetRecords

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Jan 12 08:36:43 EST 2012


Author: fvanderbiest
Date: 2012-01-12 05:36:43 -0800 (Thu, 12 Jan 2012)
New Revision: 12451

Modified:
   sandbox/camptocamp/ifremer/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
Log:
[camptocamp/ifremer] CSWGetRecords format additions for LocalisedCharacterString

Modified: sandbox/camptocamp/ifremer/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
===================================================================
--- sandbox/camptocamp/ifremer/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2012-01-11 16:19:03 UTC (rev 12450)
+++ sandbox/camptocamp/ifremer/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2012-01-12 13:36:43 UTC (rev 12451)
@@ -188,6 +188,7 @@
         "LI_Source":"pass",
         "LI_ProcessStep":"pass",
         "MD_ReferenceSystem":"pass",
+        "PT_FreeText": "pass",
         // createManyChildren
         "contact": "createManyChildren",
         "voice": "createManyChildren",
@@ -245,6 +246,7 @@
         "sourceExtent":"createManyChildren",
         "sourceStep":"createManyChildren",
         "processor":"createManyChildren",
+        "textGroup": "createManyChildren",
         // createOneChild
         "dateTime":"createOneChild",
         "rationale":"createOneChild",
@@ -483,6 +485,15 @@
                     obj.extent = this.readChildNodes(node);
                 }
             },
+            "LocalisedCharacterString": function(node, obj) {
+                var attrs = node.attributes, t = {};
+                for(var i=0, len=attrs.length; i<len; ++i) {
+                    t[attrs[i].name] = attrs[i].nodeValue;
+                }
+                obj["LocalisedCharacterString"] = OpenLayers.Util.extend({
+                    value: this.getChildValue(node)
+                }, t);
+            },
             "*": function(node, obj) {
                 var name = node.localName || node.nodeName.split(":").pop();
                 switch (this.parsers[name]) {



More information about the Commits mailing list