Package org.geotools.gce.imagemosaic
Class ImageMosaicDirectoryWalker
- Object
-
- ImageMosaicDirectoryWalker
-
-
Field Summary
Fields Modifier and Type Field Description protected ImageMosaicConfigHandlerconfigHandlerprotected intelementIndexindex of the element being processedprotected ImageMosaicEventHandlerseventHandlerprotected intnumElementsNumber of elements to process.protected booleanstopProper 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 DefaultTransactiontransaction
-
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 booleancheckStop()voidcloseTransaction()voidcommitTransaction()ImageMosaicConfigHandlergetConfigHandler()intgetElementIndex()ImageMosaicEventHandlersgetEventHandler()intgetNumElements()booleangetStop()DefaultTransactiongetTransaction()voidrollbackTransaction()voidrun()run the directory walkervoidsetElementIndex(int elementIndex)voidsetNumElements(int numElements)voidskip(String path)Warn this walker that we skip the provided pathvoidstartTransaction()Create a transaction for being used in this walkervoidstop()
-
-
-
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
-
-