diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-06-05 12:22:31 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-06-05 12:22:31 +0100 |
| commit | 8c04e4d8003f33848ee84011f8427fe92d55001f (patch) | |
| tree | ee750152d2403cdb78503dbb41c70f0c3cfb1125 /src/uk/ac/ox/cs/pagoda/reasoner/light | |
| parent | b0148d89a76b8fcbeb2e021442842e4e89690ef3 (diff) | |
| download | ACQuA-8c04e4d8003f33848ee84011f8427fe92d55001f.tar.gz ACQuA-8c04e4d8003f33848ee84011f8427fe92d55001f.zip | |
Violation statistics.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/light')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxAnswerTuples.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxAnswerTuples.java b/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxAnswerTuples.java index 1e8181f..f823232 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxAnswerTuples.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxAnswerTuples.java | |||
| @@ -9,6 +9,7 @@ import uk.ac.ox.cs.JRDFox.store.TupleIterator; | |||
| 9 | import uk.ac.ox.cs.pagoda.query.AnswerTuple; | 9 | import uk.ac.ox.cs.pagoda.query.AnswerTuple; |
| 10 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; | 10 | import uk.ac.ox.cs.pagoda.query.AnswerTuples; |
| 11 | import uk.ac.ox.cs.pagoda.util.Utility; | 11 | import uk.ac.ox.cs.pagoda.util.Utility; |
| 12 | import uk.ac.ox.cs.pagoda.util.disposable.DisposedException; | ||
| 12 | 13 | ||
| 13 | public class RDFoxAnswerTuples extends AnswerTuples { | 14 | public class RDFoxAnswerTuples extends AnswerTuples { |
| 14 | 15 | ||
| @@ -35,11 +36,15 @@ public class RDFoxAnswerTuples extends AnswerTuples { | |||
| 35 | 36 | ||
| 36 | @Override | 37 | @Override |
| 37 | public boolean isValid() { | 38 | public boolean isValid() { |
| 39 | if(isDisposed()) throw new DisposedException(); | ||
| 40 | |||
| 38 | return multi != 0; | 41 | return multi != 0; |
| 39 | } | 42 | } |
| 40 | 43 | ||
| 41 | @Override | 44 | @Override |
| 42 | public int getArity() { | 45 | public int getArity() { |
| 46 | if(isDisposed()) throw new DisposedException(); | ||
| 47 | |||
| 43 | try { | 48 | try { |
| 44 | return m_iter.getArity(); | 49 | return m_iter.getArity(); |
| 45 | } catch (JRDFStoreException e) { | 50 | } catch (JRDFStoreException e) { |
| @@ -50,6 +55,8 @@ public class RDFoxAnswerTuples extends AnswerTuples { | |||
| 50 | 55 | ||
| 51 | @Override | 56 | @Override |
| 52 | public void moveNext() { | 57 | public void moveNext() { |
| 58 | if(isDisposed()) throw new DisposedException(); | ||
| 59 | |||
| 53 | try { | 60 | try { |
| 54 | multi = m_iter.getNext(); | 61 | multi = m_iter.getNext(); |
| 55 | } catch (JRDFStoreException e) { | 62 | } catch (JRDFStoreException e) { |
| @@ -65,11 +72,15 @@ public class RDFoxAnswerTuples extends AnswerTuples { | |||
| 65 | 72 | ||
| 66 | @Override | 73 | @Override |
| 67 | public AnswerTuple getTuple() { | 74 | public AnswerTuple getTuple() { |
| 75 | if(isDisposed()) throw new DisposedException(); | ||
| 76 | |||
| 68 | return new AnswerTuple(m_iter, m_answerVars.length); | 77 | return new AnswerTuple(m_iter, m_answerVars.length); |
| 69 | } | 78 | } |
| 70 | 79 | ||
| 71 | @Override | 80 | @Override |
| 72 | public void reset() { | 81 | public void reset() { |
| 82 | if(isDisposed()) throw new DisposedException(); | ||
| 83 | |||
| 73 | try { | 84 | try { |
| 74 | multi = m_iter.open(); | 85 | multi = m_iter.open(); |
| 75 | } catch (JRDFStoreException e) { | 86 | } catch (JRDFStoreException e) { |
| @@ -79,17 +90,23 @@ public class RDFoxAnswerTuples extends AnswerTuples { | |||
| 79 | 90 | ||
| 80 | @Override | 91 | @Override |
| 81 | public boolean contains(AnswerTuple t) { | 92 | public boolean contains(AnswerTuple t) { |
| 93 | if(isDisposed()) throw new DisposedException(); | ||
| 94 | |||
| 82 | Utility.logError("Unsupported operation in RDFoxAnswerTuples"); | 95 | Utility.logError("Unsupported operation in RDFoxAnswerTuples"); |
| 83 | return false; | 96 | return false; |
| 84 | } | 97 | } |
| 85 | 98 | ||
| 86 | @Override | 99 | @Override |
| 87 | public void remove() { | 100 | public void remove() { |
| 101 | if(isDisposed()) throw new DisposedException(); | ||
| 102 | |||
| 88 | Utility.logError("Unsupported operation in RDFoxAnswerTuples"); | 103 | Utility.logError("Unsupported operation in RDFoxAnswerTuples"); |
| 89 | } | 104 | } |
| 90 | 105 | ||
| 91 | @Override | 106 | @Override |
| 92 | public String[] getAnswerVariables() { | 107 | public String[] getAnswerVariables() { |
| 108 | if(isDisposed()) throw new DisposedException(); | ||
| 109 | |||
| 93 | return m_answerVars; | 110 | return m_answerVars; |
| 94 | } | 111 | } |
| 95 | 112 | ||
