Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGC API Record / Output formats #29

Merged
merged 66 commits into from
Feb 4, 2021
Merged

OGC API Record / Output formats #29

merged 66 commits into from
Feb 4, 2021

Conversation

fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Jan 25, 2021

The main goal is to add new "simple" output formats to OGC API Records that can be built from the index document.
Instead of creating mapping for all formats for all plugins (as GeoNetwork is currently doing), here we design flows to build XML or JSON based format from the index document.

Output formats configuration

OGC API records configuration allow to declare formats.

See application.yml to configure format properties:

      -
        name : schema.org    < Short name use for f URL parameter
        mimeType : application/ld+json  < Mime type use for Accept header
        responseProcessor: JsonLdResponseProcessorImpl     < Response processor to use for items search and item page
        operations:     < Scope of the format
          - items
          - item

HTML pages provides formats switcher:

image

Formats considered

  • RSS & OpenSearch description
  • JSON-LD

More work later on:

  • DCAT (experimented)
  • RDF/XML & turtle (experimented)
  • ATOM
  • Datacite
  • SiteMap

RSS

JAXB model are generated from XSD using xcj then converters provide mapping from an IndexRecord (JSON from Elasticsearch) to other object types.

RSS (and other formats) are advertised for each collections in the OpenSearchDescription http://localhost:9901/collections/main?f=opensearch

image

By default RSS feed is sorted by record change date (it may make more sense to sort by dataset publication date instead by default ?) unless you defined a custom sort parameter.

RSS items are described by:

  • title
  • description
  • link
  • guid
  • pubDate

There is no GeoRSS information and details about records online resources like in GeoNetwork 3.

image

JSON LD

JSON-LD format is based on https://schema.org/Dataset

Output are tested with https://search.google.com/test/rich-results

Search results are exposed as DataFeed

image

And metadata record as Dataset

image

JSON-LD format improvements that can be done in future tasks (relates to ongoing work in geonetwork/core-geonetwork#5379):

  • license
  • isAccessibleForFree
  • Add comment/discussionUrl
  • Add associated records: hasPart/isPartOf/isBasedOn/mentions
  • Add measurementTechnique for imagery
  • Add @id for organization, keywords ?, ...

DCAT

DCAT2 format is the output to use.

Requirements:

  • Some users require various community profile of DCAT with different constraints - so we have to be flexible enough

Tested:

  • Build model from XSD > Generated Java model is complex and not easy to manipulate
  • https://github.com/SEMICeu/geodcat-ap ISO19139 to DCAT conversion > Limited to ISO19139 and this conversion is complex to work with
  • TODO: JSON > DCAT conversion > May not be flexible enough

RDFXML & Turtle

Experimental work made using RDF4J to convert JSON-LD (schema.org) to RDF.

curl 127.0.0.1:9901/collections/$firstCollection/items/$uuid \
        -H "Accept: text/turtle" 

curl 127.0.0.1:9901/collections/$firstCollection/items/$uuid \
        -H "Accept: application/rdf+xml" 

Some properties are not parse correctly. Need more investigation.

fxprunayre and others added 30 commits January 25, 2021 10:34
…of output formats for API services: xml/json/html
MichelGabriel and others added 27 commits January 28, 2021 13:06
…When running from WAR, the app may not be able to load the search config if not in proper location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants