org.tmatesoft.svn.core.io

Class SVNFileRevision

public class SVNFileRevision extends Object implements 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's openRevision() method.

Version: 1.1.1

Author: TMate Software Ltd.

See Also: SVNRepository ISVNFileRevisionHandler

Constructor Summary
SVNFileRevision(String path, long revision, Map properties, Map propertiesDelta)
Constructs an instance of SVNFileRevision.
Method Summary
intcompareTo(Object o)
Compares this object with another one.
StringgetPath()
Gets the file path (relative to a repository root URL).
MapgetProperties()
Returns revision properties.
MapgetPropertiesDelta()
Returns file properties for this file (for this revision).
longgetRevision()
Gets the revision of the file.
MapgetRevisionProperties()
Returns revision properties.

Constructor Detail

SVNFileRevision

public SVNFileRevision(String path, long revision, Map properties, Map 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 file properties revision properties propertiesDelta file properties for the revision

Method Detail

compareTo

public int compareTo(Object o)
Compares this object with another one.

Parameters: o an object to compare with

Returns:

getPath

public String getPath()
Gets the file path (relative to a repository root URL).

Returns: the path of the file

See Also: SVNRepository

getProperties

public Map getProperties()

Deprecated: use instead

Returns revision properties. Use SVNRevisionProperty 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 Map 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

getRevisionProperties

public Map getRevisionProperties()
Returns revision properties. Use SVNRevisionProperty 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)

Copyright © 2004-2007 TMate Software Ltd. All Rights Reserved.