Skip to content

metadata101/dcat-ap.vl

Repository files navigation

DCAT-AP Schema Plugin for GeoNetwork

This repository contains a DCAT-AP VL v2.0 schema plugin for GeoNetwork.

Reference documents

Description

This plugin has the following features:

  • XML Schema for DCAT-AP: GeoNetwork is capable of storing metadata in XML format. The plugin therefore defines its own XML Schema (see the schema folder) for DCAT-AP that is used for the internal representation of DCAT-AP fields. To limit the data conversion needed, the XML Schema was designed to fully resemble an XML/RDF syntax of DCAT-AP.
  • indexing: The plugin maximally populates GeoNetwork's existing index fields for a consistent search experience.
  • editing: A custom form was created following the guidance in the GeoNetwork form customization guide. The form uses the controlled vocabularies required by DCAT-AP. These are located in the folderthesauri and can be imported in to GeoNetwork as SKOS classification systems using standard GeoNetwork functionality.
  • viewing: A custom 'full view' to visualise DCAT-AP records.
  • multilingual metadata support: The editor, view, and search benefit from the already existing multilingual capabilities of GeoNetwork.
  • validation (XSD and Schematron): Validation steps are first XSD validation made on the schema, then the schematron validation defined in folder dcat2/schematron. Two rule sets are available: schematron-rules-dcat2, and schematron-rules-metadata-dcat-recommendations.

Installing the plugin

Adding the plugin to the source code

To include this schema plugin in a build, copy the dcat2 schema folder in the schemas folder, add it to the schemas/pom.xml and add it to the copy-schemas execution in web/pom.xml.

The best approach is to add the plugin as a submodule into GeoNetwork schema module.

cd schemas
git submodule add <dcat2 remote URL> dcat2
git submodule init
git submodule update

Add the new module to the schemas/pom.xml:

<modules>
  <!-- ... -->
  <module>dcat2</module>
</modules>

Add the dependency in the web module in web/pom.xml:

<dependency>
  <groupId>org.geonetwork-opensource.schemas</groupId>
  <artifactId>gn-schema-dcat2</artifactId>
  <version>${project.version}</version>
</dependency>

Note that versions need to be updated to correspond to GeoNetwork version updates. This is applicable in dcat2/pom.xml and can be automated by running mvn versions:update-child-modules after merges of GeoNetwork:

<parent>
  <artifactId>gn-schemas</artifactId>
  <groupId>org.geonetwork-opensource.schemas</groupId>
  <version>x.y.z</version>
</parent>

Add the module to the webapp in web/pom.xml:

<execution>
  <id>unpack-schemas</id>
  <phase>process-resources</phase>
  <goals><goal>unpack</goal></goals>
  <configuration>
    <encoding>UTF-8</encoding>
    <artifactItems>
      <!-- ... -->
      <artifactItem>
        <groupId>org.geonetwork-opensource.schemas</groupId>
        <artifactId>gn-schema-dcat2</artifactId>
        <type>zip</type>
        <overWrite>false</overWrite>
        <outputDirectory>${schema-plugins.dir}</outputDirectory>
      </artifactItem>
    </artifactItems>
  </configuration>
</execution>

Commit these changes.

Apply the patches to the geonetwork core. You may need to manually apply specific hunks of a patch.

# go to top-level core-geonetwork
cd ..
git am --ignore-space-change --ignore-whitespace --reject --whitespace=fix schemas/dcat2/core-geonetwork-patches/*.patch

Build and run the application following the Software Development Documentation. You'll need to have Java JDK 11 and Maven installed.

Samples and templates can be imported via the 'Admin Console' > 'Metadata and Templates' > 'dcat2' menu.

Make sure to import the thesauri located in schemas/dcat2/resources/thesauri as they are required for editing dcat2 records.

Metadata rules: metadata identifier

The plugin uses dct:identifier to store a uuid that is used as (internal) metadata identifier. The metadata identifier is stored in the element dcat:CatalogRecord/dct:identifier. When saving a record, this uuid is appended to the dataset URI, provided that the metadata (template) contains a dataset URI that ends with a uuid and the record is not harvested.

<dcat:CatalogRecord rdf:about="https://metadata.vlaanderen.be/srv/api/records/818c2174-4f26-48b6-8f76-b51bb9cbc4e8">
  <dct:identifier>818c2174-4f26-48b6-8f76-b51bb9cbc4e8</dct:identifier>
  <!-- ... -->
</dcat:CatalogRecord>

Community

Comments and questions to the issue tracker.

More work required

This plugin would merit further improvements in at least the following areas:

  • Default view: the default view currently does not display all the relevant information

Contributors

  • Dirk Debaere (Digitaal Vlaanderen)
  • Mathias De Schrijver (Digitaal Vlaanderen)
  • Geraldine Nolf (Digitaal Vlaanderen)
  • Bart Cosyn (Digitaal Vlaanderen)
  • Stijn Van Speybroeck (Digitaal Vlaanderen)
  • Joachim Nielandt (Digitaal Vlaanderen)
  • Gustaaf Vandeboel (GIM)
  • Mathieu Chaussier (GIM)
  • Stijn Goedertier (GIM)
  • Mathieu Van Wambeke (GIM)
  • An Heirman (GIM)

Acknowledgement

The work on this schema plugin was funded by and carried out in close collaboration with Digitaal Vlaanderen.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published