private void addPropertyAssertion(
     OWLObjectPropertyExpression property, OWLIndividual subject, OWLIndividual object) {
   if (!property.isAnonymous()) {
     this.ontologyManager.addAxiom(
         this.ontology, this.factory.getOWLDeclarationAxiom(property.asOWLObjectProperty()));
   }
   this.ontologyManager.addAxiom(
       this.ontology, this.factory.getOWLObjectPropertyAssertionAxiom(property, subject, object));
 }
Пример #2
0
 public Set<OWLObjectProperty> getObjectPropertyEquivalents(OWLObjectProperty prop) {
   Set<OWLObjectProperty> propSet = new HashSet<OWLObjectProperty>();
   for (OWLEquivalentObjectPropertiesAxiom eopa :
       _ontology.getEquivalentObjectPropertiesAxioms(prop)) {
     for (OWLObjectPropertyExpression ope : eopa.getObjectPropertiesInSignature()) {
       if (!ope.equals(prop)) propSet.add(ope.asOWLObjectProperty());
     }
   }
   return propSet;
 }