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/rollup/QueryGraph.java | |
| 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/rollup/QueryGraph.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java | 18 |
1 files changed, 14 insertions, 4 deletions
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; |
