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 @ 40435
History | View | Annotate | Download (5.03 KB)
1 | 40435 | jjdelcerro | package org.gvsig.fmap.dal.feature; |
---|---|---|---|
2 | |||
3 | import org.cresques.cts.IProjection; |
||
4 | |||
5 | import org.gvsig.fmap.dal.DataTypes; |
||
6 | import org.gvsig.fmap.dal.feature.exception.AttributeFeatureTypeIntegrityException; |
||
7 | import org.gvsig.fmap.geom.type.GeometryType; |
||
8 | import org.gvsig.tools.evaluator.Evaluator; |
||
9 | |||
10 | /**
|
||
11 | * This interface represents a FeatureAttributeDescriptor in editable state.
|
||
12 | * To edit a FeatureAttributeDescriptor you have to obtain its instance of
|
||
13 | * EditableFeatureAttributeDescriptor and then perform editing operations on it.
|
||
14 | *
|
||
15 | * Once you have completed the editing you can save the changes to the original
|
||
16 | * FeatureAttributeDescriptor. This is the only way to edit a FeatureAttributeDescriptor.
|
||
17 | */
|
||
18 | public interface EditableFeatureAttributeDescriptor extends |
||
19 | FeatureAttributeDescriptor { |
||
20 | |||
21 | /**
|
||
22 | * Checks attribute integrity
|
||
23 | */
|
||
24 | void checkIntegrity() throws AttributeFeatureTypeIntegrityException; |
||
25 | |||
26 | /**
|
||
27 | * Sets the name
|
||
28 | * @param
|
||
29 | * name to set
|
||
30 | * @return this
|
||
31 | */
|
||
32 | public EditableFeatureAttributeDescriptor setName(String name); |
||
33 | |||
34 | /**
|
||
35 | * Sets the data type
|
||
36 | * @param
|
||
37 | * type one of the constants defined in {@link DataTypes}
|
||
38 | * @return this
|
||
39 | */
|
||
40 | public EditableFeatureAttributeDescriptor setDataType(int type); |
||
41 | |||
42 | /**
|
||
43 | * Sets the size
|
||
44 | * @param size
|
||
45 | * a size of type int
|
||
46 | * @return this
|
||
47 | *
|
||
48 | */
|
||
49 | public EditableFeatureAttributeDescriptor setSize(int size); |
||
50 | |||
51 | /**
|
||
52 | * Sets the precision
|
||
53 | *
|
||
54 | * @param
|
||
55 | * precision of type int
|
||
56 | *
|
||
57 | * @return this
|
||
58 | */
|
||
59 | public EditableFeatureAttributeDescriptor setPrecision(int precision); |
||
60 | |||
61 | /**
|
||
62 | * Sets the Class to which the related FeatureAttribute can be cast
|
||
63 | *
|
||
64 | * @param theClass
|
||
65 | * Class to which the related FeatureAttribute can be cast
|
||
66 | * @return this
|
||
67 | */
|
||
68 | public EditableFeatureAttributeDescriptor setObjectClass(Class theClass); |
||
69 | |||
70 | /**
|
||
71 | * Sets the number of minimum occurrences
|
||
72 | *
|
||
73 | * @param minimumOccurrences
|
||
74 | *
|
||
75 | * @return this
|
||
76 | */
|
||
77 | public EditableFeatureAttributeDescriptor setMinimumOccurrences(
|
||
78 | int minimumOccurrences);
|
||
79 | |||
80 | /**
|
||
81 | * Sets the maximum number of occurrences
|
||
82 | *
|
||
83 | * @param maximumOccurrences
|
||
84 | *
|
||
85 | * @return
|
||
86 | */
|
||
87 | public EditableFeatureAttributeDescriptor setMaximumOccurrences(
|
||
88 | int maximumOccurrences);
|
||
89 | |||
90 | /**
|
||
91 | * Sets whether the related FeatureAttribute is part of the FeatureType's primary key
|
||
92 | *
|
||
93 | * @param isPrimaryKey
|
||
94 | * true if is part of the primary key
|
||
95 | * @return this
|
||
96 | */
|
||
97 | public EditableFeatureAttributeDescriptor setIsPrimaryKey(
|
||
98 | boolean isPrimaryKey);
|
||
99 | |||
100 | /**
|
||
101 | * Sets the expression evaluator that the FeatureAttribute will use
|
||
102 | * @param evaluator
|
||
103 | * an implementation of DAL's Evaluator interface
|
||
104 | * @return this
|
||
105 | */
|
||
106 | public EditableFeatureAttributeDescriptor setEvaluator(Evaluator evaluator);
|
||
107 | |||
108 | /**
|
||
109 | * Sets whether the related FeatureAttribute is read only
|
||
110 | *
|
||
111 | * @param isReadOnly
|
||
112 | *
|
||
113 | * @return this
|
||
114 | */
|
||
115 | public EditableFeatureAttributeDescriptor setIsReadOnly(boolean isReadOnly); |
||
116 | |||
117 | /**
|
||
118 | * Sets whether the related FeatureAttribute can have a null value
|
||
119 | *
|
||
120 | * @param allowNull
|
||
121 | * a boolean value determining whether the FeatureAttribute can be null
|
||
122 | *
|
||
123 | * @return this
|
||
124 | */
|
||
125 | public EditableFeatureAttributeDescriptor setAllowNull(boolean allowNull); |
||
126 | |||
127 | /**
|
||
128 | * Sets the SRS.
|
||
129 | *
|
||
130 | * @param SRS
|
||
131 | *
|
||
132 | * @return
|
||
133 | */
|
||
134 | public EditableFeatureAttributeDescriptor setSRS(IProjection SRS);
|
||
135 | |||
136 | /**
|
||
137 | * Sets the geometry type
|
||
138 | *
|
||
139 | * @param geometryType
|
||
140 | *
|
||
141 | * @return this
|
||
142 | * @deprecated use {@link #setGeometryType(GeometryType)} instead
|
||
143 | */
|
||
144 | public EditableFeatureAttributeDescriptor setGeometryType(int geometryType); |
||
145 | |||
146 | |||
147 | /**
|
||
148 | * Sets the geometry subtype
|
||
149 | *
|
||
150 | * @param geometrySubType
|
||
151 | *
|
||
152 | * @return this
|
||
153 | * @deprecated use {@link #setGeometryType(GeometryType)} instead
|
||
154 | */
|
||
155 | public EditableFeatureAttributeDescriptor setGeometrySubType(
|
||
156 | int geometrySubType);
|
||
157 | |||
158 | /**
|
||
159 | * Sets the geometry type
|
||
160 | *
|
||
161 | * @param geometryType
|
||
162 | *
|
||
163 | * @return this
|
||
164 | */
|
||
165 | public EditableFeatureAttributeDescriptor setGeometryType(
|
||
166 | GeometryType geometryType); |
||
167 | |||
168 | /**
|
||
169 | * Sets the default value
|
||
170 | *
|
||
171 | * @param defaultValue
|
||
172 | *
|
||
173 | * @return this
|
||
174 | */
|
||
175 | public EditableFeatureAttributeDescriptor setDefaultValue(
|
||
176 | Object defaultValue);
|
||
177 | |||
178 | /**
|
||
179 | * Sets additional information of the attribute
|
||
180 | * @return TODO
|
||
181 | *
|
||
182 | *
|
||
183 | */
|
||
184 | public EditableFeatureAttributeDescriptor setAdditionalInfo(String infoName, Object value); |
||
185 | |||
186 | /**
|
||
187 | * Sets whether the related FeatureAttribute is part of the FeatureType's
|
||
188 | * primary key
|
||
189 | *
|
||
190 | * @param isPrimaryKey
|
||
191 | * true if is part of the primary key
|
||
192 | * @return this
|
||
193 | */
|
||
194 | public EditableFeatureAttributeDescriptor setIsAutomatic(
|
||
195 | boolean isAutomatic);
|
||
196 | |||
197 | /**
|
||
198 | * Sets is the attribute is a temporal attribute.
|
||
199 | *
|
||
200 | * @param isTime
|
||
201 | * <code>true</code> if the attribute is temporal
|
||
202 | * @return
|
||
203 | * this
|
||
204 | */
|
||
205 | public EditableFeatureAttributeDescriptor setIsTime(boolean isTime); |
||
206 | |||
207 | /**
|
||
208 | * Returns the attribute descriptor's name before
|
||
209 | * it was changed or null if never changed
|
||
210 | * @return
|
||
211 | */
|
||
212 | public String getOriginalName(); |
||
213 | } |