Changeset 4874 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2012-01-26T21:52:34+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation/tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
r4806 r4874 1 1 package org.openstreetmap.josm.data.validation.tests; 2 2 3 import org.openstreetmap.josm.data.osm.Node;4 import org.openstreetmap.josm.data.osm.Relation;5 import org.openstreetmap.josm.data.osm.Way;6 3 import static org.openstreetmap.josm.tools.I18n.tr; 7 4 … … 9 6 import java.util.LinkedList; 10 7 import java.util.List; 8 11 9 import org.openstreetmap.josm.command.ChangePropertyCommand; 12 10 import org.openstreetmap.josm.command.Command; 13 11 import org.openstreetmap.josm.command.SequenceCommand; 12 import org.openstreetmap.josm.data.osm.Node; 14 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 import org.openstreetmap.josm.data.osm.Relation; 15 15 import org.openstreetmap.josm.data.osm.Tag; 16 import org.openstreetmap.josm.data.osm.Way; 16 17 import org.openstreetmap.josm.data.validation.Severity; 17 18 import org.openstreetmap.josm.data.validation.Test; … … 97 98 } 98 99 99 private class DeprecationCheck {100 private static class DeprecationCheck { 100 101 101 102 int code; … … 148 149 String key = tag.getKey(); 149 150 String value = tag.getValue(); 150 if (value.isEmpty() && !p.hasKey(key)) {151 if (value.isEmpty() && !p.hasKey(key)) 151 152 return false; 152 } 153 if (!value.isEmpty() && !value.equals(p.get(key))) { 153 if (!value.isEmpty() && !value.equals(p.get(key))) 154 154 return false; 155 }156 155 } 157 156 return true; … … 167 166 168 167 String getDescription() { 169 if (alternatives.isEmpty()) {168 if (alternatives.isEmpty()) 170 169 return tr("{0} is deprecated", Utils.join(", ", test)); 171 } else {170 else 172 171 return tr("{0} is deprecated, use {1} instead", Utils.join(", ", test), Utils.join(tr(" or "), alternatives)); 173 }174 172 } 175 173 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r4869 r4874 39 39 public class DuplicateNode extends Test { 40 40 41 private class NodeHash implements Hash<Object, Object> {41 private static class NodeHash implements Hash<Object, Object> { 42 42 43 43 double precision = Main.pref.getDouble("validator.duplicatenodes.precision", 0.); -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
r4869 r4874 34 34 { 35 35 36 public class RelMember {36 public static class RelMember { 37 37 private String role; 38 38 private OsmPrimitiveType type; -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r4869 r4874 34 34 { 35 35 36 private class WayPair {36 private static class WayPair { 37 37 public List<LatLon> coor; 38 38 public Map<String, String> keys; … … 56 56 } 57 57 58 private class WayPairNoTags {58 private static class WayPairNoTags { 59 59 public List<LatLon> coor; 60 60 public WayPairNoTags(List<LatLon> _coor) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r4869 r4874 70 70 } 71 71 72 public class RoleInfo {72 public static class RoleInfo { 73 73 int total = 0; 74 74 Collection<Node> nodes = new LinkedList<Node>();
Note:
See TracChangeset
for help on using the changeset viewer.