|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.sposh.elements.PoshElement<THIS,PARENT>
cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement<ActionPattern,PoshPlan>
cz.cuni.amis.pogamut.sposh.elements.ActionPattern
public final class ActionPattern
AP is a named sequence of actions
.
Action patterns: or simple sequences. These are a basic kind of plan
aggregate which turn out to be useful in quite a lot of situations, despite
their lack of flexibility. They reduce the combinatorial complexity of the
agent when a full competence is not really necessary.
Field Summary | |
---|---|
static String |
apComment
Property name for comment |
static String |
apName
Property name for name of this AP. |
static String |
apParams
Property name for parameters of AP. |
static DataFlavor |
dataFlavor
Data flavor of AP for drag and drop. |
protected FormalParameters |
params
Formal parameters of this AP. |
Fields inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement |
---|
IDENT_PATTERN |
Method Summary | |
---|---|
void |
addAction(int index,
TriggeredAction action)
Add new @action as action of this AP, emit new child. |
void |
addAction(TriggeredAction action)
Add new TriggeredAction as child of this AP. |
TriggeredAction |
getAction(int actionId)
Get action with @actionId. |
List<TriggeredAction> |
getActions()
Get list of actions in this AP. |
List<TriggeredAction> |
getChildDataNodes()
Get list of children of this node. |
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to PoshScene. |
String |
getName()
Get name of AP. |
FormalParameters |
getParameters()
Get formal parametrs of this AP. |
LapType |
getType()
Get type of the element. |
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex. |
void |
removeAction(TriggeredAction action)
Remove action from this AP and emit notification. |
void |
rename(String newAPName)
Rename ActionPattern in the PoshPlan . |
void |
setName(String name)
Set name of AP. |
void |
setParameters(FormalParameters newParams)
Change parameters of the AP. |
String |
toString()
|
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement |
---|
getElementId, getUnusedName, isUsedName, moveChildInList |
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshElement |
---|
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getChildId, getChildren, getElementListeners, getId, getParent, getRootNode, isChildOfParent, removeElementListener, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FormalParameters params
public static final String apName
public static final String apComment
public static final String apParams
public static final DataFlavor dataFlavor
Method Detail |
---|
public void addAction(TriggeredAction action) throws CycleException
action
- action to be added into this AP
CycleException
public void addAction(int index, TriggeredAction action) throws CycleException
index
- Index at which to put the @action.action
- orphan
CycleException
public String toString()
toString
in class Object
public List<TriggeredAction> getChildDataNodes()
PoshElement
getChildDataNodes
in class PoshElement<ActionPattern,PoshPlan>
public void setName(String name) throws InvalidNameException, DuplicateNameException, CycleException
name
- string tham matches IDENT_PATTERN
InvalidNameException
DuplicateNameException
CycleException
public String getName()
getName
in interface INamedElement
public boolean moveChild(int newIndex, PoshElement child)
PoshElement
moveChild
in class PoshElement<ActionPattern,PoshPlan>
public DataFlavor getDataFlavor()
PoshElement
getDataFlavor
in class PoshElement<ActionPattern,PoshPlan>
public LapType getType()
PoshElement
getType
in class PoshElement<ActionPattern,PoshPlan>
public void removeAction(TriggeredAction action)
action
- Action that will be removed.public List<TriggeredAction> getActions()
public FormalParameters getParameters()
getParameters
in interface IParametrizedElement
public void setParameters(FormalParameters newParams) throws MissingParameterException
setParameters
in interface IParametrizedElement
newParams
- New parameters of AP.
MissingParameterException
public void rename(String newAPName) throws InvalidNameException, DuplicateNameException, CycleException
ActionPattern
in the PoshPlan
.
This method finds all references ín the plan where this AP is references
and changes them to the @newAPName
newAPName
- New name for this AP in the plan.
InvalidNameException
DuplicateNameException
CycleException
public TriggeredAction getAction(int actionId)
getActions()
.List.get(int)
.
actionId
- Id of desired action.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |