svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / EditableFeatureAttributeDescriptor.java @ 44149
History | View | Annotate | Download (7.35 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | *
|
||
4 | * Copyright (C) 2007-2013 gvSIG Association.
|
||
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 3
|
||
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 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | */
|
||
24 | 40435 | jjdelcerro | package org.gvsig.fmap.dal.feature; |
25 | |||
26 | 41483 | jjdelcerro | import java.text.DateFormat; |
27 | 40435 | jjdelcerro | import org.cresques.cts.IProjection; |
28 | |||
29 | import org.gvsig.fmap.dal.DataTypes; |
||
30 | import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException; |
||
31 | import org.gvsig.fmap.geom.type.GeometryType; |
||
32 | 44077 | jjdelcerro | import org.gvsig.timesupport.Interval; |
33 | 44128 | jjdelcerro | import org.gvsig.tools.dynobject.DynField; |
34 | 40435 | jjdelcerro | import org.gvsig.tools.evaluator.Evaluator; |
35 | |||
36 | /**
|
||
37 | * This interface represents a FeatureAttributeDescriptor in editable state.
|
||
38 | * To edit a FeatureAttributeDescriptor you have to obtain its instance of
|
||
39 | * EditableFeatureAttributeDescriptor and then perform editing operations on it.
|
||
40 | *
|
||
41 | * Once you have completed the editing you can save the changes to the original
|
||
42 | * FeatureAttributeDescriptor. This is the only way to edit a FeatureAttributeDescriptor.
|
||
43 | */
|
||
44 | public interface EditableFeatureAttributeDescriptor extends |
||
45 | FeatureAttributeDescriptor { |
||
46 | |||
47 | /**
|
||
48 | * Checks attribute integrity
|
||
49 | */
|
||
50 | void checkIntegrity() throws AttributeFeatureTypeIntegrityException; |
||
51 | |||
52 | /**
|
||
53 | * Sets the name
|
||
54 | * @param
|
||
55 | * name to set
|
||
56 | * @return this
|
||
57 | */
|
||
58 | public EditableFeatureAttributeDescriptor setName(String name); |
||
59 | |||
60 | /**
|
||
61 | * Sets the data type
|
||
62 | * @param
|
||
63 | * type one of the constants defined in {@link DataTypes}
|
||
64 | * @return this
|
||
65 | */
|
||
66 | public EditableFeatureAttributeDescriptor setDataType(int type); |
||
67 | |||
68 | 44128 | jjdelcerro | public EditableFeatureAttributeDescriptor setDataProfileName(String dataProfile); |
69 | |||
70 | 40435 | jjdelcerro | /**
|
71 | * Sets the size
|
||
72 | * @param size
|
||
73 | * a size of type int
|
||
74 | * @return this
|
||
75 | *
|
||
76 | */
|
||
77 | public EditableFeatureAttributeDescriptor setSize(int size); |
||
78 | |||
79 | /**
|
||
80 | * Sets the precision
|
||
81 | *
|
||
82 | * @param
|
||
83 | * precision of type int
|
||
84 | *
|
||
85 | * @return this
|
||
86 | */
|
||
87 | public EditableFeatureAttributeDescriptor setPrecision(int precision); |
||
88 | |||
89 | /**
|
||
90 | * Sets the Class to which the related FeatureAttribute can be cast
|
||
91 | *
|
||
92 | * @param theClass
|
||
93 | * Class to which the related FeatureAttribute can be cast
|
||
94 | * @return this
|
||
95 | */
|
||
96 | public EditableFeatureAttributeDescriptor setObjectClass(Class theClass); |
||
97 | |||
98 | /**
|
||
99 | * Sets the number of minimum occurrences
|
||
100 | *
|
||
101 | * @param minimumOccurrences
|
||
102 | *
|
||
103 | * @return this
|
||
104 | */
|
||
105 | public EditableFeatureAttributeDescriptor setMinimumOccurrences(
|
||
106 | int minimumOccurrences);
|
||
107 | |||
108 | /**
|
||
109 | * Sets the maximum number of occurrences
|
||
110 | *
|
||
111 | * @param maximumOccurrences
|
||
112 | *
|
||
113 | * @return
|
||
114 | */
|
||
115 | public EditableFeatureAttributeDescriptor setMaximumOccurrences(
|
||
116 | int maximumOccurrences);
|
||
117 | |||
118 | /**
|
||
119 | * Sets whether the related FeatureAttribute is part of the FeatureType's primary key
|
||
120 | *
|
||
121 | * @param isPrimaryKey
|
||
122 | * true if is part of the primary key
|
||
123 | * @return this
|
||
124 | */
|
||
125 | public EditableFeatureAttributeDescriptor setIsPrimaryKey(
|
||
126 | boolean isPrimaryKey);
|
||
127 | |||
128 | /**
|
||
129 | * Sets the expression evaluator that the FeatureAttribute will use
|
||
130 | * @param evaluator
|
||
131 | * an implementation of DAL's Evaluator interface
|
||
132 | * @return this
|
||
133 | */
|
||
134 | public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator);
|
||
135 | |||
136 | 41335 | jjdelcerro | /**
|
137 | * Sets the {@link FeatureAttributeEmulator} that is used to update the
|
||
138 | * presentation of a field.
|
||
139 | * @param featureAttributeEmulator
|
||
140 | * the {@link FeatureAttributeEmulator} to set.
|
||
141 | */
|
||
142 | public EditableFeatureAttributeDescriptor setFeatureAttributeEmulator(FeatureAttributeEmulator featureAttributeEmulator);
|
||
143 | |||
144 | 40435 | jjdelcerro | /**
|
145 | * Sets whether the related FeatureAttribute is read only
|
||
146 | *
|
||
147 | * @param isReadOnly
|
||
148 | *
|
||
149 | * @return this
|
||
150 | */
|
||
151 | public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly); |
||
152 | |||
153 | /**
|
||
154 | * Sets whether the related FeatureAttribute can have a null value
|
||
155 | *
|
||
156 | * @param allowNull
|
||
157 | * a boolean value determining whether the FeatureAttribute can be null
|
||
158 | *
|
||
159 | * @return this
|
||
160 | */
|
||
161 | public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull); |
||
162 | |||
163 | /**
|
||
164 | * Sets the SRS.
|
||
165 | *
|
||
166 | * @param SRS
|
||
167 | *
|
||
168 | * @return
|
||
169 | */
|
||
170 | public EditableFeatureAttributeDescriptor setSRS(IProjection SRS);
|
||
171 | |||
172 | 44077 | jjdelcerro | public EditableFeatureAttributeDescriptor setInterval(Interval interval);
|
173 | |||
174 | 40435 | jjdelcerro | /**
|
175 | * Sets the geometry type
|
||
176 | *
|
||
177 | * @param geometryType
|
||
178 | *
|
||
179 | * @return this
|
||
180 | * @deprecated use {@link #setGeometryType(GeometryType)} instead
|
||
181 | */
|
||
182 | 42716 | jjdelcerro | public EditableFeatureAttributeDescriptor setGeometryType(int geometryType); |
183 | 40435 | jjdelcerro | |
184 | /**
|
||
185 | * Sets the geometry subtype
|
||
186 | *
|
||
187 | * @param geometrySubType
|
||
188 | *
|
||
189 | * @return this
|
||
190 | * @deprecated use {@link #setGeometryType(GeometryType)} instead
|
||
191 | */
|
||
192 | public EditableFeatureAttributeDescriptor setGeometrySubType(
|
||
193 | int geometrySubType);
|
||
194 | |||
195 | /**
|
||
196 | * Sets the geometry type
|
||
197 | *
|
||
198 | * @param geometryType
|
||
199 | *
|
||
200 | * @return this
|
||
201 | */
|
||
202 | public EditableFeatureAttributeDescriptor setGeometryType(
|
||
203 | GeometryType geometryType); |
||
204 | |||
205 | 42716 | jjdelcerro | public EditableFeatureAttributeDescriptor setGeometryType(int geometrySubType, int geometryType); |
206 | |||
207 | 40435 | jjdelcerro | /**
|
208 | * Sets the default value
|
||
209 | *
|
||
210 | * @param defaultValue
|
||
211 | *
|
||
212 | * @return this
|
||
213 | */
|
||
214 | public EditableFeatureAttributeDescriptor setDefaultValue(
|
||
215 | Object defaultValue);
|
||
216 | |||
217 | /**
|
||
218 | * Sets additional information of the attribute
|
||
219 | * @return TODO
|
||
220 | *
|
||
221 | *
|
||
222 | */
|
||
223 | public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, Object value); |
||
224 | |||
225 | /**
|
||
226 | * Sets whether the related FeatureAttribute is part of the FeatureType's
|
||
227 | * primary key
|
||
228 | *
|
||
229 | * @param isPrimaryKey
|
||
230 | * true if is part of the primary key
|
||
231 | * @return this
|
||
232 | */
|
||
233 | public EditableFeatureAttributeDescriptor setIsAutomatic(
|
||
234 | boolean isAutomatic);
|
||
235 | |||
236 | /**
|
||
237 | * Sets is the attribute is a temporal attribute.
|
||
238 | *
|
||
239 | * @param isTime
|
||
240 | * <code>true</code> if the attribute is temporal
|
||
241 | * @return
|
||
242 | * this
|
||
243 | */
|
||
244 | public EditableFeatureAttributeDescriptor setIsTime(boolean isTime); |
||
245 | |||
246 | 41638 | jjdelcerro | /**
|
247 | * Sets if this attribute is indexed in the table.
|
||
248 | * @param isIndexed
|
||
249 | * @return this
|
||
250 | */
|
||
251 | public EditableFeatureAttributeDescriptor setIsIndexed(boolean isIndexed); |
||
252 | |||
253 | public EditableFeatureAttributeDescriptor setAllowIndexDuplicateds(boolean allowDuplicateds); |
||
254 | |||
255 | public EditableFeatureAttributeDescriptor setIsIndexAscending(boolean ascending); |
||
256 | |||
257 | 40435 | jjdelcerro | /**
|
258 | * Returns the attribute descriptor's name before
|
||
259 | * it was changed or null if never changed
|
||
260 | * @return
|
||
261 | */
|
||
262 | 41483 | jjdelcerro | public String getOriginalName(); |
263 | |||
264 | /**
|
||
265 | * If this attribute is of type Date, then this method set
|
||
266 | * the date format set by the data store.
|
||
267 | *
|
||
268 | * @return
|
||
269 | */
|
||
270 | public EditableFeatureAttributeDescriptor setDateFormat(DateFormat dateFormat); |
||
271 | |||
272 | 40435 | jjdelcerro | } |