jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.io
Class MasterStorages.MoleculeCallbackBuilder

Object
  extended by com.chemaxon.overlap.io.MasterStorages.MoleculeCallbackBuilder
All Implemented Interfaces:
MoleculeCallback
Enclosing class:
MasterStorages

public static class MasterStorages.MoleculeCallbackBuilder
extends Object
implements MoleculeCallback

Molecule callback based builder.


Constructor Summary
MasterStorages.MoleculeCallbackBuilder()
          Construct new empty builder.
 
Method Summary
 MasterMoleculeStorage build()
          Create immutable representation.
 void notifyMolecule(int readno, Optional<String> molString, chemaxon.struc.Molecule m, int index)
          Introduce new processed molecule.
 void notifyParseError(int readno, Optional<String> molString, Throwable t)
          Notify a parsing error.
 void notifyProcessingError(int readno, Optional<String> molString, chemaxon.struc.Molecule m, Throwable t)
          Notify a processing error.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterStorages.MoleculeCallbackBuilder

public MasterStorages.MoleculeCallbackBuilder()
Construct new empty builder.

Method Detail

notifyMolecule

public void notifyMolecule(int readno,
                           Optional<String> molString,
                           chemaxon.struc.Molecule m,
                           int index)
Description copied from interface: MoleculeCallback
Introduce new processed molecule.

Specified by:
notifyMolecule in interface MoleculeCallback
Parameters:
readno - Read molecule count for this event (0 for the first molecule/record in the file). Note that value does not depend on possible index shift value specified for the import method.
molString - Molecule string from underlying MRecord#getMolString() if applicable
m - The given structure. If standardization was specified invocation is made after standardization. In this case the structure represents the standardized structure. In case the descriptor generation alters the molecule the altered molecule is passed.
index - Internal index which will refer to the given structure

notifyProcessingError

public void notifyProcessingError(int readno,
                                  Optional<String> molString,
                                  chemaxon.struc.Molecule m,
                                  Throwable t)
Description copied from interface: MoleculeCallback
Notify a processing error.

This method is invoked when molecule parse was successfull but processing (standardization, descriptor generation, etc. failed

Specified by:
notifyProcessingError in interface MoleculeCallback
Parameters:
readno - Read molecule count for this event (0 for the first molecule/record in the file). Note that value does not depend on possible index shift value specified for the import method.
molString - Molecule string from underlying MRecord#getMolString() if applicable
m - The given structure when error caught. If standardization was specified and error occured during standardization then the state of the structure (original or partially/fully standardized) depends of the internal contracts realized by Standardizer.
t - Processing error

notifyParseError

public void notifyParseError(int readno,
                             Optional<String> molString,
                             Throwable t)
Description copied from interface: MoleculeCallback
Notify a parsing error.

This method is invoked when molecule parse from String format failed.

Specified by:
notifyParseError in interface MoleculeCallback
Parameters:
readno - Read molecule count for this event (0 for the first molecule/record in the file). Note that value does not depend on possible index shift value specified for the import method.
molString - Molecule string from underlying MRecord#getMolString() if applicable
t - Parsing error

build

public MasterMoleculeStorage build()
Create immutable representation.

Returns:
Immutable representation

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)