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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 2 02:28:33 PDT 2013


Author: armin11
Date: 2013-08-02 02:28:33 -0700 (Fri, 02 Aug 2013)
New Revision: 8685

Added:
   trunk/mapbender/conf/isoMetadata.conf
   trunk/mapbender/http/php/mod_iso19139ToHtml.php
Modified:
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
   trunk/mapbender/http/javascripts/mb_downloadFeedClient.js
   trunk/mapbender/http/php/mod_dataISOMetadata.php
Log:
Some code cleaning and a central function so show iso19139 files as html - to be extended

Added: trunk/mapbender/conf/isoMetadata.conf
===================================================================
--- trunk/mapbender/conf/isoMetadata.conf	                        (rev 0)
+++ trunk/mapbender/conf/isoMetadata.conf	2013-08-02 09:28:33 UTC (rev 8685)
@@ -0,0 +1,561 @@
+<?php
+//Mapping hashtable for parsing iso19139 xml files e.g. for INSPIRE
+$iso19139Hash = array(
+//Metadata Identifier - not neccessary
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "unique resource identifier",
+	inspiremandatory => "false",
+	iso_name => "fileIdentifier",
+	html => _mb("Metadata identifier"),
+	value => "",
+	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
+array(	ibus => "rtitle",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "resource title",
+	inspiremandatory => "true",
+	iso_name => "type",
+	html => _mb("Resource title"),
+	value => "",
+	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
+array(	ibus => "abstract",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "resource abstract",
+	inspiremandatory => "true",
+	iso_name => "description",
+	html => _mb("Resource abstract"),
+	value => "",
+	category => "identification",
+	description => _mb("This is a brief narrative summary of the content of the resource.")
+),
+//B 1.3
+array(	ibus => "rtype",
+	iso19139 => "/gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue",
+	iso19139explode => "false" ,
+	inspire => "resource type",
+	inspiremandatory => "true",
+	iso_name => "type",
+	html => _mb("Resource type"),
+	value => "",
+	category => "identification",
+	description => _mb("This is the type of resource being described by the metadata.")
+),
+//B 1.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" ,
+	inspire => "unique resource locator",
+	inspiremandatory => "true",
+	iso_name => "resourceLocator",
+	html => _mb("Resource locator"),
+	value => "",
+	category => "identification",
+	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
+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" ,
+	inspire => "unique resource identifier namespace",
+	inspiremandatory => "true",
+	iso_name => "dataset id",
+	html => _mb("Unique resource identifier id"),
+	value => "",
+	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
+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" ,
+	inspire => "unique resource identifier namespace",
+	inspiremandatory => "true",
+	iso_name => "dataset namespace",
+	html => _mb("Unique resource identifier namespace"),
+	value => "",
+	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
+//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",
+	iso19139explode => "false" ,
+	inspire => "coupled resource",
+	inspiremandatory => "true",
+	iso_name => "coupled resource",
+	html => _mb("Coupled resource"),
+	value => "",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue",
+	iso19139explode => "false" ,
+	inspire => "Language",
+	inspiremandatory => "true",
+	iso_name => "language",
+	html => _mb("Language"),
+	value => "",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode",
+	iso19139explode => "true" ,
+	inspire => "topic category",
+	inspiremandatory => "true",
+	iso_name => "topic category",
+	html => _mb("Topic category"),
+	value => "",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName",
+	iso19139explode => "false" ,
+	inspire => "spatial data service type",
+	inspiremandatory => "true",
+	iso_name => "topic category",
+	html => _mb("Spatial data service type"),
+	value => "",
+	category => "classification",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString",
+	iso19139explode => "true" ,
+	inspire => "keyword value",
+	inspiremandatory => "true",
+	iso_name => "keywordValue",
+	html => _mb("Keyword value"),
+	value => "",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/*/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/*/gco:Decimal",
+	iso19139explode => "true" ,
+	inspire => "geographic bounding box",
+	inspiremandatory => "true",
+	iso_name => "geographic bounding box",
+	html => _mb("Geographic bounding box"),
+	value => "",
+	category => "location",
+	description => _mb("This is the extent of the resource in the geographic space, given as a bounding box. The bounding box shall be expressed with westbound and eastbound longitudes, and southbound and northbound latitudes in decimal degrees, with a precision of at least two decimals.")
+),
+//B 5. Temporal reference
+//B 5.1 Temporal extent
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_EX_TemporalExtent/gmd:extent/gml:TimePeriod/*",
+	iso19139explode => "false" ,
+	inspire => "temporal extent",
+	inspiremandatory => "false",
+	iso_name => "Temporal extent",
+	html => _mb("Temporal extent"),
+	value => "",
+	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
+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" ,
+	inspire => "date of publication",
+	inspiremandatory => "true",
+	iso_name => "date of publication",
+	html => _mb("Date of publication"),
+	value => "",
+	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
+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" ,
+	inspire => "date of last revision",
+	inspiremandatory => "true",
+	iso_name => "date of last revision",
+	html => _mb("Date of last revision"),
+	value => "",
+	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
+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" ,
+	inspire => "date of creation",
+	inspiremandatory => "true",
+	iso_name => "date of creation",
+	html => _mb("Date of creation"),
+	value => "",
+	category => "actuality",
+	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
+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" ,
+	inspire => "lineage",
+	inspiremandatory => "true",
+	iso_name => "lineage",
+	html => _mb("Lineage"),
+	value => "",
+	category => "quality",
+	description => _mb("This is a statement on process history and/or overall quality of the spatial data set. Where appropriate it may include a statement whether the data set has been validated or quality assured, whether it is the official version (if multiple versions exist), and whether it has legal validity.")
+),
+
+//B 6.2 Spatial Resolution
+//B 6.2.1 equivalent scale 
+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" ,
+	inspire => "equivalent scale",
+	inspiremandatory => "true",
+	iso_name => "equivalent scale",
+	html => _mb("Equivalent scale"),
+	value => "",
+	category => "resolution",
+	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
+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" ,
+	inspire => "ground distance value",
+	inspiremandatory => "true",
+	iso_name => "groundDistanceValue",
+	html => _mb("Ground Distance Value"),
+	value => "",
+	category => "resolution",
+	description => _mb("A resolution distance shall be expressed as a numerical value associated with a unit of length.")
+),
+//B 6.2.2.1 ground distance value
+//TODO maybe everytime m? or parse the href ...
+//B 7. Conformity
+//B 7.1. Specification
+//B 7.1.1 Title
+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" ,
+	inspire => "Specification title",
+	inspiremandatory => "true",
+	iso_name => "Specification title",
+	html => _mb("Specification title"),
+	value => "",
+	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
+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" ,
+	inspire => "specification reference date",
+	inspiremandatory => "true",
+	iso_name => "Specification reference date",
+	html => _mb("Specification reference date"),
+	value => "",
+	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
+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" ,
+	inspire => "deegree of conformance",
+	inspiremandatory => "true",
+	iso_name => "Degree of conformance",
+	html => _mb("Degree of conformance"),
+	value => "",
+	category => "quality",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "conditions applying to access and use",
+	inspiremandatory => "true",
+	iso_name => "conditions applying to access and use",
+	html => _mb("Conditions applying to access and use"),
+	value => "",
+	category => "useconstraints",
+	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
+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" ,
+	inspire => "access constraints code",
+	inspiremandatory => "true",
+	iso_name => "access constraints code",
+	html => _mb("Access constraints code"),
+	value => "",
+	category => "useconstraints",
+	description => _mb("Code for access constraints")
+),
+
+//B 8.2.2 other constraints
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "other constraints",
+	inspiremandatory => "true",
+	iso_name => "other constraints",
+	html => _mb("Other constraints"),
+	value => "",
+	category => "useconstraints",
+	description => _mb("Other constraints")
+),
+//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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "responsible party name",
+	inspiremandatory => "true",
+	iso_name => "responsible party name",
+	html => _mb("Responsible party name"),
+	value => "",
+	category => "contact",
+	description => _mb("The name of the organisation as free text.")
+),
+//B 9.1.2 Responsible party email
+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" ,
+	inspire => "responsible party email",
+	inspiremandatory => "true",
+	iso_name => "responsible party email",
+	html => _mb("Responsible party email"),
+	value => "",
+	category => "contact",
+	description => _mb("A contact e-mail address as a character string.")
+),
+//B 9.2 Responsible party role
+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" ,
+	inspire => "responsible party role",
+	inspiremandatory => "true",
+	iso_name => "responsible party role",
+	html => _mb("Responsible party role"),
+	value => "",
+	category => "contact",
+	description => _mb("This is the role of the responsible organisation. The value domain of this metadata element is defined in Part D.")
+),
+//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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "metadata point of contact name",
+	inspiremandatory => "true",
+	iso_name => "Metadata point of contact name",
+	html => _mb("Metadata point of contact name"),
+	value => "",
+	category => "contact",
+	description => _mb("The name of the organisation as free text.")
+),
+//B 10.1.2 Metadata point of contact email
+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" ,
+	inspire => "metadata point of contact email",
+	inspiremandatory => "true",
+	iso_name => "Metadata point of contact email",
+	html => _mb("Metadata point of contact email"),
+	value => "",
+	category => "contact",
+	description => _mb("A contact e-mail address as a character string.")
+),
+//B 10.2. Metadata date
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:dateStamp/*",
+	iso19139explode => "false" ,
+	inspire => "metadata date",
+	inspiremandatory => "true",
+	iso_name => "Metadata date",
+	html => _mb("Metadata date"),
+	value => "",
+	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
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+	iso19139explode => "false" ,
+	inspire => "metadata language",
+	inspiremandatory => "true",
+	iso_name => "Metadata language",
+	html => _mb("Metadata language"),
+	value => "",
+	category => "metadata",
+	description => _mb("This is the language in which the metadata elements are expressed. The value domain of this metadata element is limited to the official languages of the Community expressed in conformity with ISO 639-2.")
+),
+//Additional Metadata Elements from the Data Specs
+//Metadata required for interoperability
+//TODO!!
+/*
+https://geo-ide.noaa.gov/wiki/index.php?title=ISO_Boilerplate
+<gmd:referenceSystemInfo>
+    <gmd:MD_ReferenceSystem>
+        <gmd:referenceSystemIdentifier>
+            <gmd:RS_Identifier>
+                <gmd:authority>
+                    <gmd:CI_Citation>
+                        <gmd:title>
+                            <gco:CharacterString>European Petroleum Survey Group (EPSG) Geodetic Parameter Registry</gco:CharacterString>
+                        </gmd:title>
+                        <gmd:date>
+                            <gmd:CI_Date>
+                                <gmd:date>
+                                    <gco:Date>2008-11-12</gco:Date>
+                                </gmd:date>
+                                <gmd:dateType>
+                                    <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode>
+                                </gmd:dateType>
+                            </gmd:CI_Date>
+                        </gmd:date>
+                        <gmd:citedResponsibleParty>
+                            <gmd:CI_ResponsibleParty>
+                                <gmd:organisationName>
+                                    <gco:CharacterString>European Petroleum Survey Group</gco:CharacterString>
+                                </gmd:organisationName>
+                                <gmd:contactInfo>
+                                    <gmd:CI_Contact>
+                                        <gmd:onlineResource>
+                                            <gmd:CI_OnlineResource>
+                                                <gmd:linkage>
+                                                    <gmd:URL>http://www.epsg-registry.org/</gmd:URL>
+                                                </gmd:linkage>
+                                            </gmd:CI_OnlineResource>
+                                        </gmd:onlineResource>
+                                    </gmd:CI_Contact>
+                                </gmd:contactInfo>
+                                <gmd:role gco:nilReason="missing"/>
+                            </gmd:CI_ResponsibleParty>
+                        </gmd:citedResponsibleParty>                            
+                    </gmd:CI_Citation>
+                </gmd:authority>
+                <gmd:code>
+                    <gco:CharacterString>urn:ogc:def:crs:EPSG:4326</gco:CharacterString>
+                </gmd:code>
+                <gmd:version>
+                    <gco:CharacterString>6.18.3</gco:CharacterString>
+                </gmd:version>
+            </gmd:RS_Identifier>
+        </gmd:referenceSystemIdentifier>
+    </gmd:MD_ReferenceSystem>
+</gmd:referenceSystemInfo>
+*/
+//1. Coordinate Reference System
+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" ,
+	inspire => "coordinate reference system",
+	inspiremandatory => "true",
+	iso_name => "coordinate reference system",
+	html => _mb("Coordinate reference system"),
+	value => "",
+	category => "dataspec",
+	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!
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "temporal reference system",
+		inspiremandatory => "true",
+		iso_name => "temporal reference system",
+		html => _mb("Temporal reference system"),
+		value => "",
+		category => "dataspec",
+		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
+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" ,
+	inspire => "encoding",
+	inspiremandatory => "true",
+	iso_name => "encoding",
+	html => _mb("Encoding"),
+	value => "",
+	category => "dataspec",
+	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
+	array(	ibus => "t01_object.obj_id",
+		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
+		iso19139explode => "false" ,
+		inspire => "topological Consistency",
+		inspiremandatory => "true",
+		iso_name => "topological Consistency",
+		html => _mb("Topological Consistency"),
+		value => "",
+		category => "dataspec",
+		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
+/*<gmd:characterSet>
+  <gmd:MD_CharacterSetCode
+    codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode"
+    codeListValue="UTF8">UTF8</gmd:MD_CharacterSetCode>
+</gmd:characterSet>
+*/
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue",
+	iso19139explode => "false" ,
+	inspire => "character Encoding",
+	inspiremandatory => "true",
+	iso_name => "character Encoding",
+	html => _mb("Character encoding"),
+	value => "",
+	category => "dataspec",
+	description => _mb("The character encoding used in the data set. This element is mandatory only if an encoding is used that is not based on UTF-8.")
+),
+
+//Preview (36)
+array(	ibus => "t01_object.obj_id",
+	iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString",
+	iso19139explode => "false" ,
+	inspire => "preview",
+	inspiremandatory => "false",
+	iso_name => "graphicOverview",
+	html => _mb("Preview"),
+	value => "",
+	category => "metadata",
+	description => _mb("Graphical overview of the resource.")
+)
+);
+?>

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2013-07-31 14:41:16 UTC (rev 8684)
+++ trunk/mapbender/http/classes/class_iso19139.php	2013-08-02 09:28:33 UTC (rev 8685)
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 require_once(dirname(__FILE__)."/../../core/globalSettings.php");
 require_once(dirname(__FILE__)."/class_connector.php");
