API comparison: Protege, OWL and SPARQL

From its-wiki.no
Jump to: navigation, search

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
  • will have gained an understanding on the main differences between the OWL and the Protege API
  • you will be able to address the advantages/shortcomings of the APIs
  • will have established your own program using one of these APIs
  • are able to define the outcome of your project using these APIs
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

Lecture Notes

Lecture notes 2014

Lecture notes 2012


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)

⌘ 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

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)

Reasoning, support for SWRL


⌘ 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


⌘ 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

  1. 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


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]])