From 1b6a128137e5d7a6ff75566869232fc054afabef Mon Sep 17 00:00:00 2001 From: RncLsn Date: Fri, 15 May 2015 17:32:22 +0100 Subject: Testing and fixing. Executed successfully on UOBM{1,2,3,4,5,6,7,8}. --- src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/QueryReasoner.java') 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 { private static boolean defaultMultiStages = true; private static boolean defaultEqualities = true; - public static enum Type { Full, RLU, ELHOU }; - + public enum Type { Full, RLU, ELHOU } + public static QueryReasoner getInstance(Properties p) { OWLOntology ontology = OWLHelper.loadOntology(p.getOntologyPath()); QueryReasoner pagoda = getInstance(ontology, p); @@ -63,7 +63,7 @@ public abstract class QueryReasoner { } public static QueryReasoner getInstance(Type type, OWLOntology o, boolean performMultiStages, boolean considerEqualities) { - Utility.initialise(); +// Utility.initialise(); QueryReasoner reasoner; if (OWLHelper.isInOWL2RL(o)) reasoner = new RLQueryReasoner(); else if (OWLHelper.isInELHO(o)) reasoner = new ELHOQueryReasoner(); @@ -218,9 +218,10 @@ public abstract class QueryReasoner { record.outputAnswerStatistics(); record.outputTimes(); } - // TODO it can handle one call only - // if you call twice, you will end up with a json file with multiple roots + /* TODO it can handle one call only + if you call twice, you will end up with a json file with multiple roots */ if(answerWriter != null) gson.toJson(queryRecords, answerWriter); +// queryRecords.stream().forEach(record -> Utility.logDebug(gson.toJson(record))); queryRecords.stream().forEach(record -> record.dispose()); } @@ -232,7 +233,7 @@ public abstract class QueryReasoner { e.printStackTrace(); } } - Utility.cleanup(); +// Utility.cleanup(); } private QueryManager m_queryManager = new QueryManager(); -- cgit v1.2.3