net.sf.statcvs.model
Class CvsContent

java.lang.Object
  extended by net.sf.statcvs.model.CvsContent

public class CvsContent
extends java.lang.Object

Representation of a CVS Repository. The content is stored in a HashMap. The keys are the filenames and the values a reference to a CvsFile object.

Version:
$Id: CvsContent.java,v 1.54 2003/06/03 08:40:53 cyganiak Exp $
Author:
Manuel Schulze
See Also:
CvsFile

Constructor Summary
CvsContent(java.lang.String name, java.util.List files)
          The CvsContent constructor.
 
Method Summary
 Author getAuthor(java.lang.String name)
           
 java.util.Collection getAuthors()
           
 int getCurrentLOC()
          returns the current LOC count of the repository
 java.util.List getDirectories()
          Returns a collection of all Directory objects in the repository, ordered in tree order
 java.util.List getFiles()
          Returns a list of all CvsFiles, in no particular order
 java.util.Date getFirstDate()
          Returns the first Date when there were changes on the repository.
 java.util.Date getLastDate()
          Returns the latest Date when there were changes on the repository.
 java.lang.String getModuleName()
          Returns the name of currnet module.
 RevisionIterator getRevisionIterator()
          Returns a RevisionIterator on all revisions in the repository.
 Directory getRoot()
           
 boolean isEmpty()
           
 java.lang.String toString()
          Returns a string representation of all files in the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CvsContent

public CvsContent(java.lang.String name,
                  java.util.List files)
The CvsContent constructor.

Parameters:
name - The name of the module
files - a List of CvsFile objects
Method Detail

getModuleName

public java.lang.String getModuleName()
Returns the name of currnet module.

Returns:
The module name

getLastDate

public java.util.Date getLastDate()
Returns the latest Date when there were changes on the repository.

Returns:
The latest Date

getFirstDate

public java.util.Date getFirstDate()
Returns the first Date when there were changes on the repository.

Returns:
The first Date

getCurrentLOC

public int getCurrentLOC()
returns the current LOC count of the repository

Returns:
the current line count of the repository

getFiles

public java.util.List getFiles()
Returns a list of all CvsFiles, in no particular order

Returns:
a list of all CvsFiles

isEmpty

public boolean isEmpty()
Returns:
true if the repository is empty, e.g. it contains no files

getRevisionIterator

public RevisionIterator getRevisionIterator()
Returns a RevisionIterator on all revisions in the repository. The revisions are in no particular order.

Returns:
an iterator on all revisions in the repository.

getDirectories

public java.util.List getDirectories()
Returns a collection of all Directory objects in the repository, ordered in tree order

Returns:
a collection of Directory objects

getRoot

public Directory getRoot()
Returns:
the root directory

toString

public java.lang.String toString()
Returns a string representation of all files in the repository.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of all files in the repository

getAuthor

public Author getAuthor(java.lang.String name)
Parameters:
name - an author's name
Returns:
the corresponding Author object

getAuthors

public java.util.Collection getAuthors()
Returns:
a Set of all Authors who have committed to the repository