public class PropertyCollectorCallback extends Object implements MoleculeCallback
Constructor and Description |
---|
PropertyCollectorCallback()
Construct builder to represent molecule name.
|
PropertyCollectorCallback(String propname)
Construct builder to store a given property.
|
Modifier and Type | Method and Description |
---|---|
CompactStringStorage |
build()
Create the master storage from the current state.
|
void |
notifyMolecule(int readno,
Optional<String> molString,
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,
Molecule m,
Throwable t)
Notify a processing error.
|
String |
toString() |
public PropertyCollectorCallback()
public PropertyCollectorCallback(String propname)
propname
- Property name to storepublic void notifyMolecule(int readno, Optional<String> molString, Molecule m, int index)
MoleculeCallback
notifyMolecule
in interface MoleculeCallback
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 applicablem
- 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 structurepublic void notifyProcessingError(int readno, Optional<String> molString, Molecule m, Throwable t)
MoleculeCallback
This method is invoked when molecule parse was successfull but processing (standardization, descriptor generation, etc. failed
notifyProcessingError
in interface MoleculeCallback
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 applicablem
- 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 errorpublic void notifyParseError(int readno, Optional<String> molString, Throwable t)
MoleculeCallback
This method is invoked when molecule parse from String format failed.
notifyParseError
in interface MoleculeCallback
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 applicablet
- Parsing errorpublic CompactStringStorage build()