[Mapbender-commits] r9418 - in trunk/mapbender: conf http/classes http/php http/plugins resources/db/pgsql/UTF-8/update resources/locale/de_DE/LC_MESSAGES

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 8 07:49:54 PST 2016


Author: armin11
Date: 2016-03-08 07:49:54 -0800 (Tue, 08 Mar 2016)
New Revision: 9418

Modified:
   trunk/mapbender/conf/ckan.conf-dist
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/php/mod_dataISOMetadata.php
   trunk/mapbender/http/plugins/mb_metadata_addon.php
   trunk/mapbender/http/plugins/mb_metadata_edit.js
   trunk/mapbender/http/plugins/mb_metadata_edit.php
   trunk/mapbender/http/plugins/mb_metadata_server.php
   trunk/mapbender/http/plugins/mb_metadata_showMetadataAddon.js
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
   trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
Log:
Some new possibilities for the mapbender metadata management backend

Modified: trunk/mapbender/conf/ckan.conf-dist
===================================================================
--- trunk/mapbender/conf/ckan.conf-dist	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/conf/ckan.conf-dist	2016-03-08 15:49:54 UTC (rev 9418)
@@ -14,6 +14,7 @@
 DEFINE('CKAN_API_CREATE',3);
 DEFINE('OPEN_LICENCES','2,3,4,5');
 DEFINE('CKAN_EXPORT_URL','http://www.geoportal.rlp.de/mapbender/php/mod_exportMapbenderLayer2CkanObjects.php');
+DEFINE('CKAN_ADDITIONAL_KEYWORD','');
 
 $topicCkanCategoryMap = array(
 	"1" => "farming",

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/classes/class_iso19139.php	2016-03-08 15:49:54 UTC (rev 9418)
@@ -72,6 +72,8 @@
 	var $inspireDownload;
 	var $linkAlreadyInDB; //bool
 	var $fileIdentifierAlreadyInDB; //bool
+	var $resourceResponsibleParty; //char
+	var $resourceContactEmail; //char
 
 	function __construct() {
 		//initialize empty iso19139 object
@@ -125,9 +127,8 @@
 		$this->accessConstraints = null;
 		$this->fees = null;
 		$this->licenseJson = null;
-		//following things are not stored directly in the mapbender database but came only from xml
-		$this->ressourceResponsibleParty = null;
-		$this->ressourceContactEmail = null;
+		$this->resourceResponsibleParty = null;
+		$this->resourceContactEmail = null;
 	}
 
 	public function removeGetRecordTag ($xml) {
@@ -427,10 +428,10 @@
 				}
 			}
 			$e = new mb_notice("class_iso19139.php: licenseSourceNote: ".$this->licenseSourceNote." - fees: ".$this->fees);		
-			$this->ressourceResponsibleParty = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString');
-			$this->ressourceResponsibleParty = $this->ressourceResponsibleParty[0];
-			$this->ressourceContactEmail = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString');
-			$this->ressourceContactEmail = $this->ressourceContactEmail[0];
+			$this->resourceResponsibleParty = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString');
+			$this->resourceResponsibleParty = $this->resourceResponsibleParty[0];
+			$this->resourceContactEmail = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString');
+			$this->resourceContactEmail = $this->resourceContactEmail[0];
 			return $this;
 		} else {
 			return false;
@@ -1032,6 +1033,8 @@
 			//$this->linkAlreadyInDB = false;
 			//$this->fileIdentifierAlreadyInDB = false;
 			$this->licenseSourceNote = $row['md_license_source_note'];
+			$this->resourceResponsibleParty = $row['responsible_party_name'];
+			$this->resourceContactEmail = $row['responsible_party_email'];
 			//get relations from other tables:
 			//get categories and keywords
 			//get isoCategories
@@ -1744,7 +1747,7 @@
 		//insert an instance for iso19139 into mapbenders database
 		$e = new mb_exception("class_iso19139.php: insert metadata with title: ".$this->title);
 		$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, inspire_whole_area, inspire_actual_coverage, inspire_download, bounding_geom, transfer_size, fees, md_license_source_note, constraints)  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, $34, $35, $36, $37, $38, $39)
