[Mapbender-commits] r8686 - in trunk/mapbender: conf http/classes http/geoportal http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 5 03:44:33 PDT 2013


Author: armin11
Date: 2013-08-05 03:44:33 -0700 (Mon, 05 Aug 2013)
New Revision: 8686

Modified:
   trunk/mapbender/conf/isoMetadata.conf
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
   trunk/mapbender/http/php/mod_showMetadata.php
Log:
New possibility to allow html presentation of different metadata via class_iso19139, codecleaning

Modified: trunk/mapbender/conf/isoMetadata.conf
===================================================================
--- trunk/mapbender/conf/isoMetadata.conf	2013-08-02 09:28:33 UTC (rev 8685)
+++ trunk/mapbender/conf/isoMetadata.conf	2013-08-05 10:44:33 UTC (rev 8686)
@@ -1,7 +1,7 @@
 <?php
 //Mapping hashtable for parsing iso19139 xml files e.g. for INSPIRE
 $iso19139Hash = array(
-//Metadata Identifier - not neccessary
+//Metadata Identifier - not neccessary (0)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -13,7 +13,7 @@
 	category => "identification",
 	description => _mb("A value uniquely identifying the resource. The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).")
 ),
-//B 1.1
+//B 1.1 (1)
 array(	ibus => "rtitle",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -25,7 +25,7 @@
 	category => "identification",
 	description => _mb("This a characteristic, and often unique, name by which the resource is known. The value domain of this metadata element is free text.")
 ),
-//B 1.2
+//B 1.2 (2)
 array(	ibus => "abstract",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -37,7 +37,7 @@
 	category => "identification",
 	description => _mb("This is a brief narrative summary of the content of the resource.")
 ),
-//B 1.3
+//B 1.3 (3)
 array(	ibus => "rtype",
 	iso19139 => "/gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue",
 	iso19139explode => "false" ,
@@ -49,7 +49,7 @@
 	category => "identification",
 	description => _mb("This is the type of resource being described by the metadata.")
 ),
-//B 1.4
+//B 1.4 (4)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:linkage/gmd:URL",
 	iso19139explode => "false" ,
@@ -62,7 +62,8 @@
 	description => _mb("The resource locator defines the link(s) to the resource and/or the link to additional information about the resource. The value domain of this metadata element is a character string, commonly expressed as uniform resource locator (URL).")
 ),
 //B 1.5 - Identifier of dataset!
-//Part 1 id
+//For RS_Identifier case
+//Part 1 id (5)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:code/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -74,7 +75,7 @@
 	category => "identification",
 	description => _mb("A value uniquely identifying the resource. The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner.")
 ),
-//Part 2 - namespace
+//Part 2 - namespace (6)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -86,7 +87,7 @@
 	category => "identification",
 	description => _mb("A character string namespace uniquely identifying the context of the identifier code (for example, the data owner)")
 ),
-//B 1.6 Coupled resource
+//B 1.6 Coupled resource (7)
 //NOTICE: simplexml has problems with namespaced attributes! So we choose a alias for xlink:href which is xlinkhref and exchange this attributes from xml before parsing the xml!
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/srv:operatesOn/@xlinkhref",
@@ -99,7 +100,7 @@
 	category => "identification",
 	description => _mb("If the resource is a spatial data service, this metadata element identifies, where relevant, the target spatial data set(s) of the service through their unique resource identifiers (URI). The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).")
 ),
-//B 1.7 Language dataset
+//B 1.7 Language dataset (8)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue",
 	iso19139explode => "false" ,
@@ -111,7 +112,7 @@
 	category => "identification",
 	description => _mb("The language(s) used within the resource. The value domain of this metadata element is limited to the languages defined in ISO 639-2.")
 ),
-//B 2.1 Topic category
+//B 2.1 Topic category (9)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode",
 	iso19139explode => "true" ,
@@ -123,7 +124,7 @@
 	category => "classification",
 	description => _mb("The topic category is a high-level classification scheme to assist in the grouping and topic-based search of available spatial data resources. The value domain of this metadata element is defined in Part D.2.")
 ),
-//B 2.2 Spatial data service type
+//B 2.2 Spatial data service type (10)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName",
 	iso19139explode => "false" ,
@@ -136,7 +137,7 @@
 	description => _mb("This is a classification to assist in the search of available spatial data services. A specific service shall be categorised in only one category. The value domain of this metadata element is defined in Part D.3.")
 ),
 //B3 Keyword
-//B 3.1 keyword value dataset
+//B 3.1 keyword value dataset (11)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString",
 	iso19139explode => "true" ,
@@ -148,8 +149,8 @@
 	category => "keyword",
 	description => _mb("If the resource is a spatial data service, at least one keyword from Part D.4 shall be provided. If a resource is a spatial data set or spatial data set series, at least one keyword shall be provided from the general environmental multilingual thesaurus (GEMET) describing the relevant spatial data theme as defined in Annex I, II or III to Directive 2007/2/EC.")
 ),
