Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / VectorialDriver.java @ 10627

History | View | Annotate | Download (2.9 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.awt.geom.Rectangle2D;
44

    
45
import com.hardcode.driverManager.Driver;
46
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
47
import com.hardcode.gdbms.driver.exceptions.ReloadDriverException;
48
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException;
49
import com.iver.cit.gvsig.fmap.core.IGeometry;
50

    
51

    
52
/**
53
 * Clase padre de los drivers vectoriales
54
 */
55
public interface VectorialDriver extends Driver {
56
        /**
57
         * Devuelve el tipo de los shapes que hay en el fichero. Pueden haber
58
         * varios tipos de shapes y para indicar esto se devuelve un bitoring de
59
         * los tipos que contiene el fichero. Por ejemplo un fichero que contenga
60
         * textos y lineas devolver? la expresi?n (FShape.LINE | FShape.TEXT)
61
         *
62
         * @return tipo de shape.
63
         */
64
        int getShapeType();
65

    
66

    
67
        /**
68
     * Obtiene el n?mero de geometr?as que contiene
69
     * la capa
70
     *
71
     * @return int
72
         * @throws ReadDriverException TODO
73
     */
74
    int getShapeCount() throws ReadDriverException;
75

    
76
        /**
77
         * 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
         *
83
         * @return
84
         */
85
        DriverAttributes getDriverAttributes();
86

    
87

    
88
    /**
89
     * Obtiene el bounding box de la capa
90
     *
91
     * @return Rectangle2D
92
     * @throws ReadDriverException TODO
93
     */
94
    Rectangle2D getFullExtent() throws ReadDriverException, ExpansionFileReadException;
95

    
96
    public IGeometry getShape(int index) throws ReadDriverException;
97

    
98

    
99
        void reload() throws ReloadDriverException;
100

    
101

    
102
        boolean isWritable();
103
}