HidingIdentifiers
From Protege Wiki
Revision as of 15:39, June 20, 2008 by JenniferVendetti (talk | contribs) (migrating this page from old wiki)
Hiding Identifiers with Labels
Contents
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
- Create a class
- Set a random identifier, e.g., "_123639"
- Create annotation properties (rdfs:label); fill the value; specify the language ('lang' attribute)
- In the OWL menu, select "Preferences" and then "Import Protege metadata ontology"
- 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)
- You will get a dialog whether you want to make owl:Class visible and switch to the Forms tab. Click OK.
- In the Forms tab, in the "Display slot" combo box, change the value from ":NAME" to "rdfs:label"
- From now on, you can hide the metaclasses (OWL menu -> Preferences -> Visibility)
- In the class hierarchy of the OWLClasses tab:
- Classes with no rdfs:label display by their identifier (":NAME")
- Classes with rdfs:label for which all the labels have explicitly a language display their identifier
- 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
- In the Metadata tab, make sure the primary ontology (the top one) is active and selected
- Create a new annotation property (select 'protege:defaultLanguage')
- In the Value field, set the default language
- Do not fill the Lang field for the annotation property
- In the class hierarchy of the OWLClasses tab:
- Classes with no rdfs:label display their identifier (":NAME")
- Classes with rdfs:label for which the language matches the value defined at step 1.2 display this label
- 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