Class PropertiesMergeModel

    • Constructor Detail

    • Method Detail

      • isDecidedCoord

        public boolean isDecidedCoord()
        replies true if there is a coordinate conflict and if this conflict is resolved
        Returns:
        true if there is a coordinate conflict and if this conflict is resolved; false, otherwise
      • isDecidedDeletedState

        public boolean isDecidedDeletedState()
        replies true if there is a conflict in the deleted state and if this conflict is resolved
        Returns:
        true if there is a conflict in the deleted state and if this conflict is resolved; false, otherwise
      • isCoordMergeDecision

        public boolean isCoordMergeDecision​(MergeDecisionType decision)
        replies true if the current decision for the coordinate conflict is decision
        Parameters:
        decision - conflict resolution decision
        Returns:
        true if the current decision for the coordinate conflict is decision; false, otherwise
      • isDeletedStateDecision

        public boolean isDeletedStateDecision​(MergeDecisionType decision)
        replies true if the current decision for the deleted state conflict is decision
        Parameters:
        decision - conflict resolution decision
        Returns:
        true if the current decision for the deleted state conflict is decision; false, otherwise
      • populate

        public void populate​(Conflict<? extends OsmPrimitive> conflict)
        Populates the model with the differences between local and server version
        Parameters:
        conflict - The conflict information
      • getMyCoords

        public LatLon getMyCoords()
        replies the coordinates of my OsmPrimitive. null, if my primitive hasn't coordinates (i.e. because it is a Way).
        Returns:
        the coordinates of my OsmPrimitive. null, if my primitive hasn't coordinates (i.e. because it is a Way).
      • getTheirCoords

        public LatLon getTheirCoords()
        replies the coordinates of their OsmPrimitive. null, if their primitive hasn't coordinates (i.e. because it is a Way).
        Returns:
        the coordinates of my OsmPrimitive. null, if my primitive hasn't coordinates (i.e. because it is a Way).
      • getMyDeletedState

        public java.lang.Boolean getMyDeletedState()
        Replies deleted state of local dataset
        Returns:
        The state of deleted flag
      • getTheirDeletedState

        public java.lang.Boolean getTheirDeletedState()
        Replies deleted state of Server dataset
        Returns:
        The state of deleted flag
      • getMergedDeletedState

        public java.lang.Boolean getMergedDeletedState()
        Replies deleted state of combined dataset
        Returns:
        The state of deleted flag
      • decideDeletedStateConflict

        public void decideDeletedStateConflict​(MergeDecisionType decision)
        decides the conflict between two deleted states
        Parameters:
        decision - the decision (must not be null)
        Throws:
        java.lang.IllegalArgumentException - if decision is null
      • hasCoordConflict

        public boolean hasCoordConflict()
        replies true if my and their primitive have a conflict between their coordinate values
        Returns:
        true if my and their primitive have a conflict between their coordinate values; false otherwise
      • hasDeletedStateConflict

        public boolean hasDeletedStateConflict()
        replies true if my and their primitive have a conflict between their deleted states
        Returns:
        true if my and their primitive have a conflict between their deleted states
      • isResolvedCompletely

        public boolean isResolvedCompletely()
        replies true if all conflict in this model are resolved
        Returns:
        true if all conflict in this model are resolved; false otherwise
      • buildResolveCommand

        public java.util.List<CommandbuildResolveCommand​(Conflict<? extends OsmPrimitive> conflict)
        Builds the command(s) to apply the conflict resolutions to my primitive
        Parameters:
        conflict - The conflict information
        Returns:
        The list of commands