diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/query/rollup')
| -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; |
