Top Description Fields Constructors Methods
org.apache.derby.tools

public Class PlanExporter

extends Object
Class Inheritance
Imports
java.io.File, .FileOutputStream, .IOException, .OutputStreamWriter, .Writer, org.apache.derby.iapi.tools.i18n.LocalizedResource, org.apache.derby.impl.tools.planexporter.AccessDatabase, .CreateHTMLFile, .CreateXMLFile

This class is the main entry point to the tool Graphical Query Explainer.

Field Summary

Modifier and TypeField and Description
private static String
private static final int
private static final LocalizedResource
private static final int
private static final int
private static String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
deleteFile(final String fileName)

private static void
generateHTML(String
path to xml
arg
,
String
path of HTML
path
,
String
path to xsl
style
,
boolean
whether the default xsl or not
def
)

private static void
generateXML(AccessDatabase
instance of AccessDatabase class
access
,
String
path of XML
arg
,
String
statement executed
stmt
,
String
time which the statement was executed
time
,
String
name of the style sheet
xsl
)

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

private static void
private static int

Returns:

the argument type
selectArg
(String
user's option
arg
)

Reading the user's option

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dbURLback to summary
private static String dbURL
HTMLback to summary
private static final int HTML
LOC_RESback to summary
private static final LocalizedResource LOC_RES
XMLback to summary
private static final int XML
XSLback to summary
private static final int XSL
xslStyleSheetNameback to summary
private static String xslStyleSheetName

Constructor Detail

PlanExporterback to summary
public PlanExporter()

Method Detail

deleteFileback to summary
private static void deleteFile(final String fileName)
generateHTMLback to summary
private static void generateHTML(String arg, String path, String style, boolean def) throws Exception
Parameters
arg:String

path to xml

path:String

path of HTML

style:String

path to xsl

def:boolean

whether the default xsl or not

generateXMLback to summary
private static void generateXML(AccessDatabase access, String arg, String stmt, String time, String xsl) throws IOException
Parameters
access:AccessDatabase

instance of AccessDatabase class

arg:String

path of XML

stmt:String

statement executed

time:String

time which the statement was executed

xsl:String

name of the style sheet

Exceptions
IOException:
if an error occurs when writing the XML file
mainback to summary
public static void main(String[] args)
Parameters
args:String[]

1) database URL eg: jdbc:derby:myDB --------- 2) database schema ----------------------------- 3) statement ID (36 characters) ---------------- and user specified arguments.

printHelpback to summary
private static void printHelp()
selectArgback to summary
private static int selectArg(String arg)

Reading the user's option

Parameters
arg:String

user's option

Returns:int

the argument type