Changeset 3259 in osm for applications/editors/josm/plugins
- Timestamp:
- 2007-06-18T21:03:26+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java
r3038 r3259 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.util. Map;5 import java.util.*; 6 6 7 7 import org.openstreetmap.josm.data.osm.Way; … … 14 14 public class UntaggedWay extends Test 15 15 { 16 /** Tags allowed in a way */ 17 public static String[] allowedTags = new String[] { "created_by", "converted_by" }; 18 16 /** Tags allowed in a way */ 17 public static final String[] ALLOWED_TAGS = new String[] { "created_by", "converted_by" }; 18 19 /** Ways that must have a name */ 20 public static final Set<String> NAMED_WAYS = new HashSet<String>(); 21 static 22 { 23 NAMED_WAYS.add( "motorway" ); 24 NAMED_WAYS.add( "trunk" ); 25 NAMED_WAYS.add( "primary" ); 26 NAMED_WAYS.add( "secondary" ); 27 NAMED_WAYS.add( "tertiary" ); 28 NAMED_WAYS.add( "residential" ); 29 NAMED_WAYS.add( "pedestrian" ); ; 30 } 31 19 32 /** 20 33 * Constructor … … 34 47 { 35 48 numTags = tags.size(); 36 for( String tag : allowedTags)49 for( String tag : ALLOWED_TAGS) 37 50 if( tags.containsKey(tag) ) numTags--; 38 51 39 if( numTags != 0 && tags.containsKey("highway" ) ) 52 String highway = tags.get("highway"); 53 if( numTags != 0 && highway != null && NAMED_WAYS.contains(highway)) 40 54 { 41 55 if( !tags.containsKey("name") && !tags.containsKey("ref") )
Note:
See TracChangeset
for help on using the changeset viewer.