org.biomage.tools.helpers
Class StringOutputHelpers

java.lang.Object
  |
  +--org.biomage.tools.helpers.StringOutputHelpers

public class StringOutputHelpers
extends java.lang.Object

Description: Class that provides static helper metheds for outputting strings.


Field Summary
protected static java.lang.String cppBodyIndent
           
protected static java.lang.String javaBodyIndent
           
static java.lang.String NEWLINE
          Description: The environment specific new line.
static java.lang.String oneIndent
          Description: Size of indentation.
protected static int verbose
          Description: The verboseness level.
 
Constructor Summary
StringOutputHelpers()
           
 
Method Summary
static java.lang.String createPackageDir(java.lang.String fullOutputDir, java.lang.String packageDirName)
          Description: Creates the directory for the package.
static java.lang.String initialCap(java.lang.String string)
          Description: Takes the string and returns a new string based on the input but with the first letter capitalized.
static java.lang.String initialLower(java.lang.String string)
          Description: Takes the string and returns a new string based on the input but with the first letter in lower case.
static void setVerbose(int level)
          Description: Looks for verboseness argument to set the level of output.
protected static java.util.Vector wrapString(java.lang.String string, int lineLength, int firstLineOffset)
          Description: Takes the input string and breaks it into appropriate sized pieces.
protected static void writeCommentBody(java.io.FileWriter writer, java.util.Vector commentLines, java.lang.String keyWord, java.lang.String delimIndent)
          Description: Writes out the body of a comment.
protected static void writeCPPComment(java.io.FileWriter writer, java.lang.String comment, int indentLevel, java.lang.String keyWord, boolean startComment, boolean endComment)
          Description: Takes the comment, formats it for C++ and outputs it.
static void writeDTDComment(java.io.FileWriter writer, java.lang.String comment, java.lang.String keyWord, boolean startComment, boolean endComment)
          Description: Takes the comment, formats it for JavaDoc and outputs it.
static void writeHeader(java.io.FileWriter writer, java.io.File header)
          Description: Writes the header information out to the file.
static void writeJavaComment(java.io.FileWriter writer, java.lang.String comment, int indentLevel, java.lang.String keyWord, boolean startComment, boolean endComment)
          Description: Takes the comment, formats it for JavaDoc and outputs it.
static void writeOutput(java.lang.String mess, int level)
          Description: The verboseness level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEWLINE

public static final java.lang.String NEWLINE
Description: The environment specific new line.


oneIndent

public static java.lang.String oneIndent
Description: Size of indentation.


javaBodyIndent

protected static java.lang.String javaBodyIndent

cppBodyIndent

protected static java.lang.String cppBodyIndent

verbose

protected static int verbose
Description: The verboseness level.

Constructor Detail

StringOutputHelpers

public StringOutputHelpers()
Method Detail

setVerbose

public static void setVerbose(int level)
Description: Looks for verboseness argument to set the level of output.


writeOutput

public static void writeOutput(java.lang.String mess,
                               int level)
Description: The verboseness level.


initialCap

public static java.lang.String initialCap(java.lang.String string)
Description: Takes the string and returns a new string based on the input but with the first letter capitalized.

Returns:
a string with the first letter capitalized.


initialLower

public static java.lang.String initialLower(java.lang.String string)
                                     throws java.lang.Exception
Description: Takes the string and returns a new string based on the input but with the first letter in lower case.

Returns:
a string with the first letter in lower case.

java.lang.Exception

writeJavaComment

public static void writeJavaComment(java.io.FileWriter writer,
                                    java.lang.String comment,
                                    int indentLevel,
                                    java.lang.String keyWord,
                                    boolean startComment,
                                    boolean endComment)
                             throws java.lang.Exception
Description: Takes the comment, formats it for JavaDoc and outputs it.

java.lang.Exception

writeCPPComment

protected static void writeCPPComment(java.io.FileWriter writer,
                                      java.lang.String comment,
                                      int indentLevel,
                                      java.lang.String keyWord,
                                      boolean startComment,
                                      boolean endComment)
                               throws java.lang.Exception
Description: Takes the comment, formats it for C++ and outputs it.

java.lang.Exception

writeDTDComment

public static void writeDTDComment(java.io.FileWriter writer,
                                   java.lang.String comment,
                                   java.lang.String keyWord,
                                   boolean startComment,
                                   boolean endComment)
                            throws java.lang.Exception
Description: Takes the comment, formats it for JavaDoc and outputs it.

java.lang.Exception

writeCommentBody

protected static void writeCommentBody(java.io.FileWriter writer,
                                       java.util.Vector commentLines,
                                       java.lang.String keyWord,
                                       java.lang.String delimIndent)
                                throws java.lang.Exception
Description: Writes out the body of a comment.

Returns:
a Vector that has the original String broken into appropriate sized pieces.

java.lang.Exception

wrapString

protected static java.util.Vector wrapString(java.lang.String string,
                                             int lineLength,
                                             int firstLineOffset)
                                      throws java.lang.Exception
Description: Takes the input string and breaks it into appropriate sized pieces.

Returns:
a Vector that has the original String broken into appropriate sized pieces.

java.lang.Exception

writeHeader

public static void writeHeader(java.io.FileWriter writer,
                               java.io.File header)
                        throws java.lang.Exception
Description: Writes the header information out to the file.

java.lang.Exception

createPackageDir

public static java.lang.String createPackageDir(java.lang.String fullOutputDir,
                                                java.lang.String packageDirName)
                                         throws java.lang.Exception
Description: Creates the directory for the package.

Returns:
the modified fullOutputDir.

java.lang.Exception


Copyright (C) 2002 The MicroArray Gene Expression Database group (MGED) All rights reserved.