org.basex.build.fs
Class FSParser

java.lang.Object
  extended by org.basex.build.Parser
      extended by org.basex.build.fs.FSParser

public final class FSParser
extends Parser

Imports/shreds/parses a file hierarchy into a BaseX database. The overall process of importing a file hierarchy can be described as follows:

  1. The import is invoked by the CreateFS command. To import on the command line type: $ create fs [path] [dbname]
  2. This class FSParser instantiates the needed components for the import process in its parse(Builder) method.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Alexander Holupirek

Field Summary
static int SIZEOFFSET
          Offset of the size value, as stored in atts(File, boolean).
 
Fields inherited from class org.basex.build.Parser
atts, io
 
Constructor Summary
FSParser(IO path, boolean r)
          Constructor.
 
Method Summary
 java.lang.String det()
          Returns detailed progress information.
 java.lang.String head()
          Returns a compact description of the current progress.
 void parse(Builder build)
          Main entry point for the import of a file hierarchy to BaseX.
 double prog()
          Returns a value from 0 to 1, representing the current progress.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZEOFFSET

public static final int SIZEOFFSET
Offset of the size value, as stored in atts(File, boolean).

See Also:
Constant Field Values
Constructor Detail

FSParser

public FSParser(IO path,
                boolean r)
Constructor.

Parameters:
path - the traversal starts from
r - root flag to parse root node or all partitions (C:, D: ...). on Windows systems. If set to true, the path reference is ignored
Method Detail

parse

public void parse(Builder build)
           throws java.io.IOException
Main entry point for the import of a file hierarchy to BaseX. Instantiates fht engine and visitors, and starts the traversal.

Specified by:
parse in class Parser
Parameters:
build - instance passed by CreateFS.
Throws:
java.io.IOException - I/O exception

head

public java.lang.String head()
Description copied from class: Parser
Returns a compact description of the current progress.

Specified by:
head in class Parser
Returns:
progress information

det

public java.lang.String det()
Description copied from class: Parser
Returns detailed progress information.

Specified by:
det in class Parser
Returns:
position info

prog

public double prog()
Description copied from class: Parser
Returns a value from 0 to 1, representing the current progress.

Specified by:
prog in class Parser
Returns:
progress information