svn-gvsig-desktop / branches / Fmap_GisPlanet / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / VectorialFileDriver.java @ 1848
History | View | Annotate | Download (2.98 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.fmap.drivers; |
42 |
|
43 |
import java.io.File; |
44 |
import java.io.IOException; |
45 |
|
46 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
47 |
|
48 |
|
49 |
/**
|
50 |
* Interfaz a implementar por los drivers. El constructor no ha de tener
|
51 |
* par?metros y ha de ser r?pido, para las tareas de inicializaci?n de la capa
|
52 |
* se deber? de utilizar initialize.
|
53 |
*/
|
54 |
public interface VectorialFileDriver extends VectorialDriver { |
55 |
/**
|
56 |
* Abre el fichero para una serie de operaciones.
|
57 |
*
|
58 |
* @param f Fichero sobre el que se va a operar
|
59 |
*
|
60 |
* @throws IOException Si se produce alg?n error
|
61 |
*/
|
62 |
void open(File f) throws IOException; |
63 |
|
64 |
/**
|
65 |
* Cuando se terminan las operaciones sobre el fichero se invoca ?ste
|
66 |
* m?todo para cerrar el descriptor que se abri? en f
|
67 |
*
|
68 |
* @throws IOException Si se produce alg?n error
|
69 |
*/
|
70 |
void close() throws IOException; |
71 |
|
72 |
|
73 |
/**
|
74 |
* M?todo invocado una s?la vez durante la ejecuci?n justo antes
|
75 |
* de visualizar una capa. En ?l se deben de hacer las inicializaciones
|
76 |
* necesarias
|
77 |
*
|
78 |
* @throws IOException Si se produce alg?n error
|
79 |
*/
|
80 |
void initialize() throws IOException; |
81 |
|
82 |
/**
|
83 |
* Define los tipos de fichero que puede leer el driver. Si devuelve true,
|
84 |
* el fichero est? aceptado (es de los que el driver puede leer), si
|
85 |
* devuelve false es porque no lo puede leer.
|
86 |
*
|
87 |
* @param f Fichero
|
88 |
*
|
89 |
* @return boolean
|
90 |
*/
|
91 |
boolean accept(File f); |
92 |
|
93 |
/**
|
94 |
* Obtiene del fichero abierto en open la geometr?a index-?sima
|
95 |
*
|
96 |
* @param index ?ndice de la geometr?a que se quiere obtener
|
97 |
*
|
98 |
* @return IGeometry. Construida mediante llamadas a ShapeFactory
|
99 |
*
|
100 |
* @throws IOException Si se produce alg?n error
|
101 |
*/
|
102 |
IGeometry getShape(int index) throws IOException; |
103 |
|
104 |
|
105 |
|
106 |
} |