org.geotools.gce.imagemosaic
Class ImageMosaicDirectoryWalker

Object
  extended by ImageMosaicDirectoryWalker
All Implemented Interfaces:
Runnable

public class ImageMosaicDirectoryWalker
extends Object

This class is in responsible for creating the index for a mosaic of images that we want to tie together as a single coverage.

Author:
Simone Giannecchini, GeoSolutions, Carlo Cancellieri - GeoSolutions SAS

Field Summary
protected  ImageMosaicConfigHandler configHandler
           
protected  ImageMosaicEventHandlers eventHandler
           
protected  Hints excludeMosaicHints
           
 
Constructor Summary
ImageMosaicDirectoryWalker(ImageMosaicConfigHandler catalogHandler, ImageMosaicEventHandlers eventHandler)
           
ImageMosaicDirectoryWalker(ImageMosaicConfigHandler configHandler, ImageMosaicEventHandlers eventHandler, IOFileFilter filter)
          Default constructor.
 
Method Summary
protected  boolean checkFile(File fileBeingProcessed)
           
protected  boolean checkStop()
           
 void closeTransaction()
           
 void commitTransaction()
           
 int getFileIndex()
           
 int getNumFiles()
           
 boolean getStop()
           
protected  void handleFile(File fileBeingProcessed)
           
 void rollbackTransaction()
           
 void run()
          run the directory walker
 void setFileIndex(int fileIndex)
           
 void setNumFiles(int numFiles)
           
 void skipFile(String path)
          Warn this walker that we skip the provided path
 void startTransaction()
          Create a transaction for being used in this walker
 void stop()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configHandler

protected final ImageMosaicConfigHandler configHandler

excludeMosaicHints

protected final Hints excludeMosaicHints

eventHandler

protected final ImageMosaicEventHandlers eventHandler
Constructor Detail

ImageMosaicDirectoryWalker

public ImageMosaicDirectoryWalker(ImageMosaicConfigHandler configHandler,
                                  ImageMosaicEventHandlers eventHandler,
                                  IOFileFilter filter)
Default constructor. Sets a filter that can reduce the file the mosaic walker will take into consideration (in a more flexible way than the wildcards)

Parameters:
filter -
Throws:
IllegalArgumentException

ImageMosaicDirectoryWalker

public ImageMosaicDirectoryWalker(ImageMosaicConfigHandler catalogHandler,
                                  ImageMosaicEventHandlers eventHandler)
Parameters:
catalogHandler -
eventHandler -
Method Detail

run

public void run()
run the directory walker


getStop

public boolean getStop()

stop

public void stop()

checkFile

protected boolean checkFile(File fileBeingProcessed)

handleFile

protected void handleFile(File fileBeingProcessed)
                   throws IOException
Throws:
IOException

startTransaction

public void startTransaction()
Create a transaction for being used in this walker


rollbackTransaction

public void rollbackTransaction()
                         throws IOException
Throws:
IOException

commitTransaction

public void commitTransaction()
                       throws IOException
Throws:
IOException

closeTransaction

public void closeTransaction()

checkStop

protected boolean checkStop()

getFileIndex

public int getFileIndex()
Returns:
the fileIndex

getNumFiles

public int getNumFiles()
Returns:
the numFiles

setFileIndex

public void setFileIndex(int fileIndex)
Parameters:
fileIndex - the fileIndex to set

setNumFiles

public void setNumFiles(int numFiles)
Parameters:
numFiles - the numFiles to set

skipFile

public void skipFile(String path)
Warn this walker that we skip the provided path

Parameters:
path - the path to the file to skip


Copyright © 1996-2014 Geotools. All Rights Reserved.