public final class TagConflictResolutionUtil extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TagConflictResolutionUtil.AutomaticChoice
Preference for a particular choice from a group for automatic tag conflict resolution.
|
static class |
TagConflictResolutionUtil.AutomaticChoiceGroup
Preference for an automatic tag conflict resolver which choose from
a group of possible
choice values. |
static class |
TagConflictResolutionUtil.AutomaticCombine
Preference for automatic tag-conflict resolver by combining the tag values using a separator.
|
(package private) static interface |
TagConflictResolutionUtil.AutomaticTagConflictResolver
An automatic tag conflict resolver interface.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> |
automaticTagConflictResolvers |
private static java.util.Collection<TagConflictResolutionUtil.AutomaticChoice> |
defaultAutomaticTagConflictChoices
Default preferences for the list of AutomaticChoice tag conflict resolvers.
|
private static java.util.Collection<TagConflictResolutionUtil.AutomaticCombine> |
defaultAutomaticTagConflictCombines
Default preferences for the list of AutomaticCombine tag conflict resolvers.
|
private static java.lang.String |
GRP_CA_CANVEC
The group identifier for Canadian CANVEC choices
|
private static java.lang.String |
GRP_FR_CADASTRE
The group identifier for French Cadastre choices
|
private static java.lang.String |
KEY_SOURCE
The OSM key 'source'
|
Modifier | Constructor and Description |
---|---|
private |
TagConflictResolutionUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
applyAutomaticTagConflictResolution(TagCollection tc)
Automatically resolve some tag conflicts.
|
static void |
applyAutomaticTagConflictResolution(TagCollection tc,
java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> resolvers)
Automatically resolve some given conflicts using the given resolvers.
|
static void |
completeTagCollectionForEditing(TagCollection tc)
Completes tags in the tag collection
tc with the empty value
for each tag. |
static java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> |
getAutomaticTagConflictResolvers()
Get the AutomaticTagConflictResolvers configured in the Preferences or the default ones.
|
static void |
normalizeTagCollectionBeforeEditing(TagCollection tc,
java.util.Collection<? extends OsmPrimitive> merged)
Normalizes the tags in the tag collection
tc before resolving tag conflicts. |
private static final java.lang.String KEY_SOURCE
private static final java.lang.String GRP_FR_CADASTRE
private static final java.lang.String GRP_CA_CANVEC
private static final java.util.Collection<TagConflictResolutionUtil.AutomaticCombine> defaultAutomaticTagConflictCombines
private static final java.util.Collection<TagConflictResolutionUtil.AutomaticChoice> defaultAutomaticTagConflictChoices
private static volatile java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> automaticTagConflictResolvers
private TagConflictResolutionUtil()
public static void normalizeTagCollectionBeforeEditing(TagCollection tc, java.util.Collection<? extends OsmPrimitive> merged)
tc
before resolving tag conflicts.
Removes irrelevant tags like "created_by".
For tags which are not present on at least one of the merged nodes, the empty value ""
is added to the list of values for this tag, but only if there are at least two
primitives with tags, and at least one tagged primitive do not have this tag.tc
- the tag collectionmerged
- the collection of merged primitivespublic static void completeTagCollectionForEditing(TagCollection tc)
tc
with the empty value
for each tag. If the empty value is present the tag conflict resolution dialog
will offer an option for removing the tag and not only options for selecting
one of the current values of the tag.tc
- the tag collectionpublic static void applyAutomaticTagConflictResolution(TagCollection tc)
tc
- the tag collectionpublic static java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> getAutomaticTagConflictResolvers()
public static void applyAutomaticTagConflictResolution(TagCollection tc, java.util.Collection<TagConflictResolutionUtil.AutomaticTagConflictResolver> resolvers)
tc
- the tag collection.resolvers
- the list of automatic tag conflict resolvers to apply.