com.northconcepts.datapipeline.file
Class FileSystemInfoReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.file.FileSystemInfoReader

public class FileSystemInfoReader
extends DataReader

Creates records from the metadata of files within a directory.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
FileSystemInfoReader(File root)
           
 
Method Summary
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
 void close()
          Indicates that this endpoint has finished reading or writing.
 boolean getAbsolutePaths()
           
 FileFilter getFilter()
           
 boolean getIncludeDirectories()
           
 boolean getRecurseDirectories()
           
 void open()
          Makes this endpoint ready for reading or writing.
protected  Record readImpl()
          Overridden by subclasses to read the next record from this DataReader.
 FileSystemInfoReader setAbsolutePaths(boolean absolutePaths)
           
 FileSystemInfoReader setFilter(FileFilter filter)
           
 FileSystemInfoReader setIncludeDirectories(boolean includeDirectories)
           
 FileSystemInfoReader setRecurseDirectories(boolean recurseDirectories)
           
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
available, getBufferSize, getNestedReader, getRootReader, peek, pop, push, read, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileSystemInfoReader

public FileSystemInfoReader(File root)
Method Detail

getFilter

public FileFilter getFilter()

setFilter

public FileSystemInfoReader setFilter(FileFilter filter)

getRecurseDirectories

public boolean getRecurseDirectories()

setRecurseDirectories

public FileSystemInfoReader setRecurseDirectories(boolean recurseDirectories)

getIncludeDirectories

public boolean getIncludeDirectories()

setIncludeDirectories

public FileSystemInfoReader setIncludeDirectories(boolean includeDirectories)

getAbsolutePaths

public boolean getAbsolutePaths()

setAbsolutePaths

public FileSystemInfoReader setAbsolutePaths(boolean absolutePaths)

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class DataReader

open

public void open()
          throws DataException
Description copied from class: DataEndpoint
Makes this endpoint ready for reading or writing.

Overrides:
open in class DataEndpoint
Throws:
DataException

close

public void close()
Description copied from class: DataEndpoint
Indicates that this endpoint has finished reading or writing.

Overrides:
close in class DataEndpoint

readImpl

protected Record readImpl()
                   throws Throwable
Description copied from class: DataReader
Overridden by subclasses to read the next record from this DataReader.

If no record is available, null will be returned.

Specified by:
readImpl in class DataReader
Throws:
Throwable


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.