Pr4 UG h2 En Render

From Protege Wiki
Revision as of 13:56, July 27, 2010 by RichMorin (talk | contribs) (Automated import of articles)

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

Entity Rendering

comment   Editing   Glossary   Outline


Protege 4 User's Guide
HowTos
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 http://www.co-ode.org/ontologies/pizza/pizza.owl#Pizza.

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

Prefixes...

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 = http://www.co-ode.org/ontologies/pizza/pizza.owl#

then the following class:

http://www.co-ode.org/ontologies/pizza/pizza.owl#CheeseTopping

can be written much more concisely:

pizza:CheeseTopping

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

Annotations...

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