Revision 7270

View differences:

org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java
106 106
	public static void register() {
107 107
		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
108 108
		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
109
			dataman.registerStoreProvider(NAME,
110
					TileProvider.class, TileDataParametersImpl.class);
109
		    dataman.registerStoreProviderFactory(new TileProviderFactory(NAME, DESCRIPTION));
111 110
		}
112 111

  
113 112
		/*if(DALFileLocator.getFilesystemServerExplorerManager() != null)
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProviderFactory.java
1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2017 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.raster.tilecache.io;
24

  
25
import org.gvsig.fmap.dal.DataParameters;
26
import org.gvsig.fmap.dal.DataStoreProvider;
27
import org.gvsig.fmap.dal.DataStoreProviderFactory;
28
import org.gvsig.fmap.dal.exception.InitializeException;
29
import org.gvsig.fmap.dal.spi.AbstractDataStoreProviderFactory;
30
import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
31
import org.gvsig.tools.dynobject.DynObject;
32

  
33

  
34
/**
35
 * @author fdiaz
36
 *
37
 */
38
public class TileProviderFactory extends AbstractDataStoreProviderFactory implements DataStoreProviderFactory {
39

  
40
    /**
41
     * @param name
42
     * @param description
43
     */
44
    protected TileProviderFactory(String name, String description) {
45
        super(name, description);
46
    }
47

  
48
    /* (non-Javadoc)
49
     * @see org.gvsig.fmap.dal.DataFactory#createParameters()
50
     */
51
    @Override
52
    public DynObject createParameters() {
53
        return new TileDataParametersImpl();
54
    }
55

  
56
    /* (non-Javadoc)
57
     * @see org.gvsig.fmap.dal.DataStoreProviderFactory#createProvider(org.gvsig.fmap.dal.DataParameters, org.gvsig.fmap.dal.spi.DataStoreProviderServices)
58
     */
59
    @Override
60
    public DataStoreProvider createProvider(DataParameters arg0, DataStoreProviderServices arg1)
61
        throws InitializeException {
62
        return new TileProvider((TileDataParametersImpl) arg0, arg1);
63
    }
64

  
65
    @Override
66
    public int isTiledSupported() {
67
        return YES;
68
    }
69

  
70
}

Also available in: Unified diff