P4 1PortingGuide

From Protege Wiki

Jump to: navigation, search

Protege 4.1 Migration Guide

This page describes the major differences between Protege4.0 and Protege4.1 for developers of plugins to allow for smooth migration of plugins.

Back to Protege4DevDocs


Work in progress


The OWL 2 specification has been a slowly moving target in the 2 years preceding the release of Protege 4.0.

In order for the platform to be reasonably stable for developers we have been using a version of the OWL API that approximately implements OWL 1.1 (the initial iteration of the OWL 1 specification). In the background work has been going on to bring the OWL API in line with the OWL 2 specification and Protege 4.1 was branched in Spring 2009 to allow migration to this version (OWL API v3).

The code for Protege 4.1 (working title) is available in svn at protege4/protege-standalone/branches/protege4_1_port/. It can be built and run in the same way as the current codebase. Although most new work will be on this branch, the code will remain branched until the OWL API is deemed stable. As of late June 2009, there are still some fairly large refactoring exercises going on.


As of the end of June 2009, the OWL API is still in flux and changes will be reflected in Protege 4.1 as soon as it is possible to do so.

The codebase builds and seems to run fairly smoothly, but has not been significantly regression tested, so please use with care - particularly with new features.

The code still has a few unported features or open questions - these are currently marked with @@TODO v3 port.

Open issues

  • Editing of annotation axioms is not implemented (adding one will cause a NPE)
  • Editing of SWRL rules is not currently implemented

What has changed?

OWL API changes

The OWL API v3 now implements the OWL 2 specification and has matched, wherever possible, the OWL vocabulary.

This means that some classes, such as OWLDescription have now been changed (it is now OWLClassExpression). An incomplete list is below.

It was also decided to rename the packages in the new version of the OWL API so that name clashes could be avoided completely (so that implementors could bundle implementations that run on both versions).

There are several major structural changes:

  • All named things are now referred to by IRI (unicode version of URI) instead of URI
  • Ontologies are now referred to by an OWLOntologyID which may be anonymous, contain a single URI or additionally a version URI
  • Annotation properties have been re-introduced as entities - replacing annotations using just URIs
  • OWLIndividuals are no longer entities as they can be anonymous - OWLNamedIndividuals (a subclass) are entities
  • Top level object and data properties are now in existence.
  • Axiom annotations are no longer stand-off axioms in there own right. They are now part of other axioms
  • Annotations can be on entities or on IRIs
  • There have been some extra constructs added to the vocabulary (such as OWLDatatypeDefinition) which means that visitor implementations must be updated
  • Imports are no longer axioms
  • The changes API has been extended to support ontology name, annotation and import changes

Protege changes

Fundamentally, Protege 4.1 has tried to remain fairly unchanged where possible. Most of the changes have been to match the new names for OWLObjects and aligning method names etc.

In your plugin manifest.mf file, where the bundle dependencies are stated in Require-Bundle the protege core bundles should have a version specified to prevent your plugin being accidentally loaded by an earlier version of Protege:


Most notably in the UI, we now have an annotation property hierarchy (and appropriate hierarchy provider) and additional views for describing annotation properties (so that annotations, superproperties, domain and range can be added) as well as support for rendering, finding etc.

There is also support for the additional vocabulary - Keys and Datatype definitions.

This has been a good opportunity to remove deprecated classes and a number of classes have been moved to make the package structure a bit more clear.

Further changes

  • OWLModelManager.getOWLClass(), getObjectProperty() etc should now use OWLModelManager.getOWLEntityFinder().getOWLClass() etc
  • OWLModelManager.getOWLXXXHierarchyProvider() etc should now use OWLModedelManager.getOWLHierarchyManager().getOWLXXXHierarchyProvider()
  • AnnotationURIList now longer exists. Use an OWLAnnotationPropertySelectorPanel instead

Package changes in P4.1

The following packages have been restructured:

  • org.protege.editor.owl.ui.view has been split up into more categorised sub-packages based on type
  • Class hierarchy views have been moved from org.protege.editor.owl.ui.clshierarchy to org.protege.editor.owl.ui.view.cls
  • org.protege.editor.owl.ui.frame has been split up into more categorised sub-packages based on type
  • The convenience method on AbstractOWLSelectionViewComponent to update the global selection has renamed from setSelectedEntity() to setGlobalSelection

Plugin.xml changes

Some of the extension points have changed name to ensure compatibility with future versions of the eclipse plugin mechanism:

  • inference.reasonerfactory is now inference_reasonerfactory.
  • ui.renderer.entitycolorprovider is now ui_renderer_entitycolorprovider.
  • model.libraryfactory is now model_libraryfactory.
  • io.listener is now io_listener.
  • ui.editor.description is now ui_editor_description.


OWL API package Changes

org.semanticweb.owl org.semanticweb.owlapi
org.coode.manchesterowlsyntax org.coode.owlapi.manchesterowlsyntax
org.coode.obo org.coode.owlapi.obo
org.coode.owl.rdf.turtle org.coode.owlapi.turtle
uk.ac.manchester.cs.owl uk.ac.manchester.cs.owl.owlapi
org.coode.owl.rdfxml org.coode.owlapi.rdfxml
org.coode.owl.rdf org.coode.owlapi.rdf
org.coode.owl.functionalparser org.coode.owlapi.functionalparser
org.coode.owl.functionalrenderer org.coode.owlapi.functionalrenderer
org.coode.owl.latex org.coode.owlapi.latex
de.uulm.ecs.ai.owl.krssparser de.uulm.ecs.ai.owlapi.krssparser
edu.unika.aifb.rdf.api.syntax org.semanticweb.owlapi.rdf.syntax

OWL API Vocabulary Changes

The OWL API v3 should be in line with the vocabulary described in the OWL 2 specification. This list is incomplete, but shows the most likely renames that will be required. Consult the OWL 2 quick reference guide for additional pointers.

OWLDescription OWLClassExpression
OWLObjectSomeRestriction OWLObjectSomeValuesFrom
OWLObjectAllRestriction OWLObjectAllValuesFrom
OWLDataSomeRestriction OWLDataSomeValuesFrom
OWLDataAllRestriction OWLDataAllValuesFrom
OWLTypedConstant OWLTypedLiteral
OWLUntypedConstant OWLStringLiteral
OWLRestrictedDataRangeFacetVocabulary OWLFacet
OWLDataRangeFacetRestriction OWLFacetRestriction
OWLDataType OWLDatatype
Personal tools