diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java index 326bf7e..97bab50 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java | |||
| @@ -25,8 +25,8 @@ public abstract class QueryReasoner { | |||
| 25 | private static boolean defaultMultiStages = true; | 25 | private static boolean defaultMultiStages = true; |
| 26 | private static boolean defaultEqualities = true; | 26 | private static boolean defaultEqualities = true; |
| 27 | 27 | ||
| 28 | public static enum Type { Full, RLU, ELHOU }; | 28 | public enum Type { Full, RLU, ELHOU } |
| 29 | 29 | ||
| 30 | public static QueryReasoner getInstance(Properties p) { | 30 | public static QueryReasoner getInstance(Properties p) { |
| 31 | OWLOntology ontology = OWLHelper.loadOntology(p.getOntologyPath()); | 31 | OWLOntology ontology = OWLHelper.loadOntology(p.getOntologyPath()); |
| 32 | QueryReasoner pagoda = getInstance(ontology, p); | 32 | QueryReasoner pagoda = getInstance(ontology, p); |
| @@ -63,7 +63,7 @@ public abstract class QueryReasoner { | |||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | public static QueryReasoner getInstance(Type type, OWLOntology o, boolean performMultiStages, boolean considerEqualities) { | 65 | public static QueryReasoner getInstance(Type type, OWLOntology o, boolean performMultiStages, boolean considerEqualities) { |
| 66 | Utility.initialise(); | 66 | // Utility.initialise(); |
| 67 | QueryReasoner reasoner; | 67 | QueryReasoner reasoner; |
| 68 | if (OWLHelper.isInOWL2RL(o)) reasoner = new RLQueryReasoner(); | 68 | if (OWLHelper.isInOWL2RL(o)) reasoner = new RLQueryReasoner(); |
| 69 | else if (OWLHelper.isInELHO(o)) reasoner = new ELHOQueryReasoner(); | 69 | else if (OWLHelper.isInELHO(o)) reasoner = new ELHOQueryReasoner(); |
| @@ -218,9 +218,10 @@ public abstract class QueryReasoner { | |||
| 218 | record.outputAnswerStatistics(); | 218 | record.outputAnswerStatistics(); |
| 219 | record.outputTimes(); | 219 | record.outputTimes(); |
| 220 | } | 220 | } |
| 221 | // TODO it can handle one call only | 221 | /* TODO it can handle one call only |
| 222 | // if you call twice, you will end up with a json file with multiple roots | 222 | if you call twice, you will end up with a json file with multiple roots */ |
| 223 | if(answerWriter != null) gson.toJson(queryRecords, answerWriter); | 223 | if(answerWriter != null) gson.toJson(queryRecords, answerWriter); |
| 224 | // queryRecords.stream().forEach(record -> Utility.logDebug(gson.toJson(record))); | ||
| 224 | queryRecords.stream().forEach(record -> record.dispose()); | 225 | queryRecords.stream().forEach(record -> record.dispose()); |
| 225 | } | 226 | } |
| 226 | 227 | ||
| @@ -232,7 +233,7 @@ public abstract class QueryReasoner { | |||
| 232 | e.printStackTrace(); | 233 | e.printStackTrace(); |
| 233 | } | 234 | } |
| 234 | } | 235 | } |
| 235 | Utility.cleanup(); | 236 | // Utility.cleanup(); |
| 236 | } | 237 | } |
| 237 | 238 | ||
| 238 | private QueryManager m_queryManager = new QueryManager(); | 239 | private QueryManager m_queryManager = new QueryManager(); |
