Package org.geotools.gce.imagemosaic
Class ImageMosaicDirectoryWalker
- Object
-
- ImageMosaicDirectoryWalker
-
-
Field Summary
Fields Modifier and Type Field Description protected ImageMosaicConfigHandler
configHandler
protected int
elementIndex
index of the element being processedprotected ImageMosaicEventHandlers
eventHandler
protected int
numElements
Number of elements to process.protected boolean
stop
Proper way to stop a thread is not by calling Thread.stop() but by using a shared variable that can be checked in order to notify a terminating condition.protected DefaultTransaction
transaction
-
Constructor Summary
Constructors Constructor Description ImageMosaicDirectoryWalker(ImageMosaicConfigHandler catalogHandler, ImageMosaicEventHandlers eventHandler)
ImageMosaicDirectoryWalker(ImageMosaicConfigHandler configHandler, ImageMosaicEventHandlers eventHandler, IOFileFilter filter)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkStop()
void
closeTransaction()
void
commitTransaction()
ImageMosaicConfigHandler
getConfigHandler()
int
getElementIndex()
ImageMosaicEventHandlers
getEventHandler()
int
getNumElements()
boolean
getStop()
DefaultTransaction
getTransaction()
void
rollbackTransaction()
void
run()
run the directory walkervoid
setElementIndex(int elementIndex)
void
setNumElements(int numElements)
void
skip(String path)
Warn this walker that we skip the provided pathvoid
startTransaction()
Create a transaction for being used in this walkervoid
stop()
-
-
-
Field Detail
-
transaction
protected DefaultTransaction transaction
-
stop
protected volatile boolean stop
Proper way to stop a thread is not by calling Thread.stop() but by using a shared variable that can be checked in order to notify a terminating condition.
-
configHandler
protected final ImageMosaicConfigHandler configHandler
-
eventHandler
protected final ImageMosaicEventHandlers eventHandler
-
elementIndex
protected int elementIndex
index of the element being processed
-
numElements
protected int numElements
Number of elements to process.
-
-
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)
-
ImageMosaicDirectoryWalker
public ImageMosaicDirectoryWalker(ImageMosaicConfigHandler catalogHandler, ImageMosaicEventHandlers eventHandler)
-
-
Method Detail
-
run
public void run()
run the directory walker
-
getConfigHandler
public ImageMosaicConfigHandler getConfigHandler()
-
getEventHandler
public ImageMosaicEventHandlers getEventHandler()
-
getTransaction
public DefaultTransaction getTransaction()
-
getStop
public boolean getStop()
-
stop
public void stop()
-
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()
-
getElementIndex
public int getElementIndex()
- Returns:
- the elementIndex
-
getNumElements
public int getNumElements()
- Returns:
- the numElements
-
setElementIndex
public void setElementIndex(int elementIndex)
- Parameters:
elementIndex
- the elementIndex to set
-
setNumElements
public void setNumElements(int numElements)
- Parameters:
numElements
- the numElements to set
-
skip
public void skip(String path)
Warn this walker that we skip the provided path- Parameters:
path
- the path to the file to skip
-
-