Pr4 UG h2 En Render

From Protege Wiki

Revision as of 13:56, July 27, 2010 by RichMorin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Entity Rendering

comment   Editing   Glossary   Outline

Protege 4 User's Guide
Entity - Name
Entity - Render
Expression - Enter
Ontology - Create
Ontology - Export
Ontology - Extend
Ontology - Import

Because URIs will often be fairly long strings, Protege 4 uses a renderer to show a shortened form of the name. (See entity naming for details.)

The renderer can be changed in the preferences (see below) and can show the fragment or ending part of the URI, or can show a name provided by an annotation on the entity.

So Pizza is actually just a rendering of the URI

The full URI can always be viewed by hovering over an entity in its tree (the tooltip shows the full name). Also, the "Refactor | Rename entity" menu item always works with the URI - in fact, you can see the full URI by just clicking on the checkbox in the rename dialog.

Rendering preferences

There are 4 options for the type of renderer you can select:

  • URI fragment - the part of the URI following the # or last / character
  • qnames (qualified name) - the fragment but with a prefix set
  • annotation values - uses the value of an entity annotation specified in Annotations...
  • annotation values with prefixes - uses a combination of the annotation value and the qname prefixes

When using the 3rd and 4th option, you will probably wish to also set the "new entities" preferences; this creates labels when a new entity is created.

Pr4 UG h2 Renderer-prefs.png


URIs are long. A short form (prefix) can be specified to represent the commonly used leftmost part of a URI.

eg. if we have a prefix mapping:

pizza =

then the following class:

can be written much more concisely:


The prefixes... option is available for both the qname and the annotation values with prefixes renderers.

The table that is brought up allows the user to add new prefixes by hand or get P4 to generate them from the loaded ontologies. Several prefixes are available as default.

Pr4 UG h2 Prefix-mappings.png


If you have set the renderer to be either of the annotations versions, this option will be available.

You can specify a list of which annotations are searched for a rendering in order of preference. In addition, for each given annotation, you can specify a comma-separated list of languages (again in order of preferences).

eg the setup on the right will first try to find a label annotation in English, followed by one with no language set, followed by any language. If it fails, then it will look for any prefLabel it can find.

If the annotations renderer fails to find an appropriate label, it will default to the fragment.

Pr4 UG h2 Annotation-label-prefs.png

Personal tools