Open white-gecko opened 8 years ago
With N-Quads blank node usage is done as described in https://www.w3.org/TR/n-quads/#BNodes
When I transform the generated n-quads into turtle I get the structure as described in the paper. I am not able to create trig. Please provide how the following graph should be formated in nquads:
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/vocab/changeset/schema#ChangeSet> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/ns#Item> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://rdfs.org/sioc/ns#reply_of> <http://aksw.org/About> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#subjectOfChange> <http://aksw.org/About> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://xmlns.com/foaf/maker> <http://aksw.org/KurtJunghanns> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#creatorName> <http://aksw.org/KurtJunghanns> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://www.w3.org/ns/prov#atTime> "2016-04-08T08:41:26.068Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://rdfs.org/sioc/ns#created_at> "2016-04-08T08:41:26.068Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#createdDate> "2016-04-08T08:41:26.068Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#changeReason> "Dies ist ein Test!!!! Nr.1" .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#addition> _:addition .
<http://resource.feedback.aksw.org/a26d0833cba719c06e576f1ee013af66-patch> <http://purl.org/vocab/changeset/schema#removal> _:removal .
_:removal <http://ns.ontowiki.net/SysOnt/Site/content> "CONTENT"^^<http://ns.ontowiki.net/SysOnt/Markdown> .
_:addition <http://ns.ontowiki.net/SysOnt/Site/content> "CONTENT" .
Its actually no issue about the usage of blank nodes but how you express the removals and additions. in N-Triples it should look as follows:
_:addition <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:addition <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://dbpedia.org/resource/Leipzig> .
_:addition <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://example.org/propA> .
_:addition <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "Hello" .
_:removal <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:removal <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://dbpedia.org/resource/Leipzig> .
_:removal <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://example.org/propA> .
_:removal <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "Hey There" .
rather then
_:addition <http://example.org/propA> "Hello" .
_:removal <http://example.org/propA> "Hey There" .
OK I got it. Please review. An example:
<http://resource.feedback.aksw.org/5690046f9c26e00a8b92b9dda1751857-patch> <http://purl.org/vocab/changeset/schema#removal> _:removal1 .
_:removal1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:removal1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://aksw.org/About> .
_:removal1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://ns.ontowiki.net/SysOnt/Site/content> .
_:removal1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "CONTENT" .
<http://resource.feedback.aksw.org/5690046f9c26e00a8b92b9dda1751857-patch> <http://purl.org/vocab/changeset/schema#addition> _:addition1 .
_:addition1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:addition1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://aksw.org/About> .
_:addition1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://ns.ontowiki.net/SysOnt/Site/content> .
_:addition1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "CONTENT" .
Seems correct
The patches should look as on the paper, e.g. :
respectively:
Basically you only have to use reification in the blank nodes. https://stackoverflow.com/questions/1312741/simple-example-of-reification-in-rdf