JSON-LD export #450
Replies: 5 comments 2 replies
-
If I am totally honest with you, this proposal looks very sane to me.. Can you provide a full JSON-LD example with type decorators etc? |
Beta Was this translation helpful? Give feedback.
-
This is the "expanded" form of JSON-LD, as generated by JSON-LD playground from the JSON-LD and context document (put into additional field [
{
"http://purl.org/dc/terms/creator": [
{
"@id": "https://orcid.org/0000-0002-1825-0097",
"http://www.w3.org/2000/01/rdf-schema#label": [
{
"@value": "Josiah Carberry"
}
]
}
],
"http://purl.org/dc/terms/license": [
{
"@id": "https://creativecommons.org/licenses/by/4.0/"
}
],
"@id": "http://example.org/mapping_set",
"https://w3id.org/sssom/mappings": [
{
"https://w3id.org/sssom/mapping_justification": [
{
"@id": "https://w3id.org/semapv/vocab/ManualMappingCuration"
}
],
"http://www.w3.org/2002/07/owl#annotatedTarget": [
{
"@id": "http://example.org/2"
}
],
"http://www.w3.org/2002/07/owl#annotatedProperty": [
{
"@id": "http://www.w3.org/2004/02/skos/core#exactMatch"
}
],
"http://purl.org/dc/terms/contributor": [
{
"http://www.w3.org/2000/01/rdf-schema#label": [
{
"@value": "Alice"
}
]
}
],
"http://www.w3.org/2002/07/owl#annotatedSource": [
{
"@id": "http://example.org/1"
}
]
}
]
}
] |
Beta Was this translation helpful? Give feedback.
-
This is wrong. You are turning this:
(which, by the way, is a supported-for-backwards-compatibility but officially discouraged syntax: into this (JSON):
or this (RDF):
That is, your are assuming that the |
Beta Was this translation helpful? Give feedback.
-
I just want to note that the properties to use should be defined by the LinkML model ( For example:
I personally don’t care which properties are used for which slots, and I would have zero objection to changing the ones that are currently assigned – but my point is that if we want to change them, the change must happen in the LinkML model, not in the specification for the RDF or JSON-LD formats. |
Beta Was this translation helpful? Give feedback.
-
Update (using both {
"curie_map": {
"x": "http://example.org/",
"orcid": "https://orcid.org/"
},
"mapping_set_id": "http://example.org/mapping_set",
"license": "https://creativecommons.org/licenses/by/4.0/",
"creator_id": [ "https://orcid.org/0000-0002-1825-0097" ],
"creator_label": [ "Josiah Carberry" ],
"mappings": [ {
"subject_id": "http://example.org/1",
"predicate_id": "http://www.w3.org/2004/02/skos/core#exactMatch",
"object_id": "http://example.org/2",
"mapping_justification": "https://w3id.org/semapv/vocab/ManualMappingCuration",
"reviewer_label": [ "Alice" ]
} ]
} @prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix semapv: <https://w3id.org/semapv/vocab/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix sssom: <https://w3id.org/sssom/> .
@prefix dct: <http://purl.org/dc/terms/> .
<http://example.org/mapping_set> dct:creator "Josiah Carberry", <https://orcid.org/0000-0002-1825-0097> ;
dct:license <https://creativecommons.org/licenses/by/4.0/> ;
sssom:mappings [
dct:contributor "Alice" ;
owl:annotatedProperty skos:exactMatch ;
owl:annotatedSource <http://example.org/1> ;
owl:annotatedTarget <http://example.org/2> ;
sssom:mapping_justification semapv:ManualMappingCuration
] . I'm not sure about how to best express authors and reviewers in RDF ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The SSSOM/JSON format is underspecified (#321). It's implementation in sssom-py is based on whatever LinkML does. At the same time a JSON-LD export is asked for (#102, #241). I'm not sure whether a good JSON-LD export for mapping to RDF is doable with LinkML at all - in my point of view LinkML framework is more a burden for this task (mapping-commons/sssom-py#590). sssom-js is not based on LinkML and it supports JSON(-LD) export that differs from JSON export in sssom-py. Here is an example:
JSON-LD (=JSON minus
curie_map
)RDF
The JSON-LD context can still be improved to cover more slots
Notable features of the JSON-LD export:
curie_map
is not passed to RDF (it may be included in SSSOM/JSON nevertheless and could be reused for pretty RDF/Turtle but CURIEs are not RDF data model)author
should be pav:authoredBy). I'd like to keep the property URIs in the https://w3id.org/sssom/ namespace minimal and reuse existing ontologies insteadBeta Was this translation helpful? Give feedback.
All reactions