Class StandardizerUtil

java.lang.Object
chemaxon.standardizer.StandardizerUtil

@PublicAPI public class StandardizerUtil extends Object
Utility class for standardizer
Functionalities of old standardizer can be simulated using this class.
Since:
5.11
  • Constructor Details

    • StandardizerUtil

      public StandardizerUtil()
  • Method Details

    • addInactiveTasks

      public static boolean addInactiveTasks(Standardizer standardizer, String configuration) throws IllegalArgumentException
      Adds the Standardizer tasks specified in the 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.
      Parameters:
      standardizer - the target standardizer
      configuration - 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 the configuration parameter 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:
      true if the inactive task list has changed
      Throws:
      IllegalArgumentException - if the configuration string is invalid
      See Also:
    • setInactiveTasks

      public static void setInactiveTasks(Standardizer standardizer, String configuration)
      Sets the tasks with the provided ID inactive.
      Parameters:
      standardizer - the target standardizer
      configuration - the provided ID
    • clearInactiveTasks

      public static void clearInactiveTasks(Standardizer standardizer)
      Clears the inactive tasks list. For internal use only.
      Parameters:
      standardizer - the target standardizer
      See Also:
    • initializeReader

      public static StandardizerConfigurationReader initializeReader(String configuration)
      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.
      Returns true 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

      public static void setCleanTemplates(Standardizer standardizer, Molecule[] templates)
      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 instance
      templates - is the template molecule array