-//B 4 Geographic Location
-//B 4.1 Geographic bounding box
+//B 4 Geographic Location 
+//B 4.1 Geographic bounding box (12)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/*/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/*/gco:Decimal",
 	iso19139explode => "true" ,
@@ -174,7 +175,7 @@
 	category => "actuality",
 	description => _mb("The temporal extent defines the time period covered by the content of the resource. This time period may be expressed as any of the following: - an individual date, - an interval of dates expressed through the starting date and end date of the interval, - a mix of individual dates and intervals of dates.")
 ),
-//B 5.2 Date of publication
+//B 5.2 Date of publication (13)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='publication']/gmd:date/*",
 	iso19139explode => "false" ,
@@ -186,7 +187,7 @@
 	category => "actuality",
 	description => _mb("This is the date of publication of the resource when available, or the date of entry into force. There may be more than one date of publication.")
 ),
-//B 5.3 Date of last revision
+//B 5.3 Date of last revision (14)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='revision']/gmd:date/*",
 	iso19139explode => "false" ,
@@ -198,7 +199,7 @@
 	category => "actuality",
 	description => _mb("This is the date of last revision of the resource, if the resource has been revised. There shall not be more than one date of last revision.")
 ),
-//B 5.4 Date of creation
+//B 5.4 Date of creation (15)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date[gmd:dateType/gmd:CI_DateTypeCode/@codeListValue='creation']/gmd:date/*",
 	iso19139explode => "false" ,
@@ -211,7 +212,7 @@
 	description => _mb("This is the date of creation of the resource. There shall not be more than one date of creation.")
 ),
 //B 6. Quality and validity
-//B 6.1 Lineage
+//B 6.1 Lineage (16)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -225,7 +226,7 @@
 ),
 
 //B 6.2 Spatial Resolution
-//B 6.2.1 equivalent scale 
+//B 6.2.1 equivalent scale (17)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer",
 	iso19139explode => "false" ,
@@ -238,7 +239,7 @@
 	description => _mb("An equivalent scale is generally expressed as an integer value expressing the scale denominator.")
 ),
 //B 6.2.2 ground distance
-//B 6.2.2.1 ground distance value
+//B 6.2.2.1 ground distance value (18)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:distancegco:Distance",
 	iso19139explode => "false" ,
@@ -254,7 +255,7 @@
 //TODO maybe everytime m? or parse the href ...
 //B 7. Conformity
 //B 7.1. Specification
-//B 7.1.1 Title
+//B 7.1.1 Title (19)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -266,7 +267,7 @@
 	category => "quality",
 	description => _mb("This is a citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms. A resource may conform to more than one implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. This citation shall include at least the title and a reference date (date of publication, date of last revision or of creation) of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or of the specification.")
 ),
-//B 7.1.2 Reference Date
+//B 7.1.2 Reference Date (20)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/*",
 	iso19139explode => "false" ,
@@ -278,7 +279,7 @@
 	category => "quality",
 	description => _mb("This is a citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms. A resource may conform to more than one implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. This citation shall include at least the title and a reference date (date of publication, date of last revision or of creation) of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or of the specification.")
 ),
-//B 7.2. Degree
+//B 7.2. Degree (21)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:report/gmd:DQ_DomainConsistency/gmd:result/gmd:DQ_ConformanceResult/gmd:pass/gco:Boolean",
 	iso19139explode => "false" ,
@@ -291,7 +292,7 @@
 	description => _mb("This is the degree of conformity of the resource to the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification. The value domain of this metadata element is defined in Part D.")
 ),
 //B 8. Constraints related to access and use
-//B 8.1. Conditions applying to access and use
+//B 8.1. Conditions applying to access and use (22)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -304,7 +305,7 @@
 	description => _mb("A set of conditions applying to access and use.")
 ),
 //B 8.2. Limitations on public access
-//B 8.2.1 access constraints codelist
+//B 8.2.1 access constraints codelist (23)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue",
 	iso19139explode => "false" ,
@@ -317,7 +318,7 @@
 	description => _mb("Code for access constraints")
 ),
 
-//B 8.2.2 other constraints
+//B 8.2.2 other constraints (24)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -331,7 +332,7 @@
 ),
 //B 9. Organisations responsible for the establishment, management, maintance and distribution of spatial data sets and services
 //B 9.1. Responsible party
-//B 9.1.1 Responsible party name
+//B 9.1.1 Responsible party name (25)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -343,7 +344,7 @@
 	category => "contact",
 	description => _mb("The name of the organisation as free text.")
 ),
-//B 9.1.2 Responsible party email
+//B 9.1.2 Responsible party email (26)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -355,7 +356,7 @@
 	category => "contact",
 	description => _mb("A contact e-mail address as a character string.")
 ),
-//B 9.2 Responsible party role
+//B 9.2 Responsible party role (27)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:role/gmd:CI_RoleCode/@codeListValue",
 	iso19139explode => "false" ,
