Changeset 6138 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-08-11T20:20:49+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
r5927 r6138 21 21 import org.openstreetmap.josm.tools.Utils; 22 22 23 /** 24 * Checks and corrects deprecated tags. 25 * @since 4442 26 */ 23 27 public class DeprecatedTags extends Test { 24 28 25 29 private List<DeprecationCheck> checks = new LinkedList<DeprecationCheck>(); 26 30 31 /** 32 * Constructs a new {@code DeprecatedTags} test. 33 */ 27 34 public DeprecatedTags() { 28 35 super(tr("Deprecated Tags"), tr("Checks and corrects deprecated tags.")); … … 91 98 testAndRemove("sport", "gaelic_football"). 92 99 add("sport", "gaelic_games")); 93 } 94 100 // http://wiki.openstreetmap.org/wiki/Tag:power=station 101 // see #8847 / #8961 102 checks.add(new DeprecationCheck(2118). 103 test("power", "station"). 104 alternative("power", "plant"). 105 alternative("power", "sub_station")); 106 checks.add(new DeprecationCheck(2119). 107 testAndRemove("generator:method", "dam"). 108 add("generator:method", "water-storage")); 109 checks.add(new DeprecationCheck(2120). 110 testAndRemove("generator:method", "pumped-storage"). 111 add("generator:method", "water-pumped-storage")); 112 checks.add(new DeprecationCheck(2121). 113 testAndRemove("generator:method", "pumping"). 114 add("generator:method", "water-pumped-storage")); 115 } 116 117 /** 118 * Visiting call for primitives. 119 * @param p The primitive to inspect. 120 */ 95 121 public void visit(OsmPrimitive p) { 96 122 for (DeprecationCheck check : checks) { … … 149 175 return test(key, value).remove(key); 150 176 } 151 177 /* 152 178 DeprecationCheck testAndRemove(String key) { 153 179 return test(key).remove(key); 154 180 } 155 181 */ 156 182 DeprecationCheck alternative(String key, String value) { 157 183 alternatives.add(new Tag(key, value));
Note:
See TracChangeset
for help on using the changeset viewer.