org.dspace.browse
Class BrowseOutput

java.lang.Object
  extended by org.dspace.browse.BrowseOutput

public class BrowseOutput
extends Object

Utility class to provide a wrapper for the various output possibilities from the IndexBrowse class. It can output to the screen and to file, and it can be verbose or not verbose.

Author:
Richard Jones

Constructor Summary
BrowseOutput()
          Constructor.
 
Method Summary
 String getFileName()
           
 boolean isAppend()
           
 boolean isFile()
           
 boolean isPrint()
           
 boolean isVerbose()
           
 void message(String message)
          Pass in a message to be processed.
 void setAppend(boolean append)
           
 void setFile(boolean file)
           
 void setFileName(String fileName)
           
 void setPrint(boolean print)
           
 void setVerbose(boolean verbose)
           
 void sql(String sql)
          Pass in some SQL.
 void urgent(String message)
          Pass in a message that must be displayed to the user, irrespective of the verbosity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowseOutput

public BrowseOutput()
Constructor.

Method Detail

isAppend

public boolean isAppend()
Returns:
Returns the append.

setAppend

public void setAppend(boolean append)
Parameters:
append - The append to set.

getFileName

public String getFileName()
Returns:
Returns the fileName.

setFileName

public void setFileName(String fileName)
Parameters:
fileName - The fileName to set.

isFile

public boolean isFile()
Returns:
Returns the file.

setFile

public void setFile(boolean file)
Parameters:
file - The file to set.

isPrint

public boolean isPrint()
Returns:
Returns the print.

setPrint

public void setPrint(boolean print)
Parameters:
print - The print to set.

isVerbose

public boolean isVerbose()
Returns:
Returns the verbose.

setVerbose

public void setVerbose(boolean verbose)
Parameters:
verbose - The verbose to set.

message

public void message(String message)
Pass in a message to be processed. If the setting is verbose then this will be output to System.out

Parameters:
message - the message to set

urgent

public void urgent(String message)
Pass in a message that must be displayed to the user, irrespective of the verbosity. Will be displayed to System.out

Parameters:
message - the urgent message

sql

public void sql(String sql)
         throws BrowseException
Pass in some SQL. If print is set to true this will output to the screen. If file is set to true, this will write to the file specified.

Parameters:
sql -
Throws:
BrowseException


Copyright © 2010 DuraSpace. All Rights Reserved.