root / trunk / libraries / libjni-gdal / src / es / gva / cit / jogr / OGRFieldType.java @ 7765
History | View | Annotate | Download (1.96 KB)
1 |
/**********************************************************************
|
---|---|
2 |
* $Id: OGRFieldType.java 7765 2006-10-03 07:05:18Z nacho $
|
3 |
*
|
4 |
* Name: OGRFieldType.java
|
5 |
* Project: JGDAL. Interface java to gdal (Frank Warmerdam).
|
6 |
* Purpose:
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es
|
8 |
*
|
9 |
**********************************************************************/
|
10 |
/*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es>
|
11 |
|
12 |
This program is free software; you can redistribute it and/or
|
13 |
modify it under the terms of the GNU General Public License
|
14 |
as published by the Free Software Foundation; either version 2
|
15 |
of the License, or (at your option) any later version.
|
16 |
|
17 |
This program is distributed in the hope that it will be useful,
|
18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
GNU General Public License for more details.
|
21 |
|
22 |
You should have received a copy of the GNU General Public License
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25 |
*/
|
26 |
|
27 |
package es.gva.cit.jogr; |
28 |
|
29 |
|
30 |
/**
|
31 |
*
|
32 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
|
33 |
* @version 0.0
|
34 |
* @link http://www.gvsig.gva.es
|
35 |
*/
|
36 |
|
37 |
public class OGRFieldType{ |
38 |
|
39 |
private int tipo; |
40 |
|
41 |
/**
|
42 |
* Asigna el tipo
|
43 |
* @param tipo tipo
|
44 |
*/
|
45 |
|
46 |
public void setType(int tipo){this.tipo=tipo;} |
47 |
|
48 |
/**
|
49 |
* Devuelve el tipo
|
50 |
* @return tipo
|
51 |
*/
|
52 |
|
53 |
public int getType(){return tipo;} |
54 |
|
55 |
/**
|
56 |
* Devuelve el tipo en formato cadena
|
57 |
* @return tipo
|
58 |
*/
|
59 |
|
60 |
public String getStringType(){ |
61 |
switch(tipo){
|
62 |
case 0:return new String("Integer"); |
63 |
case 1:return new String("IntegerList"); |
64 |
case 2:return new String("Real"); |
65 |
case 3:return new String("RealList"); |
66 |
case 4:return new String("String"); |
67 |
case 5:return new String("StringList"); |
68 |
case 6:return new String("WideString"); |
69 |
case 7:return new String("WideStringList"); |
70 |
case 8:return new String("Binary"); |
71 |
} |
72 |
return null; |
73 |
} |
74 |
|
75 |
} |