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