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