@@ -370,7 +371,7 @@
 //TODO some more translations
 //B 10 Metadata on metadata
 //B 10.1. Metadata point of contact
-//B 10.1.1 Metadata point of contact name
+//B 10.1.1 Metadata point of contact name (28)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -382,7 +383,7 @@
 	category => "contact",
 	description => _mb("The name of the organisation as free text.")
 ),
-//B 10.1.2 Metadata point of contact email
+//B 10.1.2 Metadata point of contact email (29)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -394,7 +395,7 @@
 	category => "contact",
 	description => _mb("A contact e-mail address as a character string.")
 ),
-//B 10.2. Metadata date
+//B 10.2. Metadata date (30)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:dateStamp/*",
 	iso19139explode => "false" ,
@@ -406,7 +407,7 @@
 	category => "metadata",
 	description => _mb("The date which specifies when the metadata record was created or updated. This date shall be expressed in conformity with ISO 8601.")
 ),
-//B 10.3. Metadata language
+//B 10.3. Metadata language (31)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
 	iso19139explode => "false" ,
@@ -474,7 +475,7 @@
     </gmd:MD_ReferenceSystem>
 </gmd:referenceSystemInfo>
 */
-//1. Coordinate Reference System
+//1. Coordinate Reference System (32)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -487,7 +488,7 @@
 	description => _mb("Description of the coordinate reference system(s) used in the data set.")
 ),
 /*
-//2. Temporal Reference System - only mandatory if not the standard system!
+//2. Temporal Reference System - only mandatory if not the standard system! (33)
 	array(	ibus => "t01_object.obj_id",
 		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
 		iso19139explode => "false" ,
@@ -500,7 +501,7 @@
 		description => _mb("Description of the temporal reference system(s) used in the data set. This element is mandatory only if the spatial data set contains temporal information that does not refer to the default temporal reference system.")
 	),
 */
-//3. Encoding
+//3. Encoding (34)
 array(	ibus => "t01_object.obj_id",
 	iso19139 => "/gmd:MD_Metadata/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name/gco:CharacterString",
 	iso19139explode => "false" ,
@@ -513,7 +514,7 @@
 	description => _mb("Description of the computer language construct(s) specifying the representation of data objects in a record, file, message, storage device or transmission channel.")
 ),
 /*
-//4. Topological Consistency
+//4. Topological Consistency ()
 	array(	ibus => "t01_object.obj_id",
 		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
 		iso19139explode => "false" ,
@@ -526,7 +527,7 @@
 		description => _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.")
 	),
 */
