net.ultrametrics.rcs
Class RcsObject

java.lang.Object
  |
  +--net.ultrametrics.rcs.RcsObject

public class RcsObject
extends java.lang.Object
implements java.lang.Comparable

A single RCS object encapsulating its attributes and all revisions.


            Header (Elements - head, access, symbols, locks, comment, policy)
          /
  RcsObject                          LogEntry - (Elements - version, date, 
          \                        /             state, next, author.. )
            History - n x Revision(s) 
                                   \
                                     Modification - (Elements - version, 
                                                                log, text)


Constructor Summary
RcsObject(java.lang.String fileName)
          Create and populate.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 void dump()
          Similar to toString(), but more verbose and dumps directly to stderr.
 boolean dump(java.lang.String version)
           
 boolean equals(java.lang.Object o)
           
 Revision getFirstRevision()
          Retrieve the version number of the initial revision.
 Header getHeader()
          Retrieve this RCS object's Header.
 Revision getHeadRevision()
          Retrieve the version number of the head revision.
 java.lang.String getName()
          Retrieve the name of the file which store's this RCS object's data.
 Revision getRevision(java.lang.String version)
          Retrieve a specific revision.
 java.util.Collection getRevisions()
          Retrieve the revisions to this RCS object.
 int hashCode()
           
 java.lang.String toString()
           
 java.lang.String toSummaryString()
          Similar to toString(), but a more concise, single-line description.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RcsObject

public RcsObject(java.lang.String fileName)
          throws java.io.FileNotFoundException,
                 ParserException
Create and populate.
Parameters:
fileName - the name of the RCS file.
Method Detail

getName

public java.lang.String getName()
Retrieve the name of the file which store's this RCS object's data.

Returns:
the absolute path of the file.

getHeader

public Header getHeader()
Retrieve this RCS object's Header.
Returns:
the header of this RCS object.

getFirstRevision

public Revision getFirstRevision()
Retrieve the version number of the initial revision.
Returns:
this RCS object's first revision.

getHeadRevision

public Revision getHeadRevision()
Retrieve the version number of the head revision.
Returns:
this RCS object's last revision.

getRevision

public Revision getRevision(java.lang.String version)
Retrieve a specific revision.
Parameters:
version - the RCS version number.
Returns:
this RCS object's revision associated with the specified version.

getRevisions

public java.util.Collection getRevisions()
Retrieve the revisions to this RCS object.
Returns:
a collection of revisions.

compareTo

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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toSummaryString

public java.lang.String toSummaryString()
Similar to toString(), but a more concise, single-line description.

toString

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

dump

public void dump()
Similar to toString(), but more verbose and dumps directly to stderr.

dump

public boolean dump(java.lang.String version)
Parameters:
the - RCS version of the history block to dump.
See Also:
dump()