Jacson

de.spieleck.app.jacson.report
Class XSLTReport

java.lang.Object
  extended byde.spieleck.app.jacson.report.XSLTReport
All Implemented Interfaces:
JacsonPrintReport, JacsonReport, JacsonStately

public class XSLTReport
extends java.lang.Object
implements JacsonPrintReport

This is a really powerful report, considering the output as XML and applying a XSL-Transformation on it. Note that a XSLT Processor needs some space for internal processing, but this is probably still less than the storage requirement of enhanced JacsonEvaluator classes like AccountingEvaluator.

You can select ...

It should be nothing this report cannot create from the input: Good XML, good CSV, HTML, PDF (with xsl:fo).

Author:
fsn, Patrick Carl

Field Summary
static java.lang.String ITEM_ELEM
           
static java.lang.String NAME_ATT
           
static java.lang.String NAME_NODE
           
 org.xml.sax.helpers.AttributesImpl nameAtts
          In case we have name Attributes, we use this.
static java.lang.String NAMESPACE
           
static java.lang.String OUTPUTPROPERTY_NODE
           
static java.lang.String PARAMETER_NODE
           
static java.lang.String ROOT_ELEM
           
static java.lang.String STYLE_NODE
           
protected  javax.xml.transform.sax.TransformerHandler trans
          The transformer which does the main work.
static java.lang.String VALUE_NODE
           
 
Constructor Summary
XSLTReport()
           
 
Method Summary
 void begin(java.lang.String id)
          Begin a subsection within report
 void end()
          Close a subsection within a report
 void finish()
          Finish and close underlying resources
 void finish(boolean close)
          Finish and optionally close the underlying resources
 JacsonState getRegState()
          returns the set JacsonState
 void init(ConfigNode config)
          Initialize the report.
 void registerState(JacsonState state)
          Give the class access to an appropriate state.
 void report(java.lang.String localName, java.lang.String value)
          Report a single name value pair within a report
 void setOutputStream(java.io.OutputStream os)
          Attach an appropriate Result to the Transformer.
 void setPrintWriter(java.io.PrintWriter pw)
          Attach an appropriate Result to the Transformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_NODE

public static final java.lang.String STYLE_NODE
See Also:
Constant Field Values

OUTPUTPROPERTY_NODE

public static final java.lang.String OUTPUTPROPERTY_NODE
See Also:
Constant Field Values

PARAMETER_NODE

public static final java.lang.String PARAMETER_NODE
See Also:
Constant Field Values

NAME_NODE

public static final java.lang.String NAME_NODE
See Also:
Constant Field Values

VALUE_NODE

public static final java.lang.String VALUE_NODE
See Also:
Constant Field Values

NAME_ATT

public static final java.lang.String NAME_ATT
See Also:
Constant Field Values

ROOT_ELEM

public static final java.lang.String ROOT_ELEM
See Also:
Constant Field Values

ITEM_ELEM

public static final java.lang.String ITEM_ELEM
See Also:
Constant Field Values

NAMESPACE

public static final java.lang.String NAMESPACE
See Also:
Constant Field Values

nameAtts

public final org.xml.sax.helpers.AttributesImpl nameAtts
In case we have name Attributes, we use this.


trans

protected javax.xml.transform.sax.TransformerHandler trans
The transformer which does the main work.

Constructor Detail

XSLTReport

public XSLTReport()
Method Detail

init

public void init(ConfigNode config)
          throws JacsonConfigException
Description copied from interface: JacsonReport
Initialize the report. The passed ConfigNode can be used to obtain configuration information of the report from the global config xml.

Specified by:
init in interface JacsonReport
Throws:
JacsonConfigException

setOutputStream

public void setOutputStream(java.io.OutputStream os)
                     throws JacsonConfigException
Attach an appropriate Result to the Transformer.

Specified by:
setOutputStream in interface JacsonPrintReport
Throws:
JacsonConfigException

setPrintWriter

public void setPrintWriter(java.io.PrintWriter pw)
                    throws JacsonConfigException
Attach an appropriate Result to the Transformer.

Specified by:
setPrintWriter in interface JacsonPrintReport
Throws:
JacsonConfigException

begin

public void begin(java.lang.String id)
Description copied from interface: JacsonReport
Begin a subsection within report

Specified by:
begin in interface JacsonReport

report

public void report(java.lang.String localName,
                   java.lang.String value)
Description copied from interface: JacsonReport
Report a single name value pair within a report

Specified by:
report in interface JacsonReport

end

public void end()
Description copied from interface: JacsonReport
Close a subsection within a report

Specified by:
end in interface JacsonReport

finish

public void finish()
Description copied from interface: JacsonReport
Finish and close underlying resources

Specified by:
finish in interface JacsonReport

finish

public void finish(boolean close)
Description copied from interface: JacsonReport
Finish and optionally close the underlying resources

Specified by:
finish in interface JacsonReport
Parameters:
close - flag whether to close resources or not.

registerState

public void registerState(JacsonState state)
Description copied from interface: JacsonStately
Give the class access to an appropriate state.

Specified by:
registerState in interface JacsonStately

getRegState

public JacsonState getRegState()
Description copied from interface: JacsonReport
returns the set JacsonState

Specified by:
getRegState in interface JacsonReport

Spieleck

Copyleft 2002 spieleck.de.