@PublicAPI public class StandardizerUtil extends java.lang.Object
Constructor and Description |
---|
StandardizerUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addInactiveTasks(Standardizer standardizer,
java.lang.String configuration)
Adds the Standardizer tasks specified in the
configuration
parameter to the inactive tasks list. |
static void |
clearInactiveTasks(Standardizer standardizer)
Clears the inactive tasks list.
|
static StandardizerConfigurationReader |
initializeReader(java.lang.String configuration)
Initializes a configuration reader based on a configuration string
|
static boolean |
isLastTaskClean(Standardizer standardizer)
Returns
true if last task is clean or there are no tasks
(final clean not needed before output to file). |
static boolean |
removeInactiveTasks(Standardizer standardizer,
java.lang.String configuration)
Removes the Standardizer tasks specified in the
configuration parameter from the inactive tasks list. |
static void |
setCleanTemplates(Standardizer standardizer,
Molecule[] templates)
Sets the default clean templates.
|
static void |
setInactiveTasks(Standardizer standardizer,
java.lang.String configuration)
Sets the tasks with the provided ID inactive.
|
public static boolean addInactiveTasks(Standardizer standardizer, java.lang.String configuration) throws java.lang.IllegalArgumentException
configuration
parameter to the inactive tasks list. Only the task type is checked. E.g.
if "RemoveExplicitH" tasks are added, then these tasks are always
inactivated regardless to the parameters (e.g.:
Mapped="true"
) they use. Inactive tasks are not performed
during standardization. To remove a task from the inactive task list use
removeInactiveTasks(Standardizer, String)
, to clear the inactive
tasks list use clearInactiveTasks(Standardizer)
method. For
internal use only.standardizer
- the target standardizerconfiguration
- is the XML configuration string or else the simple config
string, items separated by ".."true
if the inactive task list has changedjava.lang.IllegalArgumentException
- if the configuration string is invalidclearInactiveTasks(Standardizer)
,
removeInactiveTasks(Standardizer, String)
public static boolean removeInactiveTasks(Standardizer standardizer, java.lang.String configuration) throws java.lang.IllegalArgumentException
configuration
parameter from the inactive tasks list. Only
the task type is checked. For internal use only.standardizer
- the target standardizerconfiguration
- is the XML configuration string or else the simple config
string, items separated by ".."true
if the inactive task list has changedjava.lang.IllegalArgumentException
- if the configuration string is invalidsetInactiveTasks(Standardizer, String)
,
clearInactiveTasks(Standardizer)
public static void setInactiveTasks(Standardizer standardizer, java.lang.String configuration)
standardizer
- the target standardizerconfiguration
- the provided IDpublic static void clearInactiveTasks(Standardizer standardizer)
standardizer
- the target standardizersetInactiveTasks(Standardizer, String)
,
removeInactiveTasks(Standardizer, String)
public static StandardizerConfigurationReader initializeReader(java.lang.String configuration)
configuration
- the string representation of the configurationpublic static boolean isLastTaskClean(Standardizer standardizer)
true
if last task is clean or there are no tasks
(final clean not needed before output to file).standardizer
- the target standardizertrue
if last task is clean or there are no taskspublic static void setCleanTemplates(Standardizer standardizer, Molecule[] templates)
<Clean Type="TemplateBased"/>
"clean:tb"
standardizer
- the target standardizer instancetemplates
- is the template molecule array