Changeset 16436 in osm for applications/editors
- Timestamp:
- 2009-07-11T15:42:48+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/ignoretags.cfg
r16346 r16436 48 48 ; Highway Key/Value Pairs 49 49 ; 50 K:highway=motorway_link 51 K:highway=trunk_link 52 K:highway=primary_link 50 53 K:highway=secondary_link 51 54 K:oneway=-1 … … 66 69 K:aeroway=apron 67 70 K:aeroway=hanger 71 K:aeroway=helipad 68 72 K:aeroway=runway 69 73 K:aeroway=taxiway … … 72 76 ; Amenity Key/Value Pairs 73 77 ; 78 K:amenity=arts_centre 79 K:amenity=atm 80 K:amenity=baby_hatch 81 K:amenity=bank 74 82 K:amenity=bbq 83 K:amenity=bench 84 K:amenity=biergarten 85 K:amenity=bicycle_parking 86 K:amenity=bicycle_rental 87 K:amenity=bureau_de_change 88 K:amenity=bus_station 89 K:amenity=brothel 90 K:amenity=cafe 91 K:amenity=car_rental 92 K:amenity=car_sharing 93 K:amenity=cinema 94 K:amenity=college 95 K:amenity=courthouse 96 K:amenity=crematorium 97 K:amenity=dentist 98 K:amenity=doctors 99 K:amenity=drinking_water 100 K:amenity=embassy 101 K:amenity=emergency_phone 102 K:amenity=fast_food 103 K:amenity=ferry_terminal 104 K:amenity=fire_station 105 K:amenity=food_court 106 K:amenity=fountain 107 K:amenity=fuel 108 K:amenity=grave_yard 109 K:amenity=grit_bin 110 K:amenity=hospital 111 K:amenity=hunting_stand 112 K:amenity=kindergarten 113 K:amenity=library 114 K:amenity=marketplace 115 K:amenity=nightclub 116 K:amenity=parking 117 K:amenity=pharmacy 118 K:amenity=place_of_worship 119 K:amenity=police 120 K:amenity=post_box 121 K:amenity=post_office 122 K:amenity=prison 123 K:amenity=pub 124 K:amenity=public_building 125 K:amenity=recycling 126 K:amenity=restaurant 127 K:amenity=school 128 K:amenity=shelter 129 K:amenity=signpost 130 K:amenity=studio 131 K:amenity=taxi 132 K:amenity=telephone 133 K:amenity=theatre 134 K:amenity=toilets 135 K:amenity=townhall 136 K:amenity=university 137 K:amenity=vending_machine 138 K:amenity=veterinary 139 K:amenity=waste_basket 140 K:amenity=waste_disposal 75 141 ; 76 142 ; Cycleway Tags 77 143 ; 144 K:cycleway=lane 78 145 K:cycleway=track 146 K:cycleway=opposite_lane 147 K:cycleway=opposite 148 K:cycleway=opposite_track 149 ; 150 ; Historic Tags 151 ; 152 K:historic=castle 153 K:historic=monument 154 K:historic=memorial 155 K:historic=archaeological_site 156 K:historic=ruins 157 K:historic=battlefield 158 K:historic=wreck 159 K:historic=yes 79 160 ; 80 161 ; Man_made Tags … … 167 248 ; Shop Key/Value Pairs 168 249 ; 250 K:shop=alcohol 251 K:shop=bakery 252 K:shop=beverages 253 K:shop=bicycle 254 K:shop=books 255 K:shop=butcher 256 K:shop=car 257 K:shop=car_repair 258 K:shop=chemist 259 K:shop=clothes 260 K:shop=computer 261 K:shop=confectionery 262 K:shop=convenience 263 K:shop=department_store 264 K:shop=dry_cleaning 265 K:shop=doityourself 266 K:shop=electronics 267 K:shop=florist 268 K:shop=furniture 269 K:shop=garden_centre 270 K:shop=greengrocer 271 K:shop=hairdresser 272 K:shop=hardware 273 K:shop=hifi 274 K:shop=kiosk 275 K:shop=laundry 169 276 K:shop=mall 277 K:shop=motorcycle 278 K:shop=optician 279 K:shop=organic 280 K:shop=outdoor 281 K:shop=sports 282 K:shop=stationery 283 K:shop=supermarket 284 K:shop=shoes 285 K:shop=toys 286 K:shop=travel_agency 287 K:shop=video 170 288 ; 171 289 ; Sports Tags … … 174 292 K:sport=netball 175 293 ; 294 ; Tourism Tags 295 ; 296 K:tourism=alpine_hut 297 K:tourism=attraction 298 K:tourism=artwork 299 K:tourism=camp_site 300 K:tourism=caravan_site 301 K:tourism=chalet 302 K:tourism=guest_house 303 K:tourism=hostel 304 K:tourism=hotel 305 K:tourism=information 306 K:tourism=motel 307 K:tourism=museum 308 K:tourism=picnic_site 309 K:tourism=theme_park 310 K:tourism=viewpoint 311 K:tourism=zoo 312 K:tourism=yes 313 ; 176 314 ; Type Key/Value Pairs 177 315 ; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java
r16319 r16436 79 79 protected static ArrayList<String> ignoreDataEndsWith = new ArrayList<String>(); 80 80 protected static ArrayList<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>(); 81 protected static ArrayList<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>(); 81 82 82 83 /** The preferences prefix */ … … 253 254 ignoreDataKeyPair.add(tmp); 254 255 } 256 else if(key.equals("T:")) 257 { 258 IgnoreTwoKeyPair tmp = new IgnoreTwoKeyPair(); 259 int mid = line.indexOf("="); 260 int split = line.indexOf("|"); 261 tmp.key1 = line.substring(0, mid); 262 tmp.value1 = line.substring(mid+1, split); 263 line = line.substring(split+1); 264 mid = line.indexOf("="); 265 tmp.key2 = line.substring(0, mid); 266 tmp.value2 = line.substring(mid+1); 267 ignoreDataTwoKeyPair.add(tmp); 268 } 255 269 continue; 256 270 } … … 375 389 if(checkComplex) 376 390 { 391 Map<String, String> props = (p.keys == null) ? Collections.<String, String>emptyMap() : p.keys; 392 for(Entry<String, String> prop: props.entrySet() ) 393 { 394 boolean ignore = true; 395 String key1 = prop.getKey(); 396 String value1 = prop.getValue(); 397 398 for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair) 399 { 400 if(key1.equals(a.key1) && value1.equals(a.value1)) 401 { 402 ignore = false; 403 for(Entry<String, String> prop2: props.entrySet() ) 404 { 405 String key2 = prop2.getKey(); 406 String value2 = prop2.getValue(); 407 for(IgnoreTwoKeyPair b : ignoreDataTwoKeyPair) 408 { 409 if(key2.equals(b.key2) && value2.equals(b.value2)) 410 { 411 ignore = true; 412 break; 413 } 414 } 415 if(ignore) 416 break; 417 } 418 } 419 if(ignore) 420 break; 421 } 422 423 if(!ignore) 424 { 425 errors.add( new TestError(this, Severity.ERROR, tr("Illegal tag/value combinations"), 426 tr("Illegal tag/value combinations"), tr("Illegal tag/value combinations"), 1272, p) ); 427 withErrors.add(p, "TC"); 428 } 429 } 430 377 431 for(CheckerData d : checkerData) 378 432 { … … 469 523 { 470 524 if(key.equals(a.key) && value.equals(a.value)) 525 ignore = true; 526 } 527 528 for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair) 529 { 530 if(key.equals(a.key2) && value.equals(a.value2)) 471 531 ignore = true; 472 532 } … … 778 838 } 779 839 840 private static class IgnoreTwoKeyPair { 841 public String key1; 842 public String value1; 843 public String key2; 844 public String value2; 845 } 846 780 847 private static class IgnoreKeyPair { 781 848 public String key;
Note:
See TracChangeset
for help on using the changeset viewer.