svn-gvsig-desktop / 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 @ 47778
History | View | Annotate | Download (24.9 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40559 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | 40435 | jjdelcerro | *
|
6 | 43020 | jjdelcerro | * 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 | 40435 | jjdelcerro | *
|
11 | 43020 | jjdelcerro | * 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 | 40435 | jjdelcerro | *
|
16 | 43020 | jjdelcerro | * 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.
|
||
19 | 40435 | jjdelcerro | *
|
20 | 43020 | jjdelcerro | * For any additional information, do not hesitate to contact us at info AT
|
21 | * gvsig.com, or visit our website www.gvsig.com.
|
||
22 | 40435 | jjdelcerro | */
|
23 | package org.gvsig.fmap.dal; |
||
24 | |||
25 | 43020 | jjdelcerro | import java.io.File; |
26 | 40435 | jjdelcerro | import java.util.List; |
27 | 47209 | jjdelcerro | import java.util.Locale; |
28 | 45426 | fdiaz | import java.util.Map; |
29 | import java.util.Set; |
||
30 | 45696 | jjdelcerro | import java.util.function.Predicate; |
31 | 45043 | jjdelcerro | import javax.json.JsonObject; |
32 | 43984 | jjdelcerro | import org.gvsig.expressionevaluator.Expression; |
33 | 44042 | jjdelcerro | import org.gvsig.expressionevaluator.ExpressionBuilder; |
34 | 43205 | fdiaz | import org.gvsig.fmap.dal.exception.DataException; |
35 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.exception.InitializeException; |
36 | import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
||
37 | import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
||
38 | 44750 | jjdelcerro | import org.gvsig.fmap.dal.expressionevaluator.DALExpressionBuilder; |
39 | 47606 | fdiaz | import org.gvsig.fmap.dal.expressionevaluator.FeatureAttributeEmulatorExpression; |
40 | 43983 | jjdelcerro | import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable; |
41 | 47606 | fdiaz | import org.gvsig.fmap.dal.feature.DataProfile; |
42 | import org.gvsig.fmap.dal.feature.DataTypeDetector; |
||
43 | import org.gvsig.fmap.dal.feature.EditableFeature; |
||
44 | import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
||
45 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.feature.EditableFeatureType; |
46 | import org.gvsig.fmap.dal.feature.Feature; |
||
47 | 47606 | fdiaz | import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
48 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.feature.FeatureIndex; |
49 | import org.gvsig.fmap.dal.feature.FeatureQuery; |
||
50 | 47606 | fdiaz | import org.gvsig.fmap.dal.feature.FeatureRuleExpression; |
51 | import org.gvsig.fmap.dal.feature.FeatureSet; |
||
52 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.feature.FeatureStore; |
53 | 43989 | jjdelcerro | import org.gvsig.fmap.dal.feature.FeatureType; |
54 | 47606 | fdiaz | import org.gvsig.fmap.dal.feature.LabelsCacheForFieldValues; |
55 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper; |
56 | 42775 | jjdelcerro | import org.gvsig.fmap.dal.resource.ResourceManager; |
57 | 43020 | jjdelcerro | import org.gvsig.tools.dataTypes.DataType; |
58 | 40435 | jjdelcerro | import org.gvsig.tools.dynobject.DynObject; |
59 | 42775 | jjdelcerro | import org.gvsig.tools.dynobject.DynStruct; |
60 | 42778 | jjdelcerro | import org.gvsig.tools.dynobject.Tags; |
61 | 40435 | jjdelcerro | import org.gvsig.tools.evaluator.Evaluator; |
62 | import org.gvsig.tools.exception.BaseException; |
||
63 | 44871 | jjdelcerro | import org.gvsig.tools.observer.Observer; |
64 | 44328 | jjdelcerro | import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
65 | 47606 | fdiaz | import org.gvsig.tools.service.spi.Services; |
66 | 46996 | jjdelcerro | import org.gvsig.tools.task.SimpleTaskStatus; |
67 | 45461 | jjdelcerro | import org.gvsig.tools.util.Factory; |
68 | 46996 | jjdelcerro | import org.gvsig.tools.util.Invocable; |
69 | 47138 | jjdelcerro | import org.gvsig.tools.util.PropertiesSupport; |
70 | 40435 | jjdelcerro | |
71 | /**
|
||
72 | 43020 | jjdelcerro | * There are two top level management roles within DAL: data access and resource
|
73 | * management.
|
||
74 | 40435 | jjdelcerro | *
|
75 | 43020 | jjdelcerro | * This class is responsible of the data access management role. It provides
|
76 | * ways for registering and instantiating {@link DataServerExplorer}(s),
|
||
77 | * {@link DataStore}(s), {@link Evaluator}(s) and {@link FeatureIndex}(es).
|
||
78 | 40435 | jjdelcerro | *
|
79 | * @see ResourceManager
|
||
80 | *
|
||
81 | */
|
||
82 | 47138 | jjdelcerro | public interface DataManager extends Services, PropertiesSupport { |
83 | 40435 | jjdelcerro | |
84 | 46015 | jjdelcerro | public static final int RECOMENDED_SIZE_FOR_CLOB = 4096; |
85 | |||
86 | 43020 | jjdelcerro | public static final String CREATE_STORE_AUTHORIZATION = "dal-create-store"; |
87 | public static final String READ_STORE_AUTHORIZATION = "dal-read-store"; |
||
88 | public static final String WRITE_STORE_AUTHORIZATION = "dal-write-store"; |
||
89 | 40435 | jjdelcerro | |
90 | 44262 | jjdelcerro | public static final String DAL_SYMBOL_TABLE = "DAL.SymbolTable.Global"; |
91 | 44750 | jjdelcerro | // public static final String DAL_SYMBOL_TABLE_FEATURE = "DAL.SymbolTable.Feature";
|
92 | 44253 | jjdelcerro | |
93 | 47778 | fdiaz | |
94 | @Deprecated
|
||
95 | /**
|
||
96 | * Use FUNCTION_FOREIGN_VALUE
|
||
97 | */
|
||
98 | 44262 | jjdelcerro | public static final String FUNCTION_FOREING_VALUE = "FOREING_VALUE"; |
99 | 46778 | jjdelcerro | public static final String FUNCTION_FOREIGN_VALUE = "FOREIGN_VALUE"; |
100 | 44748 | jjdelcerro | public static final String FUNCTION_SELECT = "SELECT"; |
101 | 45198 | jjdelcerro | public static final String FUNCTION_UPDATE = "UPDATE"; |
102 | 44748 | jjdelcerro | public static final String FUNCTION_SELECT_COUNT = "SELECT_COUNT"; |
103 | public static final String FUNCTION_EXISTS = "EXISTS"; |
||
104 | 44858 | jjdelcerro | public static final String FUNCTION_EXISTS_TABLE = "EXISTS_TABLE"; |
105 | public static final String FUNCTION_ROW_TAG = "ROW_TAG"; |
||
106 | public static final String FUNCTION_SET_ROW_TAG = "SET_ROW_TAG"; |
||
107 | 44748 | jjdelcerro | public static final String FUNCTION_CURRENT_ROW = "CURRENT_ROW"; |
108 | public static final String FUNCTION_CURRENT_STORE = "CURRENT_STORE"; |
||
109 | public static final String FUNCTION_ISSELECTED_CURRENT_ROW = "ISSELECTED_CURRENT_ROW"; |
||
110 | 44853 | jjdelcerro | public static final String FUNCTION_GEOMETRY = "GEOMETRY"; |
111 | 44858 | jjdelcerro | public static final String FUNCTION_CREATE_IN_MEMORY_TABLE = "CREATE_IN_MEMORY_TABLE"; |
112 | public static final String FUNCTION_INSERT_INTO_TABLE = "INSERT_INTO_TABLE"; |
||
113 | 45043 | jjdelcerro | public static final String FUNCTION_CREATE_TABLE = "CREATE_TABLE"; |
114 | public static final String FUNCTION_CREATE_TABLE_STRUCTURE = "CREATE_TABLE_STRUCTURE"; |
||
115 | 46100 | jjdelcerro | public static final String FUNCTION_SELECT_FROM_SELECTION = "SELECTFROMSELECTION"; |
116 | public static final String FUNCTION_SELECT_COUNT_FROM_SELECTION = "SELECTCOUNTFROMSELECTION"; |
||
117 | 47053 | jjdelcerro | public static final String FUNCTION_EXECUTESQL = "EXECUTESQL"; |
118 | 44262 | jjdelcerro | |
119 | 44340 | jjdelcerro | public static final String DAL_PREFERRED_COLUMNS = "DAL.Preferred.Columns"; |
120 | |||
121 | 44351 | jjdelcerro | public static final String DAL_USE_LABELS = "DAL.useLabels"; |
122 | 46285 | jjdelcerro | |
123 | public static final String DAL_USE_LARGE_SELECTION = "DAL.useLargeSelection"; |
||
124 | 46361 | jjdelcerro | public static final String DAL_STORE_ENVELOPE = "DAL.forcedEnvelope"; |
125 | 46677 | jjdelcerro | public static final String DAL_FEATURETYPE_MODE_EDIT = "DAL.featureTypeEditMode"; |
126 | 46682 | jjdelcerro | public static final String DAL_FEATURETYPE_MODE_EDIT_MSG = "DAL.featureTypeEditMode.msg"; |
127 | 44871 | jjdelcerro | |
128 | 44351 | jjdelcerro | public static final int USE_LABELS_YES = 0; |
129 | public static final int USE_LABELS_NO = 1; |
||
130 | public static final int USE_LABELS_BOTH = 2; |
||
131 | |||
132 | 43020 | jjdelcerro | /**
|
133 | 44262 | jjdelcerro | *
|
134 | 43020 | jjdelcerro | * Returns the default DAL's temporary directory
|
135 | *
|
||
136 | * @return Temporary directory name
|
||
137 | 43241 | jjdelcerro | * @deprecated use FoldersManager of org.gvsig.tools
|
138 | 43020 | jjdelcerro | */
|
139 | public String getTemporaryDirectory(); |
||
140 | 40435 | jjdelcerro | |
141 | 43020 | jjdelcerro | /*
|
142 | * ====================================================================
|
||
143 | *
|
||
144 | * Store related services
|
||
145 | */
|
||
146 | /**
|
||
147 | * Creates, initializes and returns an instance of DataStoreParameters given
|
||
148 | * the name with which their provider is registered.
|
||
149 | *
|
||
150 | * @param name provider name
|
||
151 | 45043 | jjdelcerro | * @param arguments
|
152 | 43020 | jjdelcerro | * @return the data store parameters
|
153 | *
|
||
154 | * @throws ProviderNotRegisteredException if the memory provider is not
|
||
155 | * registered
|
||
156 | * @throws InitializeException if there is an error initializing the
|
||
157 | * parameters for the memory provider
|
||
158 | *
|
||
159 | */
|
||
160 | 44738 | jjdelcerro | public DataStoreParameters createStoreParameters(String name, Object... arguments) |
161 | 43020 | jjdelcerro | throws InitializeException, ProviderNotRegisteredException;
|
162 | 45272 | omartinez | |
163 | public DataStoreParameters createStoreParameters(String name) |
||
164 | throws InitializeException, ProviderNotRegisteredException;
|
||
165 | 40435 | jjdelcerro | |
166 | 44304 | jjdelcerro | public DataStoreParameters createStoreParameters(byte[] data); |
167 | |||
168 | 43020 | jjdelcerro | /**
|
169 | * Creates, initializes and fill an instance of DataStoreParameters from the
|
||
170 | * tags of the DynStruct passed as parameter.
|
||
171 | *
|
||
172 | * @param struct structure from which tags were created ths parameters.
|
||
173 | * @return the data store parameters
|
||
174 | *
|
||
175 | * @throws ProviderNotRegisteredException if the memory provider is not
|
||
176 | * registered
|
||
177 | * @throws InitializeException if there is an error initializing the
|
||
178 | * parameters for the memory provider
|
||
179 | *
|
||
180 | */
|
||
181 | public DataStoreParameters createStoreParameters(DynStruct struct)
|
||
182 | throws InitializeException, ProviderNotRegisteredException;
|
||
183 | 40435 | jjdelcerro | |
184 | 43020 | jjdelcerro | public DataStoreParameters createStoreParameters(Tags tags) throws InitializeException, ProviderNotRegisteredException; |
185 | 42778 | jjdelcerro | |
186 | 43020 | jjdelcerro | /**
|
187 | * Creates, initializes and returns an instance of NewDataStoreParameters
|
||
188 | * given the name with which their provider is registered.
|
||
189 | *
|
||
190 | * @param explorer
|
||
191 | * @param provider
|
||
192 | * @return
|
||
193 | *
|
||
194 | * @throws InitializeException
|
||
195 | * @throws ProviderNotRegisteredException
|
||
196 | */
|
||
197 | public NewDataStoreParameters createNewStoreParameters(String explorer, String provider) |
||
198 | throws InitializeException, ProviderNotRegisteredException;
|
||
199 | 40435 | jjdelcerro | |
200 | 45043 | jjdelcerro | public NewDataStoreParameters createNewStoreParameters(String provider) |
201 | throws InitializeException, ProviderNotRegisteredException;
|
||
202 | |||
203 | 43020 | jjdelcerro | /**
|
204 | *
|
||
205 | * Creates, initializes and returns an instance of DataStore given the
|
||
206 | * DataStoreParameters.
|
||
207 | *
|
||
208 | * @param provider
|
||
209 | * @param parameters parameters used to instantiate and initialize the
|
||
210 | * DataStore
|
||
211 | * @return
|
||
212 | *
|
||
213 | * @throws ProviderNotRegisteredException if the memory provider is not
|
||
214 | * registered
|
||
215 | * @throws InitializeException if there is an error initializing the
|
||
216 | * parameters for the memory provider
|
||
217 | * @throws ValidateDataParametersException if the parameters to open the
|
||
218 | * memory based store are not valid
|
||
219 | */
|
||
220 | public DataStore openStore(String provider, DynObject parameters) |
||
221 | throws InitializeException, ProviderNotRegisteredException,
|
||
222 | ValidateDataParametersException; |
||
223 | 40435 | jjdelcerro | |
224 | 47606 | fdiaz | public DataStore openStore(DataTransaction transaction, String provider, DataStoreParameters parameters) |
225 | throws InitializeException, ProviderNotRegisteredException,
|
||
226 | ValidateDataParametersException; |
||
227 | |||
228 | 43020 | jjdelcerro | public DataStore openStore(String provider, DataStoreParameters parameters) |
229 | throws InitializeException, ProviderNotRegisteredException,
|
||
230 | ValidateDataParametersException; |
||
231 | 42775 | jjdelcerro | |
232 | 45966 | jjdelcerro | public DataStore openStore(String providerName, DataStoreParameters |
233 | parameters, boolean ignoreDALResource)
|
||
234 | throws InitializeException, ProviderNotRegisteredException,
|
||
235 | ValidateDataParametersException; |
||
236 | |||
237 | 47606 | fdiaz | public DataStore openStore(DataTransaction transaction, String providerName, DataStoreParameters |
238 | parameters, boolean ignoreDALResource)
|
||
239 | throws InitializeException, ProviderNotRegisteredException,
|
||
240 | ValidateDataParametersException; |
||
241 | |||
242 | 43093 | jjdelcerro | public DataStore openStore(
|
243 | 43205 | fdiaz | String providerName,
|
244 | Object... arguments)
|
||
245 | throws
|
||
246 | InitializeException, |
||
247 | ProviderNotRegisteredException, |
||
248 | ValidateDataParametersException; |
||
249 | |||
250 | 43020 | jjdelcerro | public DataStore openStore(DynStruct struct)
|
251 | throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException;
|
||
252 | 42775 | jjdelcerro | |
253 | 43020 | jjdelcerro | /**
|
254 | * Create a new physical store
|
||
255 | *
|
||
256 | * @param explorer
|
||
257 | * @param provider
|
||
258 | * @param parameters
|
||
259 | * @param overwrite
|
||
260 | *
|
||
261 | * @throws InitializeException
|
||
262 | * @throws ProviderNotRegisteredException
|
||
263 | * @throws ValidateDataParametersException
|
||
264 | */
|
||
265 | public void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite) |
||
266 | throws InitializeException, ProviderNotRegisteredException,
|
||
267 | ValidateDataParametersException; |
||
268 | 40435 | jjdelcerro | |
269 | 45043 | jjdelcerro | public void newStore(String provider, NewDataStoreParameters parameters, boolean overwrite) |
270 | throws InitializeException, ProviderNotRegisteredException,
|
||
271 | ValidateDataParametersException; |
||
272 | |||
273 | 43020 | jjdelcerro | /**
|
274 | * Returns a list of Strings containing the names of all available DataStore
|
||
275 | * providers.
|
||
276 | *
|
||
277 | * @return list of String containing available DataStore provider names
|
||
278 | */
|
||
279 | public List getStoreProviders(); |
||
280 | 42624 | jjdelcerro | |
281 | 43020 | jjdelcerro | /**
|
282 | * Returns a list of Strings containing the names of all available DataStore
|
||
283 | * providers for an explorer.
|
||
284 | *
|
||
285 | * @param name
|
||
286 | * @return
|
||
287 | */
|
||
288 | public List<String> getStoreProviders(String name); |
||
289 | 42624 | jjdelcerro | |
290 | 43020 | jjdelcerro | /*
|
291 | * ====================================================================
|
||
292 | *
|
||
293 | * Explorer related services
|
||
294 | */
|
||
295 | /**
|
||
296 | * Returns an instance of {@link DataServerExplorerParameters} corresponding
|
||
297 | * to the given name.
|
||
298 | *
|
||
299 | * @param name name of a registered server explorer provider
|
||
300 | * @return
|
||
301 | *
|
||
302 | * @throws InitializeException if parameter initialization causes an error.
|
||
303 | *
|
||
304 | * @throws ProviderNotRegisteredException if could not find a provider by
|
||
305 | * the given name.
|
||
306 | *
|
||
307 | *
|
||
308 | */
|
||
309 | public DataServerExplorerParameters createServerExplorerParameters(
|
||
310 | String name)
|
||
311 | throws InitializeException, ProviderNotRegisteredException;
|
||
312 | 40435 | jjdelcerro | |
313 | 43020 | jjdelcerro | /**
|
314 | * Returns an instance of {@link DataServerExplorer} given its parameters.
|
||
315 | *
|
||
316 | * @param name
|
||
317 | * @param parameters parameters used to instantiate and initialize the
|
||
318 | * {@link DataServerExplorer}.
|
||
319 | *
|
||
320 | * @return an instance of {@link DataServerExplorer}.
|
||
321 | *
|
||
322 | * @throws InitializeException
|
||
323 | *
|
||
324 | * @throws ProviderNotRegisteredException
|
||
325 | * @throws ValidateDataParametersException
|
||
326 | */
|
||
327 | public DataServerExplorer openServerExplorer(
|
||
328 | String name,
|
||
329 | DataServerExplorerParameters parameters) |
||
330 | throws InitializeException, ProviderNotRegisteredException,
|
||
331 | ValidateDataParametersException; |
||
332 | 43205 | fdiaz | |
333 | 43093 | jjdelcerro | public DataServerExplorer openServerExplorer(
|
334 | 43205 | fdiaz | String explorerName,
|
335 | 43093 | jjdelcerro | Object... arguments)
|
336 | 43205 | fdiaz | throws
|
337 | InitializeException, |
||
338 | ProviderNotRegisteredException, |
||
339 | 43093 | jjdelcerro | ValidateDataParametersException; |
340 | 43020 | jjdelcerro | /**
|
341 | 43045 | jjdelcerro | * @param parameters
|
342 | 43205 | fdiaz | * @return
|
343 | * @throws org.gvsig.fmap.dal.exception.InitializeException
|
||
344 | * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
|
||
345 | * @throws org.gvsig.fmap.dal.exception.ValidateDataParametersException
|
||
346 | 43020 | jjdelcerro | * @deprecated see openServerExplorer
|
347 | */
|
||
348 | public DataServerExplorer createServerExplorer(
|
||
349 | DataServerExplorerParameters parameters) |
||
350 | throws InitializeException, ProviderNotRegisteredException,
|
||
351 | ValidateDataParametersException; |
||
352 | 43205 | fdiaz | |
353 | 43020 | jjdelcerro | /**
|
354 | 43045 | jjdelcerro | * @param parameters
|
355 | 43205 | fdiaz | * @return
|
356 | * @throws org.gvsig.fmap.dal.exception.InitializeException
|
||
357 | * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
|
||
358 | * @throws org.gvsig.fmap.dal.exception.ValidateDataParametersException
|
||
359 | 43045 | jjdelcerro | * @deprecated see openStore
|
360 | */
|
||
361 | public DataStore createStore(DataStoreParameters parameters)
|
||
362 | throws InitializeException, ProviderNotRegisteredException,
|
||
363 | ValidateDataParametersException; |
||
364 | 43205 | fdiaz | |
365 | 43045 | jjdelcerro | /**
|
366 | 43020 | jjdelcerro | * Returns a list of String containing the names of the available
|
367 | * DataServerExplorer providers.
|
||
368 | *
|
||
369 | * @return list of String containing the names of the available
|
||
370 | * DataServerExplorer providers.
|
||
371 | */
|
||
372 | public List<String> getExplorerProviders(); |
||
373 | 40435 | jjdelcerro | |
374 | 44023 | jjdelcerro | /**
|
375 | * Creates an instance of Evaluator that represents the given expression.
|
||
376 | 43020 | jjdelcerro | *
|
377 | 44023 | jjdelcerro | * @param expression String containing a CQL expression.
|
378 | * @return instance of Evaluator representing the given expression.
|
||
379 | * @throws InitializeException
|
||
380 | * @deprecated use createFilter
|
||
381 | 43020 | jjdelcerro | */
|
382 | 44023 | jjdelcerro | public Evaluator createExpresion(String expression) |
383 | throws InitializeException;
|
||
384 | |||
385 | 43020 | jjdelcerro | /**
|
386 | 44023 | jjdelcerro | * Creates an instance of Evaluator that represents the given expression.
|
387 | 43020 | jjdelcerro | *
|
388 | 44023 | jjdelcerro | * @param expression a Expression with the filter
|
389 | * @return instance of Evaluator representing the given expression.
|
||
390 | * @throws InitializeException
|
||
391 | * @deprecated use createFilter
|
||
392 | 43020 | jjdelcerro | */
|
393 | 44023 | jjdelcerro | public Evaluator createExpresion(Expression expression) |
394 | throws InitializeException;
|
||
395 | 40435 | jjdelcerro | |
396 | 43020 | jjdelcerro | /**
|
397 | * Creates an instance of Evaluator that represents the given expression.
|
||
398 | *
|
||
399 | * @param expression String containing a CQL expression.
|
||
400 | * @return instance of Evaluator representing the given expression.
|
||
401 | * @throws InitializeException
|
||
402 | */
|
||
403 | 44023 | jjdelcerro | public Evaluator createFilter(String expression) |
404 | 43020 | jjdelcerro | throws InitializeException;
|
405 | 43205 | fdiaz | |
406 | 44023 | jjdelcerro | /**
|
407 | * Creates an instance of Evaluator that represents the given expression.
|
||
408 | *
|
||
409 | * @param expression a Expression with the filter
|
||
410 | * @return instance of Evaluator representing the given expression.
|
||
411 | * @throws InitializeException
|
||
412 | */
|
||
413 | public Evaluator createFilter(Expression expression) |
||
414 | 43984 | jjdelcerro | throws InitializeException;
|
415 | |||
416 | 43020 | jjdelcerro | /*
|
417 | * ====================================================================
|
||
418 | *
|
||
419 | * Index related services
|
||
420 | */
|
||
421 | /**
|
||
422 | * Returns a list of String containing the names of the available index
|
||
423 | * providers.
|
||
424 | *
|
||
425 | * @return list of strings with the names of the available index providers
|
||
426 | */
|
||
427 | public List<String> getFeatureIndexProviders(); |
||
428 | 40435 | jjdelcerro | |
429 | 43020 | jjdelcerro | /**
|
430 | * Sets the default DataIndexProvider for the given data type.
|
||
431 | *
|
||
432 | * @param dataType one of the data types defined in {@link DataTypes}.
|
||
433 | * @param name Provider's name
|
||
434 | */
|
||
435 | 40435 | jjdelcerro | public void setDefaultFeatureIndexProviderName(int dataType, String name); |
436 | |||
437 | 43020 | jjdelcerro | /**
|
438 | * Returns the default DataIndexProvider name, given a data type. Data types
|
||
439 | * are defined in {@link DataTypes}.
|
||
440 | *
|
||
441 | * @param dataType one of the constants in {@link DataTypes}.
|
||
442 | *
|
||
443 | * @return the name of the default {@link FeatureIndexProvider} if there is
|
||
444 | * anyone available for the given data type.
|
||
445 | */
|
||
446 | 40435 | jjdelcerro | public String getDefaultFeatureIndexProviderName(int dataType); |
447 | |||
448 | /**
|
||
449 | 43020 | jjdelcerro | * Utility method to create the {@link DataStoreParameters} to create a
|
450 | * {@link FeatureStore} based on the {@link MemoryStoreProvider}.
|
||
451 | *
|
||
452 | * @param autoOrderAttributeName the name of the {@link Feature} attribute
|
||
453 | * to be used to order the store {@link Feature}s by default. Set to null if
|
||
454 | * you don't want any order by default
|
||
455 | * @return the parameters for the memory based store
|
||
456 | * @throws InitializeException if there is an error initializing the
|
||
457 | * parameters for the memory provider
|
||
458 | */
|
||
459 | public DataStoreParameters createMemoryStoreParameters(
|
||
460 | String autoOrderAttributeName) throws InitializeException; |
||
461 | 40435 | jjdelcerro | |
462 | 43020 | jjdelcerro | /**
|
463 | * Utility method to create the a {@link FeatureStore} based on the
|
||
464 | * {@link MemoryStoreProvider}.
|
||
465 | *
|
||
466 | * @param autoOrderAttributeName the name of the {@link Feature} attribute
|
||
467 | * to be used to order the store {@link Feature}s by default. Set to null if
|
||
468 | * you don't want any order by default
|
||
469 | * @return the the memory based store
|
||
470 | * @throws InitializeException if there is an error initializing the
|
||
471 | * parameters for the memory provider
|
||
472 | */
|
||
473 | public FeatureStore createMemoryStore(String autoOrderAttributeName) |
||
474 | throws InitializeException;
|
||
475 | 40435 | jjdelcerro | |
476 | /**
|
||
477 | * Creates a {@link FeaturePagingHelper} to paginate data from a
|
||
478 | * {@link FeatureStore}.
|
||
479 | 43020 | jjdelcerro | *
|
480 | * @param featureStore to get the {@link Feature}s from
|
||
481 | * @param pageSize the page size
|
||
482 | 40435 | jjdelcerro | * @return a {@link FeaturePagingHelper}
|
483 | 43020 | jjdelcerro | * @throws BaseException if there is an error creating the helper
|
484 | 40435 | jjdelcerro | */
|
485 | 43020 | jjdelcerro | public FeaturePagingHelper createFeaturePagingHelper(
|
486 | FeatureStore featureStore, int pageSize) throws BaseException; |
||
487 | 40435 | jjdelcerro | |
488 | 43020 | jjdelcerro | /**
|
489 | 40435 | jjdelcerro | * Creates a {@link FeaturePagingHelper} to paginate data from a
|
490 | * {@link FeatureStore}.
|
||
491 | 43020 | jjdelcerro | *
|
492 | * @param featureStore to get the {@link Feature}s from
|
||
493 | * @param featureQuery to filter and/or order the data
|
||
494 | * @param pageSize the page size
|
||
495 | 40435 | jjdelcerro | * @return a {@link FeaturePagingHelper}
|
496 | 43020 | jjdelcerro | * @throws BaseException if there is an error creating the helper
|
497 | 40435 | jjdelcerro | */
|
498 | 43020 | jjdelcerro | public FeaturePagingHelper createFeaturePagingHelper(
|
499 | FeatureStore featureStore, FeatureQuery featureQuery, int pageSize)
|
||
500 | throws BaseException;
|
||
501 | 40435 | jjdelcerro | |
502 | 43020 | jjdelcerro | public void setOpenErrorHandler(OpenErrorHandler handler); |
503 | 42775 | jjdelcerro | |
504 | 43020 | jjdelcerro | public OpenErrorHandler getOpenErrorHandler();
|
505 | |||
506 | public DataStoreProviderFactory getStoreProviderFactory(String name); |
||
507 | |||
508 | public EditableFeatureType createFeatureType();
|
||
509 | 45043 | jjdelcerro | |
510 | public EditableFeatureType createFeatureType(JsonObject json);
|
||
511 | 43020 | jjdelcerro | |
512 | public DataServerExplorerPool getDataServerExplorerPool();
|
||
513 | |||
514 | public void setDataServerExplorerPool(DataServerExplorerPool pool); |
||
515 | |||
516 | public void setResourcesLoader(ClassLoader loader); |
||
517 | |||
518 | public void setResourcesLoader(File folder); |
||
519 | |||
520 | /**
|
||
521 | * Return a list of the DataTypes supported for the type of the feature
|
||
522 | * attributes. The list is only informative.
|
||
523 | *
|
||
524 | * @return
|
||
525 | */
|
||
526 | public List<DataType> getDataTypes(); |
||
527 | |||
528 | public Register getStoreRegister();
|
||
529 | |||
530 | public Register getStoreProviderRegister();
|
||
531 | |||
532 | public Register getServerExplorerRegister();
|
||
533 | |||
534 | public Register getFeatureIndexRegister();
|
||
535 | 43040 | jjdelcerro | |
536 | /**
|
||
537 | * Creates a default ExpressionBuilder.
|
||
538 | 43205 | fdiaz | *
|
539 | * This ExpressionBuilder is not dependent on a data source,
|
||
540 | 43040 | jjdelcerro | * and is not advisable to use it.
|
541 | 43205 | fdiaz | *
|
542 | 43040 | jjdelcerro | * @return the ExpressionBuilder
|
543 | 44023 | jjdelcerro | * @deprecated use ExpressionEvaluatorManager.createExpressionBuilder()
|
544 | 43040 | jjdelcerro | */
|
545 | public ExpressionBuilder createExpressionBuilder();
|
||
546 | 43205 | fdiaz | |
547 | 43056 | jjdelcerro | /**
|
548 | * Returns a list of String containing the names of the available cache providers.
|
||
549 | *
|
||
550 | * @return
|
||
551 | * list of strings with the names of the available cache providers
|
||
552 | 43205 | fdiaz | */
|
553 | 43056 | jjdelcerro | public List getFeatureCacheProviders(); |
554 | |||
555 | /**
|
||
556 | * Returns an instance of {@link DataServerExplorerParameters} corresponding
|
||
557 | * to the given name used by the cache to create a store to save the
|
||
558 | * retrieved data.
|
||
559 | 43205 | fdiaz | *
|
560 | 43056 | jjdelcerro | * @param name
|
561 | * name of a registered feature cache provider
|
||
562 | 43212 | jjdelcerro | * @return
|
563 | 43205 | fdiaz | *
|
564 | 43056 | jjdelcerro | * @throws InitializeException
|
565 | * if parameter initialization causes an error.
|
||
566 | 43205 | fdiaz | *
|
567 | 43056 | jjdelcerro | * @throws ProviderNotRegisteredException
|
568 | * if could not find a cache provider by the given name.
|
||
569 | 43205 | fdiaz | *
|
570 | 43056 | jjdelcerro | */
|
571 | public DynObject createCacheParameters(String name) |
||
572 | throws InitializeException, ProviderNotRegisteredException;
|
||
573 | 43205 | fdiaz | |
574 | /**
|
||
575 | * @param providerName
|
||
576 | * @param params
|
||
577 | * @param overwrite
|
||
578 | * @throws DataException
|
||
579 | */
|
||
580 | 43212 | jjdelcerro | public void createFileStore(String providerName, NewDataStoreParameters params, boolean overwrite) throws DataException; |
581 | 43205 | fdiaz | |
582 | 43983 | jjdelcerro | public FeatureSymbolTable createFeatureSymbolTable();
|
583 | 45739 | jjdelcerro | |
584 | public FeatureSymbolTable createFeatureSymbolTable(String name); |
||
585 | 43989 | jjdelcerro | |
586 | 46012 | jjdelcerro | public EditableFeatureAttributeDescriptor createFeatureAttributeDescriptor(String name, int type); |
587 | 44753 | omartinez | |
588 | 43989 | jjdelcerro | public FeatureAttributeEmulatorExpression createFeatureAttributeEmulatorExpression(FeatureType type, Expression expression); |
589 | 44128 | jjdelcerro | |
590 | public void registerDataProfile(DataProfile profile); |
||
591 | |||
592 | public List<DataProfile> getDataProfiles(); |
||
593 | |||
594 | public DataProfile getDataProfile(String name); |
||
595 | 44253 | jjdelcerro | |
596 | public StoresRepository getStoresRepository();
|
||
597 | |||
598 | 44304 | jjdelcerro | public DatabaseWorkspaceManager createDatabaseWorkspaceManager(DataServerExplorerParameters connection);
|
599 | 44328 | jjdelcerro | |
600 | 44346 | jjdelcerro | public void addDatabaseWorkspace(DatabaseWorkspaceManager DatabaseWorkspace); |
601 | |||
602 | 44821 | jjdelcerro | public void removeDatabaseWorkspace(DatabaseWorkspaceManager DatabaseWorkspace); |
603 | |||
604 | public void addDatabaseWorkspaceListener(DatabaseWorkspaceManager.DatabaseWorkspaceListener listener); |
||
605 | 44419 | jjdelcerro | |
606 | 44346 | jjdelcerro | public DatabaseWorkspaceManager getDatabaseWorkspace(String name); |
607 | |||
608 | public DatabaseWorkspaceManager getDatabaseWorkspace(DataStoreParameters params);
|
||
609 | 46338 | fdiaz | |
610 | public DatabaseWorkspaceManager getDatabaseWorkspace(DataServerExplorerParameters params);
|
||
611 | 44346 | jjdelcerro | |
612 | 44328 | jjdelcerro | public void writeDALResource(ResourcesStorage resources, DataStore store); |
613 | |||
614 | public void writeDALResource(ResourcesStorage resources, FeatureType featureType); |
||
615 | 44304 | jjdelcerro | |
616 | 44419 | jjdelcerro | /**
|
617 | * Return a 35-40 characters unique identifier.
|
||
618 | *
|
||
619 | * @return the unique identifier
|
||
620 | */
|
||
621 | public String createUniqueID(); |
||
622 | |||
623 | 44719 | jjdelcerro | public void clearAvailableValuesCache(); |
624 | |||
625 | 44750 | jjdelcerro | public DALExpressionBuilder createDALExpressionBuilder();
|
626 | 44831 | jjdelcerro | |
627 | public boolean isTheOldRasterRegistered(); |
||
628 | 44871 | jjdelcerro | |
629 | public void addStoreObserver(Observer observer); |
||
630 | |||
631 | public void removeStoreObserver(Observer observer); |
||
632 | 45043 | jjdelcerro | |
633 | public String getServerExplorerFromStore(String name); |
||
634 | 45426 | fdiaz | |
635 | public void setMaxSizeForSmallFeatureSelection(long size); |
||
636 | |||
637 | public long getMaxSizeForSmallFeatureSelection(); |
||
638 | |||
639 | 45461 | jjdelcerro | public void registerLargeMap(Factory factory); |
640 | |||
641 | public void registerLargeSet(Factory factory); |
||
642 | |||
643 | 45426 | fdiaz | public Map createLargeMap(); |
644 | |||
645 | public Set createLargeSet(); |
||
646 | 45445 | jjdelcerro | |
647 | public DataTransaction createTransaction();
|
||
648 | 45696 | jjdelcerro | |
649 | public void putFeaturesInClipboard(FeatureSet set); |
||
650 | |||
651 | public List<EditableFeature> getFeaturesFromClipboard( |
||
652 | FeatureStore store, |
||
653 | Predicate<FeatureAttributeDescriptor> attrFilter
|
||
654 | ) throws DataException;
|
||
655 | 45739 | jjdelcerro | |
656 | public FeatureRuleExpression createFeatureRuleExpression();
|
||
657 | 46361 | jjdelcerro | |
658 | public DataFactory getStoreFactory(DataStoreParameters parameters);
|
||
659 | 46805 | jjdelcerro | |
660 | public File getCacheResourcesFolder(); |
||
661 | |||
662 | public void clearAllCachedResources(); |
||
663 | 46996 | jjdelcerro | |
664 | public LabelsCacheForFieldValues createLabelsCacheForFieldValues(Invocable labelFormulaProvider, SimpleTaskStatus status);
|
||
665 | 47080 | jjdelcerro | |
666 | public List<FeatureType> getFeatureTypesFromDAL(byte[] daldata); |
||
667 | |||
668 | public byte[] getDALBytesFromFeatureType(FeatureType ftype); |
||
669 | 47209 | jjdelcerro | |
670 | public DataTypeDetector createDataTypeDetector(Locale locale); |
||
671 | 40596 | jjdelcerro | } |