org.geotools.data
Interface Catalog

All Known Implementing Classes:
DefaultCatalog

public interface Catalog

Provides a Catalog of available FeatureTypes.

Currently GeoServer is providing requirements:

This class is currently serving as a scratching post for gel our ideas about Catalog requirements.

From Chris Holmes email:

As for catalog, I looked a bit through ogc catalog specs over the weekend. I don't know that I like the implementation one too much, I may have to look at it some more. But we may borrow some terms from the abstract one. I need to read it more closely to see how much we can do with it. But the concept of a Catalog Entry might work for our catalog. I don't think a metadata url will be sufficient, but I would like to have a somewhat abbreviated metadata representation, perhaps a bit more than the ogc service elements, but less than a full fgdc record, as there are a lot of elements in that. Perhaps eventually, but I think we should start out with a Catalog Entry (2.3.4 in the abstract catalog spec). It 'describes or summarizes the contents of a set of geospatial data, and is designed to be queried. A Catalog Entry is usually a subset of the complete metadata for the describe geospatial dataset.' Basically it's the metadata needed for discovery, the where, what who, when how and why. I have more thoughts about this, but I think we should hold off until we get the data api together. If gabriel needs it soon he could go ahead and code something up that works, and we could figure out how to adapt it to OGC and our Feature stuff later.


Method Summary
 DataStore getDataStore(java.lang.String namespace)
          Access to a DataStore for a specific namespace.
 java.lang.String[] getNameSpaces()
          Retrieve registered Namespaces.
 boolean lockExists(java.lang.String lockID)
          Tests if a lock exists in this Catalog.
 boolean lockRefresh(java.lang.String lockID, Transaction transaction)
          Refresh feature lock as indicated by the WFS locking specification.
 boolean lockRelease(java.lang.String lockID, Transaction transaction)
          Release feature lock.
 void registerDataStore(java.lang.String namespace, DataStore dataStore)
          Registers all FeatureTypes provided by dataStore with this catalog service.
 

Method Detail

getNameSpaces

public java.lang.String[] getNameSpaces()
Retrieve registered Namespaces.

Returns:
List of available namespaces

registerDataStore

public void registerDataStore(java.lang.String namespace,
                              DataStore dataStore)
Registers all FeatureTypes provided by dataStore with this catalog service.

Catalog can be seen as aggregating multiple DataStores and providing higher level functionality. Such as derived metadata like lat long bounding box information.

We may need to register individual FeatureTypes instead, to provide FeatureTypes with there own namespace?

Parameters:
namespace - Catalog namespace
dataStore - Datastore providing FeatureTypes

getDataStore

public DataStore getDataStore(java.lang.String namespace)
Access to a DataStore for a specific namespace.

Parameters:
namespace - namespace for requested DataStore
Returns:
DataStore for the provided namespace

lockRefresh

public boolean lockRefresh(java.lang.String lockID,
                           Transaction transaction)
                    throws java.io.IOException
Refresh feature lock as indicated by the WFS locking specification.

Refresh the indicated locks for each each DataStore managed by this Catalog.

Parameters:
lockID - Authorization identifing lock
transaction - Transaction with authorization for lock
Returns:
true if lock was found and refreshed
Throws:
java.io.IOException - If a problem occurs

lockRelease

public boolean lockRelease(java.lang.String lockID,
                           Transaction transaction)
                    throws java.io.IOException
Release feature lock.

Release the indicated locks for each each DataStore managed by this Catalog.

Parameters:
lockID - Authorization identifing lock
transaction - Transaction with authorization for lock
Returns:
true if lock was found and released
Throws:
java.io.IOException - If a problem occurs

lockExists

public boolean lockExists(java.lang.String lockID)
Tests if a lock exists in this Catalog.

This method will search all the DataStores to see if the indicated lock exists.

Parameters:
lockID - Authorization identifing lock
Returns:
true if lock was found


Copyright © 1996-2003 GeoTools. All Rights Reserved.