org.deegree.coverage.raster.data.container
Class LazyRasterDataContainer

java.lang.Object
  extended by org.deegree.coverage.raster.data.container.LazyRasterDataContainer
All Implemented Interfaces:
RasterDataContainer, RasterDataContainerProvider

public class LazyRasterDataContainer
extends Object
implements RasterDataContainer, RasterDataContainerProvider

This class implements a RasterDataContainer that loads the data on first access.

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: mschneider $

Constructor Summary
LazyRasterDataContainer()
          Creates an empty LazyRasterDataContainer that loads the raster on demand and stores the raster data in memory.
LazyRasterDataContainer(RasterDataReader reader)
          Creates a RasterDataContainer that loads the data on first access.
 
Method Summary
 RasterData getRasterData()
          Returns the RasterData
 RasterDataContainer getRasterDataContainer(RasterDataContainerFactory.LoadingPolicy type)
          Returns a new RasterDataContainer for given type or null, if the implementation doesn't provide this type.
 RasterData getReadOnlyRasterData()
          Returns the RasterData as a read-only copy.
 void setRasterDataReader(RasterDataReader reader)
          Sets the source of the raster data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyRasterDataContainer

public LazyRasterDataContainer()
Creates an empty LazyRasterDataContainer that loads the raster on demand and stores the raster data in memory.


LazyRasterDataContainer

public LazyRasterDataContainer(RasterDataReader reader)
Creates a RasterDataContainer that loads the data on first access.

Parameters:
reader - RasterReader for the raster source
Method Detail

getRasterData

public RasterData getRasterData()
Description copied from interface: RasterDataContainer
Returns the RasterData

Specified by:
getRasterData in interface RasterDataContainer
Returns:
RasterData

getReadOnlyRasterData

public RasterData getReadOnlyRasterData()
Description copied from interface: RasterDataContainer
Returns the RasterData as a read-only copy. Only a read-only RasterData supports thread-safe read operations.

Specified by:
getReadOnlyRasterData in interface RasterDataContainer
Returns:
RasterData

setRasterDataReader

public void setRasterDataReader(RasterDataReader reader)
Description copied from interface: RasterDataContainer
Sets the source of the raster data.

Specified by:
setRasterDataReader in interface RasterDataContainer
Parameters:
reader - the raster data reader for this container

getRasterDataContainer

public RasterDataContainer getRasterDataContainer(RasterDataContainerFactory.LoadingPolicy type)
Description copied from interface: RasterDataContainerProvider
Returns a new RasterDataContainer for given type or null, if the implementation doesn't provide this type.

Specified by:
getRasterDataContainer in interface RasterDataContainerProvider
Returns:
a RasterDataContainer for given type or null


Copyright © 2011. All Rights Reserved.