| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jopendocument.dom.template.statements.Statement
public abstract class Statement
A statement that will be executed to modify the parsed xml.
| Field Summary | |
|---|---|
static org.jdom.Namespace | 
stmtNS
 | 
| Constructor Summary | |
|---|---|
Statement(String name)
 | 
|
| Method Summary | |
|---|---|
abstract  void | 
execute(Processor<?> processor,
        org.jdom.Element elem,
        DataModel model)
Should produce valid OpenDocument XML.  | 
protected static org.jdom.Element | 
getAncestorByName(org.jdom.Element element,
                  String name)
 | 
protected static org.jdom.Element | 
getElement(String name)
 | 
 String | 
getName()
The name of this statement.  | 
abstract  boolean | 
matches(org.jdom.Element elem)
Find representations of this statement.  | 
abstract  void | 
prepare(org.jdom.Element elem)
Creates an element named getName(). | 
protected static void | 
pullUp(org.jdom.Element elem)
Replace elem by its content.  | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final org.jdom.Namespace stmtNS
| Constructor Detail | 
|---|
public Statement(String name)
| Method Detail | 
|---|
public final String getName()
prepare(Element) must create an Element with that name.
public abstract boolean matches(org.jdom.Element elem)
elem - the element to test.
true if elem should prepared by this statement.
public abstract void prepare(org.jdom.Element elem)
                      throws TemplateException
getName().
elem - an element that returned true with matches(Element).
TemplateException
public abstract void execute(Processor<?> processor,
                             org.jdom.Element elem,
                             DataModel model)
                      throws TemplateException
processor - the processor.elem - an element that has been prepared.model - the data.
TemplateExceptionpublic String toString()
toString in class Objectprotected static org.jdom.Element getElement(String name)
protected static org.jdom.Element getAncestorByName(org.jdom.Element element,
                                                    String name)
protected static void pullUp(org.jdom.Element elem)
elem - the element to remove.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||