Skip to content

Commit

Permalink
Documentation / DCAT / Improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Dec 10, 2024
1 parent f34302e commit f7d157a
Showing 1 changed file with 59 additions and 29 deletions.
88 changes: 59 additions & 29 deletions docs/manual/docs/api/rdf-dcat.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ A base conversion is provided with complementary extensions for various profiles
* When needed, an ISO19139 to or from ISO19115-3 conversion is applied (eg. a CSW request querying a catalog in ISO19115-3 using the SEMIC conversion).
* DCAT output are not available for ISO19110 or Dublin core standards.

## Old implementation
## Past implementation

[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.


## Usage in the formatters 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
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

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

Expand Down Expand Up @@ -59,23 +59,23 @@ User interface configuration:
},
{
"label": "W3C-DCAT",
"url": "/formatters/dcat?output=xml"
"url": "/formatters/dcat"
},
{
"label": "EU-DCAT-AP",
"url": "/formatters/eu-dcat-ap?output=xml"
"url": "/formatters/eu-dcat-ap"
},
{
"label": "EU-GEO-DCAT-AP",
"url": "/formatters/eu-geodcat-ap?output=xml"
"url": "/formatters/eu-geodcat-ap"
},
{
"label": "EU-DCAT-AP-MOBILITY",
"url": "/formatters/eu-dcat-ap-mobility?output=xml"
"url": "/formatters/eu-dcat-ap-mobility"
},
{
"label": "EU-DCAT-AP-HVD",
"url": "/formatters/eu-dcat-ap-hvd?output=xml"
"url": "/formatters/eu-dcat-ap-hvd"
}
]
```
Expand All @@ -91,6 +91,25 @@ A `GetRecords` operation can be used to retrieve a set of records: http://localh

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


| Profile | Output schema parameter |
|-----------------------------------------|-------------------------------------------------------|
| CSW | http://www.opengis.net/cat/csw/2.0.2 |
| ISO19115-3 | http://standards.iso.org/iso/19115/-3/mdb/2.0 |
| ISO19110 | http://www.isotc211.org/2005/gfc |
| ISO19139 | http://www.isotc211.org/2005/gmd |
| W3C DCAT | http://www.w3.org/ns/dcat#core |
| EU-DCAT-AP | http://data.europa.eu/r5r/ |
| EU-GeoDCAT-AP | http://data.europa.eu/930/ |
| EU-GeoDCAT-AP (SEMIC) | http://data.europa.eu/930/#semiceu |
| DCAT (past implementation - deprecated) | http://www.w3.org/ns/dcat# |
| EU-DCAT-AP-HVD | https://semiceu.github.io/DCAT-AP/releases/2.2.0-hvd/ |
| EU-DCAT-AP-Mobility | https://w3id.org/mobilitydcat-ap |

When using GET request, it is recommended to encode URL characters in parameters (eg. `#` as `%23`) to avoid issues with the URL.

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

```xml
<ows:Parameter name="outputSchema">
<ows:Value>http://www.opengis.net/cat/csw/2.0.2</ows:Value>
Expand All @@ -106,8 +125,6 @@ Use the `outputSchema` parameter to select the DCAT profile to use. The followin
<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).
Expand All @@ -128,10 +145,12 @@ Depending on the target DCAT profile to use, it may be required to build proper
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?

#### 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 the CatalogRecord reference URI is the `metadataLinkage` or the `metadataIdentifier`.
Expand All @@ -144,11 +163,22 @@ cit:name/gcx:Anchor/@xlink:href,
@uuid)[1]
```

* No equivalent field in ISO (eg. Where to store `spdx:checksum` in ISO?)
#### Distribution model in DCAT and ISO

* Distribution / Should we repeat all the information about the dataset? or should we use multiple transfer options element in ISO to create multiple distribution elements with more detailed information in DCAT?
In DCAT, a number of properties from the dataset are also defined in the distribution elements.
In ISO, an option could be to use multiple transfer options element to create multiple distribution elements with more detailed information in DCAT (eg. transfer size).

* 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.
In the mapping, should we repeat all the information about the dataset? Should we recommend to use multiple transfer options element in ISO?

#### No equivalent field in ISO

eg. Where to store `spdx:checksum` in ISO? Could be considered as an online resource id attribute as the checksum uniquely identify the resource.


