org.openstreetmap.josm.corrector
Class ReverseWayTagCorrector

java.lang.Object
  extended by org.openstreetmap.josm.corrector.TagCorrector<Way>
      extended by org.openstreetmap.josm.corrector.ReverseWayTagCorrector

public class ReverseWayTagCorrector
extends TagCorrector<Way>

A ReverseWayTagCorrector handles necessary corrections of tags when a way is reversed. E.g. oneway=yes needs to be changed to oneway=-1 and vice versa. The Corrector offers the automatic resolution in an dialog for the user to confirm.


Nested Class Summary
private static class ReverseWayTagCorrector.PrefixSuffixSwitcher
           
 
Field Summary
private static ReverseWayTagCorrector.PrefixSuffixSwitcher[] prefixSuffixSwitchers
           
private static java.util.ArrayList<java.lang.String> reversibleTags
           
 
Constructor Summary
ReverseWayTagCorrector()
           
 
Method Summary
 java.util.Collection<Command> execute(Way oldway, Way way)
           
private static boolean ignoreKeyForPrefixSuffixCorrection(java.lang.String key)
           
 java.lang.String invertNumber(java.lang.String value)
           
static java.util.List<Way> irreversibleWays(java.util.List<Way> ways)
           
static boolean isReversible(Way way)
           
 
Methods inherited from class org.openstreetmap.josm.corrector.TagCorrector
applyCorrections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefixSuffixSwitchers

private static ReverseWayTagCorrector.PrefixSuffixSwitcher[] prefixSuffixSwitchers

reversibleTags

private static java.util.ArrayList<java.lang.String> reversibleTags
Constructor Detail

ReverseWayTagCorrector

public ReverseWayTagCorrector()
Method Detail

isReversible

public static boolean isReversible(Way way)

irreversibleWays

public static java.util.List<Way> irreversibleWays(java.util.List<Way> ways)

invertNumber

public java.lang.String invertNumber(java.lang.String value)

execute

public java.util.Collection<Command> execute(Way oldway,
                                             Way way)
                                      throws UserCancelException
Specified by:
execute in class TagCorrector<Way>
Throws:
UserCancelException

ignoreKeyForPrefixSuffixCorrection

private static boolean ignoreKeyForPrefixSuffixCorrection(java.lang.String key)


JOSM