Class FrameClass

java.lang.Object
   |
   +----FrameClass

public class FrameClass
extends Object
implements Serializable
The class `FrameClass' represents a class of frames, serving to classify them and to specify the slots they should have.


Constructor Index

 o FrameClass(Entity, Express)
Constructs this frame class by plugging in the given exjava Entity 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 Entity directly, as that would compromise the integrity of the frame).

Method Index

 o addInstance(Frame)
Adds the given frame to the list of instances of this FrameClass.
 o generateFILforInstances(boolean)
Writes all instances of this frame class into an HTML document, called <frame-class>.html.
 o getAllFrameClasses()
Returns all the frame classes in the system.
 o getClassFrame()
Delivers up the underlying frame of this frame class.
 o getInstances()
Returns the instances of this frame class that have been created in the program's lifetime.
 o getName()
Returns the name of this frame class.
 o getSlot(String)
Looks up the slot with the given name.
 o getSlots()
Delivers up the slots in this frame.
 o getSuperClasses()
Delivers up this frame class' superclasses.
 o lookup(Entity, Express)
Looks up the frame class with name of the given entity.
 o lookup(String)
Looks up the frame class with the given name.
 o lookup(String, Express)
Looks up the frame class with the given name.
 o readClass(ObjectInput)
Deserialises the static data members (class variables) of FrameClass.
 o subsumes(FrameClass)
Does this frame class subsume another? Returns true just in case the given frame class is equal to or a subclass of this one.
 o toString()
Returns the name of this frame class.
 o validateFrame(Frame)
Checks that the given frame is a valid instance of this frame class, raising exceptions if it is not.
 o writeClass(ObjectOutput)
Serialises the static data members (class variables) of FrameClass.

Constructors

 o FrameClass
 public FrameClass(Entity classFrame,
                   Express frameClassModel)
Constructs this frame class by plugging in the given exjava Entity 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 Entity directly, as that would compromise the integrity of the frame).

Parameters:
classFrame - An exjava Entity object to wrap in this frame.
frameClassModel - The EXPRESS model in which this frame class is defined, in case it has any superclasses which haven't been constructed yet.

Methods

 o getClassFrame
 public Frame getClassFrame()
Delivers up the underlying frame of this frame class.

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

Returns:
The name of this frame class.
 o getSuperClasses
 public Vector getSuperClasses()
Delivers up this frame class' superclasses.

Returns:
A vector of this frame class' superclasses.
 o subsumes
 public boolean subsumes(FrameClass subClass)
Does this frame class subsume another? Returns true just in case the given frame class is equal to or a subclass of this one.

Parameters:
subClass - The frame class to test whether it is a subclass of this one.
Returns:
Whether this frame class does subsume `subClass'.
 o getSlots
 public Vector getSlots()
Delivers up the slots in this frame.

Returns:
A vector of the slots in this frame.
 o validateFrame
 public void validateFrame(Frame instance)
Checks that the given frame is a valid instance of this frame class, raising exceptions if it is not. Validation isn't actually implemented - this is just a hook.

Parameters:
instance - The frame to validate.
 o getInstances
 public Vector getInstances()
Returns the instances of this frame class that have been created in the program's lifetime.

Returns:
A vector of frames that are instances of this frame class.
 o addInstance
 public void addInstance(Frame frame) throws InvalidFrameClass
Adds the given frame to the list of instances of this FrameClass.

Parameters:
frame - The instance frame to add (must be of this frame class).
Throws: InvalidFrameClass
If the given frame is not of this frame class!
 o toString
 public String toString()
Returns the name of this frame class.

Returns:
s The string representation of this frame class.
Overrides:
toString in class Object
 o getSlot
 public Slot getSlot(String slotName) throws InvalidSlot
Looks up the slot with the given name.

Parameters:
slotName - The name of the slot to return.
Returns:
The Slot object whose name is `slotName'.
Throws: InvalidSlot
If the frame class does not have a slot of that name.
 o generateFILforInstances
 public void generateFILforInstances(boolean HTML)
Writes all instances of this frame class into an HTML document, called <frame-class>.html.

Parameters:
HTML - If true, file will be augmented with HTML tags.
 o getAllFrameClasses
 public static Enumeration getAllFrameClasses()
Returns all the frame classes in the system.

Returns:
An enumeration of all the frame classes in the system.
 o lookup
 public static FrameClass lookup(String frameClassName) throws FrameClassDoesNotExist
Looks up the frame class with the given name.

Parameters:
frameClassName - The name of the frame class to return.
Returns:
The FrameClass object whose name is `frameClassName'.
Throws: FrameClassDoesNotExist
If there is not a frame class of that name.
 o lookup
 public static FrameClass lookup(String frameClassName,
                                 Express frameClassModel) throws FrameClassDoesNotExist
Looks up the frame class with the given name.

Parameters:
frameClassName - The name of the frame class to return.
frameClassModel - The EXPRESS model in which `frameClassName' is defined, in case that frame class hasn't been constructed yet.
Returns:
The FrameClass object whose name is `frameClassName'.
Throws: FrameClassDoesNotExist
If there is not a frame class of that name.
 o lookup
 public static FrameClass lookup(Entity frameClassEntity,
                                 Express frameClassModel)
Looks up the frame class with name of the given entity.

Parameters:
frameClassEntity - The entity of the frame class to return.
frameClassModel - The EXPRESS model in which `frameClassName' is defined, in case that frame class hasn't been constructed yet.
Returns:
The FrameClass object constructed from `frameClassEntity'.
 o writeClass
 public static void writeClass(ObjectOutput oo) throws IOException
Serialises the static data members (class variables) of FrameClass.

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 FrameClass.

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