Revision 22037 branches/Mobile_Compatible_Hito_1/libFMap_mobile_shp_driver/src-file/org/gvsig/data/datastores/vectorial/file/shp_util/DBFDataSource.java
DBFDataSource.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.gvsig.exceptions.DriverException; |
4 | 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 |
*/ |
|
5 | 11 |
public interface DBFDataSource { |
6 | 12 |
|
13 |
/** |
|
14 |
* |
|
15 |
* @return number of firlds in the DBF file |
|
16 |
* @throws BaseReadException |
|
17 |
*/ |
|
7 | 18 |
int getFieldCount() throws BaseReadException; |
8 | 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 |
*/ |
|
9 | 26 |
int getFieldType(int i) throws BaseReadException; |
10 | 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 |
*/ |
|
11 | 34 |
String getFieldName(int i) throws BaseReadException; |
12 | 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 |
*/ |
|
13 | 42 |
int getFieldWidth(int i) throws BaseReadException; |
14 | 43 |
|
44 |
/** |
|
45 |
* |
|
46 |
* @return the name of this data source |
|
47 |
*/ |
|
15 | 48 |
String getName(); |
16 | 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 |
*/ |
|
17 | 56 |
int getFieldIndexByName(String desc_fname) throws BaseReadException; |
18 | 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 |
*/ |
|
19 | 65 |
Object getFieldValue(long i, int ind) throws BaseReadException; |
20 | 66 |
|
21 | 67 |
} |
Also available in: Unified diff