svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.spi / src / main / java / org / gvsig / fmap / dal / spi / DataManagerProviderServices.java @ 42891
History | View | Annotate | Download (5.41 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
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
|
25 |
package org.gvsig.fmap.dal.spi; |
26 |
|
27 |
import org.gvsig.fmap.dal.DataManager; |
28 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
29 |
import org.gvsig.fmap.dal.DataStoreParameters; |
30 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
31 |
import org.gvsig.fmap.dal.DataTypes; |
32 |
import org.gvsig.fmap.dal.exception.DataException; |
33 |
import org.gvsig.fmap.dal.exception.InitializeException; |
34 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
35 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
36 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
37 |
import org.gvsig.fmap.dal.feature.FeatureType; |
38 |
import org.gvsig.fmap.dal.feature.spi.cache.FeatureCacheProvider; |
39 |
import org.gvsig.fmap.dal.feature.spi.cache.FeatureCacheProviderFactory; |
40 |
import org.gvsig.fmap.dal.feature.spi.index.FeatureIndexProviderServices; |
41 |
import org.gvsig.tools.dynobject.DynObject; |
42 |
|
43 |
|
44 |
/**
|
45 |
* Inteface of DataManager of Services for data providers
|
46 |
*
|
47 |
* @author jmvivo
|
48 |
*
|
49 |
*/
|
50 |
public interface DataManagerProviderServices extends DataManager { |
51 |
|
52 |
/**
|
53 |
*
|
54 |
* @param name
|
55 |
* @param dataStoreProviderClass
|
56 |
* @param parametersClass
|
57 |
* @deprecated Use registerStoreProviderFactory
|
58 |
*/
|
59 |
public void registerStoreProvider(String name, |
60 |
Class dataStoreProviderClass,
|
61 |
Class parametersClass);
|
62 |
|
63 |
/**
|
64 |
* Registers a store factory.
|
65 |
* @param name
|
66 |
* @param storeFactoryClass
|
67 |
*/
|
68 |
public void registerStoreFactory(String name, |
69 |
Class storeFactoryClass);
|
70 |
|
71 |
/**
|
72 |
* Register a new provider of data server explorer
|
73 |
*
|
74 |
* FIXME
|
75 |
*
|
76 |
* @param name
|
77 |
* @param dataSourceClass
|
78 |
* class of provider
|
79 |
* @param parametersClass
|
80 |
* parameters class of provider
|
81 |
*/
|
82 |
public void registerExplorerProvider(String name, |
83 |
Class dataSourceClass, Class parametersClass); |
84 |
|
85 |
|
86 |
/**
|
87 |
* Registers a new feature index provider.
|
88 |
*
|
89 |
* @param name
|
90 |
* provider's name
|
91 |
*
|
92 |
* @param description
|
93 |
* provider's description
|
94 |
*
|
95 |
* @param clazz
|
96 |
* a custom FeatureIndexProvider implementation
|
97 |
*
|
98 |
* @param dataType
|
99 |
* one of the constants in {@link DataTypes}. This means that this provider
|
100 |
* can build indexes based on attributes of this type.
|
101 |
*/
|
102 |
public void registerFeatureIndexProvider(String name, String description, Class clazz, int dataType); |
103 |
|
104 |
/**
|
105 |
* Returns a DataIndexProvider compatible with the attribute data type.
|
106 |
*
|
107 |
* @param name
|
108 |
* @param store
|
109 |
* associated FeatureStore
|
110 |
* @param type
|
111 |
* associated FeatureType
|
112 |
* @param indexName
|
113 |
* @param attr
|
114 |
* associated FeatureAttributeDescriptor
|
115 |
* @return empty DataIndexProvider, initialized and ready to use
|
116 |
* @throws org.gvsig.fmap.dal.exception.InitializeException
|
117 |
* @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
|
118 |
*/
|
119 |
public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type, |
120 |
String indexName,
|
121 |
FeatureAttributeDescriptor attr) throws InitializeException,
|
122 |
ProviderNotRegisteredException; |
123 |
|
124 |
/**
|
125 |
* Registers a new cache provider.
|
126 |
*
|
127 |
*
|
128 |
* @param providerFactory
|
129 |
*/
|
130 |
public void registerFeatureCacheProvider(FeatureCacheProviderFactory providerFactory); |
131 |
|
132 |
/**
|
133 |
* Creates a FeatureCacheProvider from a name and the parameters to configure
|
134 |
* its data server explorer. The cache provider creates new stores using the
|
135 |
* {@link DataServerExplorerParameters}.
|
136 |
* @param name provider's name.
|
137 |
* @param parameters parameters used to create a explorer.
|
138 |
* @return A cache provider
|
139 |
* @throws DataException
|
140 |
*/
|
141 |
public FeatureCacheProvider createFeatureCacheProvider(String name, DynObject parameters) throws DataException; |
142 |
|
143 |
|
144 |
/**
|
145 |
*
|
146 |
* Creates a new instance of the provider associated to the passed parameters.
|
147 |
*
|
148 |
* @param providerServices
|
149 |
* @param parameters
|
150 |
* @return
|
151 |
* @throws InitializeException
|
152 |
* @throws ProviderNotRegisteredException
|
153 |
*/
|
154 |
public DataStoreProvider createProvider(DataStoreProviderServices providerServices, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException; |
155 |
|
156 |
public void registerStoreProviderFactory(DataStoreProviderFactory factory); |
157 |
|
158 |
/**
|
159 |
* Este metodo es temporal hasta que se integre el nuevo raster en el
|
160 |
* core de gvSIG.
|
161 |
*
|
162 |
* @param rasterStoreClass
|
163 |
*/
|
164 |
public void registerDefaultRasterStore(Class rasterStoreClass); |
165 |
} |