Revision 32880 branches/v2_0_0_prep/extensions/extWFS2/src/org/gvsig/fmap/dal/store/wfs/WFSStoreParameters.java
WFSStoreParameters.java | ||
---|---|---|
37 | 37 |
import org.gvsig.tools.ToolsLocator; |
38 | 38 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
39 | 39 |
import org.gvsig.tools.dynobject.DynClass; |
40 |
import org.gvsig.tools.dynobject.DynField;
|
|
41 |
import org.gvsig.tools.dynobject.DynObjectManager;
|
|
40 |
import org.gvsig.tools.dynobject.DynStruct;
|
|
41 |
import org.gvsig.tools.persistence.PersistenceManager;
|
|
42 | 42 |
|
43 | 43 |
/** |
44 | 44 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
... | ... | |
122 | 122 |
} |
123 | 123 |
|
124 | 124 |
protected static void registerDynClass() { |
125 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
|
126 |
DynClass dynClass; |
|
127 |
DynField field; |
|
128 | 125 |
if (DYNCLASS == null) { |
129 |
dynClass = dynman.add(DYNCLASS_NAME); |
|
130 |
field = dynClass.addDynField(DYNFIELDNAME_URL); |
|
131 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
132 |
field.setDescription("URL of the WFS server"); |
|
133 |
field.setType(DataTypes.STRING); |
|
134 |
field.setMandatory(true); |
|
126 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
|
127 |
DynStruct definition = manager.addDefinition( |
|
128 |
WFSStoreParameters.class, |
|
129 |
DYNCLASS_NAME, |
|
130 |
"WFSStoreParameters Persistence definition", |
|
131 |
null, |
|
132 |
null |
|
133 |
); |
|
134 |
definition.addDynFieldString(DYNFIELDNAME_URL) |
|
135 |
.setDescription("URL of the WFS server") |
|
136 |
.setMandatory(true); |
|
135 | 137 |
|
136 |
field = dynClass.addDynField(DYNFIELDNAME_VERSION); |
|
137 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
138 |
field.setDescription("Version of the WFS server"); |
|
139 |
field.setType(DataTypes.STRING); |
|
140 |
field.setMandatory(false); |
|
138 |
definition.addDynFieldString(DYNFIELDNAME_VERSION) |
|
139 |
.setDescription("Version of the WFS server") |
|
140 |
.setMandatory(false); |
|
141 | 141 |
|
142 |
field = dynClass.addDynField(DYNFIELDNAME_TYPENAME); |
|
143 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
144 |
field.setDescription("Feature type to retrieve"); |
|
145 |
field.setType(DataTypes.STRING); |
|
146 |
field.setMandatory(true); |
|
142 |
definition.addDynFieldString(DYNFIELDNAME_TYPENAME) |
|
143 |
.setDescription("Feature type to retrieve") |
|
144 |
.setMandatory(true); |
|
147 | 145 |
|
148 |
field = dynClass.addDynField(DYNFIELDNAME_NAMESPACE); |
|
149 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
150 |
field.setDescription("Namespace of the feature type to retrieve"); |
|
151 |
field.setType(DataTypes.STRING); |
|
152 |
field.setMandatory(false); |
|
146 |
definition.addDynFieldString(DYNFIELDNAME_NAMESPACE) |
|
147 |
.setDescription("Namespace of the feature type to retrieve") |
|
148 |
.setMandatory(false); |
|
153 | 149 |
|
154 |
field = dynClass.addDynField(DYNFIELDNAME_NAMESPACEPREFIX); |
|
155 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
156 |
field.setDescription("Prefix of the namespace of the feature type to retrieve"); |
|
157 |
field.setType(DataTypes.STRING); |
|
158 |
field.setMandatory(false); |
|
150 |
definition.addDynFieldString(DYNFIELDNAME_NAMESPACEPREFIX) |
|
151 |
.setDescription("Prefix of the namespace of the feature type to retrieve") |
|
152 |
.setMandatory(false); |
|
159 | 153 |
|
160 |
field = dynClass.addDynField(DYNFIELDNAME_FIELDS); |
|
161 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
162 |
field.setDescription("Fields to retrieve separated by ','"); |
|
163 |
field.setType(DataTypes.STRING); |
|
164 |
field.setMandatory(false); |
|
154 |
definition.addDynFieldString(DYNFIELDNAME_FIELDS) |
|
155 |
.setDescription("Fields to retrieve separated by ','") |
|
156 |
.setMandatory(false); |
|
165 | 157 |
|
166 |
field = dynClass.addDynField(DYNFIELDNAME_FILTER_ENCODING_BY_ATTRIBUTE); |
|
167 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
168 |
field.setDescription("Filter encoding request"); |
|
169 |
field.setType(DataTypes.STRING); |
|
170 |
field.setMandatory(false); |
|
158 |
definition.addDynFieldString(DYNFIELDNAME_FILTER_ENCODING_BY_ATTRIBUTE) |
|
159 |
.setDescription("Filter encoding request") |
|
160 |
.setMandatory(false); |
|
171 | 161 |
|
172 |
field = dynClass.addDynField(DYNFIELDNAME_MAXFEATURES); |
|
173 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
174 |
field.setDescription("Number of features to retrieve"); |
|
175 |
field.setType(DataTypes.INT); |
|
176 |
field.setMandatory(false); |
|
162 |
definition.addDynFieldInt(DYNFIELDNAME_MAXFEATURES) |
|
163 |
.setDescription("Number of features to retrieve") |
|
164 |
.setMandatory(false); |
|
177 | 165 |
|
178 |
field = dynClass.addDynField(DYNFIELDNAME_TIMEOUT); |
|
179 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
180 |
field.setDescription("Timeout"); |
|
181 |
field.setType(DataTypes.INT); |
|
182 |
field.setMandatory(false); |
|
166 |
definition.addDynFieldInt(DYNFIELDNAME_TIMEOUT) |
|
167 |
.setDescription("Timeout") |
|
168 |
.setMandatory(false); |
|
183 | 169 |
|
184 |
field = dynClass.addDynField(DYNFIELDNAME_USER); |
|
185 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
186 |
field.setDescription("User name (not used at this moment)"); |
|
187 |
field.setType(DataTypes.STRING); |
|
188 |
field.setMandatory(false); |
|
170 |
definition.addDynFieldString(DYNFIELDNAME_USER) |
|
171 |
.setDescription("User name (not used at this moment)") |
|
172 |
.setMandatory(false); |
|
189 | 173 |
|
190 |
field = dynClass.addDynField(DYNFIELDNAME_PASSWORD); |
|
191 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
192 |
field.setDescription("Passwrod (not used at this moment"); |
|
193 |
field.setType(DataTypes.STRING); |
|
194 |
field.setMandatory(false); |
|
174 |
definition.addDynFieldString(DYNFIELDNAME_PASSWORD) |
|
175 |
.setDescription("Passwrod (not used at this moment") |
|
176 |
.setMandatory(false); |
|
195 | 177 |
|
196 |
field = dynClass.addDynField(DYNFIELDNAME_FILTER_BY_AREA_GEOMETRY); |
|
197 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
198 |
field.setDescription("Geometry used to do the filter"); |
|
199 |
field.setType(DataTypes.GEOMETRY); |
|
200 |
field.setMandatory(false); |
|
178 |
definition.addDynFieldObject(DYNFIELDNAME_FILTER_BY_AREA_GEOMETRY) |
|
179 |
.setType(DataTypes.GEOMETRY) |
|
180 |
.setDescription("Geometry used to do the filter") |
|
181 |
.setMandatory(false); |
|
201 | 182 |
|
202 |
field = dynClass.addDynField(DYNFIELDNAME_FILTER_BY_AREA_OPERATION); |
|
203 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
204 |
field.setDescription("Geometry operation used to do the filter"); |
|
205 |
field.setType(DataTypes.INT); |
|
206 |
field.setMandatory(false); |
|
183 |
definition.addDynFieldInt(DYNFIELDNAME_FILTER_BY_AREA_OPERATION) |
|
184 |
.setDescription("Geometry operation used to do the filter") |
|
185 |
.setMandatory(false); |
|
207 | 186 |
|
208 |
field = dynClass.addDynField(DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE); |
|
209 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
210 |
field.setDescription("Attribute that contains the geometry"); |
|
211 |
field.setType(DataTypes.STRING); |
|
212 |
field.setMandatory(false); |
|
187 |
definition.addDynFieldString(DYNFIELDNAME_FILTER_BY_AREA_ATTRIBUTE) |
|
188 |
.setDescription("Attribute that contains the geometry") |
|
189 |
.setMandatory(false); |
|
213 | 190 |
|
214 |
field = dynClass.addDynField(DYNFIELDNAME_FILTER_BY_AREA_CRS); |
|
215 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
216 |
field.setDescription("CRS to do the query"); |
|
217 |
field.setType(DataTypes.STRING); |
|
218 |
field.setMandatory(false); |
|
191 |
definition.addDynFieldObject(DYNFIELDNAME_FILTER_BY_AREA_CRS) |
|
192 |
.setType(DataTypes.CRS) |
|
193 |
.setDescription("CRS to do the query") |
|
194 |
.setMandatory(false); |
|
219 | 195 |
|
220 |
DYNCLASS = dynClass;
|
|
196 |
DYNCLASS = (DynClass) definition;
|
|
221 | 197 |
} |
222 | 198 |
} |
223 | 199 |
|
Also available in: Unified diff