+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, inspire_download, bounding_geom, transfer_size, fees, md_license_source_note, constraints, responsible_party_name, responsible_party_email)  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, $34, $35, $36, $37, $38, $39, $40, $41)
 SQL;
 		$v = array(
 			$this->href,
@@ -1785,13 +1788,15 @@
 			$this->transferSize,
 			$this->fees,
 			$this->licenseSourceNote,
-			$this->accessConstraints
+			$this->accessConstraints,
+			$this->resourceResponsibleParty,
+			$this->resourceContactEmail
 		);
 			//$e = new mb_exception($this->tmpExtentBegin);
 			//$e = new mb_exception($this->tmpExtentEnd);
 			//$e = new mb_exception($this->createDate);
 			//$e = new mb_exception($this->changeDate);
-			$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','s','s','i','POLYGON','d','s','s','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','s','s','i','POLYGON','d','s','s','s','s','s');
 			$res = db_prep_query($sql,$v,$t);
 			return $res;
 	}
@@ -1834,7 +1839,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, inspire_whole_area = $32, inspire_actual_coverage = $33, inspire_download = $34, bounding_geom = $35, transfer_size = $36, fees = $37, md_license_source_note = $38, constraints = $39 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, inspire_download = $34, bounding_geom = $35, transfer_size = $36, fees = $37, md_license_source_note = $38, constraints = $39, responsible_party_name = $40, responsible_party_email = $41 WHERE metadata_id = $19";
 		//$e= new mb_exception("class_iso19139.php: downloadLinks json".$this->jsonEncodeDownloadLinks($this->downloadLinks));
 		//$e= new mb_exception("class_iso19139.php: downloadLinks[0]".$this->downloadLinks[0]);
 		$v = array(
@@ -1877,10 +1882,12 @@
 			$this->transferSize,
 			$this->fees,
 			$this->licenseSourceNote,
-			$this->accessConstraints
+			$this->accessConstraints,
+			$this->resourceResponsibleParty,
+			$this->resourceContactEmail
 		);
 		//$e = new mb_exception("class_iso19139: ".$this->createWktBboxFromArray($this->wgs84Bbox));
-		$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','s','s','i','POLYGON','d','s','s','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','s','s','i','POLYGON','d','s','s','s','s','s');
 		$res = db_prep_query($sql,$v,$t);
 		return $res;
 	}

Modified: trunk/mapbender/http/php/mod_dataISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_dataISOMetadata.php	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/php/mod_dataISOMetadata.php	2016-03-08 15:49:54 UTC (rev 9418)
@@ -880,20 +880,28 @@
 	$role=$iso19139->createElement("gmd:role");
 	$CI_RoleCode=$iso19139->createElement("gmd:CI_RoleCode");
 	$CI_RoleCode->setAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_RoleCode");
