ccvisu
Class ReaderDataGraphCVS

java.lang.Object
  extended by ccvisu.ReaderData
      extended by ccvisu.ReaderDataGraph
          extended by ccvisu.ReaderDataGraphCVS

public class ReaderDataGraphCVS
extends ReaderDataGraph

Reader for CVS log files. Extracts the co-change graph from the CVS log info.

Version:
$Revision: 1.8 $; $Date: 2006/11/25 10:41:07 $
Author:
Dirk Beyer

Nested Class Summary
private  class ReaderDataGraphCVS.Revision
          Represents a CVS revision entry (an abstraction of it).
 
Field Summary
private  boolean sliding
           
private  int timeWindow
          Time-window constant for transaction recovery, in milli-seconds.
 
Fields inherited from class ccvisu.ReaderDataGraph
endl
 
Fields inherited from class ccvisu.ReaderData
in
 
Constructor Summary
ReaderDataGraphCVS(java.io.BufferedReader in, int timeWindow)
          Constructor.
ReaderDataGraphCVS(java.io.BufferedReader in, int timeWindow, boolean sliding)
          Constructor.
 
Method Summary
private  java.lang.Long parseDate(java.lang.String dateStr)
          Parses the date entry.
protected  java.util.Vector<GraphEdgeString> readEdges()
          Reads the edges of a graph in CVS log format from stream reader in, and stores them in a list (of GraphEdgeString elements).
private  java.util.Vector<ReaderDataGraphCVS.Revision> readRevisionList()
          Parses the CVS log data and extracts revisions.
private  java.util.SortedMap recoverTransactions(java.util.Vector<ReaderDataGraphCVS.Revision> revisionList)
          Recovers the change transactions for the co-change graph from the revision information, i.e., it assignes the transaction ids for the revisions.
 
Methods inherited from class ccvisu.ReaderDataGraph
read, readGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeWindow

private int timeWindow
Time-window constant for transaction recovery, in milli-seconds.


sliding

private boolean sliding
Constructor Detail

ReaderDataGraphCVS

public ReaderDataGraphCVS(java.io.BufferedReader in,
                          int timeWindow)
Constructor.

Parameters:
in - Stream reader object.
timeWindow - Time window for transaction recovery, in milli-seconds (default: 180'000).

ReaderDataGraphCVS

public ReaderDataGraphCVS(java.io.BufferedReader in,
                          int timeWindow,
                          boolean sliding)
Constructor.

Parameters:
in - Stream reader object.
timeWindow - Time window for transaction recovery, in milli-seconds (default: 180'000).
sliding - sliding or fixed time window
Method Detail

readEdges

protected java.util.Vector<GraphEdgeString> readEdges()
Reads the edges of a graph in CVS log format from stream reader in, and stores them in a list (of GraphEdgeString elements).

Specified by:
readEdges in class ReaderDataGraph
Returns:
List of string edges.

parseDate

private java.lang.Long parseDate(java.lang.String dateStr)
Parses the date entry.

Parameters:
dateStr - The CVS date entry string.
Returns:
Long value of the date, or null if dateStr is not a valid date entry.

readRevisionList

private java.util.Vector<ReaderDataGraphCVS.Revision> readRevisionList()
Parses the CVS log data and extracts revisions.

Returns:
List of revisions.

recoverTransactions

private java.util.SortedMap recoverTransactions(java.util.Vector<ReaderDataGraphCVS.Revision> revisionList)
Recovers the change transactions for the co-change graph from the revision information, i.e., it assignes the transaction ids for the revisions.

Parameters:
revisionList - is a list of revisions.
Returns:
Sorted map that maps timestamps to collections of transactions, where transactions are sets of revisions.