Class TauP_Tool

java.lang.Object
edu.sc.seis.TauP.cmdline.TauP_Tool
All Implemented Interfaces:
Callable<Integer>
Direct Known Subclasses:
TauP_AbstractPhaseTool, TauP_Create, TauP_DistAz, TauP_ReflTransPlot, TauP_Table, TauP_VelocityDison, TauP_VelocityMerge, TauP_VelocityPlot, TauP_Version, TauP_WebServe

public abstract class TauP_Tool extends Object implements Callable<Integer>
Base class for tools within the TauP Toolkit.
  • Field Details

  • Constructor Details

  • Method Details

    • call

      public Integer call() throws Exception
      Computes a result, or throws an exception if unable to do so.
      Specified by:
      call in interface Callable<Integer>
      Returns:
      computed result
      Throws:
      Exception - if unable to compute a result
    • setDEBUG

      public void setDEBUG(boolean debug)
      Turns on debugging output.
      Parameters:
      debug - on or off
    • isDEBUG

      public boolean isDEBUG()
    • setVerbose

      public void setVerbose(boolean verbose)
      Turns on verbose output.
      Parameters:
      verbose - on or off
    • isVerbose

      public boolean isVerbose()
    • getCmdLineArgs

      public List<String> getCmdLineArgs()
    • configDefaults

      public static Properties configDefaults()
    • getOutputFormat

      public abstract String getOutputFormat()
    • setOutputFormat

      public void setOutputFormat(String val)
      usually one of TEXT or JSON. Subclasses may add additional types, for example CSV, GMT or SVG.
      Parameters:
      val - output format for results
    • setOutFileBase

      public void setOutFileBase(String outFileBase)
    • getOutFileExtension

      public String getOutFileExtension()
    • setOutFileExtension

      public void setOutFileExtension(String outFileExtension)
    • setToolPropsFilename

      public void setToolPropsFilename(String filename) throws IOException
      Throws:
      IOException
    • init

      public abstract void init() throws TauPException
      Throws:
      TauPException
    • start

      public abstract void start() throws IOException, TauPException
      Throws:
      IOException
      TauPException
    • destroy

      public abstract void destroy() throws TauPException
      Throws:
      TauPException
    • toolNameFromClass

      public static String toolNameFromClass(Class toolClass)
    • validateArguments

      public abstract void validateArguments() throws TauPException
      Throws:
      TauPException