root / trunk / libraries / libArcIMS / src / org / gvsig / remoteClient / arcims / utils / FieldInformation.java @ 8109
History | View | Annotate | Download (3.19 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2006 Prodevelop 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 |
* Prodevelop Integraci?n de Tecnolog?as SL
|
34 |
* Conde Salvatierra de ?lava , 34-10
|
35 |
* 46004 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963 510 612
|
39 |
* +34 963 510 968
|
40 |
* gis@prodevelop.es
|
41 |
* http://www.prodevelop.es
|
42 |
*/
|
43 |
|
44 |
/**
|
45 |
*
|
46 |
*/
|
47 |
package org.gvsig.remoteClient.arcims.utils; |
48 |
|
49 |
|
50 |
/**
|
51 |
* Class that represents the attributes information offered by an ArcIMS Server
|
52 |
* @author jsanz
|
53 |
*/
|
54 |
public class FieldInformation { |
55 |
//Constants for types
|
56 |
public final static int ID = -99; |
57 |
public final static int SHAPE = -98; |
58 |
public final static int BOOLEAN = -7; |
59 |
public final static int BIGINT = -5; |
60 |
public final static int INTEGER = 4; |
61 |
public final static int SMALLINT = 5; |
62 |
public final static int FLOAT = 6; |
63 |
public final static int DOUBLE = 8; |
64 |
public final static int STRING = 12; |
65 |
public final static int DATE = 91; |
66 |
|
67 |
/**
|
68 |
* Name of the field
|
69 |
*/
|
70 |
private String name; |
71 |
|
72 |
/**
|
73 |
* Type of field (see static constants)
|
74 |
*/
|
75 |
private int type; |
76 |
|
77 |
/**
|
78 |
* Field size
|
79 |
*/
|
80 |
private int size; |
81 |
|
82 |
/**
|
83 |
* Field precision
|
84 |
*/
|
85 |
private int precision; |
86 |
|
87 |
/**
|
88 |
* @return Returns the name.
|
89 |
*/
|
90 |
public String getName() { |
91 |
return name;
|
92 |
} |
93 |
|
94 |
/**
|
95 |
* @param name The name to set.
|
96 |
*/
|
97 |
public void setName(String name) { |
98 |
this.name = name;
|
99 |
} |
100 |
|
101 |
/**
|
102 |
* @return Returns the precision.
|
103 |
*/
|
104 |
public int getPrecision() { |
105 |
return precision;
|
106 |
} |
107 |
|
108 |
/**
|
109 |
* @param precision The precision to set.
|
110 |
*/
|
111 |
public void setPrecision(int precision) { |
112 |
this.precision = precision;
|
113 |
} |
114 |
|
115 |
/**
|
116 |
* @return Returns the size.
|
117 |
*/
|
118 |
public int getSize() { |
119 |
return size;
|
120 |
} |
121 |
|
122 |
/**
|
123 |
* @param size The size to set.
|
124 |
*/
|
125 |
public void setSize(int size) { |
126 |
this.size = size;
|
127 |
} |
128 |
|
129 |
/**
|
130 |
* @return Returns the type.
|
131 |
*/
|
132 |
public int getType() { |
133 |
return type;
|
134 |
} |
135 |
|
136 |
/**
|
137 |
* @param type The type to set.
|
138 |
*/
|
139 |
public void setType(int type) { |
140 |
this.type = type;
|
141 |
} |
142 |
|
143 |
public String toString() { |
144 |
return "FI: " + name + "(" + type + ")"; |
145 |
} |
146 |
} |