CSWGetRecords format additions for parsing GeoNetwork specific fields, p=fvanderbiest, r=bartvde,me (closes #2961)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -41,10 +41,10 @@
|
||||
|
||||
function test_read(t) {
|
||||
|
||||
t.plan(14);
|
||||
t.plan(16);
|
||||
|
||||
var obj = format.read(csw_response);
|
||||
|
||||
|
||||
var searchStatus = obj.SearchStatus;
|
||||
var searchResults = obj.SearchResults;
|
||||
var records = obj.records;
|
||||
@@ -72,6 +72,10 @@
|
||||
t.eq(bbox.crs, "::Lambert Azimuthal Projection", "check value for BoundingBox.crs");
|
||||
t.eq(bbox.value, [156, -3, 37, 83], "check value for record.BoundingBox");
|
||||
|
||||
// test gninfo
|
||||
testRecord = records[1];
|
||||
t.ok(testRecord.gninfo, "object contains gninfo properties");
|
||||
t.eq(testRecord.gninfo.schema, "iso19139", "check value for schema property in record.gninfo");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -37,6 +37,10 @@ var csw_response =
|
||||
'<ows:LowerCorner>51.1 -34.6</ows:LowerCorner>' +
|
||||
'<ows:UpperCorner>-17.3 38.2</ows:UpperCorner>' +
|
||||
'</ows:BoundingBox>' +
|
||||
'<geonet:info xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gml="http://www.opengis.net/gml">' +
|
||||
'<id>859</id>' +
|
||||
'<schema>iso19139</schema>' +
|
||||
'</geonet:info>' +
|
||||
'</csw:BriefRecord>' +
|
||||
'</csw:SearchResults>' +
|
||||
'</csw:GetRecordsResponse>'
|
||||
|
||||
Reference in New Issue
Block a user