Class Slot

java.lang.Object
   |
   +----Slot

public class Slot
extends Object
implements Serializable
The class `Slot' represents a slot in a frame. It has a name and a type. Each frame class has a set of slots associated with it, which instances of the frame class can have fillers for.


Constructor Index

 o Slot(Attr, FrameClass, Express)
Constructs this slot by plugging in the given exjava Attr object which is taken to represent it (it does so by copying the reference, which is maximally efficient, but the client should not then alter the Attr directly, as that would compromise the integrity of the frame).

Method Index

 o getFrameClassDeclaredIn()
Returns the frame class in which this slot was declared (the supertype from which it is inherited).
 o getName()
Returns the name of this slot.
 o getSlotFrame()
Delivers up the underlying frame of this slot.
 o getType()
Returns the type of this slot.
 o isAggType()
Returns true just in case this slot is of an aggregation type (i.e.
 o lookupInverseSlot(String, String, FrameClass)
Looks up the inverse slot of a given slot in a given frame class whose filler is frame of a given frame class.
 o readClass(ObjectInput)
Deserialises the static data members (class variables) of Slot.
 o validFiller(Object)
Validates a potential slot filler.
 o writeClass(ObjectOutput)
Serialises the static data members (class variables) of Slot.

Constructors

 o Slot
 public Slot(Attr slotFrame,
             FrameClass frameClass,
             Express frameClassModel)
Constructs this slot by plugging in the given exjava Attr object which is taken to represent it (it does so by copying the reference, which is maximally efficient, but the client should not then alter the Attr directly, as that would compromise the integrity of the frame).

Parameters:
slotFrame - An exjava Attr object to wrap in this frame.
frameClass - The frame class to which this slot belongs.

Methods

 o getSlotFrame
 public Frame getSlotFrame()
Delivers up the underlying frame of this slot.

Returns:
The frame representing this slot.
 o getName
 public String getName()
Returns the name of this slot.

Returns:
The name of this slot.
 o getFrameClassDeclaredIn
 public FrameClass getFrameClassDeclaredIn()
Returns the frame class in which this slot was declared (the supertype from which it is inherited).

Returns:
The name of this slot.
 o getType
 public Object getType()
Returns the type of this slot.

Returns:
The type of this slot.
 o isAggType
 public boolean isAggType()
Returns true just in case this slot is of an aggregation type (i.e. to be filled by a set, bag, list or array).

Returns:
Whether this slot is of an aggregation type.
 o lookupInverseSlot
 public static Slot lookupInverseSlot(String frameClass,
                                      String slot,
                                      FrameClass slotFillerFrameClass)
Looks up the inverse slot of a given slot in a given frame class whose filler is frame of a given frame class.

Parameters:
frameClass - The name of the frame class the slot whose inverse is to be looked up is in.
slot - The name of the slot whose inverse is to be looked up.
slotFillerFrameClass - The frame class of the actual filler (must be a frame) of `slot'.
Returns:
The inverse slot of frameClass.slot for a filler of type slotFillerFrameClass, or null if there isn't one.
 o validFiller
 public boolean validFiller(Object filler)
Validates a potential slot filler. Returns true just in case the given object is of the right type to fill this slot (or a subtype thereof). Works either in the Java object sense (if the type of this slot is specified as a Class object) or in the frame sense (if the type of this slot is specified as a FrameClass object.

Parameters:
filler - A candidate filler for this slot.
Returns:
Whether `filler' could fill this slot.
 o writeClass
 public static void writeClass(ObjectOutput oo) throws IOException
Serialises the static data members (class variables) of Slot.

Parameters:
oo - An output stream to save the class data to.
Throws: IOException
If an I/O exception occurs.
 o readClass
 public static void readClass(ObjectInput oi) throws IOException
Deserialises the static data members (class variables) of Slot.

Parameters:
oi - An input stream to save the class data to.
Throws: IOException
If an I/O exception occurs.