PrF UG all

From Protege Wiki

Jump to: navigation, search

Contents

Protege-Frames User's Guide

This user's guide describes how to use the Protege-Frames editor. If you are unfamiliar with Protege or the Protege-Frames editor, please click "Introductory Topics" in the table of contents on the right-hand side of this page to find detailed explanations of both.

Please use the navigation bars on the right-hand side of pages to navigate this user's guide.


protege-frames editor


Questions about Protege-Frames?

Please post questions and comments about this guide and/or the Protege-Frames editor on the protege-discussion mailing list.

Interested in making edits to the guide?

If you are interested in contributing edits to the Protege-Frames User's Guide, please refer to our help topics section, which has important details about editing and the structure of this guide.

See Also


Introductory Topics

This section of the Protege-Frames User's Guide covers a variety of introductory topics.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


Using this Guide

The Protege-Frames User's Guide documents how to use Protege-Frames, an integrated knowledge-base development and management system. These pages include descriptions of the user interface, along with step-by-step instructions for completing specific tasks. Screenshots of a Newspaper Example are used to illustrate the explanations through most of this guide's pages.

Navigation

We assume that you are familiar with your operating-system platform and with using an Internet browser. You can navigate among topics by using your browser's Back and Forward buttons, or by using the list of top-level topics in the left-hand frame.

Each of the Guide's topics (e.g., Protege-Frames subsystems) has an initial "index" page that lists all pages associated with that topics. There is also a "global" index page.

At the bottom of every page, there is a Next link. By following these links, you can visit every page. On all but the initial page, there are Prev and Up links. Clicking on the Prev link will take you to the "previous" page in the document. Clicking on the Up link will take you to the relevant index page.

OS Conventions

In most cases where Microsoft Windows uses the Control key, Apple's Mac OS X uses the Command key. To help remind you of this fact, we use the wording "Ctrl (Cmd)".



What is Protege?

Protege is a free, open-source platform that provides a growing user community with a suite of tools to construct domain models and knowledge-based applications with ontologies. At its core, Protege implements a rich set of knowledge-modeling structures and actions that support the creation, visualization, and manipulation of ontologies in various representation formats. Protege can be customized to provide domain-friendly support for creating knowledge models and entering data. Further, Protege can be extended by way of a plug-in architecture and a Java-based Application Programming Interface (API) for building knowledge-based tools and applications.

An ontology describes the concepts and relationships that are important in a particular domain, providing a vocabulary for that domain as well as a computerized specification of the meaning of terms used in the vocabulary. Ontologies range from taxonomies and classifications, database schemas, to fully axiomatized theories. In recent years, ontologies have been adopted in many business and scientific communities as a way to share, reuse, and process domain knowledge. Ontologies are now central to many applications such as scientific knowledge portals, information management and integration systems, electronic commerce, and semantic web services.

The main assumption of Protege is that knowledge-based systems are usually very expensive to build and maintain. For example, the expectation is that knowledge-based system development is a team effort, including both developers and domain experts who may have less familiarity with computer software. Protege is designed to guide developers and domain experts through the process of system development. Protege is designed to allow developers to reuse domain ontologies and problem-solving methods, thereby shortening the time needed for development and program maintenance. Several applications can use the same domain ontology to solve different problems, and the same problem-solving method can be used with different ontologies. For more information about building knowledge-based systems and the Protege approach, see Planning a Protege-Frames Project.

The Protege platform supports two main ways of modeling ontologies:

  • The Protege-Frames editor enables users to build and populate ontologies that are frame-based, in accordance with the Open Knowledge Base Connectivity (OKBC) protocol. Specifically, it provides a full-fledged user interface and knowledge server to support users in constructing and storing frame-based domain ontologies, customizing data entry forms, and entering instance data.

  • The Protege-OWL editor enables users to build ontologies for the Semantic Web, in particular in the W3C's Web Ontology Language (OWL).

    Note: This User's Guide describes how to use the Protege-Frames interface. If you wish to use the OWL extension to Protege, see the CO-ODE website for documentation and examples.



What is Protege-Frames?

Note: This User's Guide describes how to use the Protege-Frames interface. If you wish to use the OWL extension to Protege, see the CO-ODE website for documentation and examples.

The Protege-Frames editor enables users to build and populate ontologies that are frame-based, using a knowledge model which is compatible with the Open Knowledge Base Connectivity (OKBC) protocol. In this model, an ontology consists of:

  • a set of classes, organized in a subsumption hierarchy to represent a domain's salient concepts

  • a set of slots, associated to classes to describe their properties and relationships

  • a set of instances of those classes - individual exemplars of the concepts that hold specific values for their properties

Features of Protege-Frames include:

  • A wide set of user interface elements that can be customized to enable users to model knowledge and enter data in domain-friendly forms.

  • A plug-in architecture that can be extended with custom-designed elements, such as:

    • graphical components (e.g., graphs and tables)

    • media (e.g., sound, images, and video)

    • various storage formats (e.g., RDF, XML, HTML, and database back-ends)

  • additional support tools (e.g., for ontology management, ontology visualization, inference and reasoning, etc.)

  • A Java-based Application Programming Interface (API) that makes it possible for plug-ins and other applications to access, use, and display ontologies created with Protege-Frames.



Planning a Protege-Frames Project

The development of a successful knowledge-based system, built with Protege-Frames, is more of an art than a science. Nonetheless, we can suggest a standard pattern of use that new users should follow to avoid some possible problems of systems development. Protege-Frames is designed to support iterative development, where there are cycles of revision to the ontologies and other components of the knowledge-based system.

Developers should not expect to "complete" ontology development without considering other aspects of the process. In particular, Knowledge Acquisition (KA) is critical to any knowledge-based system. For the development of a successful Protege-Frames project, we would recommend the following steps:

  1. Plan for the application and expected uses of the knowledge base. This usually means working with domain experts that have a set of problems that could be solved with knowledge-base technology.

  2. Build an initial small ontology of classes and slots.

  3. When you have built this ontology (and later, when you have extended it or opened it from a file), you can directly view forms for entering instance knowledge into the ontology, because Protege-Frames generates initial forms "on the fly", in its role as a KA-tool generator.

  4. You use these forms for acquiring slot values of your test instances. At this point, it is usually appropriate to show the ontology and the filled-out instance forms to the domain experts or your expected users. This inevitably leads to a set of revisions, both to the ontology (2.) and to the forms (5.). Note that ontology modifications can be expensive; some changes could necessitate rebuilding some or all of the knowledge base.

  5. Customize the forms to a refined knowledge-acquisition tool, as explained in the Forms strand. While constructing this customized version of the KA-subtool, further design problems in the original ontology may become apparent. If necessary, revise the ontology and repeat at 4.

  6. With your domain experts, build a somewhat larger knowledge-base that can be tested with your application or problem-solving method.

  7. Test the full application with your end-users. This step can lead to further revisions to the ontology and the KA-subtool.

The picture below shows the typical workflow for a Protege-Frames project. The large arrowheads indicate the forward progression through the process, while the small arrowheads show places where revisions are usually necessary (either to the ontology or the knowledge-acquisition tool).

typical workflow for a Protege-Frames project

At the heart of a successful Protege-Frames project is the design of the class and slot structure of the ontology. In particular, the model you use in building your ontology must balance the needs of the domain expert when building a knowledge base (at knowledge-acquisition time) against the requirements of your problem-solving method or application (at run-time). Hopefully, these are not too contradictory! Ontology developers should therefore both:

  • Model the domain with a set of problems and a problem-solving method in mind.

  • Design the ontology so that it can be used to generate and customize an appropriate KA-tool for a specific set of users.

A simple problem, taken from the Newspaper Example, could be finding all advertisements that are more expensive than some threshold. To handle this problem, one should create an "advertisements" class that includes prices and publication dates. Spreading this information across all publication issues would make it more difficult for the problem-solver to access all instances of advertisements and their prices.



A Newspaper Example

Throughout this guide, we provide examples and screenshots from a fictitious "newspaper" example. We designed this example to be intuitive. This example is distributed as part of the Protege installation and is located in the examples directory in the Protege application directory.

There are a variety of possible uses for a knowledge base of newspaper data. Our example knowledge base includes:

  • a list of all published articles, indicating when published, in what section, etc.

  • information about standard sections of the newspaper (Business, Lifestyle, Sports, etc.)

  • employee information

  • advertising information

There are a variety of applications that might use information in this knowledge base. For example, one could build:

  • a system for retrieving, organizing and answering queries about published articles

  • a system for analyzing advertisement revenues or pricing

  • a system for reviewing the organization of the employees, making sure that reporters are balanced appropriately among editors and that each section of the newspaper has a responsible editor

As this is an artificial example, we have not built any of these applications, but we hope this example will give a flavor of how knowledge bases, ontologies, and knowledge-acquisition tools can be designed with Protege-Frames.



Extending Protege

Protege includes an application programmer interface, the Protege API, that allows a Java programmer to extend the Protege system. The API provides the Java packages and classes for complex operations such as creating new widgets:

  • Tab widget - a user interface tab that appears in the main Protege window alongside system tabs such as the Classes tab. The Queries tab is an example of a tab-widget plug-in.

  • Slot widget - appears on a form and is used to view and acquire a value for a slot at an instance. The TextFieldWidget, used for acquiring and displaying strings, is an example of a slot-widget plug-in.

  • Back-end - specifies the mechanism that Protege will use for storage (either as text or in a database). The RDF back-end is an example of a back-end plug-in.

  • Createproject - takes a file in a source format produced by another program and creates the closest possible "natural" Protege knowledge-base.

  • Export - provides an extensible mechanism for exporting Protege knowledge-bases in a variety of formats, both file and database. This plug-in type is related to back-end plug-ins, but is much easier to develop and serves a somewhat different need.

  • Project - allows manipulation of a Protege project and Protege's project UI.

API documentation is available at:

http://protege.stanford.edu/doc/pdk/index.html

Starting with Protege 3.2 beta, you can programmatically add your own configuration tab to the project configuration panel. The tab will also appear in the Configure dialog box. Instructions for this can be found on the Protege Wiki at:

http://protege.cim3.net/cgi-bin/wiki.pl?AddingUserDefinedProjectConfigPanel




Projects

This section of the Protege-Frames User's Guide covers the concepts of understanding, creating, and using Protege-Frames projects.

Note: Before you create and use projects, you should be confident with the basic Protege-Frames interface.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


Creating a Project

There are two ways to create a new Protege project:

  • create a completely new project

  • create a Protege-Frames project from existing text files or from a table in a JDBC database

To create a project:

  1. Create a new project:

    • create a project on startup by selecting Create New Project from the start-up dialog

    • or create a new project from the Protege window by selecting File | Create New, clicking the New Project projects_project.new button, or entering Ctrl-N (Cmd-N). The Create New Project dialog box will open.

      Create New Project dialog
  2. The following project types support the Protege-Frames format:

    • Protege Files

    • Protege Database

    • Experimental XML Normally, unless you have a need for a specific structure (e.g., for exporting files), you would select Protege Files. If you wish to help the development of the XML backend, you can select Experimental XML.

  3. To import a project from existing files, select Create from Existing Sources. You can create a project from existing files in Protege Files or Protege Database format.

    Create from Existing Sources checkbox (checked)

    To create a new, empty Protege-Frames project, leave this unchecked (the default).

  4. Click Finish. The Protege-Frames window will open and the standard tabs will become visible. An initialized knowledge base will be created, containing the system classes rooted in :THING. No instances will be created. You can now structure your project by creating your classes and slots. (See Creating a New Class and Creating a Slot for more information.)

  5. To save the project to disk, select Save from the File menu.

  6. Enter a name for your project in the Project line of the dialog box. This is the name of your project (.pprj) file. Protege-Frames also creates internal files for its own use. By default, these files are given the same name, with a different extension.



Opening a Project

You can open an existing Protege-Frames project when you start Protege, from within the Protege window, or from a list of recent projects. No matter what format your project is in, you can create, open, and save your projects directly via the .pprj file. You do not need to name or access other file types unless you wish to build a project. To save the open project to disk after you have edited it, select Save Project from the File menu.

Opening a Project When You Start Protege

To open an existing project when you first start Protege:

  1. Start Protege. A dialog box will appear, allowing you to create a new project, open a recent project, or get help.

    Welcome to Protege dialog
  2. To open a project in the list of Recently Accessed Projects, highlight its name and click OK.

  3. To open a project that is not listed, click Open Existing Project. Locate the .pprj project you wish to open and click OK.

    Open Project dialog

Opening a Project within Protege

  1. Select Open Project... from the File menu, click the Open Project (projects_project.open) button or type Ctrl-O (Cmd-O). A Project dialog box will appear, allowing you to select the project.

  2. Select the .pprj project you wish to open.

  3. Click OK.

For Windows systems, you can also open a project by double-clicking on the .pprj file in Windows Explorer.

Opening a Recent Project within Protege

Protege maintains a list of recently opened projects. To open a recent project:

  1. Select Open Recent Project from the File menu.

  2. Select the project you want.



Importing a Project

Importing a project creates a new Protege-Frames project and .pprj file, based on files which contain your ontology information in one of the supported formats. When you import a project, a .pprj file is built, based on the information in your existing files.

To do this, create a new project and make sure that Create from Existing Sources is checked in the Create New Project dialog box.

Create from Existing Sources checkbox (checked)

You can import a project from the following project types:

  • Text Files: You can import a project from a pair of text files describing the class/slot (e.g., abc.pont) and instance (e.g., abc.pins) information. Importing a text project can be used, for example, for updating from Protege-Frames/Win to Protege.

  • Database Table: You can import a project from a single table in a JDBC database.

You can not import an XML file into Protege using the Protege XML backend.

Protege-Frames will generate default forms for all classes in the imported project.



Saving a Project

To save a Protege-Frames project:

  1. Select File | Save Project, click the Save Project (projects_project.save) button, or type Ctrl-S (Cmd-S).

  2. If this is a new project, you will be prompted for the name and location. Choose a name and location for the .pprj file; the other files will be created automatically. If you do not specify a location for the project, by default, the project will be saved in the directory where Protege is installed. If you are saving a database project, you will need to supply additional information; see Protege Database Format.

  3. Click OK.

For more information, see the following topics:



Converting a Project to Another Project Type

You can convert a Protege-Frames project from one backend format (project type) to another. You will see no difference in the Protege interface when you work with your project, but all changes to to the project are stored in the new format. See Understanding Project Types for more information.

You can convert between the following Protege-Frames formats:

  • Protege Files (the default) creates two text files in Protege-Frames format. See Protege Files.

  • Protege Database creates the project as a table in a JDBC database. To do this, you must have a database installed and configured on your system. See Protege Database Format.

  • Experimental XML saves the project in XML format. See Experimental XML Format.

Note: You can also convert a Protege-Frames file to Protege-OWL format and vice versa. In this case, however, you will see a significant difference, because of the differences between the Protege-Frames and Protege-OWL capabilities and interfaces.

To convert a Protege-Frames file to a different format:

  1. Select File | Convert Project to Format...

  2. Select the format you want in the Select Format dialog box.

    Select Format dialog
  3. Fill out any required information when requested; see the specific formats for more information.

  4. Click OK.



Exporting a Project

Exporting a project creates a snapshot of the current version in the selected format, while leaving the Protege-Frames project itself unchanged.

To export a project:

  1. Select File | Export Project... and select the desired format from the cascading menu.

  2. Fill out any necessary information:

    • For CLIPS files, select the name and location for your files. See Exporting to CLIPS for more information.

    • For HTML format, fill in the Export HTML Configuration Options. See Saving an HTML View for more information.

  3. Click OK.



Renaming a Project

To save a Protege project under a new name:

  1. Select File | Save Project As....

  2. Navigate to the location where you want to save the file and enter the new name for the .pprj file in the Project line of the window.

  3. By default, the new names are entered automatically for any additional files in the project (for example, .pont and .pins files for standard text format). However, you can choose to give a different name to these files. You might want to do this, for example, if you are creating a new .pprj file which still accesses the old .pont and .pins file names. In this case, enter the names you want for the .pont and .pins files.

  4. Click OK.

For more information, see the following topics:



Setting Preferences

You can set some basic preferences for the Protege-Frames interface, using the Preferences dialog box.

Preferences dialog

Note: You can set additional configuration options by choosing Project | Configuration. Preferences apply to all Protege projects, while Configuration applies to the current project.

To use the Preferences dialog:

  1. Select File Preferences...

  2. You can set the following preferences:

    • Show Welcome Dialog on Start-up: You can choose whether or not to see the Welcome dialog box each time you start Protege-Frames. This dialog asks you to open, import, or create a new project. If you choose to disable the Welcome dialog box, you can perform these actions from the menus.

    • Capitalize Slot Widget Names: This controls an aspect of the Forms interface. To distinguish slot names from class names, a recommended convention is to make internal slot names lowercase. If this option is selected, Protege-Frames automatically capitalizes the names of slots on the forms it creates.

    • User Name: The user name is shown on sticky notes. The default name is the login name you use to access your computer system. If you wish to customize the displayed name, select Use Specified Name and enter your desired name in the entry box.

  3. Once you have set the Preferences to your satisfaction, click OK to implement your changes.



Archiving a Project

You can archive the current version of a project. Archiving saves a time-stamped copy of the project in a subfolder of your project folder. You can revert to a previously archived project at any time. This provides a form of version control for Protege.

To archive the current version of a project:

  1. Select Project | Archive or click the Archive Current Version (projects_project.archive) button near the top of the Protege window.

  2. If you wish, enter a comment:

    Archive Project dialog
  3. Click OK.



Reverting to an Archived Version of a Project

You can revert to any archived version of your project.

  1. Select Project | Revert to a Previous Version or click the Revert to a Previous Version (projects_project.revert) button at the top of the Protege window.

  2. All archived versions are displayed in the Revert to Archived Version dialog:

    Revert to Archived Version dialog
  3. Select the version you wish to revert to. If you wish, you can select to archive the current version before reverting.

  4. Click OK.



Including a Project

You can include an existing project in your current Protege-Frames project. An included project stays as a separate project which you can open and edit separately; edits made in the file for the included project will appear in the including project the next time it is loaded. This allows you to build a single large project from one or more smaller projects.

With an included project:

  • you can

    • view and refer to the frames of the included project, e.g., you can create a subclass of an included class or associate an included slot to a class

    • edit instances from the included project and create new instances for included classes

    • edit included forms

    • edit and override included slots

  • you cannot

    • make edits that would affect classes in the included project, e.g., you cannot edit or delete an included class

Including a project