-
+require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
 class Iso19139 {
 	//values for handling apriori ows metadataurls
 	var $fileIdentifier;
@@ -255,6 +255,9 @@
 			}
 			$iKeyword = 0;*/
 			//format
+			//lineage
+			$this->lineage = $iso19139Xml->xpath('/gmd:MD_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString');
+			$this->lineage = $this->lineage[0];
 			//inspire_charset
 			//inspire_top_consistence
 			//responsible_party
@@ -291,9 +294,9 @@
 
 	public function transformToHtml($layout,$languageCode){
 		//TODO!
-		//$this->metadata = $this->removeGetRecordTag($this->metadata);
+		$this->metadata = $this->removeGetRecordTag($this->metadata);
 		libxml_use_internal_errors(true);
-		
+		//TODO don't parse it again, but change the internal parser function!
 		try {
 			$iso19139Xml = simplexml_load_string($this->metadata);
 			if ($iso19139Xml === false) {
@@ -308,10 +311,9 @@
     			$err = new mb_exception("class_Iso19139:".$e->getMessage());
 			return "error";
 		}
-		
+		$err = new mb_exception("class_Iso19139: result of iso19139Xml: ". gettype($iso19139Xml));
 		//if parsing was successful
-		if ($iso19139Xml != false) {
-			return "ok";/*
+		if ($iso19139Xml !== false) {
 			$e = new mb_exception("Parsing of xml metadata file was successfull");
 			//register namespaces for parsing content
 			$iso19139Xml->registerXPathNamespace("csw", "http://www.opengis.net/cat/csw/2.0.2");
@@ -322,9 +324,11 @@
 			$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));
 			for($a = 0; $a < count($iso19139Hash); $a++) {
 				//TODO delete csw:... from following - only parse the metadata record itself
-				$resultOfXpath = $iso19139Xml->xpath('/csw:GetRecordByIdResponse'.$iso19139Hash[$a]['iso19139']);
+				//$resultOfXpath = $iso19139Xml->xpath('/csw:GetRecordByIdResponse'.$iso19139Hash[$a]['iso19139']);
+				$resultOfXpath = $iso19139Xml->xpath($iso19139Hash[$a]['iso19139']);
 				for ($i = 0; $i < count($resultOfXpath); $i++) {
 					$iso19139Hash[$a]['value'] = $iso19139Hash[$a]['value'].",".$resultOfXpath[$i];
 				}
@@ -434,7 +438,7 @@
 
 			if (count($bbox) == 4) {
 				$wgs84Bbox = $bbox[0].",".$bbox[2].",".$bbox[1].",".$bbox[3];
-				$getMapUrl = getExtentGraphic(explode(",", $wgs84Bbox));
+				$getMapUrl = $this->getExtentGraphic(explode(",", $wgs84Bbox));
 				$html .= '<fieldset><legend>'._mb("Extent").'</legend>';
 				if (defined('EXTENTSERVICEURL')) {
 					$html .= "<img src='".$getMapUrl."'>";
@@ -614,6 +618,7 @@
 			//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;
+			//push xml instead of html? But there is no real url
 			$html .= $tableEnd;
 			$html .= '</fieldset>';
 			$html .= '</p>';
@@ -623,7 +628,7 @@
 			$html .= '</div>'; //demo
 			$html .= '</body>';
 			$html .= '</html>';
-			return $html;*/
+			return $html;
 		}
 	}
 
@@ -1316,7 +1321,41 @@
 		}
 		return true;
 	}
