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

History | View | Annotate | Download (5.49 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.DataStoreFactory_v2_4;
30
import org.gvsig.fmap.dal.DataStoreParameters;
31
import org.gvsig.fmap.dal.DataStoreProviderFactory;
32
import org.gvsig.fmap.dal.Register;
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

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

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

    
59
    public void registerStoreProviderFactory(DataStoreProviderFactory factory);
60

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

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

    
86
    public void registerStoreFactory(DataStoreFactory_v2_4 factory);
87

    
88
    public void registerServerExplorerFactory(DataServerExplorerFactory factory);
89

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

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

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

    
121
    /**
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
}