public static class IndexProjectors.IndexProjectorMcb extends Object implements MoleculeCallback
Constructor and Description |
---|
IndexProjectorMcb()
Instantiate without forwarding.
|
IndexProjectorMcb(int skip,
MoleculeCallback fwd)
Instantiate with a forwarding callback.
|
IndexProjectorMcb(MoleculeCallback fwd)
Instantiate with a forwarding callback.
|
Modifier and Type | Method and Description |
---|---|
IndexProjector |
build()
Build serializable, immutable projector.
|
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.
|
public IndexProjectorMcb()
public IndexProjectorMcb(MoleculeCallback fwd)
fwd
- Callback to call; use null when no forwarding requiredpublic IndexProjectorMcb(int skip, MoleculeCallback fwd)
skip
- Skipped in master indexesfwd
- Callback to call; use null when no forwarding requiredpublic 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 IndexProjector build()