1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.statcvs.input;
21
22 import java.util.Map;
23
24 /**
25 * <p>Interface for defining a Builder that constructs a data structure from
26 * a CVS logfile. {@link CvsLogfileParser} takes an instance of this
27 * interface and will call methods on the interface for every piece of
28 * data it encounters in the log.</p>
29 *
30 * <p>First, {@link #buildModule} will be called with the name of the
31 * module. Then, {@link #buildFile} will be called with the filename and
32 * other pieces of information of the first file in the log. Then, for
33 * every revision of this file, {@link #buildRevision} is called. The
34 * calls to <tt>buildFile</tt> and <tt>buildRevision</tt> are repeated
35 * for every file in the log.</p>
36 *
37 * <p>The files are in no particular order. The revisions of one file
38 * are ordered by time, beginning with the <em>most recent</em>.</p>
39 *
40 * @author Richard Cyganiak <richard@cyganiak.de>
41 * @author Tammo van Lessen
42 * @version $Id: CvsLogBuilder.java,v 1.3 2008/04/02 11:22:15 benoitx Exp $
43 */
44 public interface CvsLogBuilder {
45
46 /**
47 * Starts building a module.
48 *
49 * @param moduleName the name of the module
50 */
51 public abstract void buildModule(String moduleName);
52
53 /**
54 * Starts building a new file. The files are not processed in any
55 * particular order.
56 *
57 * @param filename the file's name with path relative to the module,
58 * for example "path/file.txt"
59 * @param isBinary <tt>true</tt> if it's a binary file
60 * @param isInAttic <tt>true</tt> if the file is dead on the main branch
61 * @param revBySymnames maps revision (string) by symbolic name (string)
62 */
63 public abstract void buildFile(String filename, boolean isBinary, boolean isInAttic, Map revBySymnames);
64
65 /**
66 * Adds a revision to the last file that was built.. The revisions are added in
67 * CVS logfile order, that is starting with the most recent one.
68 *
69 * @param data the revision
70 */
71 public abstract void buildRevision(RevisionData data);
72 }