Class PlanExporter


  • public class PlanExporter
    extends java.lang.Object
    This class is the main entry point to the tool Graphical Query Explainer.
    • Constructor Summary

      Constructors 
      Constructor Description
      PlanExporter()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void deleteFile​(java.lang.String fileName)  
      private static void generateHTML​(java.lang.String arg, java.lang.String path, java.lang.String style, boolean def)  
      private static void generateXML​(AccessDatabase access, java.lang.String arg, java.lang.String stmt, java.lang.String time, java.lang.String xsl)  
      static void main​(java.lang.String[] args)  
      private static void printHelp()  
      private static int selectArg​(java.lang.String arg)
      Reading the user's option
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlanExporter

        public PlanExporter()
    • Method Detail

      • main

        public static void main​(java.lang.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​(java.lang.String arg)
        Reading the user's option
        Parameters:
        arg - user's option
        Returns:
        the argument type
      • generateXML

        private static void generateXML​(AccessDatabase access,
                                        java.lang.String arg,
                                        java.lang.String stmt,
                                        java.lang.String time,
                                        java.lang.String xsl)
                                 throws java.io.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:
        java.io.IOException - if an error occurs when writing the XML file
      • generateHTML

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

        private static void printHelp()
      • deleteFile

        private static void deleteFile​(java.lang.String fileName)