|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.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.Concept gov.nasa.arc.brahms.common.data.ActiveConcept
public abstract class ActiveConcept
An ActiveConcept defines a concept that can perform activities based on facts or beliefs.
Field Summary |
---|
Fields inherited from class gov.nasa.arc.brahms.common.data.Concept |
---|
ATTRIBUTES_PROPERTY, RELATIONS_PROPERTY |
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 | |
---|---|
ActiveConcept()
|
|
ActiveConcept(java.lang.String file,
int line)
|
|
ActiveConcept(java.lang.String name,
java.lang.String file,
int line)
|
Method Summary | |
---|---|
boolean |
addActivity(Activity act)
|
boolean |
addInitialBelief(InitialStatement belief)
|
boolean |
addInitialFact(InitialStatement fact)
|
boolean |
addThoughtframe(Thoughtframe frm)
|
boolean |
addWorkframe(Workframe frm)
|
void |
delete()
Deletes this element from the model and removes all references to this element in other model elements. |
java.util.Enumeration |
getActivities()
Returns an Enumeration of all the Activities declared for this concept. |
java.util.Enumeration |
getActivities(boolean includeParents)
Returns the active concepts' activities. |
java.util.LinkedList<Activity> |
getActivities(java.lang.String name)
Returns the activities with the specified name. |
java.util.LinkedList<Activity> |
getActivities(java.lang.String name,
boolean includeParents)
Returns the activities with the specified name. |
protected abstract java.util.LinkedList<Activity> |
getActivitiesRecursive(boolean includeThis)
Returns the active concepts' activities including the activities inherited from its parent class and their parent super classes. |
protected abstract java.util.LinkedList<Activity> |
getActivitiesRecursive(java.lang.String name,
boolean includeThis)
Searches for all activities with the specified name through the concept hierarchy breadth first. |
Activity |
getActivityByDescriptor(java.lang.String descriptor)
Returns the activity with the specified descriptor. |
Activity |
getActivityByDescriptor(java.lang.String descriptor,
boolean includeParents)
Returns the Activity with the specified descriptor. |
protected abstract Activity |
getActivityByDescriptorRecursive(java.lang.String descriptor,
boolean includeThis)
Searches for the activity with the specified descriptor through the concept hierarchy breadth first. |
Attribute |
getAttribute(java.lang.String name,
boolean includeParents)
Returns the Attribute with the specified name. |
protected abstract Attribute |
getAttributeRecursive(java.lang.String name,
boolean includeThis)
Searches for the attribute with the specified name through the concept hierarchy breadth first. |
java.util.Enumeration |
getAttributes(boolean includeParents)
Returns the active concepts' attributes. |
protected abstract java.util.LinkedList<Attribute> |
getAttributesRecursive(boolean includeThis)
Returns the active concepts' attributes including the attributes inherited from its parent class and their parent super classes. |
double |
getCost()
|
java.util.Enumeration |
getInitialBeliefs()
Returns the active concepts' initial beliefs excluding the initial beliefs defined for its active classes or active superclasses. |
java.util.Enumeration |
getInitialBeliefs(boolean includeParents)
Returns the active concepts' initial beliefs. |
protected abstract java.util.LinkedList<InitialStatement> |
getInitialBeliefsRecursive(boolean includeThis)
Returns the active concepts' initial beliefs including the initial beliefs of its parent class and their parent super classes. |
java.util.Enumeration |
getInitialFacts()
Returns the active concepts' initial facts excluding the initial facts defined for its active classes or active superclasses. |
java.util.Enumeration |
getInitialFacts(boolean includeParents)
Returns the active concepts' initial facts. |
protected abstract java.util.LinkedList<InitialStatement> |
getInitialFactsRecursive(boolean includeThis)
Returns the active concepts' initial facts including the initial facts of its parent class and their parent super classes. |
Activity |
getLocalActivityByDescriptor(java.lang.String descriptor)
Returns the activity with the specified descriptor. |
Relation |
getRelation(java.lang.String name,
boolean includeParents)
Returns the Relation with the specified name. |
protected abstract Relation |
getRelationRecursive(java.lang.String name,
boolean includeThis)
Searches for the relation with the specified name through the concept hierarchy breadth first. |
java.util.Enumeration |
getRelations(boolean includeParents)
Returns the active concepts' relations. |
protected abstract java.util.LinkedList<Relation> |
getRelationsRecursive(boolean includeThis)
Returns the active concepts' relations including the relations inherited from its parent class and their parent super classes. |
Thoughtframe |
getThoughtframe(java.lang.String name)
|
java.util.Enumeration |
getThoughtframes()
Returns the active concepts' thoughtframes excluding the thoughtframes defined for its active classes or active superclasses. |
java.util.Enumeration |
getThoughtframes(boolean includeComposites)
Returns the active concepts' thoughtframes excluding the thoughtframes defined for its active classes or active superclasses. |
java.util.Enumeration |
getThoughtframes(boolean includeParents,
boolean includeComposites)
Returns the active concepts' thoughtframes. |
protected abstract java.util.LinkedList<Thoughtframe> |
getThoughtframesRecursive(boolean includeThis,
boolean includeComposites)
Returns the active concepts' thoughtframes including the thoughtframes of its parent class and their parent super classes. |
int |
getTimeUnit()
|
Workframe |
getWorkframe(java.lang.String name)
|
java.util.Enumeration |
getWorkframes()
Returns the active concepts' workframes excluding the workframes defined for its active classes or active superclasses and excluding the workframes specified in its composite activities. |
java.util.Enumeration |
getWorkframes(boolean includeComposites)
Returns the active concepts' workframes excluding the workframes defined for its active classes or active superclasses. |
java.util.Enumeration |
getWorkframes(boolean includeParents,
boolean includeComposites)
Returns the active concepts' workframes. |
protected abstract java.util.LinkedList<Workframe> |
getWorkframesRecursive(boolean includeThis,
boolean includeComposites)
Returns the active concepts' workframes including the workframes of its parent class and their parent super classes. |
boolean |
hasActivities()
|
boolean |
hasInitialBeliefs()
|
boolean |
hasInitialFacts()
|
boolean |
hasThoughtframes()
|
boolean |
hasWorkframes()
|
boolean |
removeActivity(Activity act)
|
boolean |
removeThoughtframe(java.lang.String name)
|
boolean |
removeWorkframe(java.lang.String name)
|
void |
setCost(double cost)
|
void |
setTimeUnit(int timeUnit)
|
Methods inherited from class gov.nasa.arc.brahms.common.data.Concept |
---|
addAttribute, addRelation, compareTypes, createContext, equals, getAttribute, getAttributes, getContext, getFullyQualifiedName, getIcon, getModel, getName, getPackage, getRelation, getRelations, getType, hasAttributes, hasRelations, isLocal, isSerializable, removeAttribute, removeRelation, setContext, setIcon, setLocal, setModel, setPackage, setSerializable, toString |
Methods inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
---|
getDisplayText, getOwner, setDisplayText, setFullyQualifiedName, setName, setOwner |
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.data.Type |
---|
getSerialNumber |
Constructor Detail |
---|
public ActiveConcept()
public ActiveConcept(java.lang.String file, int line)
public ActiveConcept(java.lang.String name, java.lang.String file, int line)
Method Detail |
---|
public void setCost(double cost)
public double getCost()
public void setTimeUnit(int timeUnit)
public int getTimeUnit()
public Attribute getAttribute(java.lang.String name, boolean includeParents) throws java.util.NoSuchElementException
getAttribute
in class Concept
name
- the name of the requested attributeincludeParents
- true if the search should also include the parent concept,
false if not.
java.util.NoSuchElementException
- if the attribute with the specified name is
not defined for this concept or its parent concepts (if includeParents
is true).protected abstract Attribute getAttributeRecursive(java.lang.String name, boolean includeThis)
name
- the name of the attribute to be foundincludeThis
- flag indicating whether to search for the attribute in
this concept or only to search in the parents
public java.util.Enumeration getAttributes(boolean includeParents)
getAttributes
in class Concept
includeParents
- true if also the inherited attributes of its
active classes and superclasses are to be included, false otherwise
protected abstract java.util.LinkedList<Attribute> getAttributesRecursive(boolean includeThis)
Note:When processing this list in other methods and an attribute with the same name occurs more then once, then only the last occurrence is to be used by the active concept. The list contains the attibutes starting with the attributes highest in the class hierarchy.
includeThis
- flag indicating whether to include the attibutes for
this concept or only to return the parent attributes
public Relation getRelation(java.lang.String name, boolean includeParents) throws java.util.NoSuchElementException
getRelation
in class Concept
name
- the name of the requested relationincludeParents
- true if the search should also include the parent concept,
false if not.
java.util.NoSuchElementException
- if the relation with the specified name is
not defined for this concept or its parent concepts (if includeParents
is true).protected abstract Relation getRelationRecursive(java.lang.String name, boolean includeThis)
name
- the name of the relation to be foundincludeThis
- flag indicating whether to search for the relation in
this concept or only to search in the parents
public java.util.Enumeration getRelations(boolean includeParents)
getRelations
in class Concept
includeParents
- true if also the inherited relations of its
active classes and superclasses are to be included, false otherwise
protected abstract java.util.LinkedList<Relation> getRelationsRecursive(boolean includeThis)
Note:When processing this list in other methods and an relation with the same name occurs more then once, then only the last occurrence is to be used by the active concept. The list contains the relations starting with the relations highest in the class hierarchy.
includeThis
- flag indicating whether to include the relations for
this concept or only to return the parent relations
public boolean addInitialBelief(InitialStatement belief)
public boolean hasInitialBeliefs()
public java.util.Enumeration getInitialBeliefs()
public java.util.Enumeration getInitialBeliefs(boolean includeParents)
includeParents
- true if also the initial beliefs of its active classes and superclasses
are to be included, false otherwise
protected abstract java.util.LinkedList<InitialStatement> getInitialBeliefsRecursive(boolean includeThis)
Note:The list contains the initial beliefs starting with the initial beliefs highest in the class hierarchy.
includeThis
- flag indicating whether to include the initial beliefs for this concept or
only to return the parent initial beliefs
public boolean addInitialFact(InitialStatement fact)
public boolean hasInitialFacts()
public java.util.Enumeration getInitialFacts()
public java.util.Enumeration getInitialFacts(boolean includeParents)
includeParents
- true if also the initial facts of its active classes and superclasses
are to be included, false otherwise
protected abstract java.util.LinkedList<InitialStatement> getInitialFactsRecursive(boolean includeThis)
Note:The list contains the initial facts starting with the initial facts highest in the class hierarchy.
includeThis
- flag indicating whether to include the initial facts for this concept or
only to return the parent initial facts
public boolean addActivity(Activity act)
public boolean removeActivity(Activity act)
public boolean hasActivities()
public java.util.LinkedList<Activity> getActivities(java.lang.String name) throws java.util.NoSuchElementException
name
- the name of the requested activity
java.util.NoSuchElementException
- if no activities with the specified name
are declared for this ActiveConcept, not considering that they
could be declared in one of its parents.public java.util.LinkedList<Activity> getActivities(java.lang.String name, boolean includeParents) throws java.util.NoSuchElementException
name
- the name of the requested activityincludeParents
- true if the search should also include the parent concept,
false if not.
java.util.NoSuchElementException
- if no activities with the specified name are
declared for this concept or its parent concepts (if includeParents
is true).protected abstract java.util.LinkedList<Activity> getActivitiesRecursive(java.lang.String name, boolean includeThis)
name
- the name of the activity to be foundincludeThis
- flag indicating whether to search for the activity in
this concept or only to search in the parents
public Activity getActivityByDescriptor(java.lang.String descriptor) throws java.util.NoSuchElementException
descriptor
- the descriptor of the requested activity
java.util.NoSuchElementException
- if no activity with the specified descriptor
is declared for this ActiveConcept, not considering that it
could be declared in one of its parents.public Activity getLocalActivityByDescriptor(java.lang.String descriptor)
descriptor
- the descriptor of the requested activity
public Activity getActivityByDescriptor(java.lang.String descriptor, boolean includeParents) throws java.util.NoSuchElementException
descriptor
- the descriptor of the requested activityincludeParents
- true if the search should also include the parent concept,
false if not.
java.util.NoSuchElementException
- if the activity with the specified descriptor is
not declared for this concept or its parent concepts (if includeParents
is true).protected abstract Activity getActivityByDescriptorRecursive(java.lang.String descriptor, boolean includeThis)
descriptor
- the descriptor of the activity to be foundincludeThis
- flag indicating whether to search for the activity in
this concept or only to search in the parents
public java.util.Enumeration getActivities()
public java.util.Enumeration getActivities(boolean includeParents)
includeParents
- true if also the inherited activities of its
active classes and superclasses are to be included, false otherwise
protected abstract java.util.LinkedList<Activity> getActivitiesRecursive(boolean includeThis)
Note:When processing this list in other methods and an activity with the same name occurs more then once, then only the last occurrence is to be used by the active concept. The list contains the activities starting with the activities highest in the class hierarchy.
ll
- the LinkedList to which to add the activities foundincludeThis
- flag indicating whether to include the activities for
this concept or only to return the parent activitiesconcepts
- a table containing the concepts from which activities were
already retrieved. This table is necessary to prevent circular loops.
public boolean addWorkframe(Workframe frm)
public boolean removeWorkframe(java.lang.String name)
public Workframe getWorkframe(java.lang.String name) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public boolean hasWorkframes()
public java.util.Enumeration getWorkframes()
public java.util.Enumeration getWorkframes(boolean includeComposites)
includeComposites
- true if also the workframes specified in composite activities
are to be returned.
public java.util.Enumeration getWorkframes(boolean includeParents, boolean includeComposites)
includeParents
- true if also the workframes of its active classes and superclasses
are to be included, false otherwiseincludeComposites
- true if also the workframes specified in composite activities
are to be returned.
protected abstract java.util.LinkedList<Workframe> getWorkframesRecursive(boolean includeThis, boolean includeComposites)
Note:When processing this list in other methods and a workframe with the same name occurs more then once, then only the last occurrence is to be used by the active concept. The list contains the frames starting with the frames highest in the class hierarchy.
includeThis
- flag indicating whether to include the frames for this concept or
only to return the parent framesincludeComposites
- true if also the workframes specified in composite activities
are to be returned.
public boolean addThoughtframe(Thoughtframe frm)
public boolean removeThoughtframe(java.lang.String name)
public Thoughtframe getThoughtframe(java.lang.String name) throws java.util.NoSuchElementException
java.util.NoSuchElementException
public boolean hasThoughtframes()
public java.util.Enumeration getThoughtframes()
public java.util.Enumeration getThoughtframes(boolean includeComposites)
includeComposites
- true if also the thoughtframes specified in composite activities
are to be returned.
public java.util.Enumeration getThoughtframes(boolean includeParents, boolean includeComposites)
includeParents
- true if also the thoughtframes of its active classes and superclasses
are to be included, false otherwiseincludeComposites
- true if also the thoughtframes specified in composite activities
are to be returned.
protected abstract java.util.LinkedList<Thoughtframe> getThoughtframesRecursive(boolean includeThis, boolean includeComposites)
Note:When processing this list in other methods and a thoughtframe with the same name occurs more then once, then only the last occurrence is to be used by the active concept. The list contains the frames starting with the frames highest in the class hierarchy.
includeThis
- flag indicating whether to include the frames for this concept or
only to return the parent framesincludeComposites
- true if also the thoughtframes specified in composite activities
are to be returned.
public void delete()
delete
in class BrahmsObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |