diff options
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java index 4e32297..968cf01 100644 --- a/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java +++ b/test/uk/ac/ox/cs/pagoda/test_units/CostEvaluation.java | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.test_units; | 1 | package uk.ac.ox.cs.pagoda.test_units; |
| 2 | 2 | ||
| 3 | import org.semanticweb.owlapi.model.OWLOntology; | 3 | import org.semanticweb.owlapi.model.OWLOntology; |
| 4 | |||
| 5 | import org.testng.annotations.Test; | 4 | import org.testng.annotations.Test; |
| 6 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | 5 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; |
| 7 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; | 6 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner; |
| 8 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; | 7 | import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.Type; |
| 9 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | 8 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; |
| 9 | import uk.ac.ox.cs.pagoda.util.TestUtil; | ||
| 10 | import uk.ac.ox.cs.pagoda.util.Timer; | 10 | import uk.ac.ox.cs.pagoda.util.Timer; |
| 11 | import uk.ac.ox.cs.pagoda.util.Utility; | 11 | import uk.ac.ox.cs.pagoda.util.Utility; |
| 12 | 12 | ||
| @@ -15,20 +15,22 @@ public class CostEvaluation { | |||
| 15 | @Test | 15 | @Test |
| 16 | public void lubm100() { | 16 | public void lubm100() { |
| 17 | int number = 1; | 17 | int number = 1; |
| 18 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 18 | PagodaTester.main( | 19 | PagodaTester.main( |
| 19 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | 20 | TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"), |
| 20 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | 21 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"), |
| 21 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | 22 | TestUtil.combinePaths(ontoDir, "lubm/queries/test_all_pagoda.sparql") |
| 22 | ); | 23 | ); |
| 23 | // AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); | 24 | // AllTests.copy("output/log4j.log", "results-backup/jair/lubm" + number + ".out"); |
| 24 | } | 25 | } |
| 25 | 26 | ||
| 26 | public void lubm1000() { | 27 | public void lubm1000() { |
| 27 | int number = 1000; | 28 | int number = 1000; |
| 29 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 28 | String[] args = new String[] { | 30 | String[] args = new String[] { |
| 29 | PagodaTester.onto_dir + "lubm/univ-bench.owl", | 31 | TestUtil.combinePaths(ontoDir, "lubm/univ-bench.owl"), |
| 30 | PagodaTester.onto_dir + "lubm/data/lubm" + number + ".ttl", | 32 | TestUtil.combinePaths(ontoDir, "lubm/data/lubm" + number + ".ttl"), |
| 31 | PagodaTester.onto_dir + "lubm/queries/test_all_pagoda.sparql" | 33 | TestUtil.combinePaths(ontoDir, "lubm/queries/test_all_pagoda.sparql") |
| 32 | }; | 34 | }; |
| 33 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | 35 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); |
| 34 | QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); | 36 | QueryReasoner reasoner = QueryReasoner.getInstance(Type.ELHOU, ontology, true, true); |
| @@ -46,10 +48,11 @@ public class CostEvaluation { | |||
| 46 | @Test | 48 | @Test |
| 47 | public void uobm5() { | 49 | public void uobm5() { |
| 48 | int number = 1; | 50 | int number = 1; |
| 51 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 49 | String[] args = new String[] { | 52 | String[] args = new String[] { |
| 50 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 53 | TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), |
| 51 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | 54 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), |
| 52 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | 55 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard_all_pagoda.sparql") |
| 53 | }; | 56 | }; |
| 54 | PagodaTester.main(args); | 57 | PagodaTester.main(args); |
| 55 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); | 58 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); |
| @@ -57,10 +60,11 @@ public class CostEvaluation { | |||
| 57 | 60 | ||
| 58 | public void uobm100() { | 61 | public void uobm100() { |
| 59 | int number = 200; | 62 | int number = 200; |
| 63 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 60 | String[] args = new String[] { | 64 | String[] args = new String[] { |
| 61 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 65 | TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), |
| 62 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | 66 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), |
| 63 | PagodaTester.onto_dir + "uobm/queries/standard_group3_all.sparql" | 67 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard_group3_all.sparql") |
| 64 | }; | 68 | }; |
| 65 | PagodaTester.main(args); | 69 | PagodaTester.main(args); |
| 66 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); | 70 | // AllTests.copy("output/log4j.log", "results-backup/jair/uobm" + number + ".out"); |
| @@ -68,10 +72,11 @@ public class CostEvaluation { | |||
| 68 | 72 | ||
| 69 | public void uobm500() { | 73 | public void uobm500() { |
| 70 | int number = 500; | 74 | int number = 500; |
| 75 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 71 | String[] args = new String[] { | 76 | String[] args = new String[] { |
| 72 | PagodaTester.onto_dir + "uobm/univ-bench-dl.owl", | 77 | TestUtil.combinePaths(ontoDir, "uobm/univ-bench-dl.owl"), |
| 73 | PagodaTester.onto_dir + "uobm/data/uobm" + number + ".ttl", | 78 | TestUtil.combinePaths(ontoDir, "uobm/data/uobm" + number + ".ttl"), |
| 74 | PagodaTester.onto_dir + "uobm/queries/standard_all_pagoda.sparql" | 79 | TestUtil.combinePaths(ontoDir, "uobm/queries/standard_all_pagoda.sparql") |
| 75 | }; | 80 | }; |
| 76 | 81 | ||
| 77 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | 82 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); |
| @@ -89,10 +94,11 @@ public class CostEvaluation { | |||
| 89 | 94 | ||
| 90 | 95 | ||
| 91 | public static void main(String... args) { | 96 | public static void main(String... args) { |
| 97 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 92 | args = new String[] { | 98 | args = new String[] { |
| 93 | PagodaTester.onto_dir + "dbpedia/integratedOntology-all-in-one-minus-datatype.owl", | 99 | TestUtil.combinePaths(ontoDir, "dbpedia/integratedOntology-all-in-one-minus-datatype.owl"), |
| 94 | PagodaTester.onto_dir + "dbpedia/data/dbpedia-minus-datatype-new.ttl", | 100 | TestUtil.combinePaths(ontoDir, "dbpedia/data/dbpedia-minus-datatype-new.ttl"), |
| 95 | PagodaTester.onto_dir + "dbpedia/queries/atomic_ground.sparql" | 101 | TestUtil.combinePaths(ontoDir, "dbpedia/queries/atomic_ground.sparql") |
| 96 | }; | 102 | }; |
| 97 | 103 | ||
| 98 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); | 104 | OWLOntology ontology = OWLHelper.loadOntology(args[0]); |
