예제 #1
0
 public Set<OWLClass> getSubClasses(String classExpressionString, boolean direct) {
   if (classExpressionString.trim().length() == 0) {
     return Collections.emptySet();
   }
   OWLClassExpression classExpression = parser.parseClassExpression(classExpressionString);
   NodeSet<OWLClass> subClasses = reasoner.getSubClasses(classExpression, direct);
   return subClasses.getFlattened();
 }
예제 #2
0
 public Set<OWLNamedIndividual> getInstances(String classExpressionString, boolean direct) {
   if (classExpressionString.trim().length() == 0) {
     return Collections.emptySet();
   }
   OWLClassExpression classExpression = parser.parseClassExpression(classExpressionString);
   NodeSet<OWLNamedIndividual> individuals = reasoner.getInstances(classExpression, direct);
   return individuals.getFlattened();
 }
예제 #3
0
 public Set<OWLClass> getEquivalentClasses(String classExpressionString) {
   if (classExpressionString.trim().length() == 0) {
     return Collections.emptySet();
   }
   OWLClassExpression classExpression = parser.parseClassExpression(classExpressionString);
   Node<OWLClass> equivalentClasses = reasoner.getEquivalentClasses(classExpression);
   Set<OWLClass> result = null;
   if (classExpression.isAnonymous()) {
     result = equivalentClasses.getEntities();
   } else {
     result = equivalentClasses.getEntitiesMinus(classExpression.asOWLClass());
   }
   return result;
 }