package by.vorokhobko.jdbc;

import by.vorokhobko.jdbc.saxparsing.SAXPars;

import java.io.File;

/**
 * StartUI.
 *
 * Class StartUI is for starting program for 004, lesson 8.
 * @author Evgeny Vorokhobko (vorokhobko2011@yandex.ru).
 * @since 02.12.2017.
 * @version 1.
 */
public class StartUI {
    /**
     * The class field.
     */
    private static final String URL = "jdbc:sqlite:d:/WORK/SQLlite/TEST/test.db";
    /**
     * The class field.
     */
    private static WorkSQL workSQL = new WorkSQL();
    /**
     * The class field.
     */
    private static SAXPars pars = new SAXPars();
    /**
     * The class field.
     */
    private static final int ELEMENT = 1000000;
    /**
     * The class field.
     */
    private static long start;
    /**
     * The class field.
     */
    private static TransformXMLDocument trans = new TransformXMLDocument();
    /**
     * The class field.
     */
    private static final String XML_FILE_FIRST = "d:/WORK/SQLlite/TEST/1.xml";
    /**
     * The class field.
     */
    private static final String XML_FILE_SECOND = "d:/WORK/SQLlite/TEST/2.xml";
    /**
     * The method main.
     * @param args - args.
     */
    public static void main(String[] args) {
        start = System.currentTimeMillis();
        workSQL.createConnection(URL);
        workSQL.createTable();
        workSQL.addElement(ELEMENT);
        workSQL.createDocumentXML();
        workSQL.closeConnection();
        trans.updateXML(XML_FILE_FIRST, XML_FILE_SECOND);
        long result = pars.parsingXMLDocument(new File(XML_FILE_SECOND));
        long timeWorkCode = System.currentTimeMillis() - start;
        System.out.println("Sum all element " + result);
        System.out.println("Time work " + timeWorkCode);
    }
}
@@ -476,128 +476,66 @@
 tic 
-WorkSQL workSQL = new WorkSQL();%0A    /**%0A     * The class field.%0A     */%0A    private static SAXPars pars = new SAXPars()
+final String XML_FILE_FIRST = %22d:/WORK/SQLlite/TEST/1.xml%22
 ;%0A  
@@ -601,29 +601,61 @@
 nal 
-int ELEMENT = 1000000
+String XML_FILE_SECOND = %22d:/WORK/SQLlite/TEST/2.xml%22
 ;%0A  
@@ -708,25 +708,39 @@
 ate 
-static long start
+WorkSQL workSQL = new WorkSQL()
 ;%0A  
@@ -793,68 +793,34 @@
 ate 
-static TransformXMLDocument trans = new TransformXMLDocument
+SAXPars pars = new SAXPars
 ();%0A
@@ -888,60 +888,29 @@
 nal 
-String XML_FILE_FIRST = %22d:/WORK/SQLlite/TEST/1.xml%22
+int ELEMENT = 1000000
 ;%0A  
@@ -963,74 +963,63 @@
 ate 
-static final String XML_FILE_SECOND = %22d:/WORK/SQLlite/TEST/2.xml%22
+TransformXMLDocument trans = new TransformXMLDocument()
 ;%0A  
@@ -1136,16 +1136,21 @@
         
+long 
 start = 
@@ -1177,32 +1177,283 @@
 llis();%0A        
+new StartUI().runWork();%0A        long timeWorkCode = System.currentTimeMillis() - start;%0A        System.out.println(%22Time work %22 + timeWorkCode);%0A    %7D%0A    /**%0A     * The method need for start program.%0A     */%0A    public void runWork() %7B%0A        this.
 workSQL.createCo
@@ -1467,32 +1467,37 @@
 n(URL);%0A        
+this.
 workSQL.createTa
@@ -1503,32 +1503,37 @@
 able();%0A        
+this.
 workSQL.addEleme
@@ -1545,32 +1545,37 @@
 EMENT);%0A        
+this.
 workSQL.createDo
@@ -1595,16 +1595,21 @@
         
+this.
 workSQL.
@@ -1635,16 +1635,21 @@
         
+this.
 trans.up
@@ -1776,175 +1776,54 @@
     
-long timeWorkCode = System.currentTimeMillis() - start;%0A        System.out.println(%22Sum all element %22 + result);%0A        System.out.println(%22Time work %22 + timeWorkCode
+System.out.println(%22Sum all element %22 + result
 );%0A 

Update XML XSLT JDBC Оптимизация