P4AnonymousClasses

From Protege Wiki

Revision as of 07:18, November 28, 2008 by Nickdrummond (Talk | contribs)

Jump to: navigation, search

Protege 4.x Anonymous Classes

This page describes features that will be available from build105 onwards.


Back to Protege4UserDocs



Contents

Anonymous classes in OWL

Anonymous classes (ACs) are used throughout OWL ontologies. Any class expression, including restrictions, intersections, unions, enumerations etc is an anonymous class.

In general, these are seen as subsidiary within OWL editors, such that the class hierarchy and all navigation is focused on named things.

In many cases we are interested in exploring arbitrary expressions, perhaps for testing purposes, or just to make the ontology more clear. This is the reason the DL query tab is so useful - we can use it to test definitions and ensure the quality of our ontological definitions. The problem with the DL query tab up to now has been that the expressions entered were not saved - so the user was forced to cut and paste handy ones into a text editor or an annotation.


Anonymous Defined Classes (ADCs)

P4 now allows ACs to be added to the ontology in such a way that they can be saved and browsed just like ordinary classes.


ADCs are exactly like normal defined classes - ie they are a class that have an asserted equivalent class:

eg defined class ThingsThatCauseSomeHeartMurmur equivalentTo causes some HeartMurmur


BUT we don't have to provide a rediculous/meaningless name for them. They are automatically given a URI internally and are visible in the interface as an expression:

causes some HeartMurmur


Creating ADCs

Creating a class by right clicking on an expression
Creating a class from the DL Query Tab

There are currently two places you can create an ADC:

  1. Right click on expressions
    1. select a class expression in the Class, Property or Individual Description views
    2. right click and select Create new defined class
  2. DL query view
    1. type an expression into the DL query editor
    2. select Add to ontology


You will be presented with the following dialog:

Create equivalent class dialog

If you leave the option as Anonymous class you will create an ADC.

If you choose to name your class, you will end up with a normal defined class (that is equivalent to the expression you had selected).


Viewing ADCs

Anon class in asserted tree.png
Anon class in inferred tree.png
Anon class description.png

ADCs are treated differently from named classes in the following ways:

  • Rendering preferences are ignored. They are always rendered with the content of their equivalent class.
  • They are not indexed for searches.
  • They cannot currently be referred to in other class expressions.


In all other respects they act just as named classes:

  • ADCs will be placed in the asserted and inferred class hierarchy
  • Selecting an ADC will cause the global selection to change
  • The Class description view will show asserted and inferred information about the ADC
  • They will show up in inferred sections of all entity description views where appropriate


Anonymous defined classes view

In addition, there is a view under Views | Class views | Anonymous defined classes that shows just the ADCs in a flat list.

This list affects global selection.

You can also delete the ADC from the ontology by clicking the Remove button.

The list should implement cut and paste.

Anon classes view.png



ADCs and General Class Axioms (work in progress)

Anon-classes-GCAs.png

General class axioms (GCAs) are any subClass, equivalentClass or disjointClass statement that has an AC on the left hand side.

eg "any person that owns a TV cannot avoid watching a reality show"

 Person and owns some Television subClassOf watches some RealityShow

GCAs are generally created in the General class axioms view.

If an ADC has been created, any sub/equiv/disjoints made in its Class Description view will be added as GCAs. GCAs can also be deleted directly in the Class Description view.


Warnings

P4 has not been restrictive about your use of ADCs. As this is a new feature we will need some feedback of users experience with this mechanism.

ADCs are currently not part of the OWL2.0 specification and are internally represented and serialised as normal named classes. Therefore, other tools/APIs will not treat them as special.

We currently use naming conventions to mark ADCs - the prefix http://www.co-ode.org/ontologies/owlx/anon# is reserved for this purpose. Please do not rename ADCs.

Editing ADCs might be bad practice. In particular, it is not clear what should be displayed if multiple equivalent class axioms are created on this class, so this should probably be avoided currently.
UPDATE: I'm working on making the definition of an ADC immutable wrt to the editor*. Any assertions on this class should get translated into GCAs (see above) or anonymous classes in other axioms (eg class assertions).

Although unlikely because of the way IDs are generated, we cannot guarantee uniqueness when working with several ontologies that all use ADCs (in the same way we should be able to with anonymous individuals). Equally, we cannot close the scope of the ADCs to a single ontology (again, as we can with anonymous individuals).


.* or at least well behaved editor views - will have to publish some developer notes

Personal tools