gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.impl / src / main / java / org / gvsig / raster / impl / datastruct / legend / RasterLegendIO.java @ 2443
History | View | Annotate | Download (2.24 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 |
package org.gvsig.raster.impl.datastruct.legend; |
23 |
|
24 |
import java.io.File; |
25 |
import java.io.IOException; |
26 |
|
27 |
import org.gvsig.fmap.dal.coverage.datastruct.RasterLegend; |
28 |
import org.gvsig.fmap.dal.coverage.store.props.ColorTable; |
29 |
/**
|
30 |
* Clase de la que debe heredar todo aquel que quiera hacer una clase
|
31 |
* de importaci?n o exportaci?n de una tabla de color.
|
32 |
*
|
33 |
* @version 20/11/2007
|
34 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
|
35 |
*/
|
36 |
public abstract class RasterLegendIO implements RasterLegend { |
37 |
public static String[] formats = {"rmf", "ggr", "gpl"}; |
38 |
|
39 |
public String[] getFormats() { |
40 |
return formats;
|
41 |
} |
42 |
|
43 |
/**
|
44 |
* Devuelve la descripcion a mostrar en los paneles de JFileChooser.
|
45 |
* Si se devuelve null se mostrar? la decripci?n por defecto.
|
46 |
*/
|
47 |
public String getDescription() { |
48 |
return null; |
49 |
} |
50 |
|
51 |
/**
|
52 |
* Lee una tabla de color del fichero pasado por parametro
|
53 |
*
|
54 |
* @param input
|
55 |
* @return
|
56 |
* @throws IOException cuando ha fallado la carga
|
57 |
*/
|
58 |
abstract public ColorTable read(File input) throws IOException; |
59 |
|
60 |
/**
|
61 |
* Guarda una tabla de color en el fichero pasado por parametro
|
62 |
*
|
63 |
* @param colorTable
|
64 |
* @param output
|
65 |
* @throws IOException cuando ha fallado la escritura
|
66 |
*/
|
67 |
abstract public void write(ColorTable colorTable, File output) throws IOException; |
68 |
} |