edu.stanford.smi.protege.model
Interface Slot
- All Superinterfaces:
- Comparable, Frame, Instance
- All Known Implementing Classes:
- DefaultSlot
- public interface Slot
- extends Instance
A top level slot object. Note that this object does not have "facet overrides" by itself. If you want to get facet
values at a class you need to call Cls.getTemplateFacetValues(Slot, Facet)
- Author:
- Ray Fergerson
Methods inherited from interface edu.stanford.smi.protege.model.Instance |
addDirectType, addInstanceListener, getDirectType, getDirectTypes, getReachableSimpleInstances, hasDirectType, hasType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes |
Methods inherited from interface edu.stanford.smi.protege.model.Frame |
addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, copy, deepCopy, delete, getBrowserText, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, 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, moveOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setEditable, setIncluded, setName, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible, shallowCopy |
addDirectSuperslot
public void addDirectSuperslot(Slot slot)
addSlotListener
public void addSlotListener(SlotListener listener)
getAllowedClses
public Collection getAllowedClses()
- Returns:
- Collection of
Clses
The behavior of this method is undefined if the slot is not of type Instance
getAllowedParents
public Collection getAllowedParents()
- Returns the classes which restrict the values that this slot can take. This slot will accept as a value any
Cls which has one of these values as its parent (or is itself one of these values).
- Returns:
- Collection of
Clses
The behavior of this method is undefined if the slot is not of type Class
getAllowedValues
public Collection getAllowedValues()
- Returns:
- Collection of Strings which are the allowed values of this slot.
The behavior of this method is undefined if the slot is not of type Symbol
getAllowsMultipleValues
public boolean getAllowsMultipleValues()
- Returns:
- whether or not this slot allows more than one value
getAssociatedFacet
public Facet getAssociatedFacet()
getDefaultValues
public Collection getDefaultValues()
getDirectSubslotCount
public int getDirectSubslotCount()
getDirectSubslots
public Collection getDirectSubslots()
getDirectSuperslotCount
public int getDirectSuperslotCount()
getDirectSuperslots
public Collection getDirectSuperslots()
hasDirectSuperslot
public boolean hasDirectSuperslot(Slot slot)
hasSuperslot
public boolean hasSuperslot(Slot slot)
moveDirectSubslot
public void moveDirectSubslot(Slot movedCls,
Slot afterCls)
getDocumentation
public Collection getDocumentation()
- Specified by:
getDocumentation
in interface Frame
getInverseSlot
public Slot getInverseSlot()
getMaximumCardinality
public int getMaximumCardinality()
getMaximumValue
public Number getMaximumValue()
getMinimumCardinality
public int getMinimumCardinality()
getMinimumValue
public Number getMinimumValue()
getSubslots
public Collection getSubslots()
getSuperslots
public Collection getSuperslots()
getTemplateSlotClses
public Collection getTemplateSlotClses()
- Deprecated. Use #getDirectDomain()
getDirectDomain
public Collection getDirectDomain()
getDomain
public Collection getDomain()
getValues
public Collection getValues()
- Returns the "template slot values" for a top level slot. Usually this is empty.
Beware: this method probably doesn't do what you think! It does NOT return own slot values at a particular frame.
To get own slot values at a class see
Frame.getOwnSlotValues(Slot)
What it does do is return the values which will become template slot values when this slot is attached to a class.
getValueType
public ValueType getValueType()
hasValueAtSomeFrame
public boolean hasValueAtSomeFrame()
removeDirectSuperslot
public void removeDirectSuperslot(Slot slot)
removeSlotListener
public void removeSlotListener(SlotListener listener)
setAllowedClses
public void setAllowedClses(Collection clses)
setAllowedParents
public void setAllowedParents(Collection parents)
setAllowedValues
public void setAllowedValues(Collection values)
setAllowsMultipleValues
public void setAllowsMultipleValues(boolean b)
setAssociatedFacet
public void setAssociatedFacet(Facet facet)
setDefaultValues
public void setDefaultValues(Collection values)
setDirectTypeOfSubslots
public void setDirectTypeOfSubslots(Cls cls)
setDocumentation
public void setDocumentation(String doc)
- Specified by:
setDocumentation
in interface Frame
setInverseSlot
public void setInverseSlot(Slot slot)
setMaximumCardinality
public void setMaximumCardinality(int max)
setMaximumValue
public void setMaximumValue(Number n)
setMinimumCardinality
public void setMinimumCardinality(int min)
setMinimumValue
public void setMinimumValue(Number n)
setValues
public void setValues(Collection values)
setValueType
public void setValueType(ValueType type)
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2005 Stanford University.