public class DefaultFilesystemServerExplorer extends AbstractDataServerExplorer implements FilesystemServerExplorerProviderServices, FilesystemFileFilter
NAME
MODE_ALL, MODE_FEATURE, MODE_GEOMETRY, MODE_RASTER
Constructor and Description |
---|
DefaultFilesystemServerExplorer(FilesystemServerExplorerParameters parameters,
DataServerExplorerProviderServices services) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File pathname) |
boolean |
add(String providerName,
NewDataStoreParameters ndsp,
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.
|
DataStoreParameters |
createStoreParameters(File file) |
DataStoreParameters |
createStoreParameters(File file,
String providerName) |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
DataStoreParameters |
get(String name) |
NewDataStoreParameters |
getAddParameters(File file) |
NewDataStoreParameters |
getAddParameters(String storeName)
Given the store's name, returns its parameters for creation.
|
File |
getCurrentPath() |
String |
getDataStoreProviderName() |
List |
getDataStoreProviderNames()
Return the list of provider names that this server allow.
|
String |
getDescription() |
FilesystemFileFilter |
getFilter(int mode,
String description) |
Iterator |
getFilters() |
Iterator |
getFilters(int mode) |
FilesystemFileFilter |
getGenericFilter() |
DataStoreParameters |
getParametersFor(File file,
String providerName,
boolean checksExist) |
String |
getProviderName()
Returns the DataServerExplorer's name
|
String |
getProviderName(File file) |
List |
getProviderNameList(File file) |
List |
getProviders() |
List |
getProviders(int mode) |
File |
getResourcePath(DataStore dataStore,
String resourceName)
Return the file resource associated to this name and store.
|
File |
getRoot() |
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.
|
DataStore |
open(File file) |
void |
remove(DataStoreParameters dsp)
Removes a store from the server given its DataStoreParameters.
|
void |
setCurrentPath(File path) |
getParameters, getServerExplorerProviderServices
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerExplorerProviderServices
getParameters
dispose
public DefaultFilesystemServerExplorer(FilesystemServerExplorerParameters parameters, DataServerExplorerProviderServices services) throws InitializeException
InitializeException
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class AbstractDataServerExplorer
BaseException
AbstractDisposable.dispose()
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 List list() throws DataException
DataServerExplorer
list
in interface DataServerExplorer
DataException
public void setCurrentPath(File path) throws FileNotFoundException
setCurrentPath
in interface FilesystemServerExplorer
FileNotFoundException
public File getCurrentPath()
getCurrentPath
in interface FilesystemServerExplorer
public File getRoot()
getRoot
in interface FilesystemServerExplorer
public void remove(DataStoreParameters dsp) throws RemoveException
DataServerExplorer
remove
in interface DataServerExplorer
RemoveException
public boolean add(String providerName, NewDataStoreParameters ndsp, boolean overwrite) throws DataException
DataServerExplorer
add
in interface DataServerExplorer
ndsp
- , 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 String getProviderName()
DataServerExplorer
getProviderName
in interface DataServerExplorer
public NewDataStoreParameters getAddParameters(String storeName) throws DataException
DataServerExplorer
getAddParameters
in interface DataServerExplorer
DataException
public boolean canAdd(String storeName) throws DataException
DataServerExplorer
canAdd
in interface DataServerExplorer
storeName
- store name.DataException
public DataStoreParameters createStoreParameters(File file, String providerName) throws DataException
createStoreParameters
in interface FilesystemServerExplorer
DataException
public DataStoreParameters createStoreParameters(File file) throws DataException
createStoreParameters
in interface FilesystemServerExplorer
DataException
public DataStoreParameters getParametersFor(File file, String providerName, boolean checksExist) throws DataException
DataException
public List getProviderNameList(File file)
getProviderNameList
in interface FilesystemServerExplorer
public String getProviderName(File file)
getProviderName
in interface FilesystemServerExplorer
public List getDataStoreProviderNames()
DataServerExplorer
getDataStoreProviderNames
in interface DataServerExplorer
public List getProviders()
public List getProviders(int mode)
public Iterator getFilters(int mode)
getFilters
in interface FilesystemServerExplorer
public Iterator getFilters()
getFilters
in interface FilesystemServerExplorer
public FilesystemFileFilter getFilter(int mode, String description)
getFilter
in interface FilesystemServerExplorer
public FilesystemFileFilter getGenericFilter()
getGenericFilter
in interface FilesystemServerExplorer
public String getDataStoreProviderName()
getDataStoreProviderName
in interface FilesystemFileFilter
public String getDescription()
getDescription
in interface FilesystemFileFilter
public boolean accept(File pathname)
accept
in interface FileFilter
public DataStore open(File file) throws DataException, ValidateDataParametersException
public NewDataStoreParameters getAddParameters(File file) throws DataException
getAddParameters
in interface FilesystemServerExplorer
DataException
public File getResourcePath(DataStore dataStore, String resourceName) throws DataException
DataServerExplorer
getResourcePath
in interface DataServerExplorer
getResourcePath
in class AbstractDataServerExplorer
DataException
public DataStoreParameters get(String name) throws DataException
get
in interface DataServerExplorer
get
in class AbstractDataServerExplorer
DataException