xapi-ontology
xapi-ontology copied to clipboard
Usability of this repository is mixed
The RDF ontologies are usable and getting more mature, but the JSON-LD context is unusable. There should be clear documentation of the quality of different parts of this repository, or restructuring of the repository.
I don't think the ontology is usable either. xapi:Actor, xapi:Verb, xapi:Object etc.. are defined as classes in the ontology and being used as properties. The rdfs:subClassOf is being used inappropriately in some places such as xapi:Actor rdfs:subClassOf xapi:Statement. Clearly Actor is not a subClassOf a Statement.
Thanks for the feedback. How is Actor, Verb, and Object being used as properties? Can you elaborate?
For e.g. if we put the following XAPI statement in json-ld playground
{
"@context": "https://w3id.org/xapi/statement-context",
"id": "51e43acb-a8da-435c-b4e9-e0a16a2505g9",
"objectType": "Statement",
"actor": {
"name": "Sally Glider",
"mbox": "mailto:[email protected]"
},
"verb": {
"id": "http://adlnet.gov/expapi/verbs/experienced",
"display": { "en-US": "experienced" }
},
"object": {
"id": "http://example.com/activities/solo-hang-gliding",
"definition": {
"name": { "en-US": "Solo Hang Gliding" }
}
}
}
Then we got
_:b0 <https://w3id.org/xapi/ontology#Actor> _:b1 .
Where xapi:Actor is used as a predicate but defined as a owl:Class in the ontology
What are you trying to do exactly? Plugging an xAPI statement into JSON-LD playground is not going to tell you much as xAPI statements are not structured the same as an RDF triple. The statement ontology helps to provide more structure for RDF date, especially if you were to query over SPARQL.
On Sun, Sep 23, 2018 at 3:12 AM Alex To [email protected] wrote:
For e.g. if we put the following XAPI statement in json-ld playground
{ "@context": "https://w3id.org/xapi/statement-context", "id": "51e43acb-a8da-435c-b4e9-e0a16a2505g9", "objectType": "Statement", "actor": { "name": "Sally Glider", "mbox": "mailto:[email protected]" }, "verb": { "id": "http://adlnet.gov/expapi/verbs/experienced", "display": { "en-US": "experienced" } }, "object": { "id": "http://example.com/activities/solo-hang-gliding", "definition": { "name": { "en-US": "Solo Hang Gliding" } } } }
Then we got
_:b0 https://w3id.org/xapi/ontology#Actor _:b1 .
Where xapi:Actor is used as a predicate but defined as a owl:Class in the ontology
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adlnet/xapi-ontology/issues/5#issuecomment-423799639, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiZRuctxgJcBVezLI2yoKOrTHjnKaEcks5ud0JpgaJpZM4PH1_i .
I'm using JSON-LD playground is to validate the JSON-LD context provided in this repo. It definitely tells me whether I can use this context to translate xAPI statements into RDF triples that conforms to the xAPI ontology also defined in this repo.
So, like @fugu13 mentioned, the ontology is usable (with a number of errors though) but the JSON-LD context is not because using the context will result in RDF triples that are not consistent with what defined in the ontology.
Thanks Alex. Feel free to submit suggestions to fixing or improving the @context. I'll try to take a look too later this week, but haven't even looked at this in quite awhile.
On Sun, Sep 23, 2018 at 6:14 PM Alex To [email protected] wrote:
I'm using JSON-LD playground is to validate the JSON-LD context provided in this repo. It definitely tells me whether I can use this context to translate xAPI statements into RDF triples that conforms to the xAPI ontology also defined in this repo.
So, like @fugu13 https://github.com/fugu13 mentioned, the ontology is usable (with a number of errors though) but the JSON-LD context is not because using the context will result in RDF triples that are not consistent with what defined in the ontology.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adlnet/xapi-ontology/issues/5#issuecomment-423855309, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiZRtjsdyOwnIjPJeE_4YBdNC6dAkSFks5ueBXpgaJpZM4PH1_i .
In our application, the whole context file that we are using to translate xAPI json to RDF triples is as simple as follows
{
"@context": {
"xapi": "https://w3id.org/xapi/ontology#",
"@vocab": "https://w3id.org/xapi/ontology#",
"objectType": "@type"
}
}
The reason is, most of the json properties have the same "label" as the RDF predicates for e.g.
"Statement": "xapi:Statement",
"version": "xapi:version",
"timeStamp": "xapi:timeStamp",
"Agent": "xapi:Agent",
"mbox_sha1sum": "xapi:mbox_sha1sum",
Because the "label" is the same, you may not want to explicitly specify it. Some other lines such as
"actor": "xapi:Actor",
"verb": "xapi:Verb"
We don't want to specify either because we want "actor" to stay lower case as "xapi:actor" to indicate it is a predicate, not a class.
The prefixes are also not used
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/",
"owl": "http://www.w3.org/2002/07/owl#",
"prov": "http://www.w3.org/ns/prov#",
The only json property we concern about is "objectType": "@type"
, where we want objectType to map a class in RDF, for e.g. "objectType": "SubStatement"
will be come _:b0 rdfs:type xapi:SubStatement
Let me know your thoughts Regards