org.pentaho.reporting.engine.classic.core.modules.output.xml
Class XMLWriter

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractFunction
          extended by org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLWriter
All Implemented Interfaces:
Serializable, Cloneable, EventListener, ReportListener, Expression, Function, OutputFunction

Deprecated. The whole basic XML output is deprecated as it cannot handle inline subreports.

public class XMLWriter
extends AbstractFunction
implements OutputFunction

The XMLWriter is the content creation function used to create the XML content. This implementation does no layouting, the bands and elements are written in the defined order.

The xml writer is intended as simple example on how to write OutputFunctions, the XML-code generated is very simple and easy to understand. If you seek complexer XML-Outputs, have a look at the HTML-Writer, this implementation is able to write XHTML output.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
XMLWriter()
          Deprecated. Creates a new XMLWriter function.
 
Method Summary
 void clearInlineSubreports(SubReportProcessType inlineExecution)
          Deprecated.  
 Object clone()
          Deprecated. Clones the expression.
 boolean createRollbackInformation()
          Deprecated.  
 OutputFunction deriveForPagebreak()
          Deprecated. This method simply clones the function.
 OutputFunction deriveForStorage()
          Deprecated. This method simply clones the function.
 int getDependencyLevel()
          Deprecated. The dependency level defines the level of execution for this function.
 InlineSubreportMarker[] getInlineSubreports()
          Deprecated.  
 Object getValue()
          Deprecated. Return the self reference of this writer.
 Writer getWriter()
          Deprecated. returns the assigned writer for the output.
 void groupFinished(ReportEvent event)
          Deprecated. Writes the footer of the current group.
 void groupStarted(ReportEvent event)
          Deprecated. Writes the header of the current group.
 void itemsAdvanced(ReportEvent event)
          Deprecated. Writes the itemband.
 void itemsFinished(ReportEvent event)
          Deprecated. Closes the itemband section.
 void itemsStarted(ReportEvent event)
          Deprecated. Starts the itembands section.
 void reportFinished(ReportEvent event)
          Deprecated. Writes the report footer.
 void reportStarted(ReportEvent event)
          Deprecated. Writes the report header.
 void restart(ReportState state)
          Deprecated.  
 void setDependencyLevel(int deplevel)
          Deprecated. Overrides the depency level.
 void setWriter(Writer w)
          Deprecated. Defines the writer for the XML-output.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
reportDone, reportInitialized
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
reportDone, reportInitialized
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setName, setRuntime
 

Constructor Detail

XMLWriter

public XMLWriter()
Deprecated. 
Creates a new XMLWriter function. The Writer gets a dependency level of -1.

Method Detail

getWriter

public Writer getWriter()
Deprecated. 
returns the assigned writer for the output.

Returns:
the writer.

setWriter

public void setWriter(Writer w)
Deprecated. 
Defines the writer for the XML-output.

Parameters:
w - the writer.

reportStarted

public void reportStarted(ReportEvent event)
Deprecated. 
Writes the report header.

Specified by:
reportStarted in interface ReportListener
Overrides:
reportStarted in class AbstractFunction
Parameters:
event - the event.

reportFinished

public void reportFinished(ReportEvent event)
Deprecated. 
Writes the report footer.

Specified by:
reportFinished in interface ReportListener
Overrides:
reportFinished in class AbstractFunction
Parameters:
event - the event.

groupStarted

public void groupStarted(ReportEvent event)
Deprecated. 
Writes the header of the current group.

Specified by:
groupStarted in interface ReportListener
Overrides:
groupStarted in class AbstractFunction
Parameters:
event - the event.

groupFinished

public void groupFinished(ReportEvent event)
Deprecated. 
Writes the footer of the current group.

Specified by:
groupFinished in interface ReportListener
Overrides:
groupFinished in class AbstractFunction
Parameters:
event - the event.

itemsAdvanced

public void itemsAdvanced(ReportEvent event)
Deprecated. 
Writes the itemband.

Specified by:
itemsAdvanced in interface ReportListener
Overrides:
itemsAdvanced in class AbstractFunction
Parameters:
event - the event.

itemsStarted

public void itemsStarted(ReportEvent event)
Deprecated. 
Starts the itembands section.

The next events will be itemsAdvanced events until the itemsFinished event is raised.

Specified by:
itemsStarted in interface ReportListener
Overrides:
itemsStarted in class AbstractFunction
Parameters:
event - The event.

itemsFinished

public void itemsFinished(ReportEvent event)
Deprecated. 
Closes the itemband section.

The itemBand is finished, the report starts to close open groups.

Specified by:
itemsFinished in interface ReportListener
Overrides:
itemsFinished in class AbstractFunction
Parameters:
event - The event.

getValue

public Object getValue()
Deprecated. 
Return the self reference of this writer.

Specified by:
getValue in interface Expression
Returns:
the value of the function.

getDependencyLevel

public int getDependencyLevel()
Deprecated. 
The dependency level defines the level of execution for this function. Higher dependency functions are executed before lower dependency functions. For ordinary functions and expressions, the range for dependencies is defined to start from 0 (lowest dependency possible) to 2^31 (upper limit of int).

PageLayouter functions override the default behaviour an place them self at depency level -1, an so before any user defined function.

Specified by:
getDependencyLevel in interface Expression
Overrides:
getDependencyLevel in class AbstractExpression
Returns:
the level.

setDependencyLevel

public void setDependencyLevel(int deplevel)
Deprecated. 
Overrides the depency level. Should be lower than any other function depency.

Specified by:
setDependencyLevel in interface Expression
Overrides:
setDependencyLevel in class AbstractExpression
Parameters:
deplevel - the new depency level.

deriveForStorage

public OutputFunction deriveForStorage()
Deprecated. 
This method simply clones the function. The XMLWriter does not maintain large internal states and therefore need not to be aware of any advanced optimizations.

Specified by:
deriveForStorage in interface OutputFunction
Returns:
the derived function.

deriveForPagebreak

public OutputFunction deriveForPagebreak()
Deprecated. 
This method simply clones the function. The XMLWriter does not maintain large internal states and therefore need not to be aware of any advanced optimizations.

Specified by:
deriveForPagebreak in interface OutputFunction
Returns:
the derived function.

clone

public Object clone()
             throws CloneNotSupportedException
Deprecated. 
Clones the expression. The expression should be reinitialized after the cloning.

Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the expression from any other object space.

Specified by:
clone in interface Expression
Overrides:
clone in class AbstractExpression
Returns:
a clone of this expression.
Throws:
CloneNotSupportedException - this should never happen.

getInlineSubreports

public InlineSubreportMarker[] getInlineSubreports()
Deprecated. 
Specified by:
getInlineSubreports in interface OutputFunction

clearInlineSubreports

public void clearInlineSubreports(SubReportProcessType inlineExecution)
Deprecated. 
Specified by:
clearInlineSubreports in interface OutputFunction

restart

public void restart(ReportState state)
Deprecated. 
Specified by:
restart in interface OutputFunction

createRollbackInformation

public boolean createRollbackInformation()
Deprecated. 
Specified by:
createRollbackInformation in interface OutputFunction