ambit2.core.io
Class FileWithHeaderWriter

Package class diagram package FileWithHeaderWriter
java.lang.Object
  extended by org.openscience.cdk.io.DefaultChemObjectWriter
      extended by ambit2.core.io.FileWithHeaderWriter
All Implemented Interfaces:
org.openscience.cdk.io.IChemObjectIO, org.openscience.cdk.io.IChemObjectWriter
Direct Known Subclasses:
XLSFileWriter

public abstract class FileWithHeaderWriter
extends org.openscience.cdk.io.DefaultChemObjectWriter


Field Summary
static java.lang.String defaultSMILESHeader
           
protected  ambit2.core.io.Header header
           
protected static org.openscience.cdk.tools.LoggingTool logger
           
protected  org.openscience.cdk.smiles.SmilesGenerator sg
           
protected  int smilesIndex
           
protected  boolean writingStarted
           
 
Constructor Summary
FileWithHeaderWriter()
           
 
Method Summary
 ambit2.core.io.Header getHeader()
           
 org.openscience.cdk.ChemObject highestSupportedChemObject()
           
 void setHeader(java.util.ArrayList header)
           
 void setHeader(java.util.Map properties)
          Creates header from Hashtable keys Used for default header - created from properties of the first molecule written
 void write(org.openscience.cdk.interfaces.IChemObject object)
           
protected abstract  void writeHeader()
           
abstract  void writeMolecule(org.openscience.cdk.interfaces.IMolecule molecule)
           
 void writeSetOfMolecules(org.openscience.cdk.interfaces.IMoleculeSet som)
           
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.openscience.cdk.io.IChemObjectWriter
setWriter, setWriter
 
Methods inherited from interface org.openscience.cdk.io.IChemObjectIO
accepts, close, getFormat
 

Field Detail

logger

protected static org.openscience.cdk.tools.LoggingTool logger

header

protected ambit2.core.io.Header header

smilesIndex

protected int smilesIndex

sg

protected org.openscience.cdk.smiles.SmilesGenerator sg

defaultSMILESHeader

public static java.lang.String defaultSMILESHeader

writingStarted

protected boolean writingStarted
Constructor Detail

FileWithHeaderWriter

public FileWithHeaderWriter()
Method Detail

write

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

writeHeader

protected abstract void writeHeader()
                             throws java.io.IOException
Throws:
java.io.IOException

getHeader

public ambit2.core.io.Header getHeader()
Returns:
Returns the header.

setHeader

public void setHeader(java.util.ArrayList header)
Parameters:
header - The header to set.

setHeader

public void setHeader(java.util.Map properties)
Creates header from Hashtable keys Used for default header - created from properties of the first molecule written

Parameters:
properties -

writeMolecule

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

writeSetOfMolecules

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

highestSupportedChemObject

public org.openscience.cdk.ChemObject highestSupportedChemObject()