#### Associated resources

Links between resources are not always bidirectional so using the associated API would allow to populate more relations.
This is also mitigated when the complete RDF graph of the catalogue is retrieved as it will provide relations from all records.


### EU DCAT AP High Value Datasets
Expand All @@ -174,7 +204,7 @@ See [DCAT AP Mobility specification](https://mobilitydcat-ap.github.io/mobilityD

### SEMIC conversion compared to GeoNetwork conversion

The main differences between the 2 conversions is that the GeoNetwork conversion **starts from ISO19115-3 instead of ISO19139** (to better support additional information provided in ISO19115-3 eg. date lifecycle, party identifiers and citation in data quality, feature catalogue, additional documentation, portrayal sections). The conversion to GeoDCAT-AP is done as an extension of DCAT-AP which extends the core W3C DCAT for easier customization and extension. This allows non EU countries to also use the base DCAT conversion. The conversion is less linear and easier to extend or customize.
The main differences between the 2 conversions is that the GeoNetwork conversion **starts from ISO19115-3 instead of ISO19139** (to better support additional information provided in ISO19115-3 eg. date lifecycle, party identifiers and citation in data quality, feature catalogue, additional documentation, portrayal sections). **The conversion to GeoDCAT-AP is done as an extension of DCAT-AP which extends the core W3C DCAT** for easier customization and extension. This allows non EU countries to also use the base DCAT conversion. The conversion is less linear and easier to extend or customize.

SEMIC conversion parameters `core`, `extended`, `include-deprecated` are not available in the GeoNetwork conversion which focus on version 3 of GeoDCAT-AP.

Expand All @@ -186,29 +216,29 @@ Some of the differences in the GeoNetwork conversion are:
* Resource / `dct:temporal` is only encoded using a `dcat:startDate` and `dcat:endDate` (and do not add same information in `schemas:startDate` and `schemas:endDate` which was kept for backward compatibility with GeoDCAT-AP v1.*)
* Portrayal, specification, report online link are encoded using `foaf:page` instead of `foaf:landingPage`
* `prov:qualifiedAttribution` element are not created because `dcat:creator|publisher|contactPoint|..` already provide the same information.
* Keyword / When encoded with `Anchor`, `dcat:theme` encoded with only a reference in SEMIC conversion and using `skos:Concept` in the GeoNetwork conversion (see discussion point above)

```xml
<dcat:theme rdf:resource="https://metawal.wallonie.be/thesaurus/theme-geoportail-wallon#SubThemesGeoportailWallon/5099"/>
vs
<dcat:theme>
<skos:Concept rdf:about="https://metawal.wallonie.be/thesaurus/theme-geoportail-wallon#SubThemesGeoportailWallon/5099">
<skos:prefLabel xml:lang="fre">Données de base (autre)</skos:prefLabel>
</skos:Concept>
</dcat:theme>
```

Additional properties supported:
* CatalogRecord / `dct:issued` is added if exists in the metadata (added in ISO19115-3)
* CatalogRecord / `dct:language` is added if exists
* CatalogRecord / `cnt:characterEncoding` is added if exists
* Resource / `graphicOverview` is encoded as `foaf:page`
* Resource / Related records
* Resource / Associated resources
* Source dataset are encoded using `dct:source`
* Associated resource are encoded using `dct:relation` and subtypes (eg. `isPartOf`)
* Party identifier (added in ISO19115-3) are used for `rdf:about` attribute for individual or organization

Technical differences:
* `normalize-space` is not applied to `abstract` or `lineage` (which lose the line breaks and basic formatting)
* For keyword with `Anchor`, `dcat:theme` encoded with reference only in SEMIC conversion and using `skos:Concept` in the GeoNetwork conversion (see discussion point above)

```xml
<dcat:theme rdf:resource="https://metawal.wallonie.be/thesaurus/theme-geoportail-wallon#SubThemesGeoportailWallon/5099"/>
vs
<dcat:theme>
<skos:Concept rdf:about="https://metawal.wallonie.be/thesaurus/theme-geoportail-wallon#SubThemesGeoportailWallon/5099">
<skos:prefLabel xml:lang="fre">Données de base (autre)</skos:prefLabel>
</skos:Concept>
</dcat:theme>
```


0 comments on commit f7d157a

Please sign in to comment.