Package org.gvsig.fmap.dal
Interface DataServerExplorer
- All Superinterfaces:
DataFactoryUnit,org.gvsig.tools.dispose.Disposable
- All Known Subinterfaces:
DataServerExplorer_v2,DBServerExplorer,JDBCServerExplorer,JDBCServerExplorer
DataServerExplorer is an abstraction for any type of data server. It allows
connecting to the server and browsing its contents.
More specifically, this interface provides a list of the available data
stores in a server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(String provider, NewDataStoreParameters parameters, boolean overwrite) Creates a new DataStore in this server.booleancanAdd()Indicates whether this DataServerExplorer can create a new DataStore in the server.booleanIndicates whether this DataServerExplorer can create a new DataStore in the server, given the store name.booleanexists(DataStoreParameters parameters) getAddParameters(String storeName) Given the store's name, returns its parameters for creation.Return the list of provider names that this server allow.Returns this DataServerExplorer parametersReturns the DataServerExplorer's namegetResourcePath(DataStore dataStore, String resourceName) Return the file resource associated to this name and store.org.gvsig.tools.resourcesstorage.ResourcesStorageorg.gvsig.tools.resourcesstorage.ResourcesStoragegetResourcesStorage(DataStore dataStore) org.gvsig.tools.resourcesstorage.ResourcesStoragegetResourcesStorage(DataStoreParameters parameters) list()Provides a list of available stores in the server.list(int mode) Provides a list of available stores in the server of a type.voidremove(DataStoreParameters parameters) Removes a store from the server given its DataStoreParameters.Methods inherited from interface org.gvsig.tools.dispose.Disposable
dispose
-
Field Details
-
FILESYSTEM_SERVER_EXPLORER_NAME
- See Also:
-
MODE_ALL
static final int MODE_ALL- See Also:
-
MODE_FEATURE
static final int MODE_FEATURE- See Also:
-
MODE_GEOMETRY
static final int MODE_GEOMETRY- See Also:
-
MODE_RASTER
static final int MODE_RASTER- See Also:
-
-
Method Details
-
getProviderName
String getProviderName()Returns the DataServerExplorer's name- Returns:
- String containing this DataServerExplorer's name
-
canAdd
boolean canAdd()Indicates whether this DataServerExplorer can create a new DataStore in the server.- Returns:
- true if this DataServerExplorer can be created or false otherwise.
-
canAdd
Indicates whether this DataServerExplorer can create a new DataStore in the server, given the store name.- Parameters:
storeName- store name.- Returns:
- true if this DataServerExplorer can create a new store or false otherwise.
- Throws:
DataException
-
list
Provides a list of available stores in the server.- Returns:
- list of DataStoreParameters
- Throws:
DataException
-
get
- Throws:
DataException
-
exists
- Throws:
DataException
-
list
Provides a list of available stores in the server of a type.- Parameters:
mode- , filter store from a type:MODE_ALL,MODE_FEATURE,,invalid reference
#MODE_FEATURE_GEOMETRYMODE_RASTER- Returns:
- list of DataStoreParameters
- Throws:
DataException
-
add
boolean add(String provider, NewDataStoreParameters parameters, boolean overwrite) throws DataException Creates a new DataStore in this server.- Parameters:
provider-parameters- , an instance of DataStoreParameters fromgetAddParameters(String)that describes the new DataStore.overwrite- if the store already exists- Returns:
- true if the DataStoreParameters were successfully added, false otherwise.
- Throws:
DataException
-
remove
Removes a store from the server given its DataStoreParameters. If the store is a file then this method deletes the file, if it is a table in a database then this method drops the table, and so on.- Parameters:
parameters-- Throws:
DataException
-
getAddParameters
Given the store's name, returns its parameters for creation.- Parameters:
storeName-- Returns:
- parameters to create a store
- Throws:
DataException
-
getParameters
DataServerExplorerParameters getParameters()Returns this DataServerExplorer parameters- Returns:
- an instance of DataServerExplorerParameters containing this DataServerExplorer parameters.
-
getDataStoreProviderNames
Return the list of provider names that this server allow.- Returns:
- List of provider names
-
getResourcePath
Return the file resource associated to this name and store. If the resource not exists or the explorer don't support this opperation return null.- Parameters:
dataStore-resourceName-- Returns:
- file resource or null
- Throws:
DataException
-
getResourcesStorage
org.gvsig.tools.resourcesstorage.ResourcesStorage getResourcesStorage() -
getResourcesStorage
-
getResourcesStorage
org.gvsig.tools.resourcesstorage.ResourcesStorage getResourcesStorage(DataStoreParameters parameters)
-