Statistics
| Revision:

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

History | View | Annotate | Download (5.74 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.spi;
24

    
25
import java.io.InputStream;
26
import java.net.URL;
27
import org.gvsig.fmap.dal.DataManager;
28
import org.gvsig.fmap.dal.DataServerExplorerFactory;
29
import org.gvsig.fmap.dal.DataStore;
30
import org.gvsig.fmap.dal.DataStoreFactory_v2_4;
31
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
import org.gvsig.tools.dynobject.DynObjectValueItem;
40

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

    
47
    /**
48
     *
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
     */
58
    public DataStoreProvider createProvider(DataStoreProviderServices providerServices, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException;
59

    
60
    public void registerStoreProviderFactory(DataStoreProviderFactory factory);
61

    
62
    /**
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

    
70
    /**
71
     * Returns a DataIndexProvider compatible with the attribute data type.
72
     *
73
     * @param name
74
     * @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
     */
82
    public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type,
83
            String indexName,
84
            FeatureAttributeDescriptor attr) throws InitializeException,
85
            ProviderNotRegisteredException;
86

    
87
    public void registerStoreFactory(DataStoreFactory_v2_4 factory);
88

    
89
    public void registerServerExplorerFactory(DataServerExplorerFactory factory);
90

    
91
    /**
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

    
100
    /**
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

    
110
    /**
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

    
122
    /**
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

    
152
    public DataStore openStore(DataStoreParameters parameters, DataStoreProvider provider);
153

    
154
    public DynObjectValueItem[] getAvailableValues(FeatureStore myStore, FeatureAttributeDescriptor descriptor);
155
}