[Mapbender-commits] r7892 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jun 29 10:04:21 EDT 2011


Author: armin11
Date: 2011-06-29 07:04:21 -0700 (Wed, 29 Jun 2011)
New Revision: 7892

Modified:
   trunk/mapbender/http/geoportal/mod_readOpenSearchResults.php
   trunk/mapbender/http/geoportal/mod_readOpenSearchResultsDetail.php
Log:
Bugfix. First version which uses the portalu csw getrecordbyid request. Not yet ready!

Modified: trunk/mapbender/http/geoportal/mod_readOpenSearchResults.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readOpenSearchResults.php	2011-06-29 08:42:16 UTC (rev 7891)
+++ trunk/mapbender/http/geoportal/mod_readOpenSearchResults.php	2011-06-29 14:04:21 UTC (rev 7892)
@@ -342,7 +342,7 @@
 				
 
 
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=html"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=html"));
 
 				fwrite($os_catalogs_file_handle,"</catalogtitlelink>\n");
 				#Tags for objecttitle and abstract
@@ -396,10 +396,10 @@
 				}
 				#fwrite($os_catalogs_file_handle,"");
 				fwrite($os_catalogs_file_handle,"<iso19139url>");
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=iso19139"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=iso19139"));
 				fwrite($os_catalogs_file_handle,"</iso19139url>\n");
 				fwrite($os_catalogs_file_handle,"<inspireurl>");
-				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&mdtype=inspire"));
+				fwrite($os_catalogs_file_handle,urlencode($openSearchWrapperDetail."?osid=".$os_list[$i_si] ['id']."&plugid=".$plugid."&docid=".$docid."&docuuid=".$docuuid."&mdtype=inspire"));
 				fwrite($os_catalogs_file_handle,"</inspireurl>\n");
 				#end of resultlist
 				fwrite($os_catalogs_file_handle,"</result>\n");

Modified: trunk/mapbender/http/geoportal/mod_readOpenSearchResultsDetail.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readOpenSearchResultsDetail.php	2011-06-29 08:42:16 UTC (rev 7891)
+++ trunk/mapbender/http/geoportal/mod_readOpenSearchResultsDetail.php	2011-06-29 14:04:21 UTC (rev 7892)
@@ -3,18 +3,8 @@
 require_once(dirname(__FILE__)."/../../core/globalSettings.php");
 $con = db_connect(DBSERVER,OWNER,PW);
 db_select_db(DB,$con);
-#function logit($text){
-	 	#if($h = fopen("/home/armin/Desktop/opensearch_log.txt","a")){
-				#	$content = $text .chr(13).chr(10);
-				#	if(!fwrite($h,$content)){
-				#		#exit;
-				#	}
-				#	fclose($h);
-				#}
-	# }
-
-#require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 require_once(dirname(__FILE__)."/../classes/class_connector.php");
+
 function display_text($string) {
     $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
     $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
@@ -22,493 +12,45 @@
     return $string;
 }  
 
+$md_ident = array(
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "unique resource identifier",
+		inspiremandatory => "true",
+		iso_name => "fileIdentifier",
+		html => _mb("Metadata file identifier"),
+		value => "",
+		gdescription => "Ein Wert, durch den die Ressource eindeutig gekennzeichnet wird. Der Wertebereich dieses Metadatenelements ist ein obligatorischer Zeichenkettencode, der in der Regel vom Eigentümer der Daten zugeordnet wird, und ein Zeichenketten-Namensraum, der das Umfeld des Bezeichnercodes eindeutig bestimmt (z. B. den Eigentümer der Daten). "
+	),
+	array(	ibus => "abstract",
+		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString",
+		iso19139explode => "false" ,
+		inspire => "resource abstract",
+		inspiremandatory => "true",
+		iso_name => "description",
+		html => _mb("Metadata description"),
+		value => "",
+		gdescription => "Description"
+	)
+);
 
-#***
 
