public final class PoshPlan extends PoshDummyElement<PoshPlan,PoshPlan>
DriveCollection, all Competence
and ActionPattern + optional documentation.top level of the decision tree,
ActionPattern,
Competence,
TriggeredAction| Modifier and Type | Field and Description |
|---|---|
static DataFlavor |
dataFlavor
Data flavor of posh plan(for drag-and-drop), not used anywhere, but
required by interface.
|
static String |
PROP_AUTHOR
Name of the property for
author. |
static String |
PROP_INFO
Name of the property for
info. |
static String |
PROP_NAME
Name of the property for
name. |
IDENT_PATTERN| Modifier and Type | Method and Description |
|---|---|
void |
addActionPattern(ActionPattern actionPattern)
Add new AP to the lap plan (add, emit)
|
void |
addAdopt(Adopt adopt) |
void |
addCompetence(Competence competence)
Add competence node to the lap tree (add, emit)
|
List<ActionPattern> |
getActionPatterns()
Get list of all APs in the plan.
|
List<TriggeredAction> |
getActions()
Get all actions in this plan.
|
Set<String> |
getActionsNames()
Get all action names in the plan, i.e.
|
Adopt |
getAD(String name)
Returns adopt from the plan with specified name.
|
List<Adopt> |
getAdopts()
Get list of all ADs in the plan.
|
List<TriggeredAction> |
getAllReferences() |
ActionPattern |
getAP(String name)
Return action pattern from the plan with specified name.
|
String |
getAuthor()
Get author of the plan, optional.
|
Competence |
getC(String name)
Return competence from this plan with specified name.
|
List<PoshElement> |
getChildDataNodes()
Get list of children of this node.
|
List<Competence> |
getCompetences()
Get list of all competences.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
DriveCollection |
getDriveCollection()
Get drive collection of this plan.
|
String |
getInfo()
Get info about this plan.
|
String |
getName()
Get name of the plan.
|
Set<String> |
getSensesNames()
Get all sense names in the plan, i.e.
|
boolean |
isAD(String name)
Does this plan contain AD with specified name?
|
boolean |
isAP(String name)
Does this plan contain AP with specified name?
|
boolean |
isC(String name)
Does the plan contains
Competence with specified name? |
boolean |
isCycled()
Is some element (AP/C) of the lap plan cycled? Doesn't even have to be
attached to the drive.
|
boolean |
isUniqueAPorComp(String testedName)
Check if passed string is different than names of all competences and
action patterns.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
removeActionPattern(ActionPattern ap)
Remove action pattern from the plan and notify listeners of plan about
removal of a child.
|
void |
removeCompetence(Competence removeCompetence)
Remove competence from the plan and notify listeners about removal of
child.
|
void |
setAuthor(String author)
Set new author of the plan.
|
void |
setInfo(String info)
Set informations about the plan.
|
void |
setName(String name)
Name of the plan, from docnode, optional.
|
void |
synchronize(PoshPlan other)
Synchronize the lap tree to other the lap tree.
|
String |
toString()
Return serializaton of lap tree.
|
getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRootNode, isChildOfParent, removeElementListener, setParentpublic static final DataFlavor dataFlavor
public static final String PROP_NAME
name.public static final String PROP_AUTHOR
author.public static final String PROP_INFO
info.public Set<String> getActionsNames()
public List<TriggeredAction> getActions()
public List<TriggeredAction> getAllReferences()
public Set<String> getSensesNames()
public boolean isC(String name)
Competence with specified name?name - name we are checkingpublic Competence getC(String name)
name - name of searched Cpublic boolean isAP(String name)
name - name of AP we are checkingpublic ActionPattern getAP(String name)
name - name of searched APpublic boolean isAD(String name)
name - name of AD we are checkingpublic Adopt getAD(String name)
name - name of searched ADpublic boolean isUniqueAPorComp(String testedName)
testedName - name of tested string.public void addCompetence(Competence competence) throws DuplicateNameException, CycleException
competenceNode - DuplicateNameExceptionCycleExceptionpublic void addAdopt(Adopt adopt) throws DuplicateNameException, CycleException
DuplicateNameExceptionCycleExceptionpublic String getName()
public void setName(String name)
name - the name to set.public String getAuthor()
public void setAuthor(String author)
author - new author or empty string for erasing.public String getInfo()
public void setInfo(String info)
info - New info about plan or or empty string.public List<Competence> getCompetences()
public void addActionPattern(ActionPattern actionPattern) throws DuplicateNameException, CycleException
actionPatternNode - DuplicateNameExceptionCycleExceptionpublic List<Adopt> getAdopts()
public List<ActionPattern> getActionPatterns()
public DriveCollection getDriveCollection()
public boolean isCycled()
public String toString()
public List<PoshElement> getChildDataNodes()
PoshElementgetChildDataNodes in class PoshElement<PoshPlan,PoshPlan>public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElement<PoshPlan,PoshPlan>public DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElement<PoshPlan,PoshPlan>public void removeCompetence(Competence removeCompetence)
removeCompetence - Competence to be removedpublic void removeActionPattern(ActionPattern ap)
ap - Action pattern to be removed.public void synchronize(PoshPlan other)
other - The tree we are supposed to synchronize to.Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.