org.geotools.data
Interface Repository

All Known Implementing Classes:
DefaultRepository, FeatureSourceRepository

public interface Repository

Provides a Repository of available FeatureTypes allowing Catalog metadata queries.

Currently GeoServer is providing requirements:


Method Summary
 java.util.Map getDataStores()
          Access to the DataStores registed to this Catalog.
 java.util.SortedMap getFeatureSources()
          All FeatureSources by typeRef ( aka dataStoreId:typeName)
 java.util.Set getPrefixes()
          Retrieve Set of Namespaces prefixes registered by DataStores in this Catalog.
 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 by lockID.
 FeatureSource source(java.lang.String dataStoreId, java.lang.String typeName)
          FeatureSoruce access.
 

Method Detail

getFeatureSources

public java.util.SortedMap getFeatureSources()
All FeatureSources by typeRef ( aka dataStoreId:typeName)


getPrefixes

public java.util.Set getPrefixes()
                          throws java.io.IOException
Retrieve Set of Namespaces prefixes registered by DataStores in this Catalog.

Namespace seems to be the gml prefix used when writing out GML. We may need to promote this to a "first class" object.

GeoServer maintains the following information in a NamespaceInfo object:

GeoServer global.Data implements this interface. You may use the namespace strings returned by this method to look up NamespaceInfo objets by prefix.

Returns:
Set of available Namespace prefixes.
Throws:
java.io.IOException

source

public FeatureSource source(java.lang.String dataStoreId,
                            java.lang.String typeName)
                     throws java.io.IOException
FeatureSoruce access.

Parameters:
dataStoreId -
typeName -
Returns:
Throws:
java.io.IOException

getDataStores

public java.util.Map getDataStores()
Access to the DataStores registed to this Catalog.

Returns:
Map of registered dataStoreId:DataStore

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 by lockID.

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 © GeoTools. All Rights Reserved.