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.
-
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).
-
addInstance(Frame)
- Adds the given frame to the list of instances of this FrameClass.
-
generateFILforInstances(boolean)
- Writes all instances of this frame class into an HTML document,
called <frame-class>.html.
-
getAllFrameClasses()
- Returns all the frame classes in the system.
-
getClassFrame()
- Delivers up the underlying frame of this frame class.
-
getInstances()
- Returns the instances of this frame class that have been
created in the program's lifetime.
-
getName()
- Returns the name of this frame class.
-
getSlot(String)
- Looks up the slot with the given name.
-
getSlots()
- Delivers up the slots in this frame.
-
getSuperClasses()
- Delivers up this frame class' superclasses.
-
lookup(Entity, Express)
- Looks up the frame class with name of the given entity.
-
lookup(String)
- Looks up the frame class with the given name.
-
lookup(String, Express)
- Looks up the frame class with the given name.
-
readClass(ObjectInput)
- Deserialises the static data members (class variables) of
FrameClass.
-
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.
-
toString()
- Returns the name of this frame class.
-
validateFrame(Frame)
- Checks that the given frame is a valid instance of this frame class,
raising exceptions if it is not.
-
writeClass(ObjectOutput)
- Serialises the static data members (class variables) of FrameClass.
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.
getClassFrame
public Frame getClassFrame()
- Delivers up the underlying frame of this frame class.
- Returns:
- The class frame representing this frame class.
getName
public String getName()
- Returns the name of this frame class.
- Returns:
- The name of this frame class.
getSuperClasses
public Vector getSuperClasses()
- Delivers up this frame class' superclasses.
- Returns:
- A vector of this frame class' superclasses.
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'.
getSlots
public Vector getSlots()
- Delivers up the slots in this frame.
- Returns:
- A vector of the slots in this frame.
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.
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.
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!
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
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.
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.
getAllFrameClasses
public static Enumeration getAllFrameClasses()
- Returns all the frame classes in the system.
- Returns:
- An enumeration of all the frame classes in the system.
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.
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.
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'.
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.
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.