public class MultiFileServerExplorer extends AbstractFilesystemServerExplorerProvider implements DataServerExplorerProvider
MODE_ALL, MODE_FEATURE, MODE_GEOMETRY, MODE_RASTER
Constructor and Description |
---|
MultiFileServerExplorer() |
MultiFileServerExplorer(MultiFileServerExplorerParameters parameters,
DataServerExplorerProviderServices services) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File pathname) |
boolean |
add(String provider,
NewDataStoreParameters parameters,
boolean overwrite)
Creates a new DataStore in this server.
|
boolean |
canAdd()
Indicates whether this DataServerExplorer can create a new DataStore in the
server.
|
boolean |
canAdd(String storeName)
Indicates whether this DataServerExplorer can create a new DataStore in
the server, given the store name.
|
boolean |
canCreate() |
boolean |
canCreate(NewDataStoreParameters parameters) |
void |
create(NewDataStoreParameters parameters,
boolean overwrite) |
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
DataStoreParameters |
get(String string) |
NewDataStoreParameters |
getAddParameters(String storeName)
Given the store's name, returns its parameters for creation.
|
NewDataStoreParameters |
getCreateParameters() |
String |
getDataStoreProviderName() |
List<?> |
getDataStoreProviderNames()
Return the list of provider names that this server allow.
|
String |
getDescription() |
int |
getMode() |
DataServerExplorerParameters |
getParameters()
Returns this DataServerExplorer parameters
|
DataStoreParameters |
getParameters(File file)
Creates store parameters from the file and returns it.
|
String |
getProviderName()
Returns the DataServerExplorer's name
|
File |
getResourcePath(DataStore dataStore,
String resourceName)
Return the file resource associated to this name and store.
|
DataServerExplorerProviderServices |
getServerExplorerProviderServices() |
DataStoreParameters |
getStoreParameters() |
void |
initialize(FilesystemServerExplorerProviderServices serverExplorer) |
List<?> |
list()
Provides a list of available stores in the server.
|
List<?> |
list(int mode)
Provides a list of available stores in the server of a type.
|
void |
remove(DataStoreParameters parameters)
Removes a store from the server given its DataStoreParameters.
|
getResourceRootPathName, isMode, removeFileExtension
public MultiFileServerExplorer()
public MultiFileServerExplorer(MultiFileServerExplorerParameters parameters, DataServerExplorerProviderServices services) throws InitializeException
parameters
- services
- InitializeException
public DataStoreParameters get(String string) throws DataException
get
in interface DataServerExplorer
DataException
public String getDataStoreProviderName()
getDataStoreProviderName
in interface FilesystemFileFilter
public String getDescription()
getDescription
in interface FilesystemFileFilter
public DataStoreParameters getStoreParameters()
public List<?> getDataStoreProviderNames()
DataServerExplorer
getDataStoreProviderNames
in interface DataServerExplorer
public String getProviderName()
DataServerExplorer
getProviderName
in interface DataServerExplorer
public DataServerExplorerProviderServices getServerExplorerProviderServices()
getServerExplorerProviderServices
in interface DataServerExplorerProvider
public boolean canCreate()
canCreate
in interface FilesystemServerExplorerProvider
public boolean canCreate(NewDataStoreParameters parameters)
canCreate
in interface FilesystemServerExplorerProvider
public void create(NewDataStoreParameters parameters, boolean overwrite) throws CreateException
create
in interface FilesystemServerExplorerProvider
CreateException
public NewDataStoreParameters getCreateParameters() throws DataException
getCreateParameters
in interface FilesystemServerExplorerProvider
DataException
public void initialize(FilesystemServerExplorerProviderServices serverExplorer)
initialize
in interface FilesystemServerExplorerProvider
public boolean accept(File pathname)
accept
in interface FileFilter
public void remove(DataStoreParameters parameters) throws RemoveException
DataServerExplorer
remove
in interface DataServerExplorer
remove
in interface FilesystemServerExplorerProvider
RemoveException
public boolean add(String provider, NewDataStoreParameters parameters, boolean overwrite) throws DataException
DataServerExplorer
add
in interface DataServerExplorer
parameters
- , an instance of DataStoreParameters from
DataServerExplorer.getAddParameters(String)
that
describes the new DataStore.overwrite
- if the store already existsDataException
public boolean canAdd()
DataServerExplorer
canAdd
in interface DataServerExplorer
public boolean canAdd(String storeName) throws DataException
DataServerExplorer
canAdd
in interface DataServerExplorer
storeName
- store name.DataException
public NewDataStoreParameters getAddParameters(String storeName) throws DataException
DataServerExplorer
getAddParameters
in interface DataServerExplorer
DataException
public DataStoreParameters getParameters(File file) throws DataException
file
- DataException
public DataServerExplorerParameters getParameters()
DataServerExplorer
getParameters
in interface DataServerExplorer
public List<?> list() throws DataException
DataServerExplorer
list
in interface DataServerExplorer
DataException
public List<?> list(int mode) throws DataException
DataServerExplorer
list
in interface DataServerExplorer
mode
- , filter store from a type: DataServerExplorer.MODE_ALL
,
DataServerExplorer.MODE_FEATURE
, #MODE_FEATURE_GEOMETRY
,
DataServerExplorer.MODE_RASTER
DataException
public void dispose()
Disposable
NOTE:After calling this method, the object may not be usable anymore.
dispose
in interface Disposable
public int getMode()
getMode
in interface FilesystemServerExplorerProvider
getMode
in class AbstractFilesystemServerExplorerProvider
public File getResourcePath(DataStore dataStore, String resourceName) throws DataException
DataServerExplorer
getResourcePath
in interface DataServerExplorer
DataException