|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Frame
The class `Frame' represents a frame (an instance of a FrameClass).
Field Summary | |
static boolean |
_markFramesAsInputModel
|
protected int |
_number
|
static int |
_numberOfFrames
|
Constructor Summary | |
Frame()
Constructs this frame. |
|
Frame(FrameClass frameClass)
Constructs this frame. |
|
Frame(java.lang.String frameClassName)
Constructs this frame. |
Method Summary | |
void |
addElementToSlotFiller(Slot aggSlot,
java.lang.Object element)
Adds an element to an aggregation slot filler. |
void |
addElementToSlotFiller(java.lang.String aggSlotName,
java.lang.Object element)
Adds an element to an aggregation slot filler. |
void |
aesf(java.lang.String aggSlotName,
java.lang.Object element)
A quick and dirty version of addElementToSlotFiller(String,Object) for brevity. |
void |
deleteElementFromSlotFiller(Slot aggSlot,
java.lang.Object element)
Deletes an element from an aggregation slot filler. |
void |
deleteElementFromSlotFiller(java.lang.String aggSlotName,
java.lang.Object element)
Deletes an element from an aggregation slot filler. |
void |
desf(java.lang.String aggSlotName,
java.lang.Object element)
A quick and dirty version of deleteElementFromSlotFiller(String, Object) for brevity. |
java.lang.String |
FILise(boolean HTML)
Returns an FIL reference to this frame. |
static void |
generateFIL(boolean HTML,
boolean suppress,
java.io.PrintWriter indexHTML)
Writes all frames in the system to a set of FIL files. |
void |
generateFIL(java.io.PrintWriter pw,
boolean HTML,
boolean suppress)
Writes the frame into an FIL file. |
FrameClass |
getFrameClass()
Returns the frame class of this frame. |
int |
getNumber()
Returns this frame's instance number (unique to the frame class). |
java.lang.Object |
getSlotFiller(Slot slot)
Returns the filler of a given slot. |
java.lang.Object |
getSlotFiller(java.lang.String slotName)
Returns the filler of a given slot. |
java.util.ListIterator |
getSlots()
Returns an iterator over the filled slots in this frame, in the order that they were filled. |
java.lang.Object |
gsf(java.lang.String slotName)
A quick and dirty version of getSlotFiller(String) for brevity. |
static void |
initialise()
Initialises the Jex subclasses of Frame, after loading the EXPRESS metamodel from EXPRESS/frame_classes.exp. |
boolean |
isCaseProblemPart()
Returns true just in case this frame is in the `problem' part of a case. |
boolean |
isInputModelFrame()
Returns true just in case this frame is marked as being from an input model (as opposed to from the frame class model, or part of a case). |
boolean |
isSlotSetDirectly(Slot slot)
Returns true just in case a given slot in this frame was written directly (i.e. |
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. |
void |
print(java.io.PrintStream ps)
Prints the frame in human-readable text form. |
static void |
remove(Frame frame)
Removes a frame from the index of its frame class. |
void |
setNumber(int number)
Gives this frame an instance number which is unique to this frame class. |
void |
setSlotFiller(Slot slot,
java.lang.Object filler)
Fills a given slot with a given value. |
void |
setSlotFiller(java.lang.String slotName,
java.lang.Object filler)
Fills a given slot with a given value. |
void |
ssf(java.lang.String slotName,
java.lang.Object filler)
A quick and dirty version of setSlotFiller(String,Object) for brevity. |
java.lang.String |
toString()
Returns a string representing this frame. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean _markFramesAsInputModel
public static int _numberOfFrames
protected int _number
Constructor Detail |
public Frame()
public Frame(FrameClass frameClass)
frameClass
- The frame class of the frame to be constructed,
which specifies the set of slots the frame should have.public Frame(java.lang.String frameClassName)
frameClassName
- The name of the frame class of the frame to
be constructed, which specifies the set of
slots the frame should have.Method Detail |
public static void initialise()
public FrameClass getFrameClass()
getFrameClass
in interface FrameInterface
public int getNumber()
public void setNumber(int number)
An
- instance number for this frame.public java.lang.Object getSlotFiller(Slot slot)
getSlotFiller
in interface FrameInterface
slot
- The slot whose filler you want to read.public java.lang.Object getSlotFiller(java.lang.String slotName) throws InvalidSlot
getSlotFiller
in interface FrameInterface
slot
- The name of the slot whose filler you want to read.InvalidSlot
- If the frame does not have a slot of that
name (as specified in its frame class).public java.lang.Object gsf(java.lang.String slotName)
slot
- The name of the slot whose filler you want to read.public void setSlotFiller(Slot slot, java.lang.Object filler)
setSlotFiller
in interface FrameInterface
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'.public void setSlotFiller(java.lang.String slotName, java.lang.Object filler) throws InvalidSlot
setSlotFiller
in interface FrameInterface
slotName
- 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.InvalidSlot
- If the frame does not have that slot
(as specified in its frame class).public void ssf(java.lang.String slotName, java.lang.Object filler)
slotName
- 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.public void addElementToSlotFiller(Slot aggSlot, java.lang.Object element)
aggSlot
- The aggregation slot you want to add an element to.element
- The element you want to add to the slot filler.public void addElementToSlotFiller(java.lang.String aggSlotName, java.lang.Object element) throws InvalidSlot
aggSlotName
- The name of the aggregation slot you want to add
an element to.element
- The element you want to add to the slot filler.InvalidSlot
- If the frame does not have that slot
(as specified in its frame class).public void aesf(java.lang.String aggSlotName, java.lang.Object element)
aggSlotName
- The name of the aggregation slot you want to add
an element to.element
- The element you want to add to the slot filler.public void deleteElementFromSlotFiller(Slot aggSlot, java.lang.Object element)
aggSlot
- The aggregation slot you want to delete an element
from.element
- The element you want to delete from the slot filler.public void deleteElementFromSlotFiller(java.lang.String aggSlotName, java.lang.Object element) throws InvalidSlot
aggSlot
- The name of the aggregation slot you want to delete
an element from.element
- The element you want to delete from the slot filler.InvalidSlot
- If the frame does not have that slot
(as specified in its frame class).public void desf(java.lang.String aggSlotName, java.lang.Object element)
aggSlot
- The name of the aggregation slot you want to delete
an element from.element
- The element you want to delete from the slot filler.public boolean isSlotSetDirectly(Slot slot)
slot
- A slot in this frame (presumably inverse).public java.util.ListIterator getSlots()
getSlots
in interface FrameInterface
public void markCaseProblemPart()
public boolean isCaseProblemPart()
public boolean isInputModelFrame()
public java.lang.String toString()
toString
in interface FrameInterface
toString
in class java.lang.Object
public void print(java.io.PrintStream ps)
print
in interface FrameInterface
ps
- A stream to print the frame to.public static void generateFIL(boolean HTML, boolean suppress, java.io.PrintWriter indexHTML)
HTML
- If true, files will be augmented with HTML tags and
have the extension .html instead of
.fil.suppress
- If true, only input model frames will be included
in the file (i.e. frame class model frames and
frames that are part of cases will be excluded).indexHTML
- The PrintWriter for index.html (optional).public void generateFIL(java.io.PrintWriter pw, boolean HTML, boolean suppress)
pw
- A file to generate the HTML into (with automatic line
flushing enabled).HTML
- If true, file will be augmented with HTML tags.suppress
- If true, only input model frames will be included
in the file (i.e. links to the frames representing
the frame classes and slots will be suppressed).public java.lang.String FILise(boolean HTML)
FILise
in interface FILisable
HTML
- If true, the FIL will be augmented with HTML tags.public static void remove(Frame frame)
frame
- The frame to remove.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |