Skip to content

Commit

Permalink
Standard / DCAT (and profiles) export (#7600)
Browse files Browse the repository at this point in the history
* Standard / ISO / DCAT formatters

Proposal to better organize various flavor of DCAT. The target is to support:
* DCAT
* EU DCAT-AP
* EU DCAT-AP mobility
* EU GeoDCAT-AP.

* Formatter / DCAT / Improvements.

* Formatter / DCAT / Core.

* Formatter / DCAT / Core / Associated.

* Formatter / DCAT / Core / Lineage.

* Formatter / DCAT / Core / Dataset / Temporal.

* Formatter / DCAT / Core / Dataset / Distributions.

* Formatter / DCAT / Core / Dataset / Services.

* Formatter / DCAT / Core / Mulitlingual support.

* Formatter / DCAT / RDF valid model.

* Formatter / DCAT / Tests.

* Formatter / EU-DCAT-AP / CatalogRecord.

* Formatter / DCAT / Test dep.

* Formatter / EU-DCAT-AP / Draft with test.

* Added DCAT-AP validation with SHACL rules in FormatterApiTest.

* Library / Update Jena for SHACL validation (issue on various commons-codec versions)

* Formatter / EU-DCAT-AP / Improve shacl validation status - license and status.

* Formatter / EU-DCAT-AP / Improve shacl validation status - bytesize.

* Formatter / EU-DCAT-AP / Improve shacl validation status - 1 format, 1 accrualPeriodicity.

* Formatter / EU-DCAT-AP / Improve shacl validation status - license, accessRights and rights.

* Formatter / EU-DCAT-AP / Improve shacl validation status - dcat:theme from EU vocabulary as skos:Concept.

* Formatter / EU-DCAT-AP / Improve shacl validation status - primaryTopic is required even if isPrimaryTopic is defined. Only one rights allowed.

* Formatter / EU-DCAT-AP / Improve shacl validation status - only one dct:type allowed.

* Formatter / EU-DCAT-AP / Add 2.1.1 base shacl validation level.

* Formatter / EU-DCAT-AP / Validation / Shacl 2.1.1 / Success.

* Formatter / EU-DCAT-AP-HVD / Base conversion with HVD category

* Formatter / EU-DCAT-AP-HVD / Add Shacl validation - which is failing for now.

* Formatter / EU-GEODCAT-AP / CatalogRecord.

* Formatter / EU-GEODCAT-AP / Shacl validation.

* Formatter / DCAT / Declare ISO conformity for the source and DCAT-AP conformity for the CatalogueRecord.

* Formatter / DCAT / ISO19139 bridges.

* Added Mobility DCAT - Mobility Theme concept.

* CSW / Improve outputschema configuration and add DCAT outputs.

* CSW / Improve outputschema configuration / Add config for ISO19110 and ISO19139 (which is the same as 115-3)

* DCAT / Mobility / Remove unused import.

* Added Mobility DCAT - support of georefenrecingMethod, networkCoverage and transportMode.

* WIP mobility dcat - distribution

* Dependencies / Declare version in root pom.

* DCAT / ISO19139 / Fallback URI builder when no metadata linkage exist. To be discussed what is the best fallback. Former DCAT conversion was using a setting for resourcePrefix

* DCAT / Add formatters to test list.

* Standard / ISO / DCAT formatters / GeoDCAT-AP / Use dct:description instead of rdfs:label lfor potentially long texts SEMICeu/GeoDCAT-AP#108.

* Standard / ISO / DCAT formatters / EU-DCAT-AP / Update shacl validation rules to latests.

* Standard / ISO / DCAT formatters / Testing / Turn off shacl phase for now and pass test.

* Standard / ISO / DCAT formatters / EU-DCAT-AP / Use dct:provenance for lineage. DCAT core use versionNotes.

* Standard / ISO / DCAT formatters / Distributions / Do not repeat eleements from the resources by default eg. rights, license, resolution, applicable legislation.

* Standard / ISO / DCAT formatters / GeoDCAT-AP spatial representation technique TODO.

* Standard / ISO / DCAT formatters / GeoDCAT-AP spatialResolutionAsText TODO.

* Standard / ISO / DCAT formatters / adms:identifier / Schema Agency only if codespace is defined.

* Standard / ISO / DCAT formatters / Bytesize / Range changed to xsd:nonNegativeInteger SEMICeu/GeoDCAT-AP#91.

* Standard / ISO / DCAT formatters / GeoDCAT-AP element without mapping.

* Standard / ISO / DCAT formatters / HVD / Add applicable legislation.

* Standard / ISO / DCAT formatters / Assume individual name is not multilingual. Use first CharacterString or Anchor text element.

* Standard / ISO / DCAT formatters / Add references for org and individual.

* Standard / ISO / DCAT formatters / Cleanup. Remove validation mode which will be probably either shacl or schematron at some point.

* Standard / ISO / DCAT formatters / Refactor for easier object reference configuration. References are added to org, individual, keywords now.

* API / Formatter / If no output parameter is provided try to infer content type from formatter id. eg. DCAT are usually XML. Formatter with JSON in name are JSON.

* Standard / ISO / DCAT formatters / A bit closer to what EU-DCAT-AP SHACL rule expect. Tested with https://www.itb.ec.europa.eu/shacl/dcat-ap/upload. Difficulties to reproduce SHACL errors similar the the online validator. Could be related to not using the same SHACL rules or a difference with Jena validator?

* Standard / ISO / DCAT formatters / Shacl rules are now in the same folder. Fix path in comments

* Documentation / DCAT

* Documentation / DCAT / Image

* Standard / ISO / DCAT formatters / HVD extend DCAT-AP. Fix missing DCAT-AP theme (based on mapping from INSPIRE themes and topic category.

* Test / EU-DCAT-AP / SHACL / Fix Jena issue.

Related to SEMICeu/DCAT-AP#366.

* Standard / ISO / DCAT formatters / Fix range for MediaTypeOrExtent.

* Standard / ISO / DCAT formatters / SHACL / Rules are now working. Then we have to fix input document or decide to lose information on constraints.

* Standard / ISO / DCAT formatters / HVD / Fix test.

* Standard / ISO / DCAT formatters / Fix namespace of contactPoint.

* Standard / ISO / DCAT formatters / Better support multilingual records.

* Admin / CSW / Add more GET request examples.

* Standard / ISO / DCAT formatters / Fix namespace of contactPoint

* Standard / ISO / DCAT formatters / Better handle HVD concept by normalizing long labels.

* DCAT / Shacl rule update.

From SEMICeu/DCAT-AP@591fae6

* Standards / ISO / Formatters / DCAT / Multilingual / Do not output empty
text

```xml
<dcat:keyword xml:lang="fre">Observation</dcat:keyword>
<dcat:keyword xml:lang="eng">Observation</dcat:keyword>
<dcat:keyword xml:lang="fre">Observation par point</dcat:keyword>
<dcat:keyword xml:lang="eng"/>
```

* Standards / ISO / Formatters / DCAT / Distribution / Map taking into account protocol (and not only function).

* Standards / ISO / Formatters / DCAT / Period of time using beginPosition.

* Standards / ISO / Formatters / DCAT / Documentation and entry point for license mapping.

* Updated license mapping to map to EU licenses for dcat-ap profile (and keep original license in dcat-core) mapping done in dcat-core profile (trigger behaviour with variable in dcat-ap profile).

* Updated license mapping to map to EU licenses for dcat-ap profile (removed xsl messages)

* Standards / ISO / Formatters / DCAT / Update SEMICeu conversion - following GeoDCAT-AP 3 revision working group progress.

* Standards / ISO / Formatters / DCAT / Updates following GeoDCAT-AP working group meeting.

* Standards / ISO / Formatters / DCAT / Update SEMICeu conversion - fix template.

* Standards / ISO / Formatters / DCAT / Update SEMICeu conversion - more robust on CRS.

* Formatter / DCAT / ISO common name are unused for keywords  

Dedicated template exist in dcat-core-keyword

* Formatter / DCAT / Mobility DCAT improvement.

* Add mapping for referenceSystem
* Add test
* Disable distribution for now and delegate to DCAT-AP for now.

* Formatter / DCAT / accrualPeriodicity / Add support for userDefinedMaintenanceFrequency which can be mapped to mobility DCAT vocabulary https://mobilitydcat-ap.github.io/controlled-vocabularies/update-frequency/latest/index.html#.

* DCAT / Formatter / Simplify template for constraint

Match first resource constraints and then map to access and use elements.

* Formatter / DCAT / Improve mapping for organization with multiple individual.

* Formatter / DCAT / Mobility DCAT - improve accrual periodicity mapping.

Cardinality:
  * ISO 0..n
  * DCAT 0..n
  * DCAT-AP 0..1
  * Mobility DCAT 1..1 (in ISO either use corresponding period eg. P0Y0M0DT1H0M0S or extend the codelist with the proper vocabulary)

  accrualPeriodicity mapping done using the ISO to Dublin core value mapping
  but additional checks are done when ISO records extended the codelist and
  may used the EU Publication Office frequency codes
  or the Mobility DCAT-AP update frequency codes.
  Domain specific codelists take priority over the DC or ISO codelists.

  eg.
  <mmi:MD_MaintenanceFrequencyCode codeListValue="15min"/>

  multipleAccrualPeriodicityAllowed is a parameter that can be set to true to allow multiple accrualPeriodicity values.
  Default to false for EU formatters. true for DCAT.

* Missing test file update.

* Formatter / DCAT / Applicable legislations

https://semiceu.github.io/DCAT-AP/r5r/releases/3.0.0/#applicableLegislation

Add the element to DCAT-AP base. Element is 0..n in DCAT-AP and should be present in extensions
(mobility, hvd, geodcat).

HVD requires at least http://data.europa.eu/eli/reg_impl/2023/138/oj and
cardinality is 1..n.

Do not restrict to a particular legislation list. A sample vocabulary is
provided but it can be extended depending on catalogue domains.

* Formatter / DCAT / Identifier(s)

In DCAT and DCAT-AP, `dct:identifier` is 0..n.
Mobility DCAT restrict it to 0..1.

In DCAT-AP and extensions, only convert the first identifier as
`dct:identifier`; others as `adms:identifier`.

* Formatter / DCAT / Identifier / Urn

Use `:` separator for URN like identifiers.

* Formatter / DCAT / Map ISO language codes (bibliographic codes) to DCAT language codes (terminology codes)

* Formatter / DCAT / Map ISO language codes / Test.

---------

Co-authored-by: GeryNi <[email protected]>
Co-authored-by: Jose García <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent 7d97656 commit 5b01f64
Show file tree
Hide file tree
Showing 91 changed files with 36,594 additions and 109 deletions.
21 changes: 12 additions & 9 deletions core/src/main/java/org/fao/geonet/kernel/SchemaManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

/**
* Class that handles all functions relating to metadata schemas. This includes
Expand Down Expand Up @@ -106,6 +107,7 @@ public class SchemaManager {
private static int activeWriters = 0;
private Map<String, Schema> hmSchemas = new HashMap<>();
private Map<String, Namespace> hmSchemasTypenames = new HashMap<>();
private Map<String, String> cswOutputSchemas = new HashMap<>();
private String[] fnames = {"labels.xml", "codelists.xml", "strings.xml"};
private Path schemaPluginsDir;
private Path schemaPluginsCat;
Expand Down Expand Up @@ -958,6 +960,7 @@ private void addSchema(ApplicationContext applicationContext, Path schemaDir, El

if (mds.getSchemaPlugin() != null && mds.getSchemaPlugin().getCswTypeNames() != null) {
hmSchemasTypenames.putAll(mds.getSchemaPlugin().getCswTypeNames());
cswOutputSchemas.putAll(mds.getSchemaPlugin().getOutputSchemas());
}

// -- add cached xml files (schema codelists and label files)
Expand Down Expand Up @@ -1925,17 +1928,17 @@ public Map<String, Namespace> getHmSchemasTypenames() {
}

/**
* Return the list of namespace URI of all typenames declared in all schema plugins.
* Return the list of outputSchema declared in all schema plugins.
*/
public Map<String, String> getOutputSchemas() {
return cswOutputSchemas;
}

/**
* Return the list of namespace URI of all outputSchema declared in all schema plugins.
*/
public List<String> getListOfOutputSchemaURI() {
Iterator<String> iterator = hmSchemasTypenames.keySet().iterator();
List<String> listOfSchemaURI = new ArrayList<>();
while (iterator.hasNext()) {
String typeLocalName = iterator.next();
Namespace ns = hmSchemasTypenames.get(typeLocalName);
listOfSchemaURI.add(ns.getURI());
}
return listOfSchemaURI;
return new ArrayList<>(cswOutputSchemas.values());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

import static org.fao.geonet.kernel.setting.SettingManager.isPortRequired;

Expand Down Expand Up @@ -529,6 +530,8 @@ private void setOperationsParameters(Element capabilities) {
*/
private void populateTypeNameAndOutputSchema(Element op) {
Map<String, Namespace> typenames = _schemaManager.getHmSchemasTypenames();
List<String> outputSchemas = _schemaManager.getOutputSchemas().values().stream().sorted().collect(Collectors.toList());

List<Element> operations = op.getChildren("Parameter", Csw.NAMESPACE_OWS);
for (Element operation : operations) {
if ("typeNames".equals(operation.getAttributeValue("name"))) {
Expand All @@ -541,12 +544,10 @@ private void populateTypeNameAndOutputSchema(Element op) {
.setText(typename));
}
} else if ("outputSchema".equals(operation.getAttributeValue("name"))) {
for (Map.Entry<String, Namespace> entry : typenames.entrySet()) {
Namespace ns = entry.getValue();
operation.addNamespaceDeclaration(ns);
outputSchemas.forEach(uri ->
operation.addContent(new Element("Value", Csw.NAMESPACE_OWS)
.setText(ns.getURI()));
}
.setText(uri))
);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ public static String parse(String schema, SchemaManager schemaManager) throws In
if (schema.equals("csw:IsoRecord")) return "gmd";
if (schema.equals("own")) return "own";

Map<String, Namespace> typenames = schemaManager.getHmSchemasTypenames();
for (Map.Entry<String, Namespace> entry : typenames.entrySet()) {
Namespace ns = entry.getValue();
if (schema.equals(ns.getURI())) {
return ns.getPrefix();
Map<String, String> typenames = schemaManager.getOutputSchemas();
for (Map.Entry<String, String> entry : typenames.entrySet()) {
String ns = entry.getValue();
if (schema.equals(ns)) {
return entry.getKey();
}
}

throw new InvalidParameterValueEx("outputSchema",
String.format("'%s' schema is not valid. Supported values are %s",
String.format("'%s' output schema is not valid. Supported values are %s",
schema,
schemaManager.getListOfOutputSchemaURI().toString()));
}
Expand Down
14 changes: 8 additions & 6 deletions csw-server/src/main/java/org/fao/geonet/csw/common/util/Xml.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,24 @@ public static Element applyElementSetName(ServiceContext context, SchemaManager
ResultType resultType, String id, String displayLanguage) throws InvalidParameterValueEx {
Path schemaDir = schemaManager.getSchemaCSWPresentDir(schema);
Path styleSheet = schemaDir.resolve(outputSchema + "-" + elementSetName + ".xsl");
Path styleSheetWithoutElementSet = schemaDir.resolve(outputSchema + ".xsl");

if (!Files.exists(styleSheet)) {
if (!Files.exists(styleSheet) && !Files.exists(styleSheetWithoutElementSet)) {
throw new InvalidParameterValueEx("OutputSchema",
String.format(
"OutputSchema '%s' not supported for metadata with '%s' (%s).\nCorresponding XSL transformation '%s' does not exist for this schema.\nThe record will not be returned in response.",
outputSchema, id, schema, styleSheet.getFileName()));
"OutputSchema '%s' not supported for metadata with '%s' (%s).\nCorresponding XSL transformation '%s' (or '%s') does not exist for this schema.\nThe record will not be returned in response.",
outputSchema, id, schema, styleSheet.getFileName(), styleSheetWithoutElementSet.getFileName()));
} else {
Map<String, Object> params = new HashMap<>();
params.put("lang", displayLanguage);

Path xslFile = Files.exists(styleSheet) ? styleSheet : styleSheetWithoutElementSet;
try {
result = org.fao.geonet.utils.Xml.transform(result, styleSheet, params);
result = org.fao.geonet.utils.Xml.transform(result, xslFile, params);
} catch (Exception e) {
String msg = String.format(
"Error occured while transforming metadata with id '%s' using '%s'.",
id, styleSheet.getFileName());
"Error occurred while transforming metadata with id '%s' using '%s'.",
id, xslFile.getFileName());
context.error(msg);
context.error(" (C) StackTrace:\n" + Util.getStackTrace(e));
throw new InvalidParameterValueEx("OutputSchema", msg);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 122 additions & 15 deletions docs/manual/docs/api/rdf-dcat.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,131 @@
# RDF DCAT end point {#rdf-dcat}
# DCAT {#rdf-dcat}

!!! warning
The catalogue has the capability to convert ISO to DCAT format in various API endpoint. [The first implementation of DCAT output was done in 2012](https://trac.osgeo.org/geonetwork/wiki/proposals/DCATandRDFServices) and was targeting interaction with semantic service and semantic sitemap support. DCAT output was available using a service named `rdf.search`. This service was deprecated in version 4.0.0 in favor of producing DCAT output in the [Catalog Service for the Web (CSW)](csw.md) or using the formatters API.

Unavailable since version 4.0.0.

There is no known sponsor or interested party for implementing RDF DCAT.
Interested parties may contact the project team for guidance and to express their intent.

The RDF DCAT end point provides a way of getting information about the catalog, the datasets and services, and links to distributed resources in a machine-readable format. The formats of the output are based on DCAT, an RDF vocabulary that is designed to facilitate interoperability between web-based data catalogs.
## Supported DCAT profiles

Reference:
A base conversion is provided with complementary extensions for various profiles of DCAT developed in Europe:

* [Data Catalog Vocabulary (DCAT)](https://www.w3.org/TR/vocab-dcat-3/)
* a default DCAT export following W3C standard https://www.w3.org/TR/vocab-dcat-3/
* an extension for the European DCAT-AP https://semiceu.github.io/DCAT-AP/releases/3.0.0/
* an extension for the European GeoDCAT-AP https://semiceu.github.io/GeoDCAT-AP/releases/
* an extension for the European DCAT-AP-Mobility https://mobilitydcat-ap.github.io/mobilityDCAT-AP/releases/1.0.0/index.html
* an extension for the European DCAT-AP-HVD https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/

## Upgrading from GeoNetwork 3.0 Guidance
The mapping is done from ISO19115-3 to DCAT*. An ISO19139 to ISO19115-3 conversion can be applied before if needed.

RDF DCAT API is no longer available.
[The SEMICeu XSLT conversion](https://github.com/SEMICeu/iso-19139-to-dcat-ap/blob/master/iso-19139-to-dcat-ap.xsl)) is also included with minor improvements. This conversion is from ISO19139 to RDF and if needed a conversion from ISO19115-3 is applied.

1. We recommend migrating to use of [Catalog Service for the Web (CSW)](csw.md) API to query and explore data.
## Usage in the formatters API

2. When downloading using `GetRecord` make use of the `application/rdf+xml; charset=UTF-8` output format.

This will allow retrieving records in the same document format as previously provided by RDF DCAT api.
Each DCAT formats are available using a formatter eg. http://localhost:8080/geonetwork/srv/api/records/be44fe5a-65ca-4b70-9d29-ac5bf1f0ebc5/formatters/eu-dcat-ap?output=xml

To add the formatter in the record view download list, the user interface configuration can be updated:

![image](img/dcat-in-download-menu.png)

```json
{
"mods": {
"search": {
"downloadFormatter": [
{
"label": "exportMEF",
"url": "/formatters/zip?withRelated=false",
"class": "fa-file-zip-o"
},
{
"label": "exportPDF",
"url": "/formatters/xsl-view?output=pdf&language=${lang}",
"class": "fa-file-pdf-o"
},
{
"label": "exportXML",
"url": "/formatters/xml",
"class": "fa-file-code-o"
},
{
"label": "DCAT",
"url": "/formatters/dcat?output=xml"
},
{
"label": "EU-DCAT-AP",
"url": "/formatters/eu-dcat-ap?output=xml"
},
{
"label": "EU-GEO-DCAT-AP",
"url": "/formatters/eu-geodcat-ap?output=xml"
},
{
"label": "EU-DCAT-AP-MOBILITY",
"url": "/formatters/eu-dcat-ap-mobility?output=xml"
},
{
"label": "EU-DCAT-AP-HVD",
"url": "/formatters/eu-dcat-ap-hvd?output=xml"
}
]
```


## Usage in the CSW service

All DCAT profiles are also accessible using CSW protocol.

A `GetRecordById` operation can be used: http://localhost:8080/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&ID=da165110-88fd-11da-a88f-000d939bc5d8&outputSchema=https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/ and is equivalent to the API http://localhost:8080/geonetwork/srv/api/records/da165110-88fd-11da-a88f-000d939bc5d8/formatters/eu-dcat-ap-hvd?output=xml.

A `GetRecords` operation can be used to retrieve a set of records: http://localhost:8080/geonetwork/srv/fre/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecords&outputSchema=http://data.europa.eu/930/&elementSetName=full&resultType=results&maxRecords=300

Use the `outputSchema` parameter to select the DCAT profile to use. The following values are supported:

```xml
<ows:Parameter name="outputSchema">
<ows:Value>http://data.europa.eu/930/</ows:Value>
<ows:Value>http://data.europa.eu/930/#semiceu</ows:Value>
<ows:Value>http://data.europa.eu/r5r/</ows:Value>
<ows:Value>http://standards.iso.org/iso/19115/-3/mdb/2.0</ows:Value>
<ows:Value>http://www.isotc211.org/2005/gfc</ows:Value>
<ows:Value>http://www.isotc211.org/2005/gmd</ows:Value>
<ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value>
<ows:Value>http://www.w3.org/ns/dcat#</ows:Value>
<ows:Value>http://www.w3.org/ns/dcat#core</ows:Value>
<ows:Value>https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/</ows:Value>
<ows:Value>https://w3id.org/mobilitydcat-ap</ows:Value>
```

Those values are listed in the `GetCapabilities` operation http://localhost:8080/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities.

## Usage in OGC API Records

For the time being, OGC API Records provides a simplified DCAT output (based on the index document).

## DCAT validation

The DCAT validation can be done using online validation tool:
* https://www.itb.ec.europa.eu/shacl/dcat-ap/upload

Depending on the target DCAT profile to use, it may be required to build proper ISO template and metadata record containing all required fields. Usually profiles are adding constraints for usage of specific vocabularies and fields (eg. [for High Value datasets, specific vocabularies are defined for categories, license, applicable legislations, ...](https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/#controlled-vocabularies-to-be-used)).


## Mapping considerations

The mapping is done from ISO19115-3 to DCAT. The mapping may not cover all usages and may be adapted. This can be done in the `iso19115-3.2018` schema plugin in the `formatter/dcat*` XSLT files.

Some points under discussion are:
* Object vs Reference:
* Should we use object or reference for some fields (eg. contact, organisation, ...)?
* What should be the reference URI?
* Where is defined the reference URI in ISO?

eg. for an organisation, the URI will be the first value in the following sequence:
```xml
(cit:partyIdentifier/*/mcc:code/*/text(),
cit:contactInfo/*/cit:onlineResource/*/cit:linkage/gco:CharacterString/text(),
cit:name/gcx:Anchor/@xlink:href,
@uuid)[1]
```

* No equivalent field in ISO (eg. Where to store `spdx:checksum` in ISO?)

* Associated resources: Links between are not always bidirectional so using the associated API would allow to populate more relations. This is also mitigated with the complete RDF graph of the catalogue is retrieved providing relations from all records.
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>3.17.0</version>
<version>4.10.0</version>
</dependency>

<!-- PDF stuff: Managed by Mapfish -->
Expand Down Expand Up @@ -554,6 +554,11 @@
<artifactId>commons-email</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

<bean id="iso19110SchemaPlugin"
class="org.fao.geonet.schema.iso19110.ISO19110SchemaPlugin">
<property name="outputSchemas">
<util:map key-type="java.lang.String" value-type="java.lang.String">
<entry key="csw" value="http://www.opengis.net/cat/csw/2.0.2"/>
<entry key="gfc" value="http://www.isotc211.org/2005/gfc"/>
</util:map>
</property>
<property name="xpathTitle">
<util:list value-type="java.lang.String">
<value>gmx:name/gco:CharacterString</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<xsl:variable name="stylesheetVersion" select="'0.1'"/>


<xsl:template match="/">
<xsl:template match="/" name="to-iso19115-3">
<!--
root element (MD_Metadata or MI_Metadata)
-->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:locn="http://www.w3.org/ns/locn#"
xmlns:dcat="http://www.w3.org/ns/dcat#"
exclude-result-prefixes="#all">

<xsl:output method="xml"
indent="yes"
encoding="utf-8"
cdata-section-elements="locn:geometry dcat:bbox"/>

<xsl:template name="create-namespaces">
<xsl:namespace name="rdf" select="'http://www.w3.org/1999/02/22-rdf-syntax-ns#'"/>
<xsl:namespace name="rdfs" select="'http://www.w3.org/2000/01/rdf-schema#'"/>
<xsl:namespace name="owl" select="'http://www.w3.org/2002/07/owl#'"/>
<xsl:namespace name="dct" select="'http://purl.org/dc/terms/'"/>
<xsl:namespace name="dcat" select="'http://www.w3.org/ns/dcat#'"/>
<xsl:namespace name="foaf" select="'http://xmlns.com/foaf/0.1/'"/>
<xsl:namespace name="vcard" select="'http://www.w3.org/2006/vcard/ns#'"/>
<xsl:namespace name="prov" select="'http://www.w3.org/ns/prov#'"/>
<xsl:namespace name="org" select="'http://www.w3.org/ns/org#'"/>
<xsl:namespace name="pav" select="'http://purl.org/pav/'"/>
<xsl:namespace name="adms" select="'http://www.w3.org/ns/adms#'"/>
<xsl:namespace name="skos" select="'http://www.w3.org/2004/02/skos/core#'"/>
</xsl:template>
</xsl:stylesheet>
Loading

0 comments on commit 5b01f64

Please sign in to comment.