Commit c4ff2bcc authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Minor namespace changes

parent 080a82e1
......@@ -31,7 +31,7 @@ public class Handlers {
protected org.fao.geonet.api.records.formatters.groovy.Functions f
protected Environment env
Matchers matchers
iso19139.Functions isofunc
iso19139.MERIDIAN.Functions isofunc
common.Handlers commonHandlers
List<String> packageViews
String rootEl = 'gmi:MI_Metadata'
......@@ -41,7 +41,7 @@ public class Handlers {
this.f = f
this.env = env
commonHandlers = new common.Handlers(handlers, f, env)
isofunc = new iso19139.Functions(handlers: handlers, f:f, env:env, commonHandlers: commonHandlers)
isofunc = new iso19139.MERIDIAN.Functions(handlers: handlers, f:f, env:env, commonHandlers: commonHandlers)
matchers = new Matchers(handlers: handlers, f:f, env:env)
packageViews = [
'gmd:identificationInfo', 'gmd:metadataMaintenance', 'gmd:metadataConstraints', 'gmd:spatialRepresentationInfo',
......
......@@ -12,8 +12,8 @@ xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:MER="https://meridian.cs.dal.
exclude-result-prefixes="gmd gmx gco gml srv geonet gmi xlink xsl dwc dwr dcterms MER">
<xsl:import href="../iso19139/index-fields/default.xsl"/>
<xsl:include href="../../iso19139/convert/functions.xsl"/>
<xsl:import href=".index-fields/default.xsl"/>
<xsl:include href="./convert/functions.xsl"/>
<!-- this for the MCP-custom DataParameter section.
<xsl:template mode="index" match="mcp:dataParameters/mcp:DP_DataParameters/mcp:dataParameter">
......
......@@ -15,7 +15,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
exclude-result-prefixes="#all">
<!--<xsl:import href="../iso19139/index-fields/default.xsl"/>-->
<!--<xsl:import href="./index-fields/default.xsl"/>-->
<xsl:include href="../convert/functions.xsl"/>
<xsl:include href="inspire-util.xsl" />
<xsl:include href="../../../xsl/utils-fn.xsl"/>
......
......@@ -125,7 +125,7 @@ xmlns:geonet="http://www.fao.org/geonetwork"
<!-- Create a first document representing the main record. -->
<doc>
<documentType>metadata</documentType>
<documentStandard>iso19139</documentStandard>
<documentStandard>iso19139.MERIDIAN</documentStandard>
<!-- Index the metadata document as XML -->
<document>
......
......@@ -43,7 +43,7 @@ xmlns:dwr="http://rs.tdwg.org/dwc/dwcrecord/"
xmlns:MER="https://meridian.cs.dal.ca/"
xmlns:ogc="http://www.opengis.net/rdf#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:iso19139="http://geonetwork-opensource.org/schemas/iso19139"
xmlns:iso19139.MERIDIAN="http://geonetwork-opensource.org/schemas/iso19139"
version="2.0"
extension-element-prefixes="saxon" exclude-result-prefixes="#all">
......@@ -61,7 +61,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<!-- FIME : $url comes from a global variable. -->
<xsl:template match="gmi:MI_Metadata|*[@gco:isoType='gmd:MD_Metadata']" mode="record-reference">
<!-- TODO : a metadata record may contains aggregate. In that case create one dataset per aggregate member. -->
<dcat:dataset rdf:resource="{$url}/resource/{iso19139:getResourceCode(.)}"/>
<dcat:dataset rdf:resource="{$url}/resource/{iso19139.MERIDIAN:getResourceCode(.)}"/>
<dcat:record rdf:resource="{$url}/metadata/{gmd:fileIdentifier/gco:CharacterString}"/>
</xsl:template>
......@@ -79,7 +79,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
-->
<dcat:CatalogRecord rdf:about="{$url}/metadata/{gmd:fileIdentifier/gco:CharacterString}">
<!-- Link to a dcat:Dataset or a rdf:Description for services and feature catalogue. -->
<foaf:primaryTopic rdf:resource="{$url}/resource/{iso19139:getResourceCode(.)}"/>
<foaf:primaryTopic rdf:resource="{$url}/resource/{iso19139.MERIDIAN:getResourceCode(.)}"/>
<!-- Metadata change date.
"The date is encoded as a literal in "YYYY-MM-DD" form (ISO 8601 Date and Time Formats)." -->
......@@ -137,9 +137,9 @@ xmlns:MER="https://meridian.cs.dal.ca/"
select="//gmd:MD_Keywords[(gmd:thesaurusName)]/gmd:keyword/gco:CharacterString" group-by=".">
<!-- FIXME maybe only do that, if keyword URI is available (when xlink is used ?) -->
<skos:Concept
rdf:about="{$url}/thesaurus/{iso19139:getThesaurusCode(../../gmd:thesaurusName)}/{encode-for-uri(.)}">
rdf:about="{$url}/thesaurus/{iso19139.MERIDIAN:getThesaurusCode(../../gmd:thesaurusName)}/{encode-for-uri(.)}">
<skos:inScheme
rdf:resource="{$url}/thesaurus/{iso19139:getThesaurusCode(../../gmd:thesaurusName)}"/>
rdf:resource="{$url}/thesaurus/{iso19139.MERIDIAN:getThesaurusCode(../../gmd:thesaurusName)}"/>
<skos:prefLabel>
<xsl:value-of select="."/>
</skos:prefLabel>
......@@ -228,7 +228,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
select="//gmd:CI_ResponsibleParty[gmd:organisationName/gco:CharacterString=current-grouping-key()]"
group-by="gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString">
<foaf:member
rdf:resource="{$url}/organization/{encode-for-uri(iso19139:getContactId(.))}"/>
rdf:resource="{$url}/organization/{encode-for-uri(iso19139.MERIDIAN:getContactId(.))}"/>
</xsl:for-each-group>
</foaf:Organization>
</xsl:for-each-group>
......@@ -240,7 +240,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
xpath: //gmd:CI_ResponsibleParty-->
<foaf:Agent rdf:about="{$url}/person/{encode-for-uri(iso19139:getContactId(.))}">
<foaf:Agent rdf:about="{$url}/person/{encode-for-uri(iso19139.MERIDIAN:getContactId(.))}">
<xsl:if test="gmd:individualName/gco:CharacterString">
<foaf:name>
<xsl:value-of select="gmd:individualName/gco:CharacterString"/>
......@@ -274,7 +274,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<xsl:template
match="srv:SV_ServiceIdentification|*[contains(@gco:isoType, 'SV_ServiceIdentification')]"
mode="to-dcat">
<rdf:Description rdf:about="{$url}/resource/{iso19139:getResourceCode(../../.)}">
<rdf:Description rdf:about="{$url}/resource/{iso19139.MERIDIAN:getResourceCode(../../.)}">
<xsl:call-template name="to-dcat"/>
</rdf:Description>
</xsl:template>
......@@ -288,7 +288,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
-->
<xsl:template match="MER:MD_DataIdentification|*[contains(@gco:isoType, 'MD_DataIdentification')]"
mode="to-dcat">
<dcat:Dataset rdf:about="{$url}/resource/{iso19139:getResourceCode(../../.)}">
<dcat:Dataset rdf:about="{$url}/resource/{iso19139.MERIDIAN:getResourceCode(../../.)}">
<xsl:call-template name="to-dcat"/>
</dcat:Dataset>
</xsl:template>
......@@ -298,7 +298,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<xsl:template name="to-dcat">
<!-- "A unique identifier of the dataset." -->
<dct:identifier>
<xsl:value-of select="iso19139:getResourceCode(../../.)"/>
<xsl:value-of select="iso19139.MERIDIAN:getResourceCode(../../.)"/>
</dct:identifier>
<!-- xpath: gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*/gmd:code -->
......@@ -334,7 +334,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
select="gmd:descriptiveKeywords/gmd:MD_Keywords[(gmd:thesaurusName)]/gmd:keyword/gco:CharacterString">
<!-- FIXME maybe only do that, if keyword URI is available (when xlink is used ?) -->
<dcat:theme
rdf:resource="{$url}/thesaurus/{iso19139:getThesaurusCode(../../gmd:thesaurusName)}/{.}"/>
rdf:resource="{$url}/thesaurus/{iso19139.MERIDIAN:getThesaurusCode(../../gmd:thesaurusName)}/{.}"/>
</xsl:for-each>
<!-- xpath: gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gmx:Anchor -->
<!-- xpath: gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharaceterString -->
......@@ -531,7 +531,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<!--
Get resource (dataset or service) identifier if set and return metadata UUID if not.
-->
<xsl:function name="iso19139:getResourceCode" as="xs:string">
<xsl:function name="iso19139.MERIDIAN:getResourceCode" as="xs:string">
<xsl:param name="metadata" as="node()"/>
<xsl:value-of select="if ($metadata/gmd:identificationInfo/*/gmd:citation/*/gmd:identifier/*/gmd:code/gco:CharacterString!='')
......@@ -543,7 +543,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<!--
Get thesaurus identifier, otherCitationDetails value, citation @id or thesaurus title.
-->
<xsl:function name="iso19139:getThesaurusCode" as="xs:string">
<xsl:function name="iso19139.MERIDIAN:getThesaurusCode" as="xs:string">
<xsl:param name="thesaurusName" as="node()"/>
<xsl:value-of select="if ($thesaurusName/*/gmd:otherCitationDetails/*!='') then $thesaurusName/*/gmd:otherCitationDetails/*
......@@ -554,7 +554,7 @@ xmlns:MER="https://meridian.cs.dal.ca/"
<!--
Get contact identifier (for the time being = email and node generated identifier if no email available)
-->
<xsl:function name="iso19139:getContactId" as="xs:string">
<xsl:function name="iso19139.MERIDIAN:getContactId" as="xs:string">
<xsl:param name="responsibleParty" as="node()"/>
<xsl:value-of select="if ($responsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString!='')
......
......@@ -60,7 +60,7 @@
For example, gmd:abstract is identified by identification.abstract.
-->
<xsl:variable name="elementKey"
select="concat('iso19139.',
select="concat('iso19139.MERIDIAN',
string-join(
./ancestor-or-self::*[count(ancestor::*) mod 2 != 0 ]/
local-name(), '.')
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:import href="../../iso19139/process/sources-add.xsl"/>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:import href="../../iso19139/process/sources-remove.xsl"/>
</xsl:stylesheet>
......@@ -28,7 +28,7 @@
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gn-fn-iso19139="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
xmlns:gn-fn-iso19139.MERIDIAN="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
xmlns:geonet="http://www.fao.org/geonetwork"
xmlns:java="java:org.fao.geonet.util.XslUtil"
version="2.0" exclude-result-prefixes="#all">
......
......@@ -29,7 +29,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:saxon="http://saxon.sf.net/"
xmlns:gn-fn-iso19139="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
xmlns:gn-fn-iso19139.MERIDIAN="http://geonetwork-opensource.org/xsl/functions/profiles/iso19139"
xmlns:geonet="http://www.fao.org/geonetwork"
xmlns:java="java:org.fao.geonet.util.XslUtil"
extension-element-prefixes="saxon"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment