Revision 43020 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/DataManager.java
DataManager.java | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* Copyright (C) 2007-2013 gvSIG Association. |
5 | 5 |
* |
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License
|
|
8 |
* as published by the Free Software Foundation; either version 3
|
|
9 |
* of the License, or (at your option) any later version.
|
|
6 |
* This program is free software; you can redistribute it and/or modify it under
|
|
7 |
* the terms of the GNU General Public License as published by the Free Software
|
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later
|
|
9 |
* version. |
|
10 | 10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
14 |
* details. |
|
15 | 15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
20 | 19 |
* |
21 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
|
20 |
* For any additional information, do not hesitate to contact us at info AT
|
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
23 | 22 |
*/ |
24 | 23 |
package org.gvsig.fmap.dal; |
25 | 24 |
|
25 |
import java.io.File; |
|
26 | 26 |
import java.util.List; |
27 | 27 |
|
28 | 28 |
import org.gvsig.fmap.dal.exception.InitializeException; |
... | ... | |
30 | 30 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
31 | 31 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
32 | 32 |
import org.gvsig.fmap.dal.feature.Feature; |
33 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
34 |
import org.gvsig.fmap.dal.feature.FeatureAttributeGetter; |
|
35 | 33 |
import org.gvsig.fmap.dal.feature.FeatureIndex; |
36 | 34 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
37 | 35 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
38 | 36 |
import org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper; |
39 | 37 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
38 |
import org.gvsig.tools.dataTypes.DataType; |
|
40 | 39 |
import org.gvsig.tools.dynobject.DynObject; |
41 | 40 |
import org.gvsig.tools.dynobject.DynStruct; |
42 | 41 |
import org.gvsig.tools.dynobject.Tags; |
43 | 42 |
import org.gvsig.tools.evaluator.Evaluator; |
44 | 43 |
import org.gvsig.tools.exception.BaseException; |
44 |
import org.gvsig.tools.service.spi.Services; |
|
45 | 45 |
|
46 | 46 |
/** |
47 |
* There are two top level management roles within DAL: data access and resource management. |
|
47 |
* There are two top level management roles within DAL: data access and resource |
|
48 |
* management. |
|
48 | 49 |
* |
49 |
* This class is responsible of the data access management role. It provides ways
|
|
50 |
* for registering and instantiating {@link DataServerExplorer}(s), {@link DataStore}(s),
|
|
51 |
* {@link Evaluator}(s) and {@link FeatureIndex}(es). |
|
50 |
* This class is responsible of the data access management role. It provides |
|
51 |
* ways for registering and instantiating {@link DataServerExplorer}(s),
|
|
52 |
* {@link DataStore}(s), {@link Evaluator}(s) and {@link FeatureIndex}(es).
|
|
52 | 53 |
* |
53 | 54 |
* @see ResourceManager |
54 | 55 |
* |
55 | 56 |
*/ |
57 |
public interface DataManager extends Services { |
|
56 | 58 |
|
57 |
public interface DataManager { |
|
58 |
public static final String CREATE_STORE_AUTHORIZATION = "dal-create-store"; |
|
59 |
public static final String READ_STORE_AUTHORIZATION = "dal-read-store"; |
|
60 |
public static final String WRITE_STORE_AUTHORIZATION = "dal-write-store"; |
|
59 |
public static final String CREATE_STORE_AUTHORIZATION = "dal-create-store"; |
|
60 |
public static final String READ_STORE_AUTHORIZATION = "dal-read-store"; |
|
61 |
public static final String WRITE_STORE_AUTHORIZATION = "dal-write-store"; |
|
61 | 62 |
|
62 |
/**
|
|
63 |
* Returns the default DAL's temporary directory
|
|
64 |
*
|
|
65 |
* @return Temporary directory name
|
|
66 |
*/
|
|
67 |
public String getTemporaryDirectory();
|
|
63 |
/** |
|
64 |
* Returns the default DAL's temporary directory
|
|
65 |
*
|
|
66 |
* @return Temporary directory name
|
|
67 |
*/
|
|
68 |
public String getTemporaryDirectory();
|
|
68 | 69 |
|
69 |
/* |
|
70 |
* ==================================================================== |
|
71 |
* |
|
72 |
* Store related services |
|
73 |
*/ |
|
70 |
/* |
|
71 |
* ==================================================================== |
|
72 |
* |
|
73 |
* Store related services |
|
74 |
*/ |
|
75 |
/** |
|
76 |
* Creates, initializes and returns an instance of DataStoreParameters given |
|
77 |
* the name with which their provider is registered. |
|
78 |
* |
|
79 |
* @param name provider name |
|
80 |
* @return the data store parameters |
|
81 |
* |
|
82 |
* @throws ProviderNotRegisteredException if the memory provider is not |
|
83 |
* registered |
|
84 |
* @throws InitializeException if there is an error initializing the |
|
85 |
* parameters for the memory provider |
|
86 |
* |
|
87 |
*/ |
|
88 |
public DataStoreParameters createStoreParameters(String name) |
|
89 |
throws InitializeException, ProviderNotRegisteredException; |
|
74 | 90 |
|
75 |
/** |
|
76 |
* Creates, initializes and returns an instance of DataStoreParameters given |
|
77 |
* the name with which their provider is registered. |
|
78 |
* |
|
79 |
* @param name provider name |
|
80 |
* @return the data store parameters |
|
81 |
* |
|
82 |
* @throws ProviderNotRegisteredException |
|
83 |
* if the memory provider is not registered |
|
84 |
* @throws InitializeException |
|
85 |
* if there is an error initializing the parameters for the |
|
86 |
* memory provider |
|
87 |
**/ |
|
88 |
public DataStoreParameters createStoreParameters(String name) |
|
89 |
throws InitializeException, ProviderNotRegisteredException; |
|
90 |
|
|
91 |
/** |
|
92 |
* Creates, initializes and fill an instance of DataStoreParameters from the |
|
93 |
* tags of the DynStruct passed as parameter. |
|
94 |
* |
|
95 |
* @param struct structure from which tags were created ths parameters. |
|
96 |
* @return the data store parameters |
|
97 |
* |
|
98 |
* @throws ProviderNotRegisteredException if the memory provider is not |
|
99 |
* registered |
|
100 |
* @throws InitializeException if there is an error initializing the |
|
101 |
* parameters for the memory provider |
|
102 |
* |
|
103 |
*/ |
|
104 |
public DataStoreParameters createStoreParameters(DynStruct struct) |
|
105 |
throws InitializeException, ProviderNotRegisteredException; |
|
91 | 106 |
|
92 |
/** |
|
93 |
* Creates, initializes and fill an instance of DataStoreParameters from |
|
94 |
* the tags of the DynStruct passed as parameter. |
|
95 |
* |
|
96 |
* @param struct structure from which tags were created ths parameters. |
|
97 |
* @return the data store parameters |
|
98 |
* |
|
99 |
* @throws ProviderNotRegisteredException |
|
100 |
* if the memory provider is not registered |
|
101 |
* @throws InitializeException |
|
102 |
* if there is an error initializing the parameters for the |
|
103 |
* memory provider |
|
104 |
**/ |
|
105 |
public DataStoreParameters createStoreParameters(DynStruct struct) |
|
106 |
throws InitializeException, ProviderNotRegisteredException; |
|
107 |
public DataStoreParameters createStoreParameters(Tags tags) throws InitializeException, ProviderNotRegisteredException; |
|
107 | 108 |
|
108 |
public DataStoreParameters createStoreParameters(Tags tags) throws InitializeException, ProviderNotRegisteredException; |
|
109 |
|
|
110 |
/** |
|
111 |
* Creates, initializes and returns an instance of NewDataStoreParameters |
|
112 |
* given the name with which their provider is registered. |
|
113 |
* |
|
114 |
* @param explorer |
|
115 |
* @param provider |
|
116 |
* @return |
|
117 |
* |
|
118 |
* @throws InitializeException |
|
119 |
* @throws ProviderNotRegisteredException |
|
120 |
*/ |
|
121 |
public NewDataStoreParameters createNewStoreParameters(String explorer, String provider) |
|
122 |
throws InitializeException, ProviderNotRegisteredException; |
|
109 |
/** |
|
110 |
* Creates, initializes and returns an instance of NewDataStoreParameters |
|
111 |
* given the name with which their provider is registered. |
|
112 |
* |
|
113 |
* @param explorer |
|
114 |
* @param provider |
|
115 |
* @return |
|
116 |
* |
|
117 |
* @throws InitializeException |
|
118 |
* @throws ProviderNotRegisteredException |
|
119 |
*/ |
|
120 |
public NewDataStoreParameters createNewStoreParameters(String explorer, String provider) |
|
121 |
throws InitializeException, ProviderNotRegisteredException; |
|
123 | 122 |
|
124 |
/** |
|
125 |
* |
|
126 |
* Creates, initializes and returns an instance of DataStore given the |
|
127 |
* DataStoreParameters. |
|
128 |
* |
|
129 |
* @param provider |
|
130 |
* @param parameters |
|
131 |
* parameters used to instantiate and initialize the DataStore |
|
132 |
* @return |
|
133 |
* |
|
134 |
* @throws ProviderNotRegisteredException |
|
135 |
* if the memory provider is not registered |
|
136 |
* @throws InitializeException |
|
137 |
* if there is an error initializing the parameters for the |
|
138 |
* memory provider |
|
139 |
* @throws ValidateDataParametersException |
|
140 |
* if the parameters to open the memory based store are not |
|
141 |
* valid |
|
142 |
*/ |
|
143 |
public DataStore openStore(String provider, DynObject parameters) |
|
144 |
throws InitializeException, ProviderNotRegisteredException, |
|
145 |
ValidateDataParametersException; |
|
123 |
/** |
|
124 |
* |
|
125 |
* Creates, initializes and returns an instance of DataStore given the |
|
126 |
* DataStoreParameters. |
|
127 |
* |
|
128 |
* @param provider |
|
129 |
* @param parameters parameters used to instantiate and initialize the |
|
130 |
* DataStore |
|
131 |
* @return |
|
132 |
* |
|
133 |
* @throws ProviderNotRegisteredException if the memory provider is not |
|
134 |
* registered |
|
135 |
* @throws InitializeException if there is an error initializing the |
|
136 |
* parameters for the memory provider |
|
137 |
* @throws ValidateDataParametersException if the parameters to open the |
|
138 |
* memory based store are not valid |
|
139 |
*/ |
|
140 |
public DataStore openStore(String provider, DynObject parameters) |
|
141 |
throws InitializeException, ProviderNotRegisteredException, |
|
142 |
ValidateDataParametersException; |
|
146 | 143 |
|
147 |
public DataStore openStore(String provider, DataStoreParameters parameters)
|
|
148 |
throws InitializeException, ProviderNotRegisteredException,
|
|
149 |
ValidateDataParametersException;
|
|
144 |
public DataStore openStore(String provider, DataStoreParameters parameters)
|
|
145 |
throws InitializeException, ProviderNotRegisteredException,
|
|
146 |
ValidateDataParametersException;
|
|
150 | 147 |
|
151 |
public DataStore openStore(DynStruct struct)
|
|
152 |
throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException ;
|
|
148 |
public DataStore openStore(DynStruct struct)
|
|
149 |
throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException;
|
|
153 | 150 |
|
154 |
/** |
|
155 |
* @deprecated see openStore |
|
156 |
*/ |
|
157 |
public DataStore createStore(DynObject parameters) |
|
158 |
throws InitializeException, ProviderNotRegisteredException, |
|
159 |
ValidateDataParametersException; |
|
151 |
/** |
|
152 |
* Create a new physical store |
|
153 |
* |
|
154 |
* @param explorer |
|
155 |
* @param provider |
|
156 |
* @param parameters |
|
157 |
* @param overwrite |
|
158 |
* |
|
159 |
* @throws InitializeException |
|
160 |
* @throws ProviderNotRegisteredException |
|
161 |
* @throws ValidateDataParametersException |
|
162 |
*/ |
|
163 |
public void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite) |
|
164 |
throws InitializeException, ProviderNotRegisteredException, |
|
165 |
ValidateDataParametersException; |
|
160 | 166 |
|
161 |
/** |
|
162 |
* @deprecated see openStore |
|
163 |
*/ |
|
164 |
public DataStore createStore(DataStoreParameters parameters) |
|
165 |
throws InitializeException, ProviderNotRegisteredException, |
|
166 |
ValidateDataParametersException; |
|
167 |
/** |
|
168 |
* Returns a list of Strings containing the names of all available DataStore |
|
169 |
* providers. |
|
170 |
* |
|
171 |
* @return list of String containing available DataStore provider names |
|
172 |
*/ |
|
173 |
public List getStoreProviders(); |
|
167 | 174 |
|
175 |
/** |
|
176 |
* Returns a list of Strings containing the names of all available DataStore |
|
177 |
* providers for an explorer. |
|
178 |
* |
|
179 |
* @param name |
|
180 |
* @return |
|
181 |
*/ |
|
182 |
public List<String> getStoreProviders(String name); |
|
168 | 183 |
|
169 |
/** |
|
170 |
* Create a new physical store |
|
171 |
* |
|
172 |
* @param parameters |
|
173 |
* |
|
174 |
* @throws InitializeException |
|
175 |
* @throws ProviderNotRegisteredException |
|
176 |
* @throws ValidateDataParametersException |
|
177 |
*/ |
|
178 |
public void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite) |
|
179 |
throws InitializeException, ProviderNotRegisteredException, |
|
180 |
ValidateDataParametersException; |
|
184 |
/* |
|
185 |
* ==================================================================== |
|
186 |
* |
|
187 |
* Explorer related services |
|
188 |
*/ |
|
189 |
/** |
|
190 |
* Returns an instance of {@link DataServerExplorerParameters} corresponding |
|
191 |
* to the given name. |
|
192 |
* |
|
193 |
* @param name name of a registered server explorer provider |
|
194 |
* @return |
|
195 |
* |
|
196 |
* @throws InitializeException if parameter initialization causes an error. |
|
197 |
* |
|
198 |
* @throws ProviderNotRegisteredException if could not find a provider by |
|
199 |
* the given name. |
|
200 |
* |
|
201 |
* |
|
202 |
*/ |
|
203 |
public DataServerExplorerParameters createServerExplorerParameters( |
|
204 |
String name) |
|
205 |
throws InitializeException, ProviderNotRegisteredException; |
|
181 | 206 |
|
182 |
/** |
|
183 |
* Returns a list of Strings containing the names of all available DataStore |
|
184 |
* providers. |
|
185 |
* |
|
186 |
* @return list of String containing available DataStore provider names |
|
187 |
*/ |
|
188 |
public List getStoreProviders(); |
|
207 |
/** |
|
208 |
* Returns an instance of {@link DataServerExplorer} given its parameters. |
|
209 |
* |
|
210 |
* @param name |
|
211 |
* @param parameters parameters used to instantiate and initialize the |
|
212 |
* {@link DataServerExplorer}. |
|
213 |
* |
|
214 |
* @return an instance of {@link DataServerExplorer}. |
|
215 |
* |
|
216 |
* @throws InitializeException |
|
217 |
* |
|
218 |
* @throws ProviderNotRegisteredException |
|
219 |
* @throws ValidateDataParametersException |
|
220 |
*/ |
|
221 |
public DataServerExplorer openServerExplorer( |
|
222 |
String name, |
|
223 |
DataServerExplorerParameters parameters) |
|
224 |
throws InitializeException, ProviderNotRegisteredException, |
|
225 |
ValidateDataParametersException; |
|
189 | 226 |
|
190 |
/** |
|
191 |
* Returns a list of Strings containing the names of all available DataStore |
|
192 |
* providers for an explorer. |
|
193 |
* |
|
194 |
* @param explorer |
|
195 |
* name |
|
196 |
*/ |
|
197 |
public List getStoreProviders(String name); |
|
227 |
/** |
|
228 |
* @deprecated see openServerExplorer |
|
229 |
*/ |
|
230 |
public DataServerExplorer createServerExplorer( |
|
231 |
DataServerExplorerParameters parameters) |
|
232 |
throws InitializeException, ProviderNotRegisteredException, |
|
233 |
ValidateDataParametersException; |
|
198 | 234 |
|
199 |
/* |
|
200 |
* ==================================================================== |
|
201 |
* |
|
202 |
* Explorer related services |
|
203 |
*/ |
|
204 |
/** |
|
205 |
* Returns an instance of {@link DataServerExplorerParameters} corresponding to |
|
206 |
* the given name. |
|
207 |
* |
|
208 |
* @param name |
|
209 |
* name of a registered server explorer provider |
|
210 |
* |
|
211 |
* @throws InitializeException |
|
212 |
* if parameter initialization causes an error. |
|
213 |
* |
|
214 |
* @throws ProviderNotRegisteredException |
|
215 |
* if could not find a provider by the given name. |
|
216 |
* |
|
217 |
**/ |
|
218 |
public DataServerExplorerParameters createServerExplorerParameters( |
|
219 |
String name) |
|
220 |
throws InitializeException, ProviderNotRegisteredException; |
|
235 |
/** |
|
236 |
* Returns a list of String containing the names of the available |
|
237 |
* DataServerExplorer providers. |
|
238 |
* |
|
239 |
* @return list of String containing the names of the available |
|
240 |
* DataServerExplorer providers. |
|
241 |
*/ |
|
242 |
public List<String> getExplorerProviders(); |
|
221 | 243 |
|
222 |
/** |
|
223 |
* Returns an instance of {@link DataServerExplorer} given its parameters. |
|
224 |
* |
|
225 |
* @param parameters |
|
226 |
* parameters used to instantiate and initialize the |
|
227 |
* {@link DataServerExplorer}. |
|
228 |
* |
|
229 |
* @return an instance of {@link DataServerExplorer}. |
|
230 |
* |
|
231 |
* @throws InitializeException |
|
232 |
* |
|
233 |
* @throws ProviderNotRegisteredException |
|
234 |
* @throws ValidateDataParametersException |
|
235 |
*/ |
|
236 |
public DataServerExplorer openServerExplorer( |
|
237 |
String name, |
|
238 |
DataServerExplorerParameters parameters) |
|
239 |
throws InitializeException, ProviderNotRegisteredException, |
|
240 |
ValidateDataParametersException; |
|
244 |
/* |
|
245 |
* ==================================================================== |
|
246 |
* |
|
247 |
* Expression evaluation related services |
|
248 |
*/ |
|
249 |
/** |
|
250 |
* Registers the default expression evaluator. It is used by DAL to evaluate |
|
251 |
* and resolve query filters and expressions. |
|
252 |
* |
|
253 |
* @param evaluator Class that will be called to evaluate the expression. It |
|
254 |
* must implement {@link Evaluator}. |
|
255 |
*/ |
|
256 |
public void registerDefaultEvaluator(Class evaluator); |
|
241 | 257 |
|
242 |
/** |
|
243 |
* @deprecated see openServerExplorer |
|
244 |
*/ |
|
245 |
public DataServerExplorer createServerExplorer( |
|
246 |
DataServerExplorerParameters parameters) |
|
247 |
throws InitializeException, ProviderNotRegisteredException, |
|
248 |
ValidateDataParametersException; |
|
258 |
/** |
|
259 |
* Creates an instance of Evaluator that represents the given expression. |
|
260 |
* |
|
261 |
* @param expression String containing a CQL expression. |
|
262 |
* @return instance of Evaluator representing the given expression. |
|
263 |
* @throws InitializeException |
|
264 |
*/ |
|
265 |
public Evaluator createExpresion(String expression) |
|
266 |
throws InitializeException; |
|
249 | 267 |
|
250 |
/** |
|
251 |
* Returns a list of String containing the names of the available |
|
252 |
* DataServerExplorer providers. |
|
253 |
* |
|
254 |
* @return list of String containing the names of the available |
|
255 |
* DataServerExplorer providers. |
|
256 |
*/ |
|
257 |
public List getExplorerProviders(); |
|
268 |
/* |
|
269 |
* ==================================================================== |
|
270 |
* |
|
271 |
* Index related services |
|
272 |
*/ |
|
273 |
/** |
|
274 |
* Returns a list of String containing the names of the available index |
|
275 |
* providers. |
|
276 |
* |
|
277 |
* @return list of strings with the names of the available index providers |
|
278 |
*/ |
|
279 |
public List<String> getFeatureIndexProviders(); |
|
258 | 280 |
|
259 |
/* |
|
260 |
* ==================================================================== |
|
261 |
* |
|
262 |
* Expression evaluation related services |
|
263 |
*/ |
|
264 |
|
|
265 |
/** |
|
266 |
* Registers the default expression evaluator. It is used by DAL to evaluate |
|
267 |
* and resolve query filters and expressions. |
|
268 |
* |
|
269 |
* @param evaluator |
|
270 |
* Class that will be called to evaluate the expression. It must |
|
271 |
* implement {@link Evaluator}. |
|
272 |
*/ |
|
273 |
public void registerDefaultEvaluator(Class evaluator); |
|
274 |
|
|
275 |
/** |
|
276 |
* Creates an instance of Evaluator that represents the given expression. |
|
277 |
* |
|
278 |
* @param expression |
|
279 |
* String containing a CQL expression. |
|
280 |
* @return instance of Evaluator representing the given expression. |
|
281 |
* @throws InitializeException |
|
282 |
*/ |
|
283 |
public Evaluator createExpresion(String expression) |
|
284 |
throws InitializeException; |
|
285 |
|
|
286 |
/* |
|
287 |
* ==================================================================== |
|
288 |
* |
|
289 |
* Index related services |
|
290 |
*/ |
|
291 |
|
|
292 |
|
|
293 |
/** |
|
294 |
* Returns a list of String containing the names of the available index providers. |
|
295 |
* |
|
296 |
* @return |
|
297 |
* list of strings with the names of the available index providers |
|
298 |
*/ |
|
299 |
public List getFeatureIndexProviders(); |
|
300 |
|
|
301 |
/** |
|
302 |
* Sets the default DataIndexProvider for the given data type. |
|
303 |
* |
|
304 |
* @param dataType |
|
305 |
* one of the data types defined in {@link DataTypes}. |
|
306 |
* @param name |
|
307 |
* Provider's name |
|
308 |
*/ |
|
281 |
/** |
|
282 |
* Sets the default DataIndexProvider for the given data type. |
|
283 |
* |
|
284 |
* @param dataType one of the data types defined in {@link DataTypes}. |
|
285 |
* @param name Provider's name |
|
286 |
*/ |
|
309 | 287 |
public void setDefaultFeatureIndexProviderName(int dataType, String name); |
310 | 288 |
|
311 |
/** |
|
312 |
* Returns the default DataIndexProvider name, given a data type. Data types |
|
313 |
* are defined in {@link DataTypes}. |
|
314 |
* |
|
315 |
* @param dataType |
|
316 |
* one of the constants in {@link DataTypes}. |
|
317 |
* |
|
318 |
* @return |
|
319 |
* the name of the default {@link FeatureIndexProvider} if there is |
|
320 |
* anyone available for the given data type. |
|
321 |
*/ |
|
289 |
/** |
|
290 |
* Returns the default DataIndexProvider name, given a data type. Data types |
|
291 |
* are defined in {@link DataTypes}. |
|
292 |
* |
|
293 |
* @param dataType one of the constants in {@link DataTypes}. |
|
294 |
* |
|
295 |
* @return the name of the default {@link FeatureIndexProvider} if there is |
|
296 |
* anyone available for the given data type. |
|
297 |
*/ |
|
322 | 298 |
public String getDefaultFeatureIndexProviderName(int dataType); |
323 | 299 |
|
324 | 300 |
/** |
325 |
* Returns a list of String containing the names of the available cache providers. |
|
326 |
* |
|
327 |
* @return |
|
328 |
* list of strings with the names of the available cache providers |
|
329 |
*/ |
|
330 |
public List getFeatureCacheProviders(); |
|
301 |
* Utility method to create the {@link DataStoreParameters} to create a |
|
302 |
* {@link FeatureStore} based on the {@link MemoryStoreProvider}. |
|
303 |
* |
|
304 |
* @param autoOrderAttributeName the name of the {@link Feature} attribute |
|
305 |
* to be used to order the store {@link Feature}s by default. Set to null if |
|
306 |
* you don't want any order by default |
|
307 |
* @return the parameters for the memory based store |
|
308 |
* @throws InitializeException if there is an error initializing the |
|
309 |
* parameters for the memory provider |
|
310 |
*/ |
|
311 |
public DataStoreParameters createMemoryStoreParameters( |
|
312 |
String autoOrderAttributeName) throws InitializeException; |
|
331 | 313 |
|
332 |
/** |
|
333 |
* Returns an instance of {@link DataServerExplorerParameters} corresponding |
|
334 |
* to the given name used by the cache to create a store to save the |
|
335 |
* retrieved data. |
|
336 |
* |
|
337 |
* @param name |
|
338 |
* name of a registered feature cache provider |
|
339 |
* |
|
340 |
* @throws InitializeException |
|
341 |
* if parameter initialization causes an error. |
|
342 |
* |
|
343 |
* @throws ProviderNotRegisteredException |
|
344 |
* if could not find a cache provider by the given name. |
|
345 |
* |
|
346 |
*/ |
|
347 |
public DynObject createCacheParameters(String name) |
|
348 |
throws InitializeException, ProviderNotRegisteredException; |
|
314 |
/** |
|
315 |
* Utility method to create the a {@link FeatureStore} based on the |
|
316 |
* {@link MemoryStoreProvider}. |
|
317 |
* |
|
318 |
* @param autoOrderAttributeName the name of the {@link Feature} attribute |
|
319 |
* to be used to order the store {@link Feature}s by default. Set to null if |
|
320 |
* you don't want any order by default |
|
321 |
* @return the the memory based store |
|
322 |
* @throws InitializeException if there is an error initializing the |
|
323 |
* parameters for the memory provider |
|
324 |
*/ |
|
325 |
public FeatureStore createMemoryStore(String autoOrderAttributeName) |
|
326 |
throws InitializeException; |
|
349 | 327 |
|
350 |
/** |
|
351 |
* Utility method to create the {@link DataStoreParameters} to create a |
|
352 |
* {@link FeatureStore} based on the {@link MemoryStoreProvider}. |
|
353 |
* |
|
354 |
* @param autoOrderAttributeName |
|
355 |
* the name of the {@link Feature} attribute to be used to order |
|
356 |
* the store {@link Feature}s by default. Set to null if you |
|
357 |
* don't want any order by default |
|
358 |
* @return the parameters for the memory based store |
|
359 |
* @throws InitializeException |
|
360 |
* if there is an error initializing the parameters for the |
|
361 |
* memory provider |
|
362 |
*/ |
|
363 |
public DataStoreParameters createMemoryStoreParameters( |
|
364 |
String autoOrderAttributeName) throws InitializeException; |
|
365 |
|
|
366 |
/** |
|
367 |
* Utility method to create the a {@link FeatureStore} based on the |
|
368 |
* {@link MemoryStoreProvider}. |
|
369 |
* |
|
370 |
* @param autoOrderAttributeName |
|
371 |
* the name of the {@link Feature} attribute to be used to order |
|
372 |
* the store {@link Feature}s by default. Set to null if you |
|
373 |
* don't want any order by default |
|
374 |
* @return the the memory based store |
|
375 |
* @throws InitializeException |
|
376 |
* if there is an error initializing the parameters for the |
|
377 |
* memory provider |
|
378 |
*/ |
|
379 |
public FeatureStore createMemoryStore(String autoOrderAttributeName) |
|
380 |
throws InitializeException; |
|
381 |
|
|
382 | 328 |
/** |
383 | 329 |
* Creates a {@link FeaturePagingHelper} to paginate data from a |
384 | 330 |
* {@link FeatureStore}. |
385 |
* |
|
386 |
* @param featureStore |
|
387 |
* to get the {@link Feature}s from |
|
388 |
* @param pageSize |
|
389 |
* the page size |
|
331 |
* |
|
332 |
* @param featureStore to get the {@link Feature}s from |
|
333 |
* @param pageSize the page size |
|
390 | 334 |
* @return a {@link FeaturePagingHelper} |
391 |
* @throws BaseException |
|
392 |
* if there is an error creating the helper |
|
335 |
* @throws BaseException if there is an error creating the helper |
|
393 | 336 |
*/ |
394 |
public FeaturePagingHelper createFeaturePagingHelper(
|
|
395 |
FeatureStore featureStore, int pageSize) throws BaseException; |
|
337 |
public FeaturePagingHelper createFeaturePagingHelper(
|
|
338 |
FeatureStore featureStore, int pageSize) throws BaseException;
|
|
396 | 339 |
|
397 |
/**
|
|
340 |
/**
|
|
398 | 341 |
* Creates a {@link FeaturePagingHelper} to paginate data from a |
399 | 342 |
* {@link FeatureStore}. |
400 |
* |
|
401 |
* @param featureStore |
|
402 |
* to get the {@link Feature}s from |
|
403 |
* @param featureQuery |
|
404 |
* to filter and/or order the data |
|
405 |
* @param pageSize |
|
406 |
* the page size |
|
343 |
* |
|
344 |
* @param featureStore to get the {@link Feature}s from |
|
345 |
* @param featureQuery to filter and/or order the data |
|
346 |
* @param pageSize the page size |
|
407 | 347 |
* @return a {@link FeaturePagingHelper} |
408 |
* @throws BaseException |
|
409 |
* if there is an error creating the helper |
|
348 |
* @throws BaseException if there is an error creating the helper |
|
410 | 349 |
*/ |
411 |
public FeaturePagingHelper createFeaturePagingHelper( |
|
412 |
FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) |
|
413 |
throws BaseException; |
|
414 |
|
|
415 |
public void setOpenErrorHandler(OpenErrorHandler handler); |
|
416 |
|
|
417 |
public OpenErrorHandler getOpenErrorHandler(); |
|
418 |
|
|
419 |
public DataStoreProviderFactory getStoreProviderFactory(String name); |
|
350 |
public FeaturePagingHelper createFeaturePagingHelper( |
|
351 |
FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) |
|
352 |
throws BaseException; |
|
420 | 353 |
|
421 |
public EditableFeatureType createFeatureType(); |
|
422 |
|
|
423 |
public List getDataTypes(); |
|
424 |
|
|
425 |
/** |
|
426 |
* Registers a class that can be used to create a {@link FeatureAttributeGetter} |
|
427 |
* and associate it to a {@link FeatureAttributeDescriptor}. |
|
428 |
* |
|
429 |
* @param name |
|
430 |
* the name used to register the class. |
|
431 |
* @param clazz |
|
432 |
* it has to be an instance of {@link FeatureAttributeDescriptor} |
|
433 |
*/ |
|
434 |
public void registerFeatureAttributeGetter(String name, Class clazz); |
|
435 |
|
|
436 |
/** |
|
437 |
* Creates a {@link FeatureAttributeGetter} by name. If there is not any class |
|
438 |
* registered with this name or if there is any error an exception is thrown. |
|
439 |
* |
|
440 |
* @param name |
|
441 |
* the name that was used to register the class |
|
442 |
* @return |
|
443 |
* a {@link FeatureAttributeGetter} |
|
444 |
* @throws InitializeException |
|
445 |
* if there is any error creating the object |
|
446 |
*/ |
|
447 |
public FeatureAttributeGetter createFeatureAttributeGetter(String name) throws InitializeException; |
|
448 |
|
|
449 |
public DataServerExplorerPool getDataServerExplorerPool(); |
|
450 |
public void setDataServerExplorerPool(DataServerExplorerPool pool); |
|
354 |
public void setOpenErrorHandler(OpenErrorHandler handler); |
|
451 | 355 |
|
356 |
public OpenErrorHandler getOpenErrorHandler(); |
|
357 |
|
|
358 |
public DataStoreProviderFactory getStoreProviderFactory(String name); |
|
359 |
|
|
360 |
public EditableFeatureType createFeatureType(); |
|
361 |
|
|
362 |
public DataServerExplorerPool getDataServerExplorerPool(); |
|
363 |
|
|
364 |
public void setDataServerExplorerPool(DataServerExplorerPool pool); |
|
365 |
|
|
366 |
public void setResourcesLoader(ClassLoader loader); |
|
367 |
|
|
368 |
public void setResourcesLoader(File folder); |
|
369 |
|
|
370 |
/** |
|
371 |
* Return a list of the DataTypes supported for the type of the feature |
|
372 |
* attributes. The list is only informative. |
|
373 |
* |
|
374 |
* @return |
|
375 |
*/ |
|
376 |
public List<DataType> getDataTypes(); |
|
377 |
|
|
378 |
public Register getStoreRegister(); |
|
379 |
|
|
380 |
public Register getStoreProviderRegister(); |
|
381 |
|
|
382 |
public Register getServerExplorerRegister(); |
|
383 |
|
|
384 |
public Register getFeatureIndexRegister(); |
|
452 | 385 |
} |
Also available in: Unified diff