Class SmbDirectorySearchWithComparator

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractFileSystemSearchlet>, SizeOfHandler, Stoppable, FlowContextHandler, Serializable
    Direct Known Subclasses:
    SmbFileSearchWithComparator

    public class SmbDirectorySearchWithComparator
    extends AbstractSmbDirectoryListerBasedSearchlet
    Searches only for directories, but uses the comparator for sorting the directories (SMB, Windows shares).

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -host <java.lang.String> (property: host)
        The host to connect to.
        default: 
     
    -directory <java.lang.String> (property: directory)
        The directory to search for directories.
        default: 
     
    -regexp <adams.core.base.BaseRegExp> (property: regExp)
        The regular expression that the dirs must match (empty string matches all
        ).
        default: 
     
    -max-items <int> (property: maxItems)
        The maximum number of dirs to return (<= 0 is unlimited).
        default: -1
     
    -comparator <java.util.Comparator> (property: comparator)
        The comparator to use; must implement java.util.Comparator and java.io.Serializable
        default: adams.core.DefaultCompare
     
    -descending <boolean> (property: sortDescending)
        If set to true, the directories are sorted in descending manner.
        default: false
     
    -recursive <boolean> (property: recursive)
        Whether to search recursively or not.
        default: false
     
    -max-depth <int> (property: maxDepth)
        The maximum depth to search in recursive mode (1 = only search directory,
         -1 = infinite).
        default: -1
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Comparator

        protected Comparator m_Comparator
        the comparator to use.
      • m_Descending

        protected boolean m_Descending
        whether to sort ascending or descending.
    • Constructor Detail

      • SmbDirectorySearchWithComparator

        public SmbDirectorySearchWithComparator()
    • Method Detail

      • setDirectory

        public void setDirectory​(String value)
        Sets the directory to search.
        Parameters:
        value - the directory
      • getDirectory

        public String getDirectory()
        Returns the directory to search.
        Returns:
        the directory.
      • directoryTipText

        public String directoryTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRegExp

        public void setRegExp​(BaseRegExp value)
        Sets the regular expression for the files/dirs.
        Parameters:
        value - the regular expression
      • regExpTipText

        public String regExpTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaxItems

        public void setMaxItems​(int value)
        Sets the maximum number of items to return.
        Parameters:
        value - the maximum number
      • getMaxItems

        public int getMaxItems()
        Returns the maximum number of items to return.
        Returns:
        the maximum number
      • maxItemsTipText

        public String maxItemsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setComparator

        public void setComparator​(Comparator value)
        Sets the comparator to use.
        Parameters:
        value - the comparator
      • getComparator

        public Comparator getComparator()
        Returns the comparator to use.
        Returns:
        the comparator
      • comparatorTipText

        public String comparatorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSortDescending

        public void setSortDescending​(boolean value)
        Sets whether to sort descendingly.
        Parameters:
        value - true if sorting in descending order
      • getSortDescending

        public boolean getSortDescending()
        Returns whether to sort descendingly.
        Returns:
        true if sorting in descending order
      • sortDescendingTipText

        public String sortDescendingTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRecursive

        public void setRecursive​(boolean value)
        Sets whether to search recursively.
        Parameters:
        value - true if search is recursively
      • getRecursive

        public boolean getRecursive()
        Returns whether search is recursively.
        Returns:
        true if search is recursively
      • recursiveTipText

        public String recursiveTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaxDepth

        public void setMaxDepth​(int value)
        Sets the maximum depth to search (in recursive mode). 1 = only watch directory, -1 = infinite.
        Parameters:
        value - the maximum number of directory levels to traverse
      • getMaxDepth

        public int getMaxDepth()
        Returns the maximum depth to search (in recursive mode). 1 = only watch directory, -1 = infinite.
        Returns:
        the maximum number of directory levels to traverse
      • maxDepthTipText

        public String maxDepthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.