jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.io
Class PropertyCollectorCallback

Object
  extended by com.chemaxon.overlap.io.PropertyCollectorCallback
All Implemented Interfaces:
MoleculeCallback

public class PropertyCollectorCallback
extends Object
implements MoleculeCallback

Build storage for molecular properties.

Author:
Gabor Imre

Constructor Summary
PropertyCollectorCallback()
          Construct builder to represent molecule name.
PropertyCollectorCallback(String propname)
          Construct builder to store a given property.
 
Method Summary
 CompactStringStorage build()
          Create the master storage from the current state.
 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.
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyCollectorCallback

public PropertyCollectorCallback()
Construct builder to represent molecule name.


PropertyCollectorCallback

public PropertyCollectorCallback(String propname)
Construct builder to store a given property.

Parameters:
propname - Property name to store
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 CompactStringStorage build()
Create the master storage from the current state.

Returns:
Master storage from current state

toString

public String toString()
Overrides:
toString in class Object

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)