Package net.sf.statcvs.model
Class Repository
java.lang.Object
net.sf.statcvs.model.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- Version:
- $Id: Repository.java,v 1.5 2009/08/31 19:16:35 benoitx Exp $
- Author:
- Manuel Schulze, Tammo van Lessen, Richard Cyganiak <richard@cyganiak.de>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFile
(VersionedFile file) Adds one file to the repository.Returns a SortedSet of allAuthor
s who have committed to the repository, sorted by name.Returns a List of allCommit
s.int
returns the current line count of the repositoryReturns a SortedSet of allDirectory
objects in the repository, ordered in tree ordergetFiles()
Returns a list of allVersionedFile
s, ordered by full nameReturns the firstDate
when there were changes on the repository.getHead()
A special symbolic name that contains the latest revision of every file.Returns the latestDate
when there were changes on the repository.Returns a SortedSet ofRevision
s in the repository, sorted from oldest to most recent.getRoot()
Returns the repository's root directory, or null if the directory contains no files.Returns a list ofSymbolicName
s, ordered from latest to oldest.boolean
isEmpty()
Returns true if the repository contains no files.void
setCommits
(List commits) Sets the list of commits.void
setSymbolicNames
(SortedSet symbolicNames) Sets the list of symbolic names contained in this Repository.toString()
-
Constructor Details
-
Repository
public Repository()
-
-
Method Details
-
addFile
Adds one file to the repository.- Parameters:
file
- the file
-
setCommits
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!- Parameters:
commits
- the list of commits
-
getCommits
Returns a List of allCommit
s.- Returns:
- all commits
-
getLastDate
Returns the latestDate
when there were changes on the repository.- Returns:
- The latest Date
-
getFirstDate
Returns the firstDate
when there were changes on the repository.- Returns:
- The first Date
-
getCurrentLOC
public int getCurrentLOC()returns the current line count of the repository- Returns:
- the current line count of the repository
-
getFiles
Returns a list of allVersionedFile
s, ordered by full name- Returns:
- a list of all
VersionedFile
s
-
isEmpty
public boolean isEmpty()Returns true if the repository contains no files.- Returns:
- true if the repository is empty
-
getRevisions
Returns a SortedSet ofRevision
s in the repository, sorted from oldest to most recent.- Returns:
- all revisions in the repository.
-
getDirectories
Returns a SortedSet of allDirectory
objects in the repository, ordered in tree order- Returns:
- a collection of Directory objects
-
getRoot
Returns the repository's root directory, or null if the directory contains no files.- Returns:
- the root directory
-
setSymbolicNames
Sets the list of symbolic names contained in this Repository.- Parameters:
symbolicNames
-
-
getSymbolicNames
Returns a list ofSymbolicName
s, ordered from latest to oldest. -
getHead
A special symbolic name that contains the latest revision of every file. -
toString
-
getAuthors
Returns a SortedSet of allAuthor
s who have committed to the repository, sorted by name.- Returns:
- a SortedSet of Authors
-
getModules
-