Class SVNLogEntryPath

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FSPathChange

    public class SVNLogEntryPath
    extends java.lang.Object
    implements java.io.Serializable
    The SVNLogEntryPath class encapsulates information about a single item changed in a revision. This information includes an item's path, a type of the changes made to the item, and if the item is a copy of another one - information about the item's ancestor.

    SVNLogEntryPath objects are held by an SVNLogEntry object - they are representations of all the changed paths in the revision represented by that SVNLogEntry object.

    Since:
    1.2
    Version:
    1.3
    See Also:
    SVNLogEntry, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SVNLogEntryPath​(java.lang.String path, char type, java.lang.String copyPath, long copyRevision)
      Constructs an SVNLogEntryPath object.
      SVNLogEntryPath​(java.lang.String path, char type, java.lang.String copyPath, long copyRevision, SVNNodeKind kind)
      Constructs an SVNLogEntryPath object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Compares this object with another one.
      java.lang.String getCopyPath()
      Returns the path of the ancestor of the item represented by this object.
      long getCopyRevision()
      Returns the revision of the ancestor of the item represented by this object.
      SVNNodeKind getKind()
      Returns the node kind of the changed path, represented by this object.
      java.lang.String getPath()
      Returns the path of the item represented by this object.
      char getType()
      Gets the type of the change applied to the item represented by this object.
      int hashCode()
      Calculates and returns a hash code for this object.
      protected void setChangeType​(char type)  
      protected void setCopyPath​(java.lang.String path)  
      protected void setCopyRevision​(long revision)  
      protected void setNodeKind​(SVNNodeKind nodeKind)  
      void setPath​(java.lang.String path)
      Sets the path of the item represented by this object.
      java.lang.String toString()
      Gives a string representation of this oobject.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TYPE_DELETED

        public static final char TYPE_DELETED
        Char 'D' (item deleted).
        See Also:
        Constant Field Values
      • TYPE_MODIFIED

        public static final char TYPE_MODIFIED
        Char 'M' (item modified).
        See Also:
        Constant Field Values
      • TYPE_REPLACED

        public static final char TYPE_REPLACED
        Char 'R' (item replaced).
        See Also:
        Constant Field Values
      • myPath

        private java.lang.String myPath
      • myType

        private char myType
      • myCopyPath

        private java.lang.String myCopyPath
      • myCopyRevision

        private long myCopyRevision
    • Constructor Detail

      • SVNLogEntryPath

        public SVNLogEntryPath​(java.lang.String path,
                               char type,
                               java.lang.String copyPath,
                               long copyRevision)
        Constructs an SVNLogEntryPath object.

        Use char constants of this class as a change type to pass to this constructor.

        Parameters:
        path - a path that was changed in a revision
        type - a type of the path change; it can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - Replaced
        copyPath - the path of the ancestor of the item represented by path (in that case if path was copied), or null if path
        copyRevision - the ancestor's revision if the path is a branch, or -1 if not
      • SVNLogEntryPath

        public SVNLogEntryPath​(java.lang.String path,
                               char type,
                               java.lang.String copyPath,
                               long copyRevision,
                               SVNNodeKind kind)
        Constructs an SVNLogEntryPath object.

        Use char constants of this class as a change type to pass to this constructor.

        Parameters:
        path - a path that was changed in a revision
        type - a type of the path change; it can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - Replaced
        copyPath - the path of the ancestor of the item represented by path (in that case if path was copied), or null if path
        copyRevision - the ancestor's revision if the path is a branch, or -1 if not
        kind - node kind of the changed path
        Since:
        1.3
    • Method Detail

      • getCopyPath

        public java.lang.String getCopyPath()
        Returns the path of the ancestor of the item represented by this object.
        Returns:
        the origin path from where the item, represented by this object, was copied, or null if it wasn't copied
      • getCopyRevision

        public long getCopyRevision()
        Returns the revision of the ancestor of the item represented by this object.
        Returns:
        the revision of the origin path from where the item, represented by this object, was copied, or -1 if the item was not copied
      • getPath

        public java.lang.String getPath()
        Returns the path of the item represented by this object.
        Returns:
        the changed path represented by this object
      • getType

        public char getType()
        Gets the type of the change applied to the item represented by this object. This type can be one of the following: 'M' - Modified, 'A' - Added, 'D' - Deleted, 'R' - Replaced (what means that the object is first deleted, then another object of the same name is added, all within a single revision).
        Returns:
        a type of the change as a char label
      • getKind

        public SVNNodeKind getKind()
        Returns the node kind of the changed path, represented by this object.
        Returns:
        node kind of the changed path
        Since:
        1.3
      • setPath

        public void setPath​(java.lang.String path)
        Sets the path of the item represented by this object.
        Parameters:
        path - a path of an item that was changed (regarding a definite revision)
      • setChangeType

        protected void setChangeType​(char type)
      • setCopyRevision

        protected void setCopyRevision​(long revision)
      • setCopyPath

        protected void setCopyPath​(java.lang.String path)
      • setNodeKind

        protected void setNodeKind​(SVNNodeKind nodeKind)
      • hashCode

        public int hashCode()
        Calculates and returns a hash code for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares this object with another one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - an object to compare with
        Returns:
        true if this object is the same as the obj argument
      • toString

        public java.lang.String toString()
        Gives a string representation of this oobject.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representing this object