-	$md_ident=array(
-		array(	ibus => "object_node.fk_obj_uuid",
-			iso19139 => "MD_Metadata.parentIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Identifikator des übergeordneten Objektes",
-			gdescription => ""),
-		array(	ibus => "t01_object",
-			iso19139 => "MD_Metadata.fileIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objectidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_name",
-			iso19139 => "MD_Metadata.identificationInfo?",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objektname",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_class",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "ID der Objektklasse",
-			gdescription => "Relevant sind 1 und 3"),
-		array(	ibus => "t01_object.info_note",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.purpose",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Herstellungszweck",
-			gdescription => "Zusatzinformation"),
-		array(	ibus => "t01_object.loc_descr",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.description",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Raumbezug:Erläuterung",
-			gdescription => "Raumbezug"),
-		array(	ibus => "t01_object.time_from",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_Extent.temporalElement.EX_TemporalExtent.....",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Zeitbezug des Dateninhalts von:",
-			gdescription => "Zeitbezug"),
-		array(	ibus => "t01_object.time_to",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_Extent.temporalElement.EX_TemporalExtent.....",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Zeitbezug des Dateninhalts bis:",
-			gdescription => "Zeitbezug"),
-	array(	ibus => "t011_obj_literatur.base",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.descriptiveKeywords.MD_Keywords.keyword",
-			iso19139explode => "true" ,
-			inspire => "B 3.1 Keyword value",
-			inspiremandatory => "true",
-			iso_name => "descriptive Keywords",
-			html => "INSPIRE Thema",
-			gdescription => ""),
-
-
-
-		array(	ibus => "t04_search.searchterm",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.descriptiveKeywords.MD_Keywords.keyword",
-			iso19139explode => "true" ,
-			inspire => "B 3.1 Keyword value",
-			inspiremandatory => "true",
-			iso_name => "descriptive Keywords",
-			html => "Suchbegriffe",
-			gdescription => ""),
-		array(	ibus => "title",
-			iso19139 => "identificationInfo[1]/*/citation/*/title",
-			iso19139explode => "false" ,
-			inspire => "B 1.1 Resource title",
-			inspiremandatory => "true",
-			iso_name => "Title",
-			html => "Titel",
-			gdescription => ""),
-
-		array(	ibus => "t0113_dataset_reference.reference_date",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.2 Date of publication",
-			inspiremandatory => "true",
-			iso_name => "Date of publication",
-			html => "Veröffentlichungsdatum",
-			gdescription => ""),
-
-		array(	ibus => "t01_object.time_status",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.3 Date of revision",
-			inspiremandatory => "true",
-			iso_name => "Date of revision",
-			html => "Datum der letzten Überarbeitung",
-			gdescription => ""),
-
-		array(	ibus => "txx", #to find
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 5.4 Date of creation",
-			inspiremandatory => "true",
-			iso_name => "Date of creation",
-			html => "Erzeugungsdatum",
-			gdescription => ""),
-
-		array(	ibus => "summary",
-			iso19139 => "identificationInfo[1]/*/abstract",
-			iso19139explode => "false" ,
-			inspire => "B 1.2 Resource abstract",
-			inspiremandatory => "true",
-			iso_name => "abstract",
-			html => "Zusammenfassung",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv.type",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceType",
-			iso19139explode => "false" ,
-			inspire => "B 2.2 Spatial data service type",
-			inspiremandatory => "true",
-			iso_name => "ServiceType",
-			html => "Typ des Dienstes",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv_version.version",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceTypeVersion",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Service Type Version",
-			html => "Version des Dienstes",
-			gdescription => ""),
-		array(	ibus => "x1",
-	//array(	ibus => "spatial_ref_value.x1",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.WestBoundLongitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - western longitude",
-			inspiremandatory => "true",
-			iso_name => "WestBoundLongitude",
-			html => "Westliche Begrenzung (geographische Länge)",
-			gdescription => ""),
-		array(	ibus => "y1",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.SouthBoundLatitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - southern latitude",
-			inspiremandatory => "true",
-			iso_name => "SouthBoundLatitude",
-			html => "Südliche Begrenzung (geographische Breite)",
-			gdescription => ""),
-		array(	ibus => "x2",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.EastBoundLongitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - eastern longitude",
-			inspiremandatory => "true",
-			iso_name => "EastBoundLongitude",
-			html => "Östliche Begrenzung (geographische Länge)",
-			gdescription => ""),
-		array(	ibus => "y2",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.extent.EX_GeographicBoundingBox.NorthBoundLatitude",
-			iso19139explode => "false" ,
-			inspire => "B 4.1 Geographic bounding box - northern latitude",
-			inspiremandatory => "true",
-			iso_name => "NorthBoundLatitude",
-			html => "Nördliche Begrenzung (geographische Breite)",
-			gdescription => ""),
-		array(	ibus => "t01_object.metadata_language",
-			iso19139 => "MD_Metadata.language",
-			iso19139explode => "false" ,
-			inspire => "B 10.3 Metadata language",
-			inspiremandatory => "true",
-			iso_name => "Metadata language",
-			html => "Sprache des Metadatensatzes",
-			gdescription => ""),
-		array(	ibus => "summary",
-			iso19139 => "MD_Metadata.identificationInfo.MD_Identification.citation.CI_Citation.alternateTitle",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Dataset alternate title",
-			html => "Kurzbezeichnung",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo.special_base",
-			iso19139 => "MD_Metadata.dataQualityInfo.lineage.LI_Lineage.statement",
-			iso19139explode => "false" ,
-			inspire => "B 6.1 Lineage",
-			inspiremandatory => "true",
-			iso_name => "B 1.6 Lineage",
-			html => "Informationen zum Herstellungsprozess",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo.rec_exact",
-			iso19139 => "MD_Metadata.dataQualityInfo.lineage.DQ_DataQuality.report.DQ_RelativeInternalPositionAccuracy.value",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Fachliche Grundlage",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo_scale.scale",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Maßstab",
-			gdescription => ""),
-		array(	ibus => "t011_object_geo_scale.resolution_ground",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.distance",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Bodenauflösung",
-			gdescription => ""),
-
-#The resolutions for services will be hold in different objects!
-		array(	ibus => "t011_object_serv_scale.scale",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Maßstab",
-			gdescription => "Auflösung bei Diensten"),
-		array(	ibus => "t011_object_serv_scale.resolution_ground",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.distance",
-			iso19139explode => "false" ,
-			inspire => "B 6.2 Spatial Resolution",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Erstellungsmaßstab->Bodenauflösung",
-			gdescription => "Auflösung bei Diensten"),
-
-		array(	ibus => "t011_obj_geo_spatial_rep",
-			iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Digitale Repräsentation",
-			gdescription => ""),
-
-
-
-
-		array(	ibus => "t011_obj_geo.hierarchy_level",
-			iso19139 => "MD_Metadata.hierachyLevelName",
-			iso19139explode => "true" ,
-			inspire => "B 1.3 Resource Type",
-			inspiremandatory => "true",
-			iso_name => "hierachyLevelName",
-			html => "Datensatz/Datenserie",
-			gdescription => ""),
-		array(	ibus => "t012_obj_obj.object_from_id",
-			iso19139 => "MD_Metadata.parentIdentifier",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "Parent Identifier",
-			html => "Identifikator des übergeordneten Datensatzes",
-			gdescription => ""),
-
-		array(	ibus => "t02_address.city",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Stadt",
-			gdescription => ""),
-		array(	ibus => "t02_address.institution",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Organisation",
-			gdescription => ""),
-		array(	ibus => "t02_address.firstname",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Vorname",
-			gdescription => ""),
-		array(	ibus => "t02_address.lastname",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Nachname",
-			gdescription => ""),
-		array(	ibus => "t02_address.postcode",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Postleitzahl",
-			gdescription => ""),
-		array(	ibus => "t02_address.street",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Straße",
-			gdescription => ""),
-
-		array(	ibus => "t021_communication.comm_value",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.1 Metadata point of contact email",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Email - Verantwortlicher für Metadaten",
-			gdescription => ""),
-array(	ibus => "t011_obj_literature.publisher",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.1 Metadata Contact Organisation",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Verantwortliche Organisation für Metadaten",
-			gdescription => ""),
-
-
-          array(	ibus => "t011_obj_literature_publishing",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 9.1 Responsible party organisation",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Verantwortliche Organisation",
-			gdescription => ""),
-
- 	array(	ibus => "t012_obj_adr.special_name",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 9.2 Responsible party role",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Rolle der verantwortlichen Organisation",
-			gdescription => ""),
-
-
-
-
-		array(	ibus => "t017_url_ref.content",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			iso_name => "",
-			html => "Art des Links",
-			gdescription => ""),
-		array(	ibus => "t017_url_ref.url_link",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Link",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_id",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Objektidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_uuid",
-			iso19139 => "?",
-			iso19139explode => "false" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "Eindeutiger Objektidentifikator",
-			gdescription => ""),
-		array(	ibus => "t01_object.obj_id",
-			iso19139 => "",
-			iso19139explode => "false" ,
-			inspire => "B 1.5 Unique resource identifier",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Name des Objektes",
-			gdescription => ""),
-		array(	ibus => "t01_object.mod_time",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 10.2 Metadata date",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Datum des Metadatensatzes",
-			gdescription => ""),
-		array(	ibus => "t011_obj_serv_type.serv_type_key",
-			iso19139 => "MD_Metadata.identificationInfo.SV_ServiceIdentification.serviceTypeVersion",
-			iso19139explode => "" ,
-			inspire => "B 2.2 Spatial Data Service Type",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Version des Services",
-			gdescription => ""),
-
-
-
- 		array(	ibus => "t011_obj_serv_op_connpoint.connect_point",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "",
-			inspiremandatory => "false",
-			iso_name => "",
-			html => "URL zum Online Aufruf",
-			gdescription => ""),
- 		array(	ibus => "t01_object.avail_access_note",
-			iso19139 => "identificationInfo[1]/*/resourceConstraints/*/accessConstraints",
-			iso19139explode => "" ,
-			inspire => "B 8.1 Condition applying to access and use",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Zugriffsbeschränkungen",
-			gdescription => ""),
- 		array(	ibus => "t01_object.fees",
-			iso19139 => "identificationInfo[1]/*/resourceConstraints/*/useLimitation",
-			iso19139explode => "" ,
-			inspire => "B 8.2 Limitations on public access",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Kosten/Gebühren",
-			gdescription => ""),
- 		array(	ibus => "t01_object.data_language",
-			iso19139 => "",
-			iso19139explode => "" ,
-			inspire => "B 1.7 Resource Language",
-			inspiremandatory => "true",
-			iso_name => "",
-			html => "Sprache des Datensatzes",
-			gdescription => ""),
-		
-		array(	ibus => "t011_obj_geo_topic_cat.topic_category",
-			iso19139 => "identificationInfo[1]/*/topicCategory",
-			iso19139explode => "true" ,
-			inspire => "B 2.1 Topic Category",
-			inspiremandatory => "true",
-			iso_name => "Topic Category",
-			html => "Kategorie",
-			gdescription => "ISO Kategorie")
-
-		#array(	ibus => "t011_obj_geo_topic_cat.topic.topic_category",
-			#iso19139 => "MD_Metadata.identificationInfo.MD_DataIdentification.topicCategory",
-			#iso19139explode => "true" ,
-			#inspire => "",
-			#inspiremandatory => "false",
-			#iso_name => "Dataset topic category",
-			#html => "Kategorisierung",
-			#gdescription => "")
-		);
-
-if(!isset($_REQUEST["osid"]) )
-{
+if(!isset($_REQUEST["osid"]) ) {
 	echo "no opensearch id set";
 	die();
-}
-else
-{
-	if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-		{	
+} else {
+	if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {	
 		echo "opensearch interface no.: ".$_REQUEST["osid"]." will be requested<br>";
 	}
 }
 
+if(!isset($_REQUEST["docuuid"]) ) {
+	echo "No uuid of dataset given!";
+	die();
+} else {
+	$docuuid = $_REQUEST["docuuid"];
+}
 
 #***get the information out of the mapbender-db
 #get url to search interface (opensearch):
@@ -528,120 +70,120 @@
 	$os_list[$cnt_os] ['url']= $row_os["os_url"];
 	$os_list[$cnt_os] ['h']= $row_os["os_h"];
 	$os_list[$cnt_os] ['standardfilter']= $row_os["os_standard_filter"];
-#os_standard_filter
+	$os_list[$cnt_os] ['version']= $row_os["os_version"];
 	$cnt_os++;
 }
 #give out count of interfaces to use
 #echo "\nCount of registrated OpenSearch Interfaces: ".count($os_list)."\n";
 #***
+switch ($os_list[0] ['version']) {
+    	case 2:
+		#define new csw get record by id search like:
+		#http://www.portalu.de/csw202?request=GetRecordById&service=CSW&version=2.0.2&Id=81FF8BB2-2753-4A95-8C1E-F78C19035780&ElementSetName=full
+		$openSearchUrlDetail = $os_list[0] ['url'];
+		//exchange opensearch with csw202?
+		$openSearchUrlDetail = str_replace('opensearch/', 'csw202?', $openSearchUrlDetail);
+		$url = $openSearchUrlDetail."request=GetRecordById&service=CSW&version=2.0.2&Id=".$docuuid."&ElementSetName=full";
+	break;			
+	default:
+		#define opensearch detail url
+		$openSearchUrlDetail=$os_list[0] ['url']."detail?";
+		#get resultlists
+		$url=$openSearchUrlDetail."plugid=".$_REQUEST['plugid']."&docid=".$_REQUEST['docid'];
+	break;
+}
 
-
-	
-	
-	#define opensearch detail url
-	
-	$openSearchUrlDetail=$os_list[0] ['url']."detail?";
-	
-	#get resultlists
-	$url=$openSearchUrlDetail."plugid=".$_REQUEST['plugid']."&docid=".$_REQUEST['docid'];
-
-
-if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-{
+if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {
 	echo "<br> REQUEST: ".$url."<br>";
 }
-	#create connector object
-	$openSearchObject = new connector($url);
-	#get results
-	$openSearchDetail = $openSearchObject->file;
-	
-	#save resultset in temporary folder identified by sessionid, katalog_id and page_id! Now there would be more tmp files than before! 
-	#this has to be done in order to give the information to typo3
-	#**************to be done!************************************
 
-	#parse result to simplexml 		
-	#$openSearchXml=simplexml_load_string($openSearchDetail);
+#create connector object
+$openSearchObject = new connector($url);
+#get results
+$openSearchDetail = $openSearchObject->file;
 
 
 
-		#parse result to simplexml 		
-		$openSearchDetailXML=simplexml_load_string($openSearchDetail);
-		#*****************************bbox********************************************		
-		#do things for getting the bbox of the object in crs of last defined mapbender
 
-		#read out the epsg from session
 
-		#read out  the bbox if exists
 
-		#transform bbox from wgs84 to last epsg of mapbender
 
-		#*****************************bbox********************************************
+#$openSearchDetail = str_replace('xmlns=', 'ns=', $openSearchDetail);
+$openSearchDetailXML=simplexml_load_string($openSearchDetail);
+#extract objects to iso19139 elements
+$openSearchDetailXML->registerXPathNamespace("csw", "http://www.opengis.net/cat/csw/2.0.2");
+$openSearchDetailXML->registerXPathNamespace("gml", "http://www.opengis.net/gml");
+$openSearchDetailXML->registerXPathNamespace("gco", "http://www.isotc211.org/2005/gco");
+$openSearchDetailXML->registerXPathNamespace("gmd", "http://www.isotc211.org/2005/gmd");
+$openSearchDetailXML->registerXPathNamespace("gts", "http://www.isotc211.org/2005/gts");
+$openSearchDetailXML->registerXPathNamespace("srv", "http://www.isotc211.org/2005/srv");
 
-		
 
-		#extract objects to iso19139 elements
-		#count unidentified elements
-		$i=0;
+if ($_REQUEST['mdtype']=='iso19139') {
+	header("Content-type: application/xhtml+xml; charset=UTF-8");
+	//delete scw entries from response file
+	$MD_Metadata = str_replace('<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">', '', $openSearchDetail);
+	$MD_Metadata = str_replace('</csw:GetRecordByIdResponse>', '', $MD_Metadata);
+	echo $MD_Metadata;
+	die();
+}	
 
-		
 
 
 
-		#get list for ibus variables - cause php is row major
-		$ibus_names = array();
-		for($a = 0; $a < count($md_ident); $a++) {
-			$ibus_names[$a] = $md_ident[$a]["ibus"];
-			if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-				{
-				echo "ibus_names[".$a."]=".$md_ident[$a]["ibus"]."<br>";
-			}
+	#count unidentified elements
+	$i=0;
+	#get list for ibus variables - cause php is row major
+	$ibus_names = array();
+	for($a = 0; $a < count($md_ident); $a++) {
+		$ibus_names[$a] = $md_ident[$a]["ibus"];
+		if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
+			{
+			echo "ibus_names[".$a."]=".$md_ident[$a]["ibus"]."<br>";
+		}
 
-		} 
-
-
-
-
-
-		#define array of key-value pairs
-		$detail_array=array();
-		#read key-value pairs
-		$j=0;
+	} 
+	$detail_array=array();
+	#read key-value pairs
+	$j=0;
+	switch ($os_list[0] ['version']) {
+    		case 2:
+			#echo $url."<br><br>";
+			//register namespaces: 
+/* <gmd:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:srv="http://www.isotc211.org/2005/srv" id="_ingrid-group_iplug-rp-udk-db_263">*/
+			for($a = 0; $a < count($md_ident); $a++) {
+				$resultOfXpath = $openSearchDetailXML->xpath('/csw:GetRecordByIdResponse'.$md_ident[$a]['iso19139']);
+				$md_ident[$a]['value'] = $resultOfXpath[0];
+				echo "<b>".$md_ident[$a]['html']."</b>: ".$md_ident[$a]['value']."<br><br>";
+			}
+			echo "Version of PortalU CSW interface is currently not yet full supported! We work on the new Interface.<br> Please use the link <b>Originäre Metadaten</b> instead.";
+			die();
+		break;
+		default:
 		foreach ( $openSearchDetailXML->channel->item->details->detail as $detail) { 
-		
 			$detail_key=(string)$detail->{'detail-key'};		#cast explicitly to string
 			$detail_value=(string)$detail->{'detail-value'};
 			$detail_array[$detail_key] = $detail_value;
 			$detail_keys[$j]=$detail_key;	
-	#	echo "Key: ".$detail->{'detail-key'}."<br>"; 
-	#	echo "array: ".$detail_array[$detail_key]."<br>";	#gives values
-		#check if key is in array else count failures
-			if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-				{
+			if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {
 				if (in_array($detail_key, $ibus_names)) {
 					echo "Key <b>".$detail_key."</b> exists in lookup table!<br>";
 					$i++;
 				}
 			}
-				$j++;		
-				
+				$j++;			
 		} 
-		if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-			{
-			echo "<br>".$i." elements have been identified!<br>";
-		}
+		break;
+	}
 
+	if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {
+		echo "<br>".$i." elements have been identified!<br>";
+	}
 
-#$test1=in_array('t04_search.searchterm', $ibus_names);
-#$test2=array_search('t04_search.searchterm', $ibus_names);
-#if ($test1){echo "found at position: ".$test2."<br>";}
-#else
-#{echo "not found<br>";}
-if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') )
-	{
-	var_dump($detail_keys);
+	if(isset($_REQUEST["mdtype"])&($_REQUEST["mdtype"]=='debug') ) {
+		var_dump($detail_keys);
+	}
 
-}
-
 if ($_REQUEST['mdtype']=='debug'){
 		echo "DEBUG Metadatenanzeige<br>";
 		#define table
@@ -723,479 +265,6 @@
 }
 
 
-
-
-
-
-if ($_REQUEST['mdtype']=='iso19139') {
-//echo '<br><b>ISO19139 output comming soon!</b><br>';
-$iso19139 = new DOMDocument('1.0');
-$iso19139->encoding = 'UTF-8';
-#$iso19139->standalone = false;
-#Creating the "MD_Metadata" node
-$MD_Metadata = $iso19139->createElementNS('http://www.isotc211.org/2005/gmd', 'gmd:MD_Metadata');
-#$MD_Metadata=$iso19139->registerNamespace('srv','http://www.iso211.org/2005/srv');
-#$wmt_ms_capabilities->setAttribute("updateSequence", $wms_row["wms_timestamp"]);
-$MD_Metadata = $iso19139->appendChild($MD_Metadata);
-$MD_Metadata->setAttribute("xmlns:srv", "http://www.isotc211.org/2005/srv");
-$MD_Metadata->setAttribute("xmlns:gml", "http://www.opengis.net/gml");
-$MD_Metadata->setAttribute("xmlns:gco", "http://www.isotc211.org/2005/gco");
-$MD_Metadata->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
-$MD_Metadata->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-$MD_Metadata->setAttribute("xsi:schemaLocation", "http://www.isotc211.org/2005/gmd ./xsd/gmd/gmd.xsd://www.isotc211.org/2005/srv ./xsd/srv/srv.xsd");
-#generate language part B 10.3 (if available)
-$language = $iso19139->createElement("gmd:language");
-$languagecode = $iso19139->createElement("gmd:LanguageCode");
-if (isset($detail_array['t01_object.metadata_language'])) {
-$languageText = $iso19139->createTextNode($detail_array['t01_object.metadata_language']);
-}
-else {
-$languageText = $iso19139->createTextNode("not yet defined");
-}
-$languagecode->appendChild($languageText);
-$language ->appendChild($languagecode);
-$language=$MD_Metadata->appendChild($language);
-
-#generate MD_Scope part B 1.3 (if available)
-$hierarchyLevel = $iso19139->createElement("gmd:hierarchyLevel");
-$scopecode = $iso19139->createElement("gmd:MD_ScopeCode");
-if (isset($detail_array['t011_obj_geo.hierarchy_level'])) {
-$scopeText = $iso19139->createTextNode($detail_array['t011_obj_geo.hierarchy_level']);
-}
-else {
-$scopeText = $iso19139->createTextNode("not yet defined");
-}
-$scopecode->appendChild($scopeText);
-$hierarchyLevel->appendChild($scopecode);
-$hierarchyLevel=$MD_Metadata->appendChild($hierarchyLevel);
-#Part B 10.1
-$contact=$iso19139->createElement("gmd:contact");
-$CI_ResponsibleParty=$iso19139->createElement("gmd:CI_ResponsibleParty");
-$organisationName=$iso19139->createElement("gmd:organisationName");
-$organisationName_cs=$iso19139->createElement("gco:CharacterString");
-
-if (isset($detail_array['t011_obj_literatur.publisher'])) {
-$organisationNameText=$iso19139->createTextNode($detail_array['t011_obj_literatur.publisher']);
-}
-else
-{
-$organisationNameText=$iso19139->createTextNode('not given');
-}
-$contactInfo=$iso19139->createElement("gmd:contactInfo");
-$CI_Contact=$iso19139->createElement("gmd:CI_Contact");
-$address=$iso19139->createElement("gmd:address");
-$CI_Address=$iso19139->createElement("gmd:CI_Address");
-$electronicMailAddress=$iso19139->createElement("gmd:electronicMailAddress");
-$electronicMailAddress_cs=$iso19139->createElement("gco:CharacterString");
-
-if (isset($detail_array['t021_communication.comm_value'])) {
-$electronicMailAddressText=$iso19139->createTextNode($detail_array['t021_communication.comm_value']);
-}
-else
-{
-$electronicMailAddressText=$iso19139->createTextNode('not given');
-}
-
-#create xml tree
-$organisationName_cs->appendChild($organisationNameText);
-$organisationName->appendChild($organisationName_cs);
-$CI_ResponsibleParty->appendChild($organisationName);
-
-$electronicMailAddress_cs->appendChild($electronicMailAddressText);
-$electronicMailAddress->appendChild($electronicMailAddress_cs);
-$CI_Address->appendChild($electronicMailAddress);
-$address->appendChild($CI_Address);
-$CI_Contact->appendChild($address);
-$contactInfo->appendChild($CI_Contact);
-$CI_ResponsibleParty->appendChild($contactInfo);
-
-$contact->appendChild($CI_ResponsibleParty);
-$MD_Metadata->appendChild($contact);
-
-
-#generate dateStamp part B 10.2 (if available)
-$dateStamp = $iso19139->createElement("gmd:dateStamp");
-$mddate = $iso19139->createElement("gco:Date");
-if (isset($detail_array['t01_object.mod_time'])) {
-$mddateText = $iso19139->createTextNode($detail_array['t01_object.mod_time']);
-}
-else {
-$mddateText = $iso19139->createTextNode("not yet defined");
-}
-$mddate->appendChild($mddateText);
-$dateStamp->appendChild($mddate);
-$dateStamp=$MD_Metadata->appendChild($dateStamp);
-#do the things for identification
-#create nodes
-$identificationInfo=$iso19139->createElement("gmd:identificationInfo");
-$MD_DataIdentification=$iso19139->createElement("gmd:MD_DataIdentification");
-#add attribut
-$MD_DataIdentification->setAttribute("id", "dataId");
-$citation=$iso19139->createElement("gmd:citation");
-$CI_Citation=$iso19139->createElement("gmd:CI_Citation");
-#create nodes for things which are defined - howto do the multiplicities? Ask Martin!
-#Create Resource title element B 1.1
-$title=$iso19139->createElement("gmd:title");
-$title_cs=$iso19139->createElement("gco:CharacterString");
-if (isset($detail_array['title'])) {
-$titleText = $iso19139->createTextNode($detail_array['title']);
-}
-else {
-$titleText = $iso19139->createTextNode("not yet defined");
-}
-$title_cs->appendChild($titleText);
-$title->appendChild($title_cs);
-$CI_Citation->appendChild($title);
-
-#Create date elements B5.2-5.4
-
-#Do things for B 5.2 date of publication
-if (isset($detail_array['t0113_dataset_reference.reference_date'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-
-
-
-
-$dateTypeCodeText=$iso19139->createTextNode('publication');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-
-#Do things for B 5.3 date of revision
-if (isset($detail_array['t01_object.time_status'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$dateTypeCodeText=$iso19139->createTextNode('revision');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-
-#Do things for B 5.4 date of creation
-if (isset($detail_array['txx'])) {
-$date1=$iso19139->createElement("gmd:date");
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date2=$iso19139->createElement("gmd:date");
-$gcoDate=$iso19139->createElement("gco:Date");
-$dateType=$iso19139->createElement("gmd:dateType");
-$dateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$dateTypeCodeText=$iso19139->createTextNode('creation');
-$dateText= $iso19139->createTextNode($detail_array['t0113_dataset_reference.reference_date']);
-$dateTypeCode->appendChild($dateTypeCodeText);
-$dateType->appendChild($dateTypeCode);
-$gcoDate->appendChild($dateText);
-$date2->appendChild($gcoDate);
-$CI_Date->appendChild($date2);
-$CI_Date->appendChild($dateType);
-$date1->appendChild($CI_Date);
-$CI_Citation->appendChild($date1);
-}
-#Do things for B 1.5 Resource unique identifier
-$identifier=$iso19139->createElement("gmd:identifier");
-$rs_identifier=$iso19139->createElement("gmd:RS_Identifier");
-$code=$iso19139->createElement("gmd:code");
-$code_cs=$iso19139->createElement("gco:CharacterString");
-$codeText=$iso19139->createTextNode($detail_array['t01_object.obj_id']);
-$code_cs->appendChild($codeText);
-$code->appendChild($code_cs);
-$rs_identifier->appendChild($code);
-$identifier->appendChild($rs_identifier);
-$CI_Citation->appendChild($identifier);
-
-
-
-#create tree
-
-$citation->appendChild($CI_Citation);
-$MD_DataIdentification->appendChild($citation);
-
-#Create part for abstract B 1.2
-$abstract=$iso19139->createElement("gmd:abstract");
-$abstract_cs=$iso19139->createElement("gco:CharacterString");
-if (isset($detail_array['summary'])) {
-$abstractText = $iso19139->createTextNode($detail_array['summary']);
-}
-else {
-$abstractText = $iso19139->createTextNode("not yet defined");
-}
-$abstract_cs->appendChild($abstractText);
-$abstract->appendChild($abstract_cs);
-$MD_DataIdentification->appendChild($abstract);
-#End for abstract
-#Create part for point of contact
-#Define relevant objects
-$pointOfContact=$iso19139->createElement("gmd:pointOfContact");
-$CI_ResponsibleParty=$iso19139->createElement("gmd:CI_ResponsibleParty");
-$organisationName=$iso19139->createElement("gmd:organisationName");
-$orgaName_cs=$iso19139->createElement("gco:CharacterString");
-$contactInfo=$iso19139->createElement("gmd:contactInfo");
-$CI_Contact=$iso19139->createElement("gmd:CI_Contact");
-$address_1=$iso19139->createElement("gmd:adress");
-$CI_Address=$iso19139->createElement("gmd:CI_Address");
-$electronicMailAddress=$iso19139->createElement("gmd:electronicMailAddress");
-$email_cs=$iso19139->createElement("gco:CharacterString");
-$role=$iso19139->createElement("gmd:role");
-$CI_RoleCode=$iso19139->createElement("gmd:CI_RoleCode");
-
-
-if (isset($detail_array['t011_obj_literature_publishing'])) {
-$resOrgaText = $iso19139->createTextNode($detail_array['t011_obj_literature_publishing']);
-}
-else {
-$resOrgaText= $iso19139->createTextNode("not yet defined");
-}
-if (isset($detail_array['tmail'])) {
-$resMailText = $iso19139->createTextNode($detail_array['tmail']);
-}
-else {
-$resMailText = $iso19139->createTextNode("really wanted by INSPIRE?");
-}
-if (isset($detail_array['t012_obj_adr.special_name'])) {
-$resRoleText = $iso19139->createTextNode($detail_array['t012_obj_adr.special_name']);
-}
-else {
-$resRoleText = $iso19139->createTextNode("not yet defined");
-}
-#put them in xml
-$orgaName_cs->appendChild($resOrgaText);
-$CI_ResponsibleParty->appendChild($orgaName_cs);
-
-$email_cs->appendChild($resMailText);
-$electronicMailAddress->appendChild($email_cs);
-$CI_Address->appendChild($electronicMailAddress);
-$address_1->appendChild($CI_Address);
-$CI_Contact->appendChild($address_1);
-$contactInfo->appendChild($CI_Contact);
-$CI_ResponsibleParty->appendChild($contactInfo);
-
-$CI_RoleCode->appendChild($resRoleText);
-$role->appendChild($CI_RoleCode);
-$CI_ResponsibleParty->appendChild($role);
-
-$pointOfContact->appendChild($CI_ResponsibleParty);
-
-
-$MD_DataIdentification->appendChild($pointOfContact);
-#Part B 3 INSPIRE Category
-
-#do only if INSPIRE keyword (Annex I-III) is set
-if (isset($detail_array['t011_obj_literatur.base'])) {
-
-$descriptiveKeywords=$iso19139->createElement("gmd:descriptiveKeywords");
-$MD_Keywords=$iso19139->createElement("gmd:MD_Keywords");
-$keyword=$iso19139->createElement("gmd:keyword");
-$keyword_cs=$iso19139->createElement("gco:CharacterString");
-
-$keywordText = $iso19139->createTextNode($detail_array['t011_obj_literatur.base']);
-
-$thesaurusName=$iso19139->createElement("gmd:thesaurusName");
-$CI_Citation=$iso19139->createElement("gmd:CI_Citation");
-$title=$iso19139->createElement("gmd:title");
-$title_cs=$iso19139->createElement("gco:CharacterString");
-$titleText=$iso19139->createTextNode('GEMET Thesaurus version 1.0.0'); # to be adopted to get dynamically
-$date_1=$iso19139->createElement("gmd:date");
-
-$CI_Date=$iso19139->createElement("gmd:CI_Date");
-$date_2=$iso19139->createElement("gmd:date");
-$date_date=$iso19139->createElement("gco:Date");
-$dateText=$iso19139->createTextNode('2008-12-08');
-$dateType=$iso19139->createElement("gmd:dateType");
-$CI_DateTypeCode=$iso19139->createElement("gmd:CI_DateTypeCode");
-$CI_DateTypeCodeText=$iso19139->createTextNode('publication'); #to be adopted to get dynamically
-
-#write to xml tree
-$keyword_cs->appendChild($keywordText);
-$keyword->appendChild($keyword_cs);
-$MD_Keywords->appendChild($keyword);
-
-$title_cs->appendChild($titleText);
-$title->appendChild($title_cs);
-
-$CI_DateTypeCode->appendChild($CI_DateTypeCodeText);
-$dateType->appendChild($CI_DateTypeCode);
-
-
-$date_date->appendChild($dateText);
-$date_2->appendChild($date_date);
-
-$CI_Date->appendChild($date_2);
-$CI_Date->appendChild($dateType);
-
-$date_1->appendChild($CI_Date);
-
-$CI_Citation->appendChild($title);
-$CI_Citation->appendChild($date_1);
-
-$thesaurusName->appendChild($CI_Citation);
-$MD_Keywords->appendChild($thesaurusName);
-
-$descriptiveKeywords->appendChild($MD_Keywords);
-
-$MD_DataIdentification->appendChild($descriptiveKeywords);
-}
-#Resource Constraints B 8
-if (isset($detail_array['t01_object.avail_access_note'])){
-
-$resourceConstraints1=$iso19139->createElement("gmd:resourceConstraints");
-$MD_LegalConstraints1=$iso19139->createElement("gmd:MD_LegalConstraints");
-$accessConstraints=$iso19139->createElement("gmd:accessConstraints");
-$MD_RestrictionCode=$iso19139->createElement("gmd:MD_RestrictionCode");
-$MD_RestrictionCodeText=$iso19139->createTextNode($detail_array['t01_object.avail_access_note']);
-
-$MD_RestrictionCode->appendChild($MD_RestrictionCodeText);
-$accessConstraints->appendChild($MD_RestrictionCode);
-$MD_LegalConstraints1->appendChild($accessConstraints);
-$resourceConstraints1->appendChild($MD_LegalConstraints1);
-
-$MD_DataIdentification->appendChild($resourceConstraints1);
-}
-
-if(isset($detail_array['t01_object.fees'])){
-$resourceConstraints2=$iso19139->createElement("gmd:resourceConstraints");
-$MD_LegalConstraints2=$iso19139->createElement("gmd:MD_LegalConstraints");
-$useLimitation=$iso19139->createElement("gmd:useLimitation");
-$useLimitation_cs=$iso19139->createElement("gco:CharacterString");
-$useLimitationText=$iso19139->createTextNode($detail_array['t01_object.fees']);
-
-$useLimitation_cs->appendChild($useLimitationText);
-$useLimitation->appendChild($useLimitation_cs);
-$MD_LegalConstraints2->appendChild($useLimitation);
-$resourceConstraints2->appendChild($MD_LegalConstraints2);
-
-$MD_DataIdentification->appendChild($resourceConstraints2);
-}
-# Part B 1.7 Dataset Language
-if(isset($detail_array['t01_object.data_language'])){
-$language=$iso19139->createElement("gmd:language");
-$LanguageCode=$iso19139->createElement("gmd:LanguageCode");
-
-$LanguageCodeText=$iso19139->createTextNode($detail_array['t01_object.data_language']);
-
-
-$LanguageCode->appendChild($LanguageCodeText);
-$language->appendChild($LanguageCode);
-
-
-
-$MD_DataIdentification->appendChild($language);
-}
-
-
-
-#Topic Category B 2.1
-if(isset($detail_array['t011_obj_geo_topic_cat.topic_category'])){
-$topicCategory=$iso19139->createElement("gmd:topicCategory");
-$MD_TopicCategoryCode=$iso19139->createElement("gmd:MD_TopicCategoryCode");
-
-$MD_TopicCategoryText=$iso19139->createTextNode($detail_array['t011_obj_geo_topic_cat.topic_category']);
-
-
-$MD_TopicCategoryCode->appendChild($MD_TopicCategoryText);
-$topicCategory->appendChild($MD_TopicCategoryCode);
-
-
-
-$MD_DataIdentification->appendChild($topicCategory);
-}
-#Topic Category B 2.1
-if(isset($detail_array['x1']) and isset($detail_array['x2']) and isset($detail_array['y1']) and isset($detail_array['y2'])){
-
-$extent=$iso19139->createElement("gmd:extent");
-$EX_Extent=$iso19139->createElement("gmd:EX_Extent");
-$geographicElement=$iso19139->createElement("gmd:geographicElement");
-$EX_GeographicBoundingBox=$iso19139->createElement("gmd:EX_GeographicBoundingBox");
-
-$westBoundLongitude=$iso19139->createElement("gmd:westBoundLongitude");
-$wb_dec=$iso19139->createElement("gco:Decimal");
-$wb_text=$iso19139->createTextNode($detail_array['x1']);
-
-$eastBoundLongitude=$iso19139->createElement("gmd:eastBoundLongitude");
-$eb_dec=$iso19139->createElement("gco:Decimal");
-$eb_text=$iso19139->createTextNode($detail_array['x2']);
-
-$southBoundLatitude=$iso19139->createElement("gmd:southBoundLatitude");
-$sb_dec=$iso19139->createElement("gco:Decimal");
-$sb_text=$iso19139->createTextNode($detail_array['y1']);
-
-$northBoundLatitude=$iso19139->createElement("gmd:northBoundLatitude");
-$nb_dec=$iso19139->createElement("gco:Decimal");
-$nb_text=$iso19139->createTextNode($detail_array['y2']);
-
-
-$wb_dec->appendChild($wb_text);
-$westBoundLongitude->appendChild($wb_dec);
-$EX_GeographicBoundingBox->appendChild($westBoundLongitude);
-
-$eb_dec->appendChild($eb_text);
-$eastBoundLongitude->appendChild($eb_dec);
-$EX_GeographicBoundingBox->appendChild($eastBoundLongitude);
-
-$sb_dec->appendChild($sb_text);
-$southBoundLatitude->appendChild($sb_dec);
-$EX_GeographicBoundingBox->appendChild($southBoundLatitude);
-
-$nb_dec->appendChild($nb_text);
-$northBoundLatitude->appendChild($nb_dec);
-$EX_GeographicBoundingBox->appendChild($northBoundLatitude);
-
-$geographicElement->appendChild($EX_GeographicBoundingBox);
-$EX_Extent->appendChild($geographicElement);
-$extent->appendChild($EX_Extent);
-
-
-$MD_DataIdentification->appendChild($extent);
-}
-
-
-
-
-
-
-$identificationInfo->appendChild($MD_DataIdentification);
-$MD_Metadata->appendChild($identificationInfo);
-
-
-
-
-
-header("Content-type: application/xhtml+xml; charset=UTF-8");
-
-
-echo $iso19139->saveXml();
-
-
-
-
-
-
-
-
-
-
-
-}
 if ($_REQUEST['mdtype']=='inspire') {
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
@@ -1258,21 +327,4 @@
 echo '<br><b>INSPIRE output not completly implemented!<b><br>';
 }
 
-
-
-#phpinfo();
-#$xmltest = new DOMDocument;
-#$xmltest=simplexml_load_file('/home/armin/Desktop/GDI-RP/metadaten/detail_portalu.xml');
-#$xsl = new DOMDocument;
-#var_dump($xmltest);
-//$xsl->load('simplesearch_overview.xsl');
-#$xsl=simplexml_load_file('/home/workspace/mapbender_rp/http/geoportal/opensearch2html.xsl');
-// Configure the transformer
-#var_dump($xsl);
-#$proc = new XSLTProcessor;
-#$proc->importStyleSheet($xsl); // attach the xsl rules
-#var_dump($proc);
-#$trans = $proc->transformToXML($xmltest);       
-#var_dump($trans);
-
 ?>



More information about the Mapbender_commits mailing list