org.odftoolkit.simple.common.field
Interface VariableContainer

All Known Implementing Classes:
AbstractVariableContainer, Footer, Header, TextDocument

public interface VariableContainer

VariableContainer is a container which maintains the declared variables. Variable(s) can be added in this container.

Since:
0.5
See Also:
VariableField, TextDocument, Header, Footer

Method Summary
 VariableField declareVariable(String name, VariableField.VariableType type)
          Declare a new variable field to this container.
 OdfElement getVariableContainerElement()
          Get the ODF element which can have variable declare section as child element directly according to ODF specification.
 VariableField getVariableFieldByName(String name)
          Return the declared variable by name.
 

Method Detail

getVariableContainerElement

OdfElement getVariableContainerElement()
Get the ODF element which can have variable declare section as child element directly according to ODF specification. This element will help to find the position to declare a new variable.

The variable declare section may be , or .

Returns:
container element which can hold variable declare section.

declareVariable

VariableField declareVariable(String name,
                              VariableField.VariableType type)
Declare a new variable field to this container.

Parameters:
name - the unique name of this variable field.
type - the type of this variable field.
Returns:
declared variable field.

getVariableFieldByName

VariableField getVariableFieldByName(String name)
Return the declared variable by name.

Parameters:
name - the unique name of this variable field.
Returns:
the declared variable.


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.