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

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.Concept
                  extended by gov.nasa.arc.brahms.common.data.ActiveConcept
All Implemented Interfaces:
Type, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable
Direct Known Subclasses:
ActiveClass, ActiveInstance

public abstract class ActiveConcept
extends Concept

An ActiveConcept defines a concept that can perform activities based on facts or beliefs.

Version:
$Revision: 1.3 $ $Date: 2009/11/23 19:05:06 $ $Author: rnado $
Author:
Ron van Hoof
See Also:
Serialized Form

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

ActiveConcept

public ActiveConcept()

ActiveConcept

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

ActiveConcept

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

setCost

public void setCost(double cost)

getCost

public double getCost()

setTimeUnit

public void setTimeUnit(int timeUnit)

getTimeUnit

public int getTimeUnit()

getAttribute

public Attribute getAttribute(java.lang.String name,
                              boolean includeParents)
                       throws java.util.NoSuchElementException
Returns the Attribute with the specified name. If includeParents is set to true and the attribute with the specified name is not defined for this concept, this method will try to find the attribute in one of the parent concepts. If includeParents is false the search will be limited to the attributes specified for only this concept and not that of its parent concepts.

Overrides:
getAttribute in class Concept
Parameters:
name - the name of the requested attribute
includeParents - true if the search should also include the parent concept, false if not.
Returns:
Attribute if the attribute with the specified name was found
Throws:
java.util.NoSuchElementException - if the attribute with the specified name is not defined for this concept or its parent concepts (if includeParents is true).

getAttributeRecursive

protected abstract Attribute getAttributeRecursive(java.lang.String name,
                                                   boolean includeThis)
Searches for the attribute with the specified name through the concept hierarchy breadth first. If the attribute with the specified name is found it is returned, otherwise null is returned.

Parameters:
name - the name of the attribute to be found
includeThis - flag indicating whether to search for the attribute in this concept or only to search in the parents
Returns:
Attribute the attribute if it was found, null otherwise

getAttributes

public java.util.Enumeration getAttributes(boolean includeParents)
Returns the active concepts' attributes. If the includeParents flag is false it excludes the inherited attributes defined for its parent active classes or active superclasses. If the flag is true it includes the inherited attributes defined for its parent active classes or active superclasses.

Overrides:
getAttributes in class Concept
Parameters:
includeParents - true if also the inherited attributes of its active classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the active concept's attibutes

getAttributesRecursive

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. The attributes are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the attibutes for this concept or only to return the parent attributes
Returns:
LinkedList the active concept's (parent) attributes

getRelation

public Relation getRelation(java.lang.String name,
                            boolean includeParents)
                     throws java.util.NoSuchElementException
Returns the Relation with the specified name. If includeParents is set to true and the relation with the specified name is not defined for this concept, this method will try to find the relation in one of the parent concepts. If includeParents is false the search will be limited to the relations specified for only this concept and not that of its parent concepts.

Overrides:
getRelation in class Concept
Parameters:
name - the name of the requested relation
includeParents - true if the search should also include the parent concept, false if not.
Returns:
Relation if the relation with the specified name was found
Throws:
java.util.NoSuchElementException - if the relation with the specified name is not defined for this concept or its parent concepts (if includeParents is true).

getRelationRecursive

protected abstract Relation getRelationRecursive(java.lang.String name,
                                                 boolean includeThis)
Searches for the relation with the specified name through the concept hierarchy breadth first. If the relation with the specified name is found it is returned, otherwise null is returned.

Parameters:
name - the name of the relation to be found
includeThis - flag indicating whether to search for the relation in this concept or only to search in the parents
Returns:
Relation the relation if it was found, null otherwise

getRelations

public java.util.Enumeration getRelations(boolean includeParents)
Returns the active concepts' relations. If the includeParents flag is false it excludes the inherited relations defined for its parent active classes or active superclasses. If the flag is true it includes the inherited relations defined for its parent active classes or active superclasses.

Overrides:
getRelations in class Concept
Parameters:
includeParents - true if also the inherited relations of its active classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the active concept's relations

getRelationsRecursive

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. The relations are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the relations for this concept or only to return the parent relations
Returns:
LinkedList the active concept's (parent) relations

addInitialBelief

public boolean addInitialBelief(InitialStatement belief)

hasInitialBeliefs

public boolean hasInitialBeliefs()

getInitialBeliefs

public java.util.Enumeration getInitialBeliefs()
Returns the active concepts' initial beliefs excluding the initial beliefs defined for its active classes or active superclasses.

Returns:
Enumeration a list of all the active concepts' initial beliefs

getInitialBeliefs

public java.util.Enumeration getInitialBeliefs(boolean includeParents)
Returns the active concepts' initial beliefs. If the includeParents flag is false it excludes the initial beliefs defined for its parent active classes or active superclasses. If the flag is true it includes the initial beliefs defined for its parent active classes or active superclasses.

Parameters:
includeParents - true if also the initial beliefs of its active classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the active concept's initial beliefs

getInitialBeliefsRecursive

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. The initial beliefs are retrieved recursively breadth first.

Note:The list contains the initial beliefs starting with the initial beliefs highest in the class hierarchy.

Parameters:
includeThis - flag indicating whether to include the initial beliefs for this concept or only to return the parent initial beliefs
Returns:
LinkedList the active concept's (parent) initial beliefs

addInitialFact

public boolean addInitialFact(InitialStatement fact)

hasInitialFacts

public boolean hasInitialFacts()

getInitialFacts

public java.util.Enumeration getInitialFacts()
Returns the active concepts' initial facts excluding the initial facts defined for its active classes or active superclasses.

Returns:
Enumeration a list of all the active concepts' initial facts

getInitialFacts

public java.util.Enumeration getInitialFacts(boolean includeParents)
Returns the active concepts' initial facts. If the includeParents flag is false it excludes the initial facts defined for its parent active classes or active superclasses. If the flag is true it includes the initial facts defined for its parent active classes or active superclasses.

Parameters:
includeParents - true if also the initial facts of its active classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the active concept's initial facts

getInitialFactsRecursive

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. The initial facts are retrieved recursively breadth first.

Note:The list contains the initial facts starting with the initial facts highest in the class hierarchy.

Parameters:
includeThis - flag indicating whether to include the initial facts for this concept or only to return the parent initial facts
Returns:
LinkedList the active concept's (parent) initial facts

addActivity

public boolean addActivity(Activity act)

removeActivity

public boolean removeActivity(Activity act)

hasActivities

public boolean hasActivities()

getActivities

public java.util.LinkedList<Activity> getActivities(java.lang.String name)
                                             throws java.util.NoSuchElementException
Returns the activities with the specified name. If no activities with the specified name are declared for this ActiveConcept then a NoSuchElementException is thrown. This method does not search for the activities in the concept hierarchy.

Parameters:
name - the name of the requested activity
Returns:
LinkedList the requested activities
Throws:
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.

getActivities

public java.util.LinkedList<Activity> getActivities(java.lang.String name,
                                                    boolean includeParents)
                                             throws java.util.NoSuchElementException
Returns the activities with the specified name. If includeParents is set to true then this method will also include all of the activities with the same name in the parent concepts. If includeParents is false the search will be limited to the activities declared for only this concept and not that of its parent concepts.

Parameters:
name - the name of the requested activity
includeParents - true if the search should also include the parent concept, false if not.
Returns:
LinkedList the requested activities
Throws:
java.util.NoSuchElementException - if no activities with the specified name are declared for this concept or its parent concepts (if includeParents is true).

getActivitiesRecursive

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. Makes sure that all signatures are unique and that if multiple activities with the same signature exist in the hierarchy that the most specific activity is returned in the list.

Parameters:
name - the name of the activity to be found
includeThis - flag indicating whether to search for the activity in this concept or only to search in the parents
Returns:
LinkedList the activities if any were found, null otherwise

getActivityByDescriptor

public Activity getActivityByDescriptor(java.lang.String descriptor)
                                 throws java.util.NoSuchElementException
Returns the activity with the specified descriptor. If no activity with the specified descriptor is declared for this ActiveConcept then a NoSuchElementException is thrown. This method does not search for the activity in the concept hierarchy.

Parameters:
descriptor - the descriptor of the requested activity
Returns:
Activity the requested activity
Throws:
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.

getLocalActivityByDescriptor

public Activity getLocalActivityByDescriptor(java.lang.String descriptor)
Returns the activity with the specified descriptor. If no activity with the specified descriptor is declared for this ActiveConcept then null is returned. This method does not search for the activity in the concept hierarchy.

Parameters:
descriptor - the descriptor of the requested activity
Returns:
Activity the requested activity or null if no such activity

getActivityByDescriptor

public Activity getActivityByDescriptor(java.lang.String descriptor,
                                        boolean includeParents)
                                 throws java.util.NoSuchElementException
Returns the Activity with the specified descriptor. If includeParents is set to true and the activity with the specified descriptor is not declared for this concept, this method will try to find the activity in one of the parent concepts. If includeParents is false the search will be limited to the activities declared for only this concept and not that of its parent concepts.

Parameters:
descriptor - the descriptor of the requested activity
includeParents - true if the search should also include the parent concept, false if not.
Returns:
Activity the requested activity
Throws:
java.util.NoSuchElementException - if the activity with the specified descriptor is not declared for this concept or its parent concepts (if includeParents is true).

getActivityByDescriptorRecursive

protected abstract Activity getActivityByDescriptorRecursive(java.lang.String descriptor,
                                                             boolean includeThis)
Searches for the activity with the specified descriptor through the concept hierarchy breadth first. If the activity with the specified descriptor is found it is returned, otherwise null is returned.

Parameters:
descriptor - the descriptor of the activity to be found
includeThis - flag indicating whether to search for the activity in this concept or only to search in the parents
Returns:
Activity the activity if it was found, null otherwise

getActivities

