CreatingSynonyms

From Protege Wiki
Jump to: navigation, search

Adding Synonyms to Class Names


Issue:

We often want to add synonyms or alternative names to a class name


Solution summary:

Create a metaclass with this property and create new classes using this metaclass. Please note that this solution is more relevant to the frame-based version of Protege, although it can also be used in Protege-OWL. However, using annotation properties is a more natural solution in OWL.


Steps to perform to add synonyms to class names:

  1. Create a new metaclass with the slot for the synonyms.
    1. Create a subclass of :STANDARD-CLASS. Let's call it MetaclassWithLabel.
    2. Create a slot synonyms for the class MetaclassWithLabel.
    3. Have its value type as String and cardinality multiple.


Now any class that uses MetaclassWithLabel as its template (i.e., it is an instance of MetaclassWithLabel) will have an additional slot synonyms on its form.


  1. Use the metaclass MetaclassWithLabel when you create your classes.
    1. When you create a new class, use the right-click menu instead of a button, and choose "Select a class using a metaclass..." option. You will have a slot to enter synomys on the class form.
    2. By default, when new subclasses are created they use the same metaclass as the superclass. So, to create subclasses of classes that already use MetaclassWithLabel, you can also use the "New Class" button.