org.geotools.data.complex
Class DataAccessRegistry
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>>
org.geotools.data.complex.DataAccessRegistry
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>>, java.util.Collection<DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>>, java.util.List<DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>>, java.util.RandomAccess
- Direct Known Subclasses:
- AppSchemaDataAccessRegistry
public class DataAccessRegistry
- extends java.util.ArrayList<DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>>
A registry that stores data access instances per application. This allows feature sources from
different data accesses to be accessed globally.
- Author:
- Rini Angreani, Curtin University of Technology
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
static DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> |
getDataAccess(org.opengis.feature.type.Name featureTypeName)
|
static FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> |
getFeatureSource(org.opengis.feature.type.Name featureTypeName)
Get a feature source for built features with supplied feature type name. |
static boolean |
hasName(org.opengis.feature.type.Name featureTypeName)
|
static void |
register(DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> dataAccess)
Registers a data access |
protected static void |
throwDataSourceException(org.opengis.feature.type.Name featureTypeName)
Throws data source exception if mapping is not found. |
static void |
unregister(DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> dataAccess)
Unregister a data access. |
static void |
unregisterAll()
Unregister all data accesses in the registry. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode |
Methods inherited from class java.util.AbstractCollection |
containsAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode |
registry
protected static DataAccessRegistry registry
DataAccessRegistry
protected DataAccessRegistry()
- Sole constructor
register
public static void register(DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> dataAccess)
- Registers a data access
- Parameters:
dataAccess
- Data access to be registered
unregister
public static void unregister(DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> dataAccess)
- Unregister a data access. This is important especially at the end of test cases, so that the
mappings contained in the data access do not conflict with mappings of the same type used in
other tests.
- Parameters:
dataAccess
- Data access to be unregistered
unregisterAll
public static void unregisterAll()
- Unregister all data accesses in the registry. This is may be needed to prevent unit tests
from conflicting with data accesses with the same type name registered for other tests.
hasName
public static boolean hasName(org.opengis.feature.type.Name featureTypeName)
throws java.io.IOException
- Throws:
java.io.IOException
getFeatureSource
public static FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> getFeatureSource(org.opengis.feature.type.Name featureTypeName)
throws java.io.IOException
- Get a feature source for built features with supplied feature type name.
- Parameters:
featureTypeName
-
- Returns:
- feature source
- Throws:
java.io.IOException
getDataAccess
public static DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> getDataAccess(org.opengis.feature.type.Name featureTypeName)
throws java.io.IOException
- Throws:
java.io.IOException
throwDataSourceException
protected static void throwDataSourceException(org.opengis.feature.type.Name featureTypeName)
throws java.io.IOException
- Throws data source exception if mapping is not found.
- Parameters:
featureTypeName
- Name of feature type
- Throws:
java.io.IOException
Copyright © 1996-2010 Geotools. All Rights Reserved.