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 @ 44419
History | View | Annotate | Download (5.74 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.spi; |
||
24 | |||
25 | 43020 | jjdelcerro | import java.io.InputStream; |
26 | import java.net.URL; |
||
27 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.DataManager; |
28 | 43020 | jjdelcerro | import org.gvsig.fmap.dal.DataServerExplorerFactory; |
29 | 44253 | jjdelcerro | import org.gvsig.fmap.dal.DataStore; |
30 | 43020 | jjdelcerro | import org.gvsig.fmap.dal.DataStoreFactory_v2_4; |
31 | 40435 | jjdelcerro | import org.gvsig.fmap.dal.DataStoreParameters; |
32 | import org.gvsig.fmap.dal.DataStoreProviderFactory; |
||
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.index.FeatureIndexProviderServices; |
||
39 | 44376 | jjdelcerro | import org.gvsig.tools.dynobject.DynObjectValueItem; |
40 | 40435 | jjdelcerro | |
41 | /**
|
||
42 | * Inteface of DataManager of Services for data providers
|
||
43 | *
|
||
44 | */
|
||
45 | public interface DataManagerProviderServices extends DataManager { |
||
46 | |||
47 | 42891 | jjdelcerro | /**
|
48 | 43020 | jjdelcerro | *
|
49 | * Creates a new instance of the provider associated to the passed
|
||
50 | * parameters.
|
||
51 | *
|
||
52 | * @param providerServices
|
||
53 | * @param parameters
|
||
54 | * @return
|
||
55 | * @throws InitializeException
|
||
56 | * @throws ProviderNotRegisteredException
|
||
57 | 42891 | jjdelcerro | */
|
58 | 43020 | jjdelcerro | public DataStoreProvider createProvider(DataStoreProviderServices providerServices, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException; |
59 | 40435 | jjdelcerro | |
60 | 43020 | jjdelcerro | public void registerStoreProviderFactory(DataStoreProviderFactory factory); |
61 | 40435 | jjdelcerro | |
62 | 43020 | jjdelcerro | /**
|
63 | * Este metodo es temporal hasta que se integre el nuevo raster en el core
|
||
64 | * de gvSIG.
|
||
65 | *
|
||
66 | * @param rasterStoreClass
|
||
67 | */
|
||
68 | public void registerDefaultRasterStore(Class rasterStoreClass); |
||
69 | 40435 | jjdelcerro | |
70 | /**
|
||
71 | 43020 | jjdelcerro | * Returns a DataIndexProvider compatible with the attribute data type.
|
72 | 40435 | jjdelcerro | *
|
73 | * @param name
|
||
74 | 43020 | jjdelcerro | * @param store associated FeatureStore
|
75 | * @param type associated FeatureType
|
||
76 | * @param indexName
|
||
77 | * @param attr associated FeatureAttributeDescriptor
|
||
78 | * @return empty DataIndexProvider, initialized and ready to use
|
||
79 | * @throws org.gvsig.fmap.dal.exception.InitializeException
|
||
80 | * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
|
||
81 | 40435 | jjdelcerro | */
|
82 | 43020 | jjdelcerro | public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type, |
83 | String indexName,
|
||
84 | FeatureAttributeDescriptor attr) throws InitializeException,
|
||
85 | ProviderNotRegisteredException; |
||
86 | 40435 | jjdelcerro | |
87 | 43020 | jjdelcerro | public void registerStoreFactory(DataStoreFactory_v2_4 factory); |
88 | 40435 | jjdelcerro | |
89 | 43020 | jjdelcerro | public void registerServerExplorerFactory(DataServerExplorerFactory factory); |
90 | 40435 | jjdelcerro | |
91 | 43020 | jjdelcerro | /**
|
92 | * @param name
|
||
93 | * @param dataSourceClass class of provider
|
||
94 | * @param parametersClass parameters class of provider
|
||
95 | * @deprecated use registerServerExplorerFactory
|
||
96 | */
|
||
97 | public void registerExplorerProvider(String name, |
||
98 | Class dataSourceClass, Class parametersClass); |
||
99 | 40435 | jjdelcerro | |
100 | 43020 | jjdelcerro | /**
|
101 | * Registers a store factory.
|
||
102 | *
|
||
103 | * @param name
|
||
104 | * @param storeFactoryClass
|
||
105 | * @deprecated use registerStoreFactory
|
||
106 | */
|
||
107 | public void registerStoreFactory(String name, |
||
108 | Class storeFactoryClass);
|
||
109 | 40435 | jjdelcerro | |
110 | 43020 | jjdelcerro | /**
|
111 | * Registers a store .
|
||
112 | *
|
||
113 | * @param name
|
||
114 | * @param dataStoreProviderClass
|
||
115 | * @param parametersClass
|
||
116 | * @deprecated use registerStoreFactory
|
||
117 | */
|
||
118 | public void registerStoreProvider(String name, |
||
119 | Class dataStoreProviderClass,
|
||
120 | Class parametersClass);
|
||
121 | 40435 | jjdelcerro | |
122 | 43020 | jjdelcerro | /**
|
123 | * Return the URL associated to the indicated resource. If the data manager
|
||
124 | * has set a resource loader, use this to search the resource. If this don't
|
||
125 | * contain the indicated resource or the data manager has not set a resource
|
||
126 | * loader, search the resource in the class loader of the object
|
||
127 | * "resourceLoader" indicated as parameter. This is usefull to load the
|
||
128 | * resource files associateds to the xml of parameter and metadad
|
||
129 | * description.
|
||
130 | *
|
||
131 | * @param resourcesLoader
|
||
132 | * @param name
|
||
133 | * @return
|
||
134 | */
|
||
135 | public URL getResource(Object resourcesLoader, String name); |
||
136 | |||
137 | /**
|
||
138 | * Return the InputStream associated to the indicated resource. If the data
|
||
139 | * manager has set a resource loader, use this to search the resource. If
|
||
140 | * this don't contain the indicated resource or the data manager has not set
|
||
141 | * a resource loader, search the resource in the class loader of the object
|
||
142 | * "resourceLoader" indicated as parameter. This is usefull to load the
|
||
143 | * resource files associateds to the xml of parameter and metadad
|
||
144 | * description.
|
||
145 | *
|
||
146 | * @param resourcesLoader
|
||
147 | * @param name
|
||
148 | * @return
|
||
149 | */
|
||
150 | public InputStream getResourceAsStream(Object resourcesLoader, String name); |
||
151 | 43377 | jjdelcerro | |
152 | 44253 | jjdelcerro | public DataStore openStore(DataStoreParameters parameters, DataStoreProvider provider);
|
153 | 44376 | jjdelcerro | |
154 | public DynObjectValueItem[] getAvailableValues(FeatureStore myStore, FeatureAttributeDescriptor descriptor); |
||
155 | 44409 | jjdelcerro | |
156 | 40596 | jjdelcerro | } |