Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protege.model
Class DefaultSlot

    java.lang.Object
      edu.stanford.smi.protege.model.DefaultFrame
          edu.stanford.smi.protege.model.DefaultInstance
              edu.stanford.smi.protege.model.DefaultSlot

All Implemented Interfaces:
  Frame, Instance, Localizable, Slot, Serializable, Comparable<Frame>

    public class DefaultSlot

extends DefaultInstance
implements Slot

Default implementation of Slot interface. Forwards all method calls to its DefaultKnowledgeBase.

Author:
  Ray Fergerson
See Also:
  Serialized Form

Constructor Summary
`DefaultSlot()`
`DefaultSlot(KnowledgeBase kb, FrameID id)`

Method Summary
`void` | `addDirectSuperslot(Slot superslot)`
`void` | `addSlotListener(SlotListener listener)`
`Frame` | `deepCopy(KnowledgeBase kb, Map valueMap)` Create a "deep copy" of the frame.
`Collection` | `getAllowedClses()`
`Collection` | `getAllowedParents()` Returns the classes which restrict the values that this slot can take.
`Collection` | `getAllowedValues()`
`boolean` | `getAllowsMultipleValues()`
`Facet` | `getAssociatedFacet()`
`Collection` | `getDefaultValues()`
`Collection` | `getDirectDomain()`
`int` | `getDirectSubslotCount()`
`Collection` | `getDirectSubslots()`
`int` | `getDirectSuperslotCount()`
`Collection` | `getDirectSuperslots()`
`Collection` | `getDocumentation()`
`Collection` | `getDomain()`
`Icon` | `getIcon()`
`Slot` | `getInverseSlot()`
`int` | `getMaximumCardinality()`
`Number` | `getMaximumValue()`
`int` | `getMinimumCardinality()`
`Number` | `getMinimumValue()`
`Collection` | `getSubslots()`
`Collection` | `getSuperslots()`
`Collection` | `getTemplateSlotClses()` Deprecated.
`Collection` | `getValues()` Returns the "template slot values" for a top level slot.
`ValueType` | `getValueType()`
`boolean` | `hasDirectSuperslot(Slot slot)`
`boolean` | `hasSuperslot(Slot slot)`
`boolean` | `hasValueAtSomeFrame()`
`void` | `moveDirectSubslot(Slot slotToMove, Slot afterSlot)`
`void` | `removeDirectSuperslot(Slot superslot)`
`void` | `removeSlotListener(SlotListener listener)`
`Slot` | `rename(String name)` This is as close as we come to renaming a frame.
`void` | `setAllowedClses(Collection c)`
`void` | `setAllowedParents(Collection c)`
`void` | `setAllowedValues(Collection c)`
`void` | `setAllowsMultipleValues(boolean b)`
`void` | `setAssociatedFacet(Facet facet)`
`void` | `setDefaultValues(Collection values)`
`void` | `setDirectTypeOfSubslots(Cls cls)`
`void` | `setDocumentation(String doc)`
`void` | `setInverseSlot(Slot slot)`
`void` | `setMaximumCardinality(int max)`
`void` | `setMaximumValue(Number n)`
`void` | `setMinimumCardinality(int min)`
`void` | `setMinimumValue(Number n)`
`void` | `setValues(Collection values)`
`void` | `setValueType(ValueType type)`
`String` | `toString()`

