Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deepfs.util
Class FSImporter

    java.lang.Object
      org.deepfs.util.FSImporter

All Implemented Interfaces:
  FSTraversal

    public final class FSImporter

extends Object
implements FSTraversal

Build a FSML database while traversing a directory hierarchy.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Alexander Holupirek, Bastian Lemke

Constructor Summary
`FSImporter(Context context)` Constructor.

Method Summary
`void` | `createDB(String dbname)` Creates a fsml database.
`static String` | `escape(String text)` Escapes a string.
`String` | `getCurrentFileName()` Returns the current file name.
`void` | `levelUpdate(int l)` Event triggered once tree level has changed.
`void` | `postDirectoryVisit(File d)` Visits a directory node in postorder (leaving directory).
`void` | `postTraversalVisit(File d)` Fired once the filesystem traversal finished.
`void` | `preDirectoryVisit(File d)` Visits a directory node in preorder (enter directory).
`void` | `preTraversalVisit(File d)` Fired before the filesystem traversal starts.
`void` | `regularFileVisit(File f)` Visits a regular file.
`void` | `symLinkVisit(File f)` Visits a symbolic link.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FSImporter

    public FSImporter(Context context)

  Constructor.

  Parameters:
    `context` - the database context

Method Detail

### createDB

    public void createDB(String dbname)

  Creates a fsml database.

  Parameters:
    `dbname` - name of the database

### escape

    public static String escape(String text)

  Escapes a string.

  Parameters:
    `text` - the text to check
  Returns:
    the escaped text

### preTraversalVisit

    public void preTraversalVisit(File d)

  Description copied from interface: `FSTraversal`
  Fired before the filesystem traversal starts.

  Specified by:
    `preTraversalVisit` in interface `FSTraversal`
  Parameters:
    `d` - the directory node the traversal starts from

### postTraversalVisit

    public void postTraversalVisit(File d)

  Description copied from interface: `FSTraversal`
  Fired once the filesystem traversal finished.

  Specified by:
    `postTraversalVisit` in interface `FSTraversal`
  Parameters:
    `d` - the directory node the traversal started from

### levelUpdate

    public void levelUpdate(int l)

  Description copied from interface: `FSTraversal`
  Event triggered once tree level has changed.

  Specified by:
    `levelUpdate` in interface `FSTraversal`
  Parameters:
    `l` - relative level/depth of traversal in directory hierarchy

### preDirectoryVisit

    public void preDirectoryVisit(File d)

  Description copied from interface: `FSTraversal`
  Visits a directory node in preorder (enter directory).

  Specified by:
    `preDirectoryVisit` in interface `FSTraversal`
  Parameters:
    `d` - the directory node

### postDirectoryVisit

    public void postDirectoryVisit(File d)

  Description copied from interface: `FSTraversal`
  Visits a directory node in postorder (leaving directory).

  Specified by:
    `postDirectoryVisit` in interface `FSTraversal`
  Parameters:
    `d` - the directory node

### regularFileVisit

    public void regularFileVisit(File f)

  Description copied from interface: `FSTraversal`
  Visits a regular file.

  Specified by:
    `regularFileVisit` in interface `FSTraversal`
  Parameters:
    `f` - the file

### symLinkVisit

    public void symLinkVisit(File f)

  Description copied from interface: `FSTraversal`
  Visits a symbolic link.

  Specified by:
    `symLinkVisit` in interface `FSTraversal`
  Parameters:
    `f` - the file

### getCurrentFileName

    public String getCurrentFileName()

  Returns the current file name.

  Returns:
    the current file name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD