us.zuercher.gpx2map.source
Class AbstractCachedMapSource

java.lang.Object
  extended by us.zuercher.gpx2map.source.AbstractCachedMapSource
All Implemented Interfaces:
MapSource
Direct Known Subclasses:
AbstractTiledUrlMapSource

public abstract class AbstractCachedMapSource
extends Object
implements MapSource

AbstractCachedMapSource is a MapSource base class that provides storage of the cache directory location. It does not provide any caching services.

Author:
Stephan Zuercher

Field Summary
private  File cacheDir
          Main cache directory.
 
Constructor Summary
AbstractCachedMapSource()
           
 
Method Summary
protected  File getCacheDir()
          Retrieve the main cache directory configured for this MapSource.
 void setCacheDir(File cacheDir)
          Configure the main cache directory for this MapSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface us.zuercher.gpx2map.source.MapSource
downloadTiles, getImageSize, getMapScale, getProperties, mapLocationToPixel, setBoundingBox, setProperty, stitchTiles
 

Field Detail

cacheDir

private File cacheDir
Main cache directory.

Constructor Detail

AbstractCachedMapSource

public AbstractCachedMapSource()
Method Detail

setCacheDir

public final void setCacheDir(File cacheDir)
Configure the main cache directory for this MapSource.

Specified by:
setCacheDir in interface MapSource
Parameters:
cacheDir - the main cache directory

getCacheDir

protected final File getCacheDir()
Retrieve the main cache directory configured for this MapSource.

Returns:
the main cache directory configured for this MapSource.