root / branches / Mobile_Compatible_Hito_1 / libFMap_mobile_shp_driver / src-file / org / gvsig / data / datastores / vectorial / file / shp_util / DBFDataSource.java @ 22037
History | View | Annotate | Download (1.66 KB)
1 |
package org.gvsig.data.datastores.vectorial.file.shp_util; |
---|---|
2 |
|
3 |
import org.gvsig.exceptions.DriverException; |
4 |
|
5 |
/**
|
6 |
* This interface comes from the old data access model, and is used only by the JNI and memory SHP datastores
|
7 |
*
|
8 |
* @author jldominguez
|
9 |
*
|
10 |
*/
|
11 |
public interface DBFDataSource { |
12 |
|
13 |
/**
|
14 |
*
|
15 |
* @return number of firlds in the DBF file
|
16 |
* @throws BaseReadException
|
17 |
*/
|
18 |
int getFieldCount() throws BaseReadException; |
19 |
|
20 |
/**
|
21 |
* Gets the type of the i-th field
|
22 |
* @param i the index of the field of interest
|
23 |
* @return the type of the i-th field
|
24 |
* @throws BaseReadException
|
25 |
*/
|
26 |
int getFieldType(int i) throws BaseReadException; |
27 |
|
28 |
/**
|
29 |
* Gets the name of the i-th field
|
30 |
* @param i the index of the field of interest
|
31 |
* @return the name of the i-th field
|
32 |
* @throws BaseReadException
|
33 |
*/
|
34 |
String getFieldName(int i) throws BaseReadException; |
35 |
|
36 |
/**
|
37 |
* Gets the width of the i-th field
|
38 |
* @param i the index of the field of interest
|
39 |
* @return the width of the i-th field
|
40 |
* @throws BaseReadException
|
41 |
*/
|
42 |
int getFieldWidth(int i) throws BaseReadException; |
43 |
|
44 |
/**
|
45 |
*
|
46 |
* @return the name of this data source
|
47 |
*/
|
48 |
String getName();
|
49 |
|
50 |
/**
|
51 |
* Gets the index of a field from its name
|
52 |
* @param desc_fname the name of the field of interest
|
53 |
* @return the index of the field
|
54 |
* @throws BaseReadException
|
55 |
*/
|
56 |
int getFieldIndexByName(String desc_fname) throws BaseReadException; |
57 |
|
58 |
/**
|
59 |
* gets the value of a field
|
60 |
* @param i row index
|
61 |
* @param ind field index
|
62 |
* @return an object with the value. The returned class depends on the field type (Integer, Double, Date, etc.)
|
63 |
* @throws BaseReadException
|
64 |
*/
|
65 |
Object getFieldValue(long i, int ind) throws BaseReadException; |
66 |
|
67 |
} |