svn-gvsig-desktop / tags / v2_0_0_Build_2020 / libraries / libFMap_dal / src / org / gvsig / fmap / dal / spi / DataStoreProvider.java @ 33842
History | View | Annotate | Download (2.96 KB)
1 | 24496 | jmvivo | package org.gvsig.fmap.dal.spi; |
---|---|---|---|
2 | 23820 | jjdelcerro | |
3 | import java.util.Iterator; |
||
4 | |||
5 | 24874 | jmvivo | import org.gvsig.fmap.dal.DataServerExplorer; |
6 | 24505 | jmvivo | 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 | 27723 | jmvivo | import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
11 | 31022 | cordinyana | import org.gvsig.fmap.dal.resource.Resource; |
12 | import org.gvsig.fmap.dal.resource.spi.ResourceProvider; |
||
13 | 31284 | cordinyana | import org.gvsig.tools.dispose.Disposable; |
14 | 26820 | jmvivo | import org.gvsig.tools.dynobject.DynObject; |
15 | 23820 | jjdelcerro | |
16 | 29391 | jmvivo | /**
|
17 | * Base interface for all data providers
|
||
18 | *
|
||
19 | * @author jmvivo
|
||
20 | *
|
||
21 | */
|
||
22 | 31284 | cordinyana | public interface DataStoreProvider extends DynObject, Disposable { |
23 | 23820 | jjdelcerro | |
24 | 29289 | jmvivo | /**
|
25 | * Retruns an {@link java.util.Iterator} of SubStores from this store. it
|
||
26 | * this hasn't SubStores returns <code>null</code>.
|
||
27 | 29391 | jmvivo | *
|
28 | 29289 | jmvivo | * @return SubStores iterator
|
29 | */
|
||
30 | 23820 | jjdelcerro | public abstract Iterator getChilds(); |
31 | |||
32 | 29289 | jmvivo | /**
|
33 | * Create a {@link DataServerExplorer} from the same source that this store.
|
||
34 | *
|
||
35 | * @return ServerExplorer
|
||
36 | * @throws ReadException
|
||
37 | * @throws ValidateDataParametersException
|
||
38 | */
|
||
39 | 27723 | jmvivo | public abstract DataServerExplorer getExplorer() throws ReadException, |
40 | ValidateDataParametersException; |
||
41 | 23820 | jjdelcerro | |
42 | 29289 | jmvivo | /**
|
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 | 23820 | jjdelcerro | public abstract void open() throws OpenException; |
49 | |||
50 | 29289 | jmvivo | /**
|
51 | * Request to close de source
|
||
52 | *
|
||
53 | * @throws CloseException
|
||
54 | */
|
||
55 | 23820 | jjdelcerro | public abstract void close() throws CloseException; |
56 | |||
57 | 29289 | jmvivo | /**
|
58 | 31022 | cordinyana | * 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 | 29289 | jmvivo | * Force to reload information of Store
|
66 | *
|
||
67 | * @throws OpenException
|
||
68 | * @throws InitializeException
|
||
69 | */
|
||
70 | 23820 | jjdelcerro | public abstract void refresh() throws OpenException, InitializeException; |
71 | |||
72 | 29289 | jmvivo | /**
|
73 | * Returns the unique identifier of the Store
|
||
74 | *
|
||
75 | * FIXME add examples
|
||
76 | *
|
||
77 | * @return
|
||
78 | */
|
||
79 | 26837 | jmvivo | public abstract Object getSourceId(); |
80 | |||
81 | 33717 | jjdelcerro | /**
|
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 | 23820 | jjdelcerro | } |