Package adams.core.io.lister
Class AbstractRecursiveDirectoryLister
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.io.lister.AbstractDirectoryLister
-
- adams.core.io.lister.AbstractRecursiveDirectoryLister
-
- All Implemented Interfaces:
DirectoryLister
,RecursiveDirectoryLister
,LoggingLevelHandler
,LoggingSupporter
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,Serializable
- Direct Known Subclasses:
FtpDirectoryLister
,LocalDirectoryLister
,SftpDirectoryLister
,SmbDirectoryLister
public abstract class AbstractRecursiveDirectoryLister extends AbstractDirectoryLister implements RecursiveDirectoryLister
Ancestor for recursive directory listers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_MaxDepth
the maximum depth to look recursively (0 = only watch dir, -1 = infinite).protected boolean
m_Recursive
whether to look for files/dirs recursively.-
Fields inherited from class adams.core.io.lister.AbstractDirectoryLister
m_ListDirs, m_ListFiles, m_MaxItems, m_RegExp, m_SortDescending, m_Sorting, m_Stopped, m_WatchDir
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractRecursiveDirectoryLister()
Initializes the object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxDepth()
Returns the maximum depth to search (1 = only watch dir, -1 = infinite).boolean
getRecursive()
Returns whether to search recursively.void
setMaxDepth(int value)
Sets the maximum depth to search (1 = only watch dir, -1 = infinite).void
setRecursive(boolean value)
Sets whether to search recursively.String
toString()
A string representation of the object.-
Methods inherited from class adams.core.io.lister.AbstractDirectoryLister
getDebug, getListDirs, getListFiles, getMaxItems, getRegExp, getSortDescending, getSorting, getWatchDir, isStopped, setDebug, setListDirs, setListFiles, setMaxItems, setRegExp, setSortDescending, setSorting, setWatchDir, stopExecution
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.io.lister.DirectoryLister
getListDirs, getListFiles, getMaxItems, getRegExp, getSortDescending, getSorting, getWatchDir, hasParentDirectory, isLocal, list, listObjects, newDirectory, newDirectory, setListDirs, setListFiles, setMaxItems, setRegExp, setSortDescending, setSorting, setWatchDir
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
Methods inherited from interface adams.core.StoppableWithFeedback
isStopped
-
-
-
-
Method Detail
-
setRecursive
public void setRecursive(boolean value)
Sets whether to search recursively.- Specified by:
setRecursive
in interfaceRecursiveDirectoryLister
- Parameters:
value
- true if to search recursively
-
getRecursive
public boolean getRecursive()
Returns whether to search recursively.- Specified by:
getRecursive
in interfaceRecursiveDirectoryLister
- Returns:
- true if search is recursively
-
setMaxDepth
public void setMaxDepth(int value)
Sets the maximum depth to search (1 = only watch dir, -1 = infinite).- Specified by:
setMaxDepth
in interfaceRecursiveDirectoryLister
- Parameters:
value
- the maximum depth
-
getMaxDepth
public int getMaxDepth()
Returns the maximum depth to search (1 = only watch dir, -1 = infinite).- Specified by:
getMaxDepth
in interfaceRecursiveDirectoryLister
- Returns:
- the maximum depth
-
toString
public String toString()
A string representation of the object.- Overrides:
toString
in classAbstractDirectoryLister
- Returns:
- the string representation
-
-