Statistics
| Revision:

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 @ 47672

History | View | Annotate | Download (24.9 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.Locale;
28
import java.util.Map;
29
import java.util.Set;
30
import java.util.function.Predicate;
31
import javax.json.JsonObject;
32
import org.gvsig.expressionevaluator.Expression;
33
import org.gvsig.expressionevaluator.ExpressionBuilder;
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.FeatureAttributeEmulatorExpression;
40
import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable;
41
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
import org.gvsig.fmap.dal.feature.EditableFeatureType;
46
import org.gvsig.fmap.dal.feature.Feature;
47
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
48
import org.gvsig.fmap.dal.feature.FeatureIndex;
49
import org.gvsig.fmap.dal.feature.FeatureQuery;
50
import org.gvsig.fmap.dal.feature.FeatureRuleExpression;
51
import org.gvsig.fmap.dal.feature.FeatureSet;
52
import org.gvsig.fmap.dal.feature.FeatureStore;
53
import org.gvsig.fmap.dal.feature.FeatureType;
54
import org.gvsig.fmap.dal.feature.LabelsCacheForFieldValues;
55
import org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper;
56
import org.gvsig.fmap.dal.resource.ResourceManager;
57
import org.gvsig.tools.dataTypes.DataType;
58
import org.gvsig.tools.dynobject.DynObject;
59
import org.gvsig.tools.dynobject.DynStruct;
60
import org.gvsig.tools.dynobject.Tags;
61
import org.gvsig.tools.evaluator.Evaluator;
62
import org.gvsig.tools.exception.BaseException;
63
import org.gvsig.tools.observer.Observer;
64
import org.gvsig.tools.resourcesstorage.ResourcesStorage;
65
import org.gvsig.tools.service.spi.Services;
66
import org.gvsig.tools.task.SimpleTaskStatus;
67
import org.gvsig.tools.util.Factory;
68
import org.gvsig.tools.util.Invocable;
69
import org.gvsig.tools.util.PropertiesSupport;
70

    
71
/**
72
 * There are two top level management roles within DAL: data access and resource
73
 * management.
74
 *
75
 * 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
 *
79
 * @see ResourceManager
80
 *
81
 */
82
public interface DataManager extends Services, PropertiesSupport {
83

    
84
    public static final int RECOMENDED_SIZE_FOR_CLOB = 4096;
85
    
86
    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

    
90
    public static final String DAL_SYMBOL_TABLE = "DAL.SymbolTable.Global";
91
//    public static final String DAL_SYMBOL_TABLE_FEATURE = "DAL.SymbolTable.Feature";
92

    
93
    public static final String FUNCTION_FOREING_VALUE = "FOREING_VALUE";
94
    public static final String FUNCTION_FOREIGN_VALUE = "FOREIGN_VALUE";
95
    public static final String FUNCTION_SELECT = "SELECT";
96
    public static final String FUNCTION_UPDATE = "UPDATE";
97
    public static final String FUNCTION_SELECT_COUNT = "SELECT_COUNT";
98
    public static final String FUNCTION_EXISTS = "EXISTS";
99
    public static final String FUNCTION_EXISTS_TABLE = "EXISTS_TABLE";
100
    public static final String FUNCTION_ROW_TAG = "ROW_TAG";
101
    public static final String FUNCTION_SET_ROW_TAG = "SET_ROW_TAG";
102
    public static final String FUNCTION_CURRENT_ROW = "CURRENT_ROW";
103
    public static final String FUNCTION_CURRENT_STORE = "CURRENT_STORE";
104
    public static final String FUNCTION_ISSELECTED_CURRENT_ROW = "ISSELECTED_CURRENT_ROW";
105
    public static final String FUNCTION_GEOMETRY = "GEOMETRY";
106
    public static final String FUNCTION_CREATE_IN_MEMORY_TABLE = "CREATE_IN_MEMORY_TABLE";
107
    public static final String FUNCTION_INSERT_INTO_TABLE = "INSERT_INTO_TABLE";
108
    public static final String FUNCTION_CREATE_TABLE = "CREATE_TABLE";
109
    public static final String FUNCTION_CREATE_TABLE_STRUCTURE = "CREATE_TABLE_STRUCTURE";
110
    public static final String FUNCTION_SELECT_FROM_SELECTION = "SELECTFROMSELECTION";
111
    public static final String FUNCTION_SELECT_COUNT_FROM_SELECTION = "SELECTCOUNTFROMSELECTION";
112
    public static final String FUNCTION_EXECUTESQL = "EXECUTESQL";
113
    
114
    public static final String DAL_PREFERRED_COLUMNS = "DAL.Preferred.Columns";
115
    
116
    public static final String DAL_USE_LABELS = "DAL.useLabels";
117
    
118
    public static final String DAL_USE_LARGE_SELECTION = "DAL.useLargeSelection";
119
    public static final String DAL_STORE_ENVELOPE = "DAL.forcedEnvelope";
120
    public static final String DAL_FEATURETYPE_MODE_EDIT = "DAL.featureTypeEditMode";
121
    public static final String DAL_FEATURETYPE_MODE_EDIT_MSG = "DAL.featureTypeEditMode.msg";
122

    
123
    public static final int USE_LABELS_YES = 0;
124
    public static final int USE_LABELS_NO = 1;
125
    public static final int USE_LABELS_BOTH = 2;
126
    
127
    /**
128
     * 
129
     * Returns the default DAL's temporary directory
130
     *
131
     * @return Temporary directory name
132
     * @deprecated use FoldersManager of org.gvsig.tools
133
     */
134
    public String getTemporaryDirectory();
135

    
136
    /*
137
     * ====================================================================
138
     *
139
     * Store related services
140
     */
141
    /**
142
     * Creates, initializes and returns an instance of DataStoreParameters given
143
     * the name with which their provider is registered.
144
     *
145
     * @param name provider name
146
     * @param arguments
147
     * @return the data store parameters
148
     *
149
     * @throws ProviderNotRegisteredException if the memory provider is not
150
     * registered
151
     * @throws InitializeException if there is an error initializing the
152
     * parameters for the memory provider
153
     *
154
     */
155
    public DataStoreParameters createStoreParameters(String name, Object... arguments)
156
            throws InitializeException, ProviderNotRegisteredException;
157
    
158
    public DataStoreParameters createStoreParameters(String name)
159
            throws InitializeException, ProviderNotRegisteredException;
160

    
161
    public DataStoreParameters createStoreParameters(byte[] data);
162

    
163
    /**
164
     * Creates, initializes and fill an instance of DataStoreParameters from the
165
     * tags of the DynStruct passed as parameter.
166
     *
167
     * @param struct structure from which tags were created ths parameters.
168
     * @return the data store parameters
169
     *
170
     * @throws ProviderNotRegisteredException if the memory provider is not
171
     * registered
172
     * @throws InitializeException if there is an error initializing the
173
     * parameters for the memory provider
174
     *
175
     */
176
    public DataStoreParameters createStoreParameters(DynStruct struct)
177
            throws InitializeException, ProviderNotRegisteredException;
178

    
179
    public DataStoreParameters createStoreParameters(Tags tags) throws InitializeException, ProviderNotRegisteredException;
180

    
181
    /**
182
     * Creates, initializes and returns an instance of NewDataStoreParameters
183
     * given the name with which their provider is registered.
184
     *
185
     * @param explorer
186
     * @param provider
187
     * @return
188
     *
189
     * @throws InitializeException
190
     * @throws ProviderNotRegisteredException
191
     */
192
    public NewDataStoreParameters createNewStoreParameters(String explorer, String provider)
193
            throws InitializeException, ProviderNotRegisteredException;
194

    
195
    public NewDataStoreParameters createNewStoreParameters(String provider)
196
            throws InitializeException, ProviderNotRegisteredException;
197

    
198
    /**
199
     *
200
     * Creates, initializes and returns an instance of DataStore given the
201
     * DataStoreParameters.
202
     *
203
     * @param provider
204
     * @param parameters parameters used to instantiate and initialize the
205
     * DataStore
206
     * @return
207
     *
208
     * @throws ProviderNotRegisteredException if the memory provider is not
209
     * registered
210
     * @throws InitializeException if there is an error initializing the
211
     * parameters for the memory provider
212
     * @throws ValidateDataParametersException if the parameters to open the
213
     * memory based store are not valid
214
     */
215
    public DataStore openStore(String provider, DynObject parameters)
216
            throws InitializeException, ProviderNotRegisteredException,
217
            ValidateDataParametersException;
218

    
219
    public DataStore openStore(DataTransaction transaction, String provider, DataStoreParameters parameters)
220
            throws InitializeException, ProviderNotRegisteredException,
221
            ValidateDataParametersException;
222

    
223
    public DataStore openStore(String provider, DataStoreParameters parameters)
224
            throws InitializeException, ProviderNotRegisteredException,
225
            ValidateDataParametersException;
226

    
227
    public DataStore openStore(String providerName, DataStoreParameters 
228
            parameters, boolean ignoreDALResource) 
229
            throws InitializeException, ProviderNotRegisteredException, 
230
            ValidateDataParametersException;
231

    
232
    public DataStore openStore(DataTransaction transaction, String providerName, DataStoreParameters 
233
            parameters, boolean ignoreDALResource) 
234
            throws InitializeException, ProviderNotRegisteredException, 
235
            ValidateDataParametersException;
236

    
237
    public DataStore openStore(
238
            String providerName,
239
            Object... arguments)
240
        throws
241
            InitializeException,
242
            ProviderNotRegisteredException,
243
            ValidateDataParametersException;
244

    
245
    public DataStore openStore(DynStruct struct)
246
            throws InitializeException, ProviderNotRegisteredException, ValidateDataParametersException;
247

    
248
    /**
249
     * Create a new physical store
250
     *
251
     * @param explorer
252
     * @param provider
253
     * @param parameters
254
     * @param overwrite
255
     *
256
     * @throws InitializeException
257
     * @throws ProviderNotRegisteredException
258
     * @throws ValidateDataParametersException
259
     */
260
    public void newStore(String explorer, String provider, NewDataStoreParameters parameters, boolean overwrite)
261
            throws InitializeException, ProviderNotRegisteredException,
262
            ValidateDataParametersException;
263

    
264
    public void newStore(String provider, NewDataStoreParameters parameters, boolean overwrite)
265
            throws InitializeException, ProviderNotRegisteredException,
266
            ValidateDataParametersException;
267

    
268
    /**
269
     * Returns a list of Strings containing the names of all available DataStore
270
     * providers.
271
     *
272
     * @return list of String containing available DataStore provider names
273
     */
274
    public List getStoreProviders();
275

    
276
    /**
277
     * Returns a list of Strings containing the names of all available DataStore
278
     * providers for an explorer.
279
     *
280
     * @param name
281
     * @return
282
     */
283
    public List<String> getStoreProviders(String name);
284

    
285
    /*
286
     * ====================================================================
287
     *
288
     * Explorer related services
289
     */
290
    /**
291
     * Returns an instance of {@link DataServerExplorerParameters} corresponding
292
     * to the given name.
293
     *
294
     * @param name name of a registered server explorer provider
295
     * @return
296
     *
297
     * @throws InitializeException if parameter initialization causes an error.
298
     *
299
     * @throws ProviderNotRegisteredException if could not find a provider by
300
     * the given name.
301
     *
302
     *
303
     */
304
    public DataServerExplorerParameters createServerExplorerParameters(
305
            String name)
306
            throws InitializeException, ProviderNotRegisteredException;
307

    
308
    /**
309
     * Returns an instance of {@link DataServerExplorer} given its parameters.
310
     *
311
     * @param name
312
     * @param parameters parameters used to instantiate and initialize the
313
     * {@link DataServerExplorer}.
314
     *
315
     * @return an instance of {@link DataServerExplorer}.
316
     *
317
     * @throws InitializeException
318
     *
319
     * @throws ProviderNotRegisteredException
320
     * @throws ValidateDataParametersException
321
     */
322
    public DataServerExplorer openServerExplorer(
323
            String name,
324
            DataServerExplorerParameters parameters)
325
            throws InitializeException, ProviderNotRegisteredException,
326
            ValidateDataParametersException;
327

    
328
    public DataServerExplorer openServerExplorer(
329
            String explorerName,
330
            Object... arguments)
331
        throws
332
            InitializeException,
333
            ProviderNotRegisteredException,
334
            ValidateDataParametersException;
335
    /**
336
     * @param parameters
337
     * @return
338
     * @throws org.gvsig.fmap.dal.exception.InitializeException
339
     * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
340
     * @throws org.gvsig.fmap.dal.exception.ValidateDataParametersException
341
     * @deprecated see openServerExplorer
342
     */
343
    public DataServerExplorer createServerExplorer(
344
            DataServerExplorerParameters parameters)
345
            throws InitializeException, ProviderNotRegisteredException,
346
            ValidateDataParametersException;
347

    
348
    /**
349
     * @param parameters
350
     * @return
351
     * @throws org.gvsig.fmap.dal.exception.InitializeException
352
     * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
353
     * @throws org.gvsig.fmap.dal.exception.ValidateDataParametersException
354
     * @deprecated see openStore
355
     */
356
    public DataStore createStore(DataStoreParameters parameters)
357
            throws InitializeException, ProviderNotRegisteredException,
358
            ValidateDataParametersException;
359

    
360
    /**
361
     * Returns a list of String containing the names of the available
362
     * DataServerExplorer providers.
363
     *
364
     * @return list of String containing the names of the available
365
     * DataServerExplorer providers.
366
     */
367
    public List<String> getExplorerProviders();
368

    
369
    /**
370
     * Creates an instance of Evaluator that represents the given expression.
371
     *
372
     * @param expression String containing a CQL expression.
373
     * @return instance of Evaluator representing the given expression.
374
     * @throws InitializeException
375
     * @deprecated use createFilter
376
     */
377
    public Evaluator createExpresion(String expression)
378
            throws InitializeException;
379

    
380
    /**
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
     * @deprecated use createFilter
387
     */
388
    public Evaluator createExpresion(Expression expression)
389
            throws InitializeException;
390

    
391
    /**
392
     * Creates an instance of Evaluator that represents the given expression.
393
     *
394
     * @param expression String containing a CQL expression.
395
     * @return instance of Evaluator representing the given expression.
396
     * @throws InitializeException
397
     */
398
    public Evaluator createFilter(String expression)
399
            throws InitializeException;
400

    
401
    /**
402
     * Creates an instance of Evaluator that represents the given expression.
403
     *
404
     * @param expression a Expression with the filter
405
     * @return instance of Evaluator representing the given expression.
406
     * @throws InitializeException
407
     */
408
    public Evaluator createFilter(Expression expression)
409
            throws InitializeException;
410

    
411
    /*
412
     * ====================================================================
413
     *
414
     * Index related services
415
     */
416
    /**
417
     * Returns a list of String containing the names of the available index
418
     * providers.
419
     *
420
     * @return list of strings with the names of the available index providers
421
     */
422
    public List<String> getFeatureIndexProviders();
423

    
424
    /**
425
     * Sets the default DataIndexProvider for the given data type.
426
     *
427
     * @param dataType one of the data types defined in {@link DataTypes}.
428
     * @param name Provider's name
429
     */
430
    public void setDefaultFeatureIndexProviderName(int dataType, String name);
431

    
432
    /**
433
     * Returns the default DataIndexProvider name, given a data type. Data types
434
     * are defined in {@link DataTypes}.
435
     *
436
     * @param dataType one of the constants in {@link DataTypes}.
437
     *
438
     * @return the name of the default {@link FeatureIndexProvider} if there is
439
     * anyone available for the given data type.
440
     */
441
    public String getDefaultFeatureIndexProviderName(int dataType);
442

    
443
    /**
444
     * Utility method to create the {@link DataStoreParameters} to create a
445
     * {@link FeatureStore} based on the {@link MemoryStoreProvider}.
446
     *
447
     * @param autoOrderAttributeName the name of the {@link Feature} attribute
448
     * to be used to order the store {@link Feature}s by default. Set to null if
449
     * you don't want any order by default
450
     * @return the parameters for the memory based store
451
     * @throws InitializeException if there is an error initializing the
452
     * parameters for the memory provider
453
     */
454
    public DataStoreParameters createMemoryStoreParameters(
455
            String autoOrderAttributeName) throws InitializeException;
456

    
457
    /**
458
     * Utility method to create the a {@link FeatureStore} based on the
459
     * {@link MemoryStoreProvider}.
460
     *
461
     * @param autoOrderAttributeName the name of the {@link Feature} attribute
462
     * to be used to order the store {@link Feature}s by default. Set to null if
463
     * you don't want any order by default
464
     * @return the the memory based store
465
     * @throws InitializeException if there is an error initializing the
466
     * parameters for the memory provider
467
     */
468
    public FeatureStore createMemoryStore(String autoOrderAttributeName)
469
            throws InitializeException;
470

    
471
    /**
472
     * Creates a {@link FeaturePagingHelper} to paginate data from a
473
     * {@link FeatureStore}.
474
     *
475
     * @param featureStore to get the {@link Feature}s from
476
     * @param pageSize the page size
477
     * @return a {@link FeaturePagingHelper}
478
     * @throws BaseException if there is an error creating the helper
479
     */
480
    public FeaturePagingHelper createFeaturePagingHelper(
481
            FeatureStore featureStore, int pageSize) throws BaseException;
482

    
483
    /**
484
     * Creates a {@link FeaturePagingHelper} to paginate data from a
485
     * {@link FeatureStore}.
486
     *
487
     * @param featureStore to get the {@link Feature}s from
488
     * @param featureQuery to filter and/or order the data
489
     * @param pageSize the page size
490
     * @return a {@link FeaturePagingHelper}
491
     * @throws BaseException if there is an error creating the helper
492
     */
493
    public FeaturePagingHelper createFeaturePagingHelper(
494
            FeatureStore featureStore, FeatureQuery featureQuery, int pageSize)
495
            throws BaseException;
496

    
497
    public void setOpenErrorHandler(OpenErrorHandler handler);
498

    
499
    public OpenErrorHandler getOpenErrorHandler();
500

    
501
    public DataStoreProviderFactory getStoreProviderFactory(String name);
502

    
503
    public EditableFeatureType createFeatureType();
504
    
505
    public EditableFeatureType createFeatureType(JsonObject json);
506

    
507
    public DataServerExplorerPool getDataServerExplorerPool();
508

    
509
    public void setDataServerExplorerPool(DataServerExplorerPool pool);
510

    
511
    public void setResourcesLoader(ClassLoader loader);
512

    
513
    public void setResourcesLoader(File folder);
514

    
515
    /**
516
     * Return a list of the DataTypes supported for the type of the feature
517
     * attributes. The list is only informative.
518
     *
519
     * @return
520
     */
521
    public List<DataType> getDataTypes();
522

    
523
    public Register getStoreRegister();
524

    
525
    public Register getStoreProviderRegister();
526

    
527
    public Register getServerExplorerRegister();
528

    
529
    public Register getFeatureIndexRegister();
530

    
531
    /**
532
     * Creates a default ExpressionBuilder.
533
     *
534
     * This ExpressionBuilder is not dependent on a data source,
535
     * and is not advisable to use it.
536
     *
537
     * @return the ExpressionBuilder
538
     * @deprecated use ExpressionEvaluatorManager.createExpressionBuilder()
539
     */
540
    public ExpressionBuilder createExpressionBuilder();
541

    
542
    /**
543
         * Returns a list of String containing the names of the available cache providers.
544
         *
545
         * @return
546
         *                 list of strings with the names of the available cache providers
547
         */
548
    public List getFeatureCacheProviders();
549

    
550
        /**
551
         * Returns an instance of {@link DataServerExplorerParameters} corresponding
552
         * to the given name used by the cache to create a store to save the
553
         * retrieved data.
554
         *
555
         * @param name
556
         *            name of a registered feature cache provider
557
     * @return 
558
         *
559
         * @throws InitializeException
560
         *             if parameter initialization causes an error.
561
         *
562
         * @throws ProviderNotRegisteredException
563
         *             if could not find a cache provider by the given name.
564
         *
565
         */
566
        public DynObject createCacheParameters(String name)
567
                        throws InitializeException, ProviderNotRegisteredException;
568

    
569
    /**
570
     * @param providerName
571
     * @param params
572
     * @param overwrite
573
     * @throws DataException
574
     */
575
    public void createFileStore(String providerName, NewDataStoreParameters params, boolean overwrite) throws DataException;
576

    
577
    public FeatureSymbolTable createFeatureSymbolTable();
578
    
579
    public FeatureSymbolTable createFeatureSymbolTable(String name);
580

    
581
    public EditableFeatureAttributeDescriptor createFeatureAttributeDescriptor(String name, int type);
582
    
583
    public FeatureAttributeEmulatorExpression createFeatureAttributeEmulatorExpression(FeatureType type, Expression expression);
584

    
585
    public void registerDataProfile(DataProfile profile);
586

    
587
    public List<DataProfile> getDataProfiles();
588

    
589
    public DataProfile getDataProfile(String name);
590
    
591
    public StoresRepository getStoresRepository();
592
    
593
    public DatabaseWorkspaceManager createDatabaseWorkspaceManager(DataServerExplorerParameters connection);
594
    
595
    public void addDatabaseWorkspace(DatabaseWorkspaceManager DatabaseWorkspace);
596

    
597
    public void removeDatabaseWorkspace(DatabaseWorkspaceManager DatabaseWorkspace);
598

    
599
    public void addDatabaseWorkspaceListener(DatabaseWorkspaceManager.DatabaseWorkspaceListener listener);
600
    
601
    public DatabaseWorkspaceManager getDatabaseWorkspace(String name);
602
    
603
    public DatabaseWorkspaceManager getDatabaseWorkspace(DataStoreParameters params);
604
    
605
    public DatabaseWorkspaceManager getDatabaseWorkspace(DataServerExplorerParameters params);
606

    
607
    public void writeDALResource(ResourcesStorage resources, DataStore store);
608
    
609
    public void writeDALResource(ResourcesStorage resources, FeatureType featureType);
610

    
611
    /**
612
     * Return a 35-40 characters unique identifier.
613
     * 
614
     * @return the unique identifier
615
     */
616
    public String createUniqueID();
617

    
618
    public void clearAvailableValuesCache();
619

    
620
    public DALExpressionBuilder createDALExpressionBuilder();
621
    
622
    public boolean isTheOldRasterRegistered();
623
    
624
    public void addStoreObserver(Observer observer);
625
    
626
    public void removeStoreObserver(Observer observer);
627

    
628
    public String getServerExplorerFromStore(String name);
629
    
630
    public void setMaxSizeForSmallFeatureSelection(long size);
631

    
632
    public long getMaxSizeForSmallFeatureSelection();
633
    
634
    public void registerLargeMap(Factory factory);
635
    
636
    public void registerLargeSet(Factory factory);
637
    
638
    public Map createLargeMap();
639
    
640
    public Set createLargeSet();
641
    
642
    public DataTransaction createTransaction();
643
    
644
    public void putFeaturesInClipboard(FeatureSet set);
645
    
646
    public List<EditableFeature> getFeaturesFromClipboard(
647
            FeatureStore store, 
648
            Predicate<FeatureAttributeDescriptor> attrFilter
649
    ) throws DataException;
650

    
651
    public FeatureRuleExpression createFeatureRuleExpression();
652
    
653
    public DataFactory getStoreFactory(DataStoreParameters parameters);    
654
    
655
    public File getCacheResourcesFolder();
656
    
657
    public void clearAllCachedResources();
658
    
659
    public LabelsCacheForFieldValues createLabelsCacheForFieldValues(Invocable labelFormulaProvider, SimpleTaskStatus status);
660
    
661
    public List<FeatureType> getFeatureTypesFromDAL(byte[] daldata);
662
    
663
    public byte[] getDALBytesFromFeatureType(FeatureType ftype);
664
    
665
    public DataTypeDetector createDataTypeDetector(Locale locale);
666
}