org.coode.suggestor.impl.AbstractOPMatcher Maven / Gradle / Ivy
package org.coode.suggestor.impl;
import java.util.Set;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLClassExpression;
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression;
import org.semanticweb.owlapi.reasoner.Node;
import org.semanticweb.owlapi.reasoner.NodeSet;
import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet;
abstract class AbstractOPMatcher extends
AbstractMatcher {
private OWLReasoner r;
public AbstractOPMatcher(OWLReasoner r) {
this.r = r;
}
@Override
protected final NodeSet getDirectSubs(OWLClassExpression c) {
return r.getSubClasses(c, true);
}
@Override
protected Node getEquivalents(OWLClassExpression f) {
return r.getEquivalentClasses(f);
}
@Override
protected final NodeSet createNodeSet(Set> nodes) {
return new OWLClassNodeSet(nodes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy