Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / VectorialDriver.java @ 6458

History | View | Annotate | Download (2.78 KB)

1 1100 fjp
/* 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 214 fernando
package com.iver.cit.gvsig.fmap.drivers;
42
43 1640 fernando
import java.awt.geom.Rectangle2D;
44
import java.io.IOException;
45
46 408 fernando
import com.hardcode.driverManager.Driver;
47 6323 fjp
import com.hardcode.gdbms.engine.data.driver.DriverException;
48 3271 fjp
import com.iver.cit.gvsig.fmap.core.IGeometry;
49 217 fernando
50
51 214 fernando
/**
52 368 fernando
 * Clase padre de los drivers vectoriales
53 214 fernando
 */
54 1005 vcaballero
public interface VectorialDriver extends Driver {
55 217 fernando
        /**
56
         * Devuelve el tipo de los shapes que hay en el fichero. Pueden haber
57 1005 vcaballero
         * varios tipos de shapes y para indicar esto se devuelve un bitoring de
58
         * los tipos que contiene el fichero. Por ejemplo un fichero que contenga
59
         * textos y lineas devolver? la expresi?n (FShape.LINE | FShape.TEXT)
60 217 fernando
         *
61 1005 vcaballero
         * @return tipo de shape.
62 217 fernando
         */
63
        int getShapeType();
64 1691 fjp
65 5521 caballero
66 1233 fjp
        /**
67 1691 fjp
     * Obtiene el n?mero de geometr?as que contiene
68
     * la capa
69
     *
70
     * @return int
71
     *
72
     * @throws IOException Si se produce alg?n error
73
     */
74
    int getShapeCount() throws IOException;
75 5521 caballero
76 1691 fjp
        /**
77 1233 fjp
         * Devuelve los atributos que necesitemos conocer de un driver.
78
         * Por ejemplo, si se carga en memoria, o cualquier otra cosa que
79
         * necesitemos. Pasa a trav?s del adapter para que una FLayer pueda
80
         * conocer ciertos aspectos del driver que le est? entregando las
81
         * features.
82 5521 caballero
         *
83 1233 fjp
         * @return
84
         */
85
        DriverAttributes getDriverAttributes();
86 1640 fernando
87
88
    /**
89
     * Obtiene el bounding box de la capa
90
     *
91
     * @return Rectangle2D
92
     *
93
     * @throws IOException Si se produce alg?n error
94
     */
95
    Rectangle2D getFullExtent() throws IOException;
96 5521 caballero
97 3271 fjp
    public IGeometry getShape(int index) throws IOException;
98 3952 fjp
99
100 6323 fjp
        void reload() throws IOException, DriverException;
101 5521 caballero
102
103
        boolean isWritable();
104 214 fernando
}