PROMPT
Operations

Depending on the way you are working with your ontologies, you can copy,
merge, or move frames from your source ontologie(s) into your working project.
Except for the move operations, the source ontologie(s) remain unchanged. For
the move operations, if you move a frame from the source ontology, it is
removed from the source ontology and incorporated into the working project.
Notes
-
PROMPT keeps track of the original subclass–superclass relations and reestablishes
them. For example, suppose Dog was a subclass of Mammal
in the animals project. Suppose you copy Dog first (PROMPT
creates Dog--animals class), and then copy Mammal.
PROMPT will move Dog--animals to become a subclass of Mammal-animals.
-
You can perform multiple operations using the same source frame(s). For example,
you can copy a frame more than once; in this case, Protégé will append a
character to the name of the second copy to ensure that the frames in the working
ontology all have unique names. Or you could incorporate a copy of a frame into
the working ontology, and also merge that frame with another frame.
-
For merge and copy class operations, PROMPT will automatically copy any slots
directly attached to the source classes. By default, however, it will not copy
inherited slots. To have PROMPT copy all slots, whether directly attached or
inherited, select Consider inherited slots in the PROMPT Configuration Dialog Box.
-
PROMPT keeps the log (along with some statistics) in the <project-name>.mlog
file
The following PROMPT operations are available:
The operations available depend on your initial choice of how the mode for
incorporating your source ontologies into the working project. The available operations
for each type of PROMPT action are as follows:
Mode |
Available Operations |
merge mode |
merge classes,
merge slots,
merge instances
copy class,
copy slot, copy instance
remove parent |
extract mode |
copy class,
copy instance,
copy slot |
moving frames
mode |
move class,
move all instances of class, move instance,
move slot |
compare mode |
view only; no operations available |
For most operations, options allow you to choose whether you also want to
operate on related frames. You can set or change options using the New Operations Tab,
the Create Operation Dialog Box,
or the Edit Operation Dialog Box. See Creating an Operation
or Editing an Operation for more information.
Merge Operations
Merge operations take two frames of the same type from the ontologies
specified on the ontology menus and create a single frame that combines them in the working ontology. Merge
operations are only available for merge mode. They have
two arguments, which must be frames of the same type (i.e., two classes, two
slots, or two instances).
Most often, you will merge frames from the two source ontologies. However, by
changing the ontologies specified on the ontology menus, you can, for example,
merge two frames that are in the working ontology. You might do this, for
example, if you have already copied the frames from the source ontologies and
want to merge them. If you started with a non-empty working ontology, you can
also merge pre-existing frames within the working ontology.
Merge operations are as follows:
- Merge classes (merge only): merges two classes and
their slots. If the slots directly attached to the classes do not already exist in
the working ontology, PROMPT will copy the slots and attach them to the
merged class. (In some cases, it will suggest merging some of the copied
slots.) If the classes you are
merging have different names, documentation, or roles, PROMPT will ask you
to choose the name, documentation, or role for the merged class.
The following options are available:
- parents (up to the root): when copying the class, copy all its
parents as well
- subclasses: when copying the class, copy all its subclasses as
well
- instances: when copying the class, copy all its subclasses as
well
Note: The only classes that PROMPT will merge are the two
classes that are arguments to the operation. It will simply copy the
parents, subclasses, and instances of both arguments and make them parents,
subclasses, and instances of the merged class respectively.
- Merge slots (merge only): merges two slots. If the
original slots are attached to the same class and the constraints
(cardinality, value type, etc.) on slot values are different, PROMPT will
ask you to choose the set of constraints to use for the merged slot at that
class. If the original slots have different classes as the allowed classes
for slot values, PROMPT will suggest merging those classes
- Merge instances (merge only): merges two
instances. If the classes that are the types of these instances have not yet
been copied into the merged ontology, PROMPT will copy them. If
multiple-cardinality slots have different values in the argument instances,
PROMPT will put all the values in the slot. If a single-cardinality slot has
different values in the argument instances, PROMPT will ask you to choose
the value.
When you perform a merge operation, the merged frame is added to the working
ontology. It appears in the normal color of any frame and there is no indication
as to its source.
When you are merging
two frames with different names, documentation strings, or roles (that is,
different own slot values), PROMPT asks you to choose the value for the
merged frame. You can also set one of the two source onotogies as "preferred";
this tells PROMPT to
automatically choose the name, documentation, and role of the frame that
comes from the preferred ontology. See Configuring
Prompt for more information.
In the Source Knowledge Bases Window, the
source frames to the merge are marked with a mapped
icon to indicate that they have been mapped to the working ontology.
Copy Operations
Copy operations copy a frame from the source ontology to the working
ontology, leaving the source ontology unchanged. Copy operations have a single
argument. They are available for merge and extract modes.
- Copy class: copy a class and its slots from the source
ontology to the working ontology. If the slots directly attached to the class have
not yet been copied to the working ontology, PROMPT will copy the slots and
attach them to the copied class. If the classes that are used as allowed
classes or parents for the slot value type are not yet in the new ontology,
PROMPT will create temporary frames for them (as subclasses of
:DUMMY-FRAMES). When you copy these frames (or merge them with others),
PROMPT will automatically change the references in the allowed-classes and
parents lists and remove the temporary frames
The following options are available:
- parents (up to the root): when copying the class, copy all its
parents as well
- subclasses: when copying the class, copy all its subclasses as
well
- instances: when copying the class, copy all its instances as
well
- everything related: copy not only the class, but also all the
slots and classes that it references, all the slots and classes that
they reference, and so on (a transitive closure of all the references
excluding the subclass and instance relations).
- Copy slot (merge and extract): copy the slot from the source ontology to the
merged ontology. Allowed classes and parents are treated in the same way as
for "copy class".
The following options are available:
- parents (up to the root): when copying the slot, copy all its
superslots as well
- everything related: copy not only the slot, but also all the
slots and classes that it references, all the slots and classes that
they reference, and so on (a transitive closure of all the references
excluding the subclass and instance relations).
- Copy instance (merge and extract): copy the instance from the source ontology
to the merged ontology. If the class that is the direct type of this
instance has not yet been copied, copy that class as well.
The following options are available:
- everything related: copy not only the instance, but also all
the frames it references, all the frames that they reference, and so on
(a transitive closure of all the references excluding the subclass and
instance relations).
When you perform a copy operation, a copy of the selected frame is added to
the working ontology. It appears in color and there is a suffix indicating its
source. You can remove all the suffixes by
selecting Remove Suffixes from the Prompt Menu..
In the Source Knowledge Bases Window, the
source frame to the copy is marked with a mapped
icon, to indicate that it has been mapped to the working ontology.
Move Operations
Move operations remove a frame from an included ontology and move it to an
including ontology, altering both ontologies. Move operations have a
single argument. They are only available for moving
frames mode.
- Move class: moves a class and its slots from the included ontology to the
including ontology. If the slots attached to the class have
not yet been moved to the working ontology, PROMPT will move the slots and
attach them to the moved class.
The following options are available:
- parents (up to the root): when moving the class, move all its
superclasses as well
- everything related: move not only the class, but also all the
slots and classes that it references, all the slots and classes that
they reference, and so on (a transitive closure of all the references
excluding the subclass and instance relations).
- Move instance: move the instance from the included ontology
to the including ontology. If the class that is the direct type of this
instance has not yet been moved, move that class as well.
The following options are available:
- everything related: move not only the instance, but also all the
frames it references, all the frames that
they reference, and so on (a transitive closure of all the references
excluding the subclass and instance relations).
- Move all instances of class: move all instances of the selected class from
the included to the including ontology.
The following options are available:
- everything related: move not only the instances, but also all the
frames that they reference, and so on (a transitive closure of all the references
excluding the subclass relations).
- Move slot: move the slot from the included ontology to the including ontology.
The following options are available:
- parents (up to the root): when moving the slot, move all its
superslots as well
- everything related: move not only the slot, but also all the
slots and classes that it references, all the slots and classes that
they reference, and so on (a transitive closure of all the references
excluding the subclass and instance relations).
In the Source Knowledge Bases Window, the
source frame to the move is marked with a local
icon, to indicate that it is now local to the including ontology.
Remove Parent Operation
The remove parent operation allows you break cycles in the hierarchy created
during a merge.
- Remove parent: remove one of the superclasses of a class
from the superclass list to break a cycle in the hierarchy.
Next: Creating an Operation
Prompt Table of Contents