org.deegree.feature.persistence.cache
Class BBoxPropertiesCache

java.lang.Object
  extended by org.deegree.feature.persistence.cache.BBoxPropertiesCache
All Implemented Interfaces:
BBoxCache

public class BBoxPropertiesCache
extends Object
implements BBoxCache

BBoxCache based on a Java properties file.

Version:
$Revision$
Author:
Markus Schneider, last edited by: $Author: mschneider $
See Also:
BBoxCache

Constructor Summary
BBoxPropertiesCache(File propsFile)
          Creates a new BBoxPropertiesCache instance.
 
Method Summary
 boolean contains(QName ftName)
          Returns true, if the the specified feature type is known to the cache.
 Envelope get(QName ftName)
          Returns the cached envelope for features of the specified type.
 void persist()
          Ensures that the cache is persisted.
 void set(QName ftName, Envelope bbox)
          Updates the envelope for the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BBoxPropertiesCache

public BBoxPropertiesCache(File propsFile)
                    throws IOException
Creates a new BBoxPropertiesCache instance.

Parameters:
propsFile - properties file, must not be null
Throws:
IOException
Method Detail

get

public Envelope get(QName ftName)
Description copied from interface: BBoxCache
Returns the cached envelope for features of the specified type.

Specified by:
get in interface BBoxCache
Parameters:
ftName - name of the feature type, must not be null
Returns:
the envelope (using the storage CRS), or null, if the feature type does not have an envelope (no geometry properties or no instances)

contains

public boolean contains(QName ftName)
Description copied from interface: BBoxCache
Returns true, if the the specified feature type is known to the cache.

Specified by:
contains in interface BBoxCache
Parameters:
ftName - name of the feature type, must not be null
Returns:
true, if the feature type is known, false otherwise

set

public void set(QName ftName,
                Envelope bbox)
Description copied from interface: BBoxCache
Updates the envelope for the specified type.

Specified by:
set in interface BBoxCache
Parameters:
ftName - name of the feature type, must not be null
bbox - new envelope (using the storage CRS), or null, if the feature type does not have an envelope (no geometry properties or no instances)

persist

public void persist()
             throws IOException
Description copied from interface: BBoxCache
Ensures that the cache is persisted.

Specified by:
persist in interface BBoxCache
Throws:
IOException


Copyright © 2011. All Rights Reserved.