Class XMLWriter
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.AbstractFunction
-
- org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLWriter
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,ReportListener
,Expression
,Function
,OutputFunction
public class XMLWriter extends AbstractFunction implements OutputFunction
Deprecated.The whole basic XML output is deprecated as it cannot handle inline subreports.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
Constructors Constructor Description XMLWriter()
Deprecated.Creates a new XMLWriter function.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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
groupBodyFinished(ReportEvent event)
Deprecated.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, summaryRowSelection
-
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setName, setRuntime
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
reportDone, reportInitialized, summaryRowSelection
-
-
-
-
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 interfaceReportListener
- Overrides:
reportStarted
in classAbstractFunction
- Parameters:
event
- the event.
-
reportFinished
public void reportFinished(ReportEvent event)
Deprecated.Writes the report footer.- Specified by:
reportFinished
in interfaceReportListener
- Overrides:
reportFinished
in classAbstractFunction
- Parameters:
event
- the event.
-
groupStarted
public void groupStarted(ReportEvent event)
Deprecated.Writes the header of the current group.- Specified by:
groupStarted
in interfaceReportListener
- Overrides:
groupStarted
in classAbstractFunction
- Parameters:
event
- the event.
-
groupFinished
public void groupFinished(ReportEvent event)
Deprecated.Writes the footer of the current group.- Specified by:
groupFinished
in interfaceReportListener
- Overrides:
groupFinished
in classAbstractFunction
- Parameters:
event
- the event.
-
itemsAdvanced
public void itemsAdvanced(ReportEvent event)
Deprecated.Writes the itemband.- Specified by:
itemsAdvanced
in interfaceReportListener
- Overrides:
itemsAdvanced
in classAbstractFunction
- 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 interfaceReportListener
- Overrides:
itemsStarted
in classAbstractFunction
- 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 interfaceReportListener
- Overrides:
itemsFinished
in classAbstractFunction
- Parameters:
event
- The event.
-
getValue
public Object getValue()
Deprecated.Return the self reference of this writer.- Specified by:
getValue
in interfaceExpression
- 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 interfaceExpression
- Overrides:
getDependencyLevel
in classAbstractExpression
- 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 interfaceExpression
- Overrides:
setDependencyLevel
in classAbstractExpression
- 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 interfaceOutputFunction
- 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 interfaceOutputFunction
- 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 interfaceExpression
- Overrides:
clone
in classAbstractExpression
- Returns:
- a clone of this expression.
- Throws:
CloneNotSupportedException
- this should never happen.
-
getInlineSubreports
public InlineSubreportMarker[] getInlineSubreports()
Deprecated.- Specified by:
getInlineSubreports
in interfaceOutputFunction
-
clearInlineSubreports
public void clearInlineSubreports(SubReportProcessType inlineExecution)
Deprecated.- Specified by:
clearInlineSubreports
in interfaceOutputFunction
-
restart
public void restart(ReportState state)
Deprecated.- Specified by:
restart
in interfaceOutputFunction
-
groupBodyFinished
public void groupBodyFinished(ReportEvent event)
Deprecated.- Specified by:
groupBodyFinished
in interfaceOutputFunction
-
createRollbackInformation
public boolean createRollbackInformation()
Deprecated.- Specified by:
createRollbackInformation
in interfaceOutputFunction
-
-