Skip to content

Package: OWLAPIIdentityReasoner

OWLAPIIdentityReasoner

nameinstructionbranchcomplexitylinemethod
OWLAPIIdentityReasoner(OWLOntology)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
dispose()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
flush()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getBottomClassNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getBottomDataPropertyNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getBottomObjectPropertyNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getBufferingMode()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getDataPropertyDomains(OWLDataProperty, boolean)
M: 35 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getDataPropertyValues(OWLNamedIndividual, OWLDataProperty)
M: 36 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getDifferentIndividuals(OWLNamedIndividual)
M: 44 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
getDisjointClasses(OWLClassExpression)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getDisjointDataProperties(OWLDataPropertyExpression)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getDisjointObjectProperties(OWLObjectPropertyExpression)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getEquivalentClasses(OWLClassExpression)
M: 44 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
getEquivalentDataProperties(OWLDataProperty)
M: 31 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getEquivalentObjectProperties(OWLObjectPropertyExpression)
M: 44 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
getFreshEntityPolicy()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getIndividualNodeSetPolicy()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getInstances(OWLClassExpression, boolean)
M: 34 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getInverseObjectProperties(OWLObjectPropertyExpression)
M: 49 C: 0
0%
M: 10 C: 0
0%
M: 6 C: 0
0%
M: 11 C: 0
0%
M: 1 C: 0
0%
getObjectPropertyDomains(OWLObjectPropertyExpression, boolean)
M: 35 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getObjectPropertyRanges(OWLObjectPropertyExpression, boolean)
M: 37 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getObjectPropertyValues(OWLNamedIndividual, OWLObjectPropertyExpression)
M: 28 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
getPendingAxiomAdditions()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPendingAxiomRemovals()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPendingChanges()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPrecomputableInferenceTypes()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getReasonerName()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getReasonerVersion()
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getRootOntology()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getSameIndividuals(OWLNamedIndividual)
M: 44 C: 0
0%
M: 8 C: 0
0%
M: 5 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
getSubClasses(OWLClassExpression, boolean)
M: 34 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getSubDataProperties(OWLDataProperty, boolean)
M: 37 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getSubObjectProperties(OWLObjectPropertyExpression, boolean)
M: 37 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getSuperClasses(OWLClassExpression, boolean)
M: 34 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getSuperDataProperties(OWLDataProperty, boolean)
M: 37 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getSuperObjectProperties(OWLObjectPropertyExpression, boolean)
M: 37 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getTimeOut()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getTopClassNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getTopDataPropertyNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getTopObjectPropertyNode()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getTypes(OWLNamedIndividual, boolean)
M: 27 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
getUnsatisfiableClasses()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
interrupt()
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isConsistent()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isEntailed(OWLAxiom)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isEntailed(Set)
M: 20 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
isEntailmentCheckingSupported(AxiomType)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isPrecomputed(InferenceType)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isSatisfiable(OWLClassExpression)
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
precomputeInferences(InferenceType[])
M: 1 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.owlapi.identityreasoner;
16:
17: import java.util.Collections;
18: import java.util.HashSet;
19: import java.util.List;
20: import java.util.Set;
21:
22: import org.semanticweb.owlapi.model.AxiomType;
23: import org.semanticweb.owlapi.model.OWLAxiom;
24: import org.semanticweb.owlapi.model.OWLClass;
25: import org.semanticweb.owlapi.model.OWLClassAssertionAxiom;
26: import org.semanticweb.owlapi.model.OWLClassExpression;
27: import org.semanticweb.owlapi.model.OWLDataProperty;
28: import org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom;
29: import org.semanticweb.owlapi.model.OWLDataPropertyDomainAxiom;
30: import org.semanticweb.owlapi.model.OWLDataPropertyExpression;
31: import org.semanticweb.owlapi.model.OWLDifferentIndividualsAxiom;
32: import org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom;
33: import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom;
34: import org.semanticweb.owlapi.model.OWLIndividual;
35: import org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom;
36: import org.semanticweb.owlapi.model.OWLLiteral;
37: import org.semanticweb.owlapi.model.OWLNamedIndividual;
38: import org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom;
39: import org.semanticweb.owlapi.model.OWLObjectPropertyExpression;
40: import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom;
41: import org.semanticweb.owlapi.model.OWLOntology;
42: import org.semanticweb.owlapi.model.OWLOntologyChange;
43: import org.semanticweb.owlapi.model.OWLSameIndividualAxiom;
44: import org.semanticweb.owlapi.model.OWLSubClassOfAxiom;
45: import org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom;
46: import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom;
47: import org.semanticweb.owlapi.reasoner.AxiomNotInProfileException;
48: import org.semanticweb.owlapi.reasoner.BufferingMode;
49: import org.semanticweb.owlapi.reasoner.ClassExpressionNotInProfileException;
50: import org.semanticweb.owlapi.reasoner.FreshEntitiesException;
51: import org.semanticweb.owlapi.reasoner.FreshEntityPolicy;
52: import org.semanticweb.owlapi.reasoner.InconsistentOntologyException;
53: import org.semanticweb.owlapi.reasoner.IndividualNodeSetPolicy;
54: import org.semanticweb.owlapi.reasoner.InferenceType;
55: import org.semanticweb.owlapi.reasoner.Node;
56: import org.semanticweb.owlapi.reasoner.NodeSet;
57: import org.semanticweb.owlapi.reasoner.OWLReasoner;
58: import org.semanticweb.owlapi.reasoner.ReasonerInterruptedException;
59: import org.semanticweb.owlapi.reasoner.TimeOutException;
60: import org.semanticweb.owlapi.reasoner.UnsupportedEntailmentTypeException;
61: import org.semanticweb.owlapi.reasoner.impl.OWLClassNode;
62: import org.semanticweb.owlapi.reasoner.impl.OWLClassNodeSet;
63: import org.semanticweb.owlapi.reasoner.impl.OWLDataPropertyNode;
64: import org.semanticweb.owlapi.reasoner.impl.OWLDataPropertyNodeSet;
65: import org.semanticweb.owlapi.reasoner.impl.OWLNamedIndividualNode;
66: import org.semanticweb.owlapi.reasoner.impl.OWLNamedIndividualNodeSet;
67: import org.semanticweb.owlapi.reasoner.impl.OWLObjectPropertyNode;
68: import org.semanticweb.owlapi.reasoner.impl.OWLObjectPropertyNodeSet;
69: import org.semanticweb.owlapi.util.Version;
70:
71: @Deprecated
72: class OWLAPIIdentityReasoner implements OWLReasoner {
73:
74:         private final OWLOntology o;
75:
76:         public OWLAPIIdentityReasoner(final OWLOntology o) {
77:                 this.o = o;
78:         }
79:
80:         
81:         public void dispose() {
82:                 // do nothing
83:         }
84:
85:         
86:         public void flush() {
87:                 // do nothing
88:         }
89:
90:         
91:         public Node<OWLClass> getBottomClassNode() {
92:                 return new OWLClassNode(o.getOWLOntologyManager().getOWLDataFactory()
93:                                 .getOWLNothing());
94:         }
95:
96:         
97:         public Node<OWLDataProperty> getBottomDataPropertyNode() {
98:                 return new OWLDataPropertyNode(o.getOWLOntologyManager()
99:                                 .getOWLDataFactory().getOWLBottomDataProperty());
100:         }
101:
102:         
103:         public Node<OWLObjectPropertyExpression> getBottomObjectPropertyNode() {
104:                 return new OWLObjectPropertyNode(o.getOWLOntologyManager()
105:                                 .getOWLDataFactory().getOWLBottomObjectProperty());
106:         }
107:
108:         
109:         public BufferingMode getBufferingMode() {
110:                 return BufferingMode.NON_BUFFERING;
111:         }
112:
113:         
114:         public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe,
115:                         boolean direct) throws InconsistentOntologyException,
116:                         ReasonerInterruptedException, TimeOutException {
117:                 final OWLClassNodeSet s = new OWLClassNodeSet();
118:
119:•                for (final OWLDataPropertyDomainAxiom a : o
120:                                 .getAxioms(AxiomType.DATA_PROPERTY_DOMAIN)) {
121:•                        if (a.getProperty().equals(pe) && !a.getDomain().isAnonymous()) {
122:                                 s.addEntity(a.getDomain().asOWLClass());
123:                         }
124:                 }
125:
126:                 return s;
127:         }
128:
129:         
130:         public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind,
131:                         OWLDataProperty pe) throws InconsistentOntologyException,
132:                         ReasonerInterruptedException, TimeOutException {
133:                 final Set<OWLLiteral> literals = new HashSet<OWLLiteral>();
134:
135:•                for (final OWLDataPropertyAssertionAxiom a : o
136:                                 .getAxioms(AxiomType.DATA_PROPERTY_ASSERTION)) {
137:•                        if (a.getProperty().equals(pe) && a.getSubject().equals(ind)) {
138:                                 // if (a.getObject().isNamed()) {
139:                                 // pn.addEntity(a.getObject().asOWLNamedIndividual());
140:                                 // }
141:                                 literals.add(a.getObject());
142:                         }
143:                 }
144:
145:                 return literals;
146:         }
147:
148:         
149:         public NodeSet<OWLNamedIndividual> getDifferentIndividuals(
150:                         OWLNamedIndividual ind) throws InconsistentOntologyException,
151:                         ReasonerInterruptedException, TimeOutException {
152:                 final OWLNamedIndividualNodeSet pn = new OWLNamedIndividualNodeSet();
153:
154:•                for (final OWLDifferentIndividualsAxiom a : o
155:                                 .getAxioms(AxiomType.DIFFERENT_INDIVIDUALS)) {
156:•                        if (a.getIndividuals().contains(ind)) {
157:•                                for (OWLIndividual e : a.getIndividuals()) {
158:•                                        if (e.isNamed()) {
159:                                                 pn.addEntity(e.asOWLNamedIndividual());
160:                                         }
161:                                 }
162:                         }
163:                 }
164:
165:                 return pn;
166:         }
167:
168: //        
169: //        public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression ce,
170: //                        boolean direct) {
171: //                final OWLClassNodeSet pn = new OWLClassNodeSet();
172: //
173: //                for (final OWLDisjointClassesAxiom a : o
174: //                                .getAxioms(AxiomType.DISJOINT_CLASSES)) {
175: //                        if (a.getClassExpressions().contains(ce)) {
176: //                                for (OWLClassExpression e : a.getClassExpressions()) {
177: //                                        if (!e.isAnonymous()) {
178: //                                                pn.addEntity(e.asOWLClass());
179: //                                        }
180: //                                }
181: //                        }
182: //                }
183: //
184: //                return pn;
185: //        }
186: //
187: //        
188: //        public NodeSet<OWLDataProperty> getDisjointDataProperties(
189: //                        OWLDataPropertyExpression pe, boolean direct)
190: //                        throws InconsistentOntologyException, ReasonerInterruptedException,
191: //                        TimeOutException {
192: //                final OWLDataPropertyNodeSet pn = new OWLDataPropertyNodeSet();
193: //
194: //                for (final OWLDisjointDataPropertiesAxiom a : o
195: //                                .getAxioms(AxiomType.DISJOINT_DATA_PROPERTIES)) {
196: //                        if (a.getProperties().contains(pe)) {
197: //                                for (OWLDataPropertyExpression e : a.getProperties()) {
198: //                                        if (!e.isAnonymous()) {
199: //                                                pn.addEntity(e.asOWLDataProperty());
200: //                                        }
201: //                                }
202: //                        }
203: //                }
204: //
205: //                return pn;
206: //        }
207: //
208: //        
209: //        public NodeSet<OWLObjectProperty> getDisjointObjectProperties(
210: //                        OWLObjectPropertyExpression pe, boolean direct)
211: //                        throws InconsistentOntologyException, ReasonerInterruptedException,
212: //                        TimeOutException {
213: //                final OWLObjectPropertyNodeSet pn = new OWLObjectPropertyNodeSet();
214: //
215: //                for (final OWLDisjointObjectPropertiesAxiom a : o
216: //                                .getAxioms(AxiomType.DISJOINT_OBJECT_PROPERTIES)) {
217: //                        if (a.getProperties().contains(pe)) {
218: //                                for (OWLObjectPropertyExpression e : a.getProperties()) {
219: //                                        if (!e.isAnonymous()) {
220: //                                                pn.addEntity(e.asOWLObjectProperty());
221: //                                        }
222: //                                }
223: //                        }
224: //                }
225: //
226: //                return pn;
227: //        }
228:
229:         
230:         public Node<OWLClass> getEquivalentClasses(OWLClassExpression ce)
231:                         throws InconsistentOntologyException,
232:                         ClassExpressionNotInProfileException, ReasonerInterruptedException,
233:                         TimeOutException {
234:                 final OWLClassNode pn = new OWLClassNode();
235:
236:•                for (final OWLEquivalentClassesAxiom a : o
237:                                 .getAxioms(AxiomType.EQUIVALENT_CLASSES)) {
238:•                        if (a.getClassExpressions().contains(ce)) {
239:•                                for (OWLClassExpression e : a.getClassExpressions()) {
240:•                                        if (!e.isAnonymous()) {
241:                                                 pn.add(e.asOWLClass());
242:                                         }
243:                                 }
244:                         }
245:                 }
246:
247:                 return pn;
248:         }
249:
250:         
251:         public Node<OWLDataProperty> getEquivalentDataProperties(OWLDataProperty pe)
252:                         throws InconsistentOntologyException, ReasonerInterruptedException,
253:                         TimeOutException {
254:                 final OWLDataPropertyNode pn = new OWLDataPropertyNode(pe);
255:
256:•                for (final OWLDataPropertyExpression p : pe.getEquivalentProperties(o)) {
257:•                        if (!p.isAnonymous()) {
258:                                 pn.add(p.asOWLDataProperty());
259:                         }
260:                 }
261:
262:                 pn.add(pe);
263:
264:                 return pn;
265:         }
266:
267:         
268:         public Node<OWLObjectPropertyExpression> getEquivalentObjectProperties(
269:                         OWLObjectPropertyExpression pe)
270:                         throws InconsistentOntologyException, ReasonerInterruptedException,
271:                         TimeOutException {
272:                 final OWLObjectPropertyNode pn = new OWLObjectPropertyNode();
273:
274:•                for (final OWLEquivalentObjectPropertiesAxiom a : o
275:                                 .getAxioms(AxiomType.EQUIVALENT_OBJECT_PROPERTIES)) {
276:•                        if (a.getProperties().contains(pe)) {
277:•                                for (OWLObjectPropertyExpression e : a.getProperties()) {
278:•                                        if (!e.isAnonymous()) {
279:                                                 pn.add(e.asOWLObjectProperty());
280:                                         }
281:                                 }
282:                         }
283:                 }
284:
285:                 return pn;
286:         }
287:
288:         
289:         public IndividualNodeSetPolicy getIndividualNodeSetPolicy() {
290:                 return IndividualNodeSetPolicy.BY_NAME;
291:         }
292:
293:         
294:         public NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce,
295:                         boolean direct) throws InconsistentOntologyException,
296:                         ClassExpressionNotInProfileException, ReasonerInterruptedException,
297:                         TimeOutException {
298:                 final OWLNamedIndividualNodeSet s = new OWLNamedIndividualNodeSet();
299:
300:•                for (final OWLClassAssertionAxiom a : o
301:                                 .getAxioms(AxiomType.CLASS_ASSERTION)) {
302:•                        if (a.getClassExpression().equals(ce)
303:•                                        && a.getIndividual().isNamed()) {
304:                                 s.addEntity(a.getIndividual().asOWLNamedIndividual());
305:                         }
306:                 }
307:
308:                 return s;
309:         }
310:
311:         
312:         public Node<OWLObjectPropertyExpression> getInverseObjectProperties(
313:                         OWLObjectPropertyExpression pe)
314:                         throws InconsistentOntologyException, ReasonerInterruptedException,
315:                         TimeOutException {
316:                 final OWLObjectPropertyNode s = new OWLObjectPropertyNode();
317:
318:•                for (final OWLInverseObjectPropertiesAxiom a : o
319:                                 .getAxioms(AxiomType.INVERSE_OBJECT_PROPERTIES)) {
320:•                        if (a.getFirstProperty().equals(pe)) {
321:•                                if (!a.getSecondProperty().isAnonymous()) {
322:                                         s.add(a.getSecondProperty().asOWLObjectProperty());
323:                                 }
324:•                        } else if (a.getSecondProperty().equals(pe)) {
325:•                                if (!a.getFirstProperty().isAnonymous()) {
326:                                         s.add(a.getFirstProperty().asOWLObjectProperty());
327:                                 }
328:                         }
329:                 }
330:
331:                 return s;
332:         }
333:
334:         
335:         public NodeSet<OWLClass> getObjectPropertyDomains(
336:                         OWLObjectPropertyExpression pe, boolean direct)
337:                         throws InconsistentOntologyException, ReasonerInterruptedException,
338:                         TimeOutException {
339:                 final OWLClassNodeSet s = new OWLClassNodeSet();
340:
341:•                for (final OWLObjectPropertyDomainAxiom a : o
342:                                 .getAxioms(AxiomType.OBJECT_PROPERTY_DOMAIN)) {
343:•                        if (a.getProperty().equals(pe) && !a.getDomain().isAnonymous()) {
344:                                 s.addEntity(a.getDomain().asOWLClass());
345:                         }
346:                 }
347:
348:                 return s;
349:         }
350:
351:         
352:         public NodeSet<OWLClass> getObjectPropertyRanges(
353:                         OWLObjectPropertyExpression pe, boolean direct)
354:                         throws InconsistentOntologyException, ReasonerInterruptedException,
355:                         TimeOutException {
356:                 final OWLClassNodeSet s = new OWLClassNodeSet();
357:
358:•                for (final OWLObjectPropertyRangeAxiom a : o
359:                                 .getAxioms(AxiomType.OBJECT_PROPERTY_RANGE)) {
360:•                        if (a.getProperty().equals(pe) && !a.getRange().isAnonymous()) {
361:                                 s.addEntity(a.getRange().asOWLClass());
362:                         }
363:                 }
364:
365:                 return s;
366:         }
367:
368:         
369:         public NodeSet<OWLNamedIndividual> getObjectPropertyValues(
370:                         OWLNamedIndividual ind, OWLObjectPropertyExpression pe)
371:                         throws InconsistentOntologyException, ReasonerInterruptedException,
372:                         TimeOutException {
373:                 final OWLNamedIndividualNodeSet pn = new OWLNamedIndividualNodeSet();
374:
375:•                for (final OWLIndividual i : ind.getObjectPropertyValues(pe, o)) {
376:•                        if (i.isNamed()) {
377:                                 pn.addEntity(i.asOWLNamedIndividual());
378:                         }
379:                 }
380:                 //                
381:                 // o.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(iri)
382:                 //                
383:                 // for (final OWLObjectPropertyAssertionAxiom a : o
384:                 // .getAxioms(AxiomType.OBJECT_PROPERTY_ASSERTION)) {
385:                 // if (a.getProperty().equals(pe) && a.getSubject().equals(ind)) {
386:                 // if (a.getObject().isNamed()) {
387:                 // pn.addEntity(a.getObject().asOWLNamedIndividual());
388:                 // }
389:                 // }
390:                 // }
391:
392:                 return pn;
393:         }
394:
395:         
396:         public Set<OWLAxiom> getPendingAxiomAdditions() {
397:                 return Collections.emptySet();
398:         }
399:
400:         
401:         public Set<OWLAxiom> getPendingAxiomRemovals() {
402:                 return Collections.emptySet();
403:         }
404:
405:         
406:         public List<OWLOntologyChange> getPendingChanges() {
407:                 return Collections.emptyList();
408:         }
409:
410:         
411:         public String getReasonerName() {
412:                 return "identity reasoner";
413:         }
414:
415:         
416:         public Version getReasonerVersion() {
417:                 return new Version(0, 1, 0, 1);
418:         }
419:
420:         
421:         public OWLOntology getRootOntology() {
422:                 return o;
423:         }
424:
425:         
426:         public Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind)
427:                         throws InconsistentOntologyException, ReasonerInterruptedException,
428:                         TimeOutException {
429:                 final OWLNamedIndividualNode pn = new OWLNamedIndividualNode();
430:
431:•                for (final OWLSameIndividualAxiom a : o
432:                                 .getAxioms(AxiomType.SAME_INDIVIDUAL)) {
433:•                        if (a.getIndividuals().contains(ind)) {
434:•                                for (OWLIndividual e : a.getIndividuals()) {
435:•                                        if (e.isNamed()) {
436:                                                 pn.add(e.asOWLNamedIndividual());
437:                                         }
438:                                 }
439:                         }
440:                 }
441:
442:                 return pn;
443:         }
444:
445:         
446:         public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) {
447:                 final OWLClassNodeSet pn = new OWLClassNodeSet();
448:
449:•                for (final OWLSubClassOfAxiom a : o.getAxioms(AxiomType.SUBCLASS_OF)) {
450:•                        if (a.getSuperClass().equals(ce)) {
451:•                                if (!a.getSubClass().isAnonymous()) {
452:                                         pn.addEntity(a.getSubClass().asOWLClass());
453:                                 }
454:                         }
455:                 }
456:
457:                 return pn;
458:         }
459:
460:         
461:         public NodeSet<OWLDataProperty> getSubDataProperties(OWLDataProperty pe,
462:                         boolean direct) throws InconsistentOntologyException,
463:                         ReasonerInterruptedException, TimeOutException {
464:                 final OWLDataPropertyNodeSet pn = new OWLDataPropertyNodeSet();
465:
466:•                for (final OWLSubDataPropertyOfAxiom a : o
467:                                 .getAxioms(AxiomType.SUB_DATA_PROPERTY)) {
468:•                        if (a.getSuperProperty().equals(pe)) {
469:•                                if (!a.getSubProperty().isAnonymous()) {
470:                                         pn.addEntity(a.getSubProperty().asOWLDataProperty());
471:                                 }
472:                         }
473:                 }
474:
475:                 return pn;
476:         }
477:
478:         
479:         public NodeSet<OWLObjectPropertyExpression> getSubObjectProperties(
480:                         OWLObjectPropertyExpression pe, boolean direct)
481:                         throws InconsistentOntologyException, ReasonerInterruptedException,
482:                         TimeOutException {
483:                 final OWLObjectPropertyNodeSet pn = new OWLObjectPropertyNodeSet();
484:
485:•                for (final OWLSubObjectPropertyOfAxiom a : o
486:                                 .getAxioms(AxiomType.SUB_OBJECT_PROPERTY)) {
487:•                        if (a.getSuperProperty().equals(pe)) {
488:•                                if (!a.getSubProperty().isAnonymous()) {
489:                                         pn.addEntity(a.getSubProperty().asOWLObjectProperty());
490:                                 }
491:                         }
492:                 }
493:
494:                 return pn;
495:         }
496:
497:         
498:         public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce,
499:                         boolean direct) throws InconsistentOntologyException,
500:                         ClassExpressionNotInProfileException, ReasonerInterruptedException,
501:                         TimeOutException {
502:                 final OWLClassNodeSet pn = new OWLClassNodeSet();
503:
504:•                for (final OWLSubClassOfAxiom a : o.getAxioms(AxiomType.SUBCLASS_OF)) {
505:•                        if (a.getSubClass().equals(ce)) {
506:•                                if (!a.getSuperClass().isAnonymous()) {
507:                                         pn.addEntity(a.getSuperClass().asOWLClass());
508:                                 }
509:                         }
510:                 }
511:
512:                 return pn;
513:         }
514:
515:         
516:         public NodeSet<OWLDataProperty> getSuperDataProperties(OWLDataProperty pe,
517:                         boolean direct) throws InconsistentOntologyException,
518:                         ReasonerInterruptedException, TimeOutException {
519:                 final OWLDataPropertyNodeSet pn = new OWLDataPropertyNodeSet();
520:
521:•                for (final OWLSubDataPropertyOfAxiom a : o
522:                                 .getAxioms(AxiomType.SUB_DATA_PROPERTY)) {
523:•                        if (a.getSubProperty().equals(pe)) {
524:•                                if (!a.getSuperProperty().isAnonymous()) {
525:                                         pn.addEntity(a.getSuperProperty().asOWLDataProperty());
526:                                 }
527:                         }
528:                 }
529:
530:                 return pn;
531:         }
532:
533:         
534:         public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties(
535:                         OWLObjectPropertyExpression pe, boolean direct)
536:                         throws InconsistentOntologyException, ReasonerInterruptedException,
537:                         TimeOutException {
538:                 final OWLObjectPropertyNodeSet pn = new OWLObjectPropertyNodeSet();
539:
540:•                for (final OWLSubObjectPropertyOfAxiom a : o
541:                                 .getAxioms(AxiomType.SUB_OBJECT_PROPERTY)) {
542:•                        if (a.getSubProperty().equals(pe)) {
543:•                                if (!a.getSuperProperty().isAnonymous()) {
544:                                         pn.addEntity(a.getSuperProperty().asOWLObjectProperty());
545:                                 }
546:                         }
547:                 }
548:
549:                 return pn;
550:         }
551:
552:         
553:         public long getTimeOut() {
554:                 return Long.MAX_VALUE;
555:         }
556:
557:         
558:         public Node<OWLClass> getTopClassNode() {
559:                 return new OWLClassNode(o.getOWLOntologyManager().getOWLDataFactory()
560:                                 .getOWLThing());
561:         }
562:
563:         
564:         public Node<OWLDataProperty> getTopDataPropertyNode() {
565:                 return new OWLDataPropertyNode(o.getOWLOntologyManager()
566:                                 .getOWLDataFactory().getOWLTopDataProperty());
567:         }
568:
569:         
570:         public Node<OWLObjectPropertyExpression> getTopObjectPropertyNode() {
571:                 return new OWLObjectPropertyNode(o.getOWLOntologyManager()
572:                                 .getOWLDataFactory().getOWLTopObjectProperty());
573:
574:         }
575:
576:         
577:         public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct)
578:                         throws InconsistentOntologyException, ReasonerInterruptedException,
579:                         TimeOutException {
580:                 final OWLClassNodeSet s = new OWLClassNodeSet();
581:
582:                 // for (final OWLClassAssertionAxiom a : o
583:                 // .getAxioms(AxiomType.CLASS_ASSERTION)) {
584:                 // if (a.getIndividual().equals(ce)
585:                 // && a.getIndividual().isNamed()) {
586:                 // s.addEntity(a.getIndividual().asOWLNamedIndividual());
587:                 // }
588:                 // }
589:
590:•                for (final OWLClassExpression ce : ind.getTypes(o)) {
591:•                        if (!ce.isAnonymous()) {
592:                                 s.addEntity(ce.asOWLClass());
593:                         }
594:                 }
595:
596:                 return s;
597:         }
598:
599:         
600:         public Node<OWLClass> getUnsatisfiableClasses()
601:                         throws ReasonerInterruptedException, TimeOutException {
602:                 return new OWLClassNode();
603:         }
604:
605:         
606:         public void interrupt() {
607:                 // do nothing
608:         }
609:
610:         
611:         public boolean isConsistent() throws ReasonerInterruptedException,
612:                         TimeOutException {
613:                 return true;
614:         }
615:
616:         
617:         public boolean isEntailed(OWLAxiom axiom)
618:                         throws ReasonerInterruptedException,
619:                         UnsupportedEntailmentTypeException, TimeOutException,
620:                         AxiomNotInProfileException {
621:                 return o.containsAxiom(axiom);
622:         }
623:
624:         
625:         public boolean isEntailed(Set<? extends OWLAxiom> axioms)
626:                         throws ReasonerInterruptedException,
627:                         UnsupportedEntailmentTypeException, TimeOutException,
628:                         AxiomNotInProfileException {
629:•                for (final OWLAxiom a : axioms) {
630:•                        if (!o.containsAxiom(a)) {
631:                                 return false;
632:                         }
633:                 }
634:                 return true;
635:         }
636:
637:         
638:         public boolean isEntailmentCheckingSupported(AxiomType<?> axiomType) {
639:                 return true;
640:         }
641:
642:         
643:         public boolean isSatisfiable(OWLClassExpression classExpression)
644:                         throws ReasonerInterruptedException, TimeOutException,
645:                         ClassExpressionNotInProfileException, InconsistentOntologyException {
646:                 return true;
647:         }
648:
649:         
650:         public FreshEntityPolicy getFreshEntityPolicy() {
651:                 return FreshEntityPolicy.DISALLOW;
652:         }
653:
654:         
655:         public NodeSet<OWLClass> getDisjointClasses(OWLClassExpression arg0)
656:                         throws ReasonerInterruptedException, TimeOutException,
657:                         FreshEntitiesException, InconsistentOntologyException {
658:                 // TODO Auto-generated method stub
659:                 return null;
660:         }
661:
662:         
663:         public NodeSet<OWLDataProperty> getDisjointDataProperties(
664:                         OWLDataPropertyExpression arg0)
665:                         throws InconsistentOntologyException, FreshEntitiesException,
666:                         ReasonerInterruptedException, TimeOutException {
667:                 // TODO Auto-generated method stub
668:                 return null;
669:         }
670:
671:         
672:         public NodeSet<OWLObjectPropertyExpression> getDisjointObjectProperties(
673:                         OWLObjectPropertyExpression arg0)
674:                         throws InconsistentOntologyException, FreshEntitiesException,
675:                         ReasonerInterruptedException, TimeOutException {
676:                 // TODO Auto-generated method stub
677:                 return null;
678:         }
679:
680:         
681:         public Set<InferenceType> getPrecomputableInferenceTypes() {
682:                 // TODO Auto-generated method stub
683:                 return null;
684:         }
685:
686:         
687:         public boolean isPrecomputed(InferenceType arg0) {
688:                 // TODO Auto-generated method stub
689:                 return false;
690:         }
691:
692:         
693:         public void precomputeInferences(InferenceType... arg0)
694:                         throws ReasonerInterruptedException, TimeOutException,
695:                         InconsistentOntologyException {
696:                 // TODO Auto-generated method stub
697:                 
698:         }
699: }