DataONEorg / d1_cn_index_processor

The CN index processor component
0 stars 1 forks source link

Add `schema.org/Dataset` `distribution` info as serviceEndpoint in index #23

Closed datadavev closed 3 years ago

datadavev commented 3 years ago

Amend the indexer rule for populating serviceEndpoint to add an entry for the contentUrl if present in a distribution entry of type DataDownload in schema.org/Dataset JSON-LD metadata.

For example:

    distribution: {
      "@type": "DataDownload",
      "contentUrl": "http://datadryad.org/api/v2/datasets/doi%253A10.5061%252Fdryad.5qb78/download",
      "encodingFormat": "application/zip"
    },

(from https://so.test.dataone.org/mnTestDRYAD/v2/object/sha256:a90d598d491ecc47051387ff5bd58042dff128064ef74358c7e3318bdf3a25fe )

The URL http://datadryad.org/api/v2/datasets/doi%253A10.5061%252Fdryad.5qb78/download should be added to the list of values for serviceEndpoint.

gothub commented 3 years ago

The query that populates serviceEndpoint has been updated as described above.