net.ultrametrics.rcs
Class LogEntry

java.lang.Object
  |
  +--net.ultrametrics.rcs.ControlInformation
        |
        +--net.ultrametrics.rcs.LogEntry

public class LogEntry
extends ControlInformation
implements java.lang.Comparable, Versioned

Encapsulation of a single log entry for an RCS controlled object.


Field Summary
static java.lang.String _rcsId
           
protected static java.lang.String AUTHOR
           
protected static java.lang.String BRANCHES
           
protected static java.lang.String DATE
           
protected static java.lang.String NEXT
           
protected static java.lang.String STATE
           
protected static java.lang.String VERSION
           
 
Fields inherited from class net.ultrametrics.rcs.ControlInformation
_rcsId, DELIMITER, EXT_RCS, map, reader
 
Constructor Summary
LogEntry(java.io.BufferedReader reader)
          Create a log entry.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 void dump()
          Similar to toString(), but more verbose and dumps directly to stderr.
protected  java.util.Collection getAllowedKeys()
           
 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.util.Date getDate()
          Retrieve the date this log entry was made.
 java.lang.String getNextVersion()
          Retrieve the version number of the next version.
 java.lang.String getState()
          Retrieve the state.
 java.lang.String getVersion()
          Retrieve the version number associated with this log entry.
protected  boolean isKeyAllowed(java.lang.String key)
           
static void main(java.lang.String[] args)
          Tester.
 boolean parse()
          Parse a log entry block.
 java.lang.String toString()
           
 
Methods inherited from class net.ultrametrics.rcs.ControlInformation
clear, containsKey, getElement, getFirstElement, makeKeyCollection, parseNextElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

protected static final java.lang.String VERSION

DATE

protected static final java.lang.String DATE

STATE

protected static final java.lang.String STATE

NEXT

protected static final java.lang.String NEXT

AUTHOR

protected static final java.lang.String AUTHOR

BRANCHES

protected static final java.lang.String BRANCHES

_rcsId

public static final java.lang.String _rcsId
Constructor Detail

LogEntry

public LogEntry(java.io.BufferedReader reader)
Create a log entry.
Parameters:
reader - the buffered reader from which the log entry will be subsequently parsed.
Method Detail

getVersion

public java.lang.String getVersion()
Retrieve the version number associated with this log entry.
Specified by:
getVersion in interface Versioned
Returns:
the RCS version number.

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 log entry 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 associated with this log entry.

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.

parse

public boolean parse()
              throws ParserException
Parse a log entry block.

Returns:
whether this is the last log entry in the reader.
Overrides:
parse in class ControlInformation
See Also:
ControlInformation.parse()

compareTo

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

isKeyAllowed

protected boolean isKeyAllowed(java.lang.String key)
Overrides:
isKeyAllowed in class ControlInformation

getAllowedKeys

protected java.util.Collection getAllowedKeys()
Overrides:
getAllowedKeys in class ControlInformation

dump

public void dump()
Similar to toString(), but more verbose and dumps directly to stderr.
Overrides:
dump in class ControlInformation

toString

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

main

public static void main(java.lang.String[] args)
                 throws ParserException,
                        java.io.FileNotFoundException
Tester.