gov.nasa.arc.brahms.common.data
Class BFrame

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.data.ModelElement
          extended by gov.nasa.arc.brahms.common.data.NamedModelElement
              extended by gov.nasa.arc.brahms.common.data.BFrame
All Implemented Interfaces:
gov.nasa.arc.brahms.common.IConstants, java.io.Serializable
Direct Known Subclasses:
Thoughtframe, Workframe

public abstract class BFrame
extends NamedModelElement

class BFrame

Version:
$Revision: 1.3 $ $Date: 2011/10/28 13:35:25 $ $Author
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
static java.lang.String BODY_PROPERTY
          Body property for use with list change events
 
Fields inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement
NAME_PROPERTY
 
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML
 
Constructor Summary
BFrame()
           
BFrame(java.lang.String name)
           
BFrame(java.lang.String file, int line)
           
BFrame(java.lang.String name, java.lang.String file, int line)
           
 
Method Summary
protected  boolean addBodyElement(ModelElement elm)
           
 boolean addConsequence(Consequence con)
           
 boolean addPrecondition(Precondition pre)
           
 boolean addVariable(Variable var)
           
abstract  IFrameCtx createContext()
          Creates a new context for this frame for use in a virtual machine.
 void delete()
          Deletes this element from the model and removes all references to this element in other model elements.
 java.util.Enumeration getBody()
           
 ModelElement getBodyElement(int index)
          Returns the model element located at the specified position in the body.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name of the frame.
 int getNumberOfBodyElements()
          Returns the number of body elements in the frame.
 int getNumberOfPreconditions()
          Returns the number of preconditions in this frame.
 java.util.Enumeration getPreconditions()
          Returns an enumeration of the frame's preconditions.
 int getPriority()
           
 java.lang.String getQualifiedName()
          Returns the qualified name of the frame.
 Variable getVariable(java.lang.String name)
           
 java.util.Enumeration getVariables()
           
 boolean hasBody()
           
 boolean hasPreconditions()
           
 boolean hasVariables()
           
 boolean isRepeat()
           
protected  boolean removeBodyElement(ModelElement elm)
           
 boolean removeConsequence(Consequence con)
           
 boolean removePrecondition(Precondition pre)
           
 boolean removeVariable(java.lang.String name)
           
 void setOwner(CompositeActivity act)
           
 void setOwner(Concept concept)
           
 void setPriority(int p)
           
 void setRepeat(boolean value)
           
 
Methods inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement
getDisplayText, getName, getOwner, setDisplayText, setFullyQualifiedName, setName, setOwner, toString
 
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject
export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setID, setLine, setLoaded, setResolved, setSerialNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BODY_PROPERTY

public static final java.lang.String BODY_PROPERTY
Body property for use with list change events

See Also:
Constant Field Values
Constructor Detail

BFrame

public BFrame()

BFrame

public BFrame(java.lang.String name)

BFrame

public BFrame(java.lang.String file,
              int line)

BFrame

public BFrame(java.lang.String name,
              java.lang.String file,
              int line)
Method Detail

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
Returns the fully qualified name of the frame. The fully qualified name of an activity is the fully qualified name of its owner followed by the name of the frame.

Overrides:
getFullyQualifiedName in class NamedModelElement
Returns:
String the fully qualified name

getQualifiedName

public java.lang.String getQualifiedName()
Returns the qualified name of the frame. The qualified name of a frame is the qualified name of its owner followed by the name of the frame. If the owner is a concept the qualified name is the name of the frame. If the owner is a composite activity it is the qualified name of the composite activity followed by the name of the workframe. The qualified name differs from the fully qualified name in that it does not include the package and concept name.

Returns:
String the qualified name

setRepeat

public void setRepeat(boolean value)

isRepeat

public boolean isRepeat()

setPriority

public void setPriority(int p)

getPriority

public int getPriority()

addVariable

public boolean addVariable(Variable var)

removeVariable

public boolean removeVariable(java.lang.String name)

getVariable

public Variable getVariable(java.lang.String name)
                     throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasVariables

public boolean hasVariables()

getVariables

public java.util.Enumeration getVariables()

addPrecondition

public boolean addPrecondition(Precondition pre)

removePrecondition

public boolean removePrecondition(Precondition pre)

hasPreconditions

public boolean hasPreconditions()

getPreconditions

public java.util.Enumeration getPreconditions()
Returns an enumeration of the frame's preconditions. This method is thread safe. The method returns an enumeration of a copy of the precondition list.

Returns:
Enumeration an enumeration of Precondition

getNumberOfPreconditions

public int getNumberOfPreconditions()
Returns the number of preconditions in this frame.

Returns:
int the number of preconditions

addConsequence

public boolean addConsequence(Consequence con)

removeConsequence

public boolean removeConsequence(Consequence con)

addBodyElement

protected boolean addBodyElement(ModelElement elm)

removeBodyElement

protected boolean removeBodyElement(ModelElement elm)

getBodyElement

public ModelElement getBodyElement(int index)
                            throws java.util.NoSuchElementException
Returns the model element located at the specified position in the body.

Parameters:
index - the index of the requested model element (0 based)
Returns:
ModelElement the model element at the index position in the body
Throws:
java.util.NoSuchElementException - if the body does not have any elements or the index refers to an element that does not exist. The index is out of bounds.

getNumberOfBodyElements

public int getNumberOfBodyElements()
Returns the number of body elements in the frame.

Returns:
int the number of body elements.

hasBody

public boolean hasBody()

getBody

public java.util.Enumeration getBody()

setOwner

public void setOwner(Concept concept)

setOwner

public void setOwner(CompositeActivity act)

delete

public void delete()
Deletes this element from the model and removes all references to this element in other model elements.

Overrides:
delete in class BrahmsObject

createContext

public abstract IFrameCtx createContext()
Creates a new context for this frame for use in a virtual machine.

Note: This method always returns a new instance and does not verify whether one is already created.

Returns:
IFrameCtx a context for the frame


Copyright © 1997-2012 All Rights Reserved.