Class PlanExporter

java.lang.Object
org.apache.derby.tools.PlanExporter

public class PlanExporter extends Object
This class is the main entry point to the tool Graphical Query Explainer.
  • Field Details

  • Constructor Details

    • PlanExporter

      public PlanExporter()
  • Method Details

    • main

      public static void main(String[] args)
      Parameters:
      args - 1) database URL eg: jdbc:derby:myDB --------- 2) database schema ----------------------------- 3) statement ID (36 characters) ---------------- and user specified arguments.
    • selectArg

      private static int selectArg(String arg)
      Reading the user's option
      Parameters:
      arg - user's option
      Returns:
      the argument type
    • generateXML

      private static void generateXML(AccessDatabase access, String arg, String stmt, String time, String xsl) throws IOException
      Parameters:
      access - instance of AccessDatabase class
      arg - path of XML
      stmt - statement executed
      time - time which the statement was executed
      xsl - name of the style sheet
      Throws:
      IOException - if an error occurs when writing the XML file
    • generateHTML

      private static void generateHTML(String arg, String path, String style, boolean def) throws Exception
      Parameters:
      arg - path to xml
      path - path of HTML
      style - path to xsl
      def - whether the default xsl or not
      Throws:
      Exception
    • printHelp

      private static void printHelp()
    • deleteFile

      private static void deleteFile(String fileName)