EasySDI v4.3+ GeoNetwork v3.1+ configuration

WARNING:
This page is for testing purpose only, GeoNetwork v3 is not yet officially supported !

This page is intended for GeoNetwork 3, if you use GeoNetwork 2 see here: GeoNetwork 2.6.3 configuration

Database configuration

By default, Geonetwork stores metadata in an H2 database. It is recommanded to change the database configuration to a more 'accessible' database like PostgreSQL or MySQL.
This configuration has to be done in:
  • webapps/geonetwork/WEB-INF/config-db/jdbc.properties (to set host, password,etc see README.md in the same folder)
  • webapps/geonetwork/WEB-INF/config-node/srv.xml (to set the correct DB driver)

For more details on GeoNetwork installation and configuration see official documentation here : http://geonetwork-opensource.org/docs.html

Field indexing for easySDI search

In webapps/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/index-fields create a file named index-subtemplate-easysdi.xsl
Containing:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" 
  xmlns:gmd="http://www.isotc211.org/2005/gmd" 
  xmlns:gco="http://www.isotc211.org/2005/gco" 
  xmlns:gml="http://www.opengis.net/gml" 
  xmlns:srv="http://www.isotc211.org/2005/srv" 
  xmlns:geonet="http://www.fao.org/geonetwork" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:gmx="http://www.isotc211.org/2005/gmx" 
  xmlns:skos="http://www.w3.org/2004/02/skos/core#" 
  xmlns:sdi="http://www.easysdi.org/2011/sdi">
  <!-- easySDI platform fields -->
    <xsl:template mode="index" match="//sdi:platform">
        <xsl:for-each select="@guid">
            <Field name="platform" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="@harvested">
            <Field name="harvested" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/@type">
            <Field name="resourcetype" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/@name">
            <Field name="resourcename" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/@organism">
            <Field name="resourceorganism" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/@scope">
            <Field name="scope" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:users/sdi:user/@guid">
            <Field name="sdiuser" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:organisms/sdi:organism/@guid">
            <Field name="sdiorganism" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:categories/sdi:category/@guid">
            <Field name="sdicategory" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>            
        <xsl:for-each select="sdi:resource/sdi:metadata/@state">
            <Field name="metadatastate" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/@lastVersion">
            <Field name="lastversion" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/@published">
            <Field name="published" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/@created">
            <Field name="created" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/sdi:diffusion/@isFree">
            <Field name="isfree" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/sdi:diffusion/@isDownloadable">
            <Field name="isdownloadable" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/sdi:diffusion/@isOrderable">
            <Field name="isorderable" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
        <xsl:for-each select="sdi:resource/sdi:metadata/sdi:visualization/@isViewable">
            <Field name="isviewable" string="{string(.)}" store="true" index="true"/>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>

In webapps/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/index-fields/default.xsl include the new file (4th line) :

    <xsl:include href="../convert/functions.xsl" />
    <xsl:include href="../../../xsl/utils-fn.xsl" />
    <xsl:include href="index-subtemplate-fields.xsl" />
    <xsl:include href="index-subtemplate-easysdi.xsl" />

In webapps/geonetwork/WEB-INF/config-lucene.xml, in the <tokenized> section add the sdi tokenized fields

TODO : Why do have all fields tokenized in previous doc ??? : https://forge.easysdi.org/projects/easysdi/wiki/Geonetwork_configuration#Configuring-index-fields

  <tokenized>
    <Field name="any"/>
    <Field name="anylight"/>
    <Field name="abstract"/>
    <Field name="title"/>
    <Field name="altTitle"/>
    <Field name="keywordType"/>
    <!--<Field name="orgName"/>-->
    <Field name="specificationTitle"/>
    <Field name="levelName"/>
    <Field name="subject"/>
    <!-- easySDI system fields -->
    <Field name="resourcename"/> 
  </tokenized>

Configuring Geonetwork to allow EasySDI metadatas to be harvested

Edit webapps/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/csw/iso-summary.xsl :
Add copy instruction of the 'sdi:platform' element in the following template :

<xsl:template match="gmd:MD_Metadata|*[@gco:isoType='gmd:MD_Metadata']">
    <xsl:variable name="info" select="geonet:info"/>
    <xsl:copy>
        <xsl:apply-templates select="gmd:fileIdentifier"/>
        <xsl:apply-templates select="gmd:language"/>
        <xsl:apply-templates select="gmd:characterSet"/>
        <xsl:apply-templates select="gmd:parentIdentifier"/>
        <xsl:apply-templates select="gmd:hierarchyLevel"/>
        <xsl:apply-templates select="gmd:hierarchyLevelName"/>
        <gmd:contact />
        <xsl:apply-templates select="gmd:dateStamp"/>
        <xsl:apply-templates select="gmd:metadataStandardName"/>
        <xsl:apply-templates select="gmd:metadataStandardVersion"/>
        <xsl:apply-templates select="gmd:referenceSystemInfo"/>
        <xsl:apply-templates select="gmd:identificationInfo"/>
        <xsl:apply-templates select="gmd:distributionInfo"/>
        <xsl:apply-templates select="gmd:dataQualityInfo"/>
        <xsl:apply-templates select="sdi:platform"/>

        <!-- GeoNetwork elements added when resultType is equal to results_with_summary -->
        <xsl:if test="$displayInfo = 'true'">
            <xsl:copy-of select="$info"/>
        </xsl:if>

    </xsl:copy>
</xsl:template>


Then add the corresponding sdi namespace in the declaration :

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                                xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" 
                                xmlns:gmd="http://www.isotc211.org/2005/gmd" 
                                xmlns:gco="http://www.isotc211.org/2005/gco" 
                                xmlns:srv="http://www.isotc211.org/2005/srv" 
                                xmlns:ows="http://www.opengis.net/ows" 
                                xmlns:geonet="http://www.fao.org/geonetwork" 
                                xmlns:sdi="http://www.easysdi.org/2011/sdi">