-	
+
+	private function getExtentGraphic($layer_4326_box) {
+		$rlp_4326_box = array(6.05,48.9,8.6,50.96);
+		if ($layer_4326_box[0] <= $rlp_4326_box[0] || $layer_4326_box[2] >= $rlp_4326_box[2] || $layer_4326_box[1] <= $rlp_4326_box[1] || $layer_4326_box[3] >= $rlp_4326_box[3]) {
+			if ($layer_4326_box[0] < $rlp_4326_box[0]) {
+				$rlp_4326_box[0] = $layer_4326_box[0]; 
+			}
+			if ($layer_4326_box[2] > $rlp_4326_box[2]) {
+				$rlp_4326_box[2] = $layer_4326_box[2]; 
+			}
+			if ($layer_4326_box[1] < $rlp_4326_box[1]) {
+				$rlp_4326_box[1] = $layer_4326_box[1]; 
+			}
+			if ($layer_4326_box[3] > $rlp_4326_box[3]) {
+				$rlp_4326_box[3] = $layer_4326_box[3]; 
+			}
+
+			$d_x = $rlp_4326_box[2] - $rlp_4326_box[0]; 
+			$d_y = $rlp_4326_box[3] - $rlp_4326_box[1];
+			
+			$new_minx = $rlp_4326_box[0] - 0.05*($d_x);
+			$new_maxx = $rlp_4326_box[2] + 0.05*($d_x);
+			$new_miny = $rlp_4326_box[1] - 0.05*($d_y);
+			$new_maxy = $rlp_4326_box[3] + 0.05*($d_y);
+
+			if ($new_minx < -180) $rlp_4326_box[0] = -180; else $rlp_4326_box[0] = $new_minx;
+			if ($new_maxx > 180) $rlp_4326_box[2] = 180; else $rlp_4326_box[2] = $new_maxx;
+			if ($new_miny < -90) $rlp_4326_box[1] = -90; else $rlp_4326_box[1] = $new_miny;
+			if ($new_maxy > 90) $rlp_4326_box[3] = 90; else $rlp_4326_box[3] = $new_maxy;
+		}
+		$getMapUrl = EXTENTSERVICEURL."VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=".EXTENTSERVICELAYER."&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&minx=".$layer_4326_box[0]."&miny=".$layer_4326_box[1]."&maxx=".$layer_4326_box[2]."&maxy=".$layer_4326_box[3];
+		return $getMapUrl;
+	}
+
+
 	public function insertToDB($resourceType, $resourceId){
 		$result = array(); //value/message
 		switch ($this->origin) {

Modified: trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2013-07-31 14:41:16 UTC (rev 8684)
+++ trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2013-08-02 09:28:33 UTC (rev 8685)
@@ -106,567 +106,7 @@
 }
 
 //INSPIRE Mapping
-$md_ident = array(
-//Metadata Identifier - not neccessary?
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:fileIdentifier/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "unique resource identifier",
-		inspiremandatory => "false",
-		iso_name => "fileIdentifier",
-		html => _mb("Metadata identifier"),
-		value => "",
-		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
-	array(	ibus => "rtitle",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "resource title",
-		inspiremandatory => "true",
-		iso_name => "type",
-		html => _mb("Resource title"),
-		value => "",
-		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
-	array(	ibus => "abstract",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:abstract/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "resource abstract",
-		inspiremandatory => "true",
-		iso_name => "description",
-		html => _mb("Resource abstract"),
-		value => "",
-		category => "identification",
-		description => _mb("This is a brief narrative summary of the content of the resource.")
-	),
-//B 1.3
-	array(	ibus => "rtype",
-		iso19139 => "/gmd:MD_Metadata/gmd:hierarchyLevel/gmd:MD_ScopeCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "resource type",
-		inspiremandatory => "true",
-		iso_name => "type",
-		html => _mb("Resource type"),
-		value => "",
-		category => "identification",
-		description => _mb("This is the type of resource being described by the metadata.")
-	),
-//B 1.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" ,
-		inspire => "unique resource locator",
-		inspiremandatory => "true",
-		iso_name => "resourceLocator",
-		html => _mb("Resource locator"),
-		value => "",
-		category => "identification",
-		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
-	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" ,
-		inspire => "unique resource identifier namespace",
-		inspiremandatory => "true",
-		iso_name => "dataset id",
-		html => _mb("Unique resource identifier id"),
-		value => "",
-		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
-	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" ,
-		inspire => "unique resource identifier namespace",
-		inspiremandatory => "true",
-		iso_name => "dataset namespace",
-		html => _mb("Unique resource identifier namespace"),
-		value => "",
-		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
-//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",
-		iso19139explode => "false" ,
-		inspire => "coupled resource",
-		inspiremandatory => "true",
-		iso_name => "coupled resource",
-		html => _mb("Coupled resource"),
-		value => "",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:language/gmd:LanguageCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "Language",
-		inspiremandatory => "true",
-		iso_name => "language",
-		html => _mb("Language"),
-		value => "",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory/gmd:MD_TopicCategoryCode",
-		iso19139explode => "true" ,
-		inspire => "topic category",
-		inspiremandatory => "true",
-		iso_name => "topic category",
-		html => _mb("Topic category"),
-		value => "",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/srv:SV_ServiceIdentification/srv:serviceType/gco:LocalName",
-		iso19139explode => "false" ,
-		inspire => "spatial data service type",
-		inspiremandatory => "true",
-		iso_name => "topic category",
-		html => _mb("Spatial data service type"),
-		value => "",
-		category => "classification",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString",
-		iso19139explode => "true" ,
-		inspire => "keyword value",
-		inspiremandatory => "true",
-		iso_name => "keywordValue",
-		html => _mb("Keyword value"),
-		value => "",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/*/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox/*/gco:Decimal",
-		iso19139explode => "true" ,
-		inspire => "geographic bounding box",
-		inspiremandatory => "true",
-		iso_name => "geographic bounding box",
-		html => _mb("Geographic bounding box"),
-		value => "",
-		category => "location",
-		description => _mb("This is the extent of the resource in the geographic space, given as a bounding box. The bounding box shall be expressed with westbound and eastbound longitudes, and southbound and northbound latitudes in decimal degrees, with a precision of at least two decimals.")
-	),
-//B 5. Temporal reference
-//B 5.1 Temporal extent
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_EX_TemporalExtent/gmd:extent/gml:TimePeriod/*",
-		iso19139explode => "false" ,
-		inspire => "temporal extent",
-		inspiremandatory => "false",
-		iso_name => "Temporal extent",
-		html => _mb("Temporal extent"),
-		value => "",
-		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
-	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" ,
-		inspire => "date of publication",
-		inspiremandatory => "true",
-		iso_name => "date of publication",
-		html => _mb("Date of publication"),
-		value => "",
-		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
-	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" ,
-		inspire => "date of last revision",
-		inspiremandatory => "true",
-		iso_name => "date of last revision",
-		html => _mb("Date of last revision"),
-		value => "",
-		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
-	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" ,
-		inspire => "date of creation",
-		inspiremandatory => "true",
-		iso_name => "date of creation",
-		html => _mb("Date of creation"),
-		value => "",
-		category => "actuality",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:lineage/gmd:LI_Lineage/gmd:statement/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "lineage",
-		inspiremandatory => "true",
-		iso_name => "lineage",
-		html => _mb("Lineage"),
-		value => "",
-		category => "quality",
-		description => _mb("This is a statement on process history and/or overall quality of the spatial data set. Where appropriate it may include a statement whether the data set has been validated or quality assured, whether it is the official version (if multiple versions exist), and whether it has legal validity.")
-	),
-
-//B 6.2 Spatial Resolution
-//B 6.2.1 equivalent scale 
-	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" ,
-		inspire => "equivalent scale",
-		inspiremandatory => "true",
-		iso_name => "equivalent scale",
-		html => _mb("Equivalent scale"),
-		value => "",
-		category => "resolution",
-		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
-	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" ,
-		inspire => "ground distance value",
-		inspiremandatory => "true",
-		iso_name => "groundDistanceValue",
-		html => _mb("Ground Distance Value"),
-		value => "",
-		category => "resolution",
-		description => _mb("A resolution distance shall be expressed as a numerical value associated with a unit of length.")
-	),
-//B 6.2.2.1 ground distance value
-//TODO maybe everytime m? or parse the href ...
-//B 7. Conformity
-//B 7.1. Specification
-//B 7.1.1 Title
-	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" ,
-		inspire => "Specification title",
-		inspiremandatory => "true",
-		iso_name => "Specification title",
-		html => _mb("Specification title"),
-		value => "",
-		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
-	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" ,
-		inspire => "specification reference date",
-		inspiremandatory => "true",
-		iso_name => "Specification reference date",
-		html => _mb("Specification reference date"),
-		value => "",
-		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
-	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" ,
-		inspire => "deegree of conformance",
-		inspiremandatory => "true",
-		iso_name => "Degree of conformance",
-		html => _mb("Degree of conformance"),
-		value => "",
-		category => "quality",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "conditions applying to access and use",
-		inspiremandatory => "true",
-		iso_name => "conditions applying to access and use",
-		html => _mb("Conditions applying to access and use"),
-		value => "",
-		category => "useconstraints",
-		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
-	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" ,
-		inspire => "access constraints code",
-		inspiremandatory => "true",
-		iso_name => "access constraints code",
-		html => _mb("Access constraints code"),
-		value => "",
-		category => "useconstraints",
-		description => _mb("Code for access constraints")
-	),
-
-//B 8.2.2 other constraints
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:otherConstraints/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "other constraints",
-		inspiremandatory => "true",
-		iso_name => "other constraints",
-		html => _mb("Other constraints"),
-		value => "",
-		category => "useconstraints",
-		description => _mb("Other constraints")
-	),
-//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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:pointOfContact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "responsible party name",
-		inspiremandatory => "true",
-		iso_name => "responsible party name",
-		html => _mb("Responsible party name"),
-		value => "",
-		category => "contact",
-		description => _mb("The name of the organisation as free text.")
-	),
-//B 9.1.2 Responsible party email
-	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" ,
-		inspire => "responsible party email",
-		inspiremandatory => "true",
-		iso_name => "responsible party email",
-		html => _mb("Responsible party email"),
-		value => "",
-		category => "contact",
-		description => _mb("A contact e-mail address as a character string.")
-	),
-//B 9.2 Responsible party role
-	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" ,
-		inspire => "responsible party role",
-		inspiremandatory => "true",
-		iso_name => "responsible party role",
-		html => _mb("Responsible party role"),
-		value => "",
-		category => "contact",
-		description => _mb("This is the role of the responsible organisation. The value domain of this metadata element is defined in Part D.")
-	),
-//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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "metadata point of contact name",
-		inspiremandatory => "true",
-		iso_name => "Metadata point of contact name",
-		html => _mb("Metadata point of contact name"),
-		value => "",
-		category => "contact",
-		description => _mb("The name of the organisation as free text.")
-	),
-//B 10.1.2 Metadata point of contact email
-	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" ,
-		inspire => "metadata point of contact email",
-		inspiremandatory => "true",
-		iso_name => "Metadata point of contact email",
-		html => _mb("Metadata point of contact email"),
-		value => "",
-		category => "contact",
-		description => _mb("A contact e-mail address as a character string.")
-	),
-//B 10.2. Metadata date
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:dateStamp/*",
-		iso19139explode => "false" ,
-		inspire => "metadata date",
-		inspiremandatory => "true",
-		iso_name => "Metadata date",
-		html => _mb("Metadata date"),
-		value => "",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "metadata language",
-		inspiremandatory => "true",
-		iso_name => "Metadata language",
-		html => _mb("Metadata language"),
-		value => "",
-		category => "metadata",
-		description => _mb("This is the language in which the metadata elements are expressed. The value domain of this metadata element is limited to the official languages of the Community expressed in conformity with ISO 639-2.")
-	),
-
-//Additional Metadata Elements from the Data Specs
-//Metadata required for interoperability
-//TODO!!
-/*
-https://geo-ide.noaa.gov/wiki/index.php?title=ISO_Boilerplate
-<gmd:referenceSystemInfo>
-    <gmd:MD_ReferenceSystem>
-        <gmd:referenceSystemIdentifier>
-            <gmd:RS_Identifier>
-                <gmd:authority>
-                    <gmd:CI_Citation>
-                        <gmd:title>
-                            <gco:CharacterString>European Petroleum Survey Group (EPSG) Geodetic Parameter Registry</gco:CharacterString>
-                        </gmd:title>
-                        <gmd:date>
-                            <gmd:CI_Date>
-                                <gmd:date>
-                                    <gco:Date>2008-11-12</gco:Date>
-                                </gmd:date>
-                                <gmd:dateType>
-                                    <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode>
-                                </gmd:dateType>
-                            </gmd:CI_Date>
-                        </gmd:date>
-                        <gmd:citedResponsibleParty>
-                            <gmd:CI_ResponsibleParty>
-                                <gmd:organisationName>
-                                    <gco:CharacterString>European Petroleum Survey Group</gco:CharacterString>
-                                </gmd:organisationName>
-                                <gmd:contactInfo>
-                                    <gmd:CI_Contact>
-                                        <gmd:onlineResource>
-                                            <gmd:CI_OnlineResource>
-                                                <gmd:linkage>
-                                                    <gmd:URL>http://www.epsg-registry.org/</gmd:URL>
-                                                </gmd:linkage>
-                                            </gmd:CI_OnlineResource>
-                                        </gmd:onlineResource>
-                                    </gmd:CI_Contact>
-                                </gmd:contactInfo>
-                                <gmd:role gco:nilReason="missing"/>
-                            </gmd:CI_ResponsibleParty>
-                        </gmd:citedResponsibleParty>                            
-                    </gmd:CI_Citation>
-                </gmd:authority>
-                <gmd:code>
-                    <gco:CharacterString>urn:ogc:def:crs:EPSG:4326</gco:CharacterString>
-                </gmd:code>
-                <gmd:version>
-                    <gco:CharacterString>6.18.3</gco:CharacterString>
-                </gmd:version>
-            </gmd:RS_Identifier>
-        </gmd:referenceSystemIdentifier>
-    </gmd:MD_ReferenceSystem>
-</gmd:referenceSystemInfo>
-*/
-//1. Coordinate Reference System
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:RS_Identifier/gmd:code/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "coordinate reference system",
-		inspiremandatory => "true",
-		iso_name => "coordinate reference system",
-		html => _mb("Coordinate reference system"),
-		value => "",
-		category => "dataspec",
-		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!
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "temporal reference system",
-		inspiremandatory => "true",
-		iso_name => "temporal reference system",
-		html => _mb("Temporal reference system"),
-		value => "",
-		category => "dataspec",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:MD_DataIdentification/gmd:distributionInfo/gmd:MD_Distribution/gmd:distributionFormat/gmd:MD_Format/gmd:name/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "encoding",
-		inspiremandatory => "true",
-		iso_name => "encoding",
-		html => _mb("Encoding"),
-		value => "",
-		category => "dataspec",
-		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
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:language/gmd:LanguageCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "topological Consistency",
-		inspiremandatory => "true",
-		iso_name => "topological Consistency",
-		html => _mb("Topological Consistency"),
-		value => "",
-		category => "dataspec",
-		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
-/*<gmd:characterSet>
-  <gmd:MD_CharacterSetCode
-    codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode"
-    codeListValue="UTF8">UTF8</gmd:MD_CharacterSetCode>
-</gmd:characterSet>
-*/
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:characterSet/gmd:MD_CharacterSetCode/@codeListValue",
-		iso19139explode => "false" ,
-		inspire => "character Encoding",
-		inspiremandatory => "true",
-		iso_name => "character Encoding",
-		html => _mb("Character encoding"),
-		value => "",
-		category => "dataspec",
-		description => _mb("The character encoding used in the data set. This element is mandatory only if an encoding is used that is not based on UTF-8.")
-	),
-
-
-//Preview (36)
-	array(	ibus => "t01_object.obj_id",
-		iso19139 => "/gmd:MD_Metadata/gmd:identificationInfo/*/gmd:graphicOverview/gmd:MD_BrowseGraphic/gmd:fileName/gco:CharacterString",
-		iso19139explode => "false" ,
-		inspire => "preview",
-		inspiremandatory => "false",
-		iso_name => "graphicOverview",
-		html => _mb("Preview"),
-		value => "",
-		category => "metadata",
-		description => _mb("Graphical overview of the resource.")
-	)
-
-);
+require_once(dirname(__FILE__)."/../../conf/isoMetadata.conf");
 $sql_csw = "SELECT * from gp_csw WHERE csw_id = $1 ORDER BY csw_id";
 
 #do db select

