From 8651164cd632a5db310b457ce32d4fbc97bdc41c Mon Sep 17 00:00:00 2001 From: RncLsn Date: Mon, 12 Oct 2015 11:10:01 +0100 Subject: RDFox dependency from project repo; improved the readme. --- README.md | 48 +++++++++++++-------- pom.xml | 42 +++++++++++------- repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar | Bin 0 -> 5015178 bytes .../ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 | 1 + .../ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 | 1 + repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom | 8 ++++ .../ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 | 1 + .../ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 | 1 + repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml | 12 ++++++ .../ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 | 1 + .../ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 | 1 + .../ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | 2 +- test/resources/MainTests.xml | 5 ++- .../ox/cs/pagoda/global_tests/TestPagodaFLY.java | 7 ++- .../ox/cs/pagoda/global_tests/TestPagodaLUBM.java | 2 +- 15 files changed, 93 insertions(+), 39 deletions(-) create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.md5 create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar.sha1 create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.md5 create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.pom.sha1 create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.md5 create mode 100644 repo/uk/ac/ox/cs/jrdfox/jrdfox/maven-metadata.xml.sha1 diff --git a/README.md b/README.md index 5e908fb..663b6cb 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,47 @@ PAGOdA -===== +====== -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/. +PAGOdA is a conjunctive query answering engine for OWL 2 ontologies. Project dependencies/requirements -===== +================================= +- This software has been developed for Linux - JavaSE 8 - Maven -How to compile the project from source in Eclipse? -===== +Building and packaging +====================== -- In order to compile the project make sure that you have JavaSE 8 and Maven installed on your computer. -- After cloning the repository by command git clone https://github.com/yujiaoz/PAGOdA.git, you need to install it using the command "maven install". -- 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. +This is a Maven project, hence Maven should be used for building and packaging. +* Compile `mvn compile` +* Create jars `mvn package`; +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*. +* Execute tests `mvn test -DskipTests=false`; -How to compile RDFox? -=== +Configuring the engine +====================== -- Download https://github.com/yujiaoz/PAGOdA/blob/master/lib/RDFox/RDFox.zip. -- Extract all files in the zip. -- Go to the directory RDFox/RDFox. -- Run command "ant". -- You will find JRDFox.jar in the directory build/release/lib. +The engine provides a standard configuration, but it is most likely that is not suitable for your purposes. +You should provide your own configuration in a file called `pagoda.properties` including it in the classpath. +Such a file should resemble the file `src/resources/_default_pagoda.properties`. -How to run the project? -=== +Executing +========= -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 +Once you have the runnable jar, you can make the system answer queries through the command line interface. + +Run `java -jar pagoda-x.y.z-jar-with-dependencies.jar` for getting a list of the mandatory arguments and optional parameters. + +Run `java -cp pagoda-x.y.z-jar-with-dependencies.jar:/pagoda.properties arg [arg]...` for executing the engine with a custom configuration. + +Using it as a library +===================== + +The API is offered by the class `QueryReasoner`, however we provide a more handy wrapper, that is the class `Pagoda`. +Thanks to such a wrapper, you can build an instance of `Pagoda` by specifying different parameters and after that you will get +a runnable `Pagoda` object. diff --git a/pom.xml b/pom.xml index ffe18ce..466383a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,19 @@ 2.1.2 jar PAGOdA - + + true + + + + + project.local + pagoda + file:${project.basedir}/repo + + + + src test @@ -101,20 +113,20 @@ dashboard-maven-plugin 1.0.0-beta-1 - - org.apache.maven.plugins - maven-surefire-plugin - 2.13 - - always - - false - - - testResources/LightTests.xml - - - + + + + + + + + + + + + + + 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 Binary files /dev/null and b/repo/uk/ac/ox/cs/jrdfox/jrdfox/1.0/jrdfox-1.0.jar 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 @@ + + + 4.0.0 + uk.ac.ox.cs.jrdfox + jrdfox + 1.0 + 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 @@ + + + uk.ac.ox.cs.jrdfox + jrdfox + + 1.0 + + 1.0 + + 20151012092905 + + 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 { program = new DatalogProgram(ontology); // program.getLower().save(); // program.getUpper().save(); -// program.getGeneral().save(); + program.getGeneral().save(); if(!program.getGeneral().isHorn()) 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 @@ - + - + + 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 { CheckAnswers.assertSameAnswers(answers, givenAnswers); } - @Test(groups = {"light", "justExecute", "nonOriginal"}) + @Test(groups = {"light", "justExecute", "nonOriginal", "existential"}) public void justExecute_newQueries() throws IOException { String ontoDir = TestUtil.getConfig().getProperty("ontoDir"); Pagoda.builder() // .ontology(Paths.get(ontoDir, "fly/fly_rolledUp.owl")) .ontology(Paths.get(ontoDir, "fly/fly_anatomy_XP_with_GJ_FC_individuals.owl")) - .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) +// .query(Paths.get(ontoDir, "fly/queries/fly_rolledUp.sparql")) +// .query(Paths.get(ontoDir, "fly/queries/new_queries.sparql")) + .query("/home/alessandro/Desktop/query-8.sparql") // .answer(Paths.get("/home/alessandro/Desktop/answers.json")) .classify(false) .hermit(true) + .skolemDepth(3) .skolem(PagodaProperties.SkolemUpperBoundOptions.BEFORE_SUMMARISATION) .build() .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 { Pagoda.builder() .ontology(Paths.get(ontoDir, "lubm/univ-bench.owl")) .data(Paths.get(ontoDir, "lubm/data/lubm1.ttl")) - .query(Paths.get(ontoDir, "lubm/queries/queries_from_feier-et-al.sparql")) + .query(Paths.get(ontoDir, "lubm/queries/queries_from_rules.sparql")) .build() .run(); } -- cgit v1.2.3