chemaxon.descriptors
Class MDWriter

java.lang.Object
  extended by chemaxon.descriptors.MDWriter
Direct Known Subclasses:
MDDBWriter, MDFileWriter

public abstract class MDWriter
extends java.lang.Object

Base class definitions for MDSet output streams. All kinds of descriptors (like fingerprints, pharmacophore fingerprints) are handled in the same, transparent manner. Derived classes may differ in the type of output to be written, for instance database, readable text file, binary file etc.

Since:
JChem 2.0
Author:
Miklos Vargyas

Field Summary
protected  java.lang.String[] mdNames
          The name of the Molecular Descriptors
 
Constructor Summary
protected MDWriter()
          Deafult constructor.
protected MDWriter(int descriptorCount)
          Creates and initializes an MDWriter object which handles the given number of MolecularDescriptors.
 
Method Summary
abstract  void close()
          Closes down the descriptor output stream.
abstract  MDParameters getMDParameters(int id)
          Gets the actual parameter settings of the specified component.
abstract  void put(Molecule mol, int id)
          Generates the MDSet for the given Molecule and writes the descriptors into the output with the given identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mdNames

protected java.lang.String[] mdNames
The name of the Molecular Descriptors

Constructor Detail

MDWriter

protected MDWriter()
Deafult constructor.


MDWriter

protected MDWriter(int descriptorCount)
Creates and initializes an MDWriter object which handles the given number of MolecularDescriptors.

Parameters:
descriptorCount - number of components of the MDSet written
Method Detail

getMDParameters

public abstract MDParameters getMDParameters(int id)
Gets the actual parameter settings of the specified component.

Parameters:
id - component index
Returns:
parameter settings
Since:
JChem 2.1

put

public abstract void put(Molecule mol,
                         int id)
                  throws MDWriterException
Generates the MDSet for the given Molecule and writes the descriptors into the output with the given identifier. Note, that the mol parameter is not final, because descriptors generated are stored in this object (as properties).

Parameters:
mol - the Molecule object to be written
id - unique identifier of the molecule
Throws:
MDWriterException - all exceptions (mainly io) are reinterpreted

close

public abstract void close()
                    throws MDWriterException
Closes down the descriptor output stream. After this, no more operation is permitted on the stream. Calling close() guarantees that all data put previously are permanently saved in the stream.

Throws:
MDWriterException