|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.gui.conflict.pair.tags.TagMergeItem
public class TagMergeItem
TagMergeItem represents an individual merge action for a specific pair of key/value. A TagMergeItem manages the values of the two key/value-pairs and keeps track of the applied merge decision.
| Field Summary | |
|---|---|
private java.lang.String |
key
|
private MergeDecisionType |
mergeDecision
|
private java.lang.String |
myTagValue
|
private java.lang.String |
theirTagValue
|
| Constructor Summary | |
|---|---|
TagMergeItem(java.lang.String key,
OsmPrimitive my,
OsmPrimitive their)
constructor |
|
TagMergeItem(java.lang.String key,
java.lang.String myTagValue,
java.lang.String theirTagValue)
constructor |
|
| Method Summary | |
|---|---|
void |
applyToMyPrimitive(OsmPrimitive primitive)
applies the current merge decisions to the tag set of an OSM primitive. |
void |
decide(MergeDecisionType decision)
applies a merge decision to this merge item |
java.lang.String |
getKey()
|
MergeDecisionType |
getMergeDecision()
|
java.lang.String |
getMyTagValue()
|
java.lang.String |
getTheirTagValue()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String key
private java.lang.String myTagValue
private java.lang.String theirTagValue
private MergeDecisionType mergeDecision
| Constructor Detail |
|---|
public TagMergeItem(java.lang.String key,
java.lang.String myTagValue,
java.lang.String theirTagValue)
key - the common tag key. Must not be null.myTagValue - the value for this key known in the local datasettheirTagValue - the value for this key known in the dataset on the server
java.lang.IllegalArgumentException - if key is null
public TagMergeItem(java.lang.String key,
OsmPrimitive my,
OsmPrimitive their)
key - the tag key common to the merged OSM primitives. Must not be null.my - my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null.their - their version of the OSM primitive (i.e. the version known on the server). Must not be null.
java.lang.IllegalArgumentException - thrown if key is null
java.lang.IllegalArgumentException - thrown if my is null
java.lang.IllegalArgumentException - thrown if their is null| Method Detail |
|---|
public void decide(MergeDecisionType decision)
throws java.lang.IllegalArgumentException
decision - the merge decision. Must not be null.
java.lang.IllegalArgumentException - thrown if decision is nullpublic java.lang.String getKey()
public java.lang.String getMyTagValue()
public java.lang.String getTheirTagValue()
public MergeDecisionType getMergeDecision()
public void applyToMyPrimitive(OsmPrimitive primitive)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
primitive - the OSM primitive. Must not be null.
java.lang.IllegalArgumentException - thrown, if primitive is null
java.lang.IllegalStateException - thrown, if this merge item is undecided
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||