Package chemaxon.standardizer
Class StandardizerUtil
java.lang.Object
chemaxon.standardizer.StandardizerUtil
Utility class for standardizer
Functionalities of old standardizer can be simulated using this class.
Functionalities of old standardizer can be simulated using this class.
- Since:
- 5.11
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addInactiveTasks
(Standardizer standardizer, String configuration) Adds the Standardizer tasks specified in theconfiguration
parameter to the inactive tasks list.static void
clearInactiveTasks
(Standardizer standardizer) Clears the inactive tasks list.initializeReader
(String configuration) Initializes a configuration reader based on a configuration stringstatic boolean
isLastTaskClean
(Standardizer standardizer) Deprecated, for removal: This API element is subject to removal in a future version.static boolean
removeInactiveTasks
(Standardizer standardizer, String configuration) Removes the Standardizer tasks specified in theconfiguration
parameter from the inactive tasks list.static void
setCleanTemplates
(Standardizer standardizer, Molecule[] templates) Sets the default clean templates.static void
setInactiveTasks
(Standardizer standardizer, String configuration) Sets the tasks with the provided ID inactive.
-
Constructor Details
-
StandardizerUtil
public StandardizerUtil()
-
-
Method Details
-
addInactiveTasks
public static boolean addInactiveTasks(Standardizer standardizer, String configuration) throws IllegalArgumentException Adds the Standardizer tasks specified in theconfiguration
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 useremoveInactiveTasks(Standardizer, String)
, to clear the inactive tasks list useclearInactiveTasks(Standardizer)
method. For internal use only.- Parameters:
standardizer
- the target standardizerconfiguration
- is the XML configuration string or else the simple config string, items separated by ".."- Returns:
true
if the inactive task list has changed- Throws:
IllegalArgumentException
- if the configuration string is invalid- See Also:
-
removeInactiveTasks
public static boolean removeInactiveTasks(Standardizer standardizer, String configuration) throws IllegalArgumentException Removes the Standardizer tasks specified in theconfiguration
parameter from the inactive tasks list. Only the task type is checked. For internal use only.- Parameters:
standardizer
- the target standardizerconfiguration
- is the XML configuration string or else the simple config string, items separated by ".."- Returns:
true
if the inactive task list has changed- Throws:
IllegalArgumentException
- if the configuration string is invalid- See Also:
-
setInactiveTasks
Sets the tasks with the provided ID inactive.- Parameters:
standardizer
- the target standardizerconfiguration
- the provided ID
-
clearInactiveTasks
Clears the inactive tasks list. For internal use only.- Parameters:
standardizer
- the target standardizer- See Also:
-
initializeReader
Initializes a configuration reader based on a configuration string- Parameters:
configuration
- the string representation of the configuration- Returns:
- the configuration reader for the provided configuration
-
isLastTaskClean
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean isLastTaskClean(Standardizer standardizer) Deprecated, for removal: This API element is subject to removal in a future version.Returnstrue
if last task is clean or there are no tasks (final clean not needed before output to file).- Parameters:
standardizer
- the target standardizer- Returns:
true
if last task is clean or there are no tasks
-
setCleanTemplates
Sets the default clean templates. Used in template based clean tasks that do not specify the template file:<Clean Type="TemplateBased"/>
"clean:tb"
- Parameters:
standardizer
- the target standardizer instancetemplates
- is the template molecule array
-