File | Date | Author | Commit |
---|---|---|---|
src | 2014-12-15 | Johannes Binder | [c9a50e] Allow removing individuals from classes |
.gitignore | 2014-01-08 | Johannes Binder | [9a2bb0] Add ontology to string conversion |
README.md | 2014-03-19 | Johannes Binder | [89fec7] Docu and lib updates |
license_header.txt | 2014-01-07 | Carlos Coutinho | [8facef] First Version on Git, synchronised with TIMBUS ... |
pom.xml | 2014-09-08 | Johannes Binder | [7faae3] Merge remote-tracking branch 'origin/master' |
update_keystore.sh | 2014-03-19 | Johannes Binder | [89fec7] Docu and lib updates |
Read Me
owl-api-facade
This library provides easier usage for the OWL API [3] and supports conversation to Jena [4]
to be able to perform SPARQL queries [5] without involving a reasoner.
Usage
Import the lib using Maven:
<dependency> <groupId>org.sbaresearch.owl</groupId> <artifactId>owl-api-facade</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <repositories> <repository> <id>olymp.ifs.tuwien.ac.at</id> <url>http://olymp.ifs.tuwien.ac.at:8080/archiva/repository/snapshots/</url> </repository> </repositories>
See the reference [6] and the tests for usage examples.
Requirements
- JDK 1.7
- Maven 3
Build
Use maven to build the project:
mvn clean package
Development
Defensive programming should be done using OVal's programming by contract support [1].
Note that scripted expressions require public access to used fields, see [2] for examples.
Hint: Automatically execute mvn:compile after build to ensure weaving.
Known issues
- incompatible with JDK 1.8
FAQ
Q: Unexpected exception of method ...: java.lang.NullPointerException - null
A: Run mvn clean and rebuild the project using maven, this happens if compile-time weaving has not been executed.
Q: The query runs forever and stops eventually with an exception.
A: Check if there are any self-signed certificates imported in the ontology that is passed.
To accept self-signed certificates create a truststore for the involved hosts (see update_keystore.sh in the owl-api-facade project) and
pass it to the JVM by either setting JVM options (-Djavax.net.ssl.keyStore / -Djavax.net.ssl.keyStorePassword) [7] or in code (System.setProperty(...), see TestUtils).
Q: net.sf.oval.exception.ValidationFailedException: Method pre conditions validation failed. (Some lines before: Information: Available ScriptEngine language names: [])
A: The "js" ScriptEngine is missing, which can be the case for some Versions of OpenJDK. Try upgrading the JRE or use Oracle JRE.
References
[1] http://oval.sourceforge.net/userguide.html#programming-by-contract
[2] http://oval.sourceforge.net/xref-test/
[3] http://owlapi.sourceforge.net/
[4] http://jena.apache.org/
[5] http://www.w3.org/TR/rdf-sparql-query/
[6] https://olymp.ifs.tuwien.ac.at/jenkins/job/timbus-dpes-preservation-identifier-owl-api-facade/javadoc/
[7] http://docs.oracle.com/javaee/1.4/tutorial/doc/Security6.html