To include a project into an existing Protege-Frames project:

  1. Select Manage Included Projects from the Project menu. The current project, and its included projects, if any, will be shown in a project hierarchy.

  2. Click the Add Project (projects_project.add) button, at the top right of the Manage Included Projects dialog box.

  3. In the Select Project dialog box, browse to the location of the project you want to include and select the .pprj file of the desired project.

  4. Click Open.

  5. The included project will be shown in the dialog box, with "(not loaded)" after it to indicate that the actual inclusion process has not yet taken place. If the included project already includes any other projects, they will also be added to the hierarchy.

    Manage Included Projects dialog
  6. To include additional projects, repeat steps 2-6.

  7. Click OK. You will see a warning:

    save/reload warning dialog
  8. Click OK.

  9. If there are any classes that are duplicated in your project, you will see a warning:

    duplicated class warning dialog
  10. Click Close to continue. Protege-Frames will include your files at this time.

The project is included into your current project. Frames in the included project appear with pale icons (e.g., classes_class.pale, classes_class.abstract.pale) to show they cannot be edited.

Included Projects and Duplicate Class Names

If an included project defines a class that is already defined in the including project (i.e., has the same name), then one of the duplicate class definitions is ignored. (Usually the included definition is used, but there is no hard rule about this.) A warning is given at load time (Duplicate class definition was ignored") and the project is loaded. All references to the class work from both projects, because the reference mechanism uses the class name.

This feature allows you to exchange the included project - for example, with a different version. Ignoring duplicate classes also allows for the situation where one project (A) is included in two separate projects (B and C), which in turn are included in a final larger project (D):

multiple inclusion diagram



Activating an Included Project

In a project that has included projects, you can choose which project to activate. This restricts the frames you can view in the Protege-Frames window to the ones from the project you have chosen. Note that you are still working with your including project and you cannot make edits which would affect the included project.

  • Activating an included project hides all projects at the same or higher level as that project.

  • Activating the current (top-level) project shows all frames and forms in the entire project hierarchy.

To activate an included project:

  1. Select Manage Included Projects from the Project menu. The current project, and its included projects, if any, will be shown in a project hierarchy.

  2. Select the project that you want to activate.

  3. Click the Activate Selected Project button at the top right of the Manage Included Projects dialog box.

  4. Unless you are activating the top-level project, you will receive a warning:

    "Changing the active project..." warning dialog
  5. Click Yes to continue. Your project view will change.



Removing an Included Project

Removing an included project removes that project and any included projects it may have.

  1. Select Manage Included Projects from the Project menu. The current project, and its included projects, if any, will be shown in a project hierarchy.

  2. Highlight the project you want to remove.

  3. Click the Remove Project (projects_project.remove) button, at the top right of the Manage Included Projects dialog box.

  4. To remove additional projects, repeat steps 2-3.

  5. Click OK. You will see a warning:

    save/reload warning dialog
  6. Click OK to remove the project. You will see a number of warnings. Classes that were included from the project; any classes you created subordinate to those classes will still appear as subclasses of :UNDEFINED. For example:

    • Let's say you have a project A.

    • Then, you include project B in project A.

    • From project B, you get a class called X.

    • In project A, you make a bunch of subclasses of X.

    • Then, you remove project B from project A.

    • Protege keeps all the subclasses of X that were created in project A, but they are now subclasses of a class called :UNDEFINED, because when you removed included project B, you lost class X.



Merging an Included Project

Merging an included project takes all the frames of the included project and directly incorporates them into the current project. After this, you can edit these frames just like the other frames in your project.

After a merge, the dynamic link to the included project has been broken and any further changes to the project file for the included project will not appear in the current project. The included project no longer appears in the Manage Included Projects dialog box.

To merge an included project:

  1. Select Project | Merge Included Projects.

  2. In the Merge Included Projects dialog box, select the project you want to merge.

    Merge Included Projects dialog
  3. Click OK.



Configuring a Project

You can change the project configuration using the project Configure dialog box. This dialog box allows you to customize your project window.

Note: You can set additional preferences by choosing File | Preferences. Preferences apply to all Protege projects, while Configuration applies to the current project.

Configuring the Project Tab Widgets

To configure which tabs are displayed:

  1. Select Configure... from the Project menu. The Configure dialog box will open.

    Configure dialog, Tab widgets tab
  2. Make sure that Tab Widgets is selected. It will show the tabs that are available for your project. Marked tabs are visible; others are hidden.

    • By default, a project displays the following tabs: Clses, Slot, Forms, Instances, and Queries.

    • A number of other tabs are available, such as the KAToolTab (Knowledge Acquisition Tool) and the ClsesandInstancesTab.

    • You may see additional tabs for plug-ins you have installed.

    • If you have installed OWL capability, but are not using an OWL project, you will see a list of possible tabs that are not loaded.

  3. To hide a tab, remove the mark from in front of it. For example, if you are giving your project to someone to let them enter instances, you might wish to hide the other tabs. You can also hide the current tab by selecting Window | Close Current View from the Protege project window.

  4. If you wish to display a tab, add a mark in front of it. For example, you might want to display the Classes and Instances tab for a unified view of your classes and instances.

  5. To change the order in which the tabs appear in the Protege project window, highlight the tab you want to move and use the up (projects_object.move_up) and down (projects_object.move_down) icons to move the tab up or down in the list. A tab's position (left to right) in the Protege window is correlated with its position (top to bottom) in the Configure dialog. For example, to have the Classes and Instances tab appear at the far left of the Protege window, move it to the top of the list in the Configure dialog.

  6. Click OK to close the dialog box and see your new configuration.

Configuring Project Options

To change project options:

  1. Select Project | Configure...

  2. Select the Options tab in the Configure dialog box.

    Configure dialog, Options tab
  3. This tab provides the following options:

    • Display Hidden Frames: Allows you to toggle whether or not you can see any frames you have hidden. (You can hide a frame by selecting it, clicking the right mouse button, and choosing Hide from the menu.)

    • Display Confirmation Dialog on 'Remove' Operations: Allows you to add a warning when you perform a remove, such as removing a slot from a class. Recall that when you remove a slot, the slot remains in the project, but is simply removed from the current class. Regardless of the setting in this dialog box, you always receive a warning when you delete a frame from the project.

    • Allow Knowledge-Base Changes: Deselecting this item locks the knowledge base so that it cannot be changed by the viewer.

    • Update Modification Slots: Four system slots (attached to the :INSTANCE-ANNOTATION system class) keep track of the creator, modifier, and timestamps for any frame modification. The system will record this information automatically if you put these slots on the instance (attach them as template slots to the class) and check the box.

    • Enable Journaling: Allows you to keep a record of all the changes that you make to a project. Changes are stored in an ASCII (text) file, with one line for each change you make. The journaling file is created in the same directory as the project, with a .pjrn extension. It can be read using any text editor.

    • Capitalize Slot Widget Labels: This controls an aspect of the Forms interface. To distinguish slot names from class names, a recommended convention is to make internal slot names lowercase. If you use this convention and still want the names on your forms to be capitalized, select this option.

    • Use Tabbed Forms for Multi-Type Instances: Controls the display of the Instance Editor for multi-type instances.

  4. If you wish to select an option, click to mark it.

  5. If you wish to remove an option, click to remove the mark.

  6. Click OK to close the dialog box and see your new configuration.



Project Metrics

Project metrics provide information about the number of frames in the current project. This information can be useful in analyzing performance issues.

Viewing Project Metrics

To view project metrics, select Project | Metrics:

Metrics dialog

Scalability and Tuning

Protege-Frames has successfully handled "simulated" knowledge bases (generated by a program) as large as 5M frames (classes & instances). Actual knowledge bases as large as 100K frames give acceptable UI performance if supported by the database backend.

For file-based projects, the primary impact of increasing the number of frames is that the project takes longer to load (load time is roughly proportional to the number of frames). For database projects, slow operations include expanding a class with a lot of direct subclasses and displaying the instances for a class with many instances.

Aside from limiting the size of the knowledge base, the most important thing to tune is the heap size. For more information, see Scalability and Tuning.



Using Undo

You can undo your actions using the Undo command on the Edit menu or by clicking the Undo (projects_undo) button at the top of the Protege-Frames window.

To redo a command, use Edit | Redo or click the Redo (projects_redo) button.

Protege-Frames allows multiple levels of undo and redo.

When you use Undo, your project will be restored to its previous state. In most cases, you will not see any difference. However, while Protege-Frames always creates a state that is logically identical to the initial state you were in, in some cases internal state will be represented in a slightly different way. For example, classes or instances might appear in a different order in the .pont or .pins files.

When you use certain advanced features, you may see a minor difference in the user interface. For example, if you are using the Graph Widget, some elements on the graph may appear in a slightly different location. The project has not been affected in any other way.




Project Types

This section of the User's Guide covers the concepts of understanding, creating, and using Protege-Frames project types.

Note: Before you create and use project types, you should be confident with the basic Protege-Frames interface. You should also be comfortable with Protege-Frames projects.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


Understanding Project Types

Every Protege-Frames project stores two kinds of information:

  • Protege-specific information, stored in a .pprj (Protégé project) file

  • Information about the project ontology (classes, slots, etc.) and project instances, stored in one or more additional files.

No matter which format you choose, the information specific to the Protege-Frames interface is saved in a .pprj file. You can create, open, and save your projects directly via the .pprj file. You do not need to name or access any other files unless you wish to import a project.

Choosing the project type, or backend, determines how the project ontology and instances are stored. Protege-Frames supports three file formats:

  • Protege Files (the default) creates two text files in Protege-Frames format. See Protege Files.

  • Protege Database creates the project as a table in a JDBC database. To do this, you must have a database installed and configured on your system. See Protege Database Format.

  • Experimental XML saves the project in XML format. See Experimental XML Format.

Normally, for a Protege-Frames project, you would select Protege Files or Experimental XML. If you have installed support for additional backends, e.g., if you selected BASIC + OWL as your installation, you will see additional file formats.

If you decide you wish to change your project type, e.g., from Protege Files to Experimental XML, you can convert your project. This changes the format of the backend, while leaving the .pprj file unchanged. Protege still uses the .pprj file to access the project. You should not see a difference within Protege.

You can also export a project to CLIPS or HTML formats. In this case, the project itself stays the same, but a snapshot of the current version is created in the selected format.



Protege Files

You can save the ontology-related information for a Protege-Frames project in Protege Files format, a CLIPS-based text format that has been the default file format for Protege-Frames for many years.

In a Protege project, information specific to the Protege user interface is stored in a dedicated Protege project (.pprj) file. Internally, Protege-Frames maintains two files in addition to the .pprj file; these files contain further information about the ontology and instances of the project. When you open a .pprj file, Protege-Frames automatically loads these files. By default, the additional files are saved in the following format:

  • A text file with the extension pont (Protege ontology) contains the class and slot information.

  • A text file the extension pins (Protege instances) contains the instance information.

See Understanding Project Types for more information about project types.

Importing Protege Files

If you have an ontology that is stored in two text files, but do not have a .pprj file, you can import those files and create a new project file. To create a Protege-Frames project from text files:

  1. Select New Project from the File menu. The Create New Project dialog box will open.

    Create New Project dialog, "Protege Files ..." selected
  2. To import a project from text files, select Create from Existing Sources.

    Create from Existing Sources checkbox (checked)
  3. Select Protege Files as the project type.

  4. Click Next.

  5. Locate the files you want to use as the ontology (.pont) and instances (.pins) files:

    Create New Project dialog
  6. If you are finished, click Finish.

  7. If you wish to include any existing Protege-Frames projects in the project you are building, click Next. Then click the Add (all_object.add) button, locate the project you want to include, and click OK. You can include multiple projects by repeating this step. Click Finish when you are done including.

Protege-Frames will create a project file from your class and instance information. To save your project and give it a name, select Save from the Project menu.

Converting a Protege-Frames Project to Protege Files

  1. Select File | Convert Project to Format...

  2. Select Protege Files in the Select Format dialog box.

    Select Format dialog, "Protege Files ..." selected
  3. Click OK.



Protege Database Format

You can save the ontology-related information for a Protege-Frames project as a single table in a JDBC database. Note that this is a "flat" table that does not use any special database constructs to represent the information. Information specific to the Protege-Frames user interface is stored in a separate Protege project (.pprj) file. See Understanding Project Types for more information about these files.

Requirements

Before you create a Protege Database project, you will need to do the following:

  • Make sure you have a database program installed on your system.

  • Make sure you have a JDBC driver that is compatible with your database and the version of the Java VM that you are using.

    • If you are using Microsoft Access, you don't need to acquire a JDBC driver; it's already bundled into the JDK. (not recommended option due to slow performance)

    • Otherwise, acquire a driver and rename it to "driver.jar" (or "driver1.jar" or "driver2.jar", if you have several). Add this driver to the Protege installation directory (not the plugins directory).

You can store multiple projects in the same database by giving their tables different names.

Note: When a project is saved in a JDBC database, backend changes to the database (for example, changes to slots, classes, and instances) are committed as soon as they are made. However, changes to the User Interface (stored in the .pprj file) are not committed until you save the project, for example by clicking Save.

Creating or Importing a Database Project

  1. Select New Project from the File menu. The Create New Project dialog box will open.

    Create New Project dialog box, "Protege Database" selected
  2. To import a project from existing files, select Create from Existing Sources. To create a new, empty Protege-Frames project, leave this blank (the default).

    Create from Existing Sources checkbox (checked)
  3. Select Protege Database as the project type.

  4. Click Next.

  5. A Protege Database dialog box will be displayed.

    Protege Database dialog box
  6. Enter the class name of your JDBC driver in the JDBC Driver line of the dialog box. The class name can be found in the documentation provided with your particular driver. (For Microsoft Access, use: sun.jdbc.odbc.JdbcOdbcDriver)

  7. Enter the URL for your database in the JDBC URL line.

    Note: For Microsoft Access, navigate to the "ODBC Data Source Administrator" dialog via the Control Panel and add a User DSN for your Access database. If you're unfamiliar with how to find this dialog or how to add a User DSN, please refer to Microsoft Windows Help. Your URL will look like: jdbc:odbc:<User DSN name>

  8. Enter the name for the database table where you will be storing the information. If you are importing a file, enter the name of the table that contains the information you wish to import. This field is required.

  9. If your database requires a username and/or password, enter these in the appropriate lines of the dialog box.

  10. Click Finish.

To save your project and give it a name, select Save from the File menu. See Saving a Project for more information.

Converting a Protege-Frames Project to a Database

  1. Select File | Convert Project to Format...

  2. Select Protege Database in the Select Format dialog box.

    Select Format dialog, "Protege Database" selected
  3. In the Protege Database dialog box, fill out the required information, as described above.



Experimental XML Format

Currently, the XML backend for Protege-Frames is still under development. The intent is to eventually make this the default backend for Protege-Frames, once it has become stable and supports the full feature set.

You can create a new XML project by selecting File | Create Project and then selecting Experimental XML File in the Create New Project dialog:

Create New Project, "Experimental ..." selected

You can also convert an existing project to XML by selecting File | Convert Project and then selecting Experimental XML File in the Convert Project dialog box.

Note: The XML backend uses its own Schema and will not let you import an arbitrary XML file into Protege.

The first time you save an XML project, Protege creates the following files:

  • a .pprj file, which contains Protege-specific UI information

  • a .xml file, which contains XML-encoded ontology information for the knowledge base\

Protege-Frames uses a single XML Schema file that is optimized to work with the Protege model. All information in the knowledge base is treated as "instances". The format of these instances, described in the Schema file, is designed to be simple, readable, and easily processible by XSLT in straightforward ways. The Schema is available at:

http://protege.stanford.edu/xml/schema/protege.xsd

Feedback on the Schema is strongly solicited. The schema should not be considered fixed at this point and users should not rely on this backend functioning correctly or upon the schema remaining fixed from build to build. We do encourage you to try it out and report any problems that you see.

Note: This backend cannot be used to generate XML Schema files. For example, it does not turn classes in Protege-Frames into XML Schema complex types. An export mechanism that does this may eventually be developed separately.



Protege-OWL

Note: This User's Guide describes how to use the Protege-Frames interface. If you wish to use the OWL extension to Protege, see the CO-ODE website for documentation and examples.

In addition to the Protege-Frames editor, which these help topics document, Protege supplies a separate Protege-OWL editor, which enables users to build ontologies for the Semantic Web, in particular in the W3C's Web Ontology Language (OWL). See the Protege-OWL overview for a description of Protege-OWL and see the CO-ODE website for documentation, sample ontologies, and additional OWL plug-ins.

"An OWL ontology may include descriptions of classes, properties, and their instances. Given such an ontology, the OWL formal semantics specifies how to derive its logical consequences, i.e., facts not literally present in the ontology, but entailed by the semantics. These entailments may be based on a single document or multiple distributed documents that have been combined using defined OWL mechanisms." (see the OWL Web Ontology Language Guide)

Although Protege-OWL uses the Protege engine to display and manage projects, the logic and user interface of Protege-OWL and Protege-Frames are substantially different. You should determine which model suits your project and do all your project creation and editing in either Protege-OWL or Protege-Frames, rather than attempting to switch between modes. Although there is substantial overlap between the two models, both Protege-Frames and Protege-OWL have features which are not supported by the other.

Following are some of the differences between Protege-Frames and Protege-OWL.

  • Protege-Frames:

    • primarily object-oriented (frame-based) with classes and slots

    • builds classes and adds or creates attributes

    • supports frames-specific constructs, such as Abstract classes

  • Protege-OWL:

    • based on Description Logic

    • defines classes by their logical characteristics

    • supports advanced OWL features

To install Protege-OWL:

  1. Download the Full version of Protege from the Protege website.

  2. Once the installer has downloaded, double-click to start the installation.

  3. During the installation wizard, select "Basic + OWL". This will install Protege, the OWL Plugin, and selected other plugins that are suited for OWL.

    Choose Components dialog

If your installation has been successful, you should see the entries "OWL Files" and "OWL Database" in the listing of project formats at Protege's start-up screen.

If you do not see a Project Type called OWL Files when you attempt to create a new project, there may have been something wrong with the way Protege was installed.

  1. Check that a folder named plugins/edu.stanford.smi.protegex.owl is present in your Protege installation directory. Make sure that this folder is not empty (you should see some .jar files and other things). If the folder and its contents are not present, they can be downloaded and unzipped into the plugins folder by hand.

  2. If you cannot get OWL projects to load, try re-installing Protege. Make sure that you select Basic+OWL as your installation type.

  3. Finally, refer to the OWL Plugin web pages to see if any changes have been made to the installation or running process.



RDF(S) Support in Protege

Protege allows you to create and edit Resource Description Framework (RDF) schema and instance data. (For more information about RDF, see http://www.w3.org/RDF.) Protege provides the following types of RDF (Schema) support:

Protege-OWL and RDF(S)

OWL is an extension of RDF, so any RDF project can also be regarded as an OWL project which simply does not use the advanced OWL features. Although the focus of the OWL Plugin is on OWL ontologies, it can also be used to edit RDF ontologies and RDF Schema files or databases. However, we don't recommend mixing pure RDF(S) elements with OWL elements in OWL ontologies.

The following steps show how to:

These steps address the file format only; for additional information, see the Protege-OWL resources page.

Please note the following limitations:

  • Although you may see the full OWL interface when editing an RDF(S) project, it is your responsibility to avoid using OWL-specific elements in your project.

  • Currently, when you go to import (open from an existing) RDF(S) file, there is no separate RDF format option. You need to select OWL Files (.owl or .rdf) and later select RDF Schema or Pure RDF Schema without OWL.

  • When you save your RDF(S) project, the interface currently does not save separate RDFS and RDF files; instead, it combines everything in a single file that is given a .owl extension. This may be fixed in future versions.

Note that the use of RDF in Protege-OWL is not necessarily compatible with the RDF Backend for Protege-Frames, which was initially developed prior to the existence of OWL. Overall, the RDF support in Protege-OWL provides cleaner semantics and a richer set of modeling elements.

Importing or Creating an RDF(S) Project with Protege-OWL

  1. Create a new project, either by selecting Create New Project from the start-up dialog or File | Create New in the Protege window.

  2. Select OWL Files (.owl or .rdf) as the Project Type.

    Create New Project dialog, "OWL Files ..." selected
  3. If you are importing an existing file, make sure to check Create from Existing Sources, located at the top of the dialog box. If you are creating a new RDF file, leave it unchecked (default).

    Create from Existing Sources checkbox (checked)
  4. Click Next.

  5. Specify any common ontologies to use and click Next.

  6. Specify your default RDF namespace and click Next.

  7. You can now choose your language profile. For an RDF project, select RDF Schema or Pure RDF Schema without OWL.

    Create New Project dialog, "Pure RDF ..." selected

Activating RDF(S) Support in an OWL Project

To activate RDF(S) support in an existing Protege-OWL project:

  1. Select the OWL | Preferences menu option.

  2. In the OWL Preferences dialog, activate an RDF profile by changing the Language Profile to RDF Schema or Pure RDF Schema without OWL.

    OWL Preferences dialog, General tab, "Pure RDF ..." selected
  3. Click Close.

  4. The Protege-OWL window will display buttons to create pure RDFS classes and RDF properties. In particular:

  • If you chose RDF Schema, there will be an additional button on the Properties tab, which can be used to create RDF properties:

    Property tab with extra buttons

    You can also decide whether new classes shall be RDFS classes or OWL classes using "Create class using metaclass", or you can make rdfs:Class the default metaclass (both with a right-click on the classes tree in the OWLClasses tab).

  • If you chose Pure RDF Schema without OWL, the buttons on the Properties tab will be restricted to RDF properties:

    Property tab

RDF Backend for Protege-Frames

You can use Protege-Frames to design RDF schema and create the corresponding instance data. You can also view and edit your existing RDF files in Protege-Frames. The RDF backend for Protege-Frames was developed prior to the development of the Protege OWL interface and is not necessarily compatible with Protege-OWL. With the advent of Protege-OWL, it is no longer under active development, but some support is still available.

Note: This backend is actually an RDFS/RDF backend which saves a schema file (RDFS) and an instance file (RDF).

This interface has a number of limitations:

  • The backend uses the standard Protege-Frames GUI, which is not RDF(S) -specific. It is not clear how you can enter RDF specific elements. You see exactly the same GUI as for "normal" Protege-Frames.

  • Only the RDF Schema namespace (http://www.w3.org/TR/1999/PR-rdf-schema-19990303) is supported when saving (on import, the new namespace is also recognized).

  • Namespace abbreviations cannot be edited (they are automatically generated).

  • rdfs:seeAlso, rdfs:isDefinedBy, rdfs:label, container, and reified statements are not supported.

  • Multiple types for a single resource were not supported, prior to the 3.3 release.

  • You cannot make changes to the standard meta classes. (i.e., rdf:Resource, rdf:Property, rdfs:Class, etc.)

  • XML Schema data types are not recognized as rdfs:Literal (but it is unclear that they should be).

Additional RDF Plug-ins

The Protege community has written additional RDF plug-ins to support other RDF frameworks:



Using the Protege-Frames RDF Backend

Although it is recommended to use Protege-OWL for RDF(S) projects, Protege-Frames also has an RDF backend you can use for Protege-Frames projects. The backend does not work with Protege-OWL.

Creating an RDF(S) Project with the Protege-Frames Backend

  1. Create a new project, either by selecting Create New Project from the start-up dialog or File | Create New in the Protege window.

  2. Select Resource Description Framework (RDF) as the Project Type.

  3. If you are importing an existing file, make sure to check Create from Existing Sources, located at the top of the dialog box. If you are creating a new RDF file, leave it unchecked (default).

    Create from Existing Sources checkbox (checked)
  4. To select or change the name or location of the .pprj file, enter the information you want in the Project line of the dialog box. Be sure to give the file a .pprj extension. If you do not specify a location for the project, by default, the project is saved in the directory where Protege is installed.

  5. Protege-Frames will create two files: one for the schema (classes and slots) and the other for the instances. By default, these use the name of the existing .pprj file. If you wish to change the name of the schema file, type the new name in the Classes file name line of the dialog box. Make sure to give the file an .rdfs extension.

  6. If you wish to change the name of the instances file, type the new name in the Instances file name line of the dialog box. Make sure to give the file an .rdf extension.

  7. Click OK.

Note: You should create new RDF classes as subclasses of rdfs:Resource.

Converting a Protege-Frames Project to RDF Format

Note: Subclasses of :THING from a non-RDF project will become subclasses of rdfs:Resource when you save as RDF.

After you have chosen your format, choose the name and location for the project, as follows:

  1. Select Convert to Format... from the File menu.

  2. Select Resource Description Framework (RDF) in the Select Format dialog box.

  3. When you have selected Resource Description Framework (RDF), the RDF dialog box will be displayed.

  4. To select or change the name or location of the .pprj file, enter the information you want in the Project line of the dialog box. Be sure to give the file a .pprj extension. To browse for a new location, click the Add (all_object.add) button. If you do not specify a location for the project, by default, the project is saved in the directory where Protege is installed.

  5. Protege-Frames will create two files: one for the schema (classes and slots) and the other for the instances. By default, these use the name of the existing .pprj file. If you wish to change the name of the schema file, type the new name in the Classes file name line of the dialog box. Make sure to give the file an .rdfs extension.

  6. If you wish to change the name of the instances file, type the new name in the Instances file name line of the dialog box. Make sure to give the file an .rdf extension.

  7. Click OK.



Exporting a Project to CLIPS

The current version of Protege-Frames uses CLIPS (C Language Integrated Production System) as its internal file format. However, in order to support advanced Protege features, the CLIPS generated by Protege-Frames may not conform to the CLIPS standard.

You can export a conformant CLIPS view of your Protege project. This will not affect the format of your project; it simply produces a CLIPS file that reflects the project's current state. Note, however, that because of the limitations of CLIPS with respect to Protege, you may lose information during exporting. This means, for example, that if you re-import an exported file, it may not fully recapture the original project.

To export your project to CLIPS text files:

  1. Select Export to Format from the File menu and select CLIPS from the submenu. The Clips Files to Export dialog box will be displayed.

    Clips Files to Export dialog box
  2. Enter the names for your classes and instances files. If you want to save the file(s) in a different location from the default, type the new location in the Output Directory line or click the Add (all_object.add) button to navigate to the desired location.

  3. Click OK. The CLIPS files will be created in the selected location.



Exporting a Project to HTML

You can generate an HTML view of a project. This allows you to view all or part of the class hierarchy and, optionally, all the instances. The output consists of an index page, which gives the class hierarchy for the project, including links to individual pages for each the class. Class pages include slot descriptions and optional instances. If instances are selected, they have individual pages and appear in the index hierarchy and under each class.

You can generate HTML pages for the entire project, or restrict the output to a subset of the project.

Generating HTML Output

To generate HTML for a project:

  1. Select File | Export to Format and select HTML from the submenu. The Export HTML Configuration Options dialog box will be displayed.

    Export HTML Configuration Options dialog box, General tab
  2. Change your settings, if desired. The effect of the different settings is described below. (We recommend changing the output directory; otherwise, the files will be saved directly in the Protege application directory.)

  3. Click OK.

Output Format

Using the default options produces the following HTML output:

  • an index page, showing the class hierarchy; the example shown is for a subset of the newspaper project, with Layout_info selected as the root class

    index page, "Layout_info" selected
  • a page for each class, showing its superclasses, subclasses, slots, and instances; the selection of classes is customizable

    page for "Section" Class
  • a page for each slot, showing its facets and their values; the list of slots is customizable

  • a page for each instance of the chosen classes; you can choose to omit instances from the HTML web

Output Options

The effect of the different settings is described below.

General Tab

  • Configuration Name: Allows you to name and save the current settings in the dialog box. A saved setting is added to the menu; you can reload it by selecting it from the menu. To save your settings, enter a name and then click Save. This will save the current state of the HTML Export Configuration Options dialog box. Note that if you do not click Save, your settings will not be changed. Also, if you make additional changes without clicking Save, they will not be saved.

  • Output Directory: (recommended) Allows you to choose a directory where the HTML files will be saved. By default, they are saved directly in the Protege application directory. You can type a pathname directly in the entry bar or use the button to navigate to the desired directory.

  • Root Classes: Restricts the HTML output to the chosen classes and all their subordinate classes. By default, the root class is :THING, which will generate output for all classes in the hierarchy, including hidden system classes. To restrict your view to a smaller section of the project, first delete the :THING class using the Delete Class button, then add one or more classes by clicking the Add Class button and selecting the classes you want in the dialog box. Any class you choose will be included in the tree, along with all of its subclasses.

  • Show Instances: Select this option to generate a page for each instance subordinate to your chosen root classes. If you do not wish to include instance pages in your output, deselect this option.

  • Sort Subclasses: Users can reorder classes manually in the Protege class tree and Protege will remember the order. To ensure that the project to be exported in alphabetical order, you'll need to use this option.

  • Use numbering for instance lists: Numbers the instance lists shown for each class.

Slots Tab

This tab allows you to select which slots are displayed. A selected slot is shown at each class where it occurs and a page is generated for that slot.

HTML Exports Configuration Options, Slots tab

Facets Tab

This tab allows you to select which slot facets are displayed. A selected facet, and its value, is shown for each slot where it appears.

HTML Exports Configuration Options, Facets tab

Customization Tab

This tab allows you to customize the header, footer, and stylesheet of the output. Note that the default style sheet displays the icons for you.

HTML Exports Configuration Options, Customization tab




Window Management

This section of the User's Guide covers the concepts of managing Protege-Frames windows.

Note: Before you create and use project types, you should be confident with the basic Protege-Frames interface. You should also be comfortable with Protege-Frames projects and project types.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


Cascading All Editor Windows

Protege allows you to have multiple free-standing Editor windows open at a time. Each Editor displays the information for a class, instance, or slot. In addition, you may choose to detach one or more of the Protege tabs. As you continue to work with a project, you may find that these windows get hidden, or that the screen gets cluttered.

To cascade all open Editor windows, select Windows | windows_cascade_windows Cascade Windows. All open Editor windows will be brought to the front and cascaded.



Closing All Windows

To close all open Editor windows, select the Window | Close All Windows menu item. All open Editor windows will be closed. The main Protege window will remain open. If you have detached a tab, it will be re-attached to the main window.



Detaching the Current View

You can detach one or more of the Protege-Frames tabs (Classes, Slots, etc.) and display them in free-standing windows. This allows you to view multiple tabs at the same time. For example, you could detach the Classes tab and display it in a separate window.

Detaching

To detach a tab:

  1. Click on the tab that you want to detach, making sure that it is the current view displayed in the Protege-Frames window.

  2. Select Window | Detach Current View. The tab you have selected will be detached.

Re-attaching

To restore a detached view and reincorporate it as a tab:

  1. Click on the standard Close button at the top right. Instead of closing the tab completely, this will close the detached window and redisplay the information as a tab.

To completely remove a tab from view, close the view using Window | Close Current View.



Closing the Current Tab

You can choose not to display a Protege-Frames tab by closing it. For example, if you do not wish to edit Forms, you might choose to close the Forms tab. You might also close a tab for a plugin you are not planning to use in this project. A closed tab will no longer display in your project, but will display in other Protege-Frames projects.

Closing

To close a tab:

  1. Click on the tab that you want to close, making sure that it is the current view displayed in the Protege-Frames window.

  2. Select Window | Close Current View. The selected tab will no longer display.

You can also close a tab using the Configure dialog box.

Restoring a Closed Tab

To restore a closed tab, you can use the Configure dialog box:

  1. Select Project | Configure....

  2. Make sure Tab Widgets is selected.

  3. To display a hidden tab, make sure the box is checked.

  4. Click OK.



Working With a Small Window

Protege-Frames displays a lot of information in many of its windows. In some cases, if your window is sized to fit on a smaller screen, not all of the information will appear. In this case, you might have trouble finding some of the following:

To view or enlarge these areas, try any of the following:

  • Enlarge the Protege window by dragging it. A hidden section will usually appear if the window becomes large enough.

  • Drag the slider bar to the position where the hidden section should be. For example, to view the Search Results pane, place the cursor over the slider bar at the right of the window, and drag the bar to the left. To view the Superclasses pane, Query Library pane, or Classes pane, place the cursor over the slider bar at the bottom left of the window and drag the bar up.

  • If your window is very small, you can toggle between two panes by clicking on the arrows on the slider bar. For example, to toggle between the Query Editor and the Query Library pane, click the up arrow on the slider bar to display only the Query Library pane; click the down arrow to display only the Query Editor.

You can also customize the distance between any of the panes, using the slider bars in the same way.



Synchronizing Class Trees

Often, when you switch between tabs in Protege-Frames, you wish to see the same class highlighted at either tab - or synchronized. You can synchronize between the Classes, Forms, and Instances tabs in two ways:

  • auto-synchronize (default)

  • synchronize manually

Automatically Synchronizing Class Trees

To turn the automatic synchronizing option on or off:

  1. Select Window | Automatically Synchronize Class Trees.

When synchronizing is enabled (the default), this option shows a check mark.

Synchronizing Manually

If the Automatically Synchronize Class Trees setting is turned off, you can still synchronize a Classes, Forms, or Instances tab with the last one of these tabs you visited. To do this:

  1. Select Window | Synchronize Class Trees.



Working With Notes

Protege-Frames allows you add a note to the Editor for any frame; that is, a class, instance, or slot. These notes, which are not part of the ontology structure, float over the Editor for that frame.

The buttons for working with a note are located at the top right of the Editor. This picture shows them in the Class Editor:

Class Editor header, showing buttons

These buttons allow you to add, delete, display, or hide a note.

Adding a Note

To add a note to a frame:

  1. Click the Create Note (windows_class_note.create, windows_slot_note.create, windows_instance_note.create) icon at the top right of the Editor (e.g., Class Editor, Instance Editor, etc.) A yellow note will be created.

    Sticky note (empty)
  2. Click in the note and type the desired text.

    Sticky note (filled)

As always, you can resize or reposition the note by dragging. However, you cannot move it out of the Editor window.

Deleting a Note

To remove a note:

  1. Click the Delete Note (windows_class_note.delete, windows_slot_note.delete, windows_instance_note.delete) button at the top right of the Editor.

  2. If there is only one note, you will be prompted to confirm the deletion. Click OK.

  3. If there is more than one note, a list of notes will be displayed. Select the note you wish to delete and click OK.

    Select a note... dialog

Hiding Existing Notes

You can hide all existing notes for the current tab. When you do this:

  • Only the notes for the current tab (Classes, Slots, or Instances) are hidden.

  • New notes that you create after hiding will display. To hide additional notes, first display all notes and then hide them again.

To hide all existing notes for the current tab:

  1. Click the Hide Notes (windows_class_note.hide, windows_slot_note.hide, windows_instance_note.hide) button at the top right of the Editor. The button will change to show that notes have been hidden.

Displaying Hidden Notes

When notes have been hidden, the Hide Notes button changes to show it has been selected:

Hide Notes button

To display all notes for the current tab:

  1. Click the Hide Notes icon.




Classes

This section of the User's Guide covers the concepts of understanding, creating, and using Protege-Frames classes.

Note: Before you create and use classes, you should be confident with the basic Protege-Frames interface. You should also be comfortable with Protege-Frames projects, project types, and windows.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


The Classes Tab

The Classes tab provides a single window in which you may view, create, and edit classes, which model concepts in your domain - usually objects, such as article or author.

The tab consists of two panes:

  1. The Class Browser at the left shows the classes in your project and allows you to make edits that modify the class hierarchy. For example, you might create, delete, or move a class or work with superclasses and metaclasses.

  2. When a single class is selected, the Class Editor on the right shows the properties of the selected class and allows you to edit class-specific attributes, such as class sticky notes, class name, role, any constraints, and template slots. The Class Editor can also be displayed as a separate window by clicking the View Class (classes_class.view) icon in the Class Browser.

Click on an area in the picture to view more information:

The Class BrowserThe Class buttonsThe Class EditorThe Class Constraints paneThe Class Documentation paneNote iconsNote iconsThe Class Role menuThe Template Slots paneThe Class Hierarchy windowFinding a ClassThe Superclasses paneViewing Class Relations
Classes tab, "Editor" and "Author" selected

For information about the Classes user interface and about accomplishing specific tasks, see the Classes Table of Contents.



The Class Browser

The Class Browser, at the left of the Classes tab, displays the classes in the knowledge base as a tree. The Class Browser includes the following:

  1. The Class buttons allow you to create (classes_class.create), view/edit (classes_class.view), view references to (classes_class.view_references), and delete (classes_class.delete) classes in your knowledge base.

  2. The Relations menu (classes_class.relationship.menu) allows you to view relations between classes: you can display the entire hierarchy (default) or restrict the display only to those classes that are related to a selected class.

  3. The Class Hierarchy window displays your class hierarchy. Icons give additional information about your classes. In this window, you can:

    • rearrange the class hierarchy using "drag-and-drop"; see Moving a Class for more information.

    • select a class to see its information displayed in the Class Editor to the right.

    • right-click a class to use the cascading Class menu, which allows you to create, delete, and hide classes, as well as work with metaclasses.

  4. The Class lookup bar allows you to find a class in the Class Relationship window by typing all or part of the class name and clicking the Search for Class (classes_class.search) button.

  5. The Superclasses pane allows you to add and remove superclasses for a class, as well as jump to a different superclass in the hierarchy view.

Click on a region or name in the illustration to jump to a description:

The Class BrowserThe Class buttonsThe Class buttonsThe Class Hierarchy windowThe Class Hierarchy windowFinding a ClassThe Superclasses paneThe Superclasses paneViewing Class Relations
Class Browser, "Editor" and "Author" selected



The Class Buttons

The class buttons (classes_class.view, classes_class.view_references, classes_class.create, classes_class.delete), located at the top right of the Class Browser, allow you to view and edit, view references to, create, or delete a class.

Creating a New ClassDeleting a ClassDisplaying the Class EditorViewing References
top of Class Browser

The buttons have the following actions:

  • The View Class button (classes_class.view) opens the Class Editor for the highlighted class. This allows you to view or edit the class.

  • The View References to Class button (classes_class.view_references) opens the References window, which shows all the frames that reference the highlighted class. See Viewing References.

  • The Create Class button (classes_class.create) creates a new class as a subclass of the highlighted class.

  • The Delete Class button (classes_class.delete) deletes the highlighted class and all of its subclasses.

If the Create Class or Delete Class button is grayed out, this indicates that the current class cannot be edited or deleted. A non-editable class always has a pale class icon to its left. A class cannot be edited if it is a system class or if it is included from another project.

Additional Buttons

The buttons above have the same operation wherever they appear. Additional buttons in the Protege-Frames interface allow you to add and remove the classes specified in a slot, field, or other relationship.

  • The Add Class button (classes_class.add) displays a dialog box that allows you to select one or more existing classes.

  • The Remove Class button (classes_class.remove) removes the class from the current relationship without deleting it from the knowledge base.



The Class Hierarchy Window

The Class Hierarchy window in the Class Browser displays the classes for the project and allows you to rearrange your hierarchy using "drag-and-drop". By default, the Class window displays the class structure of your knowledge base, with all classes shown as descending, directly or indirectly, from the system class :THING.

Class Hierarchy window

Description

This window shows the following:

  • Subclasses appear below their superclasses and are indented to the right.

  • Hierarchy icons indicate how much or how little of the hierarchy is displayed:

    • An "expanded" icon (all_hierarchy.expanded) means that all direct subclasses of the class are displayed.

    • A "collapsed" icon (all_hierarchy.collapsed) means that the class has direct subclasses which are not currently displayed. You can click on this icon to toggle it.

    • If no icon is displayed, the class has no direct subclasses.

    Tip: You can also display all classes below a class by right-clicking the class and selecting Expand from the cascading Class Menu.

  • The currently selected class is shown with a highlight.

  • Classes with more than one superclass appear more than once in the tree.

  • Class icons show information about your class (e.g., the class role).

Note: You can also change the view from the default to view the class relations for a selected class. Most of the time, however, you will work with the default hierarchy view.

Tasks

The Class Hierarchy window allows you to perform the following tasks:

  • You can select a class by clicking on it.

  • You can edit the attributes of a class in the Class Editor. When a class is selected, the Class Editor appears to the right. You can also open the Class Editor for one or more selected classes by clicking the View Class (classes_class.view) button.

  • You can create a new class by clicking the Create Class (classes_class.create) button and creating and editing its attributes in the Class Editor.

  • You can delete a class by clicking the Delete Class (classes_class.delete) button.

  • You can search for a class by typing all or part of the class name in the Class lookup bar and then clicking the Find Class (classes_class.search) button.

  • You can work with metaclasses and hidden classes, using the right mouse button. See the Class menu for more information.

You can also rearrange the superclass/subclass relationships:

For additional superclass tasks that you can perform, see the Superclasses pane.



The Class Icons

The icons in the Class window provide information about the structure of your knowledge base and the nature of your classes.

Class Icons

Classes are indicated by round golden icons. Additional properties of the icons give information about the type of class:

A solid icon indicates a concrete class; that is, a class that may have direct instances:

classes_class

A concrete class

classes_class.metaclass

A concrete metaclass

A hollow icon (with a hole) indicates an abstract class; that is, a class that cannot have direct instances. Abstract classes can have subclasses:

classes_class.abstract

An abstract class

classes_class.metaclass.abstract

An abstract metaclass

A pale icon indicates a system class or a class that has been included from another project. These classes cannot be edited. See Including a Project for more information:

classes_class.pale

A system concrete class or an included concrete class

classes_class.abstract.pale

A system abstract class or an included abstract class

classes_class.metaclass.abstract.pale

A system abstract metaclass or an included abstract metaclass

A gray icon indicates a hidden class. You can use hidden classes to restrict a user's view of your knowledge base while retaining the structure of the larger project. You choose whether or not to display the hidden classes in a project using the Configure dialog box.

classes_class.gray

A hidden concrete class

classes_class.abstract.gray

A hidden abstract class

classes_class.metaclass.gray

A hidden metaclass

Hierarchy Icons

The following icons give information about the display of the class hierarchy:

all_hierarchy.expanded

All direct subclasses of the class are displayed. You can click on this icon to hide the subclasses.

all_hierarchy.collapsed

The class has direct subclasses which are not currently displayed. You can click on this icon to display the subclasses.

No icon

The absence of a all_hierarchy.expanded or a all_hierarchy.collapsed indicates that the class has no subclasses. In the newspaper example, Library has no subclasses.

Note: To display all subclasses below a class, right-click the class and select Expand from the cascading Class menu.



The Class Menu

Whenever you have a class selected, you can access the cascading class menu by clicking the right mouse button. This menu allows you to perform a number of class-related tasks.

To access the class menu:

  1. Select a class in the Class Browser.

  2. Click the right mouse button. The cascading class menu is displayed.

    cascading class menu, "Create Class" selected
  3. Make your selection and click the left mouse button.

The class menu allows you to perform the following tasks. Not all tasks are available at all times; tasks that cannot be performed are grayed out.

  • Create Class: Creates a class that is subordinate to the highlighted class. This operation is identical to clicking the Create Class (classes_class.create) button.

  • classes_advanced.small   Create Subclass using Metaclass...: If you have added metaclasses to your project, this allows you to create a new class, subordinate to the highlighted class, using a metaclass as a template. See Creating a Class Using a Metaclass for more information.

  • Delete Class: Deletes the highlighted class and all of its subclasses, removing it from the current project. This operation is identical to the Delete Class (classes_class.delete) button.

  • classes_advanced.small   Change metaclass: Changes the metaclass of the highlighted class. See Changing the Metaclass of a Class for more information.

  • classes_advanced.small   Change metaclass of subclasses: Changes the metaclass of all subordinate classes to the metaclass of the highlighted class.

  • Hide class: Makes the highlighted class hidden. If the class is already hidden, the selection is Make class visible.

  • classes_advanced.small   Set as Default Metaclass: Makes the selected metaclass the default; that is, new classes will automatically be created using this as a template.

  • classes_advanced.small   Set as Default Slot Metaclass: Makes the selected metaclass the default slot metaclass; that is, new slots will be created using this as a template.

  • Expand: Shows all classes that are subordinate to the highlighted class. This is a multi-level display operation that is more extensive than clicking the all_hierarchy.collapsed icon, which only shows the next level of direct subclasses.

  • Collapse: Hides all classes that are subordinate to the highlighted class.

classes_advanced.small   Metaclasses are an advanced feature; you should have a good understanding of Protege-Frames before you use metaclasses.



The Class Search Bar

The Class Search Bar in the Class Browser allows you to type the name of a class and locate it in the Class window by clicking the Search for Class (classes_class.search) button.

Class Search Bar


The Superclasses Pane

The Superclasses pane, at the bottom of the Class Browser, displays all superclasses of the currently selected class.

Superclasses pane, in Class Browser

Note: If you cannot see the Superclasses pane, your window may be too small. You can see the pane by enlarging your window or by dragging the slider bar at the bottom of the Class Browser. See Working With a Small Window for more information.

Viewing the List of Superclasses

To see a list of all superclasses of a given class, highlight any occurrence of the class in the Class Browser. The Superclasses pane automatically displays a list of all of the superclasses of the selected class.

Adding a Superclass

To add a superclass to the selected class, click the Add Superclass (classes_class.add) button, highlight the class you want as an additional superclass in the Select Class window, then click OK. See Adding a Superclass for more information.

Removing a Superclass

To remove a superclass from the list of superclasses for the selected class, highlight the superclass you want to remove and click the Remove Superclass (classes_class.remove) button. The superclass/subclass relationship is broken, but the superclass is not deleted from the knowledge base. See Removing a Superclass for more information.

Locating Another Superclass

To jump to a different superclass in the Class Browser, click on any superclass in the Superclasses pane. The highlight in the Class Browser automatically moves to the occurrence of the class which is directly under the chosen superclass. If the occurrence is not currently visible in the Class Browser, Protege-Frames automatically scrolls to the correct location and expands the hierarchy to make the class visible. See Jumping to Another Superclass for more information.



The Class Editor

The Class Editor can be used to define and edit the attributes of a class. Click on a link or an area of the picture to jump to a summary. See also Creating a Class, Displaying the Class Editor, Editing a Class, and Editing Template Slots.

The Class Constraints paneThe Class Documentation paneThe Class Name fieldNote iconsThe Class Role menuThe Class Documentation paneThe Template Slots pane
Class Editor

Note Icons

The note icons (windows_class_note.hide, windows_class_note.create, windows_class_note.delete) at the upper right of the Editor allow you to work with class sticky notes. These notes, which are not part of your ontology, can be used for todos or communication while you are developing your knowledge base. They can be hidden using the Hide Class Notes (windows_class_note.hide) button. For information on how to add notes to any frame (class, instance, or slot), see Working with Notes.

Notes are not available when working with the Editor as a free-standing window.

The Class Name Field

The Name field allows you to name your class. When a class is created, it is given a default name, such as newspaper_Class_1. You can change the name of a new or existing class by highlighting the name and overwriting it. The following rules apply to class names:

  • The name must be a unique class name in the knowledge base.

  • Class names are case sensitive.

A recommended convention is to make the first character of each word in a class name uppercase and the rest lowercase, and to separate words with underscores.

The Class Role Menu

The Role menu allows you to choose the role of your class: concrete or abstract.

  • Concrete classes may have direct instances.

  • Abstract classes cannot have direct instances.

Protege-Frames sets the role to Concrete, by default. Protege-Frames does not impose any restrictions on the role of your classes. One common modeling convention is to make all leaf (bottom-level) classes concrete, and all interior (higher-level, non-leaf) classes abstract.

The Class Constraints Pane

Class constraints are defined programmatically. See Constraints for more information.

The Class Documentation Pane

The Class Documentation pane allows you to enter a text description of the class and other relevant information. These notes are part of your ontology. Filling in this field is optional, but is recommended to aid in the maintenance of the knowledge base.

The Template Slots Pane

The Template Slots pane displays the direct and inherited slots for the selected class. Slots, which represent properties of your class, are a crucial part of your knowledge base. In the example, Editor has several slots which appear in the Template Slots pane. For a full description, see the separate Template Slots pane topic.



Constraints

Protege-Frames builds relationships (e.g., between classes and instances, slots and slot facets). However, these relationships may be insufficient to capture all the constraints that hold among the frames of the knowledge base. Typically, Protege-Frames does not offer a way of relating the values of different slots attached to a given class, nor does it help in relating the slot values of different instances of a class.

For example, in the newspaper project, one might want to state that editors should have a higher salary than the employees for whom they are responsible (i.e., a constraint that involves the Editor and Employee classes and the salary and responsible_for slots).

The Protege Axiom Language (PAL) extends the Protege-Frames knowledge modeling environment with support for writing and storing logical constraints and queries about frames in a knowledge base. PAL is a plugin toolset that comprises engines for checking constraints and running queries on knowledge bases, as well as a set of useful user interface components. PAL's primary purpose is to support the definition of arbitrary logical constraints on the frames of a knowledge base.

Information about constraints can be found in the PAL section of the Plugins Library, including a quick reference guide and comprehensive documentation.



The Template Slots Pane

The Template Slots pane, at the bottom of the Class Editor, displays the direct and inherited slots for the selected class. Slots, which represent properties of your class, are a crucial part of your knowledge base. In the example, Article has a number of slots which appear in the Template Slots pane.

Template Slots pane

The Template Slot Buttons

The buttons at the upper right of the Template Slots pane allow you to edit, override, add, and remove slots. See the separate Template Slot buttons topic for more information.

You can also view, create, and delete slots directly from the Slots tab. See the Slot buttons for more information.

The Template Slot Menu

Right-clicking anywhere in the Template Slots pane brings up the Template Slot menu, which allows you to edit, override, add, and remove slots. These are the same actions provided by the Template Slot buttons.

Template Slot menu

The Slot Icons

The icons at the left of the column give information about the slot.

slots_slot

A blue icon means that the slot is direct; that is, it was created directly on the selected class. responsible_for is a direct slot.

slots_slot.inherited

A bracketed icon means that the slot is inherited from one of the selected class's ancestors. Inherited slots can be edited, but not deleted; there are also some restrictions on the edits that are allowed. In the example above, containing_section is an inherited slot.

slots_slot.inherited.overridden

A bracketed icon containing "0" means the slot has overrides; that is, the slot is inherited and it has been modified at the class.

Slot Summary Columns

The columns in the Slot Templates pane summarize the slot properties; these can be viewed and edited in the Slot Editor or Slots tab.

Name

Displays the name of the slot. Hovering over the name of an inherited slot will show the names of the class(es) that the slot is inherited from.

Cardinality

Indicates whether a slot value can consist of Multiple items or must be a Single item.

Type

Indicates the kind of values that the slot may hold. Available types are: Any, Boolean, Class, Float, Instance, Integer, String, and Symbol. For slots of type Class or Integer, also displays the allowed classes. See The Value Type menu for more information.

Other Facets

Displays any other facets defined in the Slot Editor or Slots tab, such as any required values, defaults, or minimum or maximum values. Also lists the allowed values for a slot of type Symbol.



The Template Slot Buttons

The Template Slot buttons, located at the top right of the Template Slots pane, allow you to view/edit, override, create, remove overrides, add, or remove a slot for the current class. You can also access these commands by right-clicking on the slot and selecting an action from the Template Slot menu.

Template Slots menu, "View Top-Level Slot" selected

Note: You can also view and create slots directly from the Slots tab, as well as deleting a slot from the project. See the Slot buttons for more information.

The buttons have the following actions:

slots_slot.view_top_level

View Top-Level Slot: Opens the top-level Slot Editor for the highlighted slot. If you make any changes to the slot at the top level, they affect the slot everywhere it appears, including the Slots tab and all classes where the slot is attached. See Viewing a Slot.

slots_slot.view_overrides

View Slot Overrides: Opens the class-level Slot Editor for the highlighted slot. Overrides to the slot at the class level have the following properties:

  • Overrides only affect the properties of the slot for the selected class and its subclasses.

  • The slot remains unchanged at the Slots tab, as well as any other classes where appears. A slot that has been overridden has an override icon (slots_slot.overridden) in the left column. There are limits on the overrides that you can make to an inherited slot. See Viewing a Slot for more information.

slots_slot.create

Create Slot: Creates a new slot for the current class.

Note: If the Create Slot (slots_slot.create) button is disabled, the selected class cannot be edited; this is the case if it is a system class or is included from another project.

slots_slot.remove_overrides

Remove Slot Overrides: Removes any slot overrides.

slots_slot.add

Add Slot: Adds a pre-existing slot to the current class.

slots_slot.remove

Remove Slot: Removes the highlighted slot from the current class. The slot remains in the project and can be viewed in the Slot Browser. To delete a slot completely from the project, use the Delete Slot (slots_slot.delete) button at the Slots tab.

Note: If the Remove Slot (slots_slot.remove) button is disabled, the selected slot cannot be removed from this class. For example, slots that are inherited from a superclass class cannot be removed.



The References Window

In a complex project, it is possible to have many different relationships between classes, instances, and slots. A reference for a frame is any other frame that has a direct relationship to it. The References window can be viewed by selecting an item and clicking on the References (classes_class.view_references or instances_instance.view_references) button. See

     Viewing References for more information.
References to Advertisement dialog, "name" selected

It is also possible to view those classes that are related through a particular slot, using the Relations Menu.

Examples

For example, references for a class include:

  • any superclasses of the class

  • any direct subclasses of the class

  • any instances of the class

  • any direct slots (inherited slots are not considered to be references)

  • any notes at the class

  • the metaclass of the class

For a slot, references include:

  • any superslots or subslots

  • :STANDARD-SLOT or other slot metaclass

  • any classes that have the slot attached as a direct slot

The References window allows you to view a list of all the references of a selected frame.

The View Buttons

all_object.view

View Reference: Opens the editor for the highlighted frame and allows you to view the frame's properties. Depending on the frame, this could be the Class Editor, the Slot Editor, or the Instance Editor.

all_object.view_references

View References to Value: Shows the references for the highlighted frame.

The Frame Column

This column shows the name of each frame that references the highlighted item. The type of frame is indicated by a class icon, slot icon, or instance icon (instances_instance).

The Slot Column

This column specifies the slot that actually references the selected item. Note that Protege-Frames provides standard slots which indicate the relationship between the selected item and the referencing frame. For example:

DIRECT-INSTANCES The selected item is a direct instance of the frame.

DIRECT-SUPERCLASSES

The selected item is a direct superclass of the frame.

DIRECT-SUBCLASSES

The selected item is a direct subclass of the frame.

SLOT-VALUE-TYPE

The frame is a slot and the selected item appears as one of its values. If the selected item is an instance, it may be a value. If the selected item is a class, it may be an Allowed Superclass (for a slot of type Class) or an Allowed Class (for a slot of type Instance).

The name of any other slot in the project may also appear in this column.

The Facet Column

This column gives information about the facet value for certain types of references and gives information about the slot relationships between classes. For example, an item may appear as a value for a slot which is called by that frame.

In the illustration above, the class Author appears as an Allowed Class for the slot author, as shown in the second row. In addition, the slot author appears as a slot for the class Article. Therefore, Article references Author. This reference appears in the fifth row in the example.

For an embedded reference of this type, the facet value column specifies whether the selected item appears as an Allowed Class or an Allowed Superclass.



Creating a New Class

To create a new class:

  1. In the Class Browser, highlight the class that you want to be the superclass of the new class.

    Class Browser, "Author" class highlighted
  2. Click the Create Class (classes_class.create) button in the class buttons area at the right of the Class Browser. Alternatively, you can click the right mouse button and select Create Class from the class menu.

    Class menu, "Create Class" selected
  3. The new class will be added under the highlighted class. It will have a default name, such as newspaper_Class_1.

    addition of newspaper_Class_1 class
  4. Use the Class Editor to name the class, choose its role, create constraints, and create and edit slots. See Editing a Class for more information.

The Class Constraints paneThe Class Documentation paneThe Class Name fieldNote iconsThe Class Role menuThe Template Slots pane
Class Editor



Creating Multiple Subclasses

Protege-Frames supplies a wizard that lets you quickly create multiple subclasses of a selected class.

  1. At the Classes tab, select the class you want as a superclass for the classes you create.

  2. Select Tools | Wizards, then select Create multiple subclasses from the submenu.

  3. Set your options:

    • To have all classes you create begin the same way, enter an optional prefix.

      Create multiple subclasses dialog, entering a prefix
    • To have all classes you create end the same way, enter an optional suffix.

    • If you select Tab indent to create hierarchy, you can use tab indents, as described in Step 5.

  4. Enter your class names:

    • Type the name of a class, then press Enter to begin entering a second class.

    • You can edit or delete the name of any class you have already entered by moving the cursor to that name. You can also cut and paste text within and between class names.

    • If you enter an invalid character (e.g., /) in a class name, the name will be highlighted in red. You can edit the class name from the keyboard, or you can click Tidy to have Protege automatically substitute an underscore (_) for each invalid character.

  5. To create subclasses of a class, make sure that Tab indent to create hierarchy is selected. Then, use the tab key to create a hierarchy:

    • No tabs means the class will be a direct subclass of the selected superclass.

    • A single tab means the class will be a subclass of the nearest untabbed class above it in the list.

    • N tabs means the class will be a subclass of the nearest class with N-1 tabs above it in the list. For example, suppose you are creating subclasses of Superclass and you enter the following:

    1. Subclass direct subclass of Superclass

    2. Subclass_II direct subclass of Superclass

    3. SubSubclass subclass of Subclass_II

    4. SubSubSubclass subclass of SubSubclass

    5. SubSubclass_III direct subclass of Superclass

      Note: Extra Tab characters will be ignored. For example, if you insert a Tab before the first class name in the list, it will still be created as a direct subclass of the selected superclass.

  6. Click Finish or type Ctrl-Enter (Cmd-Enter). The wizard will display a list of classes that have been added. This is informational only - you cannot cancel at this point.

    Create multiple subclasses dialog, result display
  7. Click Finish to exit the wizard.

    wizard exited; result appears

The new classes will inherit all the properties of their superclass. If you wish to make any additional edits to your classes (e.g., attach an additional slot or override an inherited slot), use the Class Editor.



Deleting a Class

Deleting a class deletes the class and all of its subclasses. Once a class has been deleted, it cannot be recovered. You may wish to archive your project before deleting.

Deleting a Single Class

To delete a class from the knowledge base:

  1. Highlight the class you want to delete in the Class Browser.

  2. Click the Delete Class (classes_class.delete) button or click the right mouse button and choose Delete selected class from the Class menu.

  3. You will be prompted for confirmation. Click OK. The selected class and any subclasses will be deleted.

Deleting Multiple Classes

To delete multiple classes:

  1. Highlight one or more classes in the Class Browser. To highlight multiple classes, hold down the Ctrl (Cmd) key while clicking each class. To highlight a range of classes, click the first class, then hold down the Shift key and click the last class in the range.

  2. Click the Delete Class (classes_class.delete) button. You cannot use the Class menu to delete multiple classes.

  3. You will be prompted for confirmation. Click OK.

Undeletable Classes

The following types of classes cannot be deleted:

  • system classes

  • classes included from another project



Displaying the Class Editor

You can view or edit an existing class using the Class Editor.

Note: If the class is a system class or has been included from another project, it cannot be edited. Included classes are shown with a pale class icon to the left.

Whenever you enter changes into the Class Editor, they are immediately visible everywhere in the project. To write the changes to disk, select File | Save Project.

Using the Classes Tab

To view or edit a class from the Classes tab:

  1. Select the class you want to edit in the Class Browser in the Classes tab.

  2. Enter the updated information directly in the Class Editor to the right.

Displaying the Class Editor as a Free-standing Window

You can open the Class Editor to view or edit a class anywhere the View Class (classes_class.view) button appears, including the following locations:

To view or edit a class using the Class Editor:

  1. Select the class you want to edit.

  2. Click the View Class (classes_class.view) icon at the upper right of the pane to open the Class Editor as a free-standing window.

To view or edit the information for several classes at once, open a separate Class Editor for each class. Opening a new Class Editor does not close the previous editor. This allows you to compare the attributes for two or more classes. Edits can be made directly in any open Class Editor.

Managing Multiple Editors

If you have multiple editor windows open, you can manage them as follows:

  • Cascade multiple windows by selecting Windows | windows_cascade_windows Cascade Windows.

  • Close all open editor windows by selecting Windows | windows_close_all_windows Close All Windows.



Editing a Class

Using the Class Editor, you can view or edit a class's constraints, documentation, name, notes, or template slot fields.

Changing ConstraintsChanging Class DocumentationChanging the Name of a ClassWorking with Class NotesChanging the Role of a ClassWorking with Template Slots
Class Editor

Any changes you enter into the Class Editor take effect immediately. To make the changes permanent, save the knowledge base by selecting Save from the Project menu. To revert to the last saved version, close Protege-Frames without saving changes. If you have made extensive changes to your knowledge base during the current session, you may wish to save or archive the project before editing classes.

Working with Class Notes

The note icons (windows_class_note.hide, windows_class_note.create, windows_class_note.delete) at the upper right of the Editor allow you work with class sticky notes. These notes, which are not part of your ontology, can be used for todos or communication while you are developing your knowledge base.

  • To hide or show all class notes, click the Hide Class Notes (windows_class_note.hide) button.

  • To create a note for the current class, click the Create Class Note (windows_class_note.create) button.

  • To delete a note from the current class, click the Delete Class Note (windows_class_note.delete) button and then select the note from the list.

For more information, see Working with Notes.

Notes are not available when working with the Editor as a free-standing window.

Changing the Name of a Class

To change the name of a class, edit the name in the Name field. The following rules apply to class names:

  • The name must be a unique frame name in the knowledge base.

  • Class names are case sensitive.

Note: A recommended convention is to make the first character of each word in a class name uppercase and the rest lowercase, and to separate words by underscores.

Changing the Role of a Class

Select the new role from the Role menu. Concrete classes may have direct instances, but do not have to; abstract classes cannot have direct instances. Protege-Frames does not impose any restrictions on the role of your classes.

Changing Constraints

Class constraints are defined programmatically. See Constraints for more information.

Changing Class Documentation

To change the notes for a class, change the text directly in the Class Documentation pane.

Working with Template Slots

The Template Slot buttons at the Template Slots pane allow you to:

For more information about working with slots, see the Slots Table of Contents.

Other Class Editing Operations

Viewing Multiple Classes

To view or edit the information for several classes at once, select the classes one by one and click the View Class (classes_class.view) button to open the Class Editor for every selected class. Opening a new Class Editor does not close the previous editor. This allows you to compare the attributes for two or more classes. Edits can be made directly in any open Class Editor.

Changing Superclasses

To change the superclasses of a class, see: Adding a Superclass, Replacing a Superclass, and Removing a Superclass.



Editing Template Slots

The Template Slots pane in the Class Editor allows you to add, clear, create, edit, override, and remove slots.

Editing a Top-level Slot

To edit a slot at the top level:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the View Top-level Slot (slots_slot.view_top_level) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Viewing a Slot for more information on how to edit a slot.

Overriding a Slot at a Class

To override a slot at the class:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the View Slot Overrides (slots_slot.view_overrides) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Viewing a Slot and Overriding Slot Properties at a Class for more information.

Your class can have slots that were inherited (slots_slot.inherited) from a superclass. If the slot is inherited, there are limitations on the edits that can be performed. Direct slots, which were created or added at the level of the slot, have no editing restrictions.

If you edit a slot at the class level, the slot is displayed with an override (slots_slot.overridden) icon.

Creating a New Slot

You can define a new slot for your class.

  1. Make sure the correct class is highlighted in the Class Browser.

  2. Click the Create Slot (slots_slot.create) button at the top right of the pane. The Slot Editor will be displayed.

  3. Use the Slot Editor to edit slot properties such as Name, Type, and Cardinality, and to add notes. See Creating a Slot for more information on how to create a slot.

A direct slot is displayed with a blue (slots_slot) icon.

Clearing Slot Overrides

If you have overridden a slot at the class, you can remove your overrides and use the top-level definition of the slot:

  1. Highlight the slot name in the Template Slots pane.

  2. Click the Remove Slot Overrides (slots_slot.remove_overrides) button at the top right of the pane. Any changes you made at the class level are removed and the top-level definition of the slot is used. See Removing Overrides From a Slot for more information.

Adding an Existing Slot to a Class

Once slots have been created, you can add them to more than one class. For example, the Prototype_Newspaper class has a Weekday slot, which can be used to choose among the days of the week. If you were creating a new type of employee who wrote a weekly feature, you might want to reuse this slot.

To choose a pre-existing slot to add to your class:

  1. Make sure the correct class is highlighted in the Class Browser.

  2. Click the Add Slot (slots_slot.add) button at the top right of the pane. The Select Slots dialog box displays all the slots that you can add to the class.

  3. Highlight the slot that you wish to add to your class.

  4. Click OK.

The new slot is added to the Template Slots pane. It is a directly-attached slot and is displayed with a blue (slots_slot) icon. You do not need to name the slot; however, you may need to override its facets. If you wish to override the facets on the slot, you may click the View Top-level Slot (slots_slot.view_top_level) or View Slot Overrides (slots_slot.view_overrides) button to display the Slot Editor. See Viewing a Slot for more information.

Removing a Slot

You can remove any direct slot that appears in the Template Slots pane. To remove a slot:

  1. Highlight the slot

  2. Click the Remove Slot (slots_slot.remove) button. The slot will be removed from the class.

Note that the slot has not been deleted from the knowledge base. It will still appear in the Select Slots dialog box (see

      Adding an Existing Slot to a Class, above)

and the Slots tab. See Deleting a Slot for more information.



Finding a Class

To find a class in the Class Browser:

  1. Type all or part of the name of the class in the Class lookup bar. Matches will be found for classes whose names begin with the entered text. Matching is case-insensitive.

    Class lookup bar
  2. Press Enter/Return or click the Search for Class (classes_class.search) button. If there is one match, the class will be highlighted. Otherwise, you will get a dialog box of all the matches, and you will be able to select one.

    search results dialog box

If a matching class is not currently visible in the Class Browser, Protege-Frames automatically scrolls to the correct location and expands the hierarchy to make the class visible.

Note: If you are unable to find the class you are looking for, the class may be hidden. To verify that hidden classes are displayed, choose Project | Configure, go to the Options tab, and make sure the Display Hidden Classes option is checked. Hidden classes are shown with a gray icon (e.g., classes_class.gray).



Hiding a Class

You can hide a class, using the Class menu. Hidden classes are still part of your project, but are not visible. You can use this, for example, if you want to restrict the user's view to a part of your knowledge base, but want to retain the structure of the larger project. All subclasses of a hidden class are also hidden.

You can choose whether or not hidden classes are displayed in the Class Browser by choosing Project | Configure, going to the Options tab, and toggling the Display Hidden Classes option. See Configuring a Project for more information.

Hiding a Class

To hide a class:

  1. Select the class in the Class Browser.

  2. Click the right mouse button to display the Class menu.

  3. Select Hide Class and click the left mouse button.

    Class menu, "Hide Class" selected
  4. If hidden classes are visible in your project, you will see a gray icon (e.g., classes_hide_c1), indicating that the class is hidden. If hidden classes are not visible in your project, you will no longer see the class or any of its subclasses.

Making a Hidden Class Visible

To make a hidden class visible:

  1. If you cannot see your class because hidden classes are not currently displayed, make hidden classes visible. To do this, choose Project | Configure, select Options, and make sure that Display Hidden Classes is selected.

  2. Select the class you wish to make visible.

  3. Click the right mouse button to display the Class menu.

  4. Select Make Hidden Class Visible and click the left mouse button.

    Class menu, "Make Hidden Class Visible" selected

    Note: If your class has a superclass which is hidden, it will still not display.

  5. The gray icon will be removed from your class.



Replacing a Superclass

You can move a class to a different superclass, using drag-and-drop in the Class Browser. This will remove the class from one superclass and make it a subclass of another superclass. Note that when you replace the superclass of a class, the class will often lose and gain inherited slots.

Moving a Class

To move a class:

  1. Select the class you want to move. If the class has more than one superclass, select the view of the class that appears under the superclass you want to replace.

  2. Hold down the mouse button and drag the class on top of the new superclass.

  3. Release the mouse. The subclass will no longer be under the original superclass, but will now be located under the new superclass. Note that the slots of the moved class will automatically change to reflect the inheritance from its new superclass.

You can also add a superclass by holding down the Ctrl (Cmd) key while you drag.

Example

The following example shows how to make Columnist inherit from Employee, rather than the class Person.

  1. Highlight Columnist in the Class Browser. Because Columnist has more than one superclass, you must make sure to select the copy of Columnist that is under Employee. (When a class has more than one superclass, you can use the Superclasses pane to select the copy that you want. See Jumping to a Different Superclass for more information.) Note that the Template Slots pane for Columnist includes slots it inherits from Employee.

    Class Browser, "Columnist" selected
  2. Hold down the mouse button and drag Columnist on top of the new superclass Person.

  3. Release the mouse button to drop the class. Person is outlined and the Class Browser redisplays to show the new hierarchy. The dragged class and all of its subclasses, if any, will be moved from the original superclass to the new superclass.

    Class Browser, "Person" outlined, "Columnist" selected

If you highlight Columnist after it has been repositioned, you will see that some of the slots it had before are now missing. These were the slots it inherited from Employee.

Class Browser, "Columnist" selected, some slots missing



Adding a Superclass

Classes in Protege can have more than one superclass. Classes inherit the properties of every one of their superclasses, so by adding a superclass to a class, you are adding all of its slots as well.

Note: If you cannot see the Superclasses pane, your window may be too small. You can see the pane by enlarging your window or by dragging the slider bar at the bottom of the Class Browser. See Working With a Small Window for more information.

Adding a Superclass in the Superclasses Pane

To add a superclass using the Superclasses pane:

  1. Select the subclass in the Class Browser.

  2. Click the Add Superclass (classes_class.add) button in the Superclasses pane (located at the bottom left of the Classes tab, below the Class Browser). A Select Classes window will appear.

    Superclasses pane, "Employee" selected
  3. Choose the additional superclass(es) you want from the Select Classes window. To highlight multiple classes, hold down the Ctrl (Cmd) key while clicking each class. To highlight a range of classes, click the first class, then hold down the Shift key and click the last class in the range.

    Select Classes window, ":THING" selected

Note: If nothing happens when the class is dropped over a new superclass, the target class is not allowed to be a superclass of the dragged class. For example, descendants of the dragged class are excluded.

Adding a Superclass Using Drag-and-Drop

To add a superclass, using drag-and-drop in the Class Browser:

  1. Select the subclass in the Class Browser.

  2. Hold down the mouse button and drag the subclass over the additional superclass.

  3. Hold down the Ctrl (Cmd) key and release the mouse button to drop the subclass. The system will add the new superclass to the subclass.

Note: If you do not hold down the Ctrl (Cmd) key when releasing the mouse, the operation is interpreted as Moving a Class.

Multiple Superclasses and Inheritance

Adding a superclass results in more than one superclass for a class, which then inherits the slots and facets of all of its superclasses. For example, the Columnist class in the Newspaper example has two occurrences in the Class Browser: one with the superclass Author, and one with the superclass Person; it inherits slots from both superclasses.



Jumping to a Superclass

If a class has more than one superclass, you can use the Superclasses pane to jump from one superclass to another in the Class Browser.

Note: If you cannot see the Superclasses pane, your window may be too small. You can see the pane by enlarging your window or by dragging the slider bar at the bottom of the Class Browser. See Working With a Small Window for more information.

To jump to another superclass:

  1. Highlight any occurrence of the class in the Class Browser. The superclasses of the class are displayed in the Superclasses pane, located at the lower left of the Classes tab, below the Class Browser.

  2. Click on any superclass in the Superclasses pane. The highlight in the Class Browser automatically moves to the occurrence of the class which is directly under the chosen superclass. If the copy is not currently visible in the Class Browser, Protege-Frames automatically scrolls to the correct location and expands the hierarchy to make the class visible.

In the illustration below, if you clicked on Employee in the Superclasses pane, the highlight in the Class Browser would jump to the copy of Columnist under Employee. If the Employee hierarchy was not currently expanded, it would expand to display the Columnist class.

Class Browser, "Editor" and "Author" selected



Removing a Superclass

If a class has more than one superclass, you can remove one or more of its superclasses. You must leave at least one superclass. The subclass still appears in the knowledge base as a subclass of its other superclass(es).

Note: If the class has only one superclass, the Remove Superclass (classes_class.remove) button is disabled.

Removing a Superclass

To remove a superclass from a class:

  1. Highlight the class that you want to work with in the Class Browser. The superclasses of the selected class will be shown in the Superclasses pane immediately below the Class Browser.

  2. Highlight the superclass you want to remove in the Superclasses pane.

  3. Click the Remove Superclass (classes_class.remove) button at the top right of the Superclasses pane. The superclass will remain in the knowledge base, but the superclass/subclass link will be broken.

Example

For example, to remove Employee as a superclass of Columnist in the newspaper project:

  1. Highlight Columnist in the Class Browser.

    Class Browser, "Columnist" highlighted
  2. Highlight Employee in the Superclasses pane.

    Superclasses pane, "Employee" highlighted
  3. Click the Remove Superclass (classes_class.remove) button at the top right of the Superclasses pane.

Columnist remains a subclass of Author.

To delete a class from the knowledge base, highlight the class and click the Delete Class (classes_class.delete) class button. See Deleting a Class.



Viewing Class Relations

If Class_A has a direct slot of type Class or an Instance that includes Class_B in the allowed class(es) of the slot, we say that Class_B is related to Class_A. The Relations menu, available by clicking on the arrow to the right of the class buttons, allows you to choose which relation between classes to show in the Class Browser. This help topic describes the choices on the Relations menu.

Class Relations icon

Example

For example, the responsible_for slot at the Editor class is a class of type Instance that has Employee as an allowed class; this means that Employee is related to Editor.

Relations Menu for Editor

The picture below shows the Class Relationship menu for the class Editor in the Newspaper example. Editor has two Instance slots, responsible_for and sections.

Class Relationship menu, "Show Relation responsible_for" selected

Note: If the highlighted class does not have any related classes, the menu only displays Show Class Hierarchy and Show all Relations.

Selecting Show Relations responsible_for changes the Class Hierarchy window to display only the classes that are related to Editor through the responsible_for slot.

Class Browser, "Editor" selected

The Relations Menu

Show Class Hierarchy

The default Show Class Hierarchy displays the subclass-superclass hierarchy of your knowledge base. All the classes in the knowledge base appear in the displayed tree. (Some classes may be hidden. You can choose whether or not hidden classes are displayed in the Class Browser by choosing Configure from the Project menu, going to the Display tab, and toggling the Display Hidden Classes option.)

Show All Relations

Show All Relations displays a hierarchy of classes that are related to the selected class via its slots, as follows:

  • The root is the class (Class_A) that was highlighted when Show All Relations was selected.

  • The next level (direct children) consists of any classes (Class_B1, Class_B2, etc.) that are related to Class_A through one or more of its slots.

  • The next level consists of any classes (Class_C1, Class_C2, etc.) that are related to one of the classes on the previous level (Class_B1, Class_B2, etc.), through one of the slots of Class_A. Note the following:

    • A class Class_C1 is shown as a child of the class it is related to.

    • If a class is related to more than one class on the previous level, it is shown everywhere it occurs (multiple superclasses).

    • Only classes related through the slots of Class_A are shown; if Class_X is related to Class_B through a slot that is not attached to Class_A, it will not appear.

  • Subsequent levels continue the tree of classes that are related to the higher classes via the slots of Class_A.

It is possible (and sometimes useful) to have a recursive relation: Class_A appears somewhere subordinate to Class_A on the tree. This can happen, for example, if Class_B is related to Class_A, which in turn is related to Class_B through a different slot. In this case, all the levels are shown from Class_A to Class_A and the second instance is labeled (recursive).

Show Relation slot

Selecting a slot from the menu will show the hierarchy of classes, starting at the selected class, that are related to each other only through the slot selected on the menu. The slot-specific view can be read as "parent-relation-child", where "relation" is the slot selected on the Relations menu. For example, in the responsible_for view, Editor - is responsible for - Employee.

This view is not necessarily a subset of the Show All Relations view. If Show All Relations has recursion, the view restricted to a single slot can be quite different and possibly more extensive. Consider the following situation:

  • Class_A and Class_B both have slot_a and slot_b.

  • Class_B is related to Class_A through slot_a.

  • Class_A is related to Class_B through slot_b.

  • There are a number of additional classes that are related to Class_B through slot_a.

In this case:

  • Show All Relations will display Class_A and Class_B in a two-level recursion; the class relations from slot_a at Class_B are not shown.

  • Show Relation slot_a will show the classes that are related to Class_B through slot_a and any children of those classes.

It is also possible to view a list of all the frames that reference a highlighted class, using the References Class (classes_class.view_references) button. See Viewing References for more information.



The Classes & Instances Tab

The Classes & Instances tab is an optional tab that combines the functionality of the Classes tab and the Instances tab in a single window. In this window, you may view, create, and edit classes and instances.

To display the Classes & Instances tab, use the Configure Project dialog box.

Classes & Instances tab, "Editor" and "Author" selected

The Classes & Instances tab includes the following components:

  • A Class Browser at the left shows and allows you to work with the class hierarchy (e.g., creating and deleting classes).

  • An Instance Browser allows you to create and delete instances.

  • An Editor window on the right displays the information for the current selection. When a single class is selected, the Editor window contains the Class Editor for the selected class. When a single instance is selected, the Form pane contains the Instance Editor for the selected instance.

For information about the Classes tab user interface and accomplishing class-related tasks, see the Classes Table of Contents. For information about the Instances tab user interface and accomplishing instances-related tasks, see the Instances Table of Contents.



Viewing References

In a complex project, it is possible to have many different relationships between classes, instances, and slots. The References window allows you to view a list of all the frames that reference a value.

Note: For classes, it is also possible to view those classes that are related through one or more slots. See Viewing Class Relations for more information.

"References to ..." dialog, "name" selected

Viewing the References Window

To open the References window:

  1. Highlight the item for which you wish to see a list of references. Make sure to go to the correct location:

    • For a class:

      1. Go to the Classes tab.

      2. Highlight the item in the Class Browser.

      3. Click the View References to Class (classes_class.view_references) button.

    • For an instance:

      1. Go to the Instances tab.

      2. Highlight the class where the instance appears in the Class Browser.

      3. Highlight the instance in the Instance Browser

      4. Click the View References to Instance (instances_instance.view_references) button.

Viewing the Editor for a Reference

To open the Editor for any of the frames shown in the References window:

  1. Click on the frame to highlight it.

  2. Click the View Reference (all_object.view) button.

Viewing References to a Value

To view the references for any of the frames shown in the References window:

  1. Click on the frame to highlight it.

  2. Click the View References to Value (all_object.view_references) button.

For example, clicking on Content in the above window and then clicking View References to Value (all_object.view_references) would show the references for Content. This allows you to view references to a slot.




Slots

This section of the User's Guide covers the concepts of understanding, creating, and using Protege-Frames slots.

Note: Before you create and use slots, you should be confident with the basic Protege-Frames interface. You should also be comfortable with Protege-Frames projects, project types, windows, and classes.

To return to the main table of contents, click the Protege-Frames User's Guide link (located at the top of the table of contents on the right-hand side of this page).


The Slots Tab

The Slots tab provides a single window in which you may view, create, and edit slots. Slots usually represent properties of classes or relationships between classes. For example, the name slot represents the property of having a name. Once you have created a slot, you can attach it to a class. When name is attached to the Person class, it represents the name of the person.

Although slots are usually thought of in terms of classes, they can be defined and manipulated independently, and can exist without any relationship to classes.

The tab consists of two panes:

  1. The Slot Browser, on the left, shows all the slots in the project. It allows you to edit existing slots, create new slots, and delete slots, as well as work with superslots.

  2. When a single slot is selected, the Slot Editor for the selected slot is shown at the right. The Slot Editor allows you to name the slot, choose its cardinality and value type, define constraints, defaults, and maximum and minimum values, as well as provide a brief description. The Slot Editor can be displayed as a separate window by clicking the View Slot (slots_slot.view_top_level) button in the Slots pane. The Slot Editor can also be accessed from the Templates Slots pane in the Classes tab.

Click on an area in the picture to jump to it:

The Slot BrowserThe Slot Editor
Slots tab

For information about the Slots tab user interface and about accomplishing specific tasks, see the Slots Table of Contents.



The Slot Browser

The Slot Browser, on the left of the Slots tab, displays the all the slots in your project. The Slot Browser includes the following:

  1. Slot buttons allow you to create (slots_slot.create), view/edit (slots_slot.view_top_level), and delete (slots_slot.delete) classes in your knowledge base.

  2. The Slot Hierarchy window: displays your slot hierarchy. Icons give additional information about your slots. In this window you can:

    • rearrange the slot hierarchy, using "drag-and-drop".

    • select a slot and see its information displayed in the Slot Editor to the right.

    • right-click a slot to use the Slot menu, which allows you to create and delete slots as well as work with slot metaclasses.

  3. Slot search bar: allows you to find a slot in the Slot Hierarchy window by typing all or part of the slot name and clicking the Search for Slot (classes_class.search) button.

  4. Superslots pane: allows you to add and remove superslots for a slot as well as jump to a different superslot in the hierarchy view.

Finding a SlotThe Slot buttonsThe Slot Hierarchy windowThe Superslots pane
Slot Browser

For information about the Slots tab user interface and about accomplishing specific tasks, see the Slots Table of Contents.



The Slot Buttons

The slot buttons, located at the top right of the Slot Browser in the Slots tab, allow you to view/edit, create, or delete a slot. You can also perform these commands by right-clicking on a slot and selecting a command from the Slot menu.

The buttons have the following actions:

slots_slot.view_top_level

View Slot: Opens the Slot Editor for the highlighted slot. You can also view a slot by double-clicking it in the Slot Browser. If you make any changes to the slot from the Slots tab, they affect the slot everywhere it appears, including the Slots tab and all classes where the slot is attached. See Viewing a Slot.

slots_slot.create

Create Slot: Creates a new slot.

slots_slot.delete

Delete Slot: Deletes the highlighted slot from the project. See Deleting a Slot.

You can also view, create, and edit slots from the Template Slots pane. See the Template Slot buttons for more information.



The Slot Menu

Whenever you have a slot selected in the Slot Editor, you can access the cascading slot menu by clicking the right mouse button. This menu allows you to perform a number of slot-related tasks.

To access the slot menu:

  1. Select a slot in the Slot Editor.

  2. Click the right mouse button. The cascading slot menu will be displayed.

    cascading slot menu
  3. Make your selection and click the left mouse button.

The slot menu allows you to perform the following tasks. Not all tasks are available at all times; tasks that cannot be performed are grayed out. Note that metaclasses and metaslots are advanced features; you should have a good understanding of Protege-Frames before you use metaclasses:

  • slots_slot.create Create slot: Creates a new slot. This operation is identical to clicking the Create Slot (slots_slot.create) button.

  • Create Subslot: Creates a subslot subordinate to the highlighted slot.

  • Create subslot using slot metaclass...: (advanced) If you have added slot metaclasses to your project, allows you to create a new subslot, using a slot metaclass as a template.

  • slots_slot.delete Delete Slot: Deletes the highlighted slot and all of its subslots, removing it from the current project. This operation is identical to the Delete Slot (slots_slot.delete) button.

  • Change slot metaclass: (advanced) Changes the slot metaclass of the highlighted slot. See Changing the Slot Metaclass of a Slot for more information.

  • Change slot metaclass of subslots: (advanced) Changes the slot metaclass of all subordinate slots to the slot metaclass of the highlighted slot.

  • Expand: Shows all slots subordinate to the highlighted slot. This is a multi-level display operation that is more extensive than clicking the "collapsed" (all_hierarchy.collapsed) icon, which only shows the next level of direct subslots.

  • Collapse: Hides all slots subordinate to the highlighted slot. This is a multi-level display operation that is more extensive than clicking the "expanded" (all_hierarchy.expanded) icon to the left of the slot.



The Slot Editor

The Slot Editor can be used to define and edit the attributes, or facets, of a slot. The Slot Editor for the selected slot is displayed at the right of the Slots tab. The Slot Editor can also be displayed as a free-standing window, as follows:

  • When you highlight a slot in the Slots tab and then click the View Slot (slots_slot.view_top_level) button.

  • When you create a new slot for a highlighted class by clicking the Create Slot (slots_slot.create) button in the Template Slots pane of the Classes tab.

  • When you highlight a slot in the Template Slots pane and then click the View Top-level Slot (slots_slot.view_top_level) or the View Slot Overrides (slots_slot.view_overrides) button.

In the example below, the slot urgent for the class Article was double-clicked in the Template Slots pane. The Slot Editor displays a Boolean Type, with Single Cardinality, and a text documentation pane of the urgent slot.

urgent dialog

A slot can be attached to more than one class. Each slot has a top-level (system) description; the system description can be specialized, or overridden, for a specific class. The scope of your edits depends on how you access the Slot Editor:

The Slot Editor displays the following information for a slot:

  1. Note icons, which allow you to add notes.

  2. Name of the slot.

  3. Value Type of the slot.

  4. Cardinality of the slot.

  5. (optional) Minimum and Maximum values for the slot (slots of type Integer or Float only).

  6. (optional) Any Documentation that has been entered for the slot.

  7. (optional) An Inverse Slot for the slot (slots of type Class or Instance).

  8. (optional) Any Template Values that have been defined for the slot.

  9. (optional) Any Defaults that have been defined for the slot.

  10. Domain of the slot.

For certain value types, an additional pane appears below the Value Type pane:

  1. For type Class, the Allowed Superclasses pane appears.

  2. For type Instance, the Allowed Classes pane appears.

  3. For type Symbol, the Allowed Symbols pane appears.

Note Icons

The note icons (windows_slot_note.hide, windows_slot_note.create, windows_slot_note.delete), at the upper right of the Editor, allow you to add and remove yellow sticky notes to your slot. These notes, which are not part of your ontology, are displayed when the slot is selected at the Slots tab. For information on how to add notes to any frame (class, instance, or slot), see Working with Notes.

Slot Name

You can edit the slot name directly in the Name field. Slot names are case-sensitive. A recommended convention is to make slot names lowercase, separating adjacent words with an underscore (_).

Value Type Menu

The Value Type menu allows you to select the slot value type, which determines the kind of values that the slot may hold. When you are creating instances for a slot, the slot type also determines how the slot is displayed in the Instance Editor. See the Standard Widgets for more information about instances and type.

Value Type menu

The following table summarizes the value types. For a full description, click on the type name:

Type Description Examples

Any

any of the types below (logical Union)

Boolean

a logical, Boolean value; i.e., a value that is either true or false

true, false

Class

the slot takes one or more classes as values Editor

Float

a floating-point number (number with a decimal point) 1.0, 3.4e10, -0.3e-3

Instance

the slot takes one or more instances as values Head Honcho

Integer

an integer (a whole number) 1, 2, -4, 0

String

String of alphanumeric (ASCII) characters, possibly including spaces "Mars Mission"

Symbol

the slot takes values from a list of strings you define {red, blue, green}

When a value type of Class, Instance, or Symbol is selected, an additional pane appears below the Value Type menu. This pane allows you to select or create the values for the slot.

Allowed Superclasses pane

Cardinality

The Cardinality field allows you to specify the number of values allowed or required for the slot. This supplies the following options:

Cardinality field options

The default configuration allows the slot to have at most one value; that is, it can have one value or no value. You can change the default by entering a positive whole number in the at least and/or at most options, or by selecting the multiple option:

  • required/at least: Sets the minimum number of values for the slot. To use, enter a positive whole number in the at least entry bar:

    • If you enter a value for at least, required is automatically selected.

    • Setting at least equal to one (1) means a value is required for the slot.

    • Setting at least greater than one automatically selects multiple as well.

    • Setting at least equal to 1 and at most equal to 1 specifies that the slot must have exactly one value.

  • at most: Sets the maximum number of values for the slot. To use, enter a positive whole number in the at most entry bar:

    • Setting at most equal to one (1) means that the slot can have at most one value; this is called a single slot.

    • Setting at most greater than one automatically selects multiple. The slot can contain multiple values, but there is a limit to the number of values.

  • multiple: Allows the slot to have more than one value; multiple values are stored and displayed as a list:

    • As above, to set a minimum number of values, set the at least value.

    • As above, to set a maximum number of values, set the at most value.

    • The lack of an at most value indicates that there is no limit to the number of items the slot may contain.

    • Duplicate values are allowed, although their use is uncommon

Minimum (optional)

This field is applicable only to slots of type Integer or Float.

Minimum allows you to specify a minimum value for your slot. When present, the Minimum value is displayed in the Other Facets column of the Template Slots pane.

When an instance is created for a class with this slot, the value of the slot must be greater than or equal to the minimum. For example, a minimum of zero means instances cannot have negative values.

Together, Minimum and Maximum can be used to define an allowable range.

Maximum (optional)

This field is applicable only to slots of type Integer or Float.

Maximum allows you to specify a maximum value for your slot. When present, the Maximum value is displayed in the Other Facets column of the Template Slots pane.

When an instance is created for a class with this slot, the value of the slot must be less than or equal to the maximum. Together, Minimum and Maximum can be used to define an allowable range.

Documentation (optional)

The Documentation field allows you to enter a text description of the slot. Filling in this field is optional, but is recommended to make maintaining the knowledge base easier. This documentation is part of your knowledge base.

Inverse Slot (optional)

Only available for slots of type Class or Instance.

Allows you to create a reciprocal relationship between two slots. If this relationship is set up correctly, assigning a value (i.e., a specific class or instance) to the slot for one instance automatically assigns the instance as a value to the appropriate inverse slot. For example, the "direct superclass/direct subclass" relationship is actually an inverse slot relationship. See Understanding Inverse Slots and Creating an Inverse Slot Relationship for more information.

If a slot has an inverse slot, the name of the inverse slot is shown after the slot name at the Slots tab.

Template Values (optional)

Allows you to specify the value(s) for a slot at the class level:

  • The template value is a required, uneditable value that is filled in for all classes and instances that use or inherit the slot.

  • The template value can not be changed or overridden at the instance level.

  • The number of Template Values should not exceed the at most value for the Cardinality of the slot.

For a value that can be overridden, use Defaults instead.

When present, any Template Values are displayed in the Other Facets column of the Template Slots pane in the Classes tab.

Defaults (optional)

Allows you to specify default value(s) for a slot:

  • When an instance is created for a class that has this slot, the default is automatically entered as the value of the slot.

  • The default value can be changed or overwritten.

  • The number of defaults should not exceed the at most value for the Cardinality of the slot.

When present, any Defaults are displayed in the Other Facets column of the Template Slots pane in the Classes tab.

Domain

The set of classes where the slot is attached is called the domain of the slot. For example, the slot urgent is attached to a single class, Content, while the slot name is attached to a number of classes:

Domain field for "urgent"
Domain field for "name"

See Adding a Slot to a Class for more information about editing the domain of a slot.

Viewing Several Slots

To view the information for several slots at once, select the slots at the Slots tab and click the View (slots_slot.view_top_level) slot button to open the Slot Editor for each slot. To highlight multiple slots, hold down the Ctrl (Cmd) key while clicking each slot. To highlight a range of slots, click the first slot, then hold down the Shift key and click the last slot in the range.

You can also view multiple slots using the View Top-level Slot (slots_slot.view_top_level) or View Slot Overrides (slots_slot.view_overrides) template slots buttons in the Template Slots pane.

Opening a new Slot Editor does not close the previous Editor. This allows you to compare the attributes for two or more slots. Edits can be made directly in any open Editor.

If you have multiple forms open, you can manage them as follows:

  • Cascade multiple forms by clicking the Cascade (windows_cascade_windows.gray) button below the main menu bar, or by selecting Cascade Windows from the Windows menu.

  • Close all open forms by clicking the CloseAllWindows (windows_close_all_windows) button below the main menu bar, or by selecting Close All Windows from the Windows menu.



The Value Type Menu

The Value Type menu in the Slot Editor allows you to select the slot value type, which determines the kind of values that the slot may hold. When a value type of Class, Instance, or Symbol is selected, an additional pane appears below the Value Type menu.

Value Type menu

When you are creating instances for a slot, the slot type also determines how the slot is displayed in the Instance Editor. See the Standard Widgets for more information about instances and type.

The following value types are available:

  • Any: the slot can take any of the values on the menu.

  • Boolean: a logical, Boolean value; i.e., a value that is either true or false

  • Class: the slot takes one or more classes as values

  • Float: the slot has a floating-point number as a value

  • Instance: the slot takes one or more instances as values

  • Integer: the slot takes an integer as a value

  • String: the slot takes ASCII text strings as values

  • Symbol: the slot takes values from a list of strings you define



The Any Value Type

A value type of Any means the slot can take any one of the other values: Boolean, Class, Float, Instance, Integer, String, or Symbol. Any allows you to create a generic slot for a high-level class and then determine the actual value type at a lower level.

If a class inherits a slot of type Any, then the slot may be modified by restricting it to one of the other types. This is the only case where the actual value type of an inherited slot can be changed.

For example, suppose you are modeling a taxonomy for all the vertebrates in an ecosystem, with specific species as the instances. You could create the slot Diet at the Vertebrate class level. Then:

  • for the subclass Carnivore, you could restrict the Diet slot to type Instance, so that you could select specific species already in your taxonomy as the diet

  • for the subclass Herbivore, you could restrict the Diet slot to type Symbol and list possible food plants by name

A class that has a slot of type Any cannot have instances.



The Boolean Value Type

A Boolean slot holds a logical Boolean value; that is, a value that is either true or false. To set the value type of a slot to Boolean:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Boolean from the Value Type menu.

  3. The Name of the slot will be used as a label for the checkbox; make sure this is what you want.

When an instance is created for a class with a Boolean slot, the instance entry field corresponding to the slot is a Boolean field and is displayed as a checkbox:

slots_boolean_unchecked

not Urgent

slots_boolean_checked

Urgent

For example, the Personals_Ad class contains the Boolean slot Urgent; the Silly instance of Personals_Ad is not Urgent, while the M137 instance is.



The Class Value Type

A slot of type Class has classes as values. Specifically, when Class is selected as the value type, you specify one or more allowed superclasses. An instance of this class then has a class entry field that takes one of these classes or any of their subclasses as the value(s) of the slot.

Setting the Value Type to Class

To set the value type of a slot to Class:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Class from the Value Type menu. The Allowed Superclasses pane will be displayed.

    Allowed Superclasses pane
  3. To add one or more allowed superclasses, click the Add Class (classes_class.add) button.

  4. Select the classes you want as allowed superclasses in the Select Classes dialog box. To select multiple classes, use the Ctrl (Cmd) key; to select a range, use the Shift key. When an instance is created, the only values that can appear in the entry field corresponding to this slot will be the listed classes and their subclasses.

    Select Classes dialog
  5. Click OK.

Removing an Allowed Superclass

To remove a class from the list of allowed superclasses for a slot of type Class:

  1. Select the classes to remove in the Allowed Superclasses pane. To highlight multiple classes, use the Ctrl (Cmd) key. To highlight a range of classes, use the Shift key.

  2. Click the Remove Class (classes_class.remove) button at the top of the Allowed Superclasses pane.

Example

For example, the Wines project is a knowledge base which includes, among other information:

  • the class Winery, which has wineries as instances

  • the class Wine region, which has a subclass hierarchy of regions. For example, Wine region has the subclass French region, which in turn has subclasses such as Bordeaux region and Loire region.

  • The slot location, which is of type Class, with Wine Region as the Allowed Superclasses. location is attached to the Winery class.

Slot Editor

When a user creates an instance for Winery, the entry field corresponding to the location slot is a Class Entry field. A user can choose the region from the list of classes subordinate to and including Wine region.

Select Class dialog, "Wine region" selected
Instance Editor



The Float Value Type

A slot of type Float has numbers as values; these numbers may include a decimal point. Values of type Float are stored on your system as floating-point values, and are only as accurate as the representation used by your system.

Setting the Value Type to Float

To set the value type of a slot to Float:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Float from the Value Type menu.

  3. Fill in the other facets of the slot as desired.

Minimum and Maximum Values

For slots of type Float, you can enter a Minimum and/or Maximum value. See The Slot Editor for more information:

  • Minimum allows you to specify a minimum value for your slot. When an instance is created for a class with this slot, the value of the slot must be greater than or equal to the minimum. For example, a minimum of zero means instances cannot have negative values.

  • Maximum allows you to specify a maximum value for your slot. When an instance is created for a class with this slot, the value of the slot must be less than or equal to the maximum.

  • Together, Minimum and Maximum can be used to define an allowable range.

When present, the Minimum and/or Maximum values are displayed in the last column of the Template Slots pane.

Entering Floating-Point Numbers for an Instance

When entering a Float value for an instance, you can use decimal point or exponential representation. You can enter positive and negative values. For example:

Representation Description
1234.56 Standard decimal notation.
1.23456E3 or 1.2345e3

Exponential notation; the example is shorthand for 1.23456 · 103. Represents 1234.56 (For convenience in typing, you can enter a lower case e, instead of an uppercase E.)

-1234.56 Negative number.
1.23456E-3 or 1.2345e-3

Exponential notation with a negative exponent, shorthand for 1.23456 · 10-3. Represents 0.00123456.



The Instance Value Type

A slot of type Instance has instances as values. More specifically, when Instance is selected as the value type, you specify one or more allowed classes. An instance of the class with this slot then takes instances of the allowed classes or of their subclasses as the value(s) of the slot.

Setting the Value Type to Instance

To set the value type of a slot to Instance:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Instance from the Value Type menu. The Allowed Classes pane will be displayed.

    Slot Editor, "Instance" selected
  3. To add one or more allowed classes, click the Add Class (classes_class.add) button.

  4. Select the classes you want as allowed classes in the Select Classes dialog box. To select multiple classes, use the Ctrl (Cmd) key; to select a range, use the Shift key.

    Select Classes dialog
  5. Click OK.

Removing an Allowed Class

To remove a class from the list of allowed classes for a slot of type Integer:

  1. Select the classes to remove. To highlight multiple classes, use the Ctrl (Cmd) key. To highlight a range of classes, use the Shift key.

  2. Click the Remove Class (classes_class.remove) button at the top of the Allowed Classes pane.

Example

In the Newspaper example, the slot responsible_for in the class Editor takes instances of the class Employee as values.

Slot Editor, "Instance" selected

The instance Chief_Honcho is responsible for two instances which are descended from Employee: Sports Nut and Ms Gardiner.

Responsible For pane



The Integer Value Type

An Integer slot holds an integer number value. (Recall that integer numbers are whole numbers that are positive, negative, or zero; they cannot include a decimal point. Values of type Integer are stored programmatically on your system as integer values.)

To set the value type of a slot to Integer:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Integer from the Value Type menu.

  3. Fill in the other facets of the slot as desired.

For slots of type Integer, you can enter a Minimum and/or Maximum value.

  • Minimum allows you to specify a minimum value for your slot. When an instance is created for a class with this slot, the value of the slot must be greater than or equal to the minimum. For example, a minimum of zero means instances cannot have negative values.

  • Maximum allows you to specify a maximum value for your slot. When an instance is created for a class with this slot, the value of the slot must be less than or equal to the maximum.

  • Together, Minimum and Maximum can be used to define an allowable range.

When present, the Minimum and/or Maximum values are displayed in the last column of the Template Slots pane.



The String Value Type

A slot of type String has text strings as values. You can enter ASCII characters for an instance, including upper and lowercase letters, numbers, and the basic symbols on the keyboard, such as !, _, and %. String values can also include spaces.

To set the value type of a slot to String:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select String from the Value Type menu.

  3. Fill in the other fields as desired.



The Symbol Value Type


Protege-Frames User's Guide
Slots
The Slots Tab
The Slot Browser
The Slot Buttons
The Slot Menu
The Slot Editor
The Value Type Menu
The Any Value Type
The Boolean Value Type
The Class Value Type
The Float Value Type
The Instance Value Type
The Integer Value Type
The String Value Type
The Symbol Value Type
Creating a New Slot
Viewing a Slot
Editing a Top-Level Slot
Overriding Slot Properties at a Class
Editing Slot Properties
Removing a Slot from a Class
Deleting a Slot from the Project
Adding a Slot to a Class
Removing Overrides From a Slot
Understanding Inverse Slots
Creating an Inverse Slot Relationship
Working with Subslots
Finding a Slot
The Slot Hierarchy Window
The Slot Icons
The Superslots Pane
Glossary, Editing Help

A slot of type Symbol allows you to create a predefined list of strings; an instance of a class chooses from among these strings. When Symbol is selected as the value type, the Allowed Values pane is displayed. An instance then takes string(s) from among the allowed values as the value(s) of the slot.

To set the value type of a slot to Symbol:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Symbol from the Value Type menu. The Allowed Values pane will be displayed.

  3. Create the values you want as the list of available values for a slot. To create a value:

    • Click the Create Value (all_object.add) button at the top of the Allowed Values pane.

    • Type the string you want in the Create Symbol window. You can enter ASCII characters, including upper and lowercase letters, numbers, and other common characters, such as !, _, and %.

    • Click OK.

  4. When you have created all the values you want for this symbol, fill in the other fields as desired.

To edit a pre-existing value:

  1. Click the View Value (all_object.view) button at the top of the Allowed Values pane.

  2. Edit the string in the Edit Symbol window.

  3. Click OK.

To remove a value from the list of values:

  1. Select the values to remove. To highlight multiple values, hold down the Ctrl (Cmd) key while clicking each value. To highlight a range of values, click the first value, then hold down the Shift key and click the last value in the range.

  2. Click the Remove Value (all_object.remove) button at the top of the Allowed Values pane.

Example

For example, the weekday slot at the class Prototype_Newspaper allows you to choose from among the seven days of the week: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.

"weekday" slot

An instance has a pop-up menu that allows a user to choose one of the symbol values for the slot:

Instance dialog, showing pop-up menu


Creating a New Slot

A new slot is created with a generic name, such as newspaper_Slot_1. There are three ways to create a slot:

  • By clicking the Create Slot (slots_slot.create) Slot button in the Slot pane of the Slots tab. This creates a slot, but does not assign it to any class. The slot can later be attached to one or more classes.

  • By right-clicking in the Slot Browser in the Slots tab and selecting Create slot from the Slot menu. This is identical to the previous operation.

    Slot menu, "Create Slot" selected
  • By selecting a class in the Classes tab and then clicking the Create Slot (slots_slot.create) button in the Template Slots pane. This creates a slot and attaches it to the selected class.

You can use the Slot Editor to edit the properties of the slot.



Viewing a Slot

You can view and edit a slot at two levels:

In either case, you can edit the properties of the slot directly in the Slot Editor. See Editing Slot Properties for more information. Any changes you enter into the Slot Editor take effect immediately. To make the changes permanent, save the project by selecting Save from the Project menu.



Editing a Top-Level Slot

Editing at the top-level changes the definition of the slot. The changes appear everywhere the slot occurs, including the Slots tab and all the classes that reference the slot.

You can edit the top-level properties of a slot in two locations:

From the Slots Tab

To edit the properties of a slot from the Slots tab:

  1. Select the slot you wish to edit in the Slot pane of the Slots tab.

  2. Click the View Slot (slots_slot.view_top_level) button or press Enter/Return. This will open the Slot Editor for the selected slot.

From the Template Slots Pane

To edit the top-level properties of a slot from the Template Slots pane in the Classes tab:

  1. Select a class in the Class Browser in the Classes tab.

  2. Select the slot you wish to edit in the Template Slots pane.

  3. Open the Slot Editor in one of the following ways:

    • Click the View Top-level Slot (slots_slot.view_top_level) Template Slot button at the upper right of the template Template Slots pane

    • or Double-click the slot and select View top-level slot in the Select Slot View dialog box, then click OK.

      Select Slot View dialog

You can also override the slot properties at a class and all of its subclasses without changing the top-level slot. See Overriding Slot Properties at a Class for more information.


Overriding Slot Properties at a Class

You can override slot properties by editing the slot at the class level. This allows you to be more restrictive about the slot facets relative to that class. A slot with overrides is shown with an override (slots_slot.overridden) icon in the Template Slots pane.

You can also edit the properties of a slot directly, instead of just overriding them at a class. See Editing a Top-level Slot for more information.

Overriding a Slot

To edit the slot properties for a specific class:

  1. Select a class in the Classes tab of the Class Browser.

  2. Select the slot you wish to edit in the Template Slots pane.

  3. Open the Slot Editor in one of the following ways:

    • Click the View Slot Overrides (slots_slot.view_overrides) Slot button at the upper right of the Template Slots pane.

    • Double-click the slot and select View slot at class in the Select Slot View dialog box, then click OK.

      Select Slot View dialog
  4. Change the desired properties in the Slot Editor. See Editing Slot Properties for more information.

After you have edited a slot at the class level, the slot will be displayed with an override (slots_slot.overridden) icon.

Scope

Overrides appear:

  • at the selected class

  • at all of its subclasses

Overrides do not appear:

  • at the Slots tab

  • at any superclasses

  • at any unrelated classes

Examples

  1. The slot employee_list is a slot of type Instance that takes the value Employee at the top level. By default, whenever you attach this slot to a class, it will range over the instances of Employee. Suppose, however, that for this class, you want to restrict the possible employees to salespeople. By overriding the slot, you can restrict the value range to the Salesperson subclass of Employee for the current class and its subclasses, without affecting the slot value range for any other class.

  2. Suppose you had a class of articles which appeared only on work days, not Saturday or Sunday. You could override the slot weekday at that class to remove Saturday and Sunday from the Symbol list for that class only, restricting the possibilities to working days. Once again, the top-level slot and its range at other classes will remain unchanged.

Restrictions

When you override a slot at a class, you can edit slot facets in the same way as you can at the top level. The override will not remove any existing restrictions, however, and may in fact tighten one or more of them:

  • The Name of an inherited slot cannot be changed.

  • For Cardinality, the slot may be changed from Multiple to Single, but not vice versa. The at least value may be increased; the at most value may be decreased.

  • For certain value types, some restrictions apply:

    • For a slot of type Any, the slot may be restricted to one of the other types (Boolean, Class, Float, Instance, Integer, String, or Symbol). You cannot change the type of slots other than type Any.

    • For a slot of type Class, the allowed superclasses can only be changed to subclasses of the allowed superclasses in the superclass.

    • For a slot of type Instance, the allowed classes can only be changed to subclasses of the allowed classes in the superclass.

  • A Minimum value (on types Integer or Float) may be created or increased.

  • A Maximum value (on types Integer or Float) may be created or decreased.

  • Default values cannot be removed.

Note: Currently, when you override a slot, Protege-Frames does not enforce the restrictive property. That is, you could theoretically expand or change the facets of a slot, rather than restricting them. However, it is not recommended that you do this, both because it is not good practice and because Protege-Frames may enforce restriction in the future.



Editing Slot Properties

You can edit the properties of a newly created or existing slot using the Slot Editor.

Slot Name

To change the name of a slot, edit the text in the Name field. Slot names are case sensitive. To distinguish slot names from class names, a recommended convention is to make slot names lowercase.

Value Type

To change the value type of the slot, select a different type from the Value Type menu. The available types are summarized in the following table:

Type Description Examples
Any Any of the types below (logical Union)  
Boolean Logical Value True, False
Class Class in the knowledge base Organization
Float Number with a decimal point 1.0, 3.4e10, -0.3e-3
Instance Instance of a class in the knowledge base instance_00010
Integer Whole number 1, 2, -4
String List of alphanumeric characters, possibly including spaces "John Doe"
Symbol Enumerated list of values, which may not include spaces red, blue, and green

Note: If you are editing the slot from a specific class, and the slot is inherited, the following restrictions apply:

  • For an inherited slot of type Any, you can select any one of the other types.

  • For an inherited slot of a value type other than Any, you cannot change the type of the slot. However, for slots of type Class, Instance, or Symbol, you can change the choices in the associated Allowed menu.

When a value type of Class, Instance, or Symbol is selected, an additional pane appears below the Value Type menu, as follows:

Value Type Associated Pane

Class

The Allowed Superclasses pane. See

     Setting the Value Type to Class

in the Value Type Class for information on how to add and remove allowed superclasses.

Instance

The Allowed Classes pane. See

     Setting the Value Type

for information on how to add and remove allowed classes.

Symbol

The Allowed Values pane. See The Symbol Value Type for information on how to add and remove allowed values.

Cardinality

To change whether or not a slot can be composed of more than one item, select a different option for the Cardinality.

Cardinality options

The default configuration allows the slot to have at most one value; that is, it can have one value or no value. You can change the default by entering a positive whole number in the at least and/or at most options, or by selecting the multiple option with no at most value.

  • To require a minimum number of values for the slot, enter a positive whole number in the at least entry bar. Setting at least equal to one requires a value for the slot. Setting at least equal to 1 and at most equal to 1 means that the slot must have exactly one value. If you enter a value for at least, required is automatically selected. If you set at least greater than one, multiple is automatically selected.

  • To allow the slot to have multiple values, select multiple.

  • To allow the slot to have multiple values, but to limit the number of values allowed, enter the maximum number of values in the at most entry var. If you set at most greater than one, multiple is automatically selected.

Note: If you are editing the slot for a specific class, and the slot is inherited, you cannot change the cardinality from single to multiple. The at least field must be greater than or equal to any inherited at least. The at most field must be less than or equal to any inherited at most.

Minimum (optional)

For a slot of type Integer or Float, you can change the minimum value by typing the new value in the Minimum field. If you are editing the slot for a specific class, and the slot is inherited, the new minimum value must be greater than or equal to the inherited minimum.

Maximum (optional)

For a slot of type Integer or Float, you can change the maximum value by typing the new value in the Maximum field. If you are editing the slot for a specific class, and the slot is inherited, the new maximum value must be less than or equal to the inherited maximum.

Defaults (optional)

Allows you to specify the default value(s) for a slot. When an instance is created for a class that has a slot with a defined default, the default value is automatically entered as the value of the slot. The default value can then be changed or overwritten.

For a slot with Single cardinality, Defaults must be a single value or no value; for a slot with Multiple cardinality, Defaults can be more than one item.

When present, any Defaults are displayed in the second-to-last column of the Template Slots pane in the Classes tab.

Documentation (optional)

You can change the text description of the slot directly in the documentation field.



Removing a Slot from a Class

You can remove a slot from a class without deleting it from the knowledge base. You can remove the association between a slot and a class in one of two ways:

  • removing the slot from the template slots of the class

  • removing the class from the domain of the slot

You can only remove a direct slot from a class; you may not remove an inherited slot. Removing a slot cannot be undone; you may wish to save or archive the project before removing slots.

Removing a Slot at a Class

To remove a slot from the list of template slots for a class:

  1. Display the Class Editor for the class which has the slot you want to remove. The slots for the class will be displayed in the Template Slots pane.

  2. Highlight the slot(s) you wish to remove in the Template Slots pane. To highlight multiple slots, hold down the Ctrl (Cmd) key while clicking each slot. To highlight a range of slots, click the first slot, then hold down the Shift key and click the last slot in the range.

  3. Click the Remove Slot (slots_slot.remove) Template Slot button. Any slots you removed no longer appear among the slots for the class. They are also removed from any subclasses of the class.

Removing a Class from the Domain of a Slot

To remove a class from the classes listed in the domain of a slot:

  1. Display the Slot Editor for the desired slot. The Domain is located at the bottom right of the Slot Editor.

  2. Select the class(es) you wish to remove from your slot. To remove more than one class, hold down Ctrl (Cmd) while clicking, or use the Shift key to select a range of classes.

  3. Click the Remove Class (classes_class.remove) button at the top right of the Domain facet.

You can also delete a slot from the entire knowledge base, using the Slots tab. See Deleting a Slot for more information.



Deleting a Slot from the Project

You can delete a slot so that it is no longer part of the knowledge base. Deleting a slot cannot be undone. You may wish to save or archive your project before deleting slots.

Deleting a Single Slot

To delete a single slot:

  1. In the Slots tab, highlight the slot which you want to remove.

  2. Click the Delete Slot (slots_slot.delete) button or click the right mouse button and select Delete selected slots from the Slot menu.

    Slot menu, "Delete Slot" selected

    The slot will no longer appear in the list of slots. It will also be removed from any classes where it appears.

Deleting Multiple Slots

To delete several slots at once:

  1. In the Slots tab, highlight the slots you wish to remove. To highlight multiple slots, hold down the Ctrl (Cmd) key while clicking each slot. To highlight a range of slots, click the first slot, then hold down the Shift key and click the last slot in the range.

  2. Click the Delete Slot (slots_slot.delete) button. The slots will no longer appear in the list of slots and will be deleted from any classes where they appear.

You can also remove a slot from a class where it appears without deleting it from the project. See Removing a Slot for more information.



Adding a Slot to a Class

You can attach a slot to one or more classes. For example, the Prototype_Newspaper class has a Weekday slot, which can be used to choose among the days of the week. If you were creating a new type of employee who wrote a weekly feature, you might want to reuse this slot. You can create an association between a slot and a class in one of two ways: attaching the slot to a class or adding a class to the domain of the slot.

Attaching a Slot to a Class

To attach a slot to a class:

  1. Display the Class Editor for the desired class.

  2. Click the Add Slot (slots_slot.add) button at the top right of the Template Slots pane. The Select Slots form will display all of the slots you can add to the class.

    Select Template Slots dialog
  3. Select the slot(s) you wish to add to your class. To add more than one slot, hold down Ctrl (Cmd) while clicking, or use the Shift key to select a range of slots.

  4. Click OK. The selected slot(s) are added to the Template Slots pane as directly attached slot(s), displayed with a blue rectangle (slots_slot) icon.

If you wish to edit or override a slot after adding it, double-click it or click the View Top-Level Slot (slots_slot.view_top_level) or the View Slot at Class (slots_slot.view_overrides) button to display the Slot Editor. See Viewing a Slot and Editing Slot Properties for more information.

Adding a Class to the Domain of a Slot

The domain of a slot (i.e., the list of the classes to which the slot is attached) is shown in the Domain facet of the Slot Editor. You can associate a slot to a class by adding the class to the domain of the slot:

  1. Display the Slot Editor for the desired slot. The Domain is located at the bottom right of the Slot Editor.

  2. Click the Add Class (classes_class.add) button at the top right of the Domain facet.

  3. Select the class(es) you wish to add to your slot. To add more than one class, hold down Ctrl (Cmd) while clicking, or use the Shift key to select a range of classes.

    Select Classes dialog
  4. Click OK. The selected class(es) are added to the Domain for the slot. If you view the Class Editor for the class(es), you will see the slot in the Template Slots pane.



Removing Overrides From a Slot

You can remove any class-level overrides from a slot, using the Remove Slot Overrides (slots_slot.remove_overrides) Template Slot button in the Template Slots pane.

To remove the slot overrides at a class:

  1. Select the class where you want to remove the overrides in the Class Browser.

  2. Select the slot whose overrides you wish to remove in the Template Slots pane. Overrides are indicated by the override (slots_slot.overridden) icon.

  3. Click the Remove Slot Overrides (slots_slot.remove_overrides) button at the upper right of the Template Slots pane. The overrides will be cleared from the slot at this class and all of its subclasses. The slot will now match the top-level definition. Any overrides created at an unrelated class will still exist.



Understanding Inverse Slots

This topic gives an overview of how to analyze a project and design inverse slots in Protege-Frames. An inverse slot relationship is a reciprocal relationship between two slots. Whenever one slot is filled in at one instance, its inverse slot is automatically filled in at another instance, according to the relationship you specified.

This topic describes the most common relationship - an inverse slot relationship between two instances, including the following steps: identifying an inverse relationship, analyzing the Protege-Frames components of the relationship, implementing the relationship in Protege-Frames.

You create inverse slots using the Inverse Slot widget in the Slot Editor. For more information on how to use the user interface, see Creating an Inverse Slot Relationship. Note that if you create an inverse slot relationship after one or more instances have been created, existing instances will not display the inverse slot information.

Example

For example, suppose you want to keep track at the section level of which editor(s) edit which section(s). There is already a slot named sections at the class Editor; it takes instances in the class Section as values:

sections slot

You could create an inverse slot named editor at the class Section which takes instances in the class Editor as values:

editor (inverse) slot

Now, when you edit the instance Mr. Science to assign the value Science to the slot sections, the inverse relationship is tracked by Protege-Frames. At the instance Science, Mr. Science automatically appears as a value for the slot editor.

Identifying the Relationship

First, you must determine if an inverse slot will appropriately represent the structure of your knowledge base. An inverse slot represents a reciprocal relationship that always occurs. For example, if Mr. Science edits the Science section, the Science section is edited by Mr. Science. Protege-Frames supports several different types of inverse relationships:

  1. The relationship must be reciprocal.

  2. The relationship can be a one-to-one correspondence, or one or both of the slots can have multiple values. For example, Chief Honcho edits a number of sections.

  3. The relationship can be between instances in different classes or instances in the same class. For example, likes and is_liked_by would be a relationship where the slot and its inverse slot are both attached to Person.

  4. A slot can be its own inverse. shares_ an_ office_ with would be a candidate for an inverse relationship where the inverse slot was identical with the original slot. This is a stronger tie than simply having instances in the same class.

Analyzing the Relationship for Protege-Frames

Once you have identified the relationship in your ontology, you need to analyze it in terms of your Protege-Frames project. For an inverse slot relationship between Instance slots, determine the following:

  • What Protege-Frames class(es) do you want for the first set of instances? We will call this first list of classes Class_List_A.

    • Make sure to choose a class or classes that are appropriate for the project.

    • It is most important to choose a class list that is not too small; that is, you need to select a list of classes such that every possible instance is in one of those classes.

    • At the same time, for simplicity, you want the class list to be focused on the instances and not be too broad.

    • This list may consist of a single class. For example, in the newspaper project, one of the reporters, Larry Tennis-Nut, is an eager beaver and sometimes edits the Sports section. It would make sense to expand the list of classes to Editor and Reporter. However, no salesmen or columnists are allowed to edit a section. Therefore, while it would be possible to simply use the class Employee, it is cleaner not to.

  • If the second set of instances is different from the first, perform the same analysis for the second set of instances. Call this second list of classes Class_List_B.

    • As before. this list may be a single class.

    • This list may be identical to Class_List_A.

Steps Required for Implementing the Relationship

In this example, we will restrict ourselves to instances in the class Section.

The following steps are necessary to create an inverse slot relationship in a Protege-Frames project:

  1. Create a slot of type Instance whose allowed classes are Class_List_A. We'll call this the original_slot.

  2. Create another slot of type Instance whose allowed classes are Class_List_B. We'll call this the inverse_slot. If the information is important in your ontology, it is likely that one or both of these slots already exist in the project.

  3. Attach your Protege-Frames slots to the appropriate classes.

    • First, add original_slot to every class in Class_List_B. Recall that the target values of original_slot are in Class_List_A. Assigning the slot to Class_List_B is what creates the cross-connection between the classes.

    • Similarly, assign inverse_slot to every class in Class_List_A.

  4. Create the inverse relationship between inverse_slot and original_slot. (You can actually do this as soon as both slots are created.)

If you already have a slot original_slot of type Instance in your project and it already has the desired allowed classes and domain, you can create a new slot specifically as the inverse of original_slot. In this case, the inverse_slot has the following properties; you can edit them after creation if necessary:

  • inverse_slot is automatically attached to all classes in the list of allowed classes for original_slot.

  • its allowed classes automatically includes the list of all the classes where original_slot is attached.

For information on how to use the Protege-Frames interface to make an inverse slot, see Creating an Inverse Slot Relationship.



Creating an Inverse Slot Relationship

The Inverse Slots widget on the Slot Editor allows you to create an inverse relationship between two slots of type Class or Instance.

  • You can create an inverse slot relationship in one of two ways: linking two existing slots and creating a new slot as the inverse of an existing slot

  • You can also modify inverse slot relationships, removing the inverse slot link between two slots or replacing an inverse slot with another slot.

For an inverse relationship to work correctly, your two slots and the classes where they appear must be designed appropriately. For slots of type Instance, the following situation provides optimal results:

  • All classes where the first slot is attached (i.e., the domain of the slot) appear in the Allowed Classes pane for the second slot.

  • All classes where the second slot is attached appear in the Allowed Classes pane for the first slot.

However, depending on the structure of your knowledge base, this may not be appropriate or feasible. Other situations are also valid. For example, suppose slots A and B are inverse slots. If one of the allowed classes for slot A does not have B as one of its attached slots, all that happens is that inverse slot value does not get created for those instances. The inverse relationship will still work normally for those allowed classes that do have slot B attached.

A slot can have at most one inverse slot. For more information on designing an inverse slot relationship, see Understanding Inverse Slots.

Note that if you create an inverse slot relationship after instances have been created, existing instances will not display the inverse slot information.

Linking Two Existing Slots

To create an inverse slot relationship between two existing slots, the slots you choose must be of value type Class or Instance. To create the relationship:

  1. Open the Slot Editor for one of the two slots; it does not matter which one you choose. You can open the Slot Editor from the Classes tab or the Slots tab.

  2. Click the Add Slot (slots_slot.add) button at the right of the Inverse Slot field.

    Inverse Slot field

    Note: If the button is grayed out, you cannot create an inverse slot for the selected slot. Make sure that the slot is of type Class or Instance.

  3. Select the slot you want to use from the Select Slot dialog box. Only slots of type Class or Instance will appear.

    Select Slot dialog
  4. Click OK. The two slots will now be inverses of each other.

You can view the Slot Editor of the second slot by double-clicking on its name in the Inverse Slot field or by using the View Slot (slots_slot.view_top_level) button. You will see that it automatically has the first slot as its inverse slot. You may also wish to check that the Allowed Classes of each slot contains all the possible classes where the other slot will appear.

Creating a New Inverse Slot

To create a new slot and make it the inverse of a slot:

  1. Open the Slot Editor for the slot you want to create an inverse for. You can do this from either the Class tab or the Slots tab:

    • On the Slots tab, select the slot from the list of slots in the Slot Browser pane.

    • On the Classes tab, double-click the slot in the list of Template Slots (or select the slot in the list of Template Slots and click the "View Top-Level Slot" button).

  2. Click the Create Slot (slots_slot.create) button at the right of the Inverse Slot Editor.

    Inverse Slot bar

    Note: If the button is grayed out, you cannot create an inverse slot for the selected slot. Make sure it is of type Class or Instance.

  3. A new class of type Instance is created. The Slot Editor for the new slot opens automatically.

    inverse-of-sections dialog
  4. Name the slot.

  5. The classes where your original slot appears will be automatically entered in the Allowed Classes field. Modify this list if necessary.

  6. The classes in the Allowed Classes field of the original slot will be added to the Domain field. Modify this list if necessary. Remember that attaching a slot to a class also attaches it to all subclasses of the class.

  7. Make any other changes you wish to the slot definition.

Removing an Inverse Slot Relationship

Removing the inverse slot relationship removes the link between the two classes. Note that, if you remove an inverse slot relationship after instances have been created, existing values that were created by the inverse slot relationship are not removed. Removing an inverse slot only affects the values of new instances. To remove the inverse slot relationship between two slots:

  1. Highlight the Inverse Slot field in the Slot Editor for either one of the two slots.

  2. Click the Remove (slots_slot.remove) button at the right of the Inverse Slot field. The slot relationship will be removed.

Replacing an Inverse Slot

Replacing the inverse slot relationship at a slot removes the link to the original inverse slot and makes a link with a different, existing, slot. Note that, if you replace an inverse slot relationship after instances have been created, existing values that reflect the original (replaced) inverse slot relationship are retained. Replacing an inverse slot only affects the values of new instance. To replace an inverse relationship:

  1. Select the slot you want to have a different inverse.

  2. Click the Add Slot (slots_slot.add) button at the right of the Inverse Slot field.

  3. Select the slot you want from the Select Slot dialog box.

  4. Click OK. The new slot becomes the inverse slot of the current slot. The original inverse slot is now unlinked from the slot where you made the change and no longer has an inverse slot.



Working with Subslots

Normally, whenever you create a new slot, it is a top-level slot. However, you can also create a subslot of an existing slot.

Understanding Subslots

Subslots have the following characteristics:

  • When you first create a subslot, the subslot inherits the properties of the superslot. Only the name is different.

  • You can only modify a subslot to make it more restrictive than its superslot. You cannot make it less restrictive.

  • When you attach a superslot to a class, all of its subslots are attached.

Subslots allow you to do the following:

  • You can create two (or more) slots which share information, but where one slot (the subslot) is more restrictive.

  • You can attach multiple related properties, using a single slot. To do this, create a single superslot and then create subslots that define characteristics of the superslot. By attaching the superslot to a class, you automatically attach all of its subslots.

Creating a Subslot

To create a subslot of a slot:

  1. In the Slot tab, select the slot that you want as the superslot of your subslot.

  2. Click the right mouse button.

  3. Select Create Subslot from the Slot menu.

    Slot menu, "Create Subslot" selected
  4. The new slot is created as a subslot of the selected slot. Except for the name, when created, it has the same properties as its parent slot.

  5. You can use the Slot Editor to edit the properties of the new slot.

Restrictions on Edits

When you create a subslot, there are restrictions on the possible edits:

  • For Cardinality, the slot may be changed from Multiple to Single, but not vice versa. The at least value may be increased; the at most value may be decreased.

  • For certain value types, some restrictions apply:

    • For a slot of type Any, the slot may be restricted to one of the other types (Boolean, Class, Float, Instance, Integer, String, or Symbol). You cannot change the type of slots other than type Any.

    • For a slot of type Class or Instance, you cannot change the allowed classes.

  • A Minimum value (for types Integer or Float) may be created or increased.

  • A Maximum value (for types Integer or Float) may be created or decreased.

  • Default values cannot be removed.

These restrictions are similar to the restrictions on slot overrides, except that you can change the name of a subslot, and you cannot make any changes to the allowed classes of a subslot.



Finding a Slot

To find a slot by name in the Slot Browser:

  1. Type all or part of the name of the slot in the Slot lookup bar at the bottom of the Slot Browser.

    Slot lookup bar
  2. Press Enter/Return or click the Search for Slot (slots_slot.search) button. If there is one match, the slot will be highlighted. Otherwise, you will get a dialog box of all the matches, and you will be able to select one.

    Select from search results dialog



The Slot Hierarchy Window

The Slot Hierarchy window in the Slot Browser displays the slots for the project and allows you to rearrange your hierarchy using "drag-and-drop". By default, the Slot window displays the slot structure of your knowledge base, with all slots shown as descending, directly or indirectly, from the system slot :THING.

Slot Hierarchy window

Description

This window shows the following:

  • Subslots appear below their superslots and indented to the right.

  • Hierarchy icons indicate how much or how little of the hierarchy is displayed. An "expanded" (all_hierarchy.expanded) icon means all direct subslots of the slot are displayed. A "collapsed" (all_hierarchy.collapsed) icon means the slot has direct subslots which are not currently displayed. Clicking on either icon toggles it to the other. If no icon is displayed, the slot has no direct subslots.

    Tip: You can also display all slots below a slot by right-clicking the slot and selecting Expand from the cascading Slot menu.

  • The currently selected slot is shown with a highlight.

  • Slots with more than one superslot appear more than once in the tree.

  • Slot icons show information about your slot.

  • If a slot has an inverse slot, the name of the inverse slot is shown after the slot name:

    slot entry with inverse slot

Tasks

The Slot Hierarchy window allows you to perform the following tasks:

  • You can select a slot by clicking on it.

  • You can edit the attributes of a slot in the Slot Editor. When a slot is selected, the Slot Editor appears to the right. You can also open the Slot Editor for one or more selected slots by clicking the View Slot (slots_slot.view_top_level) button.

  • You can create a new slot by clicking the Create Slot (slots_slot.create) button, then creating and editing its attributes in the Slot Editor.

  • You can delete a slot by clicking the Delete Slot (slots_slot.delete) button.

  • You can search for a slot by typing all or part of the slot name in the Slot lookup bar, then clicking the Search for Slot (slots_slot.search) button.

  • You can work with slot metaclasses, using the right mouse button. See the Slot menu for more information.

You can also rearrange the superslot/subslot relationships:

  • You can move a slot to another superslot by selecting the slot, dragging it directly over the new superslot, and then dropping it.

  • You can add an additional superslot to a slot by selecting the slot, dragging it over the additional superslot, and holding down the Ctrl (Cmd) key while you drop it.

For additional superslot tasks you can perform, see the Superslots pane.



The Slot Icons

The icons in the Slot Browser and the Template Slots pane give information about the slots. There are two types of icons: slot icons and hierarchy icons.

Slot Icons

These icons give information about a slot. When a class inherits a class from a superclass, icons in the Template Slots pane give information related to the inheritance and overrides; these icons are not shown anywhere else.

slots_slot

A blue rectangle indicates a slot. In the Template Slots pane, this icon means that the slot is direct; that is, it was attached directly to the selected class. responsible_for is a direct slot.

slots_slot.inherited

(Template Slots pane only) A bracketed icon means that the slot is inherited from one of the selected class's ancestors. Inherited slots can be edited, but not deleted; there are also some restrictions on the edits that are allowed.

slots_slot.inherited.overridden

(Template Slots pane only) A bracketed icon with an O inside it means the slot has overrides; that is, the slot is inherited and it has been modified at the class.

slots_slot.pale

A pale icon indicates a system slot or a slot that has been included from another project. These slots cannot be edited.

Hierarchy Icons

(Slot Browser only) If you have created any subslots, the following icons in the Slot Browser give information about the display of the slot hierarchy:

all_hierarchy.expanded

All direct subslots of the slot are displayed. You can click on this icon to hide the subslots.

all_hierarchy.collapsed

The slot has direct subslots which are not currently displayed. You can click on this icon to display the subslots.

No icon

The absence of an "expanded" (all_hierarchy.expanded) or a "collapsed" (all_hierarchy.collapsed) icon indicates that the slot has no subslots.



The Superslots Pane

The Superslots pane, at the bottom of the Slot Browser, displays all the superslots of the slot that is currently selected. This pane provides the interface for adding, locating, removing, or viewing superslots.

Slot Browser, including Superslots pane

Note: If you cannot see the Superslots pane, your window may be too small. You can see the pane by enlarging your window or by dragging the slider bar at the bottom of the Slot Browser. See Working With a Small Window for more information.

Viewing the List of Superslots

To see a list of all superslots of a given slot, highlight any occurrence of the slot in the Slot Browser. The Superslots pane automatically displays a list of all of the superslots of the selected slot.

Adding a Superslot

To add a superslot to the selected slot, click the Add Superslot (slots_slot.add) button, highlight the slot yo