org.jopendocument.dom.template.statements
Class BaseStatement

java.lang.Object
  extended by org.jopendocument.dom.template.statements.Statement
      extended by org.jopendocument.dom.template.statements.BaseStatement
Direct Known Subclasses:
ForEach, If, SetStmt

public abstract class BaseStatement
extends Statement


Field Summary
 
Fields inherited from class org.jopendocument.dom.template.statements.Statement
stmtNS
 
Constructor Summary
BaseStatement(String name)
           
 
Method Summary
 boolean matches(org.jdom.Element elem)
          Find representations of this statement.
 void prepare(org.jdom.Element scriptElem)
          Creates an element named Statement.getName().
protected abstract  void prepare(org.jdom.Element script, org.jdom.Element command)
           
protected static void removeSection(org.jdom.Element elem)
          If elem is an OO section, remove it and replace it by its children.
static void setScriptLang(String scriptLang)
           
 
Methods inherited from class org.jopendocument.dom.template.statements.Statement
execute, getAncestorByName, getElement, getName, pullUp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseStatement

public BaseStatement(String name)
Method Detail

setScriptLang

public static void setScriptLang(String scriptLang)

matches

public boolean matches(org.jdom.Element elem)
Description copied from class: Statement
Find representations of this statement.

Specified by:
matches in class Statement
Parameters:
elem - the element to test.
Returns:
true if elem should prepared by this statement.

prepare

public void prepare(org.jdom.Element scriptElem)
             throws TemplateException
Description copied from class: Statement
Creates an element named Statement.getName().

Specified by:
prepare in class Statement
Parameters:
scriptElem - an element that returned true with Statement.matches(Element).
Throws:
TemplateException

prepare

protected abstract void prepare(org.jdom.Element script,
                                org.jdom.Element command)
                         throws TemplateException
Throws:
TemplateException

removeSection

protected static void removeSection(org.jdom.Element elem)
If elem is an OO section, remove it and replace it by its children.

Parameters:
elem - the element to test.


Copyright © 2010 jOpenDocument All Rights Reserved.