ix.test
Class PlanBuilderTest

java.lang.Object
  extended by ix.test.PlanBuilderTest

public class PlanBuilderTest
extends java.lang.Object

Constructs a plan and outputs it in XML. By default, it uses an ExamplePlanBuilder to construct the plan, but a different PlanBuilder class may be tested by giving an instance to test(PlanBuilder).


Field Summary
protected  org.jdom.output.XMLOutputter out
           
 
Constructor Summary
PlanBuilderTest()
           
 
Method Summary
static void main(java.lang.String[] argv)
          Main program for testing.
 Plan makeExamplePlan(PlanBuilder pb)
          Constructs a simple plan containing some issues, activities, constraints, and annotations.
static PlanBuilder makePlanBuilder(java.lang.Class c)
          Makes a PlanBuilder by calling the 0-argument constuctor of the specified class.
 void test(PlanBuilder pb)
          Calls makeExamplePlan(PlanBuilder) and prints the resulting plan as XML to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected org.jdom.output.XMLOutputter out
Constructor Detail

PlanBuilderTest

public PlanBuilderTest()
Method Detail

main

public static void main(java.lang.String[] argv)
                 throws java.io.IOException
Main program for testing. To specify the plan-builder class, use the plan-builder-class parameter. For example:
 java ix.test.PlanBuilderTest \
      -plan-builder-class=ix.icore.plan.build.SimplePlanBuilder
 
The default is ix.plan.build.ExamplePlanBuilder.

Throws:
java.io.IOException

makePlanBuilder

public static PlanBuilder makePlanBuilder(java.lang.Class c)
Makes a PlanBuilder by calling the 0-argument constuctor of the specified class.


test

public void test(PlanBuilder pb)
          throws java.io.IOException
Calls makeExamplePlan(PlanBuilder) and prints the resulting plan as XML to System.out.

Throws:
java.io.IOException
See Also:
XML.objectToDocument(Object)

makeExamplePlan

public Plan makeExamplePlan(PlanBuilder pb)
Constructs a simple plan containing some issues, activities, constraints, and annotations. Some of the issues have subissues, and some of the activities have subactivities, to show how such subitems are represented in a plan.