API comparison: Protege, OWL and SPARQL
Wiki for ITS | ||||||
---|---|---|---|---|---|---|
|
![]() |
API comparison: Protege, OWL and SPARQL
Course | UNIK4710, UNIK9710 |
---|---|
Title | API comparison: Protege, OWL, SPARQL, Jena |
Lecture date | 2014/04/25 0900-1200 |
presented | by Josef.Noll |
Objective | During this lecture we will continue the discussion of the differences between Protege, OWL, SPARQL (and Jena) APIs.
The expected outcome is a comparison between the APIs. |
Learning outcomes | Having joined this lecture, you
|
Pensum (read before) | |
References (further info) | References:
More info:
|
Keywords | OWL API, Protege API, Semantic MediaWiki, Instances |
this page was created by Special:FormEdit/Lecture, and can be edited by Special:FormEdit/Lecture/API comparison: Protege, OWL and SPARQL.
Test yourself, answer these questions
- Try to understand the examples: http://workingontologist.org/Examples/index.html
Lecture Notes
Lecture notes 2014
- Notes: Media:UNIK4710-L11-v14.pdf
- Video: mms://lux.unik.no/UNIK4710-JN/2012/UNIK-20120427.wmv
- OWL-API: Rozina, Shazad, Marcel
- SPARQL-API: Andreas
Lecture notes 2012
- Notes: Media:UNIK4710-L12-v12.pdf
API comparison
- Title
- API comparison
- Author
- Josef, Paul, Hoan,
- Footer
- API comparison: Protege, OWL and SPARQL
- Subfooter
- UNIK4710/UNIK9710
⌘ Criteria
Complexity/easy to use
- easy/reasonable to use
- write both java programs and also use command-line inputs
Restrictions (download, availability for OWL 1.0/2.0)
- support RDFS, DAML + OIL, OWL (Jena v2)
⌘ Jena API
Examples & Documentation (easy to implement)
- JENA implementation looks easy. JENA has a close relationship to Protege: http://protege.stanford.edu/plugins/owl/jena-integration.html
- Mailinglist: jena-users@incubator.apache.org
- JENA Ontology: http://jena.sourceforge.net/ontology/
- JENA FAQ: http://jena.sourceforge.net/jena-faq.html
- Documentation: http://jena.sourceforge.net/documentation.html
⌘ Reasoning, support for SWRL
- This section of the documentation describes the current support for inference available within Jena2. It includes an outline of the general inference API, together with details of the specific rule engines and configurations for RDFS and OWL inference supplied with Jena2. http://jena.sourceforge.net/inference/#RULEsyntax
- The second major set of reasoners supplied with Jena2 is a rule-based implementation of the OWL/lite subset of OWL/full. http://jena.sourceforge.net/inference/#owl
- does not support SWRL
- Reasoner: pellet
- Jena rule reasoner based on ....(?)
prepared by Paul and Huan in 2012
⌘ OWL-API
prepared by Maurice and Josef in 2012 Summary: The OWL-API was developed by Manchester and Karlsruhe University. The basics are described in the paper "Cooking the Semantic Web with the OWL API" [1]
Complexity/easy to use
- higher level of abstraction
- loading ontologies is easy, running SWRL more complex
Restrictions (download, availability for OWL 1.0/2.0)
- public available, http://owlapi.sourceforge.net
- applicability to OWL 2.0 - info not found
- Latest version available for OWL 2.2.0
- Version 3 of the OWL API is backward incompatible with version 2 of the OWL API
⌘ OWL API - Examples & Documentation
- lots of documentation, available at: http://owlapi.sourceforge.net/documentation.html
- loading ontologies, saving ontologies, entities, deleting Entities
- straight forward java programming
- Code examples are provided, easy to implement
Reasoning, support for SWRL
- own examples on how to create an ontology andd some rules
- interaction with reasoning
- Two reasoner implementations available: Pellet and FaCT++.
- Pellet should support SWRL rules
⌘ Protege-API
prepared by Dave in 2012
Complexity/easy to use
- Like other Java APIs, the libraries are needed to be imported in the source code of the application.
Restrictions (download, availability for OWL 1.0/2.0)
- OWL and RDF.
- Provided with the standard Protege installation.
Examples & Documentation (easy to implement)
- JavaDoc available
- Tutorials available (http://protegewiki.stanford.edu/wiki/ProtegeOWL_API_Programmers_Guide#Installation_.26_Getting_Started)
- http://protege.stanford.edu/plugins/owl/api/ReasonerAPIExamples.html
Reasoning, support for SWRL
- Supports direct creation and modification of SWRL rules from the API (http://protege.cim3.net/cgi-bin/wiki.pl?SWRLEditorFAQ and http://protege.cim3.net/cgi-bin/wiki.pl?SWRLAPI).
- Reasoner plugin.
⌘ Comparison of API
Which one to select
- OWL-API most probably easiest to use
- Protege API is the most complete, and has good compatibility with Protege
- Protege API does not need any other installations
- Protege API includes most of the Jena properties
- UNIK uses OWL-API
Web Links
- difference between Jean, Owl and Protege API: http://answers.semanticweb.com/questions/2568/jena-api-or-owl-api-or-protege-owl-api
- Yoshtec suggests the Protege API, and talks about "inverse Properties seem to be filled automatically", see: http://wiki.yoshtec.com/java-owl-api
⌘ Conclusion: Protege-API
Generally get's the Job done and it looks ok from my view.
Pros
- The mapping of OWL-Classes to Java Interfaces resembles the intention of OWL (better than mapping to Objects)
- Let's you create additional abstract interfaces and classes, so no need to edit the generated code if customization is needed.
Cons are:
- Jena can not handle too large nested items.
- DateTime handling could be better. Not using the correct Converter can give you trouble (e.g. Date.toString() in a german locale)
- Typesafe Collections would be nice.
- Neccessary to include libs that do not belong there (jlooks.jar)
⌘ Conclusion: OWL-API
If you are used to do the things low level, this is the right stuff for you, but for the normal "object-oriented"-Programmer this is more or less pain.
Pros:
- Clean design (I have to emphasize this, after working with it a little bit longer)
- Good change management in ontologies
- Low level approach
Cons:
- Low Level approach (in regard to the use case)
- Overly verbose for normal (business rule driven) programming.
- Sometimes sparse Documentation (JavaDoc) although the class names are chosen very well, for a beginner this is not always sufficient to understand the whole concept.
References
- ↑ S Bechhofer, R Volz, Philip Lord, "Cooking the Semantic Web with the OWL API",The SemanticWeb-ISWC 2003, 2003 - Springer, .pdf download from psu.edu
Presentations from earlier years
Presentations 2012
- Project Presentation - Trinh: File:Trinh.pdf
Semantic MediaWiki versus OWL
Main differences in using the semantic elements
OWL Construct | Semantic MediaWiki | |
Class | Category | |
Class instantiation | Page categorization (e.g. [[Category:X]]) | |
Subclass of | Category subcategorization (e.g. [[Category:X]] on a category page) | |
Datatype property | Property | |
Object property | Property ( also ) | |
Instantiated datatype property | Attribute annotation (e.g. [[X::Y]]) | |
Instantiated object property | Typed link (e.g. [[X::Y]]) |
- From: http://www.semantic-mediawiki.org/wiki/Help:Ontology_import
- Representation of OWL constructs in Semantic MediaWiki: Media:OWL-SemanticWiki.jpg
- Ontology import into Semantic MediaWiki: http://semantic-mediawiki.org/wiki/Help:Ontology_import