Methods inherited from class edu.stanford.smi.protege.model.DefaultInstance
`addDirectType, addInstanceListener, copy, getBrowserText, getDirectType, getDirectTypes, getOwnFacetValue, getOwnFacetValues, getReachableSimpleInstances, hasDirectType, hasType, moveDirectType, removeDirectType, removeInstanceListener, setDirectType, setDirectTypes, shallowCopy`

Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame
`addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getFrameID, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, localize, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setSystem, setVisible`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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, delete, getBrowserText, getDirectOwnSlotValue, getDirectOwnSlotValues, getFrameID, 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, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible, shallowCopy`

Methods inherited from interface java.lang.Comparable
`compareTo`

Constructor Detail

### DefaultSlot

    public DefaultSlot(KnowledgeBase kb,
                       FrameID id)

### DefaultSlot

    public DefaultSlot()

Method Detail

### addDirectSuperslot

    public void addDirectSuperslot(Slot superslot)

  Specified by:
    `addDirectSuperslot` in interface `Slot`

### addSlotListener

    public void addSlotListener(SlotListener listener)

  Specified by:
    `addSlotListener` in interface `Slot`

### deepCopy

    public Frame deepCopy(KnowledgeBase kb,
                          Map valueMap)

  Description copied from interface: `Frame`
  Create a "deep copy" of the frame. If a frame has slot values that refer to SimpleInstances then these instances are duplicated as well. References to classes, slots, and facets are not duplicated. The copy of the frame is placed in the "kb" KnowledgeBase. To duplicate an instance into its own knowledgeBase you can pass in null for the kb. Always pass in null for the valueMap argument.

  Specified by:
    `deepCopy` in interface `Frame`
  Overrides:
    `deepCopy` in class `DefaultInstance`

### getAllowedClses

    public Collection getAllowedClses()

  Specified by:
    `getAllowedClses` in interface `Slot`
  Returns:
    Collection of `Clses` The behavior of this method is undefined if the slot is not of type Instance

### getAllowedParents

    public Collection getAllowedParents()

  Description copied from interface: `Slot`
  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).

  Specified by:
    `getAllowedParents` in interface `Slot`
  Returns:
    Collection of `Clses` The behavior of this method is undefined if the slot is not of type Class

### getAllowedValues

    public Collection getAllowedValues()

  Specified by:
    `getAllowedValues` in interface `Slot`
  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()

  Specified by:
    `getAllowsMultipleValues` in interface `Slot`
  Returns:
    whether or not this slot allows more than one value

### getAssociatedFacet

    public Facet getAssociatedFacet()

  Specified by:
    `getAssociatedFacet` in interface `Slot`

### getDefaultValues

    public Collection getDefaultValues()

  Specified by:
    `getDefaultValues` in interface `Slot`

### getDirectSubslotCount

    public int getDirectSubslotCount()

  Specified by:
    `getDirectSubslotCount` in interface `Slot`

### getDirectSubslots

    public Collection getDirectSubslots()

  Specified by:
    `getDirectSubslots` in interface `Slot`

### getDirectSuperslotCount

    public int getDirectSuperslotCount()

  Specified by:
    `getDirectSuperslotCount` in interface `Slot`

### getDirectSuperslots

    public Collection getDirectSuperslots()

  Specified by:
    `getDirectSuperslots` in interface `Slot`

### getDocumentation

    public Collection getDocumentation()

  Specified by:
    `getDocumentation` in interface `Frame`
  Specified by:
    `getDocumentation` in interface `Slot`
  Overrides:
    `getDocumentation` in class `DefaultFrame`

### getInverseSlot

    public Slot getInverseSlot()

  Specified by:
    `getInverseSlot` in interface `Slot`

### getMaximumCardinality

    public int getMaximumCardinality()

  Specified by:
    `getMaximumCardinality` in interface `Slot`

### getMaximumValue

    public Number getMaximumValue()

  Specified by:
    `getMaximumValue` in interface `Slot`

### getMinimumCardinality

    public int getMinimumCardinality()

  Specified by:
    `getMinimumCardinality` in interface `Slot`

### getMinimumValue

    public Number getMinimumValue()

  Specified by:
    `getMinimumValue` in interface `Slot`

### getSubslots

    public Collection getSubslots()

  Specified by:
    `getSubslots` in interface `Slot`

### getSuperslots

    public Collection getSuperslots()

  Specified by:
    `getSuperslots` in interface `Slot`

### hasDirectSuperslot

    public boolean hasDirectSuperslot(Slot slot)

  Specified by:
    `hasDirectSuperslot` in interface `Slot`

### hasSuperslot

    public boolean hasSuperslot(Slot slot)

  Specified by:
    `hasSuperslot` in interface `Slot`

### moveDirectSubslot

    public void moveDirectSubslot(Slot slotToMove,
                                  Slot afterSlot)

  Specified by:
    `moveDirectSubslot` in interface `Slot`

### getTemplateSlotClses

    public Collection getTemplateSlotClses()

  Deprecated.

  Specified by:
    `getTemplateSlotClses` in interface `Slot`

### getDirectDomain

    public Collection getDirectDomain()

  Specified by:
    `getDirectDomain` in interface `Slot`

### getDomain

    public Collection getDomain()

  Specified by:
    `getDomain` in interface `Slot`

### getValues

    public Collection getValues()

  Description copied from interface: `Slot`
  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.

  Specified by:
    `getValues` in interface `Slot`

### getValueType

    public ValueType getValueType()

  Specified by:
    `getValueType` in interface `Slot`

### hasValueAtSomeFrame

    public boolean hasValueAtSomeFrame()

  Specified by:
    `hasValueAtSomeFrame` in interface `Slot`

### removeDirectSuperslot

    public void removeDirectSuperslot(Slot superslot)

  Specified by:
    `removeDirectSuperslot` in interface `Slot`

### removeSlotListener

    public void removeSlotListener(SlotListener listener)

  Specified by:
    `removeSlotListener` in interface `Slot`

### setAllowedClses

    public void setAllowedClses(Collection c)

  Specified by:
    `setAllowedClses` in interface `Slot`

### setAllowedParents

    public void setAllowedParents(Collection c)

  Specified by:
    `setAllowedParents` in interface `Slot`

### setAllowedValues

    public void setAllowedValues(Collection c)

  Specified by:
    `setAllowedValues` in interface `Slot`

### setAllowsMultipleValues

    public void setAllowsMultipleValues(boolean b)

  Specified by:
    `setAllowsMultipleValues` in interface `Slot`

### setAssociatedFacet

    public void setAssociatedFacet(Facet facet)

  Specified by:
    `setAssociatedFacet` in interface `Slot`

### setDefaultValues

    public void setDefaultValues(Collection values)

  Specified by:
    `setDefaultValues` in interface `Slot`

### setDirectTypeOfSubslots

    public void setDirectTypeOfSubslots(Cls cls)

  Specified by:
    `setDirectTypeOfSubslots` in interface `Slot`

### setDocumentation

    public void setDocumentation(String doc)

  Specified by:
    `setDocumentation` in interface `Frame`
  Specified by:
    `setDocumentation` in interface `Slot`
  Overrides:
    `setDocumentation` in class `DefaultFrame`

### setInverseSlot

    public void setInverseSlot(Slot slot)

  Specified by:
    `setInverseSlot` in interface `Slot`

### setMaximumCardinality

    public void setMaximumCardinality(int max)

  Specified by:
    `setMaximumCardinality` in interface `Slot`

### setMaximumValue

    public void setMaximumValue(Number n)

  Specified by:
    `setMaximumValue` in interface `Slot`

### setMinimumCardinality

    public void setMinimumCardinality(int min)

  Specified by:
    `setMinimumCardinality` in interface `Slot`

### setMinimumValue

    public void setMinimumValue(Number n)

  Specified by:
    `setMinimumValue` in interface `Slot`

### setValues

    public void setValues(Collection values)

  Specified by:
    `setValues` in interface `Slot`

### setValueType

    public void setValueType(ValueType type)

  Specified by:
    `setValueType` in interface `Slot`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getIcon

    public Icon getIcon()

  Specified by:
    `getIcon` in interface `Frame`
  Overrides:
    `getIcon` in class `DefaultFrame`

### rename

    public Slot 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`
  Specified by:
    `rename` in interface `Slot`
  Overrides:
    `rename` in class `DefaultFrame`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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