Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.statsvn.input
Interface SvnLogBuilder

All Known Implementing Classes:
  Builder

    public interface SvnLogBuilder

Interface for defining a Builder that constructs a data structure from a SVM logfile. `SvnLogfileParser` takes an instance of this interface and will call methods on the interface for every piece of data it encounters in the log.

First, `buildModule(java.lang.String)` will be called with the name of the module. Then, `buildFile(java.lang.String, boolean, boolean, java.util.Map, java.util.Map)` will be called with the filename and other pieces of information of the first file in the log. Then, for every revision of this file, `buildRevision(net.sf.statsvn.input.RevisionData)` is called. The calls to `buildFile` and `buildRevision` are repeated for every file in the log.

The files are in no particular order. The revisions of one file are ordered by time, beginning with the most recent.

Version:
  $Id: SvnLogBuilder.java 351 2008-03-28 18:46:26Z benoitx $
Author:
  Richard Cyganiak , Tammo van Lessen

Method Summary
`void` | `addToAttic(String filename)` Adds a file to the attic.
`void` | `buildFile(String filename, boolean isBinary, boolean isInAttic, Map revBySymnames, Map dateBySymnames)` Starts building a new file.
`void` | `buildModule(String moduleName)` Starts building a module.
`void` | `buildRevision(RevisionData data)` Adds a revision to the last file that was built..
`Map` | `getFileBuilders()` New in StatSVN: We need to have access to FileBuilders after they have been created to populate them with version numbers later on.
`boolean` | `matchesPatterns(String filename)` Matches a filename against the include and exclude patterns.
`boolean` | `matchesTagPatterns(String tag)` Matches a tag against the tag patterns.
`void` | `updateRevision(String filename, String revisionNumber, int linesAdded, int linesRemoved)` New in StatSVN: Updates a particular revision for a file with new line count information.

Method Detail

### buildModule

    void buildModule(String moduleName)

  Starts building a module.

  Parameters:
    `moduleName` - the name of the module

### buildFile

    void buildFile(String filename,
                   boolean isBinary,
                   boolean isInAttic,
                   Map revBySymnames,
                   Map dateBySymnames)

  Starts building a new file. The files are not processed in any particular order.

  Parameters:
    `filename` - the file's name with path relative to the module, for example "path/file.txt"
    `isBinary` - `true` if it's a binary file
    `isInAttic` - `true` if the file is dead on the main branch
    `revBySymnames` - maps revision (string) by symbolic name (string)
    `dateBySymnames` - maps date (date) by symbolic name (string)

### buildRevision

    void buildRevision(RevisionData data)

  Adds a revision to the last file that was built.. The revisions are added in SVN logfile order, that is starting with the most recent one.

  Parameters:
    `data` - the revision

### addToAttic

    void addToAttic(String filename)

  Adds a file to the attic. This method should only be called if our first invocation to (@link #buildFile(String, boolean, boolean, Map)) was given an invalid isInAttic field. This is a way to handle post-processing of implicit deletions at the same time as the implicit additions that can be found in Subversion.

  Parameters:
    `filename` - the filename to add to the attic.

### getFileBuilders

    Map getFileBuilders()

  New in StatSVN: We need to have access to FileBuilders after they have been created to populate them with version numbers later on.

  Returns:
    this builder's contained (@link FileBuilder)s.

### updateRevision

    void updateRevision(String filename,
                        String revisionNumber,
                        int linesAdded,
                        int linesRemoved)

  New in StatSVN: Updates a particular revision for a file with new line count information. If the file or revision does not exist, action will do nothing. Necessary because line counts are not given in the log file and hence can only be added in a second pass.

  Parameters:
    `filename` - the file to be updated
    `revisionNumber` - the revision number to be updated
    `linesAdded` - the lines that were added
    `linesRemoved` - the lines that were removed

### matchesPatterns

    boolean matchesPatterns(String filename)

  Matches a filename against the include and exclude patterns. If no include pattern was specified, all files will be included. If no exclude pattern was specified, no files will be excluded.

  Parameters:
    `filename` - a filename
  Returns:
    `true` if the filename matches one of the include patterns and does not match any of the exclude patterns. If it matches an include and an exclude pattern, `false` will be returned.

### matchesTagPatterns

    boolean matchesTagPatterns(String tag)

  Matches a tag against the tag patterns.

  Parameters:
    `tag` - a tag
  Returns:
    `true` if the tag matches the tag pattern.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD