gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / util / ProviderServices.java @ 746
History | View | Annotate | Download (4.79 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.fmap.dal.coverage.util; |
23 |
|
24 |
import java.util.ArrayList; |
25 |
|
26 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
27 |
import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException; |
28 |
import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters; |
29 |
import org.gvsig.fmap.dal.exception.InitializeException; |
30 |
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException; |
31 |
|
32 |
|
33 |
/**
|
34 |
* Providers information
|
35 |
* @author Nacho Brodin nachobrodin@gmail.com
|
36 |
*/
|
37 |
public interface ProviderServices { |
38 |
|
39 |
/**
|
40 |
* Obtiene la lista de extensiones registradas
|
41 |
* @return Lista de extensiones registradas o null si no hay ninguna
|
42 |
*/
|
43 |
public String[] getDriversExtensions(); |
44 |
|
45 |
/**
|
46 |
* Obtiene la lista de extensiones de ficheros sobre los que se puede salvar
|
47 |
* en un determinado tipo de datos. Como par?metro de la funci?n se especifica
|
48 |
* el tipo de datos sobre el que se desea consultar. Este m?todo consulta para
|
49 |
* cada driver registrado que extensiones soportan un tipo.
|
50 |
*
|
51 |
* @param dataType Tipo de datos
|
52 |
* @param bands Numero de bandas
|
53 |
* @param reprojectable Especifica si devuelve solo los formatos reproyectables
|
54 |
* @return Lista de extensiones registradas que soportan el tipo de datos
|
55 |
* pasado por par?metro.
|
56 |
* @throws RasterDriverException
|
57 |
*/
|
58 |
public ArrayList<String> getExtensionsSupported(int dataType, int bands, boolean reprojectable) throws RasterDriverException; |
59 |
|
60 |
/**
|
61 |
* Obtiene la lista de tipos de driver
|
62 |
* @return Lista de tipos de driver registradas o null si no hay ninguno
|
63 |
*/
|
64 |
public String[] getWriteDriversType(); |
65 |
|
66 |
/**
|
67 |
* Obtiene el tipo de driver a partir de la extensi?n
|
68 |
* @param ext Extensi?n
|
69 |
* @return Tipo
|
70 |
*/
|
71 |
public String getWriteDriverType(String ext); |
72 |
|
73 |
/**
|
74 |
* Devuelve el n?mero de drivers soportados
|
75 |
* @return N?mero de drivers soportados
|
76 |
*/
|
77 |
public int getWriteNDrivers(); |
78 |
|
79 |
/**
|
80 |
* Devuelve el n?mero de tipos de driver registrados
|
81 |
* @return N?mero de tipos de driver soportados
|
82 |
*/
|
83 |
public int getWriteNTypes(); |
84 |
|
85 |
|
86 |
/**
|
87 |
* M?todo que pregunta si la extensi?n pasada por par?metro est? soportada con
|
88 |
* el tipo y n?mero de bandas indicadas.
|
89 |
*
|
90 |
* @param dataType Tipo de dato
|
91 |
* @param bands N?mero de bandas
|
92 |
* @param extensi?n
|
93 |
* @return true si est? soportada y false si no lo est?
|
94 |
*/
|
95 |
public boolean isSupportedThisFileToWrite(String ext, int dataType, int bands); |
96 |
|
97 |
/**
|
98 |
* Guarda en el fichero file (en formato RMF) el objecto value usando el serializador que trata
|
99 |
* las clases class1.
|
100 |
*
|
101 |
* Si el fichero RMF no existe se crea. Ha de ser un RMF de formato valido.
|
102 |
*
|
103 |
* @param file
|
104 |
* @param class1
|
105 |
* @param value
|
106 |
* @throws RmfSerializerException
|
107 |
*/
|
108 |
@SuppressWarnings("unchecked") |
109 |
public void saveObjectToRmfFile(String file, Class class1, Object value) throws RmfSerializerException; |
110 |
|
111 |
/**
|
112 |
* Guarda en el fichero file (en formato RMF) el objecto value usando el serializador que trata
|
113 |
* la misma clase que el objeto value.
|
114 |
*
|
115 |
* Si el fichero RMF no existe se crea. Ha de ser un RMF de formato valido.
|
116 |
*
|
117 |
* @param file
|
118 |
* @param value
|
119 |
* @throws RmfSerializerException
|
120 |
*/
|
121 |
public void saveObjectToRmfFile(String file, Object value) throws RmfSerializerException; |
122 |
|
123 |
/**
|
124 |
* Builds a RasterStoreParameters using a file name.
|
125 |
* It is only valid for files.
|
126 |
*/
|
127 |
public RasterDataParameters createParameters(String id); |
128 |
|
129 |
/**
|
130 |
* Builds a RasterStoreParameters using a file name.
|
131 |
* It is only valid for files but the provider will be not tiled
|
132 |
* @throws ProviderNotRegisteredException
|
133 |
* @throws InitializeException
|
134 |
*/
|
135 |
public RasterDataParameters createNotTiledParameters(String id) throws InitializeException, ProviderNotRegisteredException; |
136 |
|
137 |
/**
|
138 |
* Builds a RasterStoreParameters using a file name. If exists more than one
|
139 |
* provider which support this file this method will return a list of parameters
|
140 |
* It is only valid for files.
|
141 |
*/
|
142 |
public ArrayList<RasterDataParameters> createParametersList(String id); |
143 |
} |