diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 19:06:04 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 19:06:04 +0100 |
| commit | 7a68441a541b12b22587fb53072193e1130049ff (patch) | |
| tree | e05f826da89e73a7f961c505359f4135cca646a8 /src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java | |
| parent | 612729386b645b120f8397a007cd8421986af0ad (diff) | |
| download | ACQuA-7a68441a541b12b22587fb53072193e1130049ff.tar.gz ACQuA-7a68441a541b12b22587fb53072193e1130049ff.zip | |
Deleted unused classes.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java b/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java deleted file mode 100644 index 9191067..0000000 --- a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager2.java +++ /dev/null | |||
| @@ -1,78 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.reasoner; | ||
| 2 | |||
| 3 | import org.semanticweb.owlapi.model.OWLOntologyCreationException; | ||
| 4 | import org.semanticweb.owlapi.model.OWLOntologyManager; | ||
| 5 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; | ||
| 6 | import uk.ac.ox.cs.pagoda.query.QueryRecord; | ||
| 7 | import uk.ac.ox.cs.pagoda.reasoner.full.Checker; | ||
| 8 | import uk.ac.ox.cs.pagoda.summary.HermitSummaryFilter; | ||
| 9 | import uk.ac.ox.cs.pagoda.tracking.QueryTracker; | ||
| 10 | import uk.ac.ox.cs.pagoda.util.Utility; | ||
| 11 | |||
| 12 | @Deprecated | ||
| 13 | public class ConsistencyManager2 extends ConsistencyManager { | ||
| 14 | |||
| 15 | public ConsistencyManager2(MyQueryReasoner reasoner) { | ||
| 16 | super(reasoner); | ||
| 17 | fragmentExtracted = true; | ||
| 18 | } | ||
| 19 | |||
| 20 | protected boolean unsatisfiability(double duration) { | ||
| 21 | Utility.logDebug("The ontology and dataset is unsatisfiable."); | ||
| 22 | return false; | ||
| 23 | } | ||
| 24 | |||
| 25 | protected boolean satisfiability(double duration) { | ||
| 26 | Utility.logDebug("The ontology and dataset is satisfiable."); | ||
| 27 | return true; | ||
| 28 | } | ||
| 29 | |||
| 30 | @Override | ||
| 31 | boolean check() { | ||
| 32 | // if (!checkRLLowerBound()) return false; | ||
| 33 | // if (!checkELLowerBound()) return false; | ||
| 34 | // TODO test | ||
| 35 | if (checkUpper(m_reasoner.lazyUpperStore) && checkUpper(m_reasoner.limitedSkolemUpperStore)) return true; | ||
| 36 | AnswerTuples iter = null; | ||
| 37 | |||
| 38 | try { | ||
| 39 | iter = m_reasoner.trackingStore.evaluate(fullQueryRecord.getQueryText(), fullQueryRecord.getAnswerVariables()); | ||
| 40 | fullQueryRecord.updateUpperBoundAnswers(iter); | ||
| 41 | } finally { | ||
| 42 | if (iter != null) iter.dispose(); | ||
| 43 | } | ||
| 44 | |||
| 45 | if (fullQueryRecord.getNoOfCompleteAnswers() == 0) | ||
| 46 | return satisfiability(t.duration()); | ||
| 47 | |||
| 48 | try { | ||
| 49 | extractAxioms(); | ||
| 50 | } catch (OWLOntologyCreationException e) { | ||
| 51 | e.printStackTrace(); | ||
| 52 | } | ||
| 53 | |||
| 54 | Checker checker = new HermitSummaryFilter(fullQueryRecord, true); // m_reasoner.factory.getSummarisedReasoner(fullQueryRecord); | ||
| 55 | // fullQueryRecord.saveRelevantOntology("fragment_bottom.owl"); | ||
| 56 | boolean satisfiable = checker.isConsistent(); | ||
| 57 | checker.dispose(); | ||
| 58 | if (!satisfiable) return unsatisfiability(t.duration()); | ||
| 59 | |||
| 60 | return satisfiability(t.duration()); | ||
| 61 | } | ||
| 62 | |||
| 63 | private void extractAxioms() throws OWLOntologyCreationException { | ||
| 64 | OWLOntologyManager manager = m_reasoner.encoder.getProgram().getOntology().getOWLOntologyManager(); | ||
| 65 | fullQueryRecord.setRelevantOntology(manager.createOntology()); | ||
| 66 | QueryTracker tracker = new QueryTracker(m_reasoner.encoder, m_reasoner.rlLowerStore, fullQueryRecord); | ||
| 67 | m_reasoner.encoder.setCurrentQuery(fullQueryRecord); | ||
| 68 | tracker.extract(m_reasoner.trackingStore, null, true); | ||
| 69 | } | ||
| 70 | |||
| 71 | @Override | ||
| 72 | public QueryRecord[] getQueryRecords() { | ||
| 73 | if (botQueryRecords == null) | ||
| 74 | botQueryRecords = new QueryRecord[] {fullQueryRecord}; | ||
| 75 | return botQueryRecords; | ||
| 76 | } | ||
| 77 | |||
| 78 | } | ||
