diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-06-16 15:54:53 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-06-16 15:54:53 +0100 |
| commit | 7cd962751db2a88f426b8b9d7b9dd0d76e2cc1b5 (patch) | |
| tree | a271283211f9a156e7cb04f578a94a3ca5d0d0f7 /src/uk/ac/ox/cs/pagoda/query | |
| parent | 3a276b7c7836e56a171ab753b018913ce022ba8e (diff) | |
| download | ACQuA-7cd962751db2a88f426b8b9d7b9dd0d76e2cc1b5.tar.gz ACQuA-7cd962751db2a88f426b8b9d7b9dd0d76e2cc1b5.zip | |
Maybe fixed bug in internalisation.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/query')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/query/QueryRecord.java | 4 | ||||
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java index 5878a57..291af27 100644 --- a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java +++ b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java | |||
| @@ -188,6 +188,10 @@ public class QueryRecord extends Disposable { | |||
| 188 | return new AnswerTuplesImp(answerVariables[0], gapAnswerTuples); | 188 | return new AnswerTuplesImp(answerVariables[0], gapAnswerTuples); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | public int getGapAnswersCount() { | ||
| 192 | return gapAnswerTuples.size(); | ||
| 193 | } | ||
| 194 | |||
| 191 | public String toString() { | 195 | public String toString() { |
| 192 | if(isDisposed()) throw new DisposedException(); | 196 | if(isDisposed()) throw new DisposedException(); |
| 193 | 197 | ||
diff --git a/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java b/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java index a567699..01336ba 100644 --- a/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java +++ b/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java | |||
| @@ -88,10 +88,20 @@ public class QueryGraph { | |||
| 88 | Visitor visitor = new Visitor(factory, assignment); | 88 | Visitor visitor = new Visitor(factory, assignment); |
| 89 | Set<OWLAxiom> axioms = getPropertyAssertions(assignment); | 89 | Set<OWLAxiom> axioms = getPropertyAssertions(assignment); |
| 90 | for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) { | 90 | for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) { |
| 91 | if(existVars.contains(entry.getKey())) continue; | 91 | // TODO check correctness!!! |
| 92 | sub = factory.getOWLNamedIndividual(IRI.create(getIndividual(entry.getKey(), assignment).getIRI())); | 92 | if(existVars.contains(entry.getKey())) { |
| 93 | for(OWLClassExpression clsExp : entry.getValue()) { | 93 | OWLClassExpression conjunction = |
| 94 | axioms.add(factory.getOWLClassAssertionAxiom(clsExp.accept(visitor), sub)); | 94 | factory.getOWLObjectIntersectionOf(factory.getOWLThing()); |
| 95 | for(OWLClassExpression owlClassExpression : entry.getValue()) { | ||
| 96 | conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression.accept(visitor)); | ||
| 97 | } | ||
| 98 | axioms.add(factory.getOWLSubClassOfAxiom(conjunction, factory.getOWLNothing())); | ||
| 99 | } | ||
| 100 | else { | ||
| 101 | sub = factory.getOWLNamedIndividual(IRI.create(getIndividual(entry.getKey(), assignment).getIRI())); | ||
| 102 | for(OWLClassExpression clsExp : entry.getValue()) { | ||
| 103 | axioms.add(factory.getOWLClassAssertionAxiom(clsExp.accept(visitor), sub)); | ||
| 104 | } | ||
| 95 | } | 105 | } |
| 96 | } | 106 | } |
| 97 | return axioms; | 107 | return axioms; |