Modified: trunk/mapbender/http/javascripts/mb_downloadFeedClient.js
===================================================================
--- trunk/mapbender/http/javascripts/mb_downloadFeedClient.js	2013-07-31 14:41:16 UTC (rev 8684)
+++ trunk/mapbender/http/javascripts/mb_downloadFeedClient.js	2013-08-02 09:28:33 UTC (rev 8685)
@@ -160,7 +160,7 @@
 			//add identifier anchor
 			identifierAnchor =  $(document.createElement('a')).appendTo('#dataset_identifier');
 			identifierAnchor.attr({'id':'dataset_identifier_link'});
-			identifierAnchor.attr({'href':featureCollection.features[i].properties.metadataLink});
+			identifierAnchor.attr({'href':'../php/mod_iso19139ToHtml.php?url='+encodeURIComponent(featureCollection.features[i].properties.metadataLink)});
 			identifierAnchor.text(featureCollection.features[i].properties.namespace+"#"+featureCollection.features[i].properties.code);
 		}
 		selectOptions = selectOptions+"<option value='"+featureCollection.features[i].properties.datasetFeedLink+"' url='"+featureCollection.features[i].properties.datasetFeedLink+"' optionid='"+i+"'>"+featureCollection.features[i].properties.title+"</option>";

Modified: trunk/mapbender/http/php/mod_dataISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_dataISOMetadata.php	2013-07-31 14:41:16 UTC (rev 8684)
+++ trunk/mapbender/http/php/mod_dataISOMetadata.php	2013-08-02 09:28:33 UTC (rev 8685)
@@ -357,7 +357,7 @@
 	$characterSet = $iso19139->createElement("gmd:characterSet");
 	$characterSetCode = $iso19139->createElement("gmd:MD_CharacterSetCode");
 	$characterSetCode->setAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_CharacterSetCode");
