Revision 24017 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/DataManager.java
DataManager.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data; |
2 | 2 |
|
3 |
import java.util.List; |
|
4 |
|
|
3 | 5 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
4 | 6 |
import org.gvsig.fmap.data.exceptions.ProviderNotRegisteredException; |
5 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
6 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
7 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
8 |
import org.gvsig.fmap.data.feature.spi.index.FeatureIndexProviderServices; |
|
9 | 7 |
import org.gvsig.tools.evaluator.Evaluator; |
10 |
import org.gvsig.tools.operations.Operation; |
|
11 | 8 |
|
12 | 9 |
import com.iver.utiles.XMLEntity; |
13 | 10 |
|
14 | 11 |
public interface DataManager { |
15 | 12 |
|
13 |
|
|
14 |
public List getDataStoreProviders(); |
|
15 |
|
|
16 |
public List getDataExplorerProviders(); |
|
17 |
|
|
16 | 18 |
/** |
19 |
* Returns an array of index provider names that are compatible with the |
|
20 |
* given data type. |
|
17 | 21 |
* |
18 |
* @param String |
|
19 |
* name |
|
20 |
* @param Class |
|
21 |
* dataStoreClass |
|
22 |
* @param Class |
|
23 |
* parametersClass |
|
22 |
* @param dataType |
|
23 |
* @return list of strings with the names of compatible index providers |
|
24 | 24 |
*/ |
25 |
public List getDataIndexProviders(int dataType); |
|
25 | 26 |
|
26 |
public void registerDefaultEvaluator(Class evaluator); |
|
27 | 27 |
|
28 |
public Evaluator createExpresion(String expresion); |
|
29 | 28 |
|
30 |
public void registerDataStoreProvider(String name, Class dataStoreProviderClass, |
|
31 |
Class parametersClass); |
|
32 | 29 |
|
33 | 30 |
/** |
34 |
* Levanta una instancia de los parametros solicitados inicializa el nombre |
|
35 |
* en la instancia y la devuelve. |
|
36 |
* |
|
37 |
* @throws InitializeException |
|
38 |
* TODO |
|
39 |
**/ |
|
40 |
/** |
|
41 | 31 |
* Start a instance of the solicited parameters inicialize the instance name |
42 | 32 |
* and returns it. |
43 | 33 |
* |
... | ... | |
55 | 45 |
throws InitializeException, ProviderNotRegisteredException; |
56 | 46 |
|
57 | 47 |
/** |
58 |
* Levanta la instancia del datasource, |
|
59 |
* levanta una instancia del driver que precisa el datasource |
|
60 |
* y por ultimo invoca al metodo init del datasource. |
|
61 |
* @throws InitializeException |
|
62 |
**/ |
|
63 |
/** |
|
64 |
* Start a instance of datasource, start a instance of driver that |
|
65 |
* datasource needs at ends invoke datasource init method |
|
48 |
* Start a instance of data store, start a instance of provider that data |
|
49 |
* store needs at ends initialize the data store. |
|
66 | 50 |
* |
67 | 51 |
* @params DataStoreParameters parameters |
68 | 52 |
* @throws InitializeException |
... | ... | |
75 | 59 |
throws InitializeException, ProviderNotRegisteredException; |
76 | 60 |
|
77 | 61 |
/** |
78 |
* Collection of generic properties of a DataStore type which can access |
|
79 |
* without create a DataStore/Driver. |
|
80 |
* |
|
81 |
* For example for "DriverDataSource.shp" could have the size of the data |
|
82 |
* identification. |
|
83 |
* |
|
84 |
* In "DriverDataSource.postgres" could add information about availables |
|
85 |
* tables or things like that. We`ll have to see what GeoDB needs and where |
|
86 |
* it can get. |
|
87 |
* |
|
88 |
* We have to think it good. |
|
89 |
*/ |
|
90 |
/** |
|
91 |
* @param String name |
|
92 |
* @param Class dataSourceClass |
|
93 |
* @param Class parametersClass |
|
94 |
*/ |
|
95 |
|
|
96 |
public void registerDataExplorer(String name, |
|
97 |
Class dataSourceClass, Class parametersClass); |
|
98 |
|
|
99 |
/** |
|
100 |
* Levanta una instancia de los parametros solicitados |
|
101 |
* inicializa el nombre en la instancia |
|
102 |
* y la devuelve. |
|
103 |
* @throws InitializeException TODO |
|
104 |
**/ |
|
105 |
/** |
|
106 | 62 |
* Start a instance with solicited parameters starts name in the instance |
107 | 63 |
* and returns it. |
108 | 64 |
* |
109 | 65 |
* @param String |
110 | 66 |
* name |
111 | 67 |
* @throws InitializeException |
112 |
* TODO |
|
113 | 68 |
* @throws ProviderNotRegisteredException |
114 | 69 |
**/ |
115 | 70 |
|
... | ... | |
117 | 72 |
String name) |
118 | 73 |
throws InitializeException, ProviderNotRegisteredException; |
119 | 74 |
|
120 |
/** |
|
121 |
* |
|
122 |
* @param DataExplorerParameters |
|
123 |
* parameters |
|
124 |
* @return DataExplorer |
|
125 |
* @throws InitializeException |
|
126 |
* @throws ProviderNotRegisteredException |
|
127 |
*/ |
|
128 |
|
|
129 | 75 |
public DataExplorerParameters createDataExplorerParameters( |
130 | 76 |
XMLEntity xmlEntity) throws InitializeException, |
131 | 77 |
ProviderNotRegisteredException; |
132 | 78 |
|
79 |
|
|
80 |
|
|
133 | 81 |
public DataExplorer createDataExplorer( |
134 | 82 |
DataExplorerParameters parameters) |
135 | 83 |
throws InitializeException, ProviderNotRegisteredException; |
136 | 84 |
|
137 |
/** |
|
138 |
* |
|
139 |
* @param String |
|
140 |
* name |
|
141 |
* @return RegisterInfo |
|
142 |
* @throws ProviderNotRegisteredException |
|
143 |
*/ |
|
144 |
|
|
145 | 85 |
public DataExplorer createDataExplorer(XMLEntity xmlEntity) |
146 | 86 |
throws InitializeException, ProviderNotRegisteredException; |
147 | 87 |
|
148 |
/** |
|
149 |
* |
|
150 |
* @param String |
|
151 |
* storeName |
|
152 |
* @param String |
|
153 |
* operationName |
|
154 |
* @param DataStoreOperation |
|
155 |
* operation |
|
156 |
* @return int index |
|
157 |
* @throws IllegalArgumentException |
|
158 |
*/ |
|
159 | 88 |
|
160 |
public int registerDataStoreOperation(String storeName, |
|
161 |
String operationName, Operation operation); |
|
162 |
|
|
163 | 89 |
/** |
164 |
* |
|
165 |
* @return String[] TYPE_STORE |
|
166 |
*/ |
|
167 |
|
|
168 |
public String[] getRegistersStores(); |
|
169 |
|
|
170 |
/** |
|
171 |
* |
|
172 |
* @return String[] TYPE_EXPLORER |
|
173 |
*/ |
|
174 |
|
|
175 |
public String[] getRegistersExplorers(); |
|
176 |
|
|
177 |
/** |
|
178 |
* Returns an array of index provider names that are compatible with |
|
179 |
* the given data type. |
|
180 |
* |
|
181 |
* @param dataType |
|
182 |
* @return list of strings with the names of compatible index providers |
|
183 |
*/ |
|
184 |
public String[] getDataIndexProviders(int dataType); |
|
185 |
|
|
186 |
/** |
|
187 |
* Registers a new DataIndexProvider |
|
188 |
* @param name identifier |
|
189 |
* @param description a brief description of the provider |
|
190 |
* @param clazz implementation class |
|
191 |
*/ |
|
192 |
public void registerDataIndexProvider(String name, String description, Class clazz); |
|
193 |
|
|
194 |
/** |
|
195 |
* Returns a DataIndexProvider compatible with the attribute data type. |
|
196 |
* @param store associated FeatureStore |
|
197 |
* @param type associated FeatureType |
|
198 |
* @param attr associated FeatureAttributeDescriptor |
|
199 |
* @param providerNames array of strings containing one or more preferred providers |
|
200 |
* @return empty DataIndexProvider, initialized and ready to use |
|
201 |
*/ |
|
202 |
public FeatureIndexProviderServices createDataIndexProvider(FeatureStore store, FeatureType type, |
|
203 |
FeatureAttributeDescriptor attr, String[] providerNames) throws InitializeException, ProviderNotRegisteredException; |
|
204 |
|
|
205 |
/** |
|
206 |
* Returns the default DataIndexProvider compatible with the attribute data type. |
|
207 |
* @param store associated FeatureStore |
|
208 |
* @param type associated FeatureType |
|
209 |
* @param attr associated FeatureAttributeDescriptor |
|
210 |
* @return |
|
211 |
*/ |
|
212 |
public FeatureIndexProviderServices createDataIndexProvider(FeatureStore store, FeatureType type, |
|
213 |
FeatureAttributeDescriptor attr) throws InitializeException, ProviderNotRegisteredException; |
|
214 |
|
|
215 |
/** |
|
216 | 90 |
* Sets the default DataIndexProvider for the given data type. |
217 | 91 |
* @param dataType one of the data types defined in the api package |
218 | 92 |
* @param name Provider's name |
219 | 93 |
*/ |
220 | 94 |
public void setDefaultDataIndexProviderName(int dataType, String name); |
221 |
|
|
95 |
|
|
222 | 96 |
/** |
223 | 97 |
* Returns the default DataIndexProvider name, given a data type. |
224 | 98 |
* @param dataType |
225 | 99 |
* @return |
226 | 100 |
*/ |
227 | 101 |
public String getDefaultDataIndexProviderName(int dataType); |
228 |
|
|
102 |
|
|
229 | 103 |
/** |
230 | 104 |
* Returns the default DAL's temporary directory |
231 | 105 |
* @return Temporary directory name |
232 | 106 |
*/ |
233 |
public String getTemporaryDirectory();
|
|
107 |
public String getTemporaryDirectory(); |
|
234 | 108 |
|
109 |
|
|
110 |
public void registerDefaultEvaluator(Class evaluator); |
|
111 |
|
|
112 |
public Evaluator createExpresion(String expresion); |
|
113 |
|
|
114 |
|
|
235 | 115 |
} |
Also available in: Unified diff