[Mapbender-commits] r10171 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jul 1 04:31:58 PDT 2019
Author: armin11
Date: 2019-07-01 04:31:58 -0700 (Mon, 01 Jul 2019)
New Revision: 10171
Modified:
trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php
Log:
Fix for identification of inspire predefined atom
Modified: trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php
===================================================================
--- trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php 2019-07-01 09:28:03 UTC (rev 10170)
+++ trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php 2019-07-01 11:31:58 UTC (rev 10171)
@@ -245,6 +245,10 @@
//service type
$mdServiceType = $cswClient->operationResult->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$k.']/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName');
$mdServiceType = (string)$mdServiceType[0];
+ //service type version
+ $mdServiceTypeVersion = $cswClient->operationResult->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$k.']/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceTypeVersion/gco:CharacterString');
+ $mdServiceTypeVersion = (string)$mdServiceTypeVersion[0];
+
//accessUrl
/*$mdAccessUrl = $cswClient->operationResult->xpath('/csw:GetRecordsResponse/csw:SearchResults/gmd:MD_Metadata['.$k.']/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL');
$mdAccessUrl = (string)$mdAccessUrl[0];*/
@@ -281,16 +285,17 @@
//$serviceMetadata->service[$k]->accessUrl = $mdAccessUrl;
if (in_array(strtoupper($mdServiceType), array('VIEW','OGC:WMS','WMS','PREDEFINED ATOM','DOWNLOAD','WFS','ATOM'))) {
- if (in_array(strtoupper($mdServiceType), array('PREDEFINED ATOM','DOWNLOAD','WFS','ATOM'))) {
- if (in_array(strtoupper($mdServiceType), array('PREDEFINED ATOM','ATOM'))) {
+ if (in_array(strtoupper($mdServiceType), array('PREDEFINED ATOM','DOWNLOAD','WFS','ATOM')) || in_array(strtoupper($mdServiceTypeVersion), array('PREDEFINED ATOM','DOWNLOAD','WFS','ATOM'))) {
+ if (in_array(strtoupper($mdServiceType), array('PREDEFINED ATOM','ATOM')) || in_array(strtoupper($mdServiceTypeVersion), array('PREDEFINED ATOM','ATOM'))) {
$serviceMetadata->service[$k]->accessClient = $scheme.'://'.$hostName.str_replace("php/".basename($_SERVER['SCRIPT_NAME']), "plugins/mb_downloadFeedClient.php", $_SERVER['PHP_SELF'])."?url=".urlencode($mdAccessUrl);
$serviceMetadata->service[$k]->serviceSubType = 'ATOM';
$serviceMetadata->service[$k]->serviceType = "download";
$serviceMetadata->service[$k]->accessUrl = $mdAccessUrl;
+ } else {
+ $serviceMetadata->service[$k]->serviceSubType = 'WFS';
+ $serviceMetadata->service[$k]->serviceType = "download";
+ $serviceMetadata->service[$k]->accessUrl = (string)$mdAccessUrl;
}
- $serviceMetadata->service[$k]->serviceSubType = 'WFS';
- $serviceMetadata->service[$k]->serviceType = "download";
- $serviceMetadata->service[$k]->accessUrl = (string)$mdAccessUrl;
} else {
$serviceMetadata->service[$k]->serviceType = 'view';
$serviceMetadata->service[$k]->accessUrl = correctWmsUrl($mdAccessUrl);
More information about the Mapbender_commits
mailing list