public class DefaultDataManager extends Object implements DataManager, DataManagerProviderServices
CREATE_STORE_AUTHORIZATION, READ_STORE_AUTHORIZATION, WRITE_STORE_AUTHORIZATION
Constructor and Description |
---|
DefaultDataManager() |
Modifier and Type | Method and Description |
---|---|
DynObject |
createCacheParameters(String name)
Returns an instance of
DataServerExplorerParameters corresponding
to the given name used by the cache to create a store to save the
retrieved data. |
Evaluator |
createExpresion(String expresion)
Creates an instance of Evaluator that represents the given expression.
|
FeatureAttributeGetter |
createFeatureAttributeGetter(String name)
Creates a
FeatureAttributeGetter by name. |
FeatureCacheProvider |
createFeatureCacheProvider(String name,
DynObject parameters)
Creates a FeatureCacheProvider from a name and the parameters to configure
its data server explorer.
|
FeatureIndexProviderServices |
createFeatureIndexProvider(String name,
FeatureStore store,
FeatureType type,
String indexName,
FeatureAttributeDescriptor attr)
Returns a DataIndexProvider compatible with the attribute data type.
|
FeaturePagingHelper |
createFeaturePagingHelper(FeatureStore featureStore,
FeatureQuery featureQuery,
int pageSize)
Creates a
FeaturePagingHelper to paginate data from a
FeatureStore . |
FeaturePagingHelper |
createFeaturePagingHelper(FeatureStore featureStore,
int pageSize)
Creates a
FeaturePagingHelper to paginate data from a
FeatureStore . |
EditableFeatureType |
createFeatureType() |
FeatureStore |
createMemoryStore(String autoOrderAttributeName)
Utility method to create the a
FeatureStore based on the
MemoryStoreProvider . |
DataStoreParameters |
createMemoryStoreParameters(String autoOrderAttributeName)
Utility method to create the
DataStoreParameters to create a
FeatureStore based on the MemoryStoreProvider . |
NewDataStoreParameters |
createNewStoreParameters(String explorer,
String provider)
Creates, initializes and returns an instance of NewDataStoreParameters
given the name with which their provider is registered.
|
DataStoreProvider |
createProvider(DataStoreProviderServices providerServices,
DataStoreParameters parameters)
Creates a new instance of the provider associated to the passed parameters.
|
DataServerExplorer |
createServerExplorer(DataServerExplorerParameters parameters)
Deprecated.
see openServerExplorer
|
DataServerExplorerParameters |
createServerExplorerParameters(String name)
Returns an instance of
DataServerExplorerParameters corresponding to
the given name. |
DataStore |
createStore(DataStoreParameters parameters)
Deprecated.
see openStore
|
DataStore |
createStore(DynObject doparameters)
Deprecated.
see openStore
|
DataStoreParameters |
createStoreParameters(DynStruct struct)
Creates, initializes and fill an instance of DataStoreParameters from
the tags of the DynStruct passed as parameter.
|
DataStoreParameters |
createStoreParameters(String name)
Creates, initializes and returns an instance of DataStoreParameters given
the name with which their provider is registered.
|
DataStoreParameters |
createStoreParameters(Tags tags) |
DataServerExplorerPool |
getDataServerExplorerPool() |
List |
getDataTypes() |
String |
getDefaultFeatureIndexProviderName(int dataType)
Returns the default DataIndexProvider name, given a data type.
|
List |
getExplorerProviders()
Returns a list of String containing the names of the available
DataServerExplorer providers.
|
List |
getFeatureCacheProviders()
Returns a list of String containing the names of the available cache providers.
|
List |
getFeatureIndexProviders()
Returns a list of String containing the names of the available index providers.
|
OpenErrorHandler |
getOpenErrorHandler() |
OperationManager |
getOperationManager() |
ResourceManager |
getResourceManager() |
DataStoreProviderFactory |
getStoreProviderFactory(String name) |
List |
getStoreProviders()
Returns a list of Strings containing the names of all available DataStore
providers.
|
List |
getStoreProviders(String name)
Returns a list of Strings containing the names of all available DataStore
providers for an explorer.
|
String |
getTemporaryDirectory()
Returns the default DAL's temporary directory
|
void |
intializeDataStore(DataStore store,
DataStoreParameters parameters) |
void |
newStore(String explorer,
String provider,
NewDataStoreParameters parameters,
boolean overwrite)
Create a new physical store
|
DataServerExplorer |
openServerExplorer(String explorer,
DataServerExplorerParameters parameters)
Returns an instance of
DataServerExplorer given its parameters. |
DataStore |
openStore(DynStruct struct) |
DataStore |
openStore(String provider,
DataStoreParameters parameters) |
DataStore |
openStore(String provider,
DynObject parameters)
Creates, initializes and returns an instance of DataStore given the
DataStoreParameters.
|
void |
registerDefaultEvaluator(Class evaluatorClass)
Registers the default expression evaluator.
|
void |
registerDefaultRasterStore(Class rasterStoreClass)
Este metodo es temporal hasta que se integre el nuevo raster en el
core de gvSIG.
|
void |
registerExplorerProvider(String name,
Class explorerClass,
Class parametersClass)
Register a new provider of data server explorer
FIXME
|
void |
registerFeatureAttributeGetter(String name,
Class clazz)
Registers a class that can be used to create a
FeatureAttributeGetter
and associate it to a FeatureAttributeDescriptor . |
void |
registerFeatureCacheProvider(FeatureCacheProviderFactory providerFactory)
Registers a new cache provider.
|
void |
registerFeatureIndexProvider(String name,
String description,
Class clazz,
int dataType)
Registers a new feature index provider.
|
void |
registerStoreFactory(String name,
Class storeProviderClass)
Registers a store factory.
|
void |
registerStoreProvider(String name,
Class storeProviderClass,
Class parametersClass) |
void |
registerStoreProviderFactory(DataStoreProviderFactory factory) |
void |
setDataServerExplorerPool(DataServerExplorerPool pool) |
void |
setDefaultFeatureIndexProviderName(int dataType,
String name)
Sets the default DataIndexProvider for the given data type.
|
void |
setOpenErrorHandler(OpenErrorHandler handler) |
DataStoreParameters |
toDataStoreParameters(String provider,
DynObject doparams) |
public ResourceManager getResourceManager()
public OperationManager getOperationManager()
public String getTemporaryDirectory()
DataManager
getTemporaryDirectory
in interface DataManager
public void registerStoreProvider(String name, Class storeProviderClass, Class parametersClass)
registerStoreProvider
in interface DataManagerProviderServices
public void registerStoreProviderFactory(DataStoreProviderFactory factory)
registerStoreProviderFactory
in interface DataManagerProviderServices
public void registerStoreFactory(String name, Class storeProviderClass)
DataManagerProviderServices
registerStoreFactory
in interface DataManagerProviderServices
public DataStoreParameters createStoreParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManager
createStoreParameters
in interface DataManager
name
- provider nameInitializeException
- if there is an error initializing the parameters for the
memory providerProviderNotRegisteredException
- if the memory provider is not registeredpublic DataStoreParameters toDataStoreParameters(String provider, DynObject doparams) throws InitializeException, ProviderNotRegisteredException
public void registerDefaultRasterStore(Class rasterStoreClass)
DataManagerProviderServices
registerDefaultRasterStore
in interface DataManagerProviderServices
public DataStore openStore(String provider, DynObject parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
DataManager
openStore
in interface DataManager
parameters
- parameters used to instantiate and initialize the DataStoreInitializeException
- if there is an error initializing the parameters for the
memory providerProviderNotRegisteredException
- if the memory provider is not registeredValidateDataParametersException
- if the parameters to open the memory based store are not
validpublic DataStore openStore(String provider, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
openStore
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public DataStore createStore(DynObject doparameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createStore
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public DataStore createStore(DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createStore
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public List getStoreProviders()
DataManager
getStoreProviders
in interface DataManager
public DataStoreProviderFactory getStoreProviderFactory(String name)
getStoreProviderFactory
in interface DataManager
public List getStoreProviders(String name)
DataManager
getStoreProviders
in interface DataManager
public NewDataStoreParameters createNewStoreParameters(String explorer, String provider) throws InitializeException, ProviderNotRegisteredException
DataManager
createNewStoreParameters
in interface DataManager
InitializeException
ProviderNotRegisteredException
public void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
DataManager
newStore
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public void registerExplorerProvider(String name, Class explorerClass, Class parametersClass)
DataManagerProviderServices
registerExplorerProvider
in interface DataManagerProviderServices
explorerClass
- class of providerparametersClass
- parameters class of providerpublic DataServerExplorerParameters createServerExplorerParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManager
DataServerExplorerParameters
corresponding to
the given name.createServerExplorerParameters
in interface DataManager
name
- name of a registered server explorer providerInitializeException
- if parameter initialization causes an error.ProviderNotRegisteredException
- if could not find a provider by the given name.public DataServerExplorer openServerExplorer(String explorer, DataServerExplorerParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
DataManager
DataServerExplorer
given its parameters.openServerExplorer
in interface DataManager
parameters
- parameters used to instantiate and initialize the
DataServerExplorer
.DataServerExplorer
.InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public DataServerExplorer createServerExplorer(DataServerExplorerParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createServerExplorer
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException
public List getExplorerProviders()
DataManager
getExplorerProviders
in interface DataManager
public Evaluator createExpresion(String expresion) throws InitializeException
DataManager
createExpresion
in interface DataManager
expresion
- String containing a CQL expression.InitializeException
public void registerDefaultEvaluator(Class evaluatorClass)
DataManager
registerDefaultEvaluator
in interface DataManager
evaluatorClass
- Class that will be called to evaluate the expression. It must
implement Evaluator
.public List getFeatureIndexProviders()
DataManager
getFeatureIndexProviders
in interface DataManager
public void setDefaultFeatureIndexProviderName(int dataType, String name)
DataManager
setDefaultFeatureIndexProviderName
in interface DataManager
dataType
- one of the data types defined in DataTypes
.name
- Provider's namepublic String getDefaultFeatureIndexProviderName(int dataType)
DataManager
DataTypes
.getDefaultFeatureIndexProviderName
in interface DataManager
dataType
- one of the constants in DataTypes
.FeatureIndexProvider
if there is
anyone available for the given data type.public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type, String indexName, FeatureAttributeDescriptor attr) throws InitializeException, ProviderNotRegisteredException
DataManagerProviderServices
createFeatureIndexProvider
in interface DataManagerProviderServices
store
- associated FeatureStoretype
- associated FeatureTypeattr
- associated FeatureAttributeDescriptorInitializeException
ProviderNotRegisteredException
public void registerFeatureIndexProvider(String name, String description, Class clazz, int dataType)
DataManagerProviderServices
registerFeatureIndexProvider
in interface DataManagerProviderServices
name
- provider's namedescription
- provider's descriptionclazz
- a custom FeatureIndexProvider implementationdataType
- one of the constants in DataTypes
. This means that this provider
can build indexes based on attributes of this type.public void intializeDataStore(DataStore store, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException
public DataStoreProvider createProvider(DataStoreProviderServices providerServices, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException
DataManagerProviderServices
createProvider
in interface DataManagerProviderServices
InitializeException
ProviderNotRegisteredException
public void registerFeatureCacheProvider(FeatureCacheProviderFactory providerFactory)
DataManagerProviderServices
registerFeatureCacheProvider
in interface DataManagerProviderServices
public FeatureCacheProvider createFeatureCacheProvider(String name, DynObject parameters) throws DataException
DataManagerProviderServices
DataServerExplorerParameters
.createFeatureCacheProvider
in interface DataManagerProviderServices
name
- provider's name.parameters
- parameters used to create a explorer.DataException
public List getFeatureCacheProviders()
DataManager
getFeatureCacheProviders
in interface DataManager
public DynObject createCacheParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManager
DataServerExplorerParameters
corresponding
to the given name used by the cache to create a store to save the
retrieved data.createCacheParameters
in interface DataManager
name
- name of a registered feature cache providerInitializeException
- if parameter initialization causes an error.ProviderNotRegisteredException
- if could not find a cache provider by the given name.public DataStoreParameters createMemoryStoreParameters(String autoOrderAttributeName) throws InitializeException
DataManager
DataStoreParameters
to create a
FeatureStore
based on the MemoryStoreProvider
.createMemoryStoreParameters
in interface DataManager
autoOrderAttributeName
- the name of the Feature
attribute to be used to order
the store Feature
s by default. Set to null if you
don't want any order by defaultInitializeException
- if there is an error initializing the parameters for the
memory providerpublic FeatureStore createMemoryStore(String autoOrderAttributeName) throws InitializeException
DataManager
FeatureStore
based on the
MemoryStoreProvider
.createMemoryStore
in interface DataManager
autoOrderAttributeName
- the name of the Feature
attribute to be used to order
the store Feature
s by default. Set to null if you
don't want any order by defaultInitializeException
- if there is an error initializing the parameters for the
memory providerpublic FeaturePagingHelper createFeaturePagingHelper(FeatureStore featureStore, int pageSize) throws BaseException
DataManager
FeaturePagingHelper
to paginate data from a
FeatureStore
.createFeaturePagingHelper
in interface DataManager
featureStore
- to get the Feature
s frompageSize
- the page sizeFeaturePagingHelper
BaseException
- if there is an error creating the helperpublic FeaturePagingHelper createFeaturePagingHelper(FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) throws BaseException
DataManager
FeaturePagingHelper
to paginate data from a
FeatureStore
.createFeaturePagingHelper
in interface DataManager
featureStore
- to get the Feature
s fromfeatureQuery
- to filter and/or order the datapageSize
- the page sizeFeaturePagingHelper
BaseException
- if there is an error creating the helperpublic void setOpenErrorHandler(OpenErrorHandler handler)
setOpenErrorHandler
in interface DataManager
public OpenErrorHandler getOpenErrorHandler()
getOpenErrorHandler
in interface DataManager
public EditableFeatureType createFeatureType()
createFeatureType
in interface DataManager
public List getDataTypes()
getDataTypes
in interface DataManager
public void registerFeatureAttributeGetter(String name, Class clazz)
DataManager
FeatureAttributeGetter
and associate it to a FeatureAttributeDescriptor
.registerFeatureAttributeGetter
in interface DataManager
name
- the name used to register the class.clazz
- it has to be an instance of FeatureAttributeDescriptor
public FeatureAttributeGetter createFeatureAttributeGetter(String name) throws InitializeException
DataManager
FeatureAttributeGetter
by name. If there is not any class
registered with this name or if there is any error an exception is thrown.createFeatureAttributeGetter
in interface DataManager
name
- the name that was used to register the classFeatureAttributeGetter
InitializeException
- if there is any error creating the objectpublic DataServerExplorerPool getDataServerExplorerPool()
getDataServerExplorerPool
in interface DataManager
public void setDataServerExplorerPool(DataServerExplorerPool pool)
setDataServerExplorerPool
in interface DataManager
public DataStoreParameters createStoreParameters(DynStruct struct) throws InitializeException, ProviderNotRegisteredException
DataManager
createStoreParameters
in interface DataManager
struct
- structure from which tags were created ths parameters.InitializeException
- if there is an error initializing the parameters for the
memory providerProviderNotRegisteredException
- if the memory provider is not registeredpublic DataStoreParameters createStoreParameters(Tags tags) throws InitializeException, ProviderNotRegisteredException
createStoreParameters
in interface DataManager
InitializeException
ProviderNotRegisteredException
public DataStore openStore(DynStruct struct) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
openStore
in interface DataManager
InitializeException
ProviderNotRegisteredException
ValidateDataParametersException