public final class Competence extends NamedLapElement<Competence,PoshPlan>
choices.
If you imagine a decision tree, the point, where node splits into several
subnodes is akin to the to the Competence.
What is difference between Competence and DriveCollection?
Well, for one, DC is in the root of the plan, DC has a goal (well, Cs had
goal too in the past), the main difference how they are processed by the
engine (see description of how DriveCollection is evaluated).
Unlike DC, Competence is simple decision tree, engine will take the element
with highest priority and satisfied trigger and traverses into that node
without looking back.DriveCollection| Modifier and Type | Field and Description |
|---|---|
static String |
cnName
Property string of competence name
|
static String |
cnParams
Property string of competence parameters
|
static DataFlavor |
dataFlavor
Data flavor of competence classs, used for drag-and-drop
|
IDENT_PATTERN| Modifier and Type | Method and Description |
|---|---|
void |
addElement(CompetenceElement choice)
Add passed element as the last element of this competence and emit.
|
void |
addElement(int index,
CompetenceElement choice)
Add choice as the @index element of all competences choices + emit.
|
List<CompetenceElement> |
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 the competence
|
FormalParameters |
getParameters()
Get list of formal parametrs of competence (names and default values).
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
removeElement(CompetenceElement element)
Remove the
CompetenceElement from this competence and emit
notification about deletion. |
void |
setName(String name)
Change name of competence node.
|
void |
setParameters(FormalParameters newParams) |
String |
toString()
Create text representation of this competence, compatible with parser, so
we can directly output it.
|
getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRootNode, isChildOfParent, removeElementListener, setParentpublic static final String cnName
public static final String cnParams
public static final DataFlavor dataFlavor
public void addElement(CompetenceElement choice) throws DuplicateNameException
choice - element that will be added into this competenceDuplicateNameExceptionpublic void addElement(int index,
CompetenceElement choice)
throws DuplicateNameException
index - Index at which should the choice be addedchoice - Choice to add. Orphan.DuplicateNameExceptionpublic String toString()
public List<CompetenceElement> getChildDataNodes()
PoshElementgetChildDataNodes in class PoshElement<Competence,PoshPlan>public void setName(String name) throws DuplicateNameException, CycleException, InvalidNameException
name - new name of competence nodeDuplicateNameExceptionCycleExceptionInvalidNameExceptionpublic String getName()
getName in class NamedLapElement<Competence,PoshPlan>public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElement<Competence,PoshPlan>public DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElement<Competence,PoshPlan>public void removeElement(CompetenceElement element)
CompetenceElement from this competence and emit
notification about deletion.element - Element to be removed.public FormalParameters getParameters()
public void setParameters(FormalParameters newParams) throws MissingParameterException
MissingParameterExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.