wiki:proposals/vocabTransformation

Version 2 (modified by fxp, 12 years ago) ( diff )

--

Configurable thesaurus concept selection

Date 2011-10-26
Contact(s) Francois Prunayre
Status Being discussed, in progress, initial implementation in progress
Assigned to release 2.9.x
Resources Available
Ticket # #XYZ
Github dev branch https://github.com/fxprunayre/core-geonetwork/commits/feature/registers-transformations

Overview

This proposal aims to improve keyword selection and extend the use of concept to define other element than keyword (eg. use a concept to add a keyword or an extent). For this, it provides ways to configure:

  • which thesaurus is available for which fields
  • which transformation is available (eg. add keywords using gco:CharacterString or XLink).

A new customized widget will be created in order to provide multiple ways of adding concepts:

Proposal Type

  • Type: GUI Change, Schema Change
  • App: GeoNetwork
  • Module: Schema
  • Documents:

Voting History

  • Vote not yet proposed.

Motivations

Proposal

Adding transformations

XSL transformations mapped raw format for keyword to a XML snippet of the target schema. They are defined per schema plugins in a convert/thesaurus-transformation.xsl.

  <xsl:include href="blanks/metadata-schema01/convert/thesaurus-transformation.xsl"/>

This transformation file define as many template as required:

<xsl:template name="to-iso19139-keyword">
  <xsl:param name="withAnchor" select="false()"/>
  <xsl:param name="withXlink" select="false()"/>

  <gmd:MD_Keywords>
...

Naming convention for template: to-{schemaIdentifier}-{outputDescription}.

The raw format is the following and remains unchanged with previous GeoNetwork release:

<keyword>
  <selected>false</selected>
  <id>0</id>
  <value language="eng">Agricultural and aquaculture facilities</value>
  <definition language="eng"/>
  <defaultLang>eng</defaultLang>
  <thesaurus>
     <key>external.theme.inspire-theme</key>
     <title>GEMET - INSPIRE themes, version 1.0</title>
     <date>2008-06-01</date>
     <type>theme</type>
     <url>http://localhost:8080/geonetwork/srv/en/thesaurus.download?ref=external.theme.inspire-theme</url>
  </thesaurus>
  <uri>http://rdfdata.eionet.europa.eu/inspirethemes/themes/22</uri>
  <values>
     <value language="eng">Agricultural and aquaculture facilities</value>
  </values>
  <definitions>
     <definition language="eng"/>
  </definitions>
</keyword>

Using the transformation

A transformation parameter is added to the xml.keyword.get service in order to choose the mapping to use. For example, to create a gmd:descriptiveKeyword section in ISO19139, 3 transformations are defined:

http://localhost:8080/geonetwork/srv/eng/xml.keyword.get?thesaurus=external.theme.inspire-theme&id=http://rdfdata.eionet.europa.eu/inspirethemes/themes/22,http://rdfdata.eionet.europa.eu/inspirethemes/themes/30&multiple=true&transformation=to-iso19139-keyword

  • ISO19139 with Anchor:

http://localhost:8080/geonetwork/srv/eng/xml.keyword.get?thesaurus=external.theme.inspire-theme&id=http://rdfdata.eionet.europa.eu/inspirethemes/themes/22,http://rdfdata.eionet.europa.eu/inspirethemes/themes/30&multiple=true&transformation=to-iso19139-keyword-with-anchor

  • ISO19139 with XLink:

http://localhost:8080/geonetwork/srv/eng/xml.keyword.get?thesaurus=external.theme.inspire-theme&id=http://rdfdata.eionet.europa.eu/inspirethemes/themes/22,http://rdfdata.eionet.europa.eu/inspirethemes/themes/30&multiple=true&transformation=to-iso19139-keyword-as-xlink

  • ISO19139 extent element :

http://localhost:8080/geonetwork/srv/eng/xml.keyword.get?thesaurus=external.place.regions&id=http://geonetwork-opensource.org/regions%232&multiple=true&transformation=to-iso19139-extent

Define which transformations to use according to the element type

Transformations are available according to element type:

<!-- 
registerAssociation : hold associations between elements ISO element and the thesaurus to propose for that element.
-->
<registerAssociation registerId="local://thesaurus/external.place.regions" element="gmd:extent"/> 
<registerAssociation registerId="local://thesaurus/external.place.regions" element="gmd:descriptiveKeywords"/>
<registerAssociation registerId="local://thesaurus/external.theme.inspire-theme" element="gmd:descriptiveKeywords"/>

<!-- 
registerTransformation : hold associations between elements ISO element and the template to use for its transformation from SKOS format.
-->
<registerTransformation element="gmd:extent" xslTpl='to-iso19139-gmd_extent'/>
<registerTransformation element="gmd:descriptiveKeywords" xslTpl='to-iso19139-keywords'/>
<registerTransformation element="gmd:descriptiveKeywords" xslTpl='to-iso19139-keywords-with-anchor'/>
<registerTransformation element="gmd:descriptiveKeywords" xslTpl='to-iso19139-keywords-as-xlink'/>

A new service is added to retrieve the list of transformation:

  • schema.register.get?schema={schemaIdentifier}&element={elementName}

Editor widget for adding elements

Widget configuration:

  • renderTo : null if popup mode, identifier of the DOM element for inline mode
  • elementType : element type to edit (eg. gmd:descriptiveKeywords)
  • transformations : array of transformations (use to override the server configuration)
  • thesaurus : array of thesaurus (use to override the server configuration)
  • defaultThesaurus : thesaurus identifier to select by default (null by default)
  • keywords : Store of select keyword (uri, value, thesaurus, xmin, ymin, xmax, ymax)
  • lang : search language (default is GUI language)
  • allowSearch : display search filter or not (default is true)
  • searchOnLoad : trigger search on load
<div class='thesaurusPicker' config='...'/>

Backwards Compatibility Issues

More improvements required:

  • multilingual metadata

Backwards Compatibility Issues

New libraries added

None.

Risks

Everything involves some element of risk....

Participants

  • Francois Prunayre
  • Others?

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.