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