Statistics
| Revision:

gvsig-raster / org.gvsig.raster.gdal / trunk / org.gvsig.raster.gdal / org.gvsig.raster.gdal.io / src / main / java / org / gvsig / raster / gdal / io / GdalDataParameters.java @ 1026

History | View | Annotate | Download (2.75 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
* MA  02110-1301, USA.
20
*
21
*/
22

    
23
package org.gvsig.raster.gdal.io;
24

    
25
import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
26
import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
27
import org.gvsig.tools.ToolsLocator;
28
import org.gvsig.tools.dynobject.DynStruct;
29
import org.gvsig.tools.persistence.PersistenceManager;
30
import org.gvsig.tools.persistence.PersistentState;
31
import org.gvsig.tools.persistence.exception.PersistenceException;
32

    
33
/**
34
 * Parameters for the Gdal provider
35
 * @author Nacho Brodin (nachobrodin@gmail.com)
36
 */
37
public class GdalDataParameters extends AbstractRasterFileDataParameters {
38
    
39
        /*
40
         * (non-Javadoc)
41
         * @see org.gvsig.fmap.dal.DataStoreParameters#getDataStoreName()
42
         */
43
        public String getDataStoreName() {
44
                return GdalProvider.NAME;
45
        }
46
        
47
        /*
48
         * (non-Javadoc)
49
         * @see org.gvsig.fmap.dal.DataStoreParameters#getDescription()
50
         */
51
        public String getDescription() {
52
                return GdalProvider.DESCRIPTION;
53
        }
54
        
55
        /*
56
         * (non-Javadoc)
57
         * @see org.gvsig.raster.impl.store.AbstractRasterDataParameters#loadFromState(org.gvsig.tools.persistence.PersistentState)
58
         */
59
        public void loadFromState(PersistentState state)
60
                        throws PersistenceException {
61
                super.loadFromState(state);
62
        }
63

    
64
        /*
65
         * (non-Javadoc)
66
         * @see org.gvsig.raster.impl.store.AbstractRasterDataParameters#saveToState(org.gvsig.tools.persistence.PersistentState)
67
         */
68
        public void saveToState(PersistentState state) throws PersistenceException {
69
                super.saveToState(state);
70
        }        
71
        
72
        public static void registerPersistence() {
73
                PersistenceManager manager = ToolsLocator.getPersistenceManager();
74
                DynStruct definition = manager.getDefinition("GdalDataParameters_Persistent");
75
                if( definition == null ) {
76
                        definition = manager.addDefinition(
77
                                        GdalDataParameters.class,
78
                                        "GdalDataParameters_Persistent",
79
                                        "GdalDataParameters Persistent",
80
                                        null, 
81
                                        null
82
                        );
83
                        AbstractRasterDataParameters.registerPersistence(definition);
84
                }
85
        }
86
}