Statistics
| Revision:

svn-gvsig-desktop / tags / v1_1_Build_1003 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / IVectorialDatabaseDriver.java @ 12271

History | View | Annotate | Download (4.18 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.iver.cit.gvsig.fmap.DriverException;
46
import com.iver.cit.gvsig.fmap.core.IFeature;
47
import com.iver.cit.gvsig.fmap.layers.XMLException;
48
import com.iver.utiles.XMLEntity;
49

    
50
public interface IVectorialDatabaseDriver extends  VectorialDriver {
51
    /**
52
     * @param conn
53
     * @param tableName
54
     * @param fields (Todos los campos, el primero ha de ser el de las geometr?as
55
     * @param whereClause
56
     * @param id_FID_field El identificador del campo que contiene una clave ?nica. 1=> primer campo, 2 => segundo campo, etc
57
     *
58
     */
59
    // public void setData(Connection conn, String tableName, String fields, String whereClause, int id_FID_field);
60
    public Rectangle2D getFullExtent();
61
    public int getShapeType();
62

    
63
    public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG) throws DriverException;
64
    public IFeatureIterator getFeatureIterator(Rectangle2D r, String strEPSG, String[] alphaNumericFieldsNeeded) throws DriverException;
65
        public String[] getFields();
66
        public String getWhereClause();
67
        public String getTableName();
68
        public void close();
69
    public void open() throws com.iver.cit.gvsig.fmap.DriverException;
70
    /**
71
     * @param FID
72
     * @return el n?mero de registro asociado a ese FID. Se usa dentro
73
     * del DBStrategy para averig?ar si un Feature est? seleccionado
74
     * o no.
75
     */
76
    public int getRowIndexByFID(IFeature FID);
77
    public String getGeometryField(String fieldName);
78

    
79
    public XMLEntity getXMLEntity();
80
    /**
81
     * Para evitar que una clase no se pueda instanciar,
82
     * el setXMLEntity deber?a devolver una referencia
83
     * a la clase que crea. Ya vorem.
84
     */
85
    public void setXMLEntity(XMLEntity xml) throws XMLException;
86

    
87
    /**
88
     * @return information about catalog, fields, tablename, etc
89
     */
90
    public DBLayerDefinition getLyrDef();
91

    
92
    /**
93
     * This method is called by FLyrVect when its goig to be removed from the
94
     * view. The driver can then do what it has to do.
95
     *
96
     */
97
        public void remove();
98
        public void load() throws DriverException;
99
        public IConnection getConnection();
100
        public String getConnectionString(String _host, String _port, String _db, String _user, String _pw);
101
        public int getDefaultPort();
102
        public String getConnectionStringBeginning();
103
        public void setData(IConnection conn, DBLayerDefinition lyrDef);
104
        public String[] getAllFields(IConnection conn, String tableName) throws DBException;
105
        public String[] getAllFieldTypeNames(IConnection conn, String tableName) throws DBException;
106
        public String[] getIdFieldsCandidates(IConnection conn, String tableName) throws DBException;
107
        public String[] getGeometryFieldsCandidates(IConnection conn, String tableName)throws DBException;
108
        public void setWorkingArea(Rectangle2D _wa);
109
        public String[] getTableNames(IConnection conex, String dbName) throws DBException;
110
        public Rectangle2D getWorkingArea();
111
//        public String[] getTableFields(IConnection conex,String table) throws DBException;
112

    
113
}