diff options
| author | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-10 18:17:06 +0100 |
|---|---|---|
| committer | Federico Igne <federico.igne@cs.ox.ac.uk> | 2022-05-11 12:34:47 +0100 |
| commit | 17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch) | |
| tree | 47e9310a0cff869d9ec017dcb2c81876407782c8 /test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | |
| parent | 8651164cd632a5db310b457ce32d4fbc97bdc41c (diff) | |
| download | ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip | |
[pagoda] Move project to Scala
This commit includes a few changes:
- The repository still uses Maven to manage dependency but it is now a
Scala project.
- The code has been ported from OWLAPI 3.4.10 to 5.1.20
- A proof of concept program using both RSAComb and PAGOdA has been
added.
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java deleted file mode 100644 index 019fafa..0000000 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java +++ /dev/null | |||
| @@ -1,92 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.global_tests; | ||
| 2 | |||
| 3 | import org.testng.annotations.Test; | ||
| 4 | import uk.ac.ox.cs.pagoda.Pagoda; | ||
| 5 | import uk.ac.ox.cs.pagoda.query.CheckAnswers; | ||
| 6 | import uk.ac.ox.cs.pagoda.util.TestUtil; | ||
| 7 | |||
| 8 | import java.io.File; | ||
| 9 | import java.io.IOException; | ||
| 10 | import java.nio.file.Path; | ||
| 11 | import java.nio.file.Paths; | ||
| 12 | |||
| 13 | public class TestPagodaLUBM { | ||
| 14 | |||
| 15 | public void answersCorrectness(int number) throws IOException { | ||
| 16 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 17 | Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); | ||
| 18 | new File(answers.toString()).deleteOnExit(); | ||
| 19 | Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json"); | ||
| 20 | |||
| 21 | Pagoda pagoda = Pagoda.builder() | ||
| 22 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | ||
| 23 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | ||
| 24 | .query(Paths.get(ontoDir, "lubm/queries/test.sparql")) | ||
| 25 | .answer(answers) | ||
| 26 | .build(); | ||
| 27 | |||
| 28 | pagoda.run(); | ||
| 29 | CheckAnswers.assertSameAnswers(answers, givenAnswers); | ||
| 30 | } | ||
| 31 | |||
| 32 | @Test(groups = {"light", "correctness"}) | ||
| 33 | public void answersCorrectness_1() throws IOException { | ||
| 34 | answersCorrectness(1); | ||
| 35 | } | ||
| 36 | |||
| 37 | public void justExecute_sygenia(int number) throws IOException { | ||
| 38 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 39 | // Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); | ||
| 40 | // new File(answers.toString()).deleteOnExit(); | ||
| 41 | // Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json"); | ||
| 42 | |||
| 43 | Pagoda pagoda = Pagoda.builder() | ||
| 44 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | ||
| 45 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | ||
| 46 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia.sparql")) | ||
| 47 | // .answer(answers) | ||
| 48 | .build(); | ||
| 49 | |||
| 50 | pagoda.run(); | ||
| 51 | // CheckAnswers.assertSameAnswers(answers, givenAnswers); | ||
| 52 | } | ||
| 53 | |||
| 54 | @Test(groups = {"sygenia"}) | ||
| 55 | public void justExecute_sygenia_1() throws IOException { | ||
| 56 | justExecute_sygenia(1); | ||
| 57 | } | ||
| 58 | |||
| 59 | public void justExecute_sygenia_allBlanks(int number) throws IOException { | ||
| 60 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 61 | // Path answers = Paths.get(File.createTempFile("answers", ".json").getAbsolutePath()); | ||
| 62 | // new File(answers.toString()).deleteOnExit(); | ||
| 63 | // Path givenAnswers = TestUtil.getAnswersFilePath("answers/pagoda-lubm" + number + ".json"); | ||
| 64 | |||
| 65 | Pagoda pagoda = Pagoda.builder() | ||
| 66 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | ||
| 67 | .data(Paths.get(ontoDir, "lubm/data/lubm" + number + ".ttl")) | ||
| 68 | .query(Paths.get(ontoDir, "lubm/queries/lubm_sygenia_all-blanks.sparql")) | ||
| 69 | // .answer(answers) | ||
| 70 | .build(); | ||
| 71 | |||
| 72 | pagoda.run(); | ||
| 73 | // CheckAnswers.assertSameAnswers(answers, givenAnswers); | ||
| 74 | } | ||
| 75 | |||
| 76 | @Test(groups = {"sygenia"}) | ||
| 77 | public void justExecute_sygenia_1_allBlanks() throws IOException { | ||
| 78 | justExecute_sygenia_allBlanks(1); | ||
| 79 | } | ||
| 80 | |||
| 81 | @Test(groups = {"existential"}) | ||
| 82 | public void justExecute_feier() throws IOException { | ||
| 83 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | ||
| 84 | |||
| 85 | Pagoda.builder() | ||
| 86 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | ||
| 87 | .data(Paths.get(ontoDir, "lubm/data/lubm1.ttl")) | ||
| 88 | .query(Paths.get(ontoDir, "lubm/queries/queries_from_rules.sparql")) | ||
| 89 | .build() | ||
| 90 | .run(); | ||
| 91 | } | ||
| 92 | } | ||
