diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java b/src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java index ba6a4d4..447a92d 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/IterativeRefinement.java | |||
| @@ -7,6 +7,7 @@ import org.semanticweb.owlapi.model.OWLOntology; | |||
| 7 | import uk.ac.ox.cs.pagoda.constraints.BottomStrategy; | 7 | import uk.ac.ox.cs.pagoda.constraints.BottomStrategy; |
| 8 | import uk.ac.ox.cs.pagoda.constraints.UpperUnaryBottom; | 8 | import uk.ac.ox.cs.pagoda.constraints.UpperUnaryBottom; |
| 9 | import uk.ac.ox.cs.pagoda.multistage.MultiStageQueryEngine; | 9 | import uk.ac.ox.cs.pagoda.multistage.MultiStageQueryEngine; |
| 10 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; | ||
| 10 | import uk.ac.ox.cs.pagoda.query.QueryRecord; | 11 | import uk.ac.ox.cs.pagoda.query.QueryRecord; |
| 11 | import uk.ac.ox.cs.pagoda.reasoner.light.BasicQueryEngine; | 12 | import uk.ac.ox.cs.pagoda.reasoner.light.BasicQueryEngine; |
| 12 | import uk.ac.ox.cs.pagoda.rules.GeneralProgram; | 13 | import uk.ac.ox.cs.pagoda.rules.GeneralProgram; |
| @@ -47,7 +48,13 @@ public class IterativeRefinement { | |||
| 47 | return m_record.getRelevantOntology(); | 48 | return m_record.getRelevantOntology(); |
| 48 | } | 49 | } |
| 49 | 50 | ||
| 50 | update = m_record.updateUpperBoundAnswers(tEngine.evaluate(m_record.getQueryText())); | 51 | AnswerTuples ans = null; |
| 52 | try { | ||
| 53 | ans = tEngine.evaluate(m_record.getQueryText()); | ||
| 54 | update = m_record.updateUpperBoundAnswers(ans); | ||
| 55 | } finally { | ||
| 56 | if (ans != null) ans.dispose(); | ||
| 57 | } | ||
| 51 | } finally { | 58 | } finally { |
| 52 | tEngine.dispose(); | 59 | tEngine.dispose(); |
| 53 | } | 60 | } |
| @@ -78,7 +85,13 @@ public class IterativeRefinement { | |||
| 78 | return m_record.getRelevantOntology(); | 85 | return m_record.getRelevantOntology(); |
| 79 | } | 86 | } |
| 80 | 87 | ||
| 81 | update = m_record.updateUpperBoundAnswers(tEngine.evaluate(m_record.getQueryText())); | 88 | AnswerTuples ans = null; |
| 89 | try { | ||
| 90 | ans = tEngine.evaluate(m_record.getQueryText()); | ||
| 91 | update = m_record.updateUpperBoundAnswers(ans); | ||
| 92 | } finally { | ||
| 93 | if (ans != null) ans.dispose(); | ||
| 94 | } | ||
| 82 | } finally { | 95 | } finally { |
| 83 | tEngine.dispose(); | 96 | tEngine.dispose(); |
| 84 | } | 97 | } |