-//5. Character Encoding
+//5. Character Encoding (35)
 /*<gmd:characterSet>
   <gmd:MD_CharacterSetCode
     codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode"
@@ -556,6 +557,19 @@
 	value => "",
 	category => "metadata",
 	description => _mb("Graphical overview of the resource.")
+),
+
+//In case of MD_Identifier (37)
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "unique resource identifier",
+	inspiremandatory => "true",
+	iso_name => "resource identifier",
+	html => _mb("Unique resource identifier"),
+	value => "",
+	category => "identification",
+	description => _mb("A unique identifier for the ressource (maybe the shapfile)")
 )
 );
 ?>

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2013-08-02 09:28:33 UTC (rev 8685)
+++ trunk/mapbender/http/classes/class_iso19139.php	2013-08-05 10:44:33 UTC (rev 8686)
@@ -314,7 +314,7 @@
 		$err = new mb_exception("class_Iso19139: result of iso19139Xml: ". gettype($iso19139Xml));
 		//if parsing was successful
 		if ($iso19139Xml !== false) {
-			$e = new mb_exception("Parsing of xml metadata file was successfull");
+			$e = new mb_notice("Parsing of xml metadata file was successfull");
 			//register namespaces for parsing content
 			$iso19139Xml->registerXPathNamespace("csw", "http://www.opengis.net/cat/csw/2.0.2");
 			$iso19139Xml->registerXPathNamespace("gml", "http://www.opengis.net/gml");
@@ -323,8 +323,7 @@
 			$iso19139Xml->registerXPathNamespace("gts", "http://www.isotc211.org/2005/gts");
 			$iso19139Xml->registerXPathNamespace("srv", "http://www.isotc211.org/2005/srv");
 			$iso19139Xml->registerXPathNamespace("xlink", "http://www.w3.org/1999/xlink");
-			require_once(dirname(__FILE__)."/../../conf/isoMetadata.conf");
-			$err = new mb_exception("class_Iso19139: result of $iso19139Hash: ". gettype($iso19139Hash));
+			include(dirname(__FILE__)."/../../conf/isoMetadata.conf");
 			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']);
@@ -421,16 +420,23 @@
 			$html .= '</fieldset>';
 			$html .= '<fieldset><legend>'._mb("Identification").'</legend>';
 			$html .= $tableBegin;
-			$html .= $t_a."<b>".$iso19139Hash[1]['html']."</b>: ".$t_b.$iso19139Hash[1]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[2]['html']."</b>: ".$t_b.$iso19139Hash[2]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[3]['html']."</b>: ".$t_b.$iso19139Hash[3]['value'].$t_c;
+			$html .= $t_a."<b>".$iso19139Hash[1]['html']."</b>: ".$t_b.$iso19139Hash[1]['value'].$t_c;//title
+			$html .= $t_a."<b>".$iso19139Hash[2]['html']."</b>: ".$t_b.$iso19139Hash[2]['value'].$t_c;//abstract
+			$html .= $t_a."<b>".$iso19139Hash[3]['html']."</b>: ".$t_b.$iso19139Hash[3]['value'].$t_c;//type
 			if ($iso19139Hash[36]['value'] != "") {
 				$html .= $t_a."<b>".$iso19139Hash[36]['html']."</b>: ".$t_b."<img width=120 height=120 src = '".$iso19139Hash[36]['value']."'>".$t_c;//preview
 			}
-			$html .= $t_a."<b>".$iso19139Hash[5]['html']."</b>: ".$t_b.$iso19139Hash[5]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[6]['html']."</b>: ".$t_b.$iso19139Hash[6]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[26]['html']."</b>: ".$t_b.$iso19139Hash[26]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[27]['html']."</b>: ".$t_b.$iso19139Hash[27]['value'].$t_c;
+			//resource identifier
+			if ($iso19139Hash[37]['value'] != "") {
+				//split with #
+				$mdIdentifier = explode('#',$iso19139Hash[37]['value']);
+				$html .= $t_a."<b>".$iso19139Hash[37]['html']."</b>: ".$t_b.$iso19139Hash[37]['value'].$t_c;//MD Identifier
+			} else {
+				$html .= $t_a."<b>".$iso19139Hash[5]['html']."</b>: ".$t_b.$iso19139Hash[5]['value'].$t_c;//namespace
+				$html .= $t_a."<b>".$iso19139Hash[6]['html']."</b>: ".$t_b.$iso19139Hash[6]['value'].$t_c;//id
+			}
+			$html .= $t_a."<b>".$iso19139Hash[26]['html']."</b>: ".$t_b.$iso19139Hash[26]['value'].$t_c;//orga name
+			$html .= $t_a."<b>".$iso19139Hash[27]['html']."</b>: ".$t_b.$iso19139Hash[27]['value'].$t_c;//email
 			$html .= $tableEnd;
 			$html .= '</fieldset>';
 		
@@ -491,18 +497,22 @@
 			$html .= $t_a."<b>".$iso19139Hash[16]['html']."</b>: ".$t_b.$iso19139Hash[16]['value'].$t_c;
 			$html .= $tableEnd;
 			$html .= '</fieldset>';
-			$html .= '<fieldset><legend>'._mb("Format").'</legend>';
-			$html .= $tableBegin;
-			$html .= $t_a."<b>".$iso19139Hash[34]['html']."</b>: ".$t_b.$iso19139Hash[34]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[35]['html']."</b>: ".$t_b.$iso19139Hash[35]['value'].$t_c;
-			$html .= $tableEnd;
-			$html .= '</fieldset>';
-			$html .= '<fieldset><legend>'._mb("Service information").'</legend>';
-			$html .= $tableBegin;
-			$html .= $t_a."<b>".$iso19139Hash[10]['html']."</b>: ".$t_b.$iso19139Hash[10]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[7]['html']."</b>: ".$t_b.$iso19139Hash[7]['value'].$t_c;
-			$html .= $tableEnd;
-			$html .= '</fieldset>';
+			if ($iso19139Hash[3]['value'] == 'dataset' || $iso19139Hash[3]['value'] == 'series') {
+				$html .= '<fieldset><legend>'._mb("Format").'</legend>';
+				$html .= $tableBegin;
+				$html .= $t_a."<b>".$iso19139Hash[34]['html']."</b>: ".$t_b.$iso19139Hash[34]['value'].$t_c;
+				$html .= $t_a."<b>".$iso19139Hash[35]['html']."</b>: ".$t_b.$iso19139Hash[35]['value'].$t_c;
+				$html .= $tableEnd;
+				$html .= '</fieldset>';
+			}
+			if ($iso19139Hash[3]['value'] == 'service') {
+				$html .= '<fieldset><legend>'._mb("Service information").'</legend>';
+				$html .= $tableBegin;
+				$html .= $t_a."<b>".$iso19139Hash[10]['html']."</b>: ".$t_b.$iso19139Hash[10]['value'].$t_c;
+				$html .= $t_a."<b>".$iso19139Hash[7]['html']."</b>: ".$t_b.$iso19139Hash[7]['value'].$t_c;
+				$html .= $tableEnd;
+				$html .= '</fieldset>';
+			}
 			$html .= '</p>';
 			$html .= '</div>';//element
 			//***************************************************************************
@@ -578,17 +588,19 @@
 				$html .= '<div>';
 			}
 			$html .= '<p>';
-			$html .= '<fieldset><legend>'._mb("Lineage").'</legend>';
-			$html .= $tableBegin;
-			$html .= $t_a."<b>".$iso19139Hash[17]['html']."</b>: ".$t_b.$iso19139Hash[17]['value'].$t_c;
-			$html .= $tableEnd;
-			$html .= '</fieldset>';
-			$html .= '<fieldset><legend>'._mb("Resolution").'</legend>';
-			$html .= $tableBegin;
-			$html .= $t_a."<b>".$iso19139Hash[18]['html']."</b>: ".$t_b.$iso19139Hash[18]['value'].$t_c;
-			$html .= $t_a."<b>".$iso19139Hash[19]['html']."</b>: ".$t_b.$iso19139Hash[19]['value'].$t_c;
-			$html .= $tableEnd;
-			$html .= '</fieldset>';
+			if ($iso19139Hash[3]['value'] == 'dataset' || $iso19139Hash[3]['value'] == 'series') {
+				$html .= '<fieldset><legend>'._mb("Lineage").'</legend>';
+				$html .= $tableBegin;
+				$html .= $t_a."<b>".$iso19139Hash[17]['html']."</b>: ".$t_b.$iso19139Hash[17]['value'].$t_c;
+				$html .= $tableEnd;
+				$html .= '</fieldset>';
+				$html .= '<fieldset><legend>'._mb("Resolution").'</legend>';
+				$html .= $tableBegin;
+				$html .= $t_a."<b>".$iso19139Hash[18]['html']."</b>: ".$t_b.$iso19139Hash[18]['value'].$t_c;
+				$html .= $t_a."<b>".$iso19139Hash[19]['html']."</b>: ".$t_b.$iso19139Hash[19]['value'].$t_c;
+				$html .= $tableEnd;
+				$html .= '</fieldset>';
+			}
 			$html .= '<fieldset><legend>'._mb("Validity").'</legend>';
 			$html .= $tableBegin;
 			$html .= $t_a."<b>".$iso19139Hash[20]['html']."</b>: ".$t_b.$iso19139Hash[20]['value'].$t_c;
@@ -599,7 +611,7 @@
 			$html .= '</p>';
 			$html .= '</div>';//element
 			//***************************************************************************
-			//**************************quality part begin******************************
+			//**************************Interfaces part begin******************************
 			//generate div tags for the content - the divs are defined in the array
 			if ($layout == 'accordion') {
 				$html .= '<h3><a href="#">'._mb("Interfaces").'</a></h3>';
@@ -612,12 +624,27 @@
 				$html .= '<h3>'._mb("Interfaces").'</h3>';
 				$html .= '<div>';
 			}
-			$html .= '<p>';
+			$html .= '<fieldset><legend>'._mb("Online access").'</legend>';
+			$html .= $tableBegin;
+			$html .= $t_a."<b>".$iso19139Hash[4]['html']."</b>: ".$t_b."<a href='".$iso19139Hash[4]['value']."' target='_blank'>".$iso19139Hash[4]['value']."</a>".$t_c;
+			if ($iso19139Hash[3]['value'] == 'service' && $iso19139Hash[10]['value'] == 'download') {
+					//show link to own atom feed download client
+					//push ATOM Service feed url to client	
+					if (defined("MAPBENDER_PATH") && MAPBENDER_PATH != '' && parse_url($iso19139Hash[4]['value'])) {	
+						$html .= $t_a."<b>"._mb("ATOM Feed client")."</b>: ".$t_b."<a href='".MAPBENDER_PATH."/plugins/mb_downloadFeedClient.php?url=".urlencode($iso19139Hash[4]['value'])."' target='_blank'>"._mb("Download")."</a>".$t_c;
+					}
+					
+			}
+			$html .= $tableEnd;
+			$html .= '</fieldset>';
+			$html .= '</p>';
+			
 			$html .= '<fieldset><legend>'._mb("Metadata").'</legend>';
 			$html .= $tableBegin;
 			//exchange mdtype html with iso19139
 			//$queryNew = str_replace("mdtype=html","mdtype=iso19139",$_SERVER['QUERY_STRING']);
-			//$html .= $t_a."<b>"._mb("ISO19139")."</b>: <a href='".$url."' target='_blank'>"._mb("Metadata")."</a><a href='".$_SERVER['PHP_SELF']."?".$queryNew."&validate=true' target='_blank'><img style='border: none;' src = '../img/misc/icn_inspire_validate.png' title='"._mb("INSPIRE Validator")."'></a>".$t_c;
+			$html .= $t_a."<b>"._mb("ISO19139")."</b>: <a href='".$this->href."' target='_blank'>"._mb("Metadata")."</a>".$t_c;
+			//<a href='".$_SERVER['PHP_SELF']."?".$queryNew."&validate=true' target='_blank'><img style='border: none;' src = '../img/misc/icn_inspire_validate.png' title='"._mb("INSPIRE Validator")."'></a>
 			//push xml instead of html? But there is no real url
 			$html .= $tableEnd;
 			$html .= '</fieldset>';

Modified: trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2013-08-02 09:28:33 UTC (rev 8685)
+++ trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2013-08-05 10:44:33 UTC (rev 8686)
@@ -5,7 +5,10 @@
 #db_select_db(DB,$con);
 require_once(dirname(__FILE__)."/../classes/class_connector.php");
 require_once(dirname(__FILE__)."/../php/mod_validateInspire.php");
-require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
+require_once(dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf");
+require_once(dirname(__FILE__) . "/../classes/class_iso19139.php");
+//INSPIRE Mapping
+require_once(dirname(__FILE__)."/../../conf/isoMetadata.conf");
 $languageCode = "de";
 $layout = "tabs";
 //get language parameter out of mapbender session if it is set else set default language to de_DE
@@ -105,8 +108,6 @@
     }
 }
 
-//INSPIRE Mapping
-require_once(dirname(__FILE__)."/../../conf/isoMetadata.conf");
 $sql_csw = "SELECT * from gp_csw WHERE csw_id = $1 ORDER BY csw_id";
 
 #do db select
@@ -190,14 +191,12 @@
 $openSearchObject = new connector($url);
 #get results
 $openSearchDetail = $openSearchObject->file;
-
-
 //solve problem with xlink namespace for href attributes:
 $openSearchDetail = str_replace('xlink:href', 'xlinkhref', $openSearchDetail);
 #http://forums.devshed.com/php-development-5/simplexml-namespace-attributes-problem-452278.html
 #http://www.leftontheweb.com/message/A_small_SimpleXML_gotcha_with_namespaces
 
-
+$md_ident = $iso19139Hash;
 #$openSearchDetail = str_replace('xmlns=', 'ns=', $openSearchDetail);
 $openSearchDetailXML=simplexml_load_string($openSearchDetail);
 #extract objects to iso19139 elements
@@ -225,337 +224,23 @@
 }
 
 $j=0;
-//switch ($os_list[0] ['version']) {
-    	//case 2:
-//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']);
-			for ($i = 0; $i < count($resultOfXpath); $i++) {
-				$md_ident[$a]['value'] = $md_ident[$a]['value'].",".$resultOfXpath[$i];
-			}
-			$md_ident[$a]['value'] = ltrim($md_ident[$a]['value'],',');
-		}
-	/*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;	
-		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++;			
-	} 
-	break;
-}*/
 