-	$characterSetCode->setAttribute("codeListValue", $mb_metadata['inspire_charset']);
+	$characterSetCode->setAttribute("codeListValue", "utf8");
 	$characterSet->appendChild($characterSetCode);
 	$characterSet = $MD_Metadata->appendChild($characterSet);
 
@@ -1102,6 +1102,16 @@
 	$language->appendChild($LanguageCode);
 	$MD_DataIdentification->appendChild($language);
 
+
+	#Part B 1.7 Dataset character encoding
+	$characterSet=$iso19139->createElement("gmd:characterSet");
+	$MD_CharacterSetCode=$iso19139->createElement("gmd:MD_CharacterSetCode");
+	$MD_CharacterSetCode->setAttribute("codeListValue", $mb_metadata['inspire_charset']);
+	$MD_CharacterSetCode->setAttribute("codeList", "http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode");
+	$characterSet->appendChild($MD_CharacterSetCode);
+	$MD_DataIdentification->appendChild($characterSet);
+
+
 /*
 <gmd:topicCategory>
 <gmd:MD_TopicCategoryCode>imageryBaseMapsEarthCover</gmd:MD_TopicCategoryCode>

Added: trunk/mapbender/http/php/mod_iso19139ToHtml.php
===================================================================
--- trunk/mapbender/http/php/mod_iso19139ToHtml.php	                        (rev 0)
+++ trunk/mapbender/http/php/mod_iso19139ToHtml.php	2013-08-02 09:28:33 UTC (rev 8685)
@@ -0,0 +1,17 @@
+<?php
+//http://localhost/mapbender_trunk/php/mod_iso19139ToHtml.php?url=http%3A%2F%2Fwww.geoportal.rlp.de%2Fmetadata%2Fdtk5.xml
+# License:
+# Copyright (c) 2009, Open Source Geospatial Foundation
+# This program is dual licensed under the GNU General Public License 
+# and Simplified BSD license.  
+# http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+require_once dirname(__FILE__) . "/../../core/globalSettings.php";
+require_once dirname(__FILE__) . "/../classes/class_iso19139.php";
+//show html from a given url
+$url = urldecode($_REQUEST['url']);
+$mbMetadata = new Iso19139();
+$mbMetadata->readFromUrl($url);
+$html = $mbMetadata->transformToHtml('tabs','de');
+header("Content-type: text/html; charset=UTF-8");
+echo $html;
+?>



More information about the Mapbender_commits mailing list