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)
|
ActionPattern |
getActionPattern(int id)
Get action pattern with id, equivalent of
getActionPatterns(). |
int |
getActionPatternId(ActionPattern actionPattern)
Get id of AP.
|
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. actions is DC, AP and C.
|
Adopt |
getAD(String name)
Returns adopt from the plan with specified name.
|
Adopt |
getAdopt(int id)
Get adopt with id, equivalent of
getAdopts(). |
int |
getAdoptId(Adopt adopt)
Get id of adopt.
|
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.
|
Competence |
getCompetence(int id)
Get competence with id, equivalent of
getCompetences(). |
int |
getCompetenceId(Competence competence)
Get id of competence.
|
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.
|
List<PoshElement> |
getChildDataNodes()
Get list of children of this node.
|
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. senses in DC goal, DE trigger, CE
trigger.
|
LapType |
getType()
Get type of the element.
|
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?
|
boolean |
isUniqueNodeName(String testedName)
Check if passed string is different than names of all referencable nodes (competences, and
action patterns and adopts).
|
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.
|
getElementId, getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, 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 Competence getCompetence(int id)
getCompetences().List.get(int).public boolean isAP(String name)
name - name of AP we are checkingpublic ActionPattern getAP(String name)
name - name of searched APpublic ActionPattern getActionPattern(int id)
getActionPatterns().List.get(int).public boolean isAD(String name)
name - name of AD we are checkingpublic Adopt getAD(String name)
name - name of searched ADpublic Adopt getAdopt(int id)
getAdopts().List.get(int).public boolean isUniqueNodeName(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 LapType getType()
PoshElementgetType 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.public int getAdoptId(Adopt adopt)
adopt - Adopt for which we want indexIllegalArgumentException - If adopt is not in the adopts of the
plan.public int getActionPatternId(ActionPattern actionPattern)
actionPattern - AP for which we want indexIllegalArgumentException - If AP is not in APs of the plan.public int getCompetenceId(Competence competence)
competence - C for which we want indexIllegalArgumentException - If competence is not in the competences
of the plan.Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.