root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / DataExplorer.java @ 24496
History | View | Annotate | Download (2.13 KB)
1 |
package org.gvsig.fmap.dal; |
---|---|
2 |
|
3 |
import java.util.List; |
4 |
|
5 |
import org.gvsig.fmap.dal.exceptions.DataException; |
6 |
|
7 |
/**
|
8 |
* DataExplorer is an abstraction for any type of data server. It allows connecting
|
9 |
* to the server and browsing its contents.
|
10 |
*
|
11 |
* More specifically, this interface provides a list of the available data stores
|
12 |
* in a server.
|
13 |
*/
|
14 |
public interface DataExplorer { |
15 |
|
16 |
/**
|
17 |
* Returns the DataExplorer's name
|
18 |
*
|
19 |
* @return String containing this DataExplorer's name
|
20 |
*/
|
21 |
public String getName(); |
22 |
|
23 |
/**
|
24 |
* Indicates whether this DataExplorer can create a new DataStore in the server.
|
25 |
*
|
26 |
* @return true if this DataExplorer can be created or false otherwise.
|
27 |
*/
|
28 |
public boolean canCreate(); |
29 |
|
30 |
/**
|
31 |
* Provides a list of available stores in the server.
|
32 |
*
|
33 |
* @return list of DataStoreParameters
|
34 |
*
|
35 |
* @throws DataException
|
36 |
*/
|
37 |
public List list() throws DataException; |
38 |
|
39 |
/**
|
40 |
* Adds a DataStoreParameters to this DataExplorer.
|
41 |
*
|
42 |
* @param
|
43 |
* parameters, an instance of DataStoreParameters.
|
44 |
* @return true if the DataStoreParameters were successfully added, false otherwise.
|
45 |
*
|
46 |
* @throws DataException
|
47 |
*/
|
48 |
public boolean add(DataStoreParameters parameters) |
49 |
throws DataException;
|
50 |
|
51 |
/**
|
52 |
* Removes a store from the server given its DataStoreParameters.
|
53 |
* If the store is a file then this method deletes the file, if it is a table
|
54 |
* in a database then this method drops the table, and so on.
|
55 |
*
|
56 |
* @param
|
57 |
* parameters
|
58 |
* @throws DataException
|
59 |
*/
|
60 |
void remove(DataStoreParameters parameters) throws DataException; |
61 |
|
62 |
/**
|
63 |
* Given the store's name, returns its parameters for creation.
|
64 |
*
|
65 |
* @param storeName
|
66 |
* @return
|
67 |
*/
|
68 |
public DataStoreParameters getCreationParameters(String storeName); |
69 |
|
70 |
/**
|
71 |
* Frees the resources used by this DataExplorer.
|
72 |
*
|
73 |
* @throws DataException
|
74 |
*/
|
75 |
public void dispose() throws DataException; |
76 |
|
77 |
/**
|
78 |
* Returns this DataExplorer parameters
|
79 |
*
|
80 |
* @return an instance of DataExplorerParameters containing this DataExplorer parameters.
|
81 |
*/
|
82 |
public DataExplorerParameters getParameters();
|
83 |
|
84 |
} |