Statistics
| Revision:

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 24496 jmvivo
package org.gvsig.fmap.dal;
2 19399 vcaballero
3 23894 jjdelcerro
import java.util.List;
4
5 24496 jmvivo
import org.gvsig.fmap.dal.exceptions.DataException;
6 23754 jjdelcerro
7 24366 jiyarza
/**
8 24384 jiyarza
 * DataExplorer is an abstraction for any type of data server. It allows connecting
9
 * to the server and browsing its contents.
10 24366 jiyarza
 *
11 24384 jiyarza
 * More specifically, this interface provides a list of the available data stores
12
 * in a server.
13 24366 jiyarza
 */
14 23894 jjdelcerro
public interface DataExplorer {
15 19399 vcaballero
16 24366 jiyarza
        /**
17
         * Returns the DataExplorer's name
18
         *
19
         * @return String containing this DataExplorer's name
20
         */
21 19399 vcaballero
        public String getName();
22 24366 jiyarza
23
        /**
24 24384 jiyarza
         * Indicates whether this DataExplorer can create a new DataStore in the server.
25 24366 jiyarza
         *
26
         * @return true if this DataExplorer can be created or false otherwise.
27
         */
28 19672 vcaballero
        public boolean canCreate();
29
30 24366 jiyarza
        /**
31 24384 jiyarza
         * Provides a list of available stores in the server.
32 24366 jiyarza
         *
33
         * @return list of DataStoreParameters
34
         *
35
         * @throws DataException
36
         */
37
        public List list() throws DataException;
38 20050 jmvivo
39 24366 jiyarza
        /**
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 24017 jjdelcerro
        public boolean add(DataStoreParameters parameters)
49
                        throws DataException;
50 20050 jmvivo
51 24366 jiyarza
        /**
52 24384 jiyarza
         * 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 24366 jiyarza
         *
56 24384 jiyarza
         * @param
57
         *                 parameters
58 24366 jiyarza
         * @throws DataException
59
         */
60 24017 jjdelcerro
        void remove(DataStoreParameters parameters) throws DataException;
61 23894 jjdelcerro
62 24366 jiyarza
        /**
63 24384 jiyarza
         * Given the store's name, returns its parameters for creation.
64 24366 jiyarza
         *
65
         * @param storeName
66
         * @return
67
         */
68 24017 jjdelcerro
        public DataStoreParameters getCreationParameters(String storeName);
69
70 24366 jiyarza
        /**
71 24384 jiyarza
         * Frees the resources used by this DataExplorer.
72 24366 jiyarza
         *
73
         * @throws DataException
74
         */
75 20742 jmvivo
        public void dispose() throws DataException;
76
77 24366 jiyarza
        /**
78 24384 jiyarza
         * Returns this DataExplorer parameters
79 24366 jiyarza
         *
80 24384 jiyarza
         * @return an instance of DataExplorerParameters containing this DataExplorer parameters.
81 24366 jiyarza
         */
82 23339 jmvivo
        public DataExplorerParameters getParameters();
83
84 19399 vcaballero
}