Statistics
| Revision:

root / branches / Mobile_Compatible_Hito_1 / libFMap / src / es / prodevelop / gvsig / mobile / fmap / driver / VectorialFileDriver.java @ 21606

History | View | Annotate | Download (3.58 KB)

1 21606 jldominguez
/* 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
/************************************************
42
 *                                                                                                *
43
 *   Modfied By:                                                                *
44
 *   Prodevelop Integraci?n de Tecnolog?as SL        *
45
 *   Conde Salvatierra de ?lava , 34-10                        *
46
 *   46004 Valencia                                                                *
47
 *   Spain                                                                                *
48
 *                                                                                                *
49
 *   +34 963 510 612                                                        *
50
 *   +34 963 510 968                                                        *
51
 *   gis@prodevelop.es                                                        *
52
 *   http://www.prodevelop.es                                        *
53
 *                                                                                                *
54
 *   gvSIG Mobile Team 2006                                         *
55
 *                                                                                          *
56
 ************************************************/
57
58
package es.prodevelop.gvsig.mobile.fmap.driver;
59
60
import java.io.File;
61
import java.io.IOException;
62
63
64
/**
65
 * Interfaz a implementar por los drivers. El constructor no ha de tener
66
 * par?metros y ha de ser r?pido, para las tareas de inicializaci?n de la capa
67
 * se deber? de utilizar initialize.
68
 */
69
public interface VectorialFileDriver extends VectorialDriver {
70
    /**
71
     * Abre el fichero para una serie de operaciones.
72
     *
73
     * @param f Fichero sobre el que se va a operar
74
     *
75
     * @throws IOException Si se produce alg?n error
76
     */
77
    void open(File f) throws IOException;
78
79
    /**
80
     * Cuando se terminan las operaciones sobre el fichero se invoca ?ste
81
     * m?todo para cerrar el descriptor que se abri? en f
82
     *
83
     * @throws IOException Si se produce alg?n error
84
     */
85
    void close() throws IOException;
86
87
88
    /**
89
     * M?todo invocado una s?la vez durante la ejecuci?n justo antes
90
     * de visualizar una capa. En ?l se deben de hacer las inicializaciones
91
     * necesarias
92
     *
93
     * @throws IOException Si se produce alg?n error
94
     */
95
    void initialize() throws IOException;
96
97
    /**
98
     * Define los tipos de fichero que puede leer el driver. Si devuelve true,
99
     * el fichero est? aceptado (es de los que el driver puede leer), si
100
     * devuelve false es porque no lo puede leer.
101
     *
102
     * @param f Fichero
103
     *
104
     * @return boolean
105
     */
106
    boolean accept(File f);
107
108
    /**
109
     * Obtiene del fichero abierto en open la geometr?a index-?sima
110
     *
111
     * @param index ?ndice de la geometr?a que se quiere obtener
112
     *
113
     * @return IGeometry. Construida mediante llamadas a ShapeFactory
114
     *
115
     * @throws IOException Si se produce alg?n error
116
     */
117
    // IGeometry getShape(int index) throws IOException;
118
119
    /**
120
     * @return the original File that we are opening.
121
     */
122
    File getFile();
123
    File getDataFile(File f);
124
125
    String getFilePath();
126
127
128
}