Difference between revisions of "PrF UG meta standard class"

From Protege Wiki
Jump to: navigation, search
(Automated import of articles)
 
Line 4: Line 4:
 
{{PrF_UG_TOC_meta}}<div id='prf_ug'>
 
{{PrF_UG_TOC_meta}}<div id='prf_ug'>
  
By default,
+
By default, when a class is created as part of a project, {{#var:PrF}};
when a class is created as part of a project, {{#var:PrF}};
 
 
treats that class as an instance of the metaclass <b>:STANDARD-CLASS</b>.
 
treats that class as an instance of the metaclass <b>:STANDARD-CLASS</b>.
 
The slots of <b>:STANDARD-CLASS</b> define generic properties of the class.
 
The slots of <b>:STANDARD-CLASS</b> define generic properties of the class.
For example, <b>:NAME</b> is a slot of type <b>String</b> which you use to name your class; <b>:ROLE</b> is a slot of type <b>Symbol</b> which can take the values <b>Abstract</b> or <b>Concrete</b>.
+
For example, <b>:NAME</b> is a slot of type <b>String</b> which you use to name your class;
 +
<b>:ROLE</b> is a slot of type <b>Symbol</b>
 +
which can take the values <b>Abstract</b> or <b>Concrete</b>.
  
<div>[[Image:PrF_UG_meta_standard_class_editor.png|metaclasses_standard_class_editor]]</div>
+
<div>[[Image:PrF_UG_meta_standard_class_editor.png|
 +
      metaclasses_standard_class_editor]]</div>
  
Some template slots for <b>:STANDARD-CLASS</b> are translated to entry fields in the Class Editor.
+
Some template slots for <b>:STANDARD-CLASS</b> are translated
 +
to entry fields in the Class Editor.
 
The <b>:NAME</b> slot becomes the <b>Name</b> entry field,
 
The <b>:NAME</b> slot becomes the <b>Name</b> entry field,
 
while the <b>:ROLE</b> slot becomes the <b>Role</b> menu.
 
while the <b>:ROLE</b> slot becomes the <b>Role</b> menu.
Line 18: Line 21:
 
it also becomes an entry field in the Class Editor.
 
it also becomes an entry field in the Class Editor.
  
<div>[[Image:PrF_UG_classes_class_editor.png|classes_class_editor]]</div>
+
<div>[[Image:PrF_UG_classes_class_editor.png|
 +
      classes_class_editor]]</div>
  
 
The other slots are more complex.
 
The other slots are more complex.
For example,
+
For example, consider the <b>:DIRECT-SUPERCLASSES</b> slot.
consider the <b>:DIRECT-SUPERCLASSES</b> slot.
+
This slot keeps track of the direct superclasses of a class
This slot keeps track of the direct superclasses of a class by storing them as a list of instances.
+
by storing them as a list of instances.
Internal programmatic operations add
+
Internal programmatic operations add (delete) instances to (from)
(delete)
 
instances to
 
(from)
 
 
the appropriate slot value whenever you make changes to a {{#var:PrF}} project.
 
the appropriate slot value whenever you make changes to a {{#var:PrF}} project.
In this way, {{#var:PrF}} represents the structure of your project using its tools for storing and representing structure,
+
In this way, {{#var:PrF}} represents the structure of your project
 +
using its tools for storing and representing structure,
 
in much the same way you create the project structure.
 
in much the same way you create the project structure.
  
 
Since any new class is by default created using <b>:STANDARD-CLASS</b>,
 
Since any new class is by default created using <b>:STANDARD-CLASS</b>,
the Class Editor itself reflects the structure and layout specified for <b>:STANDARD-CLASS</b> at the Forms Tab.
+
the Class Editor itself reflects the structure and layout specified
 +
for <b>:STANDARD-CLASS</b> at the Forms Tab.
 
If you create a new project,
 
If you create a new project,
then
+
then [[PrF_UG_meta_customize_editor|modify the Class Editor]] at the Forms Tab,
[[PrF_UG_meta_customize_editor|modify the Class Editor]]
+
your modifications will show up for every class, whether existing or new.
at the Forms Tab,
 
your modifications will show up for every class,
 
whether existing or new.
 
  
 
</div>
 
</div>

Revision as of 11:03, October 16, 2008

Looking at :STANDARD-CLASS


Protege-Frames User's Guide
Metaclasses
Understanding Metaclasses
Example: Creating and Using a Metaclass
Looking at :STANDARD- CLASS
Creating a Metaclass
Creating a Class Using a Metaclass
Changing the Metaclass of a Class
Changing the Metaclass of Subclasses
Setting the Default Metaclass
Customizing the Class or Slot Editor
Understanding Slot Metaclasses
Creating a Slot Metaclass
Changing the Slot Metaclass of a Slot
Creating a Subslot Using a Slot Metaclass
Changing the Slot Metaclass of Subslots
Setting the Default Slot Metaclass
Glossary, Editing Help

By default, when a class is created as part of a project, Protege-Frames; treats that class as an instance of the metaclass :STANDARD-CLASS. The slots of :STANDARD-CLASS define generic properties of the class. For example, :NAME is a slot of type String which you use to name your class; :ROLE is a slot of type Symbol which can take the values Abstract or Concrete.

metaclasses_standard_class_editor

Some template slots for :STANDARD-CLASS are translated to entry fields in the Class Editor. The :NAME slot becomes the Name entry field, while the :ROLE slot becomes the Role menu. When you create or attach a template slot to a metaclass, it also becomes an entry field in the Class Editor.

classes_class_editor

The other slots are more complex. For example, consider the :DIRECT-SUPERCLASSES slot. This slot keeps track of the direct superclasses of a class by storing them as a list of instances. Internal programmatic operations add (delete) instances to (from) the appropriate slot value whenever you make changes to a Protege-Frames project. In this way, Protege-Frames represents the structure of your project using its tools for storing and representing structure, in much the same way you create the project structure.

Since any new class is by default created using :STANDARD-CLASS, the Class Editor itself reflects the structure and layout specified for :STANDARD-CLASS at the Forms Tab. If you create a new project, then modify the Class Editor at the Forms Tab, your modifications will show up for every class, whether existing or new.