Class 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 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 - SQL string
        Throws:
        BrowseException - if browse error