jpl.pds.parser
Class RunLog

java.lang.Object
  extended by jpl.pds.parser.RunLog

public class RunLog
extends Object

Captures the output to the command line window. Counts errors and warnings. Returns the runlog as a string for returning in the HTTP stream.


Constructor Summary
RunLog()
           
 
Method Summary
 void append(String msg, int indent)
          Adds the message to the run log buffer but skips writing to the command line window.
 void errorMessage(String msg, int indent)
          Writes the message to the command line window and the log buffer and increments the number of errors.
 boolean foundErrorsWarnings()
          Checks if any errors or warnings were found.
 int getErrorCount()
          Gets the error count.
 int getWarningCount()
          Gets the warning count.
 String toString()
          Return the runlog as a String.
 void warningMessage(String msg, int indent)
          Writes the message to the command line window and the log buffer and increments the number of warnings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunLog

public RunLog()
Method Detail

toString

public final String toString()
Return the runlog as a String.

Overrides:
toString in class Object
Returns:
Runlog.

append

public final void append(String msg,
                         int indent)
Adds the message to the run log buffer but skips writing to the command line window.

Parameters:
msg - Message to append to the log buffer.
indent - Number of spaces to prepend.

errorMessage

public final void errorMessage(String msg,
                               int indent)
Writes the message to the command line window and the log buffer and increments the number of errors.

Parameters:
msg - Message to write.
indent - Number of spaces to prepend.

warningMessage

public final void warningMessage(String msg,
                                 int indent)
Writes the message to the command line window and the log buffer and increments the number of warnings.

Parameters:
msg - Message to write.
indent - Number of spaces to prepend.

foundErrorsWarnings

public final boolean foundErrorsWarnings()
Checks if any errors or warnings were found.

Returns:
True if errorCount or warningCount > 0.

getErrorCount

public final int getErrorCount()
Gets the error count.

Returns:
Error count.

getWarningCount

public final int getWarningCount()
Gets the warning count.

Returns:
Warning count.


Copyright © 2005-2012 Planetary Data System. All Rights Reserved.