net.sf.xbus.protocol.csv
Class CSVSerializer

java.lang.Object
  extended by net.sf.xbus.protocol.csv.CSVSerializer

public class CSVSerializer
extends java.lang.Object

CSVSerializer serves for serializing records stored in a DOM tree according to a CSV type message

The DOM tree structure is described in the CSVParser documentation.

Author:
Stephan Düwel, Wolfgang Köppl

Constructor Summary
CSVSerializer(java.lang.String system)
           
 
Method Summary
protected static CSVSerializer getInstance(java.lang.String sourceType)
           
 java.lang.String getLineSeparator()
           
protected  java.lang.String serialize(org.w3c.dom.Document doc)
          Serializes a DOM tree into a CSV message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVSerializer

public CSVSerializer(java.lang.String system)
              throws XException
Parameters:
system - the name of the process
Throws:
XException
Method Detail

getInstance

protected static CSVSerializer getInstance(java.lang.String sourceType)
                                    throws XException
Parameters:
sourceType - the name of the process
Returns:
an instance of the CSVSerializer class
Throws:
XException

getLineSeparator

public java.lang.String getLineSeparator()
Returns:
Returns the lineSeparator.

serialize

protected java.lang.String serialize(org.w3c.dom.Document doc)
                              throws XException
Serializes a DOM tree into a CSV message.

Parameters:
doc - The information that is parsed into CSV format. Has to be a DOM tree.
Returns:
The String of the serialized document.
Throws:
XException