org.datamixer.io
Class DMFormatter

java.lang.Object
  extended byorg.datamixer.io.DMFormatter
Direct Known Subclasses:
DelimitedFormat, XmlFormat

public class DMFormatter
extends java.lang.Object


Field Summary
protected  java.lang.String id_
          id
protected  org.apache.log4j.Logger logger_
          logger
protected  DMReader reader_
          reader
protected  DMWriter writer_
          writer
 
Constructor Summary
DMFormatter()
           
 
Method Summary
protected  void formatAttribute(DMAttribute attr, Value value, int index)
           
 java.lang.String getId()
          Returns the id.
protected  DMFormatter getImpl()
           
 DMReader getReader()
           
 DMWriter getWriter()
           
 boolean read(DMElement element)
          Should be overridden by derived classes.
 void setId(java.lang.String id)
          Sets the id.
protected  void setImpl(DMFormatter value)
           
 void setReader(DMReader reader)
           
 void setType(java.lang.String type)
           
 void setWriter(DMWriter writer)
           
 void write(DMElement element)
           
 void write(int depth, DMElement element)
           
protected  void writeAttribute(DMAttribute attr, int index)
           
protected  void writeAttributes(java.util.ArrayList attrs)
           
protected  void writeElement(int depth, DMElement element)
           
protected  void writeElements(int depth, java.util.ArrayList elements)
          Write all elements in elements.
protected  void writeElementValues(int depth, DMElement element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id_

protected java.lang.String id_
id


reader_

protected DMReader reader_
reader


writer_

protected DMWriter writer_
writer


logger_

protected org.apache.log4j.Logger logger_
logger

Constructor Detail

DMFormatter

public DMFormatter()
Method Detail

getId

public java.lang.String getId()
Returns the id.


setId

public void setId(java.lang.String id)
Sets the id.


read

public boolean read(DMElement element)
             throws DatamixerException
Should be overridden by derived classes. This method delegates to the implementation object.

Throws:
DatamixerException

write

public void write(DMElement element)
           throws DatamixerException
Throws:
DatamixerException

write

public void write(int depth,
                  DMElement element)
           throws DatamixerException
Throws:
DatamixerException

getReader

public DMReader getReader()

setReader

public void setReader(DMReader reader)

getWriter

public DMWriter getWriter()

setWriter

public void setWriter(DMWriter writer)

setType

public void setType(java.lang.String type)

getImpl

protected DMFormatter getImpl()

setImpl

protected void setImpl(DMFormatter value)

writeElements

protected void writeElements(int depth,
                             java.util.ArrayList elements)
                      throws DatamixerException
Write all elements in elements.

Throws:
DatamixerException

writeElementValues

protected void writeElementValues(int depth,
                                  DMElement element)
                           throws DatamixerException
Throws:
DatamixerException

writeElement

protected void writeElement(int depth,
                            DMElement element)
                     throws DatamixerException
Throws:
DatamixerException

writeAttributes

protected void writeAttributes(java.util.ArrayList attrs)
                        throws DatamixerException
Throws:
DatamixerException

writeAttribute

protected void writeAttribute(DMAttribute attr,
                              int index)
                       throws DatamixerException
Throws:
DatamixerException

formatAttribute

protected void formatAttribute(DMAttribute attr,
                               Value value,
                               int index)
                        throws DatamixerException
Throws:
DatamixerException


Copyright © 2004-2006 datamixer.org. All Rights Reserved.