org.sourcejammer.project.controller
Class BranchReportMaker

java.lang.Object
  |
  +--org.sourcejammer.project.controller.BranchReportMaker

public class BranchReportMaker
extends java.lang.Object

Title: $FileName: BranchReportMaker.java$

Version:
$VerNum: 4$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

Field Summary
private static java.lang.String ANGLE
           
private  Archive archive
           
private static java.lang.String BRANCH_REPORT
           
private static java.lang.String CLOSE_ELEMENT
           
private static java.lang.String DOWN_LINE
           
private static java.lang.String EOL
           
private  long fileID
           
private  NodeLibrary library
           
private static java.lang.String OPEN_ELEMENT
           
private  java.lang.String originalFileName
           
private  java.lang.StringBuffer strReport
           
private static java.lang.String TAB
           
 
Constructor Summary
BranchReportMaker()
           
 
Method Summary
private  void addAsNewName(java.lang.String newName)
           
private  void addBlankLine(java.lang.String prepend)
           
private  void addBranch(java.lang.String prependString, java.lang.String identifier, java.lang.String newName, java.util.Date createDate, java.lang.String path)
           
private  void addBranch(java.lang.String prependString, java.lang.String identifier, java.lang.String newName, java.util.Date createDate, java.lang.String[] paths)
           
private  void addBranch(java.lang.String prependString, java.lang.String identifier, java.lang.String newName, java.util.Date createDate, java.lang.String[] paths, boolean includeAngle)
           
private  void addDownConnector()
           
private  void addElement(java.lang.String element)
           
private  void addLevelOneDownConnector()
           
private  void addReportHeader()
           
private  void areParamsSet()
           
 void generateReport()
          Generated branch report for the parameters as set in this BranchReportMaker.
private  java.lang.String[] getAllPaths(FileNode fl)
           
private  java.lang.String getDateString(java.util.Date date)
           
 java.lang.String getReport()
          Returns generated report.
private  void indent(int level)
           
private  void indentWithAngle(int level)
           
static void main(java.lang.String[] args)
           
 void setArchive(Archive archive)
          Sets the archive.
 void setFileID(long fileID)
          Sets the fileID.
private  void testTraverseBranches(BranchNode branch, int level, boolean parentHasMore, java.lang.String prependNext, java.lang.String prependRemainder)
           
private  void traverseBranches(BranchNode branch, int level, boolean parentHasMore, java.lang.String prependNext, java.lang.String prependRemainder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileID

private long fileID

library

private NodeLibrary library

archive

private Archive archive

strReport

private java.lang.StringBuffer strReport

originalFileName

private java.lang.String originalFileName

EOL

private static final java.lang.String EOL

BRANCH_REPORT

private static final java.lang.String BRANCH_REPORT
See Also:
Constant Field Values

DOWN_LINE

private static final java.lang.String DOWN_LINE
See Also:
Constant Field Values

ANGLE

private static final java.lang.String ANGLE
See Also:
Constant Field Values

TAB

private static final java.lang.String TAB
See Also:
Constant Field Values

OPEN_ELEMENT

private static final java.lang.String OPEN_ELEMENT
See Also:
Constant Field Values

CLOSE_ELEMENT

private static final java.lang.String CLOSE_ELEMENT
See Also:
Constant Field Values
Constructor Detail

BranchReportMaker

public BranchReportMaker()
Method Detail

getReport

public java.lang.String getReport()
Returns generated report. You must call generateReport() first.


generateReport

public void generateReport()
                    throws BranchReportException
Generated branch report for the parameters as set in this BranchReportMaker. Use getReport() to get the generated report.

BranchReportException

traverseBranches

private void traverseBranches(BranchNode branch,
                              int level,
                              boolean parentHasMore,
                              java.lang.String prependNext,
                              java.lang.String prependRemainder)
                       throws BranchReportException
BranchReportException

getAllPaths

private java.lang.String[] getAllPaths(FileNode fl)
                                throws ProjectDoesNotExistException,
                                       SecurityException,
                                       FileAccessException
ProjectDoesNotExistException
SecurityException
FileAccessException

addReportHeader

private void addReportHeader()

addBranch

private void addBranch(java.lang.String prependString,
                       java.lang.String identifier,
                       java.lang.String newName,
                       java.util.Date createDate,
                       java.lang.String path)

addBranch

private void addBranch(java.lang.String prependString,
                       java.lang.String identifier,
                       java.lang.String newName,
                       java.util.Date createDate,
                       java.lang.String[] paths)

addBranch

private void addBranch(java.lang.String prependString,
                       java.lang.String identifier,
                       java.lang.String newName,
                       java.util.Date createDate,
                       java.lang.String[] paths,
                       boolean includeAngle)

getDateString

private java.lang.String getDateString(java.util.Date date)

addElement

private void addElement(java.lang.String element)

addAsNewName

private void addAsNewName(java.lang.String newName)

indentWithAngle

private void indentWithAngle(int level)

indent

private void indent(int level)

addBlankLine

private void addBlankLine(java.lang.String prepend)

addDownConnector

private void addDownConnector()

addLevelOneDownConnector

private void addLevelOneDownConnector()

areParamsSet

private void areParamsSet()

setArchive

public void setArchive(Archive archive)
Sets the archive.

Parameters:
archive - The archive to set

setFileID

public void setFileID(long fileID)
Sets the fileID.

Parameters:
fileID - The fileID to set

main

public static void main(java.lang.String[] args)

testTraverseBranches

private void testTraverseBranches(BranchNode branch,
                                  int level,
                                  boolean parentHasMore,
                                  java.lang.String prependNext,
                                  java.lang.String prependRemainder)
                           throws BranchReportException
BranchReportException


Copyright 2003 Soucejammer project.