diff options
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 | 5 |
1 files changed, 3 insertions, 2 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 a09cf5b..116e724 100644 --- a/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java +++ b/src/uk/ac/ox/cs/pagoda/query/rollup/QueryGraph.java | |||
| @@ -102,16 +102,17 @@ public class QueryGraph { | |||
| 102 | // return axioms; | 102 | // return axioms; |
| 103 | // } | 103 | // } |
| 104 | 104 | ||
| 105 | public Set<OWLAxiom> getExistentialAxioms() { | 105 | public Set<OWLAxiom> getExistentialAxioms(Map<Variable, Term> assignment) { |
| 106 | if(!rollable_edges.isEmpty()) return null; | 106 | if(!rollable_edges.isEmpty()) return null; |
| 107 | 107 | ||
| 108 | Visitor visitor = new Visitor(factory, assignment); | ||
| 108 | Set<OWLAxiom> axioms = new HashSet<>(); | 109 | Set<OWLAxiom> axioms = new HashSet<>(); |
| 109 | for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) { | 110 | for(Map.Entry<Term, Set<OWLClassExpression>> entry : concepts.map.entrySet()) { |
| 110 | if(existVars.contains(entry.getKey())) { | 111 | if(existVars.contains(entry.getKey())) { |
| 111 | OWLClassExpression conjunction = | 112 | OWLClassExpression conjunction = |
| 112 | factory.getOWLObjectIntersectionOf(factory.getOWLThing()); | 113 | factory.getOWLObjectIntersectionOf(factory.getOWLThing()); |
| 113 | for(OWLClassExpression owlClassExpression : entry.getValue()) { | 114 | for(OWLClassExpression owlClassExpression : entry.getValue()) { |
| 114 | conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression); | 115 | conjunction = factory.getOWLObjectIntersectionOf(conjunction, owlClassExpression.accept(visitor)); |
| 115 | } | 116 | } |
| 116 | axioms.add(factory.getOWLSubClassOfAxiom(conjunction, factory.getOWLNothing())); | 117 | axioms.add(factory.getOWLSubClassOfAxiom(conjunction, factory.getOWLNothing())); |
| 117 | } | 118 | } |
