Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.icore.plan.build
Class ExamplePlanBuilder

    java.lang.Object
      ix.icore.plan.build.ExamplePlanBuilder

All Implemented Interfaces:
  PlanBuilder

Direct Known Subclasses:
  SimplePlanBuilder

    public class ExamplePlanBuilder

extends java.lang.Object
implements PlanBuilder

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

### nameGen

    protected Gensym.Generator nameGen

  Used by `genId(String)`.

### issues

    protected java.util.List issues

### activities

    protected java.util.List activities

### constraints

    protected ix.icore.domain.ListOfConstrainer constraints

### annotations

    protected Annotations annotations

### itemToSubitems

    protected MultiMap itemToSubitems

  Maps a object to a list of its subobjects.

### plan

    protected Plan plan

### planIssues

    protected ix.icore.plan.ListOfPlanIssue planIssues

### issueRefinements

    protected ix.icore.plan.ListOfPlanIssueRefinement issueRefinements

### planNodes

    protected ix.icore.plan.ListOfPlanNode planNodes

### planRefinements

    protected ix.icore.plan.ListOfPlanRefinement planRefinements

Constructor Detail

### ExamplePlanBuilder

    public ExamplePlanBuilder()

Method Detail

### addIssue

    public void addIssue(Issue issue)

  Description copied from interface: `PlanBuilder`
  Adds a top-level issue to the plan.

  Specified by:
    `addIssue` in interface `PlanBuilder`

### addSubissue

    public void addSubissue(Issue issue,
                            Issue subissue)

  Description copied from interface: `PlanBuilder`
  Adds a subissue of the specified issue.

  Specified by:
    `addSubissue` in interface `PlanBuilder`

### addActivity

    public void addActivity(Activity activity)

  Description copied from interface: `PlanBuilder`
  Adds a top-level activity to the plan.

  Specified by:
    `addActivity` in interface `PlanBuilder`

### addSubactivity

    public void addSubactivity(Activity activity,
                               Activity subactivity)

  Description copied from interface: `PlanBuilder`
  Adds a subactivity of the specified activity.

  Specified by:
    `addSubactivity` in interface `PlanBuilder`

### addConstraint

    public void addConstraint(Constraint c)

  Description copied from interface: `PlanBuilder`
  Adds a top-level constraint to the plan.

  Specified by:
    `addConstraint` in interface `PlanBuilder`

### setAnnotation

    public void setAnnotation(java.lang.Object key,
                              java.lang.Object value)

  Description copied from interface: `PlanBuilder`
  Sets a top-level annotation.

  Specified by:
    `setAnnotation` in interface `PlanBuilder`

### genId

    protected Name genId(java.lang.String base)

  Generates a short id for use within the plan.

  See Also:
    `Gensym.Generator.nextName(String)`

### getSubitems

    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.

### getPlan

    public Plan getPlan()

  Description copied from interface: `PlanBuilder`
  Builds everything added so far into a plan and returns that plan.

  Specified by:
    `getPlan` in interface `PlanBuilder`

### fillInPlan

    protected void fillInPlan()

  Installs any non-empty values in the relevant fields of the `Plan`. Called by `getPlan()`.

### main

    public static void main(java.lang.String[] argv)
                     throws java.lang.Exception

  Main program for testing. Makes a `PlanBuilderTest` and calls `PlanBuilderTest.test(PlanBuilder)` on an instance of ExamplePlanBuilder.

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD