コード例 #1
0
 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
ファイル: OntologyManager.java プロジェクト: gesteban/sened
 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;
 }