|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.statcvs.input.Builder
public class Builder
Helps building the Repository
from a CVS
log. The Builder is fed by some CVS history data source, for
example a CVS log parser. The Repository can be retrieved
using the createCvsContent()
method.
The class also takes care of the creation of Author and Directory objects and makes sure that there's only one of these for each author name and path. It also provides LOC count services.
Constructor Summary | |
---|---|
Builder(RepositoryFileManager repositoryFileManager,
FilePatternMatcher includePattern,
FilePatternMatcher excludePattern,
java.util.regex.Pattern tagsPattern)
Creates a new Builder |
Method Summary | |
---|---|
boolean |
allRejectedByExcludePattern()
|
boolean |
allRejectedByIncludePattern()
|
void |
buildFile(java.lang.String filename,
boolean isBinary,
boolean isInAttic,
java.util.Map revBySymnames)
Starts building a new file. |
void |
buildModule(java.lang.String moduleName)
Starts building the module. |
void |
buildRevision(RevisionData data)
Adds a revision to the current file. |
Repository |
createCvsContent()
Returns a Repository object of all files. |
java.util.Set |
getAtticFileNames()
Returns the Set of filenames that are "in the attic". |
Author |
getAuthor(java.lang.String name)
returns the Author of the given name or creates it if it does not yet exist. |
Directory |
getDirectory(java.lang.String filename)
Returns the Directory of the given filename or creates it if it does not yet exist. |
int |
getLOC(java.lang.String filename)
|
java.lang.String |
getProjectName()
|
java.lang.String |
getRevision(java.lang.String filename)
|
SymbolicName |
getSymbolicName(java.lang.String name)
Returns the SymbolicName with the given name or creates it
if it does not yet exist. |
boolean |
hasLocalCVSMetadata()
Returns true if at least some local files have matching entries in local CVS metada directories. |
boolean |
isLocalFilesNotFound()
Returns true if no local copy was found for the majority of files in the log. |
boolean |
isLogAndLocalFilesOutOfSync()
Returns true if the local working copy is out of sync with the log. |
boolean |
matchesPatterns(java.lang.String filename)
Matches a filename against the include and exclude patterns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Builder(RepositoryFileManager repositoryFileManager, FilePatternMatcher includePattern, FilePatternMatcher excludePattern, java.util.regex.Pattern tagsPattern)
repositoryFileManager
- the RepositoryFileManager
that
can be used to retrieve LOC counts for
the files that this builder will createincludePattern
- a list of Ant-style wildcard patterns, seperated
by : or ;excludePattern
- a list of Ant-style wildcard patterns, seperated
by : or ;tagsPattern
- A regular expression; matching symbolic names are recordedMethod Detail |
---|
public void buildModule(java.lang.String moduleName)
buildModule
in interface CvsLogBuilder
moduleName
- name of the modulepublic void buildFile(java.lang.String filename, boolean isBinary, boolean isInAttic, java.util.Map revBySymnames)
buildFile
in interface CvsLogBuilder
filename
- the file's name with path, for example "path/file.txt"isBinary
- true if it's a binary fileisInAttic
- true if the file is dead on the main branchrevBySymnames
- maps revision (string) by symbolic name (string)public void buildRevision(RevisionData data)
buildRevision
in interface CvsLogBuilder
data
- the revisionpublic Repository createCvsContent()
public java.lang.String getProjectName()
public java.util.Set getAtticFileNames()
public boolean allRejectedByExcludePattern()
public boolean allRejectedByIncludePattern()
public boolean isLogAndLocalFilesOutOfSync()
public boolean isLocalFilesNotFound()
public boolean hasLocalCVSMetadata()
public Author getAuthor(java.lang.String name)
name
- the author's name
public Directory getDirectory(java.lang.String filename)
filename
- the name and path of a file, for example "src/Main.java"
public SymbolicName getSymbolicName(java.lang.String name)
SymbolicName
with the given name or creates it
if it does not yet exist.
name
- the symbolic name's name
public int getLOC(java.lang.String filename) throws NoLineCountException
NoLineCountException
public java.lang.String getRevision(java.lang.String filename) throws java.io.IOException
java.io.IOException
RepositoryFileManager.getRevision(String)
public boolean matchesPatterns(java.lang.String filename)
filename
- a filename
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |