xbn.util
Class DSConfig

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.util.DSConfig

public class DSConfig
extends XBNObject

Configuration for a DirScan. See DirScan

Source code:  DSConfig.java

Since:
0.8.2b

Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
DSConfig()
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs)
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs, boolean b_filesFirst)
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs, boolean b_filesFirst, FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs, FileFilter file_filter)
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs, FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(boolean b_ignoreDirs, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(FileFilter file_filter)
          Create a DSConfig.
DSConfig(FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, boolean b_filesFirst)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, boolean b_filesFirst, FileFilter file_filter)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, boolean b_filesFirst, FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, boolean b_filesFirst, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, FileFilter file_filter)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, boolean b_ignoreDirs, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, FileFilter file_filter)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, FileFilter file_filter, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(int i_lvlsMaxDepth, Outputter optr_dbg)
          Create a DSConfig.
DSConfig(Outputter optr_dbg)
          Create a DSConfig.
 
Method Summary
 boolean areFilesFirst()
          Get the base directory.
 boolean doIgnoreDirs()
          Are directories included suppressed from the resulting Vector?.
 FileFilter getFileFilter()
          Get the FileFilter scan through.
 int getLvlsMaxDepth()
          At a maximum, how many sub-directory levels should be analyzed?.
 Outputter getOptrDbg()
          Get the Outputter for debugging output.
 String toString()
          Get some information about this DSConfig.
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DSConfig

public DSConfig()

Create a DSConfig.

Equal to DSConfig(-1)


DSConfig

public DSConfig(int i_lvlsMaxDepth)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, false)


DSConfig

public DSConfig(boolean b_ignoreDirs)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs)


DSConfig

public DSConfig(FileFilter file_filter)

Create a DSConfig.

Equal to DSConfig(-1, file_filter)

Note: To set file_filter to null, use either (FileFilter)null or use this constructor instead.


DSConfig

public DSConfig(Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(-1, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, false)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                FileFilter file_filter)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, false, file_filter)

Note: To set file_filter to null, use either (FileFilter)null or use this constructor instead.


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, false, optr_dbg)


DSConfig

public DSConfig(boolean b_ignoreDirs,
                boolean b_filesFirst)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs, b_filesFirst)


DSConfig

public DSConfig(boolean b_ignoreDirs,
                FileFilter file_filter)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs, file_filter)

Note: To set file_filter to null, use either (FileFilter)null or use this constructor instead.


DSConfig

public DSConfig(boolean b_ignoreDirs,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs, optr_dbg)


DSConfig

public DSConfig(FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(-1, file_filter, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                boolean b_filesFirst)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, b_filesFirst, (new Outputter()))


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                FileFilter file_filter)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, false, file_filter)

Note: To set file_filter to null, use either (FileFilter)null or use this constructor instead.


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, false, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, false, file_filter, optr_dbg)


DSConfig

public DSConfig(boolean b_ignoreDirs,
                FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs, file_filter, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                boolean b_filesFirst,
                FileFilter file_filter)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, b_filesFirst, file_filter, (new Outputter()))

Note: To set file_filter to null, use either (FileFilter)null or use this constructor instead.


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                boolean b_filesFirst,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, b_filesFirst, null, optr_dbg)


DSConfig

public DSConfig(boolean b_ignoreDirs,
                boolean b_filesFirst,
                FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(-1, b_ignoreDirs, b_filesFirst, file_filter, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Equal to DSConfig(i_lvlsMaxDepth, b_ignoreDirs, false, file_filter, optr_dbg)


DSConfig

public DSConfig(int i_lvlsMaxDepth,
                boolean b_ignoreDirs,
                boolean b_filesFirst,
                FileFilter file_filter,
                Outputter optr_dbg)

Create a DSConfig.

Parameters:
i_lvlsMaxDepth - The maximum number of levels to analyze. May not be less than -1. See getLvlsMaxDepth.
b_ignoreDirs - If true, then directories are suppressed from the resulting Vector. Note that files within those directories are included, as long as the directory is accepted by file_filter. If this is set to true, then b_filesFirst is overwritten to false. See doIgnoreDirs
b_filesFirst - If true, then files are listed before directories. If false, then ordering is as normally provided by File.listFiles. When b_ignoreDirs equals true, this parameter is overwritten to equal false. When b_ignoreDirs equals false and optr_dbg.isOn() equals true, the value of this parameter is overwritten to be true. See areFilesFirst
file_filter - The FileFilter to scan through. See getFileFilter
optr_dbg - The Outputter to use for debugging output May not be null. When this is on and b_ignoreDirs equals false, then b_filesFirst is overwritten to equal true. See getOptrDbg.
Method Detail

getLvlsMaxDepth

public final int getLvlsMaxDepth()

At a maximum, how many sub-directory levels should be analyzed?.

Given this directory structure, where dir0 is the base directory:

dir0
   file01.txt
   dir1
      file11.txt
      dir11
         file111.txt

If this function returns... ...then is this analyzed?
dir0 file01.txt dir1 file11.txt dir111 file111.txt
-1 (meaning all) Yes Yes Yes Yes Yes Yes
0 Yes no no no no no
1 Yes Yes Yes no no no
2 Yes Yes Yes Yes Yes no
3 Yes Yes Yes Yes Yes Yes
5 Yes Yes Yes Yes Yes Yes
10 Yes Yes Yes Yes Yes Yes

Returns:
i_lvlsMaxDepth exactly as provided to the constructor.

doIgnoreDirs

public final boolean doIgnoreDirs()

Are directories included suppressed from the resulting Vector?. See DirScan.getVector.

Note that files within those directories are included, as long as the directory is accepted by file_filter.

Returns:
b_ignoreDirs exactly as provided to the constructor.

areFilesFirst

public final boolean areFilesFirst()

Get the base directory.

The reason for listing files first is because it makes the debugging output clear. It is more efficient when this equals false (when files are not listed first).

Returns:
b_filesFirst exactly as provided to the constructor (given the documented exceptions).

getFileFilter

public final FileFilter getFileFilter()

Get the FileFilter scan through.

Returns:
file_filter exactly as provided to the constructor.

getOptrDbg

public final Outputter getOptrDbg()

Get the Outputter for debugging output.

Returns:
optr_dbg exactly as provided to the constructor.

toString

public final String toString()

Get some information about this DSConfig.

Overrides:
toString in class Object



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo