net.sf.statcvs.model
Class Repository
Represents a CVS Repository and provides access to the
VersionedFile
s,
Directory
s,
Revision
s and
Author
s recorded
in the repository's history.
TODO: Rename class to Repository, getCurrentLOC to getCurrentLines, getAuthors to getLogins
TODO: Change getCommits to SortedSet
$Id: Repository.java,v 1.3 2008/04/02 11:22:16 benoitx Exp $- Manuel Schulze
- Tammo van Lessen
- Richard Cyganiak
addFile
public void addFile(VersionedFile file)
Adds one file to the repository.
getAuthors
public SortedSet getAuthors()
Returns a
SortedSet of all
Author
s who have
committed to the repository, sorted by name.
getCommits
public List getCommits()
Returns a
List of all
Commit
s.
getCurrentLOC
public int getCurrentLOC()
returns the current line count of the repository
- the current line count of the repository
getDirectories
public SortedSet getDirectories()
Returns a
SortedSet of all
Directory
objects
in the repository, ordered in tree order
- a collection of Directory objects
getFiles
public SortedSet getFiles()
getFirstDate
public Date getFirstDate()
Returns the first
Date
when there
were changes on the repository.
getHead
public SymbolicName getHead()
A special symbolic name that contains the latest revision of every file.
getLastDate
public Date getLastDate()
Returns the latest
Date
when there
were changes on the repository.
getRevisions
public SortedSet getRevisions()
Returns a
SortedSet of
Revision
s
in the repository, sorted from oldest to most recent.
- all revisions in the repository.
getRoot
public Directory getRoot()
Returns the repository's root directory, or null if the
directory contains no files.
getSymbolicNames
public SortedSet getSymbolicNames()
Returns a list of
SymbolicName
s,
ordered from latest to oldest.
isEmpty
public boolean isEmpty()
Returns true if the repository contains no files.
- true if the repository is empty
setCommits
public void setCommits(List commits)
Sets the list of commits. This method exists only because
of stupid design. This method may only be called by stupid
designers.
TODO: Fix this ugly hack!
commits
- the list of commits
setSymbolicNames
public void setSymbolicNames(SortedSet symbolicNames)
Sets the list of symbolic names contained in this Repository.
toString
public String toString()