ambit2.core.io
Class DelimitedFileWriter

Package class diagram package DelimitedFileWriter
java.lang.Object
  extended by org.openscience.cdk.io.DefaultChemObjectWriter
      extended by ambit2.core.io.FilesWithHeaderWriter
          extended by ambit2.core.io.DelimitedFileWriter
All Implemented Interfaces:
org.openscience.cdk.io.IChemObjectIO, org.openscience.cdk.io.IChemObjectWriter

public class DelimitedFileWriter
extends FilesWithHeaderWriter

Writes delimited files


Field Summary
protected  DelimitedFileFormat format
           
protected  org.openscience.cdk.smiles.SmilesGenerator sg
           
protected  java.io.BufferedWriter writer
           
 
Fields inherited from class ambit2.core.io.FilesWithHeaderWriter
defaultSMILESHeader, header, logger, smilesIndex, writingStarted
 
Constructor Summary
DelimitedFileWriter(java.io.OutputStream input)
           
DelimitedFileWriter(java.io.OutputStream input, DelimitedFileFormat format)
           
DelimitedFileWriter(java.io.Writer out)
           
DelimitedFileWriter(java.io.Writer out, DelimitedFileFormat format)
           
 
Method Summary
 boolean accepts(java.lang.Class classObject)
           
 void close()
           
 org.openscience.cdk.io.formats.IResourceFormat getFormat()
           
 int getSupportedDataFeatures()
           
 org.openscience.cdk.ChemObject highestSupportedChemObject()
           
 void setWriter(java.io.OutputStream writer)
           
 void setWriter(java.io.Writer writer)
           
 java.lang.String toString()
           
 void write(org.openscience.cdk.interfaces.IChemObject object)
           
protected  void writeHeader()
           
 void writeMolecule(org.openscience.cdk.interfaces.IMolecule molecule)
           
 void writeSetOfMolecules(org.openscience.cdk.interfaces.IMoleculeSet som)
           
 
Methods inherited from class ambit2.core.io.FilesWithHeaderWriter
getHeader, setHeader, setHeader
 
Methods inherited from class org.openscience.cdk.io.DefaultChemObjectWriter
addChemObjectIOListener, fireIOSettingQuestion, getIOSettings, removeChemObjectIOListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

writer

protected java.io.BufferedWriter writer

format

protected DelimitedFileFormat format

sg

protected org.openscience.cdk.smiles.SmilesGenerator sg
Constructor Detail

DelimitedFileWriter

public DelimitedFileWriter(java.io.Writer out,
                           DelimitedFileFormat format)

DelimitedFileWriter

public DelimitedFileWriter(java.io.Writer out)

DelimitedFileWriter

public DelimitedFileWriter(java.io.OutputStream input,
                           DelimitedFileFormat format)

DelimitedFileWriter

public DelimitedFileWriter(java.io.OutputStream input)
Method Detail

write

public void write(org.openscience.cdk.interfaces.IChemObject object)
           throws org.openscience.cdk.exception.CDKException
Throws:
org.openscience.cdk.exception.CDKException

highestSupportedChemObject

public org.openscience.cdk.ChemObject highestSupportedChemObject()

getFormat

public org.openscience.cdk.io.formats.IResourceFormat getFormat()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

writeSetOfMolecules

public void writeSetOfMolecules(org.openscience.cdk.interfaces.IMoleculeSet som)

writeHeader

protected void writeHeader()
                    throws java.io.IOException
Specified by:
writeHeader in class FilesWithHeaderWriter
Throws:
java.io.IOException

writeMolecule

public void writeMolecule(org.openscience.cdk.interfaces.IMolecule molecule)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accepts

public boolean accepts(java.lang.Class classObject)

getSupportedDataFeatures

public int getSupportedDataFeatures()

setWriter

public void setWriter(java.io.OutputStream writer)
               throws org.openscience.cdk.exception.CDKException
Throws:
org.openscience.cdk.exception.CDKException

setWriter

public void setWriter(java.io.Writer writer)
               throws org.openscience.cdk.exception.CDKException
Throws:
org.openscience.cdk.exception.CDKException