diff options
| -rw-r--r-- | README.md | 48 | ||||
| -rw-r--r-- | pom.xml | 42 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar | bin | 0 -> 5015178 bytes | |||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 | 1 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 | 1 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom | 8 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 | 1 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 | 1 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml | 12 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 | 1 | ||||
| -rw-r--r-- | repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 | 1 | ||||
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | 2 | ||||
| -rw-r--r-- | test/resources/MainTests.xml | 5 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java | 7 | ||||
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 2 |
15 files changed, 93 insertions, 39 deletions
| @@ -1,35 +1,47 @@ | |||
| 1 | PAGOdA | 1 | PAGOdA |
| 2 | ===== | 2 | ====== |
| 3 | 3 | ||
| 4 | PAGOdA is a conjunctive query answering engine for OWL 2 ontologies. The instruction how to use it can be found on the following website: http://www.cs.ox.ac.uk/isg/tools/PAGOdA/. | 4 | PAGOdA is a conjunctive query answering engine for OWL 2 ontologies. |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | Project dependencies/requirements | 7 | Project dependencies/requirements |
| 8 | ===== | 8 | ================================= |
| 9 | 9 | ||
| 10 | - This software has been developed for Linux | ||
| 10 | - JavaSE 8 | 11 | - JavaSE 8 |
| 11 | - Maven | 12 | - Maven |
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | How to compile the project from source in Eclipse? | 15 | Building and packaging |
| 15 | ===== | 16 | ====================== |
| 16 | 17 | ||
| 17 | - In order to compile the project make sure that you have JavaSE 8 and Maven installed on your computer. | 18 | This is a Maven project, hence Maven should be used for building and packaging. |
| 18 | - After cloning the repository by command git clone https://github.com/yujiaoz/PAGOdA.git, you need to install it using the command "maven install". | 19 | * Compile `mvn compile` |
| 19 | - The project depends on a library JRDFox.jar that is not in central maven repository. The library for different operating systems can be found in lib directory. You need to include the correct one for your computer and add it to the build path. Alternative, if you have maven installed on your computer, you could add it into your local maven repository, modify maven dependencies and make sure that you remove it from the build path. If the provided JRDFox.jar doesn't work, you might need to follow the instruction below to compile the project JRDFox by yourself. | 20 | * Create jars `mvn package`; |
| 21 | you will get a jar without dependencies *target/pagoda-x.y.z.jar* and a runnable jar with dependencies *target/pagoda-x.y.z-jar-with-dependencies.jar*. | ||
| 22 | * Execute tests `mvn test -DskipTests=false`; | ||
| 20 | 23 | ||
| 21 | 24 | ||
| 22 | How to compile RDFox? | 25 | Configuring the engine |
| 23 | === | 26 | ====================== |
| 24 | 27 | ||
| 25 | - Download https://github.com/yujiaoz/PAGOdA/blob/master/lib/RDFox/RDFox.zip. | 28 | The engine provides a standard configuration, but it is most likely that is not suitable for your purposes. |
| 26 | - Extract all files in the zip. | 29 | You should provide your own configuration in a file called `pagoda.properties` including it in the classpath. |
| 27 | - Go to the directory RDFox/RDFox. | 30 | Such a file should resemble the file `src/resources/_default_pagoda.properties`. |
| 28 | - Run command "ant". | ||
| 29 | - You will find JRDFox.jar in the directory build/release/lib. | ||
| 30 | 31 | ||
| 31 | 32 | ||
| 32 | How to run the project? | 33 | Executing |
| 33 | === | 34 | ========= |
| 34 | 35 | ||
| 35 | To run PAGOdA inside your java project, please check the simple example in src/example/simpleExample.jar. To run PAGOdA in command line once you have a jar package, follow the instruction on the following website https://www.cs.ox.ac.uk/isg/tools/PAGOdA/. \ No newline at end of file | 36 | Once you have the runnable jar, you can make the system answer queries through the command line interface. |
| 37 | |||
| 38 | Run `java -jar pagoda-x.y.z-jar-with-dependencies.jar` for getting a list of the mandatory arguments and optional parameters. | ||
| 39 | |||
| 40 | Run `java -cp pagoda-x.y.z-jar-with-dependencies.jar:<your_path_to_properties>/pagoda.properties arg [arg]...` for executing the engine with a custom configuration. | ||
| 41 | |||
| 42 | Using it as a library | ||
| 43 | ===================== | ||
| 44 | |||
| 45 | The API is offered by the class `QueryReasoner`, however we provide a more handy wrapper, that is the class `Pagoda`. | ||
| 46 | Thanks to such a wrapper, you can build an instance of `Pagoda` by specifying different parameters and after that you will get | ||
| 47 | a runnable `Pagoda` object. | ||
| @@ -6,7 +6,19 @@ | |||
| 6 | <version>2.1.2</version> | 6 | <version>2.1.2</version> |
| 7 | <packaging>jar</packaging> | 7 | <packaging>jar</packaging> |
| 8 | <name>PAGOdA</name> | 8 | <name>PAGOdA</name> |
| 9 | <build> | 9 | <properties> |
| 10 | <skipTests>true</skipTests> | ||
| 11 | </properties> | ||
| 12 | <repositories> | ||
| 13 | <!--other repositories if any--> | ||
| 14 | <repository> | ||
| 15 | <id>project.local</id> | ||
| 16 | <name>pagoda</name> | ||
| 17 | <url>file:${project.basedir}/repo</url> | ||
| 18 | </repository> | ||
| 19 | </repositories> | ||
| 20 | |||
| 21 | <build> | ||
| 10 | <sourceDirectory>src</sourceDirectory> | 22 | <sourceDirectory>src</sourceDirectory> |
| 11 | <testSourceDirectory>test</testSourceDirectory> | 23 | <testSourceDirectory>test</testSourceDirectory> |
| 12 | <resources> | 24 | <resources> |
| @@ -101,20 +113,20 @@ | |||
| 101 | <artifactId>dashboard-maven-plugin</artifactId> | 113 | <artifactId>dashboard-maven-plugin</artifactId> |
| 102 | <version>1.0.0-beta-1</version> | 114 | <version>1.0.0-beta-1</version> |
| 103 | </plugin> | 115 | </plugin> |
| 104 | <plugin> | 116 | <!--<plugin>--> |
| 105 | <groupId>org.apache.maven.plugins</groupId> | 117 | <!--<groupId>org.apache.maven.plugins</groupId>--> |
| 106 | <artifactId>maven-surefire-plugin</artifactId> | 118 | <!--<artifactId>maven-surefire-plugin</artifactId>--> |
| 107 | <version>2.13</version> | 119 | <!--<version>2.13</version>--> |
| 108 | <configuration> | 120 | <!--<configuration>--> |
| 109 | <forkMode>always</forkMode> | 121 | <!--<forkMode>always</forkMode>--> |
| 110 | <systemPropertyVariables> | 122 | <!--<systemPropertyVariables>--> |
| 111 | <reporter.debug>false</reporter.debug> | 123 | <!--<reporter.debug>false</reporter.debug>--> |
| 112 | </systemPropertyVariables> | 124 | <!--</systemPropertyVariables>--> |
| 113 | <suiteXmlFiles> | 125 | <!--<suiteXmlFiles>--> |
| 114 | <suiteXmlFile>testResources/LightTests.xml</suiteXmlFile> | 126 | <!--<suiteXmlFile>testResources/LightTests.xml</suiteXmlFile>--> |
| 115 | </suiteXmlFiles> | 127 | <!--</suiteXmlFiles>--> |
| 116 | </configuration> | 128 | <!--</configuration>--> |
| 117 | </plugin> | 129 | <!--</plugin>--> |
| 118 | </plugins> | 130 | </plugins> |
| 119 | </reporting> | 131 | </reporting> |
| 120 | <dependencies> | 132 | <dependencies> |
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar new file mode 100644 index 0000000..3339750 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar | |||
| Binary files differ | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 new file mode 100644 index 0000000..8b1c104 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 | |||
| @@ -0,0 +1 @@ | |||
| 599f8f78d5c3aaa3c40b5bfc329b5849 \ No newline at end of file | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 new file mode 100644 index 0000000..5cd2924 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 | |||
| @@ -0,0 +1 @@ | |||
| 9ef62e415ff8a0ee95163886aaf38fc4ec4282a2 \ No newline at end of file | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom new file mode 100644 index 0000000..ab34e46 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 4 | <modelVersion>4.0.0</modelVersion> | ||
| 5 | <groupId>uk.ac.ox.cs.jrdfox</groupId> | ||
| 6 | <artifactId>jrdfox</artifactId> | ||
| 7 | <version>1.0</version> | ||
| 8 | </project> | ||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 new file mode 100644 index 0000000..3ac0611 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 | |||
| @@ -0,0 +1 @@ | |||
| bb280362ba41e5f882ad4dd865b46ec0 \ No newline at end of file | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 new file mode 100644 index 0000000..7496630 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 | |||
| @@ -0,0 +1 @@ | |||
| a6d405a3643296699d87f1626ebe802419065ffc \ No newline at end of file | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml new file mode 100644 index 0000000..ed39b4d --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <metadata> | ||
| 3 | <groupId>uk.ac.ox.cs.jrdfox</groupId> | ||
| 4 | <artifactId>jrdfox</artifactId> | ||
| 5 | <versioning> | ||
| 6 | <release>1.0</release> | ||
| 7 | <versions> | ||
| 8 | <version>1.0</version> | ||
| 9 | </versions> | ||
| 10 | <lastUpdated>20151012092905</lastUpdated> | ||
| 11 | </versioning> | ||
| 12 | </metadata> | ||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 new file mode 100644 index 0000000..d182e74 --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 | |||
| @@ -0,0 +1 @@ | |||
| 1dafbe30a98fe9f5d0ec6d140ca79a6d \ No newline at end of file | |||
diff --git a/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 new file mode 100644 index 0000000..952c15e --- /dev/null +++ b/repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 | |||
| @@ -0,0 +1 @@ | |||
| a476004dd5eae7023ae322c56e4c964750eafb34 \ No newline at end of file | |||
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java index ae57670..8cc9209 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | |||
| @@ -74,7 +74,7 @@ class MyQueryReasoner extends QueryReasoner { | |||
| 74 | program = new DatalogProgram(ontology); | 74 | program = new DatalogProgram(ontology); |
| 75 | // program.getLower().save(); | 75 | // program.getLower().save(); |
| 76 | // program.getUpper().save(); | 76 | // program.getUpper().save(); |
| 77 | // program.getGeneral().save(); | 77 | program.getGeneral().save(); |
| 78 | 78 | ||
| 79 | if(!program.getGeneral().isHorn()) | 79 | if(!program.getGeneral().isHorn()) |
| 80 | lazyUpperStore = new MultiStageQueryEngine("lazy-upper-bound", true); | 80 | lazyUpperStore = new MultiStageQueryEngine("lazy-upper-bound", true); |
diff --git a/test/resources/MainTests.xml b/test/resources/MainTests.xml index ec299b5..fdecc72 100644 --- a/test/resources/MainTests.xml +++ b/test/resources/MainTests.xml | |||
| @@ -6,10 +6,11 @@ | |||
| 6 | <groups> | 6 | <groups> |
| 7 | <run> | 7 | <run> |
| 8 | <!--<include name="correctness"/>--> | 8 | <!--<include name="correctness"/>--> |
| 9 | <include name="light"/> | 9 | <!--<include name="light"/>--> |
| 10 | <!--<include name="justExecute"/>--> | 10 | <!--<include name="justExecute"/>--> |
| 11 | <exclude name="heavy"/> | 11 | <!--<exclude name="heavy"/>--> |
| 12 | <!--<include name="nonOriginal"/>--> | 12 | <!--<include name="nonOriginal"/>--> |
| 13 | <include name="existential"/> | ||
| 13 | </run> | 14 | </run> |
| 14 | </groups> | 15 | </groups> |
| 15 | <classes> | 16 | <classes> |
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java index 42f0ac1..3eb956f 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaFLY.java | |||
| @@ -51,17 +51,20 @@ public class TestPagodaFLY { | |||
| 51 | CheckAnswers.assertSameAnswers(answers, givenAnswers); | 51 | CheckAnswers.assertSameAnswers(answers, givenAnswers); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | @Test(groups = {"light", "justExecute", "nonOriginal"}) | 54 | @Test(groups = {"light", "justExecute", "nonOriginal", "existential"}) |
| 55 | public void justExecute_newQueries() throws IOException { | 55 | public void justExecute_newQueries() throws IOException { |
| 56 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); | 56 | String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); |
| 57 | 57 | ||
| 58 | Pagoda.builder() | 58 | Pagoda.builder() |
| 59 | // .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) | 59 | // .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) |
| 60 | .ontology(Paths.get(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl")) | 60 | .ontology(Paths.get(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl")) |
| 61 | .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) | 61 | // .query(Paths.get(ontoDir, "fly/queries/fly_rolledUp.sparql")) |
| 62 | // .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) | ||
| 63 | .query("/home/alessandro/Desktop/query-8.sparql") | ||
| 62 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) | 64 | // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) |
| 63 | .classify(false) | 65 | .classify(false) |
| 64 | .hermit(true) | 66 | .hermit(true) |
| 67 | .skolemDepth(3) | ||
| 65 | .skolem(PagodaProperties.SkolemUpperBoundOptions.BEFORE_SUMMARISATION) | 68 | .skolem(PagodaProperties.SkolemUpperBoundOptions.BEFORE_SUMMARISATION) |
| 66 | .build() | 69 | .build() |
| 67 | .run(); | 70 | .run(); |
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java index 2d95e5f..019fafa 100644 --- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java +++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaLUBM.java | |||
| @@ -85,7 +85,7 @@ public class TestPagodaLUBM { | |||
| 85 | Pagoda.builder() | 85 | Pagoda.builder() |
| 86 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) | 86 | .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) |
| 87 | .data(Paths.get(ontoDir, "lubm/data/lubm1.ttl")) | 87 | .data(Paths.get(ontoDir, "lubm/data/lubm1.ttl")) |
| 88 | .query(Paths.get(ontoDir, "lubm/queries/queries_from_feier-et-al.sparql")) | 88 | .query(Paths.get(ontoDir, "lubm/queries/queries_from_rules.sparql")) |
| 89 | .build() | 89 | .build() |
| 90 | .run(); | 90 | .run(); |
| 91 | } | 91 | } |
