net.ultrametrics.rcs
Class Revision

java.lang.Object
  |
  +--net.ultrametrics.rcs.Revision

public class Revision
extends java.lang.Object
implements java.lang.Comparable, Versioned

Encapsulation of an RCS revision including a log entry describing the change and the text of the modification.


Field Summary
static java.lang.String _rcsId
           
 
Constructor Summary
Revision(LogEntry logEntry, Modification modification)
          Create a new revision.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 void dump()
          Similar to toString(), but more verbose and dumps directly to stderr.
 int getAddedCount()
          Retrieve the number of lines added.
 java.lang.String getAuthor()
          Retrieve the author of the revision.
 java.util.Collection getBranches()
          Retrieve the version numbers of branches of this version's node.
 java.lang.String getChanges()
          Retrieve the changes for this revision.
 java.lang.String getComments()
          Retrieve the author's comments describing this modification.
 java.util.Date getDate()
          Retrieve the date this revision was made.
 int getLineCount()
          Retrieve the total line count.
 java.lang.String getNextVersion()
          Retrieve the version number of the next version.
 int getRemovedCount()
          Retrieve the number of lines removed.
 java.lang.String getState()
          Retrieve the state.
 java.lang.String getVersion()
          Retrieve the version number of this revision.
protected  void setAddedCount(int added)
           
protected  void setRemovedCount(int removed)
           
 java.lang.String toString()
           
 java.lang.String toSummaryString()
          Similar to toString(), but a more concise, single-line description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_rcsId

public static final java.lang.String _rcsId
Constructor Detail

Revision

public Revision(LogEntry logEntry,
                Modification modification)
Create a new revision.
Parameters:
logEntry - the log entry for the revision.
modification - the modification log for the revision.
Method Detail

getVersion

public java.lang.String getVersion()
Retrieve the version number of this revision.
Specified by:
getVersion in interface Versioned
Returns:
the RCS version number.

getChanges

public java.lang.String getChanges()
Retrieve the changes for this revision.
Returns:
the text of the source changes in diff format.

getComments

public java.lang.String getComments()
Retrieve the author's comments describing this modification.
Returns:
the text of the developer's comments.

getAddedCount

public int getAddedCount()
Retrieve the number of lines added.
Returns:
the count of the number of lines added in this revision.

getRemovedCount

public int getRemovedCount()
Retrieve the number of lines removed.
Returns:
the count of the number of lines removed in this revision.

getLineCount

public int getLineCount()
Retrieve the total line count.
Returns:
the count of the net number of lines added and removed in this revision.

setAddedCount

protected void setAddedCount(int added)

setRemovedCount

protected void setRemovedCount(int removed)

getAuthor

public java.lang.String getAuthor()
Retrieve the author of the revision.
Returns:
the user id of the person who authored this revision.

getDate

public java.util.Date getDate()
Retrieve the date this revision was made.

RCS dates are stored in and use GMT as a base. Note: Most RCS/CVS clients always display times in GMT. Converting this Date to a string might display the date adjusted for your locale.

Returns:
the date that this revision was made.

getState

public java.lang.String getState()
Retrieve the state.
Returns:
the state of this revision.

getNextVersion

public java.lang.String getNextVersion()
Retrieve the version number of the next version.
Returns:
the version number of the next revision in history.

getBranches

public java.util.Collection getBranches()
Retrieve the version numbers of branches of this version's node.
Returns:
branches from this node of the source repository.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

toSummaryString

public java.lang.String toSummaryString()
Similar to toString(), but a more concise, single-line description.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dump

public void dump()
Similar to toString(), but more verbose and dumps directly to stderr.