diff options
| author | yzhou <yzhou@krr-linux.cs.ox.ac.uk> | 2015-04-29 09:41:46 +0100 |
|---|---|---|
| committer | yzhou <yzhou@krr-linux.cs.ox.ac.uk> | 2015-04-29 09:41:46 +0100 |
| commit | 6c5d9406d0c9b9dc96bb9599c152256fc9807940 (patch) | |
| tree | 00d745312a0e443b6a3e4b5d8bbc13e6518ffa8b /test/uk | |
| parent | 4013a9d33d0f1a06b87d12dd0543912c53bba137 (diff) | |
| download | ACQuA-6c5d9406d0c9b9dc96bb9599c152256fc9807940.tar.gz ACQuA-6c5d9406d0c9b9dc96bb9599c152256fc9807940.zip | |
handle inconsistent ontology
Diffstat (limited to 'test/uk')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/ore/PagodaOWLReasoner.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/ore/PagodaOWLReasoner.java b/test/uk/ac/ox/cs/pagoda/ore/PagodaOWLReasoner.java index 4b0c1d4..282c8f3 100644 --- a/test/uk/ac/ox/cs/pagoda/ore/PagodaOWLReasoner.java +++ b/test/uk/ac/ox/cs/pagoda/ore/PagodaOWLReasoner.java | |||
| @@ -111,6 +111,9 @@ public class PagodaOWLReasoner implements OWLReasoner { | |||
| 111 | 111 | ||
| 112 | @Override | 112 | @Override |
| 113 | public void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { | 113 | public void precomputeInferences(InferenceType... inferenceTypes) throws ReasonerInterruptedException, TimeOutException, InconsistentOntologyException { |
| 114 | if (!sat) { | ||
| 115 | throw new InconsistentOntologyException(); | ||
| 116 | } | ||
| 114 | if (inferenceTypes.length == 1 && inferenceTypes[0].equals(InferenceType.CLASS_ASSERTIONS) && types.isEmpty()) { | 117 | if (inferenceTypes.length == 1 && inferenceTypes[0].equals(InferenceType.CLASS_ASSERTIONS) && types.isEmpty()) { |
| 115 | Set<OWLClass> queriedClasses = new HashSet<OWLClass>(); | 118 | Set<OWLClass> queriedClasses = new HashSet<OWLClass>(); |
| 116 | for (OWLOntology onto: ontology.getImportsClosure()) | 119 | for (OWLOntology onto: ontology.getImportsClosure()) |
| @@ -389,6 +392,9 @@ public class PagodaOWLReasoner implements OWLReasoner { | |||
| 389 | 392 | ||
| 390 | @Override | 393 | @Override |
| 391 | public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { | 394 | public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { |
| 395 | if (!sat) { | ||
| 396 | throw new InconsistentOntologyException(); | ||
| 397 | } | ||
| 392 | if (types.containsKey(ind)) return types.get(ind); | 398 | if (types.containsKey(ind)) return types.get(ind); |
| 393 | return thing; | 399 | return thing; |
| 394 | } | 400 | } |