+for($a = 0; $a < count($md_ident); $a++) {
+	$resultOfXpath = $openSearchDetailXML->xpath('/csw:GetRecordByIdResponse'.$md_ident[$a]['iso19139']);
+	for ($i = 0; $i < count($resultOfXpath); $i++) {
+		$md_ident[$a]['value'] = $md_ident[$a]['value'].",".$resultOfXpath[$i];
+	}
+	$md_ident[$a]['value'] = ltrim($md_ident[$a]['value'],',');
+}
+
 //generate output for different parameters mdtype
 
 switch ($_REQUEST["mdtype"]) {
 	case "html":
-		$html = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$languageCode.'">';
-		$html .= '<body>';
-		$metadataStr .= '<head>' . 
-		'<title>'._mb("Metadata").'</title>' . 
-		'<meta name="description" content="'._mb("Metadata").'" xml:lang="'.$languageCode.'" />'.
-		'<meta name="keywords" content="'._mb("Metadata").'" xml:lang="'.$languageCode.'" />'	.	
-		'<meta http-equiv="cache-control" content="no-cache">'.
-		'<meta http-equiv="pragma" content="no-cache">'.
-		'<meta http-equiv="expires" content="0">'.
-		'<meta http-equiv="content-language" content="'.$languageCode.'" />'.
-		'<meta http-equiv="content-style-type" content="text/css" />'.
-		'<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">' . 	
-		'</head>';
-		$html .= $metadataStr;
-		//define the javascripts to include
-		$html .= '<link type="text/css" href="../css/metadata.css" rel="Stylesheet" />';
-		if ($layout == 'tabs') {
-			$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';	
-			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
-			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
-			//initialize tabs
-			$html .= '<script type="text/javascript">';
-			$html .= '$(function() {';
-			$html .= '	$("#tabs").tabs();';
-			$html .= '});';
-			$html .= '</script>';
-			//independently define the headers of the parts
-			$html .= '<div class="demo">';
-			$html .= '<div id="tabs">';
-			$html .= '<ul>';
-			$html .= 	'<li><a href="#tabs-1">'._mb("Overview").'</a></li>';
-			$html .= 	'<li><a href="#tabs-2">'._mb("Properties").'</a></li>';
-			$html .= 	'<li><a href="#tabs-3">'._mb("Contact").'</a></li>';
-			$html .= 	'<li><a href="#tabs-4">'._mb("Terms of use").'</a></li>';
-			$html .= 	'<li><a href="#tabs-5">'._mb("Quality").'</a></li>';
-			$html .= 	'<li><a href="#tabs-6">'._mb("Interfaces").'</a></li>';
-			$html .= '</ul>';
-		}
-		if ($layout == 'accordion') {
-			$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.4.custom.css" rel="Stylesheet" />';	
-			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
-			$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
-			//define the javascript functions
-			$html .= '<script type="text/javascript">';
-			$html .= '	$(function() {';
-			$html .= '		$("#accordion").accordion();';
-			//$html .= '		$("#accordion").accordion({ autoHeight: false});';
-			//$html .= '		$("#accordion").accordion({ autoHeight: false , clearStyle: true });';
-			$html .= '	});';
-			$html .= '	</script>';
-			$html .= '<div class="demo">';
-			$html .= '<div id="accordion">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<div class="demo">';
-			$html .= '<div id="plain">';
-		}
-		//some placeholders
-		$tableBegin =  "<table>\n";
-		$t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
-		$t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
-		$t_c = "\n\t\t</td>\n\t</tr>\n";
-		$tableEnd = "</table>\n";
-		//**************************overview part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Overview").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-1">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("overview").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Metadata").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[0]['html']."</b>: ".$t_b.$md_ident[0]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[31]['html']."</b>: ".$t_b.$md_ident[31]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[32]['html']."</b>: ".$t_b.$md_ident[32]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Identification").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[1]['html']."</b>: ".$t_b.$md_ident[1]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[2]['html']."</b>: ".$t_b.$md_ident[2]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[3]['html']."</b>: ".$t_b.$md_ident[3]['value'].$t_c;
-		if ($md_ident[36]['value'] != "") {
-			$html .= $t_a."<b>".$md_ident[36]['html']."</b>: ".$t_b."<img width=120 height=120 src = '".$md_ident[36]['value']."'>".$t_c;//preview
-		}
-		$html .= $t_a."<b>".$md_ident[5]['html']."</b>: ".$t_b.$md_ident[5]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[6]['html']."</b>: ".$t_b.$md_ident[6]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		
-		$bbox = explode(',',$md_ident[12]['value']);
-
-		if (count($bbox) == 4) {
-			$wgs84Bbox = $bbox[0].",".$bbox[2].",".$bbox[1].",".$bbox[3];
-			$getMapUrl = getExtentGraphic(explode(",", $wgs84Bbox));
-			$html .= '<fieldset><legend>'._mb("Extent").'</legend>';
-			if (defined('EXTENTSERVICEURL')) {
-				$html .= "<img src='".$getMapUrl."'>";
-			} else {
-				$html .= _mb('Graphic unavailable');
-			}
-			$html .= '</fieldset>';
-			
-		}
-		
-		$html .= '<fieldset><legend>'._mb("Contact").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-		//**************************properties part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Properties").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-2">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("Properties").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Common").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[8]['html']."</b>: ".$t_b.$md_ident[8]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[9]['html']."</b>: ".$t_b.$md_ident[9]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[11]['html']."</b>: ".$t_b.$md_ident[11]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Geographic extent").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[33]['html']."</b>: ".$t_b.$md_ident[33]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[12]['html']."</b>: ".$t_b.$md_ident[12]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Temporal extent").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[13]['html']."</b>: ".$t_b.$md_ident[13]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[14]['html']."</b>: ".$t_b.$md_ident[14]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[15]['html']."</b>: ".$t_b.$md_ident[15]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[16]['html']."</b>: ".$t_b.$md_ident[16]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Format").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[34]['html']."</b>: ".$t_b.$md_ident[34]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[35]['html']."</b>: ".$t_b.$md_ident[35]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Service information").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[10]['html']."</b>: ".$t_b.$md_ident[10]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[7]['html']."</b>: ".$t_b.$md_ident[7]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-		//**************************contact part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Properties").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-3">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("Properties").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Data/Service provider").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[26]['html']."</b>: ".$t_b.$md_ident[26]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[28]['html']."</b>: ".$t_b.$md_ident[28]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[27]['html']."</b>: ".$t_b.$md_ident[27]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Metadata provider").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[29]['html']."</b>: ".$t_b.$md_ident[29]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[30]['html']."</b>: ".$t_b.$md_ident[30]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-		//**************************terms of use part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Terms of use").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-4">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("Terms of use").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Conditions").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[23]['html']."</b>: ".$t_b.$md_ident[23]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Access constraints").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[24]['html']."</b>: ".$t_b.$md_ident[24]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[25]['html']."</b>: ".$t_b.$md_ident[25]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-		//**************************quality part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Quality").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-5">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("Quality").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Lineage").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[17]['html']."</b>: ".$t_b.$md_ident[17]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Resolution").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[18]['html']."</b>: ".$t_b.$md_ident[18]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[19]['html']."</b>: ".$t_b.$md_ident[19]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		$html .= '<fieldset><legend>'._mb("Validity").'</legend>';
-		$html .= $tableBegin;
-		$html .= $t_a."<b>".$md_ident[20]['html']."</b>: ".$t_b.$md_ident[20]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[21]['html']."</b>: ".$t_b.$md_ident[21]['value'].$t_c;
-		$html .= $t_a."<b>".$md_ident[22]['html']."</b>: ".$t_b.$md_ident[22]['value'].$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-//**************************quality part begin******************************
-		//generate div tags for the content - the divs are defined in the array
-		if ($layout == 'accordion') {
-			$html .= '<h3><a href="#">'._mb("Interfaces").'</a></h3>';
-			$html .= '<div style="height:300px">';
-		}
-		if ($layout == 'tabs') {
-			$html .= '<div id="tabs-6">';
-		}
-		if ($layout == 'plain') {
-			$html .= '<h3>'._mb("Interfaces").'</h3>';
-			$html .= '<div>';
-		}
-		$html .= '<p>';
-		$html .= '<fieldset><legend>'._mb("Metadata").'</legend>';
-		$html .= $tableBegin;
-		//exchange mdtype html with iso19139
-		$queryNew = str_replace("mdtype=html","mdtype=iso19139",$_SERVER['QUERY_STRING']);
-		$html .= $t_a."<b>"._mb("ISO19139")."</b>: <a href='".$url."' target='_blank'>"._mb("Metadata")."</a><a href='".$_SERVER['PHP_SELF']."?".$queryNew."&validate=true' target='_blank'><img style='border: none;' src = '../img/misc/icn_inspire_validate.png' title='"._mb("INSPIRE Validator")."'></a>".$t_c;
-		$html .= $tableEnd;
-		$html .= '</fieldset>';
-		
-		$html .= '</p>';
-		$html .= '</div>';//element
-		//***************************************************************************
-		$html .= '</div>'; //accordion
-		$html .= '</div>'; //demo
-		$html .= '</body>';
-		$html .= '</html>';
+		$mbMetadata = new Iso19139();
+		$mbMetadata->readFromUrl($url);
+		$html = $mbMetadata->transformToHtml('tabs','de');
+		header("Content-type: text/html; charset=UTF-8");
 		echo $html;
 		die();
 	break;
@@ -603,7 +288,6 @@
 		echo "</table></html>";
 }
 
