- From: James Hudson <jameshudson3010@gmail.com>
- Date: Fri, 6 Mar 2020 13:22:40 -0500
- To: public-linked-json@w3.org
- Message-ID: <CAEUVO9FqyQpd+8B8X6KuvOQviGNs3rassjam2MD4UOOciNKKcw@mail.gmail.com>
I have the following JSON-LD document:
[
{
"@context": {
"tt": "http://my-company-name/Tasking#",
"task": "http://my-company-name/data/TaskingOntology#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@id": "tt:Task_3",
"@type": "task:Task",
"task:itemToTeardown": {
"@id": "tt:TaskSubject"
},
"task:taskDescription": {
"@value": "The description of the task"
},
"rdfs:label": {
"@value": "Task 3"
}
},
{
"@context": {
"tt": "http://my-company-name/Tasking#",
"task": "http://my-company-name/data/TaskingOntology#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@id": "tt:taskparta_TaskSubject",
"task:isComponentOf": {
"@id": "task:TaskSubject"
},
"rdfs:label": {
"@value": "Label A"
}
},
{
"@context": {
"tt": "http://my-company-name/Tasking#",
"task": "http://my-company-name/data/TaskingOntology#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@id": "tt:taskpartb_TaskSubject",
"task:isComponentOf": {
"@id": "task:TaskSubject"
},
"rdfs:label": {
"@value": "Label B"
}
}
]
using https://github.com/RDFLib/rdflib-jsonld, it will produce the
following RDF:
@prefix ns1: <http://my-company-name/data/TaskingOntology#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://my-company-name/Tasking#Task_3> a ns1:Task ;
rdfs:label "Task 3" ;
ns1:itemToTeardown <http://my-company-name/Tasking#TaskSubject> ;
ns1:taskDescription "The description of the task" .
<http://my-company-name/Tasking#taskparta_TaskSubject> rdfs:label "Label A" ;
ns1:isComponentOf ns1:TaskSubject .
<http://my-company-name/Tasking#taskpartb_TaskSubject> rdfs:label "Label B" ;
ns1:isComponentOf ns1:TaskSubject .
I have the following questions:
(1) I need to duplicate the @context across several entries. Is there some
way to avoid that? I note that in the RDF, the common prefixes can be
shared.
(2) Does the JSON-LD stuff look "right"? Does anything smell? It is hard
for me to judge having only starting looking at such things.
(3) In the RDF, I see <http://my-company-name/Tasking#Task_3> *a* ns1:Task
; ... what is the 'a'? Where did it come from?
Thank you.
Received on Saturday, 7 March 2020 00:56:40 UTC