public java.util.Enumeration getActivities()
Returns an Enumeration of all the Activities declared for this concept. It does not include any activities declared in the parent concepts.

Returns:
Enumeration an Enumeration of Activity for all activities declared for this concept.

getActivities

public java.util.Enumeration getActivities(boolean includeParents)
Returns the active concepts' activities. If the includeParents flag is false it excludes the inherited activities defined for its parent active classes or active superclasses. If the flag is true it includes the inherited activities defined for its parent active classes or active superclasses.

Parameters:
includeParents - true if also the inherited activities of its active classes and superclasses are to be included, false otherwise
Returns:
Enumeration a list of all the active concept's activities

getActivitiesRecursive

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. The activities are retrieved recursively breadth first.

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.

Parameters:
ll - the LinkedList to which to add the activities found
includeThis - flag indicating whether to include the activities for this concept or only to return the parent activities
concepts - a table containing the concepts from which activities were already retrieved. This table is necessary to prevent circular loops.
Returns:
LinkedList the active concept's (parent) activities

addWorkframe

public boolean addWorkframe(Workframe frm)

removeWorkframe

public boolean removeWorkframe(java.lang.String name)

getWorkframe

public Workframe getWorkframe(java.lang.String name)
                       throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasWorkframes

public boolean hasWorkframes()

getWorkframes

public 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.

Returns:
Enumeration a list of all the active concepts' workframes

getWorkframes

public java.util.Enumeration getWorkframes(boolean includeComposites)
Returns the active concepts' workframes excluding the workframes defined for its active classes or active superclasses. Depending on the includeComposites flag also the workframes specified in the composite activities for this concept are returned (includeComposites is true).

Parameters:
includeComposites - true if also the workframes specified in composite activities are to be returned.
Returns:
Enumeration a list of all the active concepts' workframes

getWorkframes

public java.util.Enumeration getWorkframes(boolean includeParents,
                                           boolean includeComposites)
Returns the active concepts' workframes. If the includeParents flag is false it excludes the workframes defined for its parent active classes or active superclasses. If the flag is true it includes the workframes defined for its parent active classes or active superclasses. The workframes are identified using their qualified names (not their fully qualified names). The qualified name is the workframe name in case the workframe is specified for an concept directly or the workframe name preceded by the composite activity hierarchy (their names) up to and not including the concept's name and package.

Parameters:
includeParents - true if also the workframes of its active classes and superclasses are to be included, false otherwise
includeComposites - true if also the workframes specified in composite activities are to be returned.
Returns:
Enumeration a list of all the active concept's workframes

getWorkframesRecursive

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. The workframes are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the frames for this concept or only to return the parent frames
includeComposites - true if also the workframes specified in composite activities are to be returned.
Returns:
LinkedList the active concept's (parent) workframes

addThoughtframe

public boolean addThoughtframe(Thoughtframe frm)

removeThoughtframe

public boolean removeThoughtframe(java.lang.String name)

getThoughtframe

public Thoughtframe getThoughtframe(java.lang.String name)
                             throws java.util.NoSuchElementException
Throws:
java.util.NoSuchElementException

hasThoughtframes

public boolean hasThoughtframes()

getThoughtframes

public java.util.Enumeration getThoughtframes()
Returns the active concepts' thoughtframes excluding the thoughtframes defined for its active classes or active superclasses.

Returns:
Enumeration a list of all the active concepts' thoughtframes

getThoughtframes

public java.util.Enumeration getThoughtframes(boolean includeComposites)
Returns the active concepts' thoughtframes excluding the thoughtframes defined for its active classes or active superclasses. Depending on the includeComposites flag also the thoughtframes specified in the composite activities for this concept are returned (includeComposites is true).

Parameters:
includeComposites - true if also the thoughtframes specified in composite activities are to be returned.
Returns:
Enumeration a list of all the active concepts' thoughtframes

getThoughtframes

public java.util.Enumeration getThoughtframes(boolean includeParents,
                                              boolean includeComposites)
Returns the active concepts' thoughtframes. If the includeParents flag is false it excludes the thoughtframes defined for its parent active classes or active superclasses. If the flag is true it includes the thoughtframes defined for its parent active classes or active superclasses. The thoughtframes are identified using their qualified names (not their fully qualified names). The qualified name is the thoughtframe name in case the thoughtframe is specified for an concept directly or the thoughtframe name preceded by the composite activity hierarchy (their names) up to and not including the concept's name and package.

Parameters:
includeParents - true if also the thoughtframes of its active classes and superclasses are to be included, false otherwise
includeComposites - true if also the thoughtframes specified in composite activities are to be returned.
Returns:
Enumeration a list of all the active concept's thoughtframes

getThoughtframesRecursive

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. The thoughtframes are retrieved recursively breadth first.

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.

Parameters:
includeThis - flag indicating whether to include the frames for this concept or only to return the parent frames
includeComposites - true if also the thoughtframes specified in composite activities are to be returned.
Returns:
LinkedList the active concept's (parent) thoughtframes

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


Copyright © 1997-2012 All Rights Reserved.