[Mapbender-commits] r8230 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jan 12 06:00:53 EST 2012
Author: armin11
Date: 2012-01-12 03:00:53 -0800 (Thu, 12 Jan 2012)
New Revision: 8230
Modified:
trunk/mapbender/http/php/mod_layerISOMetadata.php
Log:
Cause of the demands for INSPIRE the service - dataset metadata coupling has to be done by reference and not by id. This is no done for the mapbender wms registry. The id of the dataset will be further written to the operatesOn uuidref attribut.
Modified: trunk/mapbender/http/php/mod_layerISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerISOMetadata.php 2011-12-12 15:15:23 UTC (rev 8229)
+++ trunk/mapbender/http/php/mod_layerISOMetadata.php 2012-01-12 11:00:53 UTC (rev 8230)
@@ -733,26 +733,32 @@
//fill in operatesOn fields with datasetid if given
/*INSPIRE example: <srv:operatesOn xlink:href="http://image2000.jrc.it#image2000_1_nl2_multi"/>*/
+ /*INSPIRE demands a href for the metadata record!*/
+ /*TODO: Exchange HTTP_HOST with other baseurl*/
while ($row_metadata = db_fetch_array($res_metadataurl)) {
switch ($row_metadata['origin']) {
case 'capabilities':
$operatesOn=$iso19139->createElement("srv:operatesOn");
- $operatesOn->setAttribute("xlink:href", $row_metadata['datasetid']);
+ $operatesOn->setAttribute("xlink:href", "http://".$_SERVER['HTTP_HOST']."/mapbender/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row_metadata['uuid']);
+ $operatesOn->setAttribute("uuidref", $row_metadata['datasetid']);
$SV_ServiceIdentification->appendChild($operatesOn);
break;
case 'metador':
$operatesOn=$iso19139->createElement("srv:operatesOn");
if (defined('METADATA_DEFAULT_CODESPACE')) {
- $operatesOn->setAttribute("xlink:href", METADATA_DEFAULT_CODESPACE."#".$row_metadata['uuid']);
+ $operatesOn->setAttribute("xlink:href", "http://".$_SERVER['HTTP_HOST']."/mapbender/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row_metadata['uuid']);
+ $operatesOn->setAttribute("uuidref", METADATA_DEFAULT_CODESPACE."#".$row_metadata['uuid']);
} else {
- $operatesOn->setAttribute("xlink:href", "http://www.mapbender.org#".$row_metadata['uuid']);
+ $operatesOn->setAttribute("xlink:href", "http://".$_SERVER['HTTP_HOST']."/mapbender/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row_metadata['uuid']);
+ $operatesOn->setAttribute("uuidref", "http://www.mapbender.org#".$row_metadata['uuid']);
}
$SV_ServiceIdentification->appendChild($operatesOn);
break;
case 'external':
$operatesOn=$iso19139->createElement("srv:operatesOn");
- $operatesOn->setAttribute("xlink:href", $row_metadata['uuid']);
+ $operatesOn->setAttribute("xlink:href", "http://".$_SERVER['HTTP_HOST']."/mapbender/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row_metadata['uuid']);
+ $operatesOn->setAttribute("uuidref", $row_metadata['uuid']);
$SV_ServiceIdentification->appendChild($operatesOn);
break;
default:
More information about the Mapbender_commits
mailing list