story.scheherazade.verbalizer
Class DiscoursePlan

java.lang.Object
  extended by story.scheherazade.verbalizer.DiscoursePlan
All Implemented Interfaces:
RenderableObject, DiscourseExecutable

public class DiscoursePlan
extends java.lang.Object
implements RenderableObject, DiscourseExecutable

A Vector of DiscourseCommands


Constructor Summary
DiscoursePlan()
           
DiscoursePlan(DiscourseCommand command)
          Constructor with initial command.
DiscoursePlan(DiscourseCommand command, DiscourseCommand command2)
          Constructor with two initial commands.
DiscoursePlan(DiscourseCommand command, SerializationSymbol relatedSymbol)
          Constructor with initial commmand and symbol to link to resulting verbalization.
DiscoursePlan(SerializationSymbol relatedSymbol, boolean overloader)
          Constructor with symbol to link to resulting verbalization.
 
Method Summary
 void add(DiscourseCommand command)
           
 void add(DiscourseExecutable executable)
           
 void add(DiscoursePlan planToAbsorb)
           
 void clear()
           
 void clearNonStateCommands()
          Clear out all commands except those that set or unset something in VerbalizerState.
 DiscourseCommand get(int i)
           
 SerializationSymbol getRelatedSymbol()
           
 void insert(DiscourseCommand command, int position)
           
 void insert(DiscoursePlan planToAbsorb, int position)
           
 void intern()
          Intern this DiscoursePlan.
 boolean isInterned()
          Determine whether this DiscoursePlan is interned.
 DiscoursePlan makeCopy()
           
 void remove(int i)
           
 java.lang.StringBuffer render()
           
 java.lang.StringBuffer render(boolean singleLine)
           
 void replace(DiscourseCommand command, int position)
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoursePlan

public DiscoursePlan()

DiscoursePlan

public DiscoursePlan(DiscourseCommand command)
              throws Scheherexception
Constructor with initial command.

Throws:
Scheherexception

DiscoursePlan

public DiscoursePlan(DiscourseCommand command,
                     DiscourseCommand command2)
              throws Scheherexception
Constructor with two initial commands.

Throws:
Scheherexception

DiscoursePlan

public DiscoursePlan(SerializationSymbol relatedSymbol,
                     boolean overloader)
Constructor with symbol to link to resulting verbalization. Set overloader to anything.


DiscoursePlan

public DiscoursePlan(DiscourseCommand command,
                     SerializationSymbol relatedSymbol)
              throws Scheherexception
Constructor with initial commmand and symbol to link to resulting verbalization.

Throws:
Scheherexception
Method Detail

getRelatedSymbol

public SerializationSymbol getRelatedSymbol()

makeCopy

public DiscoursePlan makeCopy()

insert

public void insert(DiscourseCommand command,
                   int position)
            throws Scheherexception
Throws:
Scheherexception

replace

public void replace(DiscourseCommand command,
                    int position)
             throws Scheherexception
Throws:
Scheherexception

insert

public void insert(DiscoursePlan planToAbsorb,
                   int position)
            throws Scheherexception
Throws:
Scheherexception

add

public void add(DiscourseCommand command)
         throws Scheherexception
Throws:
Scheherexception

add

public void add(DiscoursePlan planToAbsorb)
         throws Scheherexception
Throws:
Scheherexception

add

public void add(DiscourseExecutable executable)
         throws Scheherexception
Throws:
Scheherexception

get

public DiscourseCommand get(int i)
                     throws Scheherexception
Throws:
Scheherexception

size

public int size()

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Specified by:
render in interface RenderableObject
Specified by:
render in interface DiscourseExecutable
Throws:
Scheherexception

render

public java.lang.StringBuffer render(boolean singleLine)
                              throws Scheherexception
Throws:
Scheherexception

clear

public void clear()
           throws Scheherexception
Throws:
Scheherexception

clearNonStateCommands

public void clearNonStateCommands()
                           throws Scheherexception
Clear out all commands except those that set or unset something in VerbalizerState.

Throws:
Scheherexception

remove

public void remove(int i)
            throws Scheherexception
Throws:
Scheherexception

isInterned

public boolean isInterned()
Determine whether this DiscoursePlan is interned.


intern

public void intern()
Intern this DiscoursePlan. Any further attempt to add to it will throw an exception.

Specified by:
intern in interface DiscourseExecutable


Copyright © 2011 David K. Elson. All Rights Reserved.