Package net.sf.statcvs.input
Class RevisionData
java.lang.Object
net.sf.statcvs.input.RevisionData
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDate()intintbooleanChecks if the revision contains numbers for the added and removed lines.booleanReturns true if this revisionNumber marks the adding of a new file on a subbranch.booleanReturns true if this revisionNumber is a normal change, or if it restores a removed file.booleanReturns true if this revisionNumber is the creation of a new file.booleanReturns true if this revisionNumber is the removal of a file.booleanReturns true if this revisionNumber is on the main branch.booleanReturns true if this is a dead revisionNumber.booleanReturns true if this is an Exp revisionNumber.voidsetComment(String comment) voidvoidsetLines(int added, int removed) Sets the number of added and removed lines.voidsetLoginName(String authorName) voidsetRevisionNumber(String revision) Sets the revision number.voidvoidtoString()
-
Constructor Details
-
RevisionData
public RevisionData()
-
-
Method Details
-
getLoginName
- Returns:
- Returns the loginName.
-
setLoginName
- Parameters:
authorName- The loginName to set.
-
getDate
- Returns:
- Returns the date.
-
setDate
- 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 linesremoved- The number of removed lines
-
getRevisionNumber
- Returns:
- Returns the revisionNumber.
-
setRevisionNumber
Sets the revision number.- Parameters:
revision- The revision number
-
setStateDead
public void setStateDead() -
setStateExp
public void setStateExp() -
getComment
- Returns:
- Returns the comment.
-
setComment
- 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:
-
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
-