|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nasa.arc.brahms.common.data.BrahmsObject
gov.nasa.arc.brahms.common.data.ModelElement
gov.nasa.arc.brahms.common.data.NamedModelElement
gov.nasa.arc.brahms.common.data.Activity
public class Activity
An activity represents an agent or object doing something.
| Field Summary |
|---|
| 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 | |
|---|---|
Activity()
Constructor, creates a new activity. |
|
Activity(java.lang.String name)
Constructor, creates a new activity with the specified name. |
|
Activity(java.lang.String file,
int line)
Constructor, creates a new activity declared in source code in the specified file at the specified line number. |
|
Activity(java.lang.String name,
java.lang.String file,
int line)
Constructor, creates a new activity with the specified name declared in source code in the specified file at the specified line number. |
|
| Method Summary | |
|---|---|
boolean |
addParameter(Parameter p)
Adds the specified Parameter as a declared parameter for the activity to the parameter list. |
void |
addReference(ActivityRef reference)
Adds the specified activity reference as a reference to this activity. |
static int |
convertWhenSymbolToInt(java.lang.String when)
Converts the when indicator represented as a symbol to an integer constant. |
IActivityCtx |
createContext()
Creates a new context for this activity 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.lang.String |
getActivityDescriptor()
Returns the activity descriptor for this activity. |
java.lang.Object |
getDisplayText()
Returns the activities display text, used to present the activity name in a user-friendly way. |
java.lang.String |
getFullyQualifiedName()
Returns the fully qualified name of the activity. |
Parameter |
getParameter(int i)
Returns the i-th parameter in the activities parameter list if a parameter with that index is declared |
Parameter |
getParameter(java.lang.String name)
Returns the parameter with the specified name if such a parameter is declared for the activity. |
int |
getParameterCount()
Returns the number of Parameters that are declared for this activity. |
java.util.Enumeration |
getParameters()
Returns a list of all the parameters declared for this activity. |
java.lang.Object |
getPriority()
Returns the activities priority |
java.lang.String |
getQualifiedName()
Returns the qualified name of the activity. |
java.util.Enumeration |
getReferences()
Returns a list of all the activity references referencing this activity. |
boolean |
hasParameters()
Indicates whether any Parameters are declared for this activity. |
boolean |
removeParameter(java.lang.String name)
Removes the parameter with the specified name as a declared parameter for this activity. |
void |
removeReference(ActivityRef reference)
Removes the specified activity reference as a reference to this activity. |
void |
setActivityDescriptor(java.lang.String descriptor)
Sets the activity descriptor for this activity. |
void |
setDisplayText(Parameter p)
Sets the activities display text, used to present the activity name in a user-friendly way. |
void |
setDisplayText(java.lang.String text)
Sets the activities display text, used to present the activity name in a user-friendly way. |
void |
setOwner(ActiveConcept c)
Sets the concept/owner for which the activity is declared. |
void |
setOwner(CompositeActivity act)
Sets the compisite activity as the owner in which the activity is declared. |
void |
setPriority(java.lang.Integer i)
Sets the activities priority. |
void |
setPriority(Parameter p)
Sets the activities priority. |
| Methods inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
|---|
getName, getOwner, 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 |
| Constructor Detail |
|---|
public Activity()
public Activity(java.lang.String name)
name - the name of the activity
public Activity(java.lang.String file,
int line)
file - the source file in which the activity is declaredline - the line number in the source file at which the activity is declared
public Activity(java.lang.String name,
java.lang.String file,
int line)
name - the name of the activityfile - the source file in which the activity is declaredline - the line number in the source file at which the activity is declared| Method Detail |
|---|
public static int convertWhenSymbolToInt(java.lang.String when)
type - the symbol representation
public void setActivityDescriptor(java.lang.String descriptor)
descriptor - the activity descriptorpublic java.lang.String getActivityDescriptor()
public java.lang.String getFullyQualifiedName()
getFullyQualifiedName in class NamedModelElementpublic java.lang.String getQualifiedName()
public boolean addParameter(Parameter p)
p - the Parameter to be added
public boolean removeParameter(java.lang.String name)
name - the name of the Parameter to be removed
public Parameter getParameter(java.lang.String name)
throws java.util.NoSuchElementException
name - the name of the requested Parameter
java.util.NoSuchElementException - if no Parameter with the specified name
is declared for this activity
public Parameter getParameter(int i)
throws java.util.NoSuchElementException
i - the zero-based index of the requested Parameter
java.util.NoSuchElementException - if no Parameter is declared for this activity
at the specified index.public java.util.Enumeration getParameters()
public boolean hasParameters()
public int getParameterCount()
public void setDisplayText(Parameter p)
p - the Parameter used to specify the activities display textpublic void setDisplayText(java.lang.String text)
setDisplayText in class NamedModelElementtext - String the display textpublic java.lang.Object getDisplayText()
getDisplayText in class NamedModelElementObject - a String if the actual display text is specified or a
Parameter if the display text is specified through an argument
for the parameterpublic void setPriority(Parameter p)
p - the Parameter used to specify the activities prioritypublic void setPriority(java.lang.Integer i)
i - the priority of the activity, 0 or higherpublic java.lang.Object getPriority()
Object - an Integer if the actual priority is specified or a
Parameter if the priority is specified through an argument
for the parameterpublic void setOwner(ActiveConcept c)
c - the owning ActiveConceptpublic void setOwner(CompositeActivity act)
act - the owning CompositeActivitypublic void addReference(ActivityRef reference)
reference - the ActivityRef referencing this activitypublic void removeReference(ActivityRef reference)
reference - the ActivityRef to be removed as a referencepublic java.util.Enumeration getReferences()
public void delete()
delete in class BrahmsObjectpublic IActivityCtx createContext()
Note: This method always returns a new instance and does not verify whether one is already created.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||