edu.stanford.smi.protege.model
Interface Cls
- All Superinterfaces:
- Comparable, Frame, Instance, Serializable
- 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 |
getDirectInstances()
|
int |
getDirectSubclassCount()
|
Collection |
getDirectSubclasses()
|
int |
getDirectSuperclassCount()
|
Collection |
getDirectSuperclasses()
|
List |
getDirectTemplateFacetValues(Slot slot,
Facet facet)
see Frame for a description of the returned objects |
Collection |
getDirectTemplateSlots()
|
List |
getDirectTemplateSlotValues(Slot slot)
see Frame for a description of the returned objects |
Slot |
getInheritedBrowserSlot()
Deprecated. |
BrowserSlotPattern |
getInheritedBrowserSlotPattern()
|
int |
getInstanceCount()
|
Collection |
getInstances()
|
Collection |
getSubclasses()
Get all descendent classes for this class. |
Collection |
getSuperclasses()
Get all ancestors classes for this class. |
Collection |
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 |
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()
|
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)
|
void |
setAbstract(boolean v)
|
void |
setDirectBrowserSlot(Slot slot)
Deprecated. |
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.Frame |
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, delete, getBrowserText, getDefiningProjectURI, 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, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, markDeleted, moveOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setName, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible, shallowCopy |
addClsListener
public void addClsListener(ClsListener listener)
addDirectSuperclass
public void addDirectSuperclass(Cls cls)
addDirectTemplateSlot
public void addDirectTemplateSlot(Slot slot)
addTemplateFacetValue
public void addTemplateFacetValue(Slot slot,
Facet facet,
Object value)
addTemplateSlotValue
public void addTemplateSlotValue(Slot slot,
Object value)
createDirectInstance
public Instance createDirectInstance(String name)
getConcreteSubclasses
public Collection getConcreteSubclasses()
getBrowserSlot
public Slot getBrowserSlot()
- Deprecated.
getBrowserSlotPattern
public BrowserSlotPattern getBrowserSlotPattern()
getDirectBrowserSlot
public Slot getDirectBrowserSlot()
- Deprecated.
getDirectBrowserSlotPattern
public BrowserSlotPattern getDirectBrowserSlotPattern()
getInheritedBrowserSlot
public Slot getInheritedBrowserSlot()
- Deprecated.
getInheritedBrowserSlotPattern
public BrowserSlotPattern getInheritedBrowserSlotPattern()
getDirectInstanceCount
public int getDirectInstanceCount()
getDirectInstances
public Collection 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
public int getDirectSubclassCount()
getDirectSubclasses
public Collection getDirectSubclasses()
getDirectSuperclassCount
public int getDirectSuperclassCount()
getDirectSuperclasses
public Collection getDirectSuperclasses()
getDirectTemplateFacetValues
public List getDirectTemplateFacetValues(Slot slot,
Facet facet)
- see
Frame
for a description of the returned objects
getDirectTemplateSlots
public Collection getDirectTemplateSlots()
getDirectTemplateSlotValues
public List getDirectTemplateSlotValues(Slot slot)
- see
Frame
for a description of the returned objects
getInstanceCount
public int getInstanceCount()
getInstances
public Collection 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
public 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
public 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
public Collection getTemplateFacets(Slot slot)
getTemplateFacetValue
public Object getTemplateFacetValue(Slot slot,
Facet facet)
- see
Frame
for a description of the return type
getTemplateFacetValues
public Collection getTemplateFacetValues(Slot slot,
Facet facet)
- see
Frame
for a description of the return type
getTemplateSlotAllowedClses
public Collection getTemplateSlotAllowedClses(Slot slot)
- Returns:
- a Collection of
Cls
objects if the slot is of type INSTANCE. Undefined otherwise
getTemplateSlotAllowedParents
public Collection getTemplateSlotAllowedParents(Slot slot)
- Returns:
- a Collection of
Cls
objects if the slot is of type CLASS. Undefined otherwise
getTemplateSlotAllowedValues
public Collection getTemplateSlotAllowedValues(Slot slot)
- Returns:
- a Collection of Strings if the slot is of type SYMBOL. Undefined otherwise
getTemplateSlotAllowsMultipleValues
public boolean getTemplateSlotAllowsMultipleValues(Slot slot)
getTemplateSlotDefaultValues
public Collection getTemplateSlotDefaultValues(Slot slot)
- Returns:
- a Collection of java.lang.Objects. See
Frame
for a description of the object types.
getTemplateSlotDocumentation
public 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
public int getTemplateSlotMaximumCardinality(Slot slot)
- returns 0 if there is no maximum cardinality
getTemplateSlotMaximumValue
public Number getTemplateSlotMaximumValue(Slot slot)
getTemplateSlotMinimumCardinality
public int getTemplateSlotMinimumCardinality(Slot slot)
getTemplateSlotMinimumValue
public Number getTemplateSlotMinimumValue(Slot slot)
getTemplateSlots
public Collection getTemplateSlots()
getTemplateSlotValue
public Object getTemplateSlotValue(Slot slot)
- see
Frame
for a description of the return type
getTemplateSlotValues
public Collection getTemplateSlotValues(Slot slot)
- see
Frame
for a description of the return type
getTemplateSlotValueType
public ValueType getTemplateSlotValueType(Slot slot)
getVisibleDirectSubclassCount
public int getVisibleDirectSubclassCount()
getVisibleDirectSubclasses
public Collection getVisibleDirectSubclasses()
hasDirectlyOverriddenTemplateFacet
public 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
public 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
public boolean hasDirectSuperclass(Cls cls)
hasDirectTemplateSlot
public boolean hasDirectTemplateSlot(Slot slot)
hasInheritedTemplateSlot
public boolean hasInheritedTemplateSlot(Slot slot)
hasOverriddenTemplateFacet
public 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
public 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
public boolean hasSuperclass(Cls cls)
hasTemplateFacet
public boolean hasTemplateFacet(Slot slot,
Facet facet)
hasTemplateSlot
public boolean hasTemplateSlot(Slot slot)
isAbstract
public boolean isAbstract()
isClsMetaCls
public boolean isClsMetaCls()
isConcrete
public boolean isConcrete()
isDefaultClsMetaCls
public boolean isDefaultClsMetaCls()
isDefaultFacetMetaCls
public boolean isDefaultFacetMetaCls()
isDefaultSlotMetaCls
public boolean isDefaultSlotMetaCls()
isFacetMetaCls
public boolean isFacetMetaCls()
isMetaCls
public boolean isMetaCls()
isRoot
public boolean isRoot()
isSlotMetaCls
public boolean isSlotMetaCls()
moveDirectSubclass
public 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
public void moveDirectTemplateSlot(Slot slot,
int toIndex)
removeClsListener
public void removeClsListener(ClsListener listener)
removeDirectSuperclass
public void removeDirectSuperclass(Cls cls)
removeDirectTemplateSlot
public void removeDirectTemplateSlot(Slot slot)
removeTemplateFacetOverrides
public void removeTemplateFacetOverrides(Slot slot)
setAbstract
public void setAbstract(boolean v)
setDirectBrowserSlot
public void setDirectBrowserSlot(Slot slot)
- Deprecated.
setDirectBrowserSlotPattern
public void setDirectBrowserSlotPattern(BrowserSlotPattern pattern)
setDirectTypeOfSubclasses
public void setDirectTypeOfSubclasses(Cls metaCls)
setTemplateFacetValue
public void setTemplateFacetValue(Slot slot,
Facet facet,
Object value)
- see
Frame
for a description of the value type
setTemplateFacetValues
public void setTemplateFacetValues(Slot slot,
Facet facet,
Collection c)
- see
Frame
for a description of the value type
setTemplateSlotAllowedClses
public void setTemplateSlotAllowedClses(Slot slot,
Collection clses)
setTemplateSlotAllowedParents
public void setTemplateSlotAllowedParents(Slot slot,
Collection clses)
setTemplateSlotAllowedValues
public void setTemplateSlotAllowedValues(Slot slot,
Collection values)
setTemplateSlotAllowsMultipleValues
public void setTemplateSlotAllowsMultipleValues(Slot slot,
boolean b)
setTemplateSlotDefaultValues
public void setTemplateSlotDefaultValues(Slot slot,
Collection values)
- see
Frame
for a description of the value type
setTemplateSlotDocumentation
public void setTemplateSlotDocumentation(Slot slot,
String documentation)
setTemplateSlotDocumentation
public void setTemplateSlotDocumentation(Slot slot,
Collection documentation)
setTemplateSlotMaximumCardinality
public void setTemplateSlotMaximumCardinality(Slot slot,
int max)
- sets the maximum cardinality. max = 0 => no maximum
setTemplateSlotMaximumValue
public void setTemplateSlotMaximumValue(Slot slot,
Number max)
- sets the maximum slot value. max = null => no maximum
setTemplateSlotMinimumCardinality
public void setTemplateSlotMinimumCardinality(Slot slot,
int min)
- sets the minimum cardinality
setTemplateSlotMinimumValue
public void setTemplateSlotMinimumValue(Slot slot,
Number min)
setTemplateSlotValue
public void setTemplateSlotValue(Slot slot,
Object value)
- see
Frame
for a description of the value type
setTemplateSlotValues
public void setTemplateSlotValues(Slot slot,
Collection c)
- see
Frame
for a description of the value type
setTemplateSlotValueType
public void setTemplateSlotValueType(Slot slot,
ValueType valueType)
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.