Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / spi / DataManagerProviderServices.java @ 29391

History | View | Annotate | Download (3.21 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
27

    
28
package org.gvsig.fmap.dal.spi;
29

    
30
import org.gvsig.fmap.dal.DataManager;
31
import org.gvsig.fmap.dal.DataTypes;
32
import org.gvsig.fmap.dal.exception.InitializeException;
33
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
34
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
35
import org.gvsig.fmap.dal.feature.FeatureStore;
36
import org.gvsig.fmap.dal.feature.FeatureType;
37
import org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProviderServices;
38

    
39

    
40
/**
41
 * Inteface of DataManager of Services for data providers
42
 *
43
 * @author jmvivo
44
 *
45
 */
46
public interface DataManagerProviderServices extends DataManager {
47

    
48
        public void registerStoreProvider(String name,
49
                        Class dataStoreProviderClass,
50
                        Class parametersClass);
51

    
52
        /**
53
         * Register a new provider of data server explorer
54
         *
55
         * FIXME
56
         *
57
         * @param <code>name</code> of de provider
58
         * @param dataSourceClass
59
         *            class of provider
60
         * @param parametersClass
61
         *            parameters class of provider
62
         */
63
        public void registerExplorerProvider(String name,
64
                        Class dataSourceClass, Class parametersClass);
65

    
66

    
67
    /**
68
     * Registers a new feature index provider.
69
     *
70
     * @param name
71
     *                         provider's name
72
     *
73
     * @param description
74
     *                         provider's description
75
     *
76
     * @param clazz
77
     *                         a custom FeatureIndexProvider implementation
78
     *
79
     * @param dataType
80
     *                         one of the constants in {@link DataTypes}. This means that this provider
81
     *                         can build indexes based on attributes of this type.
82
     */
83
        public void registerFeatureIndexProvider(String name, String description, Class clazz, int dataType);
84

    
85
        /**
86
         * Returns a DataIndexProvider compatible with the attribute data type.
87
         *
88
         * @param store
89
         *            associated FeatureStore
90
         * @param type
91
         *            associated FeatureType
92
         * @param attr
93
         *            associated FeatureAttributeDescriptor
94
         * @param providerNames
95
         *            array of strings containing one or more preferred providers
96
         * @return empty DataIndexProvider, initialized and ready to use
97
         */
98
        public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type,
99
                        String indexName,
100
                        FeatureAttributeDescriptor attr) throws InitializeException,
101
                        ProviderNotRegisteredException;
102

    
103

    
104
}