net.sf.statsvn.input
Class RevisionData

java.lang.Object
  extended by net.sf.statsvn.input.RevisionData

public class RevisionData
extends java.lang.Object

Container for all information contained in one SVN revision.

Version:
$Id: RevisionData.java 351 2008-03-28 18:46:26Z benoitx $
Author:
Richard Cyganiak *, Gunter Mussbacher , Jason Kealey

Constructor Summary
RevisionData()
           
 
Method Summary
 RevisionData createCopy()
          Returns a new instance of the RevisionData, with the same fields as the current one.
 java.lang.String getComment()
           
 java.lang.String getCopyfromPath()
           
 java.lang.String getCopyfromRevision()
           
 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 isChange()
          Returns true if this revisionNumber is a normal change.
 boolean isCreationOrRestore()
          Returns true if this revisionNumber is the creation of a new file or a restore..
 boolean isDeletion()
          Returns true if this revisionNumber is the removal of a file.
 boolean isStateDead()
          Returns true if this is a dead revisionNumber.
 boolean isStateExp()
          Returns true if this is an Exp ("exposed"?)
 void setComment(java.lang.String comment)
           
 void setCopyfromPath(java.lang.String copyfromPath)
           
 void setCopyfromRevision(java.lang.String copyfromRevision)
           
 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 setStateAdded(boolean isAdded)
          Is this revision an addition?
 void setStateDead(boolean isDead)
          Is this revision a deletion?
 void setStateExp(boolean isExposed)
          Is the revision exposed.
 java.lang.String toString()
          Returns the current revision data in string format.
 
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(boolean isDead)
Is this revision a deletion?

Parameters:
isDead - true if revision is a deletion.

setStateExp

public void setStateExp(boolean isExposed)
Is the revision exposed. This is CVS speak for any "live" revisionNumber, that is, if this is the current revisionNumber, then a file exists in the working copy. New in StatSVN: We use it to mean this revision is not a deletion revision. (modify, add or replace)

Parameters:
isExposed - true true if the revision is not a deletion.

setStateAdded

public void setStateAdded(boolean isAdded)
Is this revision an addition? New in StatSVN: This is no longer a still exists in working copy. We use it to mean this revision is not a deletion revision.

Parameters:
isAdded -

getComment

public java.lang.String getComment()
Returns:
Returns the comment.

setComment

public void setComment(java.lang.String comment)
Parameters:
comment - The comment to set.

isDeletion

public boolean isDeletion()
Returns true if this revisionNumber is the removal of a file.

Returns:
true if this revisionNumber deletes the file.

isChange

public boolean isChange()
Returns true if this revisionNumber is a normal change. New in StatSVN: This was isChangeOrRestore before.

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

isCreationOrRestore

public boolean isCreationOrRestore()
Returns true if this revisionNumber is the creation of a new file or a restore.. 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. New in StatSVN: This was isCreation before.

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

isStateExp

public boolean isStateExp()
Returns true if this is an Exp ("exposed"?) 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. New in StatSVN: We use it to mean this revision is not a deletion revision. (modify, add or replace)

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()
Returns the current revision data in string format.

Overrides:
toString in class java.lang.Object

createCopy

public RevisionData createCopy()
Returns a new instance of the RevisionData, with the same fields as the current one.

Returns:
the clone

getCopyfromPath

public java.lang.String getCopyfromPath()

setCopyfromPath

public void setCopyfromPath(java.lang.String copyfromPath)

getCopyfromRevision

public java.lang.String getCopyfromRevision()

setCopyfromRevision

public void setCopyfromRevision(java.lang.String copyfromRevision)


Copyright © 2008. All Rights Reserved.