Class PrioritizeTagStrategy
- java.lang.Object
-
- org.openstreetmap.atlas.mutator.configuration.parsing.mergeforgiveness.strategies.PrioritizeTagStrategy
-
- All Implemented Interfaces:
java.io.Serializable,MergeForgivenessStrategy
public class PrioritizeTagStrategy extends java.lang.Object implements MergeForgivenessStrategy
AMergeForgivenessStrategywhich prioritizes theFeatureChangethat matches aTaggableFilterspecified in the configuration, if possible. See docs for theresolve(FeatureChange, FeatureChange, Map)method for more details.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrioritizeTagStrategy.PrioritizationRuleA configuration bean class to represent a prioritization rule.
-
Constructor Summary
Constructors Constructor Description PrioritizeTagStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openstreetmap.atlas.geography.atlas.change.FeatureChangeresolve(org.openstreetmap.atlas.geography.atlas.change.FeatureChange left, org.openstreetmap.atlas.geography.atlas.change.FeatureChange right, java.util.Map<java.lang.String,java.io.Serializable> configuration)Perform the resolution.
-
-
-
Method Detail
-
resolve
public org.openstreetmap.atlas.geography.atlas.change.FeatureChange resolve(org.openstreetmap.atlas.geography.atlas.change.FeatureChange left, org.openstreetmap.atlas.geography.atlas.change.FeatureChange right, java.util.Map<java.lang.String,java.io.Serializable> configuration)Perform the resolution. At the moment, we do a basic resolution that tries to apply as many filters as possible. If the number that apply is not exactly 1, we fail. If both the left and rightFeatureChangeapply for a given rule, we decide what to do based on the leftRightExclusivity parameter. In the future, this method may respect the other parameters as well. For now, we will see what the data looks like using this simple resolution.- Specified by:
resolvein interfaceMergeForgivenessStrategy- Parameters:
left- the leftFeatureChangeright- the rightFeatureChangeconfiguration- the associated configurationMap- Returns:
- the selected
FeatureChange
-
-