## net.sf.statcvs.input
Class RevisionData

    java.lang.Object
      net.sf.statcvs.input.RevisionData

    public class RevisionData

extends java.lang.Object

Container for all information contained in one CVS revisionNumber

Version:
  $Id: RevisionData.java,v 1.7 2008/04/02 11:22:15 benoitx Exp $
Author:
  Richard Cyganiak <richard@cyganiak.de>

Constructor Summary
`RevisionData()`

Method Summary
`java.lang.String` `getComment()`
`java.util.Date` `getDate()`
`int` `getLinesAdded()`
`int` `getLinesRemoved()`
`java.lang.String` `getLoginName()`
`java.lang.String` `getRevisionNumber()`
`boolean` `hasNoLines()` Checks if the revision contains numbers for the added and removed lines.
`boolean` `isAddOnSubbranch()` Returns `true` if this revisionNumber marks the adding of a new file on a subbranch.
`boolean` `isChangeOrRestore()` Returns `true` if this revisionNumber is a normal change, or if it restores a removed file.
`boolean` `isCreation()` Returns `true` if this revisionNumber is the creation of a new file.
`boolean` `isDeletion()` Returns `true` if this revisionNumber is the removal of a file.
`boolean` `isOnTrunk()` Returns `true` if this revisionNumber is on the main branch.
`boolean` `isStateDead()` Returns `true` if this is a dead revisionNumber.
`boolean` `isStateExp()` Returns `true` if this is an Exp revisionNumber.
`void` `setComment(java.lang.String comment)`
`void` `setDate(java.util.Date date)`
`void` `setLines(int added, int removed)` Sets the number of added and removed lines.
`void` `setLoginName(java.lang.String authorName)`
`void` `setRevisionNumber(java.lang.String revision)` Sets the revision number.
`void` `setStateDead()`
`void` `setStateExp()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RevisionData

    public RevisionData()

Method Detail

### getLoginName

    public java.lang.String getLoginName()

  Returns:
    Returns the loginName.

### setLoginName

    public void setLoginName(java.lang.String authorName)

  Parameters:
    `authorName` - The loginName to set.

### getDate

    public java.util.Date getDate()

  Returns:
    Returns the date.

### setDate

    public void setDate(java.util.Date date)

  Parameters:
    `date` - The date to set.

### getLinesAdded

    public int getLinesAdded()

  Returns:
    Returns the linesAdded.

### getLinesRemoved

    public int getLinesRemoved()

  Returns:
    Returns the linesRemoved.

### hasNoLines

    public boolean hasNoLines()

  Checks if the revision contains numbers for the added and removed lines.

  Returns:
    true if the revision contains numbers for the added and removed lines

### setLines

    public void setLines(int added,
                         int removed)

  Sets the number of added and removed lines.

  Parameters:
    `added` - The number of added lines
    `removed` - The number of removed lines

### getRevisionNumber

    public java.lang.String getRevisionNumber()

  Returns:
    Returns the revisionNumber.

### setRevisionNumber

    public void setRevisionNumber(java.lang.String revision)

  Sets the revision number.

  Parameters:
    `revision` - The revision number

### setStateDead

    public void setStateDead()

### setStateExp

    public void setStateExp()

### getComment

    public java.lang.String getComment()

  Returns:
    Returns the comment.

### setComment

    public void setComment(java.lang.String comment)

  Parameters:
    `comment` - The comment to set.

### isAddOnSubbranch

    public boolean isAddOnSubbranch()

  Returns `true` if this revisionNumber marks the adding of a new file on a subbranch. CVS creates a dead 1.1 revisionNumber on the trunk even if the file never gets merged into the trunk. If we evaluate the trunk, and the file doesn't have any other revisions on the trunk, then we ignore this revisionNumber.

  Returns:
    `true` if this is the adding of a new file on a subbranch

### isDeletion

    public boolean isDeletion()

  Returns `true` if this revisionNumber is the removal of a file. Any dead revisionNumber means that the file was removed. The only exception is a dead 1.1 revisionNumber, which is an add on a subbranch.

  Returns:
    `true` if this revisionNumber deletes the file.
  See Also:
    `isAddOnSubbranch()`

### isChangeOrRestore

    public boolean isChangeOrRestore()

  Returns `true` if this revisionNumber is a normal change, or if it restores a removed file. The distinction between these two cases can be made by looking at the previous (in time, not log order) revisionNumber. If it was a deletion, then this revisionNumber is a restore.

  Returns:
    `true` if this is a normal change or a restore.

### isCreation

    public boolean isCreation()

  Returns `true` if this revisionNumber is the creation of a new file.

  Returns:
    `true` if this is the creation of a new file.

### isOnTrunk

    public boolean isOnTrunk()

  Returns `true` if this revisionNumber is on the main branch.

  Returns:
    `true` if this revisionNumber is on the main branch.

### isStateExp

    public boolean isStateExp()

  Returns `true` if this is an Exp revisionNumber. This is CVS speak for any "live" revisionNumber, that is, if this is the current revisionNumber, then a file exists in the working copy.

  Returns:
    `true` if this is an Exp revisionNumber

### isStateDead

    public boolean isStateDead()

  Returns `true` if this is a dead revisionNumber. If this is the current revisionNumber, then the file does not exist in the working copy.

  Returns:
    `true` if this is a dead revisionNumber

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`