watch
Class Transformation

java.lang.Object
  extended by watch.Transformation
Direct Known Subclasses:
HtmlTransformation, IdentityTransformation, ShortTransformation, TextTransformation, TimeplotTransformation, XslTransformation

public abstract class Transformation
extends java.lang.Object

Abstract class defining a post-computation transformation.

See Also:
Watch.execute(java.lang.String, java.util.Collection, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, watch.Transformation, java.lang.String)

Field Summary
static Transformation HTML
          HTML transformation.
static Transformation IDENTITY
          Identity transformation.
static Transformation SHORT
          Short transformation.
static Transformation TEXT
          Text transformation.
static Transformation TIMEPLOT
          Timeplot transformation.
 
Constructor Summary
Transformation()
          Constructor.
 
Method Summary
abstract  boolean apply(org.w3c.dom.Document XML_Input, java.lang.String J_OutputFileName)
          Post-computation transformation handler.
protected  boolean applyXsl(org.w3c.dom.Document XML_Input, java.lang.String J_XslFileName, java.lang.String J_OutputFileName)
          XSL stylesheet application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTITY

public static final Transformation IDENTITY
Identity transformation. The XML output structure directly coming from the computation should be kept as is for output.


SHORT

public static final Transformation SHORT
Short transformation. The output is short single line giving the essentials of the imputations: amount of imputations, with the part of 'out-of-scope'. This output may basically be displayed in the standard output for coherence controls, month by month for instance.


TEXT

public static final Transformation TEXT
Text transformation. The output tables are displayed in a text output. Can be displayed either in the standard output or in a text file.


HTML

public static final Transformation HTML
HTML transformation. The output tables are displayed in an HTML output. This output may basically be directed to an HTML file so that web browsers can display it correctly afterwards.


TIMEPLOT

public static final Transformation TIMEPLOT
Timeplot transformation. This transformation is the one basically used for history computations. It is actually composed by two transformation:

See Also:
Watch.execute(java.lang.String, java.util.Collection, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, watch.Transformation, java.lang.String)
Constructor Detail

Transformation

public Transformation()
Constructor.

Method Detail

apply

public abstract boolean apply(org.w3c.dom.Document XML_Input,
                              java.lang.String J_OutputFileName)
Post-computation transformation handler.

Parameters:
XML_Input - XML result of the watch computation.
J_OutputFileName - Name of the file resulting of the transformation. null corresponds to the standard output.
Returns:
true if success, false otherwise.

applyXsl

protected final boolean applyXsl(org.w3c.dom.Document XML_Input,
                                 java.lang.String J_XslFileName,
                                 java.lang.String J_OutputFileName)
XSL stylesheet application. This method is a tool method for subclasses.

Parameters:
XML_Input - XML input structure. Basically the XML result of watch computation.
J_XslFileName - Path of the XSL stylesheet to apply.
J_OutputFileName - Name of the file resulting of the XSL transformation. null corresponds to the standard output.
Returns:
true if success, false otherwise.