Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / spi / DataStoreProvider.java @ 36202

History | View | Annotate | Download (2.99 KB)

1
package org.gvsig.fmap.dal.spi;
2

    
3
import java.util.Iterator;
4

    
5
import org.gvsig.fmap.dal.DataServerExplorer;
6
import org.gvsig.fmap.dal.exception.CloseException;
7
import org.gvsig.fmap.dal.exception.InitializeException;
8
import org.gvsig.fmap.dal.exception.OpenException;
9
import org.gvsig.fmap.dal.exception.ReadException;
10
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
11
import org.gvsig.fmap.dal.resource.Resource;
12
import org.gvsig.fmap.dal.resource.spi.ResourceProvider;
13
import org.gvsig.tools.dispose.Disposable;
14
import org.gvsig.tools.dynobject.DynObject;
15

    
16
/**
17
 * Base interface for all data providers
18
 * 
19
 * @author jmvivo
20
 *
21
 */
22
public interface DataStoreProvider extends org.gvsig.fmap.dal.DataStoreProvider, DynObject, Disposable {
23

    
24
        /**
25
         * Retruns an {@link java.util.Iterator} of SubStores from this store. it
26
         * this hasn't SubStores returns <code>null</code>.
27
         *
28
         * @return SubStores iterator
29
         */
30
        public abstract Iterator getChilds();
31

    
32
        /**
33
         * Create a {@link DataServerExplorer} from the same source that this store.
34
         *
35
         * @return ServerExplorer
36
         * @throws ReadException
37
         * @throws ValidateDataParametersException
38
         */
39
        public abstract DataServerExplorer getExplorer() throws ReadException,
40
                        ValidateDataParametersException;
41

    
42
        /**
43
         * Open store. You must call it before do anything whith store.<br>
44
         * This method can be called repeatly.
45
         *
46
         * @throws OpenException
47
         */
48
        public abstract void open() throws OpenException;
49

    
50
        /**
51
         * Request to close de source
52
         *
53
         * @throws CloseException
54
         */
55
        public abstract void close() throws CloseException;
56

    
57
        /**
58
         * Returns the {@link Resource} from where the data is being loaded.
59
         * 
60
         * @return the data {@link Resource}
61
         */
62
        ResourceProvider getResource();
63

    
64
        /**
65
         * Force to reload information of Store
66
         *
67
         * @throws OpenException
68
         * @throws InitializeException
69
         */
70
        public abstract void refresh() throws OpenException, InitializeException;
71

    
72
        /**
73
         * Returns the unique identifier of the Store
74
         *
75
         * FIXME add examples
76
         *
77
         * @return
78
         */
79
        public abstract Object getSourceId();
80

    
81
        /**
82
         * Return the name of the provider.
83
         * Examples: dbf, shp, jdbc, postgresql, wfs, gml
84
         * 
85
         * @return
86
         */
87
        public String getProviderName();
88

    
89
        /**
90
         * Returns the name associated to the provider.
91
         * This name is provided for informational purposes only.
92
         * Explamples:
93
         * 
94
         * In a dbf the filename without the path
95
         * 
96
         * In a DDBB table the name of the table
97
         * 
98
         * In a WFS layer the name of the layer.
99
         *
100
         * @return String containing this store's name.
101
         */
102
        public String getName();
103
        
104
        /**
105
         * Returns a more descriptive name for the provider that getName.
106
         * This name is provided for informational purposes only.
107
         * Explamples:
108
         * 
109
         * In a file based store may return the full name of the filename, path and filename.
110
         * 
111
         * In a data base based store may return "server:dbname:tablename"
112
         * 
113
         * In a WFS layer based store may return "server:layername"
114
         * 
115
         * @return String Containing the full name of the store
116
         */
117
        public String getFullName();
118
        
119
}