[Mapbender-commits] r10096 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Apr 9 01:14:50 PDT 2019
Author: armin11
Date: 2019-04-09 01:14:50 -0700 (Tue, 09 Apr 2019)
New Revision: 10096
Modified:
trunk/mapbender/http/php/mod_inspireAtomFeedISOMetadata.php
trunk/mapbender/http/php/mod_layerISOMetadata.php
Log:
Fix for giving right legislation info for INSPIRE
Modified: trunk/mapbender/http/php/mod_inspireAtomFeedISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_inspireAtomFeedISOMetadata.php 2019-04-09 07:54:38 UTC (rev 10095)
+++ trunk/mapbender/http/php/mod_inspireAtomFeedISOMetadata.php 2019-04-09 08:14:50 UTC (rev 10096)
@@ -25,6 +25,7 @@
require_once(dirname(__FILE__) . "/../classes/class_administration.php");
require_once(dirname(__FILE__) . "/../classes/class_Uuid.php");
require_once(dirname(__FILE__) . "/../classes/class_iso19139.php");
+require_once(dirname(__FILE__)."/../classes/class_qualityReport.php");
$con = db_connect(DBSERVER,OWNER,PW);
db_select_db(DB,$con);
@@ -1311,61 +1312,19 @@
$gmd_scope->appendChild($DQ_Scope);
$DQ_DataQuality->appendChild($gmd_scope);
- //gmd:report in dataQualityInfo
- $gmd_report=$iso19139->createElement("gmd:report");
- $DQ_DomainConsistency=$iso19139->createElement("gmd:DQ_DomainConsistency");
- $DQ_DomainConsistency->setAttribute("xsi:type","gmd:DQ_DomainConsistency_Type");
- $gmd_result=$iso19139->createElement("gmd:result");
- $DQ_ConformanceResult=$iso19139->createElement("gmd:DQ_ConformanceResult");
- $gmd_specification=$iso19139->createElement("gmd:specification");
- $CI_Citation=$iso19139->createElement("gmd:CI_Citation");
- $gmd_title=$iso19139->createElement("gmd:title");
- $gmd_title_cs=$iso19139->createElement("gco:CharacterString");
- $gmd_titleText=$iso19139->createTextNode("Service Abstract Suite"); //TODO put in the inspire test suites from mb database!
- $gmd_date=$iso19139->createElement("gmd:date");
- $CI_Date=$iso19139->createElement("gmd:CI_Date");
- $gmd_date_2=$iso19139->createElement("gmd:date");
- $gco_Date=$iso19139->createElement("gco:Date");
- $gco_DateText=$iso19139->createTextNode("2010-03-10"); //TODO put in the info from database
-
- $gmd_dateType=$iso19139->createElement("gmd:dateType");
- $CI_DateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
- $CI_DateTypeCode->setAttribute("codeList","http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_DateTypeCode");
- $CI_DateTypeCode->setAttribute("codeListValue","publication");
- $CI_DateTypeCodeText=$iso19139->createTextNode("publication");
-
- $gmd_explanation=$iso19139->createElement("gmd:explanation");
- $gmd_explanation_cs=$iso19139->createElement("gco:CharacterString");
- $gmd_explanationText=$iso19139->createTextNode("No explanation available");
-
- $gmd_pass=$iso19139->createElement("gmd:pass");
- $gco_Boolean=$iso19139->createElement("gco:Boolean");
- $gco_BooleanText=$iso19139->createTextNode("true"); //TODO maybe set here a string cause it can be unevaluated!! See Implementing Rules
- //generate XML objects
- $gco_Date->appendChild($gco_DateText);
- $gmd_date->appendChild($gco_Date);
-
- $CI_DateTypeCode->appendChild($CI_DateTypeCodeText);
- $gmd_dateType->appendChild($CI_DateTypeCode);
- $CI_Date->appendChild($gmd_date);
- $CI_Date->appendChild($gmd_dateType);
- $gmd_date_2->appendChild($CI_Date);
- $gmd_title_cs->appendChild($gmd_titleText);
- $gmd_title->appendChild($gmd_title_cs);
- $CI_Citation->appendChild($gmd_title);
- $CI_Citation->appendChild($gmd_date_2);
- $gmd_specification->appendChild($CI_Citation);
- $gmd_explanation_cs->appendChild($gmd_explanationText);
- $gmd_explanation->appendChild($gmd_explanation_cs);
- $gco_Boolean->appendChild($gco_BooleanText);
- $gmd_pass->appendChild($gco_Boolean);
- $DQ_ConformanceResult->appendChild($gmd_specification);
- $DQ_ConformanceResult->appendChild($gmd_explanation);
- $DQ_ConformanceResult->appendChild($gmd_pass);
- $gmd_result->appendChild($DQ_ConformanceResult);
- $DQ_DomainConsistency->appendChild($gmd_result);
- $gmd_report->appendChild($DQ_DomainConsistency);
- $DQ_DataQuality->appendChild($gmd_report);
+ //new from april 2019 - create conformance table from inspire_legislation config file - for interoperable datasets set all conformancy declarations to true for non interoperable set only the metadata conformance to true - see also mod_layerISOMetadata.php and mod_dataISOMetadata.php
+ //get conformancy declarations from class
+ $qualityReport = new QualityReport();
+ //All services are conform
+ $inputXml = $qualityReport->getIso19139Representation("service", "t");
+ $reportDomObject = new DOMDocument();
+ $reportDomObject->loadXML($inputXml);
+ $xpathInput = new DOMXpath($reportDomObject);
+ $inputNodeList = $xpathInput->query('/mb:dataqualityreport/gmd:report');
+ for ($i = ($inputNodeList->length)-1; $i >= 0; $i--) {
+ $DQ_DataQuality->appendChild($iso19139->importNode($inputNodeList->item($i), true));
+ }
+
$gmd_dataQualityInfo->appendChild($DQ_DataQuality);
//$MD_ScopeCode->setAttribute("codeListValue", "service");
$MD_Metadata->appendChild($identificationInfo);
Modified: trunk/mapbender/http/php/mod_layerISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerISOMetadata.php 2019-04-09 07:54:38 UTC (rev 10095)
+++ trunk/mapbender/http/php/mod_layerISOMetadata.php 2019-04-09 08:14:50 UTC (rev 10096)
@@ -674,7 +674,10 @@
<srv:operatesOn xlink:href="http://image2000.jrc.it#image2000_1_nl2_multi"/>*/
//to the things which have to be done for integrating the service into a client like portalu ... they have defined another location to put the GetCap URL than INSPIRE does it
+//new for new metadata guidance 2017 - really needed? - TODO check legislation!:
+/*Validfation gdi-de april 2019 FEHLER: Es muss ein connectPoint-Element vorhanden sein("/gmd:MD_Metadata/gmd:identificationInfo[1]/gmd:SV_ServiceIdentification/gmd:containsOperations/gmd:SV_OperationMetadata/gmd:connectPoint/gmd:CI_OnlineResource/gmd:linkage/gmd:URL").*/
+
$containsOperation=$iso19139->createElement("srv:containsOperations");
$SV_OperationMetadata=$iso19139->createElement("srv:SV_OperationMetadata");
More information about the Mapbender_commits
mailing list