HidingIdentifiers

From Protege Wiki
Revision as of 15:39, June 20, 2008 by JenniferVendetti (talk | contribs) (migrating this page from old wiki)

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

Hiding Identifiers with Labels



Rationale

Use an identifier for what it is meant (identify :-) ) without interfering with the name(s) associated to a concept or a relationship so that:

  • fixing a typo in a name doesn't make the former concept obsolete
  • a representation of a concept or of a relationship can be retired and the same name can be allocated to the new version
  • the identifiers are agnostic as to one hard-coded preferred language
  • synonyms can be handled


Solution proposed

  • Use a property different from :NAME or rdf:ID to represent the various names and their respective languages. This solution requires the use of an additional metaclass in frame-based Protege and using the annotation property rdfs:label in Protege-OWL.
  • Hide the identifiers from the user. This makes it necessary to customize the editing tool so that names are displayed whenever possible, instead of identifiers.


How do I actually do this in Protege?

How-to for Protege-OWL

Hiding identifiers

  1. Create a class
    1. Set a random identifier, e.g., "_123639"
    2. Create annotation properties (rdfs:label); fill the value; specify the language ('lang' attribute)
  2. In the OWL menu, select "Preferences" and then "Import Protege metadata ontology"
  3. In the classes tab select the previously created class and click on the "F" button from the "CLASS EDITOR" title bar (the brown title bar, right corner)
  4. You will get a dialog whether you want to make owl:Class visible and switch to the Forms tab. Click OK.
    1. In the Forms tab, in the "Display slot" combo box, change the value from ":NAME" to "rdfs:label"
    2. From now on, you can hide the metaclasses (OWL menu -> Preferences -> Visibility)
    3. In the class hierarchy of the OWLClasses tab:
      1. Classes with no rdfs:label display by their identifier (":NAME")
      2. Classes with rdfs:label for which all the labels have explicitly a language display their identifier
      3. Classes with at least one rdfs:label for which the language is not explicitly stated display the value of this rdfs:label.

Setting a default language

  1. In the Metadata tab, make sure the primary ontology (the top one) is active and selected
    1. Create a new annotation property (select 'protege:defaultLanguage')
    2. In the Value field, set the default language
    3. Do not fill the Lang field for the annotation property
    4. In the class hierarchy of the OWLClasses tab:
      1. Classes with no rdfs:label display their identifier (":NAME")
      2. Classes with rdfs:label for which the language matches the value defined at step 1.2 display this label
      3. Classes with rdfs:label, none of which matches the value defined at step 1.2 display their identifier (":NAME")


How-to for Protege-Frames

Author: Olivier Dameron