public final class DriveElement extends PoshDummyElement<DriveElement,DriveCollection> implements INamedElement, IConditionElement<DriveElement>
DriveCollection. What is drive? Basically it is a
top node of decision tree. It has a trigger and an action. When trigger is
satisfied, the drive is elegible to be traversed. Action is just a name, it
can be reference (=having same name) to some action, but it can also be
reference to C or AP.
In posh it has following syntax(minus variables):
(<name> [<trigger>] <name>)
The first name is name of the element and second name is name of the
action.
In the past, it used to have this form, but not anymore (none knew how to use
it and no need to waste scarce resources to support unused features.)
(<name> [<trigger>] <name> [<freq>] [<comment>])
The drive is elegible for execution if it has satisfied trigger and
it was called less frequently that specified by its frequency (getFreq()).Useful to have an idea what is {@link DriveElement} for.| Modifier and Type | Field and Description |
|---|---|
static DataFlavor |
dataFlavor
Data flavor of drive, used in drag-and-drop
|
static String |
deName
Property name for name of a drive
|
IDENT_PATTERN| Modifier and Type | Method and Description |
|---|---|
TriggeredAction |
getAction()
Get action of this drive (will be performed if elegible, has satisfied
trigger and highest priority).
|
String |
getComment()
Deprecated.
Not supported in editor
|
Trigger<DriveElement> |
getCondition()
Get trigger of the element.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
Freq |
getFreq()
Deprecated.
Part of original posh, not supported in editor.
|
List<PoshElement> |
getChildDataNodes()
Get list of children of this node.
|
String |
getName()
Get name of the element.
|
Trigger<DriveElement> |
getTrigger()
Get trigger of this drive.
|
LapType |
getType()
Get type of the element.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
rename(String newName)
Becasue name of a drive is not used as reference in the plan, only call
setName(java.lang.String). |
void |
setName(String newName)
Set name of the drive to new name.
|
String |
toString() |
getElementId, getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, getParent, getRootNode, isChildOfParent, removeElementListener, setParentpublic static final String deName
public static final DataFlavor dataFlavor
public Trigger<DriveElement> getTrigger()
public Trigger<DriveElement> getCondition()
getCondition in interface IConditionElement<DriveElement>getTrigger()public TriggeredAction getAction()
public List<PoshElement> getChildDataNodes()
PoshElementgetChildDataNodes in class PoshElement<DriveElement,DriveCollection>public String getName()
INamedElementgetName in interface INamedElementpublic void setName(String newName) throws InvalidNameException, DuplicateNameException
newName - New name of the drive.InvalidNameException - If name doesn't match PoshDummyElement.IDENT_PATTERN
regexp.DuplicateNameExceptionpublic void rename(String newName) throws InvalidNameException, CycleException, DuplicateNameException
setName(java.lang.String).rename in interface INamedElementnewName - New name of drive.InvalidNameException - Passed name is not valid Yaposh name.CycleException - Renaming causes cycle.DuplicateNameException - Such name is already used in the plan.public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElement<DriveElement,DriveCollection>public DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElement<DriveElement,DriveCollection>public LapType getType()
PoshElementgetType in class PoshElement<DriveElement,DriveCollection>@Deprecated public Freq getFreq()
PoshEngine
in each evaluation selects the drive with highest priority that has
satisfied trigger and is being called less frequently, than specified by
the frequency of the drive element.@Deprecated public String getComment()
Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.