Pr4 UG h2 En Name

From Protege Wiki
Jump to: navigation, search

Entity Naming

comment   Editing   Glossary   Outline


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

Protege 4's design is closely tied to the Web Ontology Language (OWL), a family of knowledge representation languages for authoring ontologies. Because OWL is intended for use in the Semantic Web, it uses Uniform Resource Identifiers (URIs) to identify all entities (ie, named things).

URI Basics

URIs are syntactically identical to the universally familiar Uniform Resource Locators (URLs, aka web address). So, a URI might specify a location (ie, name anchor) on a web page hosted by a specified server:

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

URIs differ sharply from URLS, however, in their use. Whereas a URL's purpose is to allow access to a resource (eg, web page), a URI's purpose is only to provide a unique name. There is no requirement that any resource be available at the named location. For example, there might be no such web page at www.co-ode.org, let alone the name anchor Pizza.

However, the URI's creators must still ensure that no valid, conflicting URIs are created. First, the domain (and any sub-domains) used in the URI should be under the control of the URI's creators. Then, as long as they refrain from creating conflicting URIs, all should be well.

It is not necessary that a URI correspond to a web page, but creating such a page is a common and useful practice. By establishing a policy that all URIs are backed by web pages, an organization can ensure that internal conflicts will not occur. In addition, the page can be used to store contact information and other useful documentation.

URI Fragments

Once a globally-unique base URI (eg, page name) has been established, any number of name anchors can be used with it. So, Pizza, Topping, and other locally-unique names can be defined without fear of collisions.

Protege takes advantage of this in its Entity Rendering mechanism. If the entire ontology is tied to the same base URI, Protege is free to use (eg, display, accept) locally-unique fragments. In fact, Protege 4 broadens this notion somewhat: if no name anchor is available, the last path element may be used to define a fragment.

Entity Basics

Entity URI

New entities will be given a URI starting with the base:

  • Active ontology (default) - the URI of the currently selected active ontology will always be used as the base URI.
  • Specified URI - the user can specify a static URI that is always used as the base.

Followed by a separator character:

  • # or /

And finally ending with:

  • user supplied name (default) - the string typed in when a new entity is being created.
  • auto ID - generated automatically (see below).

Entity label

Selecting one or both of the create label options generates an annotation on the new entities containing the supplied name (or ID).

Selection also enables control over which annotations get produced when labels are being generated.

  • Same as label renderer (default) - mimics the current behavior; the top preferred rendering annotation URI and language will always be used when generating a label
  • Custom label - a static annotation URI and language can be set separately from the renderer preferences

Auto ID

Create a numerical identifier for new entities.

Note: Auto ID must be selected for at least one of the options in Entity name for these options to be available.

  • Numeric (pseudo random) (default) - generates an number from the system time (so not currently random at all)
  • Numeric (iterative) - generates a sequence of numbers, iterating in single steps from the first available (uniqueness only guaranteed for URI fragments)
    • Start - the lowest ID that will be allocated
    • End - the highest ID that will be allocated (an error will be reported if this is superseded) - set to -1 for no maximum
  • Digit count - the length the numeric part of the IDs will be padded/trimmed to - this should always be made big enough to contain the range of IDs you will generate
  • Prefix (recommended) - add a string to the start of the generated ID. Macros are available.
    • [type] - OWLClass, OWLObjectProperty, etc.
    • [user] - the name of the current user
  • Suffix - add a string to the end of the generated ID. The same macros are available as above.

Converting URIs to labels

Many ontologies have been developed with meaningful names in the URI fragment.

If you wish to move these names into labels and change the URIs into meaningless IDs, there is a tool for doing this under Refactor | Convert entity URIs to labels.

Any entities that already have a reasonable label will not be changed (this is useful if you change your preferences).

This refactor uses your current new entities preferences to determine what labels get generated and how the IDs are created.

New entity creation preferences

A new set of preferences has been created to separate off the renderer from the creation of new entities.

This gives much more flexibility and control over what gets generated in our ontology.

The pane can be found under File | Preferences... | New Entities. When a new pane is first opened, some of the advanced features will be disabled by default.

Pr4 UG h2 New-entities-preferences.png

Translating ontologies

Using a combination of the annotation renderer and label generation, it is possible to develop and view an ontology in a given language.

If you wish to provide multiple labels for internationalization of your ontology, a quick way to do this is using the [Pr4_UG_rp_Tab_Matrix|Matrix Tab] plugin. In particular, see Instructions for setting up the translation.