I am trying to use Web Annotation Data Model (WADM) in order to add provenance information on RDF statements.
To clarify things, each RDF statement (typical subject-predicate-object triples) in my ontology has been created based on knowledge provided on a specific free-text snippet. I want to create a WADM Annotation
on each RDF statement, having the RDF statement itself as a Body
and pointing to the respective free-text snippet as a Target
.
Pointing to the free-text snippet as a target is clear to me using Text Quote Selectors. However, I cannot seem to find an example of annotating a free-text code with RDF statements per se.
Can anybody point me to an example on how could this be done with Protege?
I think I found a workaround by annotating the statements (e.g. an ObjectPropertyAssertion) with an annotation using "hasTarget" as the annotation property.
For example, if I want to use the RDF statement <Subject, Property, Object>
to annotate a target pdf located somewhere in the internet, I would use the following rationale:
<ObjectPropertyAssertion>
<Annotation>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasTarget"/>
<AnonymousIndividual nodeID="_:genid-f7b71d4c-657e-40bc-bc69-31fc3af8b603"/>
</Annotation>
<ObjectProperty IRI="<Predicate>"/>
<NamedIndividual IRI="<Subject>"/>
<NamedIndividual IRI="<Object>"/>
</ObjectPropertyAssertion>
<AnnotationAssertion>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasSource"/>
<AnonymousIndividual nodeID="_:genid-0d456ba2-52b9-470d-ad70-efafbc06d261"/>
<Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#anyURI">source_url</Literal>
</AnnotationAssertion>
<ObjectPropertyAssertion>
<ObjectProperty IRI="http://www.w3.org/ns/oa#hasSelector"/>
<AnonymousIndividual nodeID="_:genid-f7b71d4c-657e-40bc-bc69-31fc3af8b603"/>
<NamedIndividual IRI="#selector_1"/>
</ObjectPropertyAssertion>
<ClassAssertion>
<Class IRI="http://www.w3.org/ns/oa#TextQuoteSelector"/>
<NamedIndividual IRI="#selector_1"/>
</ClassAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#exact"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some text</Literal>
</DataPropertyAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#prefix"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some prefix</Literal>
</DataPropertyAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#suffix"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some suffix</Literal>
</DataPropertyAssertion>
It can be done in protege by annotating a statement using the "@" symbol on the right of each property assertion (namely the original <Subject, Property, Object>
statement), in the "Property assertions" view.
I am not really sure that it is fully compliant but it seems Ok to me.
Hope it is helpful for others too.
Edit: Full version of an example ontology, as requested, directly produced by protege in OWL/XML format.
<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.semanticweb.org/example"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
ontologyIRI="http://www.semanticweb.org/example">
<Prefix name="" IRI="http://www.semanticweb.org/example"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Import>http://www.w3.org/ns/oa#</Import>
<Declaration>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasSource"/>
</Declaration>
<Declaration>
<ObjectProperty IRI="http://www.w3.org/ns/oa#hasSelector"/>
</Declaration>
<Declaration>
<NamedIndividual IRI="#exampleIndividual2"/>
</Declaration>
<Declaration>
<DataProperty IRI="http://www.w3.org/ns/oa#prefix"/>
</Declaration>
<Declaration>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasTarget"/>
</Declaration>
<Declaration>
<DataProperty IRI="http://www.w3.org/ns/oa#suffix"/>
</Declaration>
<Declaration>
<NamedIndividual IRI="#exampleIndividual"/>
</Declaration>
<Declaration>
<NamedIndividual IRI="#selector_1"/>
</Declaration>
<Declaration>
<DataProperty IRI="http://www.w3.org/ns/oa#exact"/>
</Declaration>
<Declaration>
<ObjectProperty IRI="#exampleProperty"/>
</Declaration>
<ClassAssertion>
<Class IRI="http://www.w3.org/ns/oa#TextQuoteSelector"/>
<NamedIndividual IRI="#selector_1"/>
</ClassAssertion>
<ObjectPropertyAssertion>
<Annotation>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasTarget"/>
<AnonymousIndividual nodeID="_:genid36"/>
</Annotation>
<ObjectProperty IRI="#exampleProperty"/>
<NamedIndividual IRI="#exampleIndividual2"/>
<NamedIndividual IRI="#exampleIndividual"/>
</ObjectPropertyAssertion>
<ObjectPropertyAssertion>
<ObjectProperty IRI="http://www.w3.org/ns/oa#hasSelector"/>
<AnonymousIndividual nodeID="_:genid36"/>
<NamedIndividual IRI="#selector_1"/>
</ObjectPropertyAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#exact"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some text</Literal>
</DataPropertyAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#prefix"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some prefix</Literal>
</DataPropertyAssertion>
<DataPropertyAssertion>
<DataProperty IRI="http://www.w3.org/ns/oa#suffix"/>
<NamedIndividual IRI="#selector_1"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">some suffix</Literal>
</DataPropertyAssertion>
<AnnotationAssertion>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasSource"/>
<AnonymousIndividual nodeID="_:genid36"/>
<Literal datatypeIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral">source_url</Literal>
</AnnotationAssertion>
<AnnotationAssertion>
<AnnotationProperty IRI="http://www.w3.org/ns/oa#hasSource"/>
<AnonymousIndividual nodeID="_:genid37"/>
<Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#anyURI">source_url</Literal>
</AnnotationAssertion>
</Ontology>
<!-- Generated by the OWL API (version 4.2.8.20170104-2310) https://github.com/owlcs/owlapi -->