|
||||||||||
| 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<PoshPlan,PoshPlan>
cz.cuni.amis.pogamut.sposh.elements.PoshPlan
public final class PoshPlan
Root node of whole lap plan, contains DriveCollection, all Competence
and ActionPattern + optional documentation.
top level of the decision tree,
ActionPattern,
Competence,
TriggeredAction| Field Summary | |
|---|---|
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. |
| Fields inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement |
|---|
IDENT_PATTERN |
| Method Summary | |
|---|---|
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().List.get(int). |
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. |
Adopt |
getAD(String name)
Returns adopt from the plan with specified name. |
Adopt |
getAdopt(int id)
Get adopt with id, equivalent of getAdopts().List.get(int). |
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. |
List<PoshElement> |
getChildDataNodes()
Get list of children of this node. |
Competence |
getCompetence(int id)
Get competence with id, equivalent of getCompetences().List.get(int). |
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. |
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. |
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? Doesn't even have to be attached to the drive. |
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. |
| 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 |
|---|
public 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.
| Method Detail |
|---|
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 checking
public Competence getC(String name)
name - name of searched C
public Competence getCompetence(int id)
getCompetences().List.get(int).
public boolean isAP(String name)
name - name of AP we are checking
public ActionPattern getAP(String name)
name - name of searched AP
public ActionPattern getActionPattern(int id)
getActionPatterns().List.get(int).
public boolean isAD(String name)
name - name of AD we are checking
public Adopt getAD(String name)
name - name of searched AD
public 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 -
DuplicateNameException
CycleException
public void addAdopt(Adopt adopt)
throws DuplicateNameException,
CycleException
DuplicateNameException
CycleExceptionpublic 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 -
DuplicateNameException
CycleExceptionpublic List<Adopt> getAdopts()
public List<ActionPattern> getActionPatterns()
public DriveCollection getDriveCollection()
public boolean isCycled()
public String toString()
toString in class Objectpublic List<PoshElement> getChildDataNodes()
PoshElement
getChildDataNodes in class PoshElement<PoshPlan,PoshPlan>
public boolean moveChild(int newIndex,
PoshElement child)
PoshElement
moveChild in class PoshElement<PoshPlan,PoshPlan>public DataFlavor getDataFlavor()
PoshElement
getDataFlavor in class PoshElement<PoshPlan,PoshPlan>public LapType getType()
PoshElement
getType 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 index
IllegalArgumentException - If adopt is not in the adopts of the
plan.public int getActionPatternId(ActionPattern actionPattern)
actionPattern - AP for which we want index
IllegalArgumentException - If AP is not in APs of the plan.public int getCompetenceId(Competence competence)
competence - C for which we want index
IllegalArgumentException - If competence is not in the competences
of the plan.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||