-	$CI_RoleCode->setAttribute("codeListValue", "publisher");
-	if (isset($mapbenderMetadata['contactorganization'])) {
-		$resOrgaText = $iso19139->createTextNode($mapbenderMetadata['contactorganization']);
+	$CI_RoleCode->setAttribute("codeListValue", "pointOfContact");
+	if (isset($mb_metadata['responsible_party_name']) && $mb_metadata['responsible_party_name'] !=='') {
+		$resOrgaText = $iso19139->createTextNode($mb_metadata['responsible_party_name']);
+	} else {
+		if (isset($mapbenderMetadata['contactorganization'])) {
+			$resOrgaText = $iso19139->createTextNode($mapbenderMetadata['contactorganization']);
+		}
+		else {
+			$resOrgaText= $iso19139->createTextNode("not yet defined");
+		}
 	}
-	else {
-		$resOrgaText= $iso19139->createTextNode("not yet defined");
+	if (isset($mb_metadata['responsible_party_email']) && $mb_metadata['responsible_party_email'] !=='') {
+		$resMailText = $iso19139->createTextNode($mb_metadata['responsible_party_email']);
+	} else {
+		if (isset($mapbenderMetadata['contactelectronicmailaddress']) && $mapbenderMetadata['contactelectronicmailaddress'] != '') {
+			$resMailText = $iso19139->createTextNode($mapbenderMetadata['contactelectronicmailaddress']);
+		}
+		else {
+			$resMailText = $iso19139->createTextNode("kontakt at geoportal.rlp.de");
+		}
 	}
-	if (isset($mapbenderMetadata['contactelectronicmailaddress']) && $mapbenderMetadata['contactelectronicmailaddress'] != '') {
-		$resMailText = $iso19139->createTextNode($mapbenderMetadata['contactelectronicmailaddress']);
-	}
-	else {
-		$resMailText = $iso19139->createTextNode("kontakt at geoportal.rlp.de");
-	}
-	$resRoleText = $iso19139->createTextNode("publisher");
+	$resRoleText = $iso19139->createTextNode("pointOfContact");
 	$orgaName_cs->appendChild($resOrgaText);
 	$organisationName->appendChild($orgaName_cs);
 	$CI_ResponsibleParty->appendChild($organisationName);

Modified: trunk/mapbender/http/plugins/mb_metadata_addon.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_addon.php	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/plugins/mb_metadata_addon.php	2016-03-08 15:49:54 UTC (rev 9418)
@@ -68,7 +68,8 @@
 			<li><a href="#tabs-5"><?php echo _mb("Spatial Extent");?></a></li>
 			<li><a href="#tabs-6"><?php echo _mb("Download");?></a></li>
 			<li><a href="#tabs-7"><?php echo _mb("Covering Area");?></a></li>
-			<li><a href="#tabs-8"><?php echo _mb("Licences/Constraints");?></a></li>
+			<li><a href="#tabs-8"><?php echo _mb("Licenses/Constraints");?></a></li>
+			<li><a href="#tabs-9"><?php echo _mb("Responsible Party");?></a></li>
 		</ul>
 		<!--<legend><?php echo _mb("Simple metadata editor");?></legend>-->
 		<div id="tabs-1">
@@ -133,7 +134,7 @@
 	echo displayCategories($sql);
 ?>
 			</select>
-			<img id="resetIsoTopicCats" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
+			<img id="resetIsoTopicCatsMd" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
 		</p>
 		<p>
 		    <label for="md_inspire_category_id" class="label_classification"><?php echo _mb("INSPIRE Category");?>:</label>
@@ -144,7 +145,7 @@
 	echo displayCategories($sql);
 ?>
 			</select>
-			<img id="resetInspireCats" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
+			<img id="resetInspireCatsMd" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
 		</p>
 		<p>
 		    <label for="md_custom_category_id" class="label_classification"><?php echo _mb("Custom Category");?>:</label>
@@ -155,7 +156,7 @@
 	echo displayCategories($sql);
 ?>
 			</select>
-			<img id="resetCustomCats" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
+			<img id="resetCustomCatsMd" title="<?php echo _mb("Reset selection");?>" src="../img/cross.png" style="cursor:pointer;"/>
 		</p>
 	</fieldset>
 	</div>
@@ -204,7 +205,7 @@
 		
 		<fieldset id="consistance">
 		<legend><?php echo _mb("Topological Consistency");?><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Correctness of the explicitly encoded topological characteristics of the data set as described by the scope. This element is mandatory only if the data set includes types from the Generic Network Model and does not assure centreline topology (connectivity of centrelines) for the network.");?>'}" src="../img/questionmark.png" alt="" /></legend>
-		<input name="inspire_top_consistence" id="inspire_top_consistence" type="checkbox" checked="checked"/>
+		<input name="inspire_top_consistence" id="inspire_top_consistence" type="checkbox"/>
 		</fieldset>
 	
 	</div>
@@ -262,7 +263,7 @@
 	<div id="tabs-8">
 	<p>
 		<label for="fees_md"><?php echo _mb("Conditions applying to access and use");?>:</label>
-    	<input name="fees_md" id="fees_md"/><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("INSPIRE 8.1: conditions applying to access and use");?>'}" src="../img/questionmark.png" alt="" />
+    		<input name="fees_md" id="fees_md"/><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("INSPIRE 8.1: conditions applying to access and use");?>'}" src="../img/questionmark.png" alt="" />
 	</p>
 	<p>
 		<label for="accessconstraints_md"><?php echo _mb("Limitations on public access");?>:</label>
@@ -288,16 +289,28 @@
 			</select>
     			<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Selection of predefined licences.");?>'}" src="../img/questionmark.png" alt="" />
 		</p>
-	<p>
+	<p id="license_info_md">
 	<img id="licence_symbol_md"> <a id='licence_descriptionlink_md' target='_blank'><a/> <img id="open_symbol_md">
 	</p>
-	<p>
+	<p id="license_source_md">
 		<label for="md_license_source_note"><?php echo _mb("Source note if license require it");?>:</label>
       		<input name="md_license_source_note" id="md_license_source_note" type="text"/>
 		<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Source note that should be mentioned if such an information is required by the license.");?>'}" src="../img/questionmark.png" alt="" />
 	</p>
 	<p>
 	</div>
+	<div id="tabs-9">
+		<label for="check_overwrite_responsible_party"><?php echo _mb("Overwrite responsible party information");?>:</label>
+		<input name="check_overwrite_responsible_party" id="check_overwrite_responsible_party" type="checkbox"/><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("INSPIRE 9.1: Information about the responsible party (name, email). This is normally pulled directly from the mapbender registry on the fly. If you want to give other information, you can do it here!");?>'}" src="../img/questionmark.png" alt="" />
+		<p>
+		<label id="label_responsible_party_name" for="responsible_party_name"><?php echo _mb("Responsible party name");?>:</label>
+      		<input name="responsible_party_name" id="responsible_party_name" type="text"/>
+		</p>
+		<p>
+		<label id="label_responsible_party_email"  for="responsible_party_email"><?php echo _mb("Responsible party email");?>:</label>
+      		<input name="responsible_party_email" id="responsible_party_email" type="text"/>
+		</p>
+	</div>
 	</div><!--accordion-->
 	</div><!--demo-->
 	</fieldset>

Modified: trunk/mapbender/http/plugins/mb_metadata_edit.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.js	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.js	2016-03-08 15:49:54 UTC (rev 9418)
@@ -128,14 +128,23 @@
 					$('#licence_descriptionlink').attr('href', obj.descriptionlink);
 					if (obj.isopen == 1) {
 						$('#open_symbol').attr('src', '../img/od_80x15_blue.png');
+						$('#open_symbol').css("display","block");
 					} else {
 						$('#open_symbol').attr('src', '');
+						$('#open_symbol').css("display","none");
 					}
+					if (obj.source_required == 1) {
+						$('#license_source').css("display","block");
+					} else {
+						$('#license_source').css("display","none");
+					}
+					$('#licence_info').css('display', 'block');
 				} else {
 					$('#licence_symbol').attr('src', '');
 					$('#licence_descriptionlink').attr('href', '');
 					$('#licence_descriptionlink').text('');
 					$('#open_symbol').attr('src', '');
+					$('#licence_info').css('display', 'none');
 				}
 			}
 		});

