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