|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FrameClass
The class `FrameClass' represents a class of frames, serving to classify them and to specify the slots they should have.
Constructor Summary | |
FrameClass(jex.Entity fcEntity,
jex.Schema frameClassSchema)
Constructs this frame class by plugging in the given Jex 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 Summary | |
void |
addInstance(Frame frame)
Adds the given frame to the list of instances of this FrameClass. |
boolean |
anyInputModelFrames()
Returns true just in case this frame class has any instance frames from the actual input model. |
static void |
createFrameClasses(jex.Schema schema)
Create a FrameClass for every entity in a given schema. |
void |
generateFILforInstances(boolean HTML,
boolean suppress,
java.io.PrintWriter indexHTML)
Writes all instances of this frame class into a FIL file, called <frame-class>.fil. |
static java.util.Enumeration |
getAllFrameClasses()
Returns all the frame classes in the system. |
Frame |
getClassFrame()
Delivers up the underlying frame of this frame class. |
java.util.Vector |
getInstances()
Returns the instances of this frame class that have been created in the program's lifetime. |
java.lang.String |
getName()
Returns the name of this frame class. |
Slot |
getSlot(java.lang.String slotName)
Looks up the slot with the given name. |
java.util.Vector |
getSlots()
Delivers up the slots in this frame. |
java.util.Vector |
getSubClasses()
Returns the subclasses of this frame class. |
java.util.Vector |
getSuperClasses()
Returns the superclasses of this frame class. |
boolean |
isAbstract()
Returns true just in case this frame class is abstract (i.e. |
static FrameClass |
lookup(jex.Entity frameClassEntity,
jex.Schema frameClassSchema)
Looks up the frame class corresponding to the given entity, creating such a frame class if it doesn't exist yet. |
static FrameClass |
lookup(java.lang.String frameClassName)
Looks up the frame class with the given name. |
static FrameClass |
lookup(java.lang.String frameClassName,
jex.Schema frameClassSchema)
Looks up the frame class with the given name. |
static FrameClass |
lookupX(java.lang.String frameClassName)
Looks up the frame class with the given name, throwing an exception if no such frame class exists. |
static void |
readClass(java.io.ObjectInput oi)
Deserialises the static data members (class variables) of FrameClass. |
void |
removeInstance(Frame frame)
Removes the given frame from the list of instances of this FrameClass. |
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. |
java.lang.String |
toString()
Returns a string representation of this frame class. |
static void |
writeClass(java.io.ObjectOutput oo)
Serialises the static data members (class variables) of FrameClass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FrameClass(jex.Entity fcEntity, jex.Schema frameClassSchema)
fcEntity
- A Jex Entity object to wrap in this frame.frameClassSchema
- The EXPRESS schema in which this
frame class is defined, in case it has any superclasses which
haven't been constructed yet.Method Detail |
public Frame getClassFrame()
public java.lang.String getName()
public boolean isAbstract()
public java.util.Vector getSubClasses()
public java.util.Vector getSuperClasses()
public boolean subsumes(FrameClass subClass)
subClass
- The frame class to test whether it is a subclass of
this one.public java.util.Vector getSlots()
public java.util.Vector getInstances()
public boolean anyInputModelFrames()
public void addInstance(Frame frame) throws InvalidFrameClass
frame
- The instance frame to add (must be of this frame
class).InvalidFrameClass
- If the given frame is not of this
frame class!public void removeInstance(Frame frame) throws InvalidFrameClass
frame
- The instance frame to remove (must be of this frame
class).InvalidFrameClass
- If the given frame is not of this
frame class!public java.lang.String toString()
toString
in class java.lang.Object
public Slot getSlot(java.lang.String slotName) throws InvalidSlot
slotName
- The name of the slot to return.InvalidSlot
- If the frame class does not have a slot of
that name.public void generateFILforInstances(boolean HTML, boolean suppress, java.io.PrintWriter indexHTML)
HTML
- If true, the file 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 static void createFrameClasses(jex.Schema schema)
schema
- The schema.public static java.util.Enumeration getAllFrameClasses()
public static FrameClass lookup(java.lang.String frameClassName)
frameClassName
- The name of the frame class to return.lookup(String,Schema)
,
lookupX(String)
public static FrameClass lookupX(java.lang.String frameClassName) throws FrameClassDoesNotExist
frameClassName
- The name of the frame class to return.FrameClassDoesNotExist
- If no frame class of that name
exists already.lookup(String)
,
lookup(String,Schema)
public static FrameClass lookup(java.lang.String frameClassName, jex.Schema frameClassSchema) throws FrameClassDoesNotExist
frameClassName
- The name of the frame class to return.frameClassSchema
- The EXPRESS model in which `frameClassName'
is defined, in case that frame class hasn't been constructed yet.FrameClassDoesNotExist
- If no frame class of that name
exists already, and there is no entity of that name in the frame
class schema either.lookup(String)
public static FrameClass lookup(jex.Entity frameClassEntity, jex.Schema frameClassSchema)
frameClassEntity
- The entity of the frame class to return.frameClassSchema
- The EXPRESS model in which `frameClassName'
is defined, in case that frame class hasn't been constructed yet.public static void writeClass(java.io.ObjectOutput oo) throws java.io.IOException
oo
- An output stream to save the class data to.java.io.IOException
- If an I/O exception occurs.public static void readClass(java.io.ObjectInput oi) throws java.io.IOException
oi
- An input stream to save the class data to.java.io.IOException
- If an I/O exception occurs.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |