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()
DataManagergetTemporaryDirectory in interface DataManagerpublic void registerStoreProvider(String name, Class storeProviderClass, Class parametersClass)
registerStoreProvider in interface DataManagerProviderServicespublic void registerStoreProviderFactory(DataStoreProviderFactory factory)
registerStoreProviderFactory in interface DataManagerProviderServicespublic void registerStoreFactory(String name, Class storeProviderClass)
DataManagerProviderServicesregisterStoreFactory in interface DataManagerProviderServicespublic DataStoreParameters createStoreParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManagercreateStoreParameters in interface DataManagername - 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)
DataManagerProviderServicesregisterDefaultRasterStore in interface DataManagerProviderServicespublic DataStore openStore(String provider, DynObject parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
DataManageropenStore in interface DataManagerparameters - 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 DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic DataStore createStore(DynObject doparameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createStore in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic DataStore createStore(DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createStore in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic List getStoreProviders()
DataManagergetStoreProviders in interface DataManagerpublic DataStoreProviderFactory getStoreProviderFactory(String name)
getStoreProviderFactory in interface DataManagerpublic List getStoreProviders(String name)
DataManagergetStoreProviders in interface DataManagerpublic NewDataStoreParameters createNewStoreParameters(String explorer, String provider) throws InitializeException, ProviderNotRegisteredException
DataManagercreateNewStoreParameters in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionpublic void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
DataManagernewStore in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic void registerExplorerProvider(String name, Class explorerClass, Class parametersClass)
DataManagerProviderServicesregisterExplorerProvider in interface DataManagerProviderServicesexplorerClass - class of providerparametersClass - parameters class of providerpublic DataServerExplorerParameters createServerExplorerParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManagerDataServerExplorerParameters corresponding to
the given name.createServerExplorerParameters in interface DataManagername - 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
DataManagerDataServerExplorer given its parameters.openServerExplorer in interface DataManagerparameters - parameters used to instantiate and initialize the
DataServerExplorer.DataServerExplorer.InitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic DataServerExplorer createServerExplorer(DataServerExplorerParameters parameters) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
createServerExplorer in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersExceptionpublic List getExplorerProviders()
DataManagergetExplorerProviders in interface DataManagerpublic Evaluator createExpresion(String expresion) throws InitializeException
DataManagercreateExpresion in interface DataManagerexpresion - String containing a CQL expression.InitializeExceptionpublic void registerDefaultEvaluator(Class evaluatorClass)
DataManagerregisterDefaultEvaluator in interface DataManagerevaluatorClass - Class that will be called to evaluate the expression. It must
implement Evaluator.public List getFeatureIndexProviders()
DataManagergetFeatureIndexProviders in interface DataManagerpublic void setDefaultFeatureIndexProviderName(int dataType,
String name)
DataManagersetDefaultFeatureIndexProviderName in interface DataManagerdataType - one of the data types defined in DataTypes.name - Provider's namepublic String getDefaultFeatureIndexProviderName(int dataType)
DataManagerDataTypes.getDefaultFeatureIndexProviderName in interface DataManagerdataType - 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
DataManagerProviderServicescreateFeatureIndexProvider in interface DataManagerProviderServicesstore - associated FeatureStoretype - associated FeatureTypeattr - associated FeatureAttributeDescriptorInitializeExceptionProviderNotRegisteredExceptionpublic void registerFeatureIndexProvider(String name, String description, Class clazz, int dataType)
DataManagerProviderServicesregisterFeatureIndexProvider in interface DataManagerProviderServicesname - 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
DataManagerProviderServicescreateProvider in interface DataManagerProviderServicesInitializeExceptionProviderNotRegisteredExceptionpublic void registerFeatureCacheProvider(FeatureCacheProviderFactory providerFactory)
DataManagerProviderServicesregisterFeatureCacheProvider in interface DataManagerProviderServicespublic FeatureCacheProvider createFeatureCacheProvider(String name, DynObject parameters) throws DataException
DataManagerProviderServicesDataServerExplorerParameters.createFeatureCacheProvider in interface DataManagerProviderServicesname - provider's name.parameters - parameters used to create a explorer.DataExceptionpublic List getFeatureCacheProviders()
DataManagergetFeatureCacheProviders in interface DataManagerpublic DynObject createCacheParameters(String name) throws InitializeException, ProviderNotRegisteredException
DataManagerDataServerExplorerParameters corresponding
to the given name used by the cache to create a store to save the
retrieved data.createCacheParameters in interface DataManagername - 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
DataManagerDataStoreParameters to create a
FeatureStore based on the MemoryStoreProvider.createMemoryStoreParameters in interface DataManagerautoOrderAttributeName - the name of the Feature attribute to be used to order
the store Features 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
DataManagerFeatureStore based on the
MemoryStoreProvider.createMemoryStore in interface DataManagerautoOrderAttributeName - the name of the Feature attribute to be used to order
the store Features 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
DataManagerFeaturePagingHelper to paginate data from a
FeatureStore.createFeaturePagingHelper in interface DataManagerfeatureStore - to get the Features frompageSize - the page sizeFeaturePagingHelperBaseException - if there is an error creating the helperpublic FeaturePagingHelper createFeaturePagingHelper(FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) throws BaseException
DataManagerFeaturePagingHelper to paginate data from a
FeatureStore.createFeaturePagingHelper in interface DataManagerfeatureStore - to get the Features fromfeatureQuery - to filter and/or order the datapageSize - the page sizeFeaturePagingHelperBaseException - if there is an error creating the helperpublic void setOpenErrorHandler(OpenErrorHandler handler)
setOpenErrorHandler in interface DataManagerpublic OpenErrorHandler getOpenErrorHandler()
getOpenErrorHandler in interface DataManagerpublic EditableFeatureType createFeatureType()
createFeatureType in interface DataManagerpublic List getDataTypes()
getDataTypes in interface DataManagerpublic void registerFeatureAttributeGetter(String name, Class clazz)
DataManagerFeatureAttributeGetter
and associate it to a FeatureAttributeDescriptor.registerFeatureAttributeGetter in interface DataManagername - the name used to register the class.clazz - it has to be an instance of FeatureAttributeDescriptorpublic FeatureAttributeGetter createFeatureAttributeGetter(String name) throws InitializeException
DataManagerFeatureAttributeGetter 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 DataManagername - the name that was used to register the classFeatureAttributeGetterInitializeException - if there is any error creating the objectpublic DataServerExplorerPool getDataServerExplorerPool()
getDataServerExplorerPool in interface DataManagerpublic void setDataServerExplorerPool(DataServerExplorerPool pool)
setDataServerExplorerPool in interface DataManagerpublic DataStoreParameters createStoreParameters(DynStruct struct) throws InitializeException, ProviderNotRegisteredException
DataManagercreateStoreParameters in interface DataManagerstruct - 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 DataManagerInitializeExceptionProviderNotRegisteredExceptionpublic DataStore openStore(DynStruct struct) throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException
openStore in interface DataManagerInitializeExceptionProviderNotRegisteredExceptionValidateDataParametersException