org.basex.build.fs
Interface FSVisitor

All Known Implementing Classes:
FSParser

public interface FSVisitor

This interface defines events that may occur during a file hierarchy traversal. To get notified about an event during a file hierarchy traversal implement this interface and register to (@see FSWalker).

Author:
DBIS Group, U Konstanz 2007, ISC license, Alexander Holupirek

Method Summary
 void postEvent()
          Invoked when directory is left.
 void postTraversal(boolean docClose)
          Invoked after the traversal.
 void preEvent(java.io.File dir)
          Invoked before directory is entered.
 void preTraversal(java.lang.String path, boolean docOpen)
          Invoked before traversal starts.
 void regfileEvent(java.io.File file)
          Invoked when a regular file is visited.
 void symlinkEvent(java.io.File link)
          Invoked when a symbolic link is visited.
 

Method Detail

postEvent

void postEvent()
               throws java.io.IOException
Invoked when directory is left.

Throws:
java.io.IOException - I/O exception

postTraversal

void postTraversal(boolean docClose)
                   throws java.io.IOException
Invoked after the traversal.

Parameters:
docClose - indicates if the document is to be closed.
Throws:
java.io.IOException - I/O exception

preEvent

void preEvent(java.io.File dir)
              throws java.io.IOException
Invoked before directory is entered.

Parameters:
dir - name
Throws:
java.io.IOException - I/O exception

preTraversal

void preTraversal(java.lang.String path,
                  boolean docOpen)
                  throws java.io.IOException
Invoked before traversal starts. If more than one file hierarchy is to be imported (for example 'Import all...' on Windows gets C:, D: ...), you have to indicate the very first traversal to construct a document node.

Parameters:
path - the traversal starts from.
docOpen - indicates if this is also the beginning of the document.
Throws:
java.io.IOException - I/O exception

regfileEvent

void regfileEvent(java.io.File file)
                  throws java.io.IOException
Invoked when a regular file is visited.

Parameters:
file - name
Throws:
java.io.IOException - I/O exception

symlinkEvent

void symlinkEvent(java.io.File link)
Invoked when a symbolic link is visited.

Parameters:
link - to be visited.