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