Class 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 Detail

      • StandardizerUtil

        public StandardizerUtil()
    • Method Detail

      • 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
      • 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

        public 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).
        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