Protege 3.4.8

edu.stanford.smi.protege.model
Interface Cls

All Superinterfaces:
Comparable<Frame>, Frame, Instance
All Known Implementing Classes:
DefaultCls

public interface Cls
extends Instance

A frame which has one or more superclasses, may have subclasses, and which exhibits inheritance behavior (such as inheritance of slots). The specific inheritance behavior (such as propagation of slots and facets) are left unspecified by the interface. Note that Class is uniformly shortened to Cls in order to avoid conflicts with java.lang.Class and Object.getClass() See Frame for a discussion of "own" and "template" slots.

Author:
Ray Fergerson

Method Summary
 void addClsListener(ClsListener listener)
           
 void addDirectSuperclass(Cls cls)
           
 void addDirectTemplateSlot(Slot slot)
           
 void addTemplateFacetValue(Slot slot, Facet facet, Object value)
           
 void addTemplateSlotValue(Slot slot, Object value)
           
 Instance createDirectInstance(String name)
           
 Slot getBrowserSlot()
          Deprecated.  
 BrowserSlotPattern getBrowserSlotPattern()
           
 Collection getConcreteSubclasses()
           
 Slot getDirectBrowserSlot()
          Deprecated.  
 BrowserSlotPattern getDirectBrowserSlotPattern()
           
 int getDirectInstanceCount()
           
 Collection<Instance> getDirectInstances()
           
 Collection getDirectlyOverriddenTemplateFacets(Slot slot)
           
 int getDirectSubclassCount()
           
 Collection getDirectSubclasses()
           
 int getDirectSuperclassCount()
           
 Collection<Cls> getDirectSuperclasses()
           
 List getDirectTemplateFacetValues(Slot slot, Facet facet)
          see Frame for a description of the returned objects
 Collection<Slot> getDirectTemplateSlots()
           
 List getDirectTemplateSlotValues(Slot slot)
          see Frame for a description of the returned objects
 Slot getInheritedBrowserSlot()
          Deprecated.  
 BrowserSlotPattern getInheritedBrowserSlotPattern()
           
 int getInstanceCount()
           
 Collection<Instance> getInstances()
           
 Collection getOverriddenTemplateFacets(Slot slot)
           
 Collection getSubclasses()
          Get all descendent classes for this class.
 Collection getSuperclasses()
          Get all ancestors classes for this class.
 Collection<Facet> getTemplateFacets(Slot slot)
           
 Object getTemplateFacetValue(Slot slot, Facet facet)
          see Frame for a description of the return type
 Collection getTemplateFacetValues(Slot slot, Facet facet)
          see Frame for a description of the return type
 Collection getTemplateSlotAllowedClses(Slot slot)
           
 Collection getTemplateSlotAllowedParents(Slot slot)
           
 Collection getTemplateSlotAllowedValues(Slot slot)
           
 boolean getTemplateSlotAllowsMultipleValues(Slot slot)
           
 Collection getTemplateSlotDefaultValues(Slot slot)
           
 Collection getTemplateSlotDocumentation(Slot slot)
          Get free text documentation for this template slot.
 int getTemplateSlotMaximumCardinality(Slot slot)
          returns 0 if there is no maximum cardinality
 Number getTemplateSlotMaximumValue(Slot slot)
           
 int getTemplateSlotMinimumCardinality(Slot slot)
           
 Number getTemplateSlotMinimumValue(Slot slot)
           
 Collection<Slot> getTemplateSlots()
           
 Object getTemplateSlotValue(Slot slot)
          see Frame for a description of the return type
 Collection getTemplateSlotValues(Slot slot)
          see Frame for a description of the return type
 ValueType getTemplateSlotValueType(Slot slot)
           
 int getVisibleDirectSubclassCount()
           
 Collection getVisibleDirectSubclasses()
           
 Collection getVisibleTemplateSlots()
           
 boolean hasDirectlyOverriddenTemplateFacet(Slot slot, Facet facet)
          returns true if the facet is overridden on this slot relative to the value at this classes direct parent.
 boolean hasDirectlyOverriddenTemplateSlot(Slot slot)
          returns true if any facet of this slot at this class is directly overridden.
 boolean hasDirectSuperclass(Cls cls)
           
 boolean hasDirectTemplateSlot(Slot slot)
           
 boolean hasInheritedTemplateSlot(Slot slot)
           
 boolean hasOverriddenTemplateFacet(Slot slot, Facet facet)
          returns true if the facet is overridden on this slot relative to the value of the facets associated slot on the top-level slot.
 boolean hasOverriddenTemplateSlot(Slot slot)
          returns true if any facet of this slot at this class is overridden.
 boolean hasSuperclass(Cls cls)
           
 boolean hasTemplateFacet(Slot slot, Facet facet)
           
 boolean hasTemplateSlot(Slot slot)
           
 boolean isAbstract()
           
 boolean isClsMetaCls()
           
 boolean isConcrete()
           
 boolean isDefaultClsMetaCls()
           
 boolean isDefaultFacetMetaCls()
           
 boolean isDefaultSlotMetaCls()
           
 boolean isFacetMetaCls()
           
 boolean isMetaCls()
           
 boolean isRoot()
           
 boolean isSlotMetaCls()
           
 void moveDirectSubclass(Cls movedSubclass, Cls afterCls)
          Reorder the subclasses, moving movedSubclass so that it appears after afterCls .
 void moveDirectTemplateSlot(Slot slot, int toIndex)
           
 void removeClsListener(ClsListener listener)
           
 void removeDirectSuperclass(Cls cls)
           
 void removeDirectTemplateSlot(Slot slot)
           
 void removeTemplateFacetOverrides(Slot slot)
           
 Cls rename(String name)
          This is as close as we come to renaming a frame.
 void setAbstract(boolean v)
           
 void setDirectBrowserSlot(Slot slot)
           
 void setDirectBrowserSlotPattern(BrowserSlotPattern pattern)
           
 void setDirectTypeOfSubclasses(Cls metaCls)
           
 void setTemplateFacetValue(Slot slot, Facet facet, Object value)
          see Frame for a description of the value type
 void setTemplateFacetValues(Slot slot, Facet facet, Collection c)
          see Frame for a description of the value type
 void setTemplateSlotAllowedClses(Slot slot, Collection clses)
           
 void setTemplateSlotAllowedParents(Slot slot, Collection clses)
           
 void setTemplateSlotAllowedValues(Slot slot, Collection values)
           
 void setTemplateSlotAllowsMultipleValues(Slot slot, boolean b)
           
 void setTemplateSlotDefaultValues(Slot slot, Collection values)
          see Frame for a description of the value type
 void setTemplateSlotDocumentation(Slot slot, Collection documentation)
           
 void setTemplateSlotDocumentation(Slot slot, String documentation)
           
 void setTemplateSlotMaximumCardinality(Slot slot, int max)
          sets the maximum cardinality.
 void setTemplateSlotMaximumValue(Slot slot, Number max)
          sets the maximum slot value.
 void setTemplateSlotMinimumCardinality(Slot slot, int min)
          sets the minimum cardinality
 void setTemplateSlotMinimumValue(Slot slot, Number min)
           
 void setTemplateSlotValue(Slot slot, Object value)
          see Frame for a description of the value type
 void setTemplateSlotValues(Slot slot, Collection c)
          see Frame for a description of the value type
 void setTemplateSlotValueType(Slot slot, ValueType valueType)
           
 
Methods inherited from interface edu.stanford.smi.protege.model.Instance
addDirectType, addInstanceListener, getDirectType, getDirectTypes, getReachableSimpleInstances, hasDirectType, hasType, moveDirectType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, copy, deepCopy, delete, getBrowserText, getDirectOwnSlotValue, getDirectOwnSlotValues, getDocumentation, getFrameID, getIcon, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnFacetValue, getOwnFacetValues, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible, shallowCopy
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addClsListener

void addClsListener(ClsListener listener)

addDirectSuperclass

void addDirectSuperclass(Cls cls)

addDirectTemplateSlot

void addDirectTemplateSlot(Slot slot)

addTemplateFacetValue

void addTemplateFacetValue(Slot slot,
                           Facet facet,
                           Object value)

addTemplateSlotValue

void addTemplateSlotValue(Slot slot,
                          Object value)

createDirectInstance

Instance createDirectInstance(String name)

getConcreteSubclasses

Collection getConcreteSubclasses()

getBrowserSlot

Slot getBrowserSlot()
Deprecated. 


getBrowserSlotPattern

BrowserSlotPattern getBrowserSlotPattern()

getDirectBrowserSlot

Slot getDirectBrowserSlot()
Deprecated. 


getDirectBrowserSlotPattern

BrowserSlotPattern getDirectBrowserSlotPattern()

getInheritedBrowserSlot

Slot getInheritedBrowserSlot()
Deprecated. 


getInheritedBrowserSlotPattern

BrowserSlotPattern getInheritedBrowserSlotPattern()

getDirectInstanceCount

int getDirectInstanceCount()

getDirectInstances

Collection<Instance> getDirectInstances()
Returns:
a Collection of Instance The values returned are instances of this class but not instances of its subclasses. If you want instances of both a class and its subclasses see getInstances()

getDirectSubclassCount

int getDirectSubclassCount()

getDirectSubclasses

Collection getDirectSubclasses()

getDirectSuperclassCount

int getDirectSuperclassCount()

getDirectSuperclasses

Collection<Cls> getDirectSuperclasses()

getDirectTemplateFacetValues

List getDirectTemplateFacetValues(Slot slot,
                                  Facet facet)
see Frame for a description of the returned objects


getOverriddenTemplateFacets

Collection getOverriddenTemplateFacets(Slot slot)

getDirectlyOverriddenTemplateFacets

Collection getDirectlyOverriddenTemplateFacets(Slot slot)

getDirectTemplateSlots

Collection<Slot> getDirectTemplateSlots()

getDirectTemplateSlotValues

List getDirectTemplateSlotValues(Slot slot)
see Frame for a description of the returned objects


getInstanceCount

int getInstanceCount()

getInstances

Collection<Instance> getInstances()
Returns:
a Collection of Instance The values returned are instances of this class and all of its subclasses. If you want instances of just this class see getDirectInstances()

getSubclasses

Collection getSubclasses()
Get all descendent classes for this class. This includes children, grandchildren, etc. If you want only the children who directly inherit from this class then see getDirectSubclasses()

Returns:
a Collection of Cls

getSuperclasses

Collection getSuperclasses()
Get all ancestors classes for this class. This includes children, grandchildren, etc. If you want only the children who directly inherit from this class then see getDirectSubclasses()

Returns:
a Collection of Cls

getTemplateFacets

Collection<Facet> getTemplateFacets(Slot slot)

getTemplateFacetValue

Object getTemplateFacetValue(Slot slot,
                             Facet facet)
see Frame for a description of the return type


getTemplateFacetValues

Collection getTemplateFacetValues(Slot slot,
                                  Facet facet)
see Frame for a description of the return type


getTemplateSlotAllowedClses

Collection getTemplateSlotAllowedClses(Slot slot)
Returns:
a Collection of Cls objects if the slot is of type INSTANCE. Undefined otherwise

getTemplateSlotAllowedParents

Collection getTemplateSlotAllowedParents(Slot slot)
Returns:
a Collection of Cls objects if the slot is of type CLASS. Undefined otherwise

getTemplateSlotAllowedValues

Collection getTemplateSlotAllowedValues(Slot slot)
Returns:
a Collection of Strings if the slot is of type SYMBOL. Undefined otherwise

getTemplateSlotAllowsMultipleValues

boolean getTemplateSlotAllowsMultipleValues(Slot slot)

getTemplateSlotDefaultValues

Collection getTemplateSlotDefaultValues(Slot slot)
Returns:
a Collection of java.lang.Objects. See Frame for a description of the object types.

getTemplateSlotDocumentation

Collection getTemplateSlotDocumentation(Slot slot)
Get free text documentation for this template slot. Documentation is defined to return a collection only because it is so defined by the OKBC specification. Only the first value is used by Protege.

Returns:
a Collection of Strings.

getTemplateSlotMaximumCardinality

int getTemplateSlotMaximumCardinality(Slot slot)
returns 0 if there is no maximum cardinality


getTemplateSlotMaximumValue

Number getTemplateSlotMaximumValue(Slot slot)

getTemplateSlotMinimumCardinality

int getTemplateSlotMinimumCardinality(Slot slot)

getTemplateSlotMinimumValue

Number getTemplateSlotMinimumValue(Slot slot)

getTemplateSlots

Collection<Slot> getTemplateSlots()

getTemplateSlotValue

Object getTemplateSlotValue(Slot slot)
see Frame for a description of the return type


getTemplateSlotValues

Collection getTemplateSlotValues(Slot slot)
see Frame for a description of the return type


getTemplateSlotValueType

ValueType getTemplateSlotValueType(Slot slot)

getVisibleDirectSubclassCount

int getVisibleDirectSubclassCount()

getVisibleDirectSubclasses

Collection getVisibleDirectSubclasses()

getVisibleTemplateSlots

Collection getVisibleTemplateSlots()

hasDirectlyOverriddenTemplateFacet

boolean hasDirectlyOverriddenTemplateFacet(Slot slot,
                                           Facet facet)
returns true if the facet is overridden on this slot relative to the value at this classes direct parent.


hasDirectlyOverriddenTemplateSlot

boolean hasDirectlyOverriddenTemplateSlot(Slot slot)
returns true if any facet of this slot at this class is directly overridden. "directly overridden" means that the slot is overridden at this class relative to the direct parent class or classes.


hasDirectSuperclass

boolean hasDirectSuperclass(Cls cls)

hasDirectTemplateSlot

boolean hasDirectTemplateSlot(Slot slot)

