mt.edu.um.nlgapp.docplan
Class DocPlan

java.lang.Object
  extended by mt.edu.um.nlgapp.docplan.DocPlan

public class DocPlan
extends java.lang.Object

This is the class for a document plan. A document plan has the form of a tree, where each node (which is itself a DocPlan) has a relationship to its parent (null by default), and an ontology instance, which represents the message at that particular node. It also has a status, a value from DocStatus, which indicates whether the current node is a document, a section, a paragraph or a sentence. DocPlan nodes also have a LexicalTemplate, which should be set via calls to Microplanner.microplanDoc(DocPlan);

Author:
bertugatt

Constructor Summary
DocPlan()
          Default (empty) constructor
 
Method Summary
 void addChild(DocPlan child)
          Add a child to this document plan.
 void addChild(DocPlan child, java.lang.String parentRelation)
          Add a child to this document plan, also specifying what the relation should be between the child and the current node (e.g.
 java.util.List<DocPlan> getChildren()
           
 LexicalTemplate getLexicalTemplate()
           
 uk.ac.abdn.carados.OntologyInstanceHandler getMessage()
           
 DocPlan getParent()
           
 java.lang.String getRelationToParent()
           
 DocStatus getStatus()
           
 void setChildren(java.util.List<DocPlan> children)
           
 void setLexicalTemplate(LexicalTemplate template)
          Set the lexical template corresponding to the message in this node;
 void setMessage(uk.ac.abdn.carados.OntologyInstanceHandler message)
           
 void setRelationToParent(java.lang.String relationToParent)
           
 void setStatus(DocStatus status)
          Set the status of this document node, indicating what its
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocPlan

public DocPlan()
Default (empty) constructor

Method Detail

getStatus

public DocStatus getStatus()
Returns:
the status

setStatus

public void setStatus(DocStatus status)
Set the status of this document node, indicating what its

Parameters:
status - the status to set

getMessage

public uk.ac.abdn.carados.OntologyInstanceHandler getMessage()
Returns:
the message

setMessage

public void setMessage(uk.ac.abdn.carados.OntologyInstanceHandler message)
Parameters:
message - the message to set

getRelationToParent

public java.lang.String getRelationToParent()
Returns:
the relationToParent

setRelationToParent

public void setRelationToParent(java.lang.String relationToParent)
Parameters:
relationToParent - the relationToParent to set

getParent

public DocPlan getParent()
Returns:
the parent node in the tree. This method should return null if, and only if, the current node is the root of the document.

getChildren

public java.util.List<DocPlan> getChildren()
Returns:
the children

setChildren

public void setChildren(java.util.List<DocPlan> children)
Parameters:
children - the children to set

addChild

public void addChild(DocPlan child)
Add a child to this document plan. Children are held in the order in which they are added.

Parameters:
child - The child

addChild

public void addChild(DocPlan child,
                     java.lang.String parentRelation)
Add a child to this document plan, also specifying what the relation should be between the child and the current node (e.g. "cause").

Parameters:
child - The child

setLexicalTemplate

public void setLexicalTemplate(LexicalTemplate template)
Set the lexical template corresponding to the message in this node;

Parameters:
template - the template

getLexicalTemplate

public LexicalTemplate getLexicalTemplate()
Returns:
the lexical template corresponding to this node;