diff options
Diffstat (limited to 'test/uk/ac/ox/cs/hermit')
| -rw-r--r-- | test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java | 199 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/hermit/HermitTester.java | 55 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/hermit/JAIR_HermiT.java | 129 |
3 files changed, 0 insertions, 383 deletions
diff --git a/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java b/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java deleted file mode 100644 index 008fcb2..0000000 --- a/test/uk/ac/ox/cs/hermit/HermitQueryReasoner.java +++ /dev/null | |||
| @@ -1,199 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.hermit; | ||
| 2 | |||
| 3 | import org.semanticweb.HermiT.Reasoner; | ||
| 4 | import org.semanticweb.HermiT.model.Atom; | ||
| 5 | import org.semanticweb.HermiT.model.AtomicRole; | ||
| 6 | import org.semanticweb.owlapi.model.*; | ||
| 7 | import org.semanticweb.owlapi.reasoner.Node; | ||
| 8 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 9 | import uk.ac.ox.cs.pagoda.owl.QueryRoller; | ||
| 10 | import uk.ac.ox.cs.pagoda.query.QueryManager; | ||
| 11 | import uk.ac.ox.cs.pagoda.query.QueryRecord; | ||
| 12 | import uk.ac.ox.cs.pagoda.util.Timer; | ||
| 13 | |||
| 14 | import java.io.*; | ||
| 15 | import java.util.HashSet; | ||
| 16 | import java.util.Set; | ||
| 17 | import java.util.concurrent.*; | ||
| 18 | |||
| 19 | public class HermitQueryReasoner { | ||
| 20 | |||
| 21 | public static void main(String... args) throws FileNotFoundException, OWLOntologyCreationException, OWLOntologyStorageException { | ||
| 22 | if (args.length == 0) { | ||
| 23 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/lubm/lubm1_merged.owl", null, PagodaTester.lubm_query}; | ||
| 24 | // args = new String[] {"/users/yzhou/ontologies/uobm/uobm1_merged.owl", null, "/users/yzhou/ontologies/uobm/queries/standard.sparql"}; | ||
| 25 | // args = new String[] {"/users/yzhou/ontologies/fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", null, "/users/yzhou/ontologies/fly/queries/fly.sparql"}; | ||
| 26 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all-minus-datatype.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-minus-datatype-new.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; | ||
| 27 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/npd/npd-all.owl", "/media/krr-nas-share/Yujiao/ontologies/npd/data/npd-data-dump-processed.ttl", "/users/yzhou/ontologies/npd/queries/atomic.sparql"}; | ||
| 28 | // args = new String[] {PagodaTester.dbpedia_tbox, PagodaTester.dbpedia_abox, PagodaTester.dbpedia_query}; | ||
| 29 | // args = new String[] {"/users/yzhou/ontologies/answersCorrectness/unsatisfiable.owl", null, "/users/yzhou/ontologies/answersCorrectness/unsatisfiable_queries.sparql"}; | ||
| 30 | |||
| 31 | // args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/cco-processed-noDPR-noDPD.ttl", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/graph sampling/sample_100.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/chembl/queries/atomic_one_filtered.sparql", "../answersCorrectness-share/results/chembl/hermit_1p"}; | ||
| 32 | args = | ||
| 33 | new String[]{"/users/yzhou/temp/uniprot_debug/core-processed-noDis.owl", "/users/yzhou/temp/uniprot_debug/sample_1_removed.nt", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../answersCorrectness-share/results/uniprot/hermit_1p"}; | ||
| 34 | } | ||
| 35 | // args = new String[] {"imported.owl", "", "/media/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/queries/atomic_one.sparql", "../answersCorrectness-share/results/uniprot/hermit_1p"}; } | ||
| 36 | |||
| 37 | |||
| 38 | PrintStream ps = args.length < 4 ? null : new PrintStream(new File(args[3])); | ||
| 39 | for (int i = 0; i < args.length; ++i) { | ||
| 40 | if (args[i] == null || args[i].equalsIgnoreCase("null")) args[i] = ""; | ||
| 41 | System.out.println("Argument " + i + ": " + args[i]); | ||
| 42 | } | ||
| 43 | |||
| 44 | // PrintStream ps = null; // new PrintStream(new File("../answersCorrectness-share/results/reactome/ ")); | ||
| 45 | if (ps != null) System.setOut(ps); | ||
| 46 | |||
| 47 | Timer t = new Timer(); | ||
| 48 | OWLOntology onto = OWLHelper.loadOntology(args[0]); | ||
| 49 | OWLOntologyManager man = onto.getOWLOntologyManager(); | ||
| 50 | |||
| 51 | OWLDatatype date = man.getOWLDataFactory().getOWLDatatype(IRI.create("http://www.w3.org/2001/XMLSchema#date")); | ||
| 52 | |||
| 53 | if (onto.containsEntityInSignature(date)) { | ||
| 54 | for (OWLOntology o: onto.getImportsClosure()) | ||
| 55 | for (OWLAxiom axiom: o.getAxioms()) | ||
| 56 | if (axiom.getDatatypesInSignature().contains(date)) { | ||
| 57 | System.out.println("The axiom: " + axiom + " is being ingored. "); | ||
| 58 | man.removeAxiom(onto, axiom); | ||
| 59 | } | ||
| 60 | man.saveOntology(onto, new FileOutputStream(args[0] = "tbox_hermit.owl")); | ||
| 61 | man.removeOntology(onto); | ||
| 62 | onto = OWLHelper.loadOntology(man, args[0]); | ||
| 63 | System.out.println("TBox processed in " + t.duration()); | ||
| 64 | } | ||
| 65 | |||
| 66 | try { | ||
| 67 | onto = OWLHelper.getImportedOntology(onto, args[1]); | ||
| 68 | } catch (IOException e) { | ||
| 69 | e.printStackTrace(); | ||
| 70 | } | ||
| 71 | System.out.println("Ontology loaded in " + t.duration()); | ||
| 72 | System.out.println("ABox axioms:" + onto.getABoxAxioms(true).size()); | ||
| 73 | // for (OWLOntology o: onto.getImportsClosure()) | ||
| 74 | // for (OWLAxiom axiom: o.getAxioms()) | ||
| 75 | // System.out.println(axiom); | ||
| 76 | |||
| 77 | Reasoner hermit = new Reasoner(onto); | ||
| 78 | if (!hermit.isConsistent()) { | ||
| 79 | System.out.println("The ontology is inconsistent."); | ||
| 80 | return ; | ||
| 81 | } | ||
| 82 | System.out.println("Preprocessing DONE in " + t.duration()); | ||
| 83 | |||
| 84 | // System.out.println(hermit.isConsistent()); | ||
| 85 | |||
| 86 | QueryManager queryManager = new QueryManager(); | ||
| 87 | QueryRoller roller = new QueryRoller(onto.getOWLOntologyManager().getOWLDataFactory()); | ||
| 88 | int failedCounter = 0; | ||
| 89 | Timer total = new Timer(); | ||
| 90 | for (QueryRecord record: queryManager.collectQueryRecords(args[2])) { | ||
| 91 | if (Integer.parseInt(record.getQueryID()) < 10) continue; | ||
| 92 | if (total.duration() > 18000) { | ||
| 93 | System.out.println("Time out 5h."); | ||
| 94 | return ; | ||
| 95 | } | ||
| 96 | System.out.println("--------------------- Query " + record.getQueryID() + " -----------------------"); | ||
| 97 | System.out.println(record.getQueryText()); | ||
| 98 | ExecutorService exec = Executors.newSingleThreadExecutor(); | ||
| 99 | try { | ||
| 100 | Future<Boolean> succ = exec.submit(new QueryThread(record, onto, hermit, roller)); | ||
| 101 | try { | ||
| 102 | try { | ||
| 103 | if (record.getQueryID().equals("1")) | ||
| 104 | System.out.println(succ.get(60, TimeUnit.MINUTES)); | ||
| 105 | else | ||
| 106 | System.out.println(succ.get(20, TimeUnit.MINUTES)); | ||
| 107 | } catch (InterruptedException e) { | ||
| 108 | // e.printStackTrace(); | ||
| 109 | } catch (ExecutionException e) { | ||
| 110 | // e.printStackTrace(); | ||
| 111 | } catch (TimeoutException e) { | ||
| 112 | // e.printStackTrace(); | ||
| 113 | } | ||
| 114 | } finally { | ||
| 115 | if (succ.cancel(true)) { | ||
| 116 | System.out.println("Trying to cancel the current query thread " + (++failedCounter)); | ||
| 117 | } | ||
| 118 | } | ||
| 119 | } finally { | ||
| 120 | exec.shutdownNow(); | ||
| 121 | } | ||
| 122 | } | ||
| 123 | |||
| 124 | if (ps != null) ps.close(); | ||
| 125 | System.exit(0); | ||
| 126 | } | ||
| 127 | |||
| 128 | } | ||
| 129 | |||
| 130 | class QueryThread implements Callable<Boolean> { | ||
| 131 | |||
| 132 | QueryRecord record; | ||
| 133 | OWLOntology onto; | ||
| 134 | Reasoner hermit; | ||
| 135 | QueryRoller roller; | ||
| 136 | |||
| 137 | public QueryThread(QueryRecord record2, OWLOntology onto2, Reasoner hermit2, QueryRoller roller2) { | ||
| 138 | record = record2; onto = onto2; hermit = hermit2; roller = roller2; | ||
| 139 | } | ||
| 140 | |||
| 141 | @Override | ||
| 142 | public Boolean call() throws Exception { | ||
| 143 | Set<String> answers = new HashSet<String>(); | ||
| 144 | Timer t = new Timer(); | ||
| 145 | if (record.getDistinguishedVariables().length > 1) { | ||
| 146 | if (record.getDistinguishedVariables().length == 2 && record.getClause().getBodyLength() == 1) { | ||
| 147 | dealWithAtomicBinaryQuery(record.getClause().getBodyAtom(0), answers); | ||
| 148 | System.out.println("Query " + record.getQueryID() + " The number of answers: " + answers.size()); | ||
| 149 | System.out.println("Query " + record.getQueryID() + " Total time: " + t.duration()); | ||
| 150 | } | ||
| 151 | else { | ||
| 152 | System.out.println("Query " + record.getQueryID() + " The number of answers: Query cannot be processsed."); | ||
| 153 | System.out.println("Query " + record.getQueryID() + " Total time: Query cannot be processsed."); | ||
| 154 | } | ||
| 155 | return false; | ||
| 156 | } | ||
| 157 | |||
| 158 | OWLClassExpression exp = null; | ||
| 159 | |||
| 160 | try { | ||
| 161 | exp = roller.rollUp(record.getClause(), record.getAnswerVariables()[0]); | ||
| 162 | } catch (Exception e) { | ||
| 163 | System.out.println("Query " + record.getQueryID() + " The number of answers: Query cannot be processsed."); | ||
| 164 | System.out.println("Query " + record.getQueryID() + " Total time: Query cannot be processsed."); | ||
| 165 | return false; | ||
| 166 | } | ||
| 167 | System.out.println(exp); | ||
| 168 | for (Node<OWLNamedIndividual> node: hermit.getInstances(exp, false)) { | ||
| 169 | for (OWLIndividual ind: node.getEntities()) { | ||
| 170 | answers.add(ind.toStringID()); | ||
| 171 | } | ||
| 172 | } | ||
| 173 | System.out.println("Query " + record.getQueryID() + " The number of answers: " + answers.size()); | ||
| 174 | System.out.println("Query " + record.getQueryID() + " Total time: " + t.duration()); | ||
| 175 | return true; | ||
| 176 | } | ||
| 177 | |||
| 178 | private void dealWithAtomicBinaryQuery(Atom bodyAtom, Set<String> answers) { | ||
| 179 | StringBuilder sb = new StringBuilder(); | ||
| 180 | OWLDataFactory f = onto.getOWLOntologyManager().getOWLDataFactory(); | ||
| 181 | OWLObjectProperty p = f.getOWLObjectProperty(IRI.create(((AtomicRole) bodyAtom.getDLPredicate()).getIRI())); | ||
| 182 | for (Node<OWLNamedIndividual> sub: hermit.getInstances(f.getOWLObjectMinCardinality(1, p), false)) { | ||
| 183 | for (Node<OWLNamedIndividual> obj: hermit.getObjectPropertyValues(sub.getRepresentativeElement(), p)) { | ||
| 184 | for (OWLNamedIndividual subInd: sub.getEntities()) { | ||
| 185 | sb.setLength(0); | ||
| 186 | sb.append(subInd.toString()).append(" "); | ||
| 187 | int len = sb.length(); | ||
| 188 | for (OWLNamedIndividual objInd: obj.getEntities()) { | ||
| 189 | sb.setLength(len); | ||
| 190 | sb.append(objInd.toString()); | ||
| 191 | answers.add(sb.toString()); | ||
| 192 | } | ||
| 193 | } | ||
| 194 | } | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | } | ||
| 199 | |||
diff --git a/test/uk/ac/ox/cs/hermit/HermitTester.java b/test/uk/ac/ox/cs/hermit/HermitTester.java deleted file mode 100644 index dc70284..0000000 --- a/test/uk/ac/ox/cs/hermit/HermitTester.java +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.hermit; | ||
| 2 | |||
| 3 | import org.semanticweb.HermiT.Configuration; | ||
| 4 | import org.semanticweb.HermiT.Reasoner; | ||
| 5 | import org.semanticweb.HermiT.model.Atom; | ||
| 6 | import org.semanticweb.HermiT.model.DLClause; | ||
| 7 | import org.semanticweb.HermiT.model.DLOntology; | ||
| 8 | import org.semanticweb.HermiT.structural.OWLClausification; | ||
| 9 | import org.semanticweb.owlapi.model.IRI; | ||
| 10 | import org.semanticweb.owlapi.model.OWLAxiom; | ||
| 11 | import org.semanticweb.owlapi.model.OWLClass; | ||
| 12 | import org.semanticweb.owlapi.model.OWLDataFactory; | ||
| 13 | import org.semanticweb.owlapi.model.OWLNamedIndividual; | ||
| 14 | import org.semanticweb.owlapi.model.OWLOntology; | ||
| 15 | import org.semanticweb.owlapi.reasoner.Node; | ||
| 16 | |||
| 17 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 18 | |||
| 19 | public class HermitTester { | ||
| 20 | |||
| 21 | public static void main(String[] args) { | ||
| 22 | OWLOntology onto = OWLHelper.loadOntology("imported.owl"); | ||
| 23 | Reasoner hermit = new Reasoner(onto); | ||
| 24 | OWLDataFactory f = onto.getOWLOntologyManager().getOWLDataFactory(); | ||
| 25 | OWLClass concept = f.getOWLClass(IRI.create("http://semantics.crl.ibm.com/univ-bench-dl.owl#Query12")); | ||
| 26 | |||
| 27 | for (OWLOntology o: onto.getImportsClosure()) { | ||
| 28 | System.out.println(o.containsEntityInSignature(concept)); | ||
| 29 | for (OWLAxiom axiom: o.getAxioms()) | ||
| 30 | if (axiom.getClassesInSignature().contains(concept)) | ||
| 31 | System.out.println(axiom); | ||
| 32 | } | ||
| 33 | |||
| 34 | for (Node<OWLNamedIndividual> node : hermit.getInstances(concept, false)) | ||
| 35 | for (OWLNamedIndividual i: node.getEntities()) { | ||
| 36 | System.out.println(i.toStringID()); | ||
| 37 | } | ||
| 38 | |||
| 39 | // clausifierTest(); | ||
| 40 | } | ||
| 41 | |||
| 42 | @SuppressWarnings("unused") | ||
| 43 | private static void clausifierTest() { | ||
| 44 | OWLOntology onto = OWLHelper.loadOntology("/users/yzhou/ontologies/travel.owl"); | ||
| 45 | OWLClausification clausifier = new OWLClausification(new Configuration()); | ||
| 46 | DLOntology dlOntology = (DLOntology)clausifier.preprocessAndClausify(onto, null)[1]; | ||
| 47 | |||
| 48 | for (DLClause clause: dlOntology.getDLClauses()) | ||
| 49 | System.out.println(clause); | ||
| 50 | for (Atom atom : dlOntology.getPositiveFacts()) | ||
| 51 | System.out.println(atom); | ||
| 52 | |||
| 53 | } | ||
| 54 | |||
| 55 | } | ||
diff --git a/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java b/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java deleted file mode 100644 index 72e7af8..0000000 --- a/test/uk/ac/ox/cs/hermit/JAIR_HermiT.java +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.hermit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.util.TestUtil; | ||
| 5 | |||
| 6 | public class JAIR_HermiT { | ||
| 7 | |||
| 8 | @Test | ||
| 9 | public void lubm1() throws Exception { | ||
| 10 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 11 | String[] args = new String[] { | ||
| 12 | TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"), | ||
| 13 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), | ||
| 14 | TestUtil.combinePaths(ontoDir, "lubm/queries/answersCorrectness.sparql") | ||
| 15 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/lubm1/hermit" | ||
| 16 | }; | ||
| 17 | HermitQueryReasoner.main(args); | ||
| 18 | } | ||
| 19 | |||
| 20 | @Test | ||
| 21 | public void lubm1_rolledUp() throws Exception { | ||
| 22 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 23 | String[] args = new String[] { | ||
| 24 | "/home/yzhou/backup/20141212/univ-bench-queries.owl", | ||
| 25 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm1_owl"), | ||
| 26 | TestUtil.combinePaths(ontoDir, "lubm/queries/atomic_lubm.sparql") | ||
| 27 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/lubm1/hermit_rolledUp" | ||
| 28 | }; | ||
| 29 | HermitQueryReasoner.main(args); | ||
| 30 | } | ||
| 31 | |||
| 32 | @Test | ||
| 33 | public void uobm1() throws Exception { | ||
| 34 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 35 | String[] args = new String[] { | ||
| 36 | TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), | ||
| 37 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), | ||
| 38 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard.sparql") | ||
| 39 | // , "hermit_uobm1.out" | ||
| 40 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uobm1/hermit" | ||
| 41 | }; | ||
| 42 | HermitQueryReasoner.main(args); | ||
| 43 | } | ||
| 44 | |||
| 45 | @Test | ||
| 46 | public void uobm1_rolledUp() throws Exception { | ||
| 47 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 48 | String[] args = new String[] { | ||
| 49 | "/home/yzhou/backup/20141212/univ-bench-dl-queries.owl", | ||
| 50 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm1_owl_withDeclaration"), | ||
| 51 | TestUtil.combinePaths(ontoDir, "uobm/queries/atomic_uobm.sparql") | ||
| 52 | , "hermit_uobm1_rolledUp.out" | ||
| 53 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uobm1/hermit_rolledUp" | ||
| 54 | }; | ||
| 55 | HermitQueryReasoner.main(args); | ||
| 56 | } | ||
| 57 | |||
| 58 | @Test | ||
| 59 | public void fly_rolledUp() throws Exception { | ||
| 60 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 61 | HermitQueryReasoner.main( | ||
| 62 | TestUtil.combinePaths(ontoDir, "fly/fly-all-in-one_rolledUp.owl"), | ||
| 63 | // TestUtil.combinePaths(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl", | ||
| 64 | null, | ||
| 65 | TestUtil.combinePaths(ontoDir, "fly/queries/fly_atomic.sparql") | ||
| 66 | , "hermit_fly.out" | ||
| 67 | ); | ||
| 68 | } | ||
| 69 | |||
| 70 | @Test | ||
| 71 | public void npd() throws Exception { | ||
| 72 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 73 | HermitQueryReasoner.main( | ||
| 74 | TestUtil.combinePaths(ontoDir, "npd/npd-all-minus-datatype.owl"), | ||
| 75 | TestUtil.combinePaths(ontoDir, "npd/data/npd-data-dump-minus-datatype-new.ttl"), | ||
| 76 | TestUtil.combinePaths(ontoDir, "npd/queries/atomic_ground.sparql") | ||
| 77 | , "hermit_npd.out" | ||
| 78 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/npd/hermit" | ||
| 79 | ); | ||
| 80 | } | ||
| 81 | |||
| 82 | @Test | ||
| 83 | public void dbpedia() throws Exception { | ||
| 84 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 85 | HermitQueryReasoner.main( | ||
| 86 | TestUtil.combinePaths(ontoDir, "dbpedia/integratedOntology-all-in-one-minus-datatype.owl"), | ||
| 87 | TestUtil.combinePaths(ontoDir, "dbpedia/data/dbpedia-minus-datatype-new.ttl"), | ||
| 88 | TestUtil.combinePaths(ontoDir, "dbpedia/queries/atomic_ground.sparql") | ||
| 89 | , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/dbpedia/hermit" | ||
| 90 | ); | ||
| 91 | } | ||
| 92 | |||
| 93 | @Test | ||
| 94 | public void reactome() throws Exception { | ||
| 95 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 96 | HermitQueryReasoner.main( | ||
| 97 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/biopax-level3-processed.owl"), | ||
| 98 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/graph sampling/reactome_sample_10.ttl"), | ||
| 99 | TestUtil.combinePaths(ontoDir, "bio2rdf/reactome/queries/atomic_ground.sparql") | ||
| 100 | , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/reactome/hermit_10p" | ||
| 101 | ); | ||
| 102 | } | ||
| 103 | |||
| 104 | @Test | ||
| 105 | public void chembl() throws Exception { | ||
| 106 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 107 | HermitQueryReasoner.main( | ||
| 108 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/cco-noDPR.ttl"), | ||
| 109 | // null, | ||
| 110 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/graph sampling/sample_1.nt"), | ||
| 111 | TestUtil.combinePaths(ontoDir, "bio2rdf/chembl/queries/atomic_ground.sparql") | ||
| 112 | , "hermit_chembl.out" | ||
| 113 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/chembl/hermit_1p" | ||
| 114 | ); | ||
| 115 | } | ||
| 116 | |||
| 117 | @Test | ||
| 118 | public void uniprot() throws Exception { | ||
| 119 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 120 | HermitQueryReasoner.main( | ||
| 121 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/core-sat.owl"), | ||
| 122 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/graph sampling/sample_1.nt"), | ||
| 123 | TestUtil.combinePaths(ontoDir, "bio2rdf/uniprot/queries/atomic_ground.sparql") | ||
| 124 | , "hermit_uniprot.out" | ||
| 125 | // , "/home/yzhou/java-workspace/answersCorrectness-share/results_new/uniprot/hermit_1p" | ||
| 126 | ); | ||
| 127 | } | ||
| 128 | |||
| 129 | } | ||