-
 if ($_REQUEST['mdtype']=='html'){
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">

Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php	2013-08-02 09:28:33 UTC (rev 8685)
+++ trunk/mapbender/http/php/mod_showMetadata.php	2013-08-05 10:44:33 UTC (rev 8686)
@@ -1100,13 +1100,14 @@
 		$downloadOptionsConnector = new connector("http://localhost".$_SERVER['SCRIPT_NAME']."/../mod_getDownloadOptions.php?id=".$row["uuid"]);
 		$downloadOptions = json_decode($downloadOptionsConnector->file);
 		//var_dump($downloadOptions);
-
-		$metadataList .= "<a href='../php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"]."'>".$row["uuid"]."</a> <a href='../php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"]."&validate=true'>".$translation['validate']."</a>";
 		if (defined("MAPBENDER_PATH") && MAPBENDER_PATH != '') { 
 			$mapbenderUrl = MAPBENDER_PATH;
 		} else {
 			$mapbenderUrl = "http://www.geoportal.rlp.de/mapbender";
 		}
+		//$metadataList .= "<a href='../php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"]."'>".$row["uuid"]."</a> <a href='../php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"]."&validate=true'>".$translation['validate']."</a>";
+		$metadataList .= "<a href='../php/mod_iso19139ToHtml.php?url=".urlencode($mapbenderUrl."/php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"])."'>".$row["uuid"]."</a> <a href='../php/mod_dataISOMetadata.php?outputFormat=iso19139&id=".$row["uuid"]."&validate=true'>".$translation['validate']."</a>";
+		
 		if ($downloadOptions != null) {
 			foreach ($downloadOptions->{$row["uuid"]}->option as $option) {
 				switch ($option->type) {
@@ -1296,11 +1297,16 @@
 if ($resource == 'wms' or $resource == 'layer'){
 
 	$html .= $t_a.$translation['mapbenderCapabilities'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['mapbenderCapabilities']."\");'>".$t_c;
+
+
+
 $capUrl = $resourceMetadata['wms_getcapabilities'].getConjunctionCharacter($resourceMetadata['wms_getcapabilities']).'REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS';
 
 	//show only original url if the resource is not secured!
-	if (!$resourceSecured) {
+	if (!$resourceSecured) {	
 		$html .= $t_a.$translation['originalCapabilities'].$t_b."<a href = '".$capUrl."' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$capUrl."\",\"".$translation['mapbenderCapabilities']."\");'>".$t_c;
+
+		
 	}
 
 	$html .= $t_a.$translation['inspireCapabilities'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a> <img src='../img/osgeo_graphics/geosilk/link.png' onclick='showCapabilitiesUrl(\"".$mapbenderBaseUrl.$_SERVER['PHP_SELF']."/../wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"."\",\"".$translation['inspireCapabilities']."\");'>".$t_c;



More information about the Mapbender_commits mailing list