Package org.tmatesoft.svn.core.io
Class SVNFileRevision
- java.lang.Object
-
- org.tmatesoft.svn.core.io.SVNFileRevision
-
- All Implemented Interfaces:
java.lang.Comparable
public class SVNFileRevision extends java.lang.Object implements java.lang.Comparable
The SVNFileRevision class represents information on what path a file is located at (in a repository) in a particular revision, contains file properties and revision properties for that revision.When getting a range of file revisions (in particular, annotating), calling an SVNRepository's
getFileRevision()
SVNFileRevision objects are passed to an ISVNFileRevisionHandler'sopenRevision()
method.- Since:
- 1.2
- Version:
- 1.3
- See Also:
SVNRepository
,ISVNFileRevisionHandler
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
myIsResultOfMerge
private java.lang.String
myPath
private SVNProperties
myProperties
private SVNProperties
myPropertiesDelta
private long
myRevision
-
Constructor Summary
Constructors Constructor Description SVNFileRevision(java.lang.String path, long revision, SVNProperties properties, SVNProperties propertiesDelta)
Constructs an instance of SVNFileRevision.SVNFileRevision(java.lang.String path, long revision, SVNProperties properties, SVNProperties propertiesDelta, boolean isResultOfMerge)
Constructs an instance of SVNFileRevision.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
Compares this object with another one.java.lang.String
getPath()
Gets the file path (relative to a repository root URL).SVNProperties
getProperties()
Deprecated.usegetRevisionProperties()
insteadSVNProperties
getPropertiesDelta()
Returns file properties for this file (for this revision).long
getRevision()
Gets the revision of the file.SVNProperties
getRevisionProperties()
Returns revision properties.boolean
isResultOfMerge()
Tells whether this file revision is the result of a merge.
-
-
-
Field Detail
-
myPath
private java.lang.String myPath
-
myRevision
private long myRevision
-
myProperties
private SVNProperties myProperties
-
myPropertiesDelta
private SVNProperties myPropertiesDelta
-
myIsResultOfMerge
private boolean myIsResultOfMerge
-
-
Constructor Detail
-
SVNFileRevision
public SVNFileRevision(java.lang.String path, long revision, SVNProperties properties, SVNProperties propertiesDelta)
Constructs an instance of SVNFileRevision.- Parameters:
path
- a file path relative to a repository location (a URL used to create an SVNRepository to access a repository)revision
- a revision of the fileproperties
- revision propertiespropertiesDelta
- file properties for therevision
-
SVNFileRevision
public SVNFileRevision(java.lang.String path, long revision, SVNProperties properties, SVNProperties propertiesDelta, boolean isResultOfMerge)
Constructs an instance of SVNFileRevision.- Parameters:
path
- a file path relative to a repository location (a URL used to create an SVNRepository to access a repository)revision
- a revision of the fileproperties
- revision propertiespropertiesDelta
- file properties for therevision
isResultOfMerge
- whether this revision of the file is the result of a merge- Since:
- 1.2.0
-
-
Method Detail
-
getPath
public java.lang.String getPath()
Gets the file path (relative to a repository root URL).- Returns:
- the path of the file
- See Also:
SVNRepository
-
getProperties
public SVNProperties getProperties()
Deprecated.usegetRevisionProperties()
insteadReturns revision properties. UseSVNRevisionProperty
constants (they are revision property names) to retrieve values of the corresponding properties.- Returns:
- a map which keys are revision property names and values are their values (both are strings)
-
getRevisionProperties
public SVNProperties getRevisionProperties()
Returns revision properties. UseSVNRevisionProperty
constants (they are revision property names) to retrieve values of the corresponding properties.- Returns:
- a map which keys are revision property names and values are their values (both are strings)
-
getPropertiesDelta
public SVNProperties getPropertiesDelta()
Returns file properties for this file (for this revision). Properties delta for a revision is the same as full properties for that revision.- Returns:
- a map where keys are file property names and values are the property values
-
getRevision
public long getRevision()
Gets the revision of the file.- Returns:
- the revision number of the file
-
compareTo
public int compareTo(java.lang.Object o)
Compares this object with another one.- Specified by:
compareTo
in interfacejava.lang.Comparable
- Parameters:
o
- an object to compare with- Returns:
- 1 - if
o
is either null, or is not an instance of SVNFileRevision, or the revision value of this object is bigger than the one ofo
; - -1 - if the revision value of this object is smaller than the one of
o
; - 0 - if and only if the revision values of this object and
o
are the same (equal)
- 1 - if
-
isResultOfMerge
public boolean isResultOfMerge()
Tells whether this file revision is the result of a merge.- Returns:
- true if this file revision is the result of a merge
- Since:
- 1.2.0
-
-