# Class RevisionData

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

public class RevisionData extends 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 invalid input: '<'richard@cyganiak.de>

## Constructor Summary

Constructors
Constructor
Description
`RevisionData()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getComment()`
`Date`
`getDate()`
`int`
`getLinesAdded()`
`int`
`getLinesRemoved()`
`String`
`getLoginName()`
`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(String comment)`
`void`
`setDate(Date date)`
`void`
`setLines(int added, int removed)`
Sets the number of added and removed lines.
`void`
`setLoginName(String authorName)`
`void`
`setRevisionNumber(String revision)`
Sets the revision number.
`void`
`setStateDead()`
`void`
`setStateExp()`
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### RevisionData

public RevisionData()

## Method Details

### getLoginName

public String getLoginName()

Returns:
  Returns the loginName.

### setLoginName

public void setLoginName(String authorName)

Parameters:
  `authorName` - The loginName to set.

### getDate

public Date getDate()

Returns:
  Returns the date.

### setDate

public void setDate(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 String getRevisionNumber()

Returns:
  Returns the revisionNumber.

### setRevisionNumber

public void setRevisionNumber(String revision)
Sets the revision number.

Parameters:
  `revision` - The revision number

### setStateDead

public void setStateDead()

### setStateExp

public void setStateExp()

### getComment

public String getComment()

Returns:
  Returns the comment.

### setComment

public void setComment(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 String toString()

Overrides:
  `toString` in class `Object`