Modified: trunk/mapbender/http/plugins/mb_metadata_edit.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_edit.php	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/plugins/mb_metadata_edit.php	2016-03-08 15:49:54 UTC (rev 9418)
@@ -58,10 +58,10 @@
 		</select>
     	<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Selection of predefined licences.");?>'}" src="../img/questionmark.png" alt="" />
 	</p>
-	<p>
-	<img id="licence_symbol"> <a id='licence_descriptionlink' target='_blank'><a/> <img id="open_symbol">
+	<p id="license_info">
+		<img id="licence_symbol"> <a id='licence_descriptionlink' target='_blank'><a/> <img id="open_symbol">
 	</p>
-	<p>
+	<p id="license_source">
 		<label for="wms_license_source_note"><?php echo _mb("Source note if license require it (Registry)");?>:</label>
       		<input name="wms_license_source_note" id="wms_license_source_note" type="text"/>
 		<img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Source note that should be mentioned if such an information is required by the license.");?>'}" src="../img/questionmark.png" alt="" />

Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php	2016-03-08 15:49:54 UTC (rev 9418)
@@ -742,7 +742,7 @@
 	case "getLicenceInformation" :
 		$termsofuseId = $ajaxResponse->getParameter("id");
 		$sql = <<<SQL
-SELECT name, symbollink, description, descriptionlink, isopen FROM termsofuse WHERE termsofuse_id = $1
+SELECT name, symbollink, description, descriptionlink, isopen, source_required FROM termsofuse WHERE termsofuse_id = $1
 SQL;
 		$v = array($termsofuseId);
 		$t = array('i');
@@ -756,6 +756,12 @@
 			$resultObj["description"] = $row["description"];
 			$resultObj["descriptionlink"] = $row["descriptionlink"];
 			$resultObj["isopen"] = $row["isopen"];
+			$resultObj["source_required"] = $row["source_required"];
+			if ($resultObj["source_required"] !== 't') {
+				$resultObj["source_required"] = 0;
+			} else {
+				$resultObj["source_required"] = 1;
+			}
 			$ajaxResponse->setResult($resultObj);
 			$ajaxResponse->setSuccess(true);
 		} else {
@@ -867,6 +873,12 @@
 				}
 			}
 			$resultObj["keywords"] = implode(",",$resultObj["keywords"]);
+			//responsible party information
+			$resultObj["responsible_party_name"] = $mbMetadata->resourceResponsibleParty;
+			$resultObj["responsible_party_email"] = $mbMetadata->resourceContactEmail;
+			if ($resultObj["responsible_party_name"] != null || $resultObj["responsible_party_email"] != null ) {
+				$resultObj["check_overwrite_responsible_party"] = true;
+			}
 			//give back result:
 			$ajaxResponse->setResult($resultObj);
 			$ajaxResponse->setSuccess(true);
