/** * @param ce The class expression whose strict (direct) super classes are to be retrieved. * @return a {@code NodeSet} such that for each class {@code C} in the {@code NodeSet} the set * of reasoner axioms entails {@code StrictSubClassOf(ce, C)}. <br> * If {@code ce} is equivalent to {@code owl:Thing} then the empty {@code NodeSet} will * be returned. * @see OWLReasoner#getSuperClasses(OWLClassExpression, boolean) Return all superclasses. */ default Stream<OWLClass> superClasses(OWLClassExpression ce) { return getSuperClasses(ce).entities(); }
/** * @param ind The individual whose types are to be retrieved. * @return a {@code NodeSet} containing named classes such that for each named class {@code C} * in the node set, the set of reasoner axioms entails {@code ClassAssertion(C, ind)}. * <br> * @see OWLReasoner#getTypes(OWLNamedIndividual, boolean) Gets the named classes which are * (potentially direct) types of the specified named individual. The classes are returned * as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default Stream<OWLClass> types(OWLNamedIndividual ind) { return getTypes(ind, false).entities(); }
/**Check interrupt.*/ public void checkInterrupt() { InterruptType interruptType=m_interruptType; if (interruptType!=null) { if (interruptType==InterruptType.TIMEOUT) throw new TimeOutException(); else throw new ReasonerInterruptedException(); } } /**Interrupt.*/
@Override protected boolean isConsistent(final OWLOntology o) { final OWLReasoner reasoner = _reasonerFactory.createReasoner(o); return reasoner.isConsistent(); }
public PelletReasoner(OWLOntology ontology, BufferingMode bufferingMode) { this( ontology, new SimpleConfiguration( new NullReasonerProgressMonitor(), org.mindswap.pellet.PelletOptions.SILENT_UNDEFINED_ENTITY_HANDLING ? FreshEntityPolicy.ALLOW : FreshEntityPolicy.DISALLOW, 0, IndividualNodeSetPolicy.BY_SAME_AS ), bufferingMode ); }
public StructuralReasoner(OWLOntology rootOntology, OWLReasonerConfiguration configuration, BufferingMode bufferingMode) { super(rootOntology, configuration, bufferingMode); pm = configuration.getProgressMonitor(); if(pm == null) { pm = new NullReasonerProgressMonitor(); } }
/** * Returns all subclasses. * * @param ce The class expression whose strict (direct) subclasses are to be retrieved. * @return a {@code NodeSet} such that for each class {@code C} in the {@code NodeSet} the set * of reasoner axioms entails {@code StrictSubClassOf(C, ce)}. <br> * If {@code ce} is equivalent to {@code owl:Nothing} then the empty {@code NodeSet} * will be returned. * @see OWLReasoner#getSubClasses(OWLClassExpression, boolean) */ default Stream<OWLClass> subClasses(OWLClassExpression ce) { return getSubClasses(ce).entities(); }
/** * Gets the {@code Node} corresponding to the top node (containing {@code owl:Thing}) in the * class hierarchy. * * @return A {@code Node} containing {@code owl:Thing} that is the top node in the class * hierarchy. This {@code Node} is essentially equal to the {@code Node} returned by * calling * {@link #getEquivalentClasses(org.semanticweb.owlapi.model.OWLClassExpression)} with a * parameter of {@code owl:Thing}. */ default Stream<OWLClass> topClassNode() { return getTopClassNode().entities(); }
/** * Gets the {@code Node} corresponding to the bottom node (containing * {@code owl:bottomObjectProperty}) in the object property hierarchy. * * @return A {@code Node}, containing {@code owl:bottomObjectProperty}, that is the bottom node * in the object property hierarchy. This {@code Node} is essentially equal to the * {@code Node} that will be returned by calling * {@link #getEquivalentObjectProperties(org.semanticweb.owlapi.model.OWLObjectPropertyExpression)} * with a parameter of {@code owl:bottomObjectProperty}. */ default Stream<OWLObjectPropertyExpression> bottomObjectPropertyNode() { return getBottomObjectPropertyNode().entities(); }
/** * Gets the {@code Node} corresponding to the bottom node (containing {@code owl:Nothing}) in * the class hierarchy. * * @return A {@code Node} containing {@code owl:Nothing} that is the bottom node in the class * hierarchy. This {@code Node} is essentially equal to the {@code Node} that will be * returned by calling * {@link #getEquivalentClasses(org.semanticweb.owlapi.model.OWLClassExpression)} with a * parameter of {@code owl:Nothing}. */ default Stream<OWLClass> bottomClassNode() { return getBottomClassNode().entities(); }
/** * Gets the {@code Node} corresponding to the bottom node (containing * {@code owl:bottomDataProperty}) in the data property hierarchy. * * @return A {@code Node}, containing {@code owl:bottomDataProperty}, that is the bottom node in * the data property hierarchy. This {@code Node} is essentially equal to the * {@code Node} that will be returned by calling * {@link #getEquivalentDataProperties(org.semanticweb.owlapi.model.OWLDataProperty)} * with a parameter of {@code owl:bottomDataProperty}. */ default Stream<OWLDataProperty> bottomDataPropertyNode() { return getBottomDataPropertyNode().entities(); }
/** * Gets the {@code Node} corresponding to the top node (containing {@code owl:topDataProperty}) * in the data property hierarchy. * * @return A {@code Node}, containing {@code owl:topDataProperty}, that is the top node in the * data property hierarchy. This {@code Node} is essentially equal to the {@code Node} * returned by calling * {@link #getEquivalentDataProperties(org.semanticweb.owlapi.model.OWLDataProperty)} * with a parameter of {@code owl:topDataProperty}. */ default Stream<OWLDataProperty> topDataPropertyNode() { return getTopDataPropertyNode().entities(); }
/** * Gets the {@code Node} corresponding to the top node (containing * {@code owl:topObjectProperty}) in the object property hierarchy. * * @return A {@code Node} containing {@code owl:topObjectProperty} that is the top node in the * object property hierarchy. This {@code Node} is essentially equivalent to the * {@code Node} returned by calling * {@link #getEquivalentObjectProperties(org.semanticweb.owlapi.model.OWLObjectPropertyExpression)} * with a parameter of {@code owl:topObjectProperty}. */ default Stream<OWLObjectPropertyExpression> topObjectPropertyNode() { return getTopObjectPropertyNode().entities(); }
/** * @param ce The class expression whose strict (direct) super classes are to be retrieved. * @return a {@code NodeSet} such that for each class {@code C} in the {@code NodeSet} the set * of reasoner axioms entails {@code StrictSubClassOf(ce, C)}. <br> * If {@code ce} is equivalent to {@code owl:Thing} then the empty {@code NodeSet} will * be returned. * @see OWLReasoner#getSuperClasses(OWLClassExpression, boolean) Return all superclasses. */ default Stream<OWLClass> superClasses(OWLClassExpression ce) { return getSuperClasses(ce).entities(); }
@Override protected boolean isConsistent(final OWLOntology o) { final OWLReasoner reasoner = _reasonerFactory.createReasoner(o); return reasoner.isConsistent(); }
public PelletReasoner(OWLOntology ontology, BufferingMode bufferingMode) { this( ontology, new SimpleConfiguration( new NullReasonerProgressMonitor(), org.mindswap.pellet.PelletOptions.SILENT_UNDEFINED_ENTITY_HANDLING ? FreshEntityPolicy.ALLOW : FreshEntityPolicy.DISALLOW, 0, IndividualNodeSetPolicy.BY_SAME_AS ), bufferingMode ); }
/** * @param ind The individual whose types are to be retrieved. * @return a {@code NodeSet} containing named classes such that for each named class {@code C} * in the node set, the set of reasoner axioms entails {@code ClassAssertion(C, ind)}. * <br> * @see OWLReasoner#getTypes(OWLNamedIndividual, boolean) Gets the named classes which are * (potentially direct) types of the specified named individual. The classes are returned * as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default Stream<OWLClass> types(OWLNamedIndividual ind) { return getTypes(ind, false).entities(); }
public void checkInterrupt() { InterruptType interruptType=m_interruptType; if (interruptType!=null) { if (interruptType==InterruptType.TIMEOUT) throw new TimeOutException(); else throw new ReasonerInterruptedException(); } } public void interrupt() {
/** * @param ce The class expression whose strict (direct) super classes are to be retrieved. * @return a {@code NodeSet} such that for each class {@code C} in the {@code NodeSet} the set * of reasoner axioms entails {@code StrictSubClassOf(ce, C)}. <br> * If {@code ce} is equivalent to {@code owl:Thing} then the empty {@code NodeSet} will * be returned. * @see OWLReasoner#getSuperClasses(OWLClassExpression, boolean) Return all superclasses. */ default Stream<OWLClass> superClasses(OWLClassExpression ce) { return getSuperClasses(ce).entities(); }
/** * @param ind The individual whose types are to be retrieved. * @return a {@code NodeSet} containing named classes such that for each named class {@code C} * in the node set, the set of reasoner axioms entails {@code ClassAssertion(C, ind)}. * <br> * @see OWLReasoner#getTypes(OWLNamedIndividual, boolean) Gets the named classes which are * (potentially direct) types of the specified named individual. The classes are returned * as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default Stream<OWLClass> types(OWLNamedIndividual ind) { return getTypes(ind, false).entities(); }