|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDataAccessRegistry
public class DataAccessRegistry
A registry that stores data access instances per application. This allows feature sources from different data accesses to be accessed globally.
Field Summary | |
---|---|
protected InterpolationProperties |
properties
Properties for interpolation / configuration settings |
protected List<DataAccess<FeatureType,Feature>> |
registry
Data Access Resources |
protected static DataAccessRegistry |
theRegistry
Singleton instance |
Constructor Summary | |
---|---|
protected |
DataAccessRegistry()
Sole constructor |
Method Summary | |
---|---|
DataAccess<FeatureType,Feature> |
access(Name name)
Search for the DataAccess (may be a DataStore) by name. |
void |
clearProperties()
Clean-up properties, mainly used for cleaning up after tests |
DataStore |
dataStore(Name name)
Search for the DataStore by name. |
void |
disposeAndUnregisterAll()
Dispose and unregister all data accesses in the registry. |
FeatureSource<FeatureType,Feature> |
featureSource(Name name)
Get a feature source for built features with supplied feature type name. |
Feature |
findFeature(FeatureId id,
Hints hints)
|
static DataAccess<FeatureType,Feature> |
getDataAccess(Name featureTypeName)
|
List<DataStore> |
getDataStores()
List of available DataStore instances; these are considered to be live/connected datastores under the management of the application and should not be closed or otherwise harmed by client code. |
static FeatureSource<FeatureType,Feature> |
getFeatureSource(Name featureTypeName)
Get a feature source for built features with supplied feature type name. |
static DataAccessRegistry |
getInstance()
Public method to get singleton instance to registry. |
InterpolationProperties |
getProperties()
Get properties |
boolean |
hasAccessName(Name name)
Return true if a type name is mapped in one of the registered data accesses. |
boolean |
hasAppSchemaAccessName(Name name)
Return true if a type name is mapped in one of the registered app-schema data accesses. |
boolean |
hasAppSchemaTargetElement(Name name)
Return true if a type name is mapped in one of the registered app-schema data accesses as targetElementName, regardless whether or not mappingName exists. |
static boolean |
hasName(Name featureTypeName)
Return true if a type name is mapped in one of the registered data accesses. |
FeatureTypeMapping |
mappingByElement(Name name)
|
FeatureTypeMapping |
mappingByName(Name name)
Get a feature type mapping from a registered app-schema data access. |
static void |
register(DataAccess<FeatureType,Feature> dataAccess)
Registers a data access |
void |
registerAccess(DataAccess<FeatureType,Feature> dataAccess)
Registers a data access |
protected void |
throwDataSourceException(Name featureTypeName)
Throws data source exception if mapping is not found. |
static void |
unregister(DataAccess<FeatureType,Feature> dataAccess)
Unregister a data access. |
void |
unregisterAccess(DataAccess<FeatureType,Feature> dataAccess)
Unregister a data access. |
static void |
unregisterAll()
Deprecated. |
static void |
unregisterAndDisposeAll()
Unregister * and dispose * all data accesses in the registry. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static DataAccessRegistry theRegistry
protected InterpolationProperties properties
protected List<DataAccess<FeatureType,Feature>> registry
Constructor Detail |
---|
protected DataAccessRegistry()
Method Detail |
---|
public static DataAccessRegistry getInstance()
public FeatureSource<FeatureType,Feature> featureSource(Name name) throws IOException
featureTypeName
-
IOException
public DataAccess<FeatureType,Feature> access(Name name)
Repository
access
in interface Repository
name
- The Name (namespace and name) to search for
public DataStore dataStore(Name name)
Repository
dataStore
in interface Repository
public List<DataStore> getDataStores()
Repository
getDataStores
in interface Repository
public void registerAccess(DataAccess<FeatureType,Feature> dataAccess)
dataAccess
- Data access to be registeredpublic void unregisterAccess(DataAccess<FeatureType,Feature> dataAccess)
dataAccess
- Data access to be unregisteredpublic void disposeAndUnregisterAll()
public boolean hasAccessName(Name name) throws IOException
featureTypeName
- Feature type name
IOException
public boolean hasAppSchemaAccessName(Name name) throws IOException
featureTypeName
- Feature type name
IOException
public FeatureTypeMapping mappingByName(Name name) throws IOException
featureTypeName
-
IOException
public FeatureTypeMapping mappingByElement(Name name) throws IOException
IOException
public boolean hasAppSchemaTargetElement(Name name) throws IOException
featureTypeName
-
IOException
public InterpolationProperties getProperties()
public void clearProperties()
public static FeatureSource<FeatureType,Feature> getFeatureSource(Name featureTypeName) throws IOException
featureTypeName
-
IOException
public static DataAccess<FeatureType,Feature> getDataAccess(Name featureTypeName) throws IOException
IOException
public static void register(DataAccess<FeatureType,Feature> dataAccess)
dataAccess
- Data access to be registeredpublic static void unregister(DataAccess<FeatureType,Feature> dataAccess)
dataAccess
- Data access to be unregisteredpublic static void unregisterAndDisposeAll()
@Deprecated public static void unregisterAll()
public static boolean hasName(Name featureTypeName) throws IOException
featureTypeName
- Feature type name
IOException
protected void throwDataSourceException(Name featureTypeName) throws IOException
featureTypeName
- Name of feature type
IOException
public Feature findFeature(FeatureId id, Hints hints) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |