Package: NoOpReasoner
NoOpReasoner
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NoOpReasoner(OWLOntology) |
|
|
|
|
|
||||||||||||||||||||
createReasoner(OWLOntology) |
|
|
|
|
|
||||||||||||||||||||
dispose() |
|
|
|
|
|
||||||||||||||||||||
flush() |
|
|
|
|
|
||||||||||||||||||||
getBottomClassNode() |
|
|
|
|
|
||||||||||||||||||||
getBottomDataPropertyNode() |
|
|
|
|
|
||||||||||||||||||||
getBottomObjectPropertyNode() |
|
|
|
|
|
||||||||||||||||||||
getBufferingMode() |
|
|
|
|
|
||||||||||||||||||||
getDataPropertyDomains(OWLDataProperty, boolean) |
|
|
|
|
|
||||||||||||||||||||
getDataPropertyValues(OWLNamedIndividual, OWLDataProperty) |
|
|
|
|
|
||||||||||||||||||||
getDifferentIndividuals(OWLNamedIndividual) |
|
|
|
|
|
||||||||||||||||||||
getDisjointClasses(OWLClassExpression) |
|
|
|
|
|
||||||||||||||||||||
getDisjointDataProperties(OWLDataPropertyExpression) |
|
|
|
|
|
||||||||||||||||||||
getDisjointObjectProperties(OWLObjectPropertyExpression) |
|
|
|
|
|
||||||||||||||||||||
getEquivalentClasses(OWLClassExpression) |
|
|
|
|
|
||||||||||||||||||||
getEquivalentDataProperties(OWLDataProperty) |
|
|
|
|
|
||||||||||||||||||||
getEquivalentObjectProperties(OWLObjectPropertyExpression) |
|
|
|
|
|
||||||||||||||||||||
getFreshEntityPolicy() |
|
|
|
|
|
||||||||||||||||||||
getIndividualNodeSetPolicy() |
|
|
|
|
|
||||||||||||||||||||
getInstances(OWLClassExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getInverseObjectProperties(OWLObjectPropertyExpression) |
|
|
|
|
|
||||||||||||||||||||
getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getObjectPropertyRanges(OWLObjectPropertyExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getObjectPropertyValues(OWLNamedIndividual, OWLObjectPropertyExpression) |
|
|
|
|
|
||||||||||||||||||||
getPendingAxiomAdditions() |
|
|
|
|
|
||||||||||||||||||||
getPendingAxiomRemovals() |
|
|
|
|
|
||||||||||||||||||||
getPendingChanges() |
|
|
|
|
|
||||||||||||||||||||
getPrecomputableInferenceTypes() |
|
|
|
|
|
||||||||||||||||||||
getReasonerName() |
|
|
|
|
|
||||||||||||||||||||
getReasonerVersion() |
|
|
|
|
|
||||||||||||||||||||
getRootOntology() |
|
|
|
|
|
||||||||||||||||||||
getSameIndividuals(OWLNamedIndividual) |
|
|
|
|
|
||||||||||||||||||||
getSubClasses(OWLClassExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getSubDataProperties(OWLDataProperty, boolean) |
|
|
|
|
|
||||||||||||||||||||
getSubObjectProperties(OWLObjectPropertyExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getSuperClasses(OWLClassExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getSuperDataProperties(OWLDataProperty, boolean) |
|
|
|
|
|
||||||||||||||||||||
getSuperObjectProperties(OWLObjectPropertyExpression, boolean) |
|
|
|
|
|
||||||||||||||||||||
getTimeOut() |
|
|
|
|
|
||||||||||||||||||||
getTopClassNode() |
|
|
|
|
|
||||||||||||||||||||
getTopDataPropertyNode() |
|
|
|
|
|
||||||||||||||||||||
getTopObjectPropertyNode() |
|
|
|
|
|
||||||||||||||||||||
getTypes(OWLNamedIndividual, boolean) |
|
|
|
|
|
||||||||||||||||||||
getUnsatisfiableClasses() |
|
|
|
|
|
||||||||||||||||||||
interrupt() |
|
|
|
|
|
||||||||||||||||||||
isConsistent() |
|
|
|
|
|
||||||||||||||||||||
isEntailed(OWLAxiom) |
|
|
|
|
|
||||||||||||||||||||
isEntailed(Set) |
|
|
|
|
|
||||||||||||||||||||
isEntailmentCheckingSupported(AxiomType) |
|
|
|
|
|
||||||||||||||||||||
isPrecomputed(InferenceType) |
|
|
|
|
|
||||||||||||||||||||
isSatisfiable(OWLClassExpression) |
|
|
|
|
|
||||||||||||||||||||
precomputeInferences(InferenceType[]) |
|
|
|
|
|
Coverage
1: package cz.cvut.kbss.ontodriver.owlapi.query;
2:
3: import org.semanticweb.owlapi.model.*;
4: import org.semanticweb.owlapi.reasoner.*;
5: import org.semanticweb.owlapi.reasoner.impl.OWLClassNode;
6: import org.semanticweb.owlapi.reasoner.impl.OWLDataPropertyNode;
7: import org.semanticweb.owlapi.reasoner.impl.OWLObjectPropertyNode;
8: import org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory;
9: import org.semanticweb.owlapi.util.Version;
10:
11: import javax.annotation.Nonnull;
12: import java.util.List;
13: import java.util.Set;
14:
15: import static uk.ac.manchester.cs.owl.owlapi.InternalizedEntities.*;
16:
17: /**
18: * A naive implementation of a no-op reasoner that just returns axioms asserted in the underlying ontology.
19: * <p>
20: * This implementation wraps a {@link org.semanticweb.owlapi.reasoner.structural.StructuralReasoner} and passes {@code
21: * true} for direct whenever the called method allows it. All other calls are just forwarded to the underlying
22: * reasoner.
23: */
24: class NoOpReasoner implements OWLReasoner {
25:
26: private final OWLReasoner wrapped;
27:
28: public NoOpReasoner(OWLOntology rootOntology) {
29: this.wrapped = createReasoner(rootOntology);
30: }
31:
32: private static OWLReasoner createReasoner(OWLOntology rootOntology) {
33: final StructuralReasonerFactory factory = new StructuralReasonerFactory();
34: return factory.createReasoner(rootOntology);
35: }
36:
37: @Nonnull
38: public OWLOntology getRootOntology() {
39: return wrapped.getRootOntology();
40: }
41:
42: @Nonnull
43: public Set<OWLAxiom> getPendingAxiomAdditions() {
44: return wrapped.getPendingAxiomAdditions();
45: }
46:
47: @Nonnull
48: public Set<OWLAxiom> getPendingAxiomRemovals() {
49: return wrapped.getPendingAxiomRemovals();
50: }
51:
52: @Nonnull
53: public List<OWLOntologyChange> getPendingChanges() {
54: return wrapped.getPendingChanges();
55: }
56:
57: @Nonnull
58: public BufferingMode getBufferingMode() {
59: return wrapped.getBufferingMode();
60: }
61:
62: public long getTimeOut() {
63: return wrapped.getTimeOut();
64: }
65:
66: @Nonnull
67: public Set<InferenceType> getPrecomputableInferenceTypes() {
68: return wrapped.getPrecomputableInferenceTypes();
69: }
70:
71: public boolean isPrecomputed(@Nonnull InferenceType inferenceType) {
72: return wrapped.isPrecomputed(inferenceType);
73: }
74:
75: public void precomputeInferences(
76: @Nonnull InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException {
77: wrapped.precomputeInferences(inferenceTypes);
78: }
79:
80: public void interrupt() {
81: wrapped.interrupt();
82: }
83:
84: public void dispose() {
85: wrapped.dispose();
86: }
87:
88: public void flush() {
89: wrapped.flush();
90: }
91:
92: public boolean isConsistent() throws ReasonerInterruptedException, TimeOutException {
93: return wrapped.isConsistent();
94: }
95:
96: @Nonnull
97: public NodeSet<OWLClass> getDataPropertyDomains(@Nonnull OWLDataProperty pe,
98: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
99: return wrapped.getDataPropertyDomains(pe, true);
100: }
101:
102: @Nonnull
103: public Set<OWLLiteral> getDataPropertyValues(@Nonnull OWLNamedIndividual ind,
104: @Nonnull OWLDataProperty pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
105: return wrapped.getDataPropertyValues(ind, pe);
106: }
107:
108: @Nonnull
109: public Node<OWLClass> getEquivalentClasses(
110: @Nonnull OWLClassExpression ce) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException {
111: return wrapped.getEquivalentClasses(ce);
112: }
113:
114: @Nonnull
115: public Node<OWLDataProperty> getEquivalentDataProperties(
116: @Nonnull OWLDataProperty pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
117: return wrapped.getEquivalentDataProperties(pe);
118: }
119:
120: @Nonnull
121: public Node<OWLObjectPropertyExpression> getEquivalentObjectProperties(
122: @Nonnull OWLObjectPropertyExpression pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
123: return wrapped.getEquivalentObjectProperties(pe);
124: }
125:
126: @Nonnull
127: public NodeSet<OWLNamedIndividual> getInstances(@Nonnull OWLClassExpression ce,
128: boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException {
129: return wrapped.getInstances(ce, true);
130: }
131:
132: @Nonnull
133: public Node<OWLObjectPropertyExpression> getInverseObjectProperties(
134: @Nonnull OWLObjectPropertyExpression pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
135: return wrapped.getInverseObjectProperties(pe);
136: }
137:
138: @Nonnull
139: public NodeSet<OWLClass> getObjectPropertyDomains(@Nonnull OWLObjectPropertyExpression pe,
140: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
141: return wrapped.getObjectPropertyDomains(pe, true);
142: }
143:
144: @Nonnull
145: public NodeSet<OWLClass> getObjectPropertyRanges(@Nonnull OWLObjectPropertyExpression pe,
146: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
147: return wrapped.getObjectPropertyRanges(pe, true);
148: }
149:
150: @Nonnull
151: public NodeSet<OWLNamedIndividual> getObjectPropertyValues(@Nonnull OWLNamedIndividual ind,
152: @Nonnull OWLObjectPropertyExpression pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
153: return wrapped.getObjectPropertyValues(ind, pe);
154: }
155:
156:
157: @Nonnull
158: public Node<OWLNamedIndividual> getSameIndividuals(
159: @Nonnull OWLNamedIndividual ind) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
160: return wrapped.getSameIndividuals(ind);
161: }
162:
163: @Nonnull
164: public NodeSet<OWLClass> getSubClasses(@Nonnull OWLClassExpression ce,
165: boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException {
166: return wrapped.getSubClasses(ce, true);
167: }
168:
169: @Nonnull
170: public NodeSet<OWLDataProperty> getSubDataProperties(@Nonnull OWLDataProperty pe,
171: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
172: return wrapped.getSubDataProperties(pe, true);
173: }
174:
175: @Nonnull
176: public NodeSet<OWLObjectPropertyExpression> getSubObjectProperties(@Nonnull OWLObjectPropertyExpression pe,
177: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
178: return wrapped.getSubObjectProperties(pe, true);
179: }
180:
181: @Nonnull
182: public NodeSet<OWLClass> getSuperClasses(@Nonnull OWLClassExpression ce,
183: boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, TimeOutException {
184: return wrapped.getSuperClasses(ce, true);
185: }
186:
187: @Nonnull
188: public NodeSet<OWLDataProperty> getSuperDataProperties(@Nonnull OWLDataProperty pe,
189: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
190: return wrapped.getSuperDataProperties(pe, true);
191: }
192:
193: @Nonnull
194: public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties(@Nonnull OWLObjectPropertyExpression pe,
195: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
196: return wrapped.getSuperObjectProperties(pe, true);
197: }
198:
199: @Nonnull
200: public NodeSet<OWLClass> getTypes(@Nonnull OWLNamedIndividual ind,
201: boolean direct) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
202: return wrapped.getTypes(ind, true);
203: }
204:
205: @Nonnull
206: public Node<OWLClass> getUnsatisfiableClasses() throws ReasonerInterruptedException, TimeOutException {
207: return wrapped.getUnsatisfiableClasses();
208: }
209:
210: public boolean isEntailed(
211: @Nonnull OWLAxiom axiom) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, InconsistentOntologyException {
212: return wrapped.isEntailed(axiom);
213: }
214:
215: public boolean isEntailed(
216: @Nonnull Set<? extends OWLAxiom> axioms) throws ReasonerInterruptedException, UnsupportedEntailmentTypeException, TimeOutException, AxiomNotInProfileException, InconsistentOntologyException {
217: return wrapped.isEntailed(axioms);
218: }
219:
220: public boolean isEntailmentCheckingSupported(@Nonnull AxiomType<?> axiomType) {
221: return wrapped.isEntailmentCheckingSupported(axiomType);
222: }
223:
224: public boolean isSatisfiable(
225: @Nonnull OWLClassExpression ce) throws ReasonerInterruptedException, TimeOutException, ClassExpressionNotInProfileException, InconsistentOntologyException {
226: return wrapped.isSatisfiable(ce);
227: }
228:
229: @Nonnull
230: public Node<OWLClass> getBottomClassNode() {
231: return new OWLClassNode(OWL_NOTHING);
232: }
233:
234: @Nonnull
235: public Node<OWLDataProperty> getBottomDataPropertyNode() {
236: return new OWLDataPropertyNode(OWL_BOTTOM_DATA_PROPERTY);
237: }
238:
239: @Nonnull
240: public Node<OWLObjectPropertyExpression> getBottomObjectPropertyNode() {
241: return new OWLObjectPropertyNode(OWL_BOTTOM_OBJECT_PROPERTY);
242: }
243:
244: @Nonnull
245: public NodeSet<OWLNamedIndividual> getDifferentIndividuals(
246: @Nonnull OWLNamedIndividual ind) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
247: return wrapped.getDifferentIndividuals(ind);
248: }
249:
250: @Nonnull
251: public NodeSet<OWLClass> getDisjointClasses(@Nonnull OWLClassExpression ce) {
252: return wrapped.getDisjointClasses(ce);
253: }
254:
255: @Nonnull
256: public NodeSet<OWLDataProperty> getDisjointDataProperties(
257: @Nonnull OWLDataPropertyExpression pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
258: return wrapped.getDisjointDataProperties(pe);
259: }
260:
261: @Nonnull
262: public NodeSet<OWLObjectPropertyExpression> getDisjointObjectProperties(
263: @Nonnull OWLObjectPropertyExpression pe) throws InconsistentOntologyException, ReasonerInterruptedException, TimeOutException {
264: return wrapped.getDisjointObjectProperties(pe);
265: }
266:
267: @Nonnull
268: public IndividualNodeSetPolicy getIndividualNodeSetPolicy() {
269: return wrapped.getIndividualNodeSetPolicy();
270: }
271:
272: @Nonnull
273: public String getReasonerName() {
274: return "Owlapi Driver No-op Reasoner";
275: }
276:
277: @Nonnull
278: public Version getReasonerVersion() {
279: return new Version(1, 0, 0, 0);
280: }
281:
282: @Nonnull
283: public Node<OWLClass> getTopClassNode() {
284: return new OWLClassNode(OWL_THING);
285: }
286:
287: @Nonnull
288: public Node<OWLDataProperty> getTopDataPropertyNode() {
289: return new OWLDataPropertyNode(OWL_TOP_DATA_PROPERTY);
290: }
291:
292: @Nonnull
293: public Node<OWLObjectPropertyExpression> getTopObjectPropertyNode() {
294: return new OWLObjectPropertyNode(OWL_TOP_OBJECT_PROPERTY);
295: }
296:
297: @Nonnull
298: public FreshEntityPolicy getFreshEntityPolicy() {
299: return wrapped.getFreshEntityPolicy();
300: }
301: }