INRIA & FluxMedia

fr.fluxmedia.transmorpher.stdlib
Class WriteFile

java.lang.Object
  extended by fr.fluxmedia.transmorpher.engine.TProcess_Impl
      extended by fr.fluxmedia.transmorpher.engine.TProcessBasic
          extended by fr.fluxmedia.transmorpher.engine.TSerializer
              extended by fr.fluxmedia.transmorpher.stdlib.WriteFile
All Implemented Interfaces:
TProcess, java.lang.Runnable

public final class WriteFile
extends TSerializer

This class offer a serializer mechanisme. A way to finish the transphormation process by writing XML output file

Since:
jdk 1.3 && SAX 2.0
Author:
laurent tardif@inrialpes.fr

Field Summary
(package private) static int DEFAULT_BUFFER_SIZE
           
protected  javax.xml.transform.sax.TransformerHandler handler
          The handler for the transformation
 java.util.Properties Op
          Description of the Field
protected  int outputBufferSize
          Buffer size
protected  javax.xml.transform.sax.SAXTransformerFactory tfactory
          a factory to create the transformer handler
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TSerializer
fileName, format, outputStream, printNull, printOut
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TProcessBasic
finished, isThread, param, procThread, type
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TProcess_Impl
debug, id, iListIn, iListOut, iNbIn, iNbOut, nameFather, nameIn, nameOut
 
Constructor Summary
WriteFile(java.lang.String[] pIn, Parameters pParam, StringParameters pStaticAttributes)
          Constructor for the WriteFile object
 
Method Summary
 org.xml.sax.ContentHandler getContentHandler()
          Gets the contentHandler attribute of the WriteFile object
protected  javax.xml.transform.sax.SAXTransformerFactory getTransformerFactory()
          Gets the transformerFactory attribute of the WriteFile object
 void reset()
          Creates a new transformer handler at each loop in a repeat
 void setOutputStream()
          Sets the ouput file of this serializer
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TSerializer
bindParameters, generatePort, getOutputStream, initParameters, printNull, printStdout
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TProcessBasic
execProcess, getFinished, getType, run, setFinished, setThread, setType
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TProcess_Impl
getFatherName, getId, getIn, getIn, getIn, getName, getNameIn, getNameIn, getNameOut, getNameOut, getOut, getOut, getOut, getParameter, getParameterNames, getParameters, setDebug, setFatherName, setId, setIn, setName, setOut, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

Op

public java.util.Properties Op
Description of the Field


handler

protected javax.xml.transform.sax.TransformerHandler handler
The handler for the transformation


outputBufferSize

protected int outputBufferSize
Buffer size


tfactory

protected javax.xml.transform.sax.SAXTransformerFactory tfactory
a factory to create the transformer handler

Constructor Detail

WriteFile

public WriteFile(java.lang.String[] pIn,
                 Parameters pParam,
                 StringParameters pStaticAttributes)
          throws TMRuntimeException
Constructor for the WriteFile object

Parameters:
pIn - in ports of this object
pParam - parameters of this object
pStaticAttributes - static parameters of this object
Throws:
TMRuntimeException - Description of the Exception
Method Detail

getTransformerFactory

protected javax.xml.transform.sax.SAXTransformerFactory getTransformerFactory()
Gets the transformerFactory attribute of the WriteFile object

Returns:
The transformerFactory value

setOutputStream

public void setOutputStream()
                     throws TMRuntimeException,
                            TMException,
                            org.xml.sax.SAXException
Sets the ouput file of this serializer

Overrides:
setOutputStream in class TSerializer
Throws:
TMRuntimeException - Description of the Exception
TMException - Description of the Exception
org.xml.sax.SAXException - Description of the Exception

reset

public void reset()
           throws TMRuntimeException
Creates a new transformer handler at each loop in a repeat

Specified by:
reset in interface TProcess
Overrides:
reset in class TProcess_Impl
Throws:
TMRuntimeException - Description of the Exception

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Gets the contentHandler attribute of the WriteFile object

Specified by:
getContentHandler in class TSerializer
Returns:
The contentHandler value

INRIA & FluxMedia

..no bottom yet...