hasInheritedTemplateSlot

boolean hasInheritedTemplateSlot(Slot slot)

hasOverriddenTemplateFacet

boolean hasOverriddenTemplateFacet(Slot slot,
                                   Facet facet)
returns true if the facet is overridden on this slot relative to the value of the facets associated slot on the top-level slot.


hasOverriddenTemplateSlot

boolean hasOverriddenTemplateSlot(Slot slot)
returns true if any facet of this slot at this class is overridden. "overridden" refers to an override relative to the top-level slot.


hasSuperclass

boolean hasSuperclass(Cls cls)

hasTemplateFacet

boolean hasTemplateFacet(Slot slot,
                         Facet facet)

hasTemplateSlot

boolean hasTemplateSlot(Slot slot)

isAbstract

boolean isAbstract()

isClsMetaCls

boolean isClsMetaCls()

isConcrete

boolean isConcrete()

isDefaultClsMetaCls

boolean isDefaultClsMetaCls()

isDefaultFacetMetaCls

boolean isDefaultFacetMetaCls()

isDefaultSlotMetaCls

boolean isDefaultSlotMetaCls()

isFacetMetaCls

boolean isFacetMetaCls()

isMetaCls

boolean isMetaCls()

isRoot

boolean isRoot()

isSlotMetaCls

boolean isSlotMetaCls()

moveDirectSubclass

void moveDirectSubclass(Cls movedSubclass,
                        Cls afterCls)
Reorder the subclasses, moving movedSubclass so that it appears after afterCls . If aftetCls is null then the movedSubclass appears first


moveDirectTemplateSlot

void moveDirectTemplateSlot(Slot slot,
                            int toIndex)

removeClsListener

void removeClsListener(ClsListener listener)

removeDirectSuperclass

void removeDirectSuperclass(Cls cls)

removeDirectTemplateSlot

void removeDirectTemplateSlot(Slot slot)

removeTemplateFacetOverrides

void removeTemplateFacetOverrides(Slot slot)

setAbstract

void setAbstract(boolean v)

setDirectBrowserSlot

void setDirectBrowserSlot(Slot slot)

setDirectBrowserSlotPattern

void setDirectBrowserSlotPattern(BrowserSlotPattern pattern)

setDirectTypeOfSubclasses

void setDirectTypeOfSubclasses(Cls metaCls)

setTemplateFacetValue

void setTemplateFacetValue(Slot slot,
                           Facet facet,
                           Object value)
see Frame for a description of the value type


setTemplateFacetValues

void setTemplateFacetValues(Slot slot,
                            Facet facet,
                            Collection c)
see Frame for a description of the value type


setTemplateSlotAllowedClses

void setTemplateSlotAllowedClses(Slot slot,
                                 Collection clses)

setTemplateSlotAllowedParents

void setTemplateSlotAllowedParents(Slot slot,
                                   Collection clses)

setTemplateSlotAllowedValues

void setTemplateSlotAllowedValues(Slot slot,
                                  Collection values)

setTemplateSlotAllowsMultipleValues

void setTemplateSlotAllowsMultipleValues(Slot slot,
                                         boolean b)

setTemplateSlotDefaultValues

void setTemplateSlotDefaultValues(Slot slot,
                                  Collection values)
see Frame for a description of the value type


setTemplateSlotDocumentation

void setTemplateSlotDocumentation(Slot slot,
                                  String documentation)

setTemplateSlotDocumentation

void setTemplateSlotDocumentation(Slot slot,
                                  Collection documentation)

setTemplateSlotMaximumCardinality

void setTemplateSlotMaximumCardinality(Slot slot,
                                       int max)
sets the maximum cardinality. max = 0 => no maximum


setTemplateSlotMaximumValue

void setTemplateSlotMaximumValue(Slot slot,
                                 Number max)
sets the maximum slot value. max = null => no maximum


setTemplateSlotMinimumCardinality

void setTemplateSlotMinimumCardinality(Slot slot,
                                       int min)
sets the minimum cardinality


setTemplateSlotMinimumValue

void setTemplateSlotMinimumValue(Slot slot,
                                 Number min)

setTemplateSlotValue

void setTemplateSlotValue(Slot slot,
                          Object value)
see Frame for a description of the value type


setTemplateSlotValues

void setTemplateSlotValues(Slot slot,
                           Collection c)
see Frame for a description of the value type


setTemplateSlotValueType

void setTemplateSlotValueType(Slot slot,
                              ValueType valueType)

rename

Cls rename(String name)
Description copied from interface: Frame
This is as close as we come to renaming a frame. Creates a clone of this with the new name and deletes this.

Specified by:
rename in interface Frame

Protege 3.4.8

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.