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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanaddInactiveTasks(Standardizer standardizer, String configuration) Adds the Standardizer tasks specified in theconfigurationparameter to the inactive tasks list.static voidclearInactiveTasks(Standardizer standardizer) Clears the inactive tasks list.initializeReader(String configuration) Initializes a configuration reader based on a configuration stringstatic booleanisLastTaskClean(Standardizer standardizer) Deprecated, for removal: This API element is subject to removal in a future version.static booleanremoveInactiveTasks(Standardizer standardizer, String configuration) Removes the Standardizer tasks specified in theconfigurationparameter from the inactive tasks list.static voidsetCleanTemplates(Standardizer standardizer, Molecule[] templates) Sets the default clean templates.static voidsetInactiveTasks(Standardizer standardizer, String configuration) Sets the tasks with the provided ID inactive.
- 
Constructor Details- 
StandardizerUtilpublic StandardizerUtil()
 
- 
- 
Method Details- 
addInactiveTaskspublic static boolean addInactiveTasks(Standardizer standardizer, String configuration) throws IllegalArgumentException Adds the Standardizer tasks specified in theconfigurationparameter 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 standardizer
- configuration- is the XML configuration string or else the simple config string, items separated by ".."
- Returns:
- trueif the inactive task list has changed
- Throws:
- IllegalArgumentException- if the configuration string is invalid
- See Also:
 
- 
removeInactiveTaskspublic static boolean removeInactiveTasks(Standardizer standardizer, String configuration) throws IllegalArgumentException Removes the Standardizer tasks specified in theconfigurationparameter from the inactive tasks list. Only the task type is checked. For internal use only.- Parameters:
- standardizer- the target standardizer
- configuration- is the XML configuration string or else the simple config string, items separated by ".."
- Returns:
- trueif the inactive task list has changed
- Throws:
- IllegalArgumentException- if the configuration string is invalid
- See Also:
 
- 
setInactiveTasksSets the tasks with the provided ID inactive.- Parameters:
- standardizer- the target standardizer
- configuration- the provided ID
 
- 
clearInactiveTasksClears the inactive tasks list. For internal use only.- Parameters:
- standardizer- the target standardizer
- See Also:
 
- 
initializeReaderInitializes 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.Returnstrueif last task is clean or there are no tasks (final clean not needed before output to file).- Parameters:
- standardizer- the target standardizer
- Returns:
- trueif last task is clean or there are no tasks
 
- 
setCleanTemplatesSets 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 instance
- templates- is the template molecule array
 
 
-