[Mapbender-commits] r8734 - in trunk/mapbender: http/classes http/geoportal http/plugins resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Oct 31 01:39:40 PDT 2013
Author: armin11
Date: 2013-10-31 01:39:40 -0700 (Thu, 31 Oct 2013)
New Revision: 8734
Modified:
trunk/mapbender/http/classes/class_iso19139.php
trunk/mapbender/http/classes/class_wfsToDb.php
trunk/mapbender/http/classes/class_wfs_factory.php
trunk/mapbender/http/classes/class_wms.php
trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php
trunk/mapbender/http/plugins/mb_downloadFeedServer.php
trunk/mapbender/http/plugins/mb_metadata_addon.php
trunk/mapbender/http/plugins/mb_metadata_edit.php
trunk/mapbender/http/plugins/mb_metadata_server.php
trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php
trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Possibility to store some inspire metadata in mapbenders database, bugfix for INSPIRE ATOM Feed client
Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/classes/class_iso19139.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -48,7 +48,6 @@
var $owner;
var $harvestResult;
var $harvestException;
- //new
var $lineage;
var $inspireTopConsistence; //db bool, 't' or 'f'
var $spatialResType;
@@ -57,7 +56,9 @@
var $updateFrequency;
var $dataFormat;
var $inspireCharset;
-
+ //Following two attributes are needed for generating the inspire monitoring information. They are normally not part of the iso19139!
+ var $inspireWholeArea;
+ var $inspireActualCoverage;
var $linkAlreadyInDB; //bool
var $fileIdentifierAlreadyInDB; //bool
@@ -101,7 +102,8 @@
$this->updateFrequency = "";
$this->dataFormat = "";
$this->inspireCharset = "";
-
+ $this->inspireWholeArea = 0;
+ $this->inspireActualCoverage = 0;
$this->linkAlreadyInDB = false;
$this->fileIdentifierAlreadyInDB = false;
}
@@ -116,7 +118,7 @@
public function createMapbenderMetadataFromXML($xml){
$this->metadata = $xml;
- $this->metadata = $this->removeGetRecordTag($this->metadata);
+ //$this->metadata = $this->removeGetRecordTag($this->metadata);
//$e = new mb_exception($this->metadata);
libxml_use_internal_errors(true);
try {
@@ -162,27 +164,27 @@
}
//add namespaces to xml if not given - how? - it is to late now - maybe they were given in the csw tag!
$e = new mb_notice("Parsing of xml metadata file was successfull");
- $this->fileIdentifier = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString');
+ $this->fileIdentifier = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString');
$this->fileIdentifier = $this->fileIdentifier[0];
- $this->createDate = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:dateStamp/gco:Date');
+ $this->createDate = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:dateStamp/gco:Date');
$this->createDate = $this->createDate[0];
- $this->changeDate = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:dateStamp/gco:Date');
+ $this->changeDate = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:dateStamp/gco:Date');
$this->changeDate = $this->changeDate[0];
//TODO: check if this is set, maybe DateTime must be searched instead?
- $this->title = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString');
+ $this->title = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString');
$this->title = $this->title[0];
//dataset identifier - howto model into md_metadata?
//check where datasetid is defined - maybe as RS_Identifier or as MD_Identifier see http://inspire.jrc.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf page 18
//First check if MD_Identifier is set, then check if RS_Identifier is used!
//Initialize datasetid
$this->datasetId = 'undefined';
- $code = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString');
+ $code = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString');
if (isset($code[0]) && $code[0] != '') {
$this->datasetId = $code[0];
$this->datasetIdCodeSpace = "";
} else { //try to read code from RS_Identifier
- $code = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString');
- $codeSpace = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString');
+ $code = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString');
+ $codeSpace = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString');
if (isset($codeSpace[0]) && isset($code[0]) && $codeSpace[0] != '' && $code[0] != '') {
$this->datasetId = $code[0];
$this->datasetIdCodeSpace = $codeSpace[0];
@@ -192,13 +194,13 @@
}
}
//abstract
- $this->abstract = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString');
+ $this->abstract = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString');
$this->abstract = $this->abstract[0];
- $this->keywords = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString');
+ $this->keywords = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString');
//get thesaurus name only for found keywords!
$iKeyword = 0;
foreach ($this->keywords as $keyword) {
- $thesaurusName = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords[gmd:MD_Keywords/gmd:keyword/gco:CharacterString="'.$keyword.'"]/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString');
+ $thesaurusName = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords[gmd:MD_Keywords/gmd:keyword/gco:CharacterString="'.$keyword.'"]/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString');
$this->keywordsThesaurusName[$iKeyword] = $thesaurusName[0];
//check if keyword is inspire thematic key and add it into mapbenders inspire category
if (is_int($inspireCatHash[trim($keyword)])) {
@@ -212,7 +214,7 @@
$iKeyword++;
}
$iKeyword = 0;
- $this->isoCategoryKeys = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode');
+ $this->isoCategoryKeys = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode');
//create mapbenders internal category objects
//first for topic categories
foreach ($this->isoCategoryKeys as $isoKey) {
@@ -234,30 +236,30 @@
foreach ($this->customCategories as $category) {
$e = new mb_notice("class_iso19139.php: customcat: ".$category);
}
- $this->downloadLinks = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource[gmd:function/gmd:CI_OnLineFunctionCode/@codeListValue="download"]/gmd:linkage/gmd:URL');
+ $this->downloadLinks = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource[gmd:function/gmd:CI_OnLineFunctionCode/@codeListValue="download"]/gmd:linkage/gmd:URL');
/*<gmd:extent><gmd:EX_Extent><gmd:geographicElement><gmd:EX_GeographicBoundingBox><gmd:westBoundLongitude><gco:Decimal>5</gco:Decimal></gmd:westBoundLongitude><gmd:eastBoundLongitude><gco:Decimal>10</gco:Decimal></gmd:eastBoundLongitude><gmd:southBoundLatitude><gco:Decimal>48</gco:Decimal></gmd:southBoundLatitude><gmd:northBoundLatitude><gco:Decimal>52</gco:Decimal></gmd:northBoundLatitude></gmd:EX_GeographicBoundingBox></gmd:geographicElement></gmd:EX_Extent></gmd:extent>*/
//esri
/*<gmd:extent><gmd:EX_Extent><gmd:geographicElement><gmd:EX_GeographicBoundingBox><gmd:westBoundLongitude><gco:Decimal>11.1414</gco:Decimal></gmd:westBoundLongitude><gmd:eastBoundLongitude><gco:Decimal>11.7284</gco:Decimal></gmd:eastBoundLongitude><gmd:southBoundLatitude><gco:Decimal>58.8838</gco:Decimal></gmd:southBoundLatitude><gmd:northBoundLatitude><gco:Decimal>59.2562</gco:Decimal></gmd:northBoundLatitude></gmd:EX_GeographicBoundingBox></gmd:geographicElement><gmd:temporalElement><gmd:EX_TemporalExtent><gmd:extent><gml:TimePeriod gml:id="idNummer1"><gml:beginPosition>1999-05-05</gml:beginPosition><gml:endPosition>2012-04-04</gml:endPosition></gml:TimePeriod></gmd:extent></gmd:EX_TemporalExtent></gmd:temporalElement></gmd:EX_Extent></gmd:extent>*/
//get bbox from xml:
- $minx = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal');
+ $minx = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal');
$minx = $minx[0];
- $miny = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal');
+ $miny = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal');
$miny = $miny[0];
- $maxx = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal');
+ $maxx = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal');
$maxx = $maxx[0];
- $maxy = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal');
+ $maxy = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal');
$maxy = $maxy[0];
$this->wgs84Bbox = array($minx,$miny,$maxx,$maxy);
- $this->hierachyLevel = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode');
+ $this->hierachyLevel = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode');
$this->hierachyLevel = $this->hierachyLevel[0];
- $this->tmpExtentBegin = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition');
+ $this->tmpExtentBegin = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition');
$this->tmpExtentBegin = $this->tmpExtentBegin[0];
- $this->tmpExtentEnd = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition');
+ $this->tmpExtentEnd = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition');
$this->tmpExtentEnd = $this->tmpExtentEnd[0];
//spatial_res_type
//spatial_res_value
//ref_system
- $this->refSystem = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString');
+ $this->refSystem = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString');
$this->refSystem = $this->refSystem[0];
//parse codes to get EPSG:XXXXX TODO use other function to support other codes
//get last part of string separated by the colon symbol
@@ -272,7 +274,7 @@
$iKeyword = 0;*/
//format
//lineage
- $this->lineage = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString');
+ $this->lineage = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString');
$this->lineage = $this->lineage[0];
//inspire_charset
//inspire_top_consistence
@@ -310,7 +312,7 @@
public function transformToHtml($layout,$languageCode){
//TODO!
- $this->metadata = $this->removeGetRecordTag($this->metadata);
+ //$this->metadata = $this->removeGetRecordTag($this->metadata);
libxml_use_internal_errors(true);
//TODO don't parse it again, but change the internal parser function!
try {
@@ -343,7 +345,7 @@
for($a = 0; $a < count($iso19139Hash); $a++) {
//TODO delete csw:... from following - only parse the metadata record itself
//$resultOfXpath = $iso19139Xml->xpath('/csw:GetRecordByIdResponse'.$iso19139Hash[$a]['iso19139']);
- $resultOfXpath = $iso19139Xml->xpath($iso19139Hash[$a]['iso19139']);
+ $resultOfXpath = $iso19139Xml->xpath("/".$iso19139Hash[$a]['iso19139']);
for ($i = 0; $i < count($resultOfXpath); $i++) {
$iso19139Hash[$a]['value'] = $iso19139Hash[$a]['value'].",".$resultOfXpath[$i];
}
@@ -728,6 +730,8 @@
$this->updateFrequency = $row['update_frequency'];//"";
$this->dataFormat = $row['format'];//"";
$this->inspireCharset = $row['inspire_charset'];//"";
+ $this->inspireWholeArea = $row['inspire_whole_area'];//"";
+ $this->inspireActualCoverage = $row['inspire_actual_coverage'];//"";
//$test = print_r($row['datalinks'],true);
//$e = new mb_exception((string)$test);
$this->downloadLinks = $this->jsonDecodeDownloadLinks($row['datalinks']);
@@ -1311,9 +1315,10 @@
}
public function insertMetadataIntoDB() {
+
//insert an instance for iso19139 into mapbenders database
$sql = <<<SQL
-INSERT INTO mb_metadata (lastchanged, link, origin, md_format, data, linktype, uuid, title, createdate, changedate, abstract, searchtext, type, tmp_reference_1, tmp_reference_2, export2csw, datasetid, datasetid_codespace, randomid, fkey_mb_user_id, harvestresult, harvestexception, lineage, inspire_top_consistence, spatial_res_type, spatial_res_value, update_frequency, format, inspire_charset, ref_system, the_geom, datalinks) VALUES(now(), $1, $18, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31)
+INSERT INTO mb_metadata (lastchanged, link, origin, md_format, data, linktype, uuid, title, createdate, changedate, abstract, searchtext, type, tmp_reference_1, tmp_reference_2, export2csw, datasetid, datasetid_codespace, randomid, fkey_mb_user_id, harvestresult, harvestexception, lineage, inspire_top_consistence, spatial_res_type, spatial_res_value, update_frequency, format, inspire_charset, ref_system, the_geom, datalinks, inspire_whole_area, inspire_actual_coverage) VALUES(now(), $1, $18, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33)
SQL;
$v = array(
$this->href,
@@ -1346,9 +1351,11 @@
$this->inspireCharset,
$this->refSystem,
$this->createWktBboxFromArray($this->wgs84Bbox),
- $this->jsonEncodeDownloadLinks($this->downloadLinks)
+ $this->jsonEncodeDownloadLinks($this->downloadLinks),
+ $this->inspireWholeArea,
+ $this->inspireActualCoverage
);
- $t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s');
+ $t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s','i','i');
$res = db_prep_query($sql,$v,$t);
return $res;
}
@@ -1372,7 +1379,7 @@
$sql .= "linktype = $4, uuid = $5, title = $6, createdate = $7, changedate = $8, lastchanged = now(), ";
$sql .= "abstract = $9, searchtext = $10, type = $11, tmp_reference_1 = $12, tmp_reference_2 = $13, export2csw = $14, datasetid = $15, ";
$sql .= "datasetid_codespace = $16, randomid = $17, harvestresult = $20, harvestexception = $21, lineage = $22, inspire_top_consistence = $23, ";
- $sql .= "spatial_res_type = $24, spatial_res_value = $25, update_frequency = $26, format = $27, inspire_charset = $28, ref_system = $29, the_geom = $30, datalinks = $31 WHERE metadata_id = $19";
+ $sql .= "spatial_res_type = $24, spatial_res_value = $25, update_frequency = $26, format = $27, inspire_charset = $28, ref_system = $29, the_geom = $30, datalinks = $31, inspire_whole_area = $32, inspire_actual_coverage = $33 WHERE metadata_id = $19";
$v = array(
$this->href,
@@ -1406,9 +1413,11 @@
$this->inspireCharset,
$this->refSystem,
$this->createWktBboxFromArray($this->wgs84Bbox),
- $this->jsonEncodeDownloadLinks($this->downloadLinks)
+ $this->jsonEncodeDownloadLinks($this->downloadLinks),
+ $this->inspireWholeArea,
+ $this->inspireActualCoverage
);
- $t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s');
+ $t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s','i','i');
$res = db_prep_query($sql,$v,$t);
return $res;
}
Modified: trunk/mapbender/http/classes/class_wfsToDb.php
===================================================================
--- trunk/mapbender/http/classes/class_wfsToDb.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/classes/class_wfsToDb.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -145,13 +145,14 @@
//they don't come from the capabilities!
if (!$updateMetadataOnly) {
//read network_access from database
- $sql = "SELECT wfs_network_access, wfs_max_features from wfs WHERE wfs_id = $1 ";
+ $sql = "SELECT wfs_network_access, wfs_max_features, inspire_annual_requests from wfs WHERE wfs_id = $1 ";
$v = array($aWfs->id);
$t = array('i');
$res = db_prep_query($sql,$v,$t);
$row = db_fetch_assoc($res);
$aWfs->wfs_network_access = $row["wfs_network_access"];
$aWfs->wfs_max_features = $row["wfs_max_features"];
+ $aWfs->inspire_annual_requests = $row["inspire_annual_requests"];
//$e = new mb_notice("class_wms.php: wfs_network_access from database: ".$aWfs->wfs_network_access);
}
//if network access is either stored in database nor given thru object, set it too a default value 0
@@ -171,7 +172,7 @@
$sql .= "city = $16, deliverypoint = $17, administrativearea = $18, ";
$sql .= "postalcode = $19, voice = $20, facsimile = $21, ";
$sql .= "electronicmailaddress = $22, country = $23, ";
- $sql .= "wfs_timestamp = $24, wfs_network_access = $25, fkey_mb_group_id = $26, wfs_max_features = $28 ";
+ $sql .= "wfs_timestamp = $24, wfs_network_access = $25, fkey_mb_group_id = $26, wfs_max_features = $28, inspire_annual_requests = $29 ";
$sql .= "WHERE wfs_id = $27";
$v = array(
@@ -202,10 +203,11 @@
$aWfs->wfs_network_access,
$aWfs->fkey_mb_group_id,
$aWfs->id,
- $aWfs->wfs_max_features
+ $aWfs->wfs_max_features,
+ $aWfs->inspire_annual_requests
);
- $t = array('s', 's', 's', 's', 's', 's', 's', 's' ,'s' ,'s' ,'s' ,'s','s' ,'s','s','s','s','s','s','s','s','s','s','i','i','i','i','i');
+ $t = array('s', 's', 's', 's', 's', 's', 's', 's' ,'s' ,'s' ,'s' ,'s','s' ,'s','s','s','s','s','s','s','s','s','s','i','i','i','i','i','i');
$e = new mb_notice("class_wfsToDb.php: UPDATING WFS " . $aWfs->id);
$res = db_prep_query($sql, $v, $t);
if (!$res) {
Modified: trunk/mapbender/http/classes/class_wfs_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_factory.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/classes/class_wfs_factory.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -110,6 +110,7 @@
$aWfs->timestamp_create = db_result($res, $cnt, "wfs_timestamp_create");
$aWfs->wfs_network_access = db_result($res, $cnt, "wfs_network_access");
$aWfs->wfs_max_features = db_result($res, $cnt, "wfs_max_features");
+ $aWfs->inspire_annual_requests = db_result($res, $cnt, "inspire_annual_requests");
$aWfs->fkey_mb_group_id = db_result($res, $cnt, "fkey_mb_group_id");
$aWfs->uuid = db_result($res, $cnt, "uuid");
// Featuretypes
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/classes/class_wms.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -59,6 +59,8 @@
var $wms_userlayer;
var $wms_userstyle;
var $wms_remotewfs;
+
+ var $inspire_annual_requests;
var $gui_wms_mapformat;
var $gui_wms_featureinfoformat;
@@ -245,7 +247,7 @@
}
return "";
}
-
+ //TODO: Problem layer_name is not always given - use other possibility to gain access - think deeper
public function getLayerById ($id) {
$adm = new administration();
for ($i = 0; $i < count($this->objLayer); $i++) {
@@ -264,6 +266,7 @@
}
throw new Exception ("Layer not found.");
}
+ //TODO: Problem layer_name is not always given - use other possibility to gain access - think deeper
public function &getLayerReferenceById ($id) {//this is done to update one layer with the metadata editor!
$adm = new administration();
for ($i = 0; $i < count($this->objLayer); $i++) {
@@ -1193,6 +1196,7 @@
}
}
if($this->objLayer[$i]->layer_name == ""){
+ //TODO: Check if this handling is ok - maybe we need another handling of layer without names (category layer)!
$this->objLayer[$i]->layer_name = $this->objLayer[$i]->layer_title;
}
if($this->objLayer[$i]->layer_minscale == ""){
@@ -1282,6 +1286,11 @@
if($this->wms_remotewfs == ""){
$this->wms_remotewfs = 0;
}
+
+ /* initialize inspire_annual_requests - only needed for inspire monitoring but maybe usefull for other things*/
+ /*if(!isset($this->inspire_annual_requests) || $this->inspire_annual_requests == "" || !is_int($this->inspire_annual_requests)){
+ $this->inspire_annual_requests = 0;
+ }*/
}
function displayWMS(){
@@ -1729,8 +1738,8 @@
$sql .= "accessconstraints, contactperson, contactposition, contactorganization, address, city, ";
$sql .= "stateorprovince, postcode, country, contactvoicetelephone, contactfacsimiletelephone, contactelectronicmailaddress, ";
$sql .= "wms_owner,wms_timestamp,wms_timestamp_create,wms_username,wms_password,wms_auth_type,";
- $sql .= "wms_supportsld, wms_userlayer, wms_userstyle, wms_remotewfs, uuid) ";
- $sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33)";
+ $sql .= "wms_supportsld, wms_userlayer, wms_userstyle, wms_remotewfs, uuid, inspire_annual_requests) ";
+ $sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34)";
$v = array(
$this->wms_version,
$this->wms_title,
@@ -1764,11 +1773,12 @@
$this->wms_userlayer,
$this->wms_userstyle,
$this->wms_remotewfs,
- $uuid
+ $uuid,
+ $this->inspire_annual_requests
);
$t = array(
's','s','s','s','s','s','s','s','s','s','s','s','s','s','s','s',
- 's','s','s','s','s','s','i','i','i','s','s','s','s','s','s','s','s'
+ 's','s','s','s','s','s','i','i','i','s','s','s','s','s','s','s','s','i'
);
$res = db_prep_query($sql,$v,$t);
if(!$res){
@@ -2629,13 +2639,14 @@
//they don't come from the capabilities!
if (!$updateMetadataOnly) {
//read network_access from database
- $sql = "SELECT wms_network_access, wms_max_imagesize from wms WHERE wms_id = $1 ";
+ $sql = "SELECT wms_network_access, wms_max_imagesize, inspire_annual_requests from wms WHERE wms_id = $1 ";
$v = array($myWMS);
$t = array('i');
$res = db_prep_query($sql,$v,$t);
$row = db_fetch_assoc($res);
$this->wms_network_access = $row["wms_network_access"];
$this->wms_max_imagesize = $row["wms_max_imagesize"];
+ $this->inspire_annual_requests = $row["inspire_annual_requests"];
//$e = new mb_exception("class_wms.php: wms_network_access from database: ".$this->wms_network_access);
}
//if network access is either stored in database nor given thru object, set it too a default value 0
@@ -2669,15 +2680,16 @@
$sql .= "fkey_mb_group_id = $14, ";
$sql .= "wms_auth_type = $17, ";
$sql .= "wms_username = $18, ";
- $sql .= "wms_password = $19 ";
- #$sql .= "uuid = $15 ";
+ $sql .= "wms_password = $19, ";
+ $sql .= "inspire_annual_requests = $20 ";
+ //$sql .= "uuid = $15 ";
$sql .= " WHERE wms_id = $15";
$v = array($this->wms_version,$this->wms_getcapabilities,
$this->wms_getmap,$this->wms_getfeatureinfo,$this->wms_getlegendurl,
$admin->char_encode($this->wms_getcapabilities_doc),$this->wms_upload_url,strtotime("now"),
- $this->wms_supportsld,$this->wms_userlayer,$this->wms_userstyle,$this->wms_remotewfs,$this->wms_network_access, $this->fkey_mb_group_id ,$myWMS, $this->wms_max_imagesize, $authType, $username, $password);
- $t = array('s','s','s','s','s','s','s','i','s','s','s','s','i','i','i','i','s','s','s');
+ $this->wms_supportsld,$this->wms_userlayer,$this->wms_userstyle,$this->wms_remotewfs,$this->wms_network_access, $this->fkey_mb_group_id ,$myWMS, $this->wms_max_imagesize, $authType, $username, $password, $this->inspire_annual_requests);
+ $t = array('s','s','s','s','s','s','s','i','s','s','s','s','i','i','i','i','s','s','s','i');
$res = db_prep_query($sql,$v,$t);
if(!$res){
@@ -2703,6 +2715,7 @@
$sql .= "contactelectronicmailaddress = $15, ";
$sql .= "wms_network_access = $16, ";
$sql .= "wms_max_imagesize = $19, ";
+ //$sql .= "inspire_annual_requests = $20, ";
$sql .= "fkey_mb_group_id = $17 ";
#$sql .= "uuid = $18 ";
$sql .= " WHERE wms_id = $18";
@@ -3254,6 +3267,7 @@
$this->country = $row2["country"];
$this->contactelectronicmailaddress = $row2["contactelectronicmailaddress"];
$this->wms_max_imagesize = $row2["wms_max_imagesize"];
+ $this->inspire_annual_requests = $row2["inspire_annual_requests"];
$count_wms++;
}
@@ -3460,7 +3474,8 @@
$this->fkey_mb_group_id = $row2["fkey_mb_group_id"];
$this->uuid = $row2["uuid"];
$this->wms_max_imagesize = $row2["wms_max_imagesize"];
-
+ $this->inspire_annual_requests = $row2["inspire_annual_requests"];
+
#some default
$this->gui_wms_visible = 1;
$this->gui_wms_opacity = 100;
Modified: trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -18,11 +18,16 @@
require_once(dirname(__FILE__)."/../../core/globalSettings.php");
require_once dirname(__FILE__)."/../classes/class_connector.php";
require_once dirname(__FILE__) . "/../classes/class_Uuid.php";
-$inspireCatId = 11;
+$inspireCatId = 1;
$outputFormat = 'json';
$lang = 'de';
$registratingDepartments = null;
$exportObjects = null;
+if (defined("MAPBENDER_PATH") && MAPBENDER_PATH != '') {
+ $mapbenderUrl = MAPBENDER_PATH;
+} else {
+ $mapbenderUrl = "http://www.geoportal.rlp.de/mapbender";
+}
//check http get parameters
if (isset($_REQUEST["outputFormat"]) & $_REQUEST["outputFormat"] != "") {
$testMatch = $_REQUEST["outputFormat"];
@@ -96,6 +101,7 @@
$sqlTable['title'][] = $row['title'];
$sqlTable['service_id'][] = $row['service_id'];
$sqlTable['service_uuid'][] = $row['service_uuid'];
+ //$sqlTable['service_uuid'][] = "<a href='../php/mod_iso19139ToHtml.php?url=".urlencode($mapbenderUrl."/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["service_uuid"])."'>".$row["service_uuid"]."</a>";
$sqlTable['service_title'][] = $row['inspire_service_title'];
$sqlTable['resource_type'][] = $row['resource_type'];
$sqlTable['resource_id'][] = $row['resource_id'];
@@ -549,7 +555,10 @@
$currentUuid = $sqlTable['uuid'][$i];
$metadataIndex++;
$output['aaData'][$metadataIndex]->detailImage = "<img id=\"expander\" src=\"../img/gnome/stock_zoom-in.png\">";
- $output['aaData'][$metadataIndex]->title = $sqlTable['title'][$i];
+ //$output['aaData'][$metadataIndex]->title = $sqlTable['title'][$i];
+
+ $output['aaData'][$metadataIndex]->title = "<a href=\"../php/mod_iso19139ToHtml.php?url=".urlencode($mapbenderUrl."/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$sqlTable['uuid'][$i])."\">".$sqlTable['title'][$i]."</a>";
+
$output['aaData'][$metadataIndex]->uuid = $sqlTable['uuid'][$i];
$output['aaData'][$metadataIndex]->organization = $sqlTable['organization'][$i];
$insCat = '';
Modified: trunk/mapbender/http/plugins/mb_downloadFeedServer.php
===================================================================
--- trunk/mapbender/http/plugins/mb_downloadFeedServer.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_downloadFeedServer.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -98,7 +98,9 @@
$title = $feedXML->xpath('/defaultns:feed/defaultns:entry/defaultns:title');
//$content = $feedXML->xpath('/defaultns:feed/defaultns:entry/defaultns:content');
$rights = $feedXML->xpath('/defaultns:feed/defaultns:entry/defaultns:rights');
+ $feedRights = $feedXML->xpath('/defaultns:feed/defaultns:rights');
$summary = $feedXML->xpath('/defaultns:feed/defaultns:entry/defaultns:summary');
+ $feedSummary = $feedXML->xpath('/defaultns:feed/defaultns:subtitle');
$date = $feedXML->xpath('/defaultns:feed/defaultns:entry/defaultns:date');
$code = $feedXML->xpath('/defaultns:feed/defaultns:entry/inspire_dls:spatial_dataset_identifier_code');
@@ -117,7 +119,13 @@
$titleArray = (array)$title[$i];
$contentArray = (array)$content[$i];
$rightsArray = (array)$rights[$i];
+ if ($rightsArray[0] == "") {
+ $rightsArray = (array)$feedRights[0];
+ }
$summaryArray = (array)$summary[$i];
+ if ($summaryArray[0] == "") {
+ $summaryArray = (array)$feedSummary[0];
+ }
$dateArray = (array)$date[$i];
$codeArray = (array)$code[$i];
$namespaceArray = (array)$namespace[$i];
Modified: trunk/mapbender/http/plugins/mb_metadata_addon.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_addon.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_metadata_addon.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -207,7 +207,7 @@
<!--<label for="spatial_res_type" class="error"><?php echo _mb("Please set the resolution type!");?>-->
</label>
<label><?php echo _mb("Value of resolution");?><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Value of spatial resolution in [m] or scale denominator");?>'}" src="../img/questionmark.png" alt="" /></label>
- <input class="required" name="spatial_res_value" id="spatial_res_value"/>
+ <input class="required digits" name="spatial_res_value" id="spatial_res_value"/>
</fieldset>
<!-- Dropdown List of CRS which are defined in mapbender.conf. For those CRS the layer extents will be computed by mapbender - this is relevant for INSPIRE.-->
@@ -251,6 +251,14 @@
</fieldset>
</div>
<div id="tabs-7">
+ <fieldset>
+ <legend><?php echo _mb("Relevant area (km<sup>2</sup> - integer)");?><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("INSPIRE Monitoring: Area which is to be covered by the spatial dataset expressed in km<sup>2</sup>.");?>'}" src="../img/questionmark.png" alt="" /></legend>
+ <input class="digits" name="inspire_whole_area" id="inspire_whole_area"/>
+ </fieldset>
+ <fieldset>
+ <legend><?php echo _mb("Actual area (km<sup>2</sup> - integer)");?><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("INSPIRE Monitoring: Area which is covered by the spatial dataset expressed in km<sup>2</sup>.");?>'}" src="../img/questionmark.png" alt="" /></legend>
+ <input class="digits" name="inspire_actual_coverage" id="inspire_actual_coverage"/>
+ </fieldset>
</div>
<div id="tabs-8">
</div>
Modified: trunk/mapbender/http/plugins/mb_metadata_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -70,6 +70,12 @@
<input name="wms_max_imagesize" id="wms_max_imagesize" type="text"/>
<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("The amount of pixels is related to 1 dimension. It is asumed, that the image is square! If your server may serve a picture size of 2000x1000px please set this value to 1000. This value is needed to print bigger maps and allow INSPIRE download services of predefined datasets. If no value is given, the portal asumes a minimum of 1000px!");?>'}" src="../img/questionmark.png" alt="" />
</p>
+ <p>
+ <label for="inspire_annual_requests"><?php echo _mb("Monthly requests to service (Registry)");?>:</label>
+ <input class="digits" name="inspire_annual_requests" id="inspire_annual_requests" type="text"/>
+ <img class="metadata_img" title="<?php echo _mb("INSPIRE Monitoring: Annually requests to View Service");?>" src="../img/misc/inspire_eu_klein.png" alt="" />
+ <img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Annually amount of requests to INSPIRE View Service. This value will be used to build the INSPIRE Monitoring information from mapbender registry!");?>'}" src="../img/questionmark.png" alt="" />
+ </p>
</fieldset>
<fieldset>
<legend><?php echo _mb("WMS Provider Section (OWS)");?></legend>
Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -137,7 +137,8 @@
"wms_timestamp_create",
"wms_network_access",
"wms_max_imagesize",
- "fkey_mb_group_id"
+ "fkey_mb_group_id",
+ "inspire_annual_requests"
);
$resultObj = array();
@@ -470,7 +471,8 @@
"wms_termsofuse",
"wms_network_access",
"wms_max_imagesize",
- "fkey_mb_group_id"
+ "fkey_mb_group_id",
+ "inspire_annual_requests"
);
foreach ($columns as $c) {
if ($c == 'wms_termsofuse' && $data->wms->$c == "0") {
@@ -702,6 +704,8 @@
$resultObj["east"] = $mbMetadata->wgs84Bbox[2];
$resultObj["north"] = $mbMetadata->wgs84Bbox[3];
$resultObj["downloadlink"] = $mbMetadata->downloadLinks[0]; //only the first link!
+ $resultObj["inspire_whole_area"] = $mbMetadata->inspireWholeArea;
+ $resultObj["inspire_actual_coverage"] = $mbMetadata->inspireActualCoverage;
$export2csw = $mbMetadata->export2Csw; //boolean
$resultObj["update_frequency"] = $mbMetadata->updateFrequency; //text
switch ($export2csw) {
@@ -803,6 +807,8 @@
$mbMetadata->inspireCharset = $data->inspire_charset;
$mbMetadata->updateFrequency = $data->update_frequency;
$mbMetadata->downloadLinks = array($data->downloadlink);
+ $mbMetadata->inspireWholeArea = $data->inspire_whole_area;
+ $mbMetadata->inspireActualCoverage = $data->inspire_actual_coverage;
//categories ...
//new for keywords and classifications:
if (isset($data->keywords) && $data->keywords != "") {
@@ -1009,6 +1015,13 @@
if (isset($data->south)) {
$mbMetadata->wgs84Bbox[1] = $data->south;
}
+ $e = new mb_exception("whole area: ".$data->inspire_whole_area);
+ if (isset($data->inspire_whole_area)) {
+ $mbMetadata->inspireWholeArea = $data->inspire_whole_area;
+ }
+ if (isset($data->inspire_actual_coverage)) {
+ $mbMetadata->inspireActualCoverage = $data->inspire_actual_coverage;
+ }
//Check if origin is external and export2csw is activated!
if ($origin == 'external' ) {
//harvest link from location, parse the content for datasetid and push xml into data column
Modified: trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_metadata_wfs_edit.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -69,6 +69,12 @@
<input name="wfs_max_features" id="wfs_max_features" type="text"/>
<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("The amount of features is normally a restriction which is defined in the WFS itself. Cause the value is not part of the ows capabilities, there is a need to store it somewhere else. The default value is 1000. This is a value that may be handled without performance restrictions. If your server has been configured with another value, please alter the default here.");?>'}" src="../img/questionmark.png" alt="" />
</p>
+ <p>
+ <label for="inspire_annual_requests"><?php echo _mb("Annually requests to service (Registry)");?>:</label>
+ <input class="digits" name="inspire_annual_requests" id="inspire_annual_requests" type="text"/>
+ <img class="metadata_img" title="<?php echo _mb("INSPIRE Monitoring: Annually requests to Download Service");?>" src="../img/misc/inspire_eu_klein.png" alt="" />
+ <img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Annually amount of requests to INSPIRE Download Service. This value will be used to build the INSPIRE Monitoring information from mapbender registry!");?>'}" src="../img/questionmark.png" alt="" />
+ </p>
</fieldset>
<fieldset>
<legend><?php echo _mb("WFS Provider Section (OWS)");?></legend>
Modified: trunk/mapbender/http/plugins/mb_metadata_wfs_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_wfs_server.php 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/http/plugins/mb_metadata_wfs_server.php 2013-10-31 08:39:40 UTC (rev 8734)
@@ -72,7 +72,7 @@
individualname, positionname, providername, voice,
facsimile, deliverypoint, city,
administrativearea, postalcode, country, electronicmailaddress,
-wfs_timestamp, wfs_timestamp_create, wfs_network_access, fkey_mb_group_id, wfs_max_features
+wfs_timestamp, wfs_timestamp_create, wfs_network_access, fkey_mb_group_id, wfs_max_features, inspire_annual_requests
FROM wfs WHERE wfs_id = $wfsId;
SQL;
$res = db_query($sql);
@@ -99,6 +99,7 @@
$resultObj['wfs_network_access'] = $row['wfs_network_access'];
$resultObj['wfs_max_features'] = $row['wfs_max_features'];
$resultObj['fkey_mb_group_id'] = $row['fkey_mb_group_id'];
+ $resultObj['inspire_annual_requests'] = $row['inspire_annual_requests'];
$keywordSql = <<<SQL
SELECT DISTINCT keyword FROM keyword, wfs_featuretype_keyword
WHERE keyword_id = fkey_keyword_id AND fkey_featuretype_id IN (
@@ -429,6 +430,7 @@
"wfs_network_access",
"wfs_max_features",
"fkey_mb_group_id",
+ "inspire_annual_requests",
"uuid"
);
foreach ($columns as $c) {
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2013-10-25 10:33:08 UTC (rev 8733)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2013-10-31 08:39:40 UTC (rev 8734)
@@ -3,3 +3,9 @@
ALTER TABLE scheduler ADD COLUMN scheduler_overwrite_categories integer;
-- for those who have already used the scheduler ;-)
UPDATE scheduler SET scheduler_overwrite_categories = 0 WHERE scheduler_overwrite_categories IS NULL;
+-- Drop column: inspire_daily_requests
+ALTER TABLE wms DROP COLUMN inspire_daily_requests;
+ALTER TABLE wms ADD COLUMN inspire_annual_requests bigint;
+ALTER TABLE wfs DROP COLUMN inspire_daily_requests;
+ALTER TABLE wfs ADD COLUMN inspire_annual_requests bigint;
+
More information about the Mapbender_commits
mailing list