@@ -973,12 +985,18 @@
 			}
 			if (isset($data->md_md_topic_category_id)) {
 				$mbMetadata->isoCategories = $data->md_md_topic_category_id;
+			} else {
+				$mbMetadata->isoCategories = array();
 			}
 			if (isset($data->md_inspire_category_id)) {
 				$mbMetadata->inspireCategories = $data->md_inspire_category_id;
+			} else {
+				$mbMetadata->inspireCategories = array();
 			}
 			if (isset($data->md_custom_category_id)) {
 				$mbMetadata->customCategories = $data->md_custom_category_id;
+			} else {
+				$mbMetadata->customCategories = array();
 			}
 			//use information from bbox!
 			if (isset($data->west)) {
@@ -999,7 +1017,7 @@
 			if (isset($data->accessconstraints_md)) {
 				$mbMetadata->accessConstraints = $data->accessconstraints_md;
 			}
-			$e = new mb_exception($data->md_termsofuse);
+			//$e = new mb_exception($data->md_termsofuse);
 			if (isset($data->md_termsofuse) && $data->md_termsofuse !=='0' && $data->md_termsofuse !== 0) {
 				$mbMetadata->termsOfUseRef = $data->md_termsofuse;
 			} else {
@@ -1008,6 +1026,22 @@
 			if (isset($data->md_license_source_note)) {
 				$mbMetadata->licenseSourceNote = $data->md_license_source_note;
 			}
+			//overwrite responsible party info if wished
+			if ($data->check_overwrite_responsible_party) {
+				if ($data->responsible_party_name !== "") {
+					$mbMetadata->resourceResponsibleParty = $data->responsible_party_name;
+				} else {
+					$mbMetadata->resourceResponsibleParty = "Empty value for responsible party name!";
+				}
+				if ($data->responsible_party_email !== "") {
+					$mbMetadata->resourceContactEmail = $data->responsible_party_email;
+				} else {
+					$mbMetadata->resourceContactEmail = "Empty value for responsible party email!";
+				}
+			} else {
+				$mbMetadata->resourceResponsibleParty = null;
+				$mbMetadata->resourceContactEmail = null;
+			}
 			//try to update metadata object (only mb_metadata)
 			$res = $mbMetadata->updateMetadataById($metadataId);
 			if (!$res) {
@@ -1211,7 +1245,22 @@
 		if (isset($data->md_termsofuse) && $data->md_termsofuse !=='0') {
 			$mbMetadata->termsOfUseRef = $data->md_termsofuse;
 		}
-
+		//overwrite responsible party info if wished
+		if ($data->check_overwrite_responsible_party) {
+			if ($data->responsible_party_name !== "") {
+				$mbMetadata->resourceResponsibleParty = $data->responsible_party_name;
+			} else {
+				$mbMetadata->resourceResponsibleParty = "Empty value for responsible party name!";
+			}
+			if ($data->responsible_party_email !== "") {
+				$mbMetadata->resourceContactEmail = $data->responsible_party_email;
+			} else {
+				$mbMetadata->resourceContactEmail = "Empty value for responsible party email!";
+			}
+		} else {
+			$mbMetadata->resourceResponsibleParty = null;
+			$mbMetadata->resourceContactEmail = null;
+		}
 		//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_showMetadataAddon.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_showMetadataAddon.js	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/http/plugins/mb_metadata_showMetadataAddon.js	2016-03-08 15:49:54 UTC (rev 9418)
@@ -145,6 +145,12 @@
 					//alert(JSON.stringify(obj));
 					that.fillLicence(obj.md_termsofuse);
 				}
+				if ($("#check_overwrite_responsible_party").is(":checked")) {
+					$('#label_responsible_party_name').css('display', 'block');
+					$('#responsible_party_name').css('display', 'block');
+					$('#label_responsible_party_email').css('display', 'block');
+					$('#responsible_party_email').css('display', 'block');
+				}
 
 			}
 		});
@@ -171,14 +177,23 @@
 					$('#licence_descriptionlink_md').attr('href', obj.descriptionlink);
 					if (obj.isopen == 1) {
 						$('#open_symbol_md').attr('src', '../img/od_80x15_blue.png');
+						$('#open_symbol_md').css("display","block");
 					} else {
 						$('#open_symbol_md').attr('src', '');
+						$('#open_symbol_md').css("display","none");
 					}
+					if (obj.source_required == 1) {
+						$('#license_source_md').css("display","block");
+					} else {
+						$('#license_source_md').css("display","none");
+					}
+					$('#licence_info_md').css('display', 'block');
 				} else {
 					$('#licence_symbol_md').attr('src', '');
 					$('#licence_descriptionlink_md').attr('href', '');
 					$('#licence_descriptionlink_md').text('');
 					$('#open_symbol_md').attr('src', '');
+					$('#licence_info_md').css('display', 'none');
 				}
 			}
 		});
@@ -368,6 +383,18 @@
 		that.fillLayerForm(layerId);
 	}
 
+ 	enableResetButtonMd = function() {
+        	$("#resetIsoTopicCatsMd").click(function() {
+            		$("#md_md_topic_category_id option").removeAttr("selected");
+        	});
+        	$("#resetCustomCatsMd").click(function() {
+            		$("#md_custom_category_id option").removeAttr("selected");
+        	});
+       	 	$("#resetInspireCatsMd").click(function() {
+            		$("#md_inspire_category_id option").removeAttr("selected");
+        	});
+   	}
+
 	initUploadGmlForm = function (metadataId) {
 		//$metadataAddonPopup.dialog("close");
 		//don't show possibility if metadata was not created before - only afterwards!
@@ -431,7 +458,25 @@
 			$("#delete_existing_polygon").click(function () {
 				deleteGmlPolygon(metadataId);
 			});
-			
+			$('#label_responsible_party_name').css('display', 'none');
+			$('#responsible_party_name').css('display', 'none');
+			$('#label_responsible_party_email').css('display', 'none');
+			$('#responsible_party_email').css('display', 'none');
+			$("#check_overwrite_responsible_party").change(function () {
+				if ($("#check_overwrite_responsible_party").is(":checked")) {
+					$('#label_responsible_party_name').css('display', 'block');
+					$('#responsible_party_name').css('display', 'block');
+					$('#label_responsible_party_email').css('display', 'block');
+					$('#responsible_party_email').css('display', 'block');
+				} else {
+					$('#label_responsible_party_name').css('display', 'none');
+					$('#responsible_party_name').css('display', 'none');
+					$('#label_responsible_party_email').css('display', 'none');
+					$('#responsible_party_email').css('display', 'none');
+				}
+			});
+			//enable reset buttons for categories
+			enableResetButtonMd();
 			//alert($("#uploadImage").attr('onclick')); //there has been a bigger problem when setting an onclick attribut with jquery :-(
 			//TODO: make the fields resizable 
 			//$( "#abstract" ).resizable({ minWidth: 75 });

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	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2016-03-08 15:49:54 UTC (rev 9418)
@@ -889,5 +889,24 @@
   FOR EACH ROW
   EXECUTE PROCEDURE update_wfs_timestamp_column();
 
+-- Column: source_required
 
+-- ALTER TABLE termsofuse DROP COLUMN source_required;
 
+ALTER TABLE termsofuse ADD COLUMN source_required boolean;
+ALTER TABLE termsofuse ALTER COLUMN source_required SET DEFAULT false;
+
+-- Column: responsible_party_name
+
+-- ALTER TABLE mb_metadata DROP COLUMN responsible_party_name;
+
+ALTER TABLE mb_metadata ADD COLUMN responsible_party_name character varying(255) DEFAULT null;
+
+-- Column: responsible_party_email
+
+-- ALTER TABLE mb_metadata DROP COLUMN responsible_party_email;
+
+ALTER TABLE mb_metadata ADD COLUMN responsible_party_email character varying(255) DEFAULT null;
+
+
+

Modified: trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po
===================================================================
--- trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po	2016-03-07 13:50:24 UTC (rev 9417)
+++ trunk/mapbender/resources/locale/de_DE/LC_MESSAGES/Mapbender.po	2016-03-08 15:49:54 UTC (rev 9418)
@@ -1738,27 +1738,27 @@
 #: ../http/plugins/mb_metadata_wfs_edit.php:15
 #: ../http/plugins/mb_metadata_wfs_edit.php:16
 msgid "WFS Title (OWS)"
-msgstr ""
+msgstr "WFS Titel (OWS)"
 
 #: ../http/plugins/mb_metadata_wfs_edit.php:20
 #: ../http/plugins/mb_metadata_wfs_edit.php:21
 msgid "WFS Abstract (OWS)"
-msgstr ""
+msgstr "WFS Beschreibung (OWS)"
 
 #: ../http/plugins/mb_metadata_wfs_edit.php:25
 #: ../http/plugins/mb_metadata_wfs_edit.php:26
 msgid "WFS Keywords (OWS)"
-msgstr ""
+msgstr "WFS Suchbegriffe (OWS)"
 
 #: ../http/plugins/mb_metadata_wfs_edit.php:30
 #: ../http/plugins/mb_metadata_wfs_edit.php:31
 msgid "WFS Fees (OWS)"
-msgstr ""
+msgstr "WFS Kosten (OWS)"
 
 #: ../http/plugins/mb_metadata_wfs_edit.php:35
 #: ../http/plugins/mb_metadata_wfs_edit.php:36
 msgid "WFS AccessConstraints (OWS)"
-msgstr ""
+msgstr "WFS Zugriffsbeschränkungen (OWS)"
 
 #: ../http/plugins/mb_metadata_wfs_edit.php:48
 #: ../http/plugins/mb_metadata_wfs_edit.php:49
@@ -2215,7 +2215,7 @@
 
 #: ../http/javascripts/mod_poi.php:125
 msgid "Invalid configuration file"
-msgstr ""
+msgstr "Fehlerhafte Konfigurationsdatei"
 
 #: ../http/javascripts/mod_searchCSW_ajax.php:363
 msgid "Record ID"
@@ -2231,7 +2231,7 @@
 
 #: ../lib/ajax.php:134
 msgid "Fatal error: Could not detect ID of AJAX request."
-msgstr ""
+msgstr "Fataler Fehler: Konnte ID des AJAX calls nicht zuordnen."
 
 #: ../lib/ajax.php:144
 msgid "The session has expired. Please log in again."
@@ -3028,7 +3028,7 @@
 msgstr "Andere Zugangsbeschränkungen"
 
 msgid "Responsible party name"
-msgstr "Name der veantwortlichen Stelle"
+msgstr "Name der verantwortlichen Stelle"
 
 msgid "Responsible party email"
 msgstr "E-Mail Adresse der verantwortlichen Stelle"
@@ -3167,17 +3167,17 @@
 #: ../http/plugins/mb_metadata_edit.php:34
 #: ../http/plugins/mb_metadata_wfs_edit.php:33
 msgid "INSPIRE 8.1: conditions applying to access and use"
-msgstr ""
+msgstr "INSPIRE 8.1: Bedingungen für Zugriff und Nutzung"
 
 #: ../http/plugins/mb_metadata_edit.php:39
 #: ../http/plugins/mb_metadata_wfs_edit.php:38
 msgid "INSPIRE 8.2: limitations on public access"
-msgstr ""
+msgstr "INSPIRE 8.2: Beschränkungen des öffentlichen Zugangs"
 
 #: ../http/plugins/mb_metadata_edit.php:62
 #: ../http/plugins/mb_metadata_wfs_edit.php:61
 msgid "Restricted Network Access (Registry)"
-msgstr ""
+msgstr "Verfügbarkeit nur in ausgewählten Netzen (Registry)"
 
 #: ../http/plugins/mb_metadata_edit.php:87
 #: ../http/plugins/mb_metadata_wfs_edit.php:86
@@ -3338,16 +3338,12 @@
 
 #: ../http/plugins/mb_metadata_server.php:962
 msgid "Reading file "
-msgstr ""
+msgstr "Lese Datei "
 
 #: ../http/plugins/mb_metadata_server.php:969
 msgid "Parsing ISO19139 XML failed!"
-msgstr ""
+msgstr "Fehler beim Parsen des ISO19139 XML!"
 
-#: ../http/plugins/mb_metadata_wfs_edit.php:58
-msgid "Selection of predefined licences."
-msgstr ""
-
 #: ../http/plugins/mb_metadata_wmcPreview.php:53
 msgid ""
 "Preview saved - but following service urls are not included cause the "
@@ -3368,7 +3364,7 @@
 
 #: ../http/javascripts/mod_wfsLayerObj_conf.js:36
 msgid "Cancel"
-msgstr ""
+msgstr "Abbruch"
 
 #: ../http/php/mod_showMetadata.php
 msgid "Kind of resource"
@@ -4010,3 +4006,96 @@
 msgid " tile(s)"
 msgstr " Teil(e)"
 
+msgid "Identification"
+msgstr "Identifikation"
+
+msgid "Covering Area"
+msgstr "Flächendeckung"
+
+msgid "Licenses/Constraints"
+msgstr "Lizenzen/Beschränkungen"
+
+msgid "Bounding Box"
+msgstr "Begrenzender Ausschnitt"
+
+msgid "West [decimal degrees]"
+msgstr "West [Dezimalgrad]"
+
+msgid "South [decimal degrees]"
+msgstr "Süd [Dezimalgrad]"
+
+msgid "East [decimal degrees]"
+msgstr "Ost [Dezimalgrad]"
+
+msgid "North [decimal degrees]"
+msgstr "Nord [Dezimalgrad]"
+
+msgid "User defined region"
+msgstr "Nähere regionale Abgrenzung"
+
+msgid "Upload a surronding geometry for this dataset"
+msgstr "Hochladen einer Umringsgeometrie"
+
+msgid "Extent on map"
+msgstr "Kartenanzeige der Ausdehung"
+
+msgid "Here you can see the extent and a possibly given surrounding polygon on an overview map."
+msgstr "Hier können sie die Ausdehung und eine mögliche polygonale Abgrenzung auf einer Übersichtskarte sehen."
+
+msgid "You can define your own bounding box or region if you upload an gml geometry object. Only bbox and polygons are accepted at the moment!"
+msgstr "Sie können einen eigenen begrenzenden Ausschnitt oder eine polygonale Abgrenznung hinterlegen (hochladen). Derzeit werden nur BBOX und (MULTI)POLYGON unterstützt."
+
+msgid "Help for geometry upload possibility"
+msgstr "Hilfe für die Geometrieupload Funktion"
+
+msgid "Preview for Extent - if available"
+msgstr "Vorschau für Abgrenzung - wenn verfügbar"
+
+msgid "This is the bounding box of the dataset given in geographic coordinates in WGS84 (EPSG:4326). The bounding box may be inherited by the calling service contents bounding box (layer/featuretype) or defined by the registrating person later on."
+msgstr "Abgrenzung des Datensatzes in geographischen Koordinaten (WGS84, EPSG:4326). Die initialen Werte werden von den jeweiligen Informationen des Dienstes (Layer/Featuretype) geerbt."
+
+msgid "Download link to dataset"
+msgstr "Link um den Datensatz herunterzuladen"
+
+msgid "Enable INSPIRE DLS"
+msgstr "Aktivieren des INSPIRE DLS"
+
+msgid "Activating this checkbox will enable the generation of an INSPIRE DLS based on ATOM feed for the given link!"
+msgstr "Das Setzen des Hakens aktiviert die Synthetisierung eines INSPIRE DLS auf ATOM Feed Basis für den angegebenen Link."
+
+msgid "Relevant area (km<sup>2</sup> - integer)"
+msgstr "Gesamtfläche (km<sup>2</sup> - Ganzzahl)"
+
+msgid "Actual area (km<sup>2</sup> - integer)"
+msgstr "Umfasste Fläche (km<sup>2</sup> - Ganzzahl)"
+
+msgid "INSPIRE Monitoring: Area which is to be covered by the spatial dataset expressed in km<sup>2</sup>."
+msgstr "INSPIRE Monitoring: Fläche, die prinzipiell vom Datensatz abgedeckt werden soll in km<sup>2</sup>."
+
+msgid "INSPIRE Monitoring: Area which is covered by the spatial dataset expressed in km<sup>2</sup>."
+msgstr "INSPIRE Monitoring: Fläche, die derzeit real vom Datensatz abgedeckt wird km<sup>2</sup>."
+
+msgid "Limitations on public access"
+msgstr "Beschränkungen des öffentlichen Zugangs"
+
+msgid "MD predefined license"
+msgstr "Vordefinierte Lizenzen auf Datensatzbeschreibungsebene"
+
+msgid "Source note if license require it"
+msgstr "Quellvermerk, wenn von Lizenz gefordert"
+
+msgid "Selection of predefined licences."
+msgstr "Auswahl aus vordefinierten Lizenzen (Registry)"
+
+msgid "Source note that should be mentioned if such an information is required by the license."
+msgstr "Quellvermerk der angegeben soll, wenn es die jeweilige Lizenz fordert."
+
+msgid "Responsible Party"
+msgstr "Zuständige Stelle"
+
+msgid "Overwrite responsible party information"
+msgstr "Überschreiben der Angaben zur zuständigen Stelle"
+
+msgid "INSPIRE 9.1: Information about the responsible party (name, email). This is normally pulled directly from the mapbender registry on the fly. If you want to give other information, you can do it here!"
+msgstr "INSPIRE 9.1: Information zur zuständigen Stelle (Name, Email). Normalerweise wird diese Information dynamisch aus der Geoportal Datenbank erzeugt. Wenn sie andere Informationen verwenden wollen, können sie diese hier angeben."
+



More information about the Mapbender_commits mailing list