Class Frame

java.lang.Object
   |
   +----Frame

public class Frame
extends Object
implements Serializable
The class `Frame' represents a frame (an instance of a FrameClass).


Variable Index

 o _number

Constructor Index

 o Frame(FrameClass, Hashtable)
Constructs this frame.
 o Frame(Hashtable)
Constructs this frame.

Method Index

 o generateFIL(boolean)
Writes all frames in the system to an FIL file, called <frame-class>.fil.
 o generateFIL(PrintWriter, boolean)
Writes the frame into an FIL file.
 o getFrameClass()
Returns the frame class of this frame.
 o getNumber()
Returns this frame's instance number (unique to the frame class).
 o getSlotFiller(Slot)
Returns the filler of a given slot.
 o getSlotFiller(String)
Returns the filler of a given slot.
 o getSlots()
Returns an enumeration of the filled slots in this frame.
 o initialise()
Initialises the exjava subclasses of Frame, after loading the EXPRESS metamodel from EXPRESS/frame_classes.exp.
 o isCaseProblemPart()
Returns true just in case this frame is in the `problem' part of a case.
 o isSlotSetDirectly(Slot)
Returns true just in case a given slot in this frame was written directly (i.e.
 o markCaseProblemPart()
Marks this frame as being in the problem part of a case, recursing for all frames in the slot fillers of this frame.
 o print(PrintStream)
Prints the frame in human-readable text form.
 o setNumber(int)
Gives this frame an instance number which is unique to this frame class.
 o setSlotFiller(Slot, Object)
Fills a given slot with a given value.
 o setSlotFiller(String, Object)
Fills a given slot with a given value.
 o setSlotFillerIndirectly(Slot, Object)
Fills a given slot with a given value indirectly (i.e.
 o toString()
Returns a string representing this frame.

Variables

 o _number
 protected int _number

Constructors

 o Frame
 protected Frame(Hashtable instanceData)
Constructs this frame. This method is called from the constructors of subclasses of Frame. It should be called with "new Hashtable" for instanceData.

Parameters:
instanceData - The initial slot fillers for the frame in a hash table which associates Slot objects with their filler values. The use of this parameter with any actual parameter other than "new Hashtable" is deprecated - construct the frame with a blank hash table instead, and use setSlotFiller to fill the slots after constructing the frame.
 o Frame
 public Frame(FrameClass frameClass,
              Hashtable instanceData) throws InvalidSlot
Constructs this frame.

Parameters:
frameClass - The frame class of the frame to be constructed, which specifies the set of slots the frame should have.
instanceData - The initial slot fillers for the frame in a hash table which associates Slot objects with their filler values. The use of this parameter with any actual parameter other than "new Hashtable" is deprecated - construct the frame with a blank hash table instead, and use setSlotFiller to fill the slots after constructing the frame.
Throws: InvalidSlot
If `instanceData' includes slots other than those specified in `frameClass'.

Methods

 o initialise
 public static void initialise()
Initialises the exjava subclasses of Frame, after loading the EXPRESS metamodel from EXPRESS/frame_classes.exp.

 o getFrameClass
 public FrameClass getFrameClass()
Returns the frame class of this frame.

Returns:
The frame class of this frame.
 o getNumber
 public int getNumber()
Returns this frame's instance number (unique to the frame class).

Returns:
s This frame's instance number.
 o setNumber
 public void setNumber(int number)
Gives this frame an instance number which is unique to this frame class.

Parameters:
An - instance number for this frame.
 o getSlotFiller
 public Object getSlotFiller(Slot slot)
Returns the filler of a given slot.

Parameters:
slot - The slot whose filler you want to read.
Returns:
The filler of `slot', as held in this frame.
 o getSlotFiller
 public Object getSlotFiller(String slotName) throws InvalidSlot
Returns the filler of a given slot.

Parameters:
slot - The name of the slot whose filler you want to read.
Returns:
The filler of the slot, as held in this frame.
Throws: InvalidSlot
If the frame does not have a slot of that name (as specified in its frame class).
 o setSlotFiller
 public void setSlotFiller(Slot slot,
                           Object filler)
Fills a given slot with a given value. Records this slot as having been written directly.

Parameters:
slot - The slot you want to write into.
filler - The filler (value) you want to write into `slot', which must be of the right type for `slot'.
 o setSlotFillerIndirectly
 public void setSlotFillerIndirectly(Slot slot,
                                     Object filler)
Fills a given slot with a given value indirectly (i.e. writing an inverse slot in response to writing its `FOR' slot). Doesn't record a direct write on this slot, and doesn't look for any inverses to fill (because an inverse attribute cannot be the `FOR' attribute of another inverse attribute).

Parameters:
slot - The slot you want to write into.
filler - The filler (value) you want to write into `slot', which must be of the right type for `slot'.
 o setSlotFiller
 public void setSlotFiller(String slotName,
                           Object filler) throws InvalidSlot
Fills a given slot with a given value.

Parameters:
slot - The name of the slot you want to write into.
filler - The filler (value) you want to write into the slot, which must be of the right type for the slot.
Throws: InvalidSlot
If the frame does not have that slot (as specified in its frame class).
 o isSlotSetDirectly
 public boolean isSlotSetDirectly(Slot slot)
Returns true just in case a given slot in this frame was written directly (i.e. not just filled in automatically as an inverse slot).

Parameters:
slot - A slot in this frame (presumably inverse).
Returns:
s Whether `slot' has been written directly in this frame.
 o getSlots
 public Enumeration getSlots()
Returns an enumeration of the filled slots in this frame.

Returns:
s An enumeration of the filled slots in this frame.
 o markCaseProblemPart
 public void markCaseProblemPart()
Marks this frame as being in the problem part of a case, recursing for all frames in the slot fillers of this frame.

 o isCaseProblemPart
 public boolean isCaseProblemPart()
Returns true just in case this frame is in the `problem' part of a case.

Returns:
s Whether this frame is in the `problem' part of a case.
 o toString
 public String toString()
Returns a string representing this frame. The format is frame-class#number.

Returns:
s The string representation of this frame.
Overrides:
toString in class Object
 o print
 public void print(PrintStream ps)
Prints the frame in human-readable text form. Any references are just printed as they are.

Parameters:
ps - A stream to print the frame to.
 o generateFIL
 public static void generateFIL(boolean HTML)
Writes all frames in the system to an FIL file, called <frame-class>.fil.

Parameters:
HTML - If true, file will be augmented with HTML tags.
 o generateFIL
 public void generateFIL(PrintWriter pw,
                         boolean HTML)
Writes the frame into an FIL file. Any references are given corresponding hypertext links if the HTML flag is true.

Parameters:
pw - A file to generate the HTML into (with automatic line flushing enabled).
HTML - If true, file will be augmented with HTML tags.