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