@PublicAPI public class StandardizerRunner extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StandardizerRunner.ErrorHandlingPolicy
Policy for error handling
|
Constructor and Description |
---|
StandardizerRunner(java.util.Iterator<Molecule> input,
StandardizerConfiguration configuration)
Deprecated.
Won't be public in the future
|
StandardizerRunner(java.util.Iterator<Molecule> input,
StandardizerConfiguration configuration,
int threadCount)
Deprecated.
Won't be public in the future
|
StandardizerRunner(java.util.Iterator<Molecule> input,
StandardizerConfiguration configuration,
int threadCount,
java.lang.String reportPropertyName)
Deprecated.
Won't be public in the future
|
Modifier and Type | Method and Description |
---|---|
protected static Molecule |
evaluate(StandardizerRunner.ErrorHandlingPolicy policy,
StandardizerResult result) |
static java.util.Iterator<Molecule> |
iterator(java.util.Iterator<Molecule> iterator,
StandardizerConfiguration configuration,
int threadCount,
StandardizerRunner.ErrorHandlingPolicy policy,
java.lang.String reportPropertyName)
Returns an iterator that will wrap the specified iterator and
standardizes all molecules.
|
static java.util.Iterator<StandardizerResult> |
resultIterator(java.util.Iterator<Molecule> iterator,
StandardizerConfiguration configuration,
int threadCount,
java.lang.String reportPropertyName)
Returns an iterator that will wrap the specified iterator and
standardizes all molecules.
|
static java.util.Iterator<StandardizerResult> |
resultIterator(java.util.Iterator<Molecule> iterator,
StandardizerConfiguration configuration,
int threadCount,
java.lang.String reportPropertyName,
boolean saveChangeList)
Returns an iterator that will wrap the specified iterator and
standardizes all molecules.
|
static void |
standardize(MolImporter importer,
MolExporter exporter,
StandardizerConfiguration configuration,
int threadCount,
StandardizerRunner.ErrorHandlingPolicy policy,
java.lang.String reportPropertyName)
Reads the molecules from the importer, standardizes them, and writes to
the exporter.
|
@Deprecated public StandardizerRunner(java.util.Iterator<Molecule> input, StandardizerConfiguration configuration)
input
- the input molecule iteratorconfiguration
- the standardizer configuration to apply concurrently@Deprecated public StandardizerRunner(java.util.Iterator<Molecule> input, StandardizerConfiguration configuration, int threadCount)
input
- the input molecule iteratorconfiguration
- the standardizer configuration to apply concurrentlythreadCount
- the number of standardizer threads@Deprecated public StandardizerRunner(java.util.Iterator<Molecule> input, StandardizerConfiguration configuration, int threadCount, java.lang.String reportPropertyName)
input
- the input molecule iteratorconfiguration
- the standardizer configuration to apply concurrentlythreadCount
- the number of standardizer threadsreportPropertyName
- the property name to report the applied actions topublic static java.util.Iterator<Molecule> iterator(java.util.Iterator<Molecule> iterator, StandardizerConfiguration configuration, int threadCount, StandardizerRunner.ErrorHandlingPolicy policy, java.lang.String reportPropertyName)
StandardizerRunner.ErrorHandlingPolicy.HALT
the method
Iterator.next()
of the resulted molecule iterator may throw
IllegalArgumentException
, if exception occurred during
standardization. The thrown exception wraps the original exception. Iterator.remove()
.iterator
- the iterator containing the molecules to be standardizedconfiguration
- the configuration to apply on the iteratorthreadCount
- the number of threads to use for standardizationpolicy
- the error handling policyreportPropertyName
- the name of the property to report applied standardizer
actions topublic static java.util.Iterator<StandardizerResult> resultIterator(java.util.Iterator<Molecule> iterator, StandardizerConfiguration configuration, int threadCount, java.lang.String reportPropertyName)
Iterator.remove()
.iterator
- the iterator to wrapconfiguration
- the configuration to apply on the iteratorthreadCount
- the number of threads to use for standardizationreportPropertyName
- the name of the property to report applied standardizer
actions topublic static java.util.Iterator<StandardizerResult> resultIterator(java.util.Iterator<Molecule> iterator, StandardizerConfiguration configuration, int threadCount, java.lang.String reportPropertyName, boolean saveChangeList)
Iterator.remove()
.iterator
- the iterator to wrapconfiguration
- the configuration to apply on the iteratorthreadCount
- the number of threads to use for standardizationreportPropertyName
- the name of the property to report applied standardizer
actions tosaveChangeList
- sets to save the molecule modifications of each performed
standardizer action; if true
then the changes
will be savedpublic static void standardize(MolImporter importer, MolExporter exporter, StandardizerConfiguration configuration, int threadCount, StandardizerRunner.ErrorHandlingPolicy policy, java.lang.String reportPropertyName) throws MolExportException, java.io.IOException
importer
- the importer to read molecules fromexporter
- the exporter to write standardized molecules toconfiguration
- the configuration to be applied on the moleculesthreadCount
- the number of threads to use for standardizationpolicy
- the error handling policyreportPropertyName
- the name of the property to report applied standardizer
actions toMolExportException
- on export failurejava.io.IOException
- on export failureprotected static Molecule evaluate(StandardizerRunner.ErrorHandlingPolicy policy, StandardizerResult result) throws java.lang.Exception
java.lang.Exception