Revision 28375 branches/v2_0_0_prep/libraries/libGeocoding/src-test/org/gvsig/geocoding/DoubleRangeTest.java
DoubleRangeTest.java | ||
---|---|---|
166 | 166 |
AbstractGeocodingStyle style = new DoubleRange(); |
167 | 167 |
FeatureType ftype = store.getDefaultFeatureType(); |
168 | 168 |
Literal relations = new DefaultLiteral(); |
169 |
relations.add(new DefaultRelationsComponent("Calle", ftype |
|
170 |
.getAttributeDescriptor("STREET_NAM"))); |
|
171 |
relations.add(new DefaultRelationsComponent("TipoVia", ftype |
|
172 |
.getAttributeDescriptor("STREET_TYP"))); |
|
173 |
relations.add(new DefaultRelationsComponent("Municipio", ftype |
|
174 |
.getAttributeDescriptor("MUNI"))); |
|
175 |
relations.add(new DefaultRelationsComponent("Provincia", ftype |
|
176 |
.getAttributeDescriptor("PROV"))); |
|
177 |
relations.add(new DefaultRelationsComponent("Pais", ftype |
|
178 |
.getAttributeDescriptor("PAIS"))); |
|
169 |
relations.add(new DefaultRelationsComponent("Calle","STREET_NAM")); |
|
170 |
relations.add(new DefaultRelationsComponent("TipoVia","STREET_TYP")); |
|
171 |
relations.add(new DefaultRelationsComponent("Municipio","MUNI")); |
|
172 |
relations.add(new DefaultRelationsComponent("Provincia","PROV")); |
|
173 |
relations.add(new DefaultRelationsComponent("Pais","PAIS")); |
|
179 | 174 |
|
180 | 175 |
style.setRelationsLiteral(relations); |
181 | 176 |
source.setStyle(style); |
182 | 177 |
|
183 | 178 |
DefaultRelationsComponent rfrom = new DefaultRelationsComponent( |
184 |
"NParFrom", ftype.getAttributeDescriptor("RF_ADD"));
|
|
179 |
"NParFrom","RF_ADD");
|
|
185 | 180 |
; |
186 | 181 |
((DoubleRange) style).setFirstRightNumber(rfrom); |
187 | 182 |
|
188 | 183 |
DefaultRelationsComponent rto = new DefaultRelationsComponent( |
189 |
"NParTo", ftype.getAttributeDescriptor("RT_ADD"));
|
|
184 |
"NParTo","RT_ADD");
|
|
190 | 185 |
((DoubleRange) style).setLastRightNumber(rto); |
191 | 186 |
|
192 | 187 |
DefaultRelationsComponent lfrom = new DefaultRelationsComponent( |
193 |
"NImparFrom", ftype.getAttributeDescriptor("LF_ADD"));
|
|
188 |
"NImparFrom","LF_ADD");
|
|
194 | 189 |
; |
195 | 190 |
((DoubleRange) style).setFirstLeftNumber(lfrom); |
196 | 191 |
DefaultRelationsComponent lto = new DefaultRelationsComponent( |
197 |
"NImparTo", ftype.getAttributeDescriptor("LT_ADD"));
|
|
192 |
"NImparTo","LT_ADD");
|
|
198 | 193 |
((DoubleRange) style).setLastLeftNumber(lto); |
199 | 194 |
|
200 | 195 |
pat.setSource(source); |
Also available in: Unified diff