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

History | View | Annotate | Download (5.81 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.DynObject;
40
import org.gvsig.tools.dynobject.DynObjectValueItem;
41

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

    
48
    /**
49
     *
50
     * Creates a new instance of the provider associated to the passed
51
     * parameters.
52
     *
53
     * @param providerServices
54
     * @param parameters
55
     * @return
56
     * @throws InitializeException
57
     * @throws ProviderNotRegisteredException
58
     */
59
    public DataStoreProvider createProvider(DataStoreProviderServices providerServices, DataStoreParameters parameters) throws InitializeException, ProviderNotRegisteredException;
60

    
61
    public void registerStoreProviderFactory(DataStoreProviderFactory factory);
62

    
63
    /**
64
     * Este metodo es temporal hasta que se integre el nuevo raster en el core
65
     * de gvSIG.
66
     *
67
     * @param rasterStoreClass
68
     */
69
    public void registerDefaultRasterStore(Class rasterStoreClass);
70

    
71
    /**
72
     * Returns a DataIndexProvider compatible with the attribute data type.
73
     *
74
     * @param name
75
     * @param store associated FeatureStore
76
     * @param type associated FeatureType
77
     * @param indexName
78
     * @param attr associated FeatureAttributeDescriptor
79
     * @return empty DataIndexProvider, initialized and ready to use
80
     * @throws org.gvsig.fmap.dal.exception.InitializeException
81
     * @throws org.gvsig.fmap.dal.exception.ProviderNotRegisteredException
82
     */
83
    public FeatureIndexProviderServices createFeatureIndexProvider(String name, FeatureStore store, FeatureType type,
84
            String indexName,
85
            FeatureAttributeDescriptor attr) throws InitializeException,
86
            ProviderNotRegisteredException;
87

    
88
    public void registerStoreFactory(DataStoreFactory_v2_4 factory);
89

    
90
    public void registerServerExplorerFactory(DataServerExplorerFactory factory);
91

    
92
    /**
93
     * @param name
94
     * @param dataSourceClass class of provider
95
     * @param parametersClass parameters class of provider
96
     * @deprecated use registerServerExplorerFactory
97
     */
98
    public void registerExplorerProvider(String name,
99
            Class dataSourceClass, Class parametersClass);
100

    
101
    /**
102
     * Registers a store factory.
103
     *
104
     * @param name
105
     * @param storeFactoryClass
106
     * @deprecated use registerStoreFactory
107
     */
108
    public void registerStoreFactory(String name,
109
            Class storeFactoryClass);
110

    
111
    /**
112
     * Registers a store .
113
     *
114
     * @param name
115
     * @param dataStoreProviderClass
116
     * @param parametersClass
117
     * @deprecated use registerStoreFactory
118
     */
119
    public void registerStoreProvider(String name,
120
            Class dataStoreProviderClass,
121
            Class parametersClass);
122

    
123
    /**
124
     * Return the URL associated to the indicated resource. If the data manager
125
     * has set a resource loader, use this to search the resource. If this don't
126
     * contain the indicated resource or the data manager has not set a resource
127
     * loader, search the resource in the class loader of the object
128
     * "resourceLoader" indicated as parameter. This is usefull to load the
129
     * resource files associateds to the xml of parameter and metadad
130
     * description.
131
     *
132
     * @param resourcesLoader
133
     * @param name
134
     * @return
135
     */
136
    public URL getResource(Object resourcesLoader, String name);
137

    
138
    /**
139
     * Return the InputStream associated to the indicated resource. If the data
140
     * manager has set a resource loader, use this to search the resource. If
141
     * this don't contain the indicated resource or the data manager has not set
142
     * a resource loader, search the resource in the class loader of the object
143
     * "resourceLoader" indicated as parameter. This is usefull to load the
144
     * resource files associateds to the xml of parameter and metadad
145
     * description.
146
     *
147
     * @param resourcesLoader
148
     * @param name
149
     * @return
150
     */
151
    public InputStream getResourceAsStream(Object resourcesLoader, String name);
152

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

    
155
    public DynObjectValueItem[] getAvailableValues(DynObject contextValues, FeatureStore myStore, FeatureAttributeDescriptor descriptor);
156

    
157
}