svn-gvsig-desktop / trunk / libraries / libDataSource / src / org / gvsig / data / vectorial / DefaultAttributeDescriptor.java @ 19670
History | View | Annotate | Download (4.67 KB)
1 | 19399 | vcaballero | |
---|---|---|---|
2 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
3 | *
|
||
4 | * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
|
||
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
19 | *
|
||
20 | * For more information, contact:
|
||
21 | *
|
||
22 | * Generalitat Valenciana
|
||
23 | * Conselleria d'Infraestructures i Transport
|
||
24 | * Av. Blasco Ib??ez, 50
|
||
25 | * 46010 VALENCIA
|
||
26 | * SPAIN
|
||
27 | *
|
||
28 | * +34 963862235
|
||
29 | * gvsig@gva.es
|
||
30 | * www.gvsig.gva.es
|
||
31 | *
|
||
32 | * or
|
||
33 | *
|
||
34 | * IVER T.I. S.A
|
||
35 | * Salamanca 50
|
||
36 | * 46005 Valencia
|
||
37 | * Spain
|
||
38 | *
|
||
39 | * +34 963163400
|
||
40 | * dac@iver.es
|
||
41 | */
|
||
42 | |||
43 | package org.gvsig.data.vectorial; |
||
44 | |||
45 | |||
46 | /**
|
||
47 | * DOCUMENT ME!
|
||
48 | *
|
||
49 | * @author Vicente Caballero Navarro
|
||
50 | */
|
||
51 | public class DefaultAttributeDescriptor implements IFeatureAttributeDescriptor { |
||
52 | private String name = null; |
||
53 | private String type = IFeatureAttributeDescriptor.TYPE_STRING; |
||
54 | private int size = 0; |
||
55 | private int precision = 0; |
||
56 | private int minimumOccurrences = 0; |
||
57 | private int maximumOccurences = 0; |
||
58 | private boolean isPrimaryKey = false; |
||
59 | private int ordinal = 0; |
||
60 | private Object defaultValue; |
||
61 | private int geometryType; |
||
62 | private String featureType; |
||
63 | 19414 | vcaballero | private String srs; |
64 | 19620 | jmvivo | private boolean allowNull; |
65 | 19399 | vcaballero | |
66 | 19620 | jmvivo | public DefaultAttributeDescriptor() {
|
67 | 19399 | vcaballero | } |
68 | /* (non-Javadoc)
|
||
69 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getName()
|
||
70 | */
|
||
71 | public String getName() { |
||
72 | return name;
|
||
73 | } |
||
74 | |||
75 | /* (non-Javadoc)
|
||
76 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getDataType()
|
||
77 | */
|
||
78 | public String getDataType() { |
||
79 | return type;
|
||
80 | } |
||
81 | |||
82 | /* (non-Javadoc)
|
||
83 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getSize()
|
||
84 | */
|
||
85 | public int getSize() { |
||
86 | return size;
|
||
87 | } |
||
88 | |||
89 | /* (non-Javadoc)
|
||
90 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getPrecision()
|
||
91 | */
|
||
92 | public int getPrecision() { |
||
93 | return precision;
|
||
94 | } |
||
95 | |||
96 | /**
|
||
97 | * DOCUMENT ME!
|
||
98 | *
|
||
99 | * @return DOCUMENT ME!
|
||
100 | */
|
||
101 | public Class getObjectClass() { |
||
102 | // TODO Auto-generated method stub
|
||
103 | return null; |
||
104 | } |
||
105 | |||
106 | /* (non-Javadoc)
|
||
107 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getMinimumOccurrences()
|
||
108 | */
|
||
109 | public int getMinimumOccurrences() { |
||
110 | return minimumOccurrences;
|
||
111 | } |
||
112 | |||
113 | /* (non-Javadoc)
|
||
114 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#getMaximumOccurrences()
|
||
115 | */
|
||
116 | public int getMaximumOccurrences() { |
||
117 | return maximumOccurences;
|
||
118 | } |
||
119 | |||
120 | /* (non-Javadoc)
|
||
121 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#isPrimaryKey()
|
||
122 | */
|
||
123 | public boolean isPrimaryKey() { |
||
124 | return isPrimaryKey;
|
||
125 | } |
||
126 | |||
127 | /* (non-Javadoc)
|
||
128 | * @see org.gvsig.data.vectorial.IFeatureAttributeDescriptor#ordinal()
|
||
129 | */
|
||
130 | public int ordinal() { |
||
131 | return ordinal;
|
||
132 | } |
||
133 | public void setPrimaryKey(boolean isPrimaryKey) { |
||
134 | this.isPrimaryKey = isPrimaryKey;
|
||
135 | } |
||
136 | public void setMaximumOccurences(int maximumOccurences) { |
||
137 | this.maximumOccurences = maximumOccurences;
|
||
138 | } |
||
139 | public void setMinimumOccurrences(int minimumOccurrences) { |
||
140 | this.minimumOccurrences = minimumOccurrences;
|
||
141 | } |
||
142 | public void setName(String name) { |
||
143 | this.name = name;
|
||
144 | } |
||
145 | public void setOrdinal(int ordinal) { |
||
146 | this.ordinal = ordinal;
|
||
147 | } |
||
148 | public void setPrecision(int precision) { |
||
149 | this.precision = precision;
|
||
150 | } |
||
151 | public void setSize(int size) { |
||
152 | this.size = size;
|
||
153 | } |
||
154 | public void setType(String type) { |
||
155 | this.type = type;
|
||
156 | } |
||
157 | 19414 | vcaballero | public String getSRS() { |
158 | 19399 | vcaballero | return srs;
|
159 | } |
||
160 | 19414 | vcaballero | public void setSRS(String srs) { |
161 | 19399 | vcaballero | this.srs=srs;
|
162 | } |
||
163 | public int getGeometryType() { |
||
164 | return geometryType;
|
||
165 | } |
||
166 | public void setGeometryType(int type){ |
||
167 | this.geometryType=type;
|
||
168 | } |
||
169 | public Object getDefaultValue() { |
||
170 | return defaultValue;
|
||
171 | } |
||
172 | public void setDefaultValue(Object s) { |
||
173 | this.defaultValue=s;
|
||
174 | } |
||
175 | 19620 | jmvivo | |
176 | public boolean isAllowNull() { |
||
177 | return allowNull;
|
||
178 | } |
||
179 | |||
180 | public void setAllowNull(boolean allowNull) { |
||
181 | this.allowNull = allowNull;
|
||
182 | } |
||
183 | |||
184 | 19399 | vcaballero | } |