0

I want to add annotation assertion on a triple. I tried doing the same using Protege and was able to achieve it. The RDF/XMl generated from the Protege looks like this:

<owl:Axiom>
        <owl:annotatedSource rdf:resource="http://www.semanticweb.org/smrat/ontologies/2019/0/untitled-ontology-1388#Peter"/>
        <owl:annotatedProperty rdf:resource="http://www.semanticweb.org/smrat/ontologies/2019/0/untitled-ontology-1388#eats"/>
        <owl:annotatedTarget rdf:resource="http://www.semanticweb.org/smrat/ontologies/2019/0/untitled-ontology-1388#Apple"/>
        <weight rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">3</weight>
    </owl:Axiom>

I want to achieve the same using owldistribution-api. If anyone hasdone done would appreciate help! Thank you!

  • Use `OWLDataFactory#getOWLObjectPropertyAssertionAxiom(OWLObjectPropertyExpression, OWLIndividual, OWLIndividual, Collection)` – ssz Jan 24 '19 at 15:32
  • Thank you! Is there any sample code for the same? I am not sure how to use Collection . – smrati hans Jan 24 '19 at 15:58
  • To produce annotation use `OWLDataFactory#getOWLAnnotation(OWLAnnotationProperty, OWLAnnotationValue)` – ssz Jan 24 '19 at 16:11

0 Answers0