|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.icore.plan.build.ExamplePlanBuilder
public class ExamplePlanBuilder
Plan-construction utility.
Nested Class Summary | |
---|---|
protected class |
ExamplePlanBuilder.ActivityExpander
|
protected class |
ExamplePlanBuilder.Expander
Constructs the plan-items and refinements used to tie an issue or activity to its subissues or subactivities. |
protected class |
ExamplePlanBuilder.IssueExpander
|
Field Summary | |
---|---|
protected java.util.List |
activities
|
protected Annotations |
annotations
|
protected ix.icore.domain.ListOfConstrainer |
constraints
|
protected ix.icore.plan.ListOfPlanIssueRefinement |
issueRefinements
|
protected java.util.List |
issues
|
protected MultiMap |
itemToSubitems
Maps a object to a list of its subobjects. |
protected Gensym.Generator |
nameGen
Used by genId(String) . |
protected Plan |
plan
|
protected ix.icore.plan.ListOfPlanIssue |
planIssues
|
protected ix.icore.plan.ListOfPlanNode |
planNodes
|
protected ix.icore.plan.ListOfPlanRefinement |
planRefinements
|
Constructor Summary | |
---|---|
ExamplePlanBuilder()
|
Method Summary | |
---|---|
void |
addActivity(Activity activity)
Adds a top-level activity to the plan. |
void |
addConstraint(Constraint c)
Adds a top-level constraint to the plan. |
void |
addIssue(Issue issue)
Adds a top-level issue to the plan. |
void |
addSubactivity(Activity activity,
Activity subactivity)
Adds a subactivity of the specified activity. |
void |
addSubissue(Issue issue,
Issue subissue)
Adds a subissue of the specified issue. |
protected void |
fillInPlan()
Installs any non-empty values in the relevant fields of the Plan . |
protected Name |
genId(java.lang.String base)
Generates a short id for use within the plan. |
Plan |
getPlan()
Builds everything added so far into a plan and returns that plan. |
protected java.util.List |
getSubitems(java.lang.Object item)
Returns the subissues of an issue, or the subactivities of an activity, that have been added so far. |
static void |
main(java.lang.String[] argv)
Main program for testing. |
void |
setAnnotation(java.lang.Object key,
java.lang.Object value)
Sets a top-level annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Gensym.Generator nameGen
genId(String)
.
protected java.util.List issues
protected java.util.List activities
protected ix.icore.domain.ListOfConstrainer constraints
protected Annotations annotations
protected MultiMap itemToSubitems
protected Plan plan
protected ix.icore.plan.ListOfPlanIssue planIssues
protected ix.icore.plan.ListOfPlanIssueRefinement issueRefinements
protected ix.icore.plan.ListOfPlanNode planNodes
protected ix.icore.plan.ListOfPlanRefinement planRefinements
Constructor Detail |
---|
public ExamplePlanBuilder()
Method Detail |
---|
public void addIssue(Issue issue)
PlanBuilder
addIssue
in interface PlanBuilder
public void addSubissue(Issue issue, Issue subissue)
PlanBuilder
addSubissue
in interface PlanBuilder
public void addActivity(Activity activity)
PlanBuilder
addActivity
in interface PlanBuilder
public void addSubactivity(Activity activity, Activity subactivity)
PlanBuilder
addSubactivity
in interface PlanBuilder
public void addConstraint(Constraint c)
PlanBuilder
addConstraint
in interface PlanBuilder
public void setAnnotation(java.lang.Object key, java.lang.Object value)
PlanBuilder
setAnnotation
in interface PlanBuilder
protected Name genId(java.lang.String base)
Gensym.Generator.nextName(String)
protected java.util.List getSubitems(java.lang.Object item)
public Plan getPlan()
PlanBuilder
getPlan
in interface PlanBuilder
protected void fillInPlan()
Plan
. Called by getPlan()
.
public static void main(java.lang.String[] argv) throws java.lang.Exception
PlanBuilderTest
and calls PlanBuilderTest.test(PlanBuilder)
on
an instance of ExamplePlanBuilder.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |