API comparison: Protege, OWL and SPARQL

= Test yourself, answer these questions =

= Lecture Notes =
 * Try to understand the examples: http://workingontologist.org/Examples/index.html

Lecture notes 2014

 * Notes: [[Media:UNIK4710-L11-v14.pdf]]
 * Video: mms://lux.unik.no/UNIK4710-JN/2012/UNIK-20120427.wmv
 * Presentation by Marcel on Jena, Fuseki and Protege, SPARQL1.1
 * OWL-API: Rozina, Shahzad, Marcel
 * SPARQL-API: Andreas

Lecture notes 2012

 * Notes: [[Media:UNIK4710-L12-v12.pdf]]

= API comparison =


 * title: API comparison
 * author: Josef, Paul, Hoan,
 * 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) = ⌘ Jena API = Examples & Documentation (easy to implement)
 * support RDFS, DAML + OIL, OWL (Jena v2)
 * 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"

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 =

= Presentations from earlier years =

Presentations 2012

 * Project Presentation - Trinh: [[File:Trinh.pdf]]

Semantic MediaWiki versus OWL
Main differences in using the semantic elements


 * 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