Description
Hi guys,
I am playing with DATS and in the process I have tried to use several tools to expand/compact the json-ld representation:
- pyld
- json-ld playground (https://json-ld.org/playground/)
Both are failing with some of the example provided in this repository, for instance this file:
https://github.com/datatagsuite/examples/blob/master/BDbag-AGR-example.json
The error message they report is: Invalid JSON-LD syntax; an @context @type value must be an absolute IRI
.
Now I can see that rdflib
appears to be loading that data just fine in your notebook example:
https://hub.gke.mybinder.org/user/datatagsuite-dats-tools-bxg5y72t/notebooks/notebooks/dats_agr.ipynb
Here is an example of the issue I seem to be facing with dataset_sdo_context.jsonld
:
https://github.com/datatagsuite/context/blob/master/sdo/dataset_sdo_context.jsonld
both 'storedIn' and 'distribution' appear to have a @type that is not a valid IRI, respectively DataRepository
and DatasetDistribution
.
To give an example that would work in the json-ld playground, I have modified the file BDbag-AGR-example.json (see below) as follow:
- I have inlined a modified version of the dataset context https://w3id.org/dats/context/sdo/dataset_sdo_context.jsonld. I have just prefixed the
distributions
andstoredIn
@type
withsdo:
to make it a valid IRI. Now I am unsure if this is the IRI you were intending to use of not. - I have removed the following data elements since their own context appear to suffer from the same issue:
identifiers
,creators
,has_part
,distributions
. I assume I could identify the offending@type
and modify them in a similar way to make them valid IRI.
{
"@type": "Dataset",
"@id": "http://identifiers.org/minid:b9j69h",
"@context": {
"sdo": "https://schema.org/",
"Dataset": "sdo:Dataset",
"identifier": {
"@id": "sdo:identifier",
"@type": "sdo:Text"
},
"alternateIdentifier": "sdo:alternateName",
"relatedIdentifier": "sdo:mentions",
"title": {
"@id": "sdo:name",
"@type": "sdo:Text"
},
"description": {
"@id": "sdo:description",
"@type": "sdo:Text"
},
"dates": "sdo:temporalCoverage",
"spatialCoverage": "sdo:spatialCoverage",
"storedIn": {
"@id": "sdo:includedInDataCatalog",
"@type": "sdo:DataRepository"
},
"distributions": {
"@id": "sdo:distribution",
"@type": "sdo:DatasetDistribution"
},
"primaryPublications": "sdo:citation",
"citations": "sdo:citation",
"producedBy": "sdo:producer",
"creators": {
"@id": "sdo:creator",
"@type": "sdo:Thing"
},
"licenses": "sdo:license",
"isAbout": "sdo:about",
"hasPart": {
"@id": "sdo:hasPart",
"@type": "Dataset"
},
"acknowledges": "sdo:funder",
"dimensions": "sdo:variableMeasured"
},
"title": "AGR Data set with identifier-based references to data in cloud storage",
"description": "AGR Data set with identifier-based references to data in cloud storage",
"dates": [{
"date": "2018-03-19T17:43:57.073822",
"type": {
"value": "creation",
"valueIRI": ""
}
}],
"types": [{"information": {"value": "model organism data"}}],
"extraProperties": [
{
"category": "checksum",
"categoryIRI": "http://purl.obolibrary.org/obo/NCIT_C43522",
"values": [{
"value": "6484968f81afac84857d02b573b0d589fb2f9582a2b920572830dc5781e0a53c",
"valueIRI": ""
}]
},
{
"category": "checksum algorithm",
"categoryIRI": "http://purl.obolibrary.org/obo/NCIT_C16275",
"values": [{
"value": "MD5",
"valueIRI": ""
}]
}
]
}
Any chance you could test this json-ld example on the json-ld playground (https://json-ld.org/playground/) and verify that your contexts are valid ?