svn-gvsig-desktop / branches / v2_0_0_prep / libraries / org.gvsig.arcims / src / org / gvsig / remoteclient / arcims / utils / FieldInformation.java @ 32669
History | View | Annotate | Download (2.91 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2010 Prodevelop S.L. main development
|
26 |
* http://www.prodevelop.es
|
27 |
*/
|
28 |
|
29 |
package org.gvsig.remoteclient.arcims.utils; |
30 |
|
31 |
|
32 |
/**
|
33 |
* Class that represents the attributes information offered by an ArcIMS Server
|
34 |
* @author jsanz
|
35 |
* @author vsanjaime version 2.0
|
36 |
*/
|
37 |
public class FieldInformation { |
38 |
//Constants for types
|
39 |
public final static int ID = -99; |
40 |
public final static int SHAPE = -98; |
41 |
public final static int BOOLEAN = -7; |
42 |
public final static int BIGINT = -5; |
43 |
public final static int INTEGER = 4; |
44 |
public final static int SMALLINT = 5; |
45 |
public final static int FLOAT = 6; |
46 |
public final static int DOUBLE = 8; |
47 |
public final static int STRING = 12; |
48 |
public final static int DATE = 91; |
49 |
|
50 |
/**
|
51 |
* Name of the field
|
52 |
*/
|
53 |
private String name; |
54 |
|
55 |
/**
|
56 |
* Type of field (see static constants)
|
57 |
*/
|
58 |
private int type; |
59 |
|
60 |
/**
|
61 |
* Field size
|
62 |
*/
|
63 |
private int size; |
64 |
|
65 |
/**
|
66 |
* Field precision
|
67 |
*/
|
68 |
private int precision; |
69 |
|
70 |
/**
|
71 |
* @return Returns the name.
|
72 |
*/
|
73 |
public String getName() { |
74 |
return name;
|
75 |
} |
76 |
|
77 |
/**
|
78 |
* @param name The name to set.
|
79 |
*/
|
80 |
public void setName(String name) { |
81 |
this.name = name;
|
82 |
} |
83 |
|
84 |
/**
|
85 |
* @return Returns the precision.
|
86 |
*/
|
87 |
public int getPrecision() { |
88 |
return precision;
|
89 |
} |
90 |
|
91 |
/**
|
92 |
* @param precision The precision to set.
|
93 |
*/
|
94 |
public void setPrecision(int precision) { |
95 |
this.precision = precision;
|
96 |
} |
97 |
|
98 |
/**
|
99 |
* @return Returns the size.
|
100 |
*/
|
101 |
public int getSize() { |
102 |
return size;
|
103 |
} |
104 |
|
105 |
/**
|
106 |
* @param size The size to set.
|
107 |
*/
|
108 |
public void setSize(int size) { |
109 |
this.size = size;
|
110 |
} |
111 |
|
112 |
/**
|
113 |
* @return Returns the type.
|
114 |
*/
|
115 |
public int getType() { |
116 |
return type;
|
117 |
} |
118 |
|
119 |
/**
|
120 |
* @param type The type to set.
|
121 |
*/
|
122 |
public void setType(int type) { |
123 |
this.type = type;
|
124 |
} |
125 |
|
126 |
public String toString() { |
127 |
return "FI: " + name + "(" + type + ")"; |
128 |
} |
129 |
} |