Algernon Tutorial 2.d
Macros involving classes and instances


previous   next

These exercises and examples use the newspaper project included in the examples folder of your Protege installation.

Except for :CHILD and :PARENT, all of the commands discussed on his page will work in two modes. If the clause is ground, it verifies that the given relationship exists in the KB. If the clause is not ground, it retrieves data from the KB. They can not be used to assert information into the KB.

:CHILD and :PARENT

:CHILD and :PARENT compare two frames across the class abstraction hierarchy without regard to whether the arguments are classes or instances.

:SUBCLASS, :SUPERCLASS and :CLASS, :INSTANCE

These return all subclasses or superclasses of a class (not just direct subclasses or superclasses), or all the classes of an instance, or all the instances of a class.

:DIRECT-CLASS and :DIRECT-INSTANCE

Returns direct classes of an instance, or direct instances of a class.

:DIRECT-SUBCLASS and :DIRECT-SUPERCLASS

Returns direct subclasses or superclasses of a class.

:ROOT-CLASS

Returns the root of the ontology tree above any frame.

:LEAST-COMMON-SUPERCLASS

Returns a class in the KB that is a superclass of both classes and that has no subclass that is also a superclass of both classes. Input can be classes or instances.

Related links


previous   next
Author: Micheal Hewett
Email: mhewett@users.sf.net
Last Updated: Monday, June 06, 2005