P4AnonymousClasses

From Protege Wiki

Revision as of 05:31, November 25, 2008 by Nickdrummond (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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

In general, these are seen as subsidiary within OWL editors, with the focus being on named classes, 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.

P4 now allows ACs to be added to the ontology just like ordinary classes (but without having to write a meaningless name for them - eg ThingsThatCauseSomeHeartMurmur).

In fact, internally, an anonymous class is exactly the same as a normal defined class, with an auto generated URI, but it is rendered with the contents of its definition - causes some HeartMurmur.



Creating anonymous classes

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 AC:

  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 equivalent 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 you will create a class that has no meaningful name and is rendered as the expression.

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 anonymous classes

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

ACs 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 ways they act just as named classes:

  • ACs will be placed in the asserted and inferred class hierarchy
  • Selecting an AC will cause the global selection to change
  • The Class description view will show asserted and inferred information about the AC


Anonymous classes view

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

This list affects global selection.

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

The list should implement cut and paste.

Anon classes view.png




Warnings

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

ACs 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 ACs - the prefix http://www.co-ode.org/ontologies/owlx/anon# is reserved for this purpose.

Editing ACs 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.

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

Personal tools