Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / spi / DataStoreProvider.java @ 29391

History | View | Annotate | Download (1.83 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.tools.dynobject.DynObject;
12

    
13
/**
14
 * Base interface for all data providers
15
 * 
16
 * @author jmvivo
17
 *
18
 */
19
public interface DataStoreProvider extends DynObject {
20

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

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

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

    
47
        /**
48
         * Request to close de source
49
         *
50
         * @throws CloseException
51
         */
52
        public abstract void close() throws CloseException;
53

    
54
        /**
55
         * Force to reload information of Store
56
         *
57
         * @throws OpenException
58
         * @throws InitializeException
59
         */
60
        public abstract void refresh() throws OpenException, InitializeException;
61

    
62
        /**
63
         * Prepares store for be removed from memory
64
         *
65
         * @throws CloseException
66
         */
67
        public abstract void dispose() throws CloseException;
68

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

    
78
}