/*
 * Copyright
 *   2007 axYus - www.axyus.com
 *   2008 L.Meckert - laurent.meckert@axyus.com
 *
 * This file is part of XEMELIOS.
 *
 * XEMELIOS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * XEMELIOS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with XEMELIOS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package fr.gouv.finances.cp.xemelios.plugin.signature;

import fr.gouv.finances.cp.xemelios.common.config.NamespaceModel.StringIterator;
import java.util.Iterator;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import javax.swing.JFileChooser;

import javax.swing.filechooser.FileFilter;
import java.io.File;

import org.apache.log4j.Logger;
import java.security.cert.X509Certificate;
import javax.xml.namespace.NamespaceContext;
import org.apache.xml.security.utils.Constants;

/**
 *  Cree une boite de dialogue permettant de choisir un fichier a verifier et
 * les conditions de traitement
 * @author lm
 */
public class DlglSignatureFull extends javax.swing.JDialog {

    private JFrame parentWindow;
    File fileToVerify = null;
    File fileToGenerate = null;
    File externalDTD = null;
    JFileChooser fc;
    static Logger logger = Logger.getLogger(DlglSignatureFull.class);

    /**
     * Constructeur sans parametre pour IDE
     */
    public DlglSignatureFull() {

    }

    /**
     * Creates a new instance of DlglSignatureFull 
     *@param  parent 
     *@param  modal 
     */
    public DlglSignatureFull(JFrame parent, boolean modal) {
        super(parent, modal);
        parentWindow = parent;
        initComponents();
        setLocationRelativeTo(parent);
    }

    /**
     * Montre le résultat de la vérification
     * @param verifier l'objet SignatureVerifier qui a opéré la vérification
     */
    public void showStatus(SignatureVerifier verifier) {
        String bla = verifier.getStatusAsString();

        int sever = verifier.getStatusAsSeverity();

        JOptionPane.showMessageDialog(parentWindow,
                bla,
                "Résultat de la vérification",
                sever == SignatureVerifier.VFY_VERYBAD ? JOptionPane.ERROR_MESSAGE : (sever == SignatureVerifier.VFY_BAD ? JOptionPane.WARNING_MESSAGE : JOptionPane.PLAIN_MESSAGE));
    }

    /**
     * Execute la vérification aprèes choix des parametres
     */
    public void doVerify() {
        if (fileToVerify != null) {
            SignatureVerifierFactory svf = SignatureVerifierFactory.newInstance(new LocalNSCtx());
            SignatureVerifier verifier = null;
            svf.setAttribute(SignatureVerifierFactory.DO_POSTTRAIT, jCheckBoxReportBordereaux.isSelected());
            svf.setAttribute(SignatureVerifierFactory.USE_APACHEXMLSEC, jRadioButtonUseApache.isSelected());
            svf.setAttribute(SignatureVerifierFactory.USE_LIBXML2, jRadioButtonUseLibxml.isSelected());
            svf.setAttribute(SignatureVerifierFactory.VALIDATE_SCHEMA_OR_DTD, jCheckBoxValidateSchema.isSelected());
            if (!"".equals(textFieldXPath.getText())) {
                svf.setAttribute(SignatureVerifierFactory.SIGNATURE_XPATH, textFieldXPath.getText());
            }


            if (jCheckBoxReportBordereaux.isSelected()) {

                // Show save dialog; this method does not return until the dialog is closed
                if (fileToGenerate != null) {
                    fc = new JFileChooser(fileToGenerate);
                } else {
                    fc = new JFileChooser(".");
                }
                fc.addChoosableFileFilter(new FileFilter() {

                    public boolean accept(File f) {
                        return f.isDirectory() || f.getName().toUpperCase().endsWith("XML");
                    }

                    public String getDescription() {
                        return "Document XML";
                    }
                    });
                fc.showSaveDialog(null);
                fileToGenerate = fc.getSelectedFile();
                if (fileToGenerate == null) {
                    return;
                }
            }

            if (jRadioButtonUseLibxml.isSelected()) {

                //TODO Ici il faut passer par une ressource deja je teste
                if (jCheckBoxValidateSchema.isSelected()) {
                    if (externalDTD != null) {
                        fc = new JFileChooser(externalDTD);
                    } else {
                        fc = new JFileChooser(".");
                    }
                    fc.addChoosableFileFilter(new FileFilter() {

                        public boolean accept(File f) {
                            return f.isDirectory() || f.getName().toUpperCase().endsWith("DTD");
                        }

                        public String getDescription() {
                            return "Document DTD";
                        }
                    });
                    fc.showOpenDialog(null);
                    externalDTD = fc.getSelectedFile();
                    if (externalDTD == null) {
                        return;
                    }

                    svf.setAttribute(SignatureVerifierFactory.EXTERNAL_DTD, externalDTD.getAbsolutePath());
                }
            }


            try {
                verifier = svf.newSignatureVerifier();
                verifier.initialize();
                verifier.verifyFile(fileToVerify.getAbsolutePath());
                if (verifier.hasPostTrait()) {
                    verifier.postTraitement(fileToGenerate.getAbsolutePath());
                }
                for (int i = 0; i < verifier.getFoundSignatures(); ++i) {
                    Integer istatus = verifier.getIndividualStatus(i);
                    if (istatus != null) {
                        if (verifier.digestValid(istatus.intValue())) {
                            System.out.println("Signature " + i + ":VALIDE");
                        } else {
                            System.out.println("Signature " + i + ":INVALIDE");
                        }
                        if (verifier.isX509Cert(istatus.intValue())) {
                            System.out.println("Signature " + i + "=> certificat X509");
                            X509Certificate cert = verifier.getCert(i);
                            if (cert != null) {
                                System.out.println("PRINTING CERT=");
                                System.out.println(cert);
                            }
                        } else {
                            System.out.println("Signature " + i + ":pas de certificat");
                        }
                    }

                }
               /* for (int i = 0; i < verifier.getCertVectorSize(); ++i) {
                    X509Certificate cert = verifier.getCert(i);
                    if (cert != null) {
                        System.out.println("PRINTING CERT=");
                        System.out.println(cert);
                    }
                }*/
                verifier.terminate();
            } catch (Exception e) {

                e.printStackTrace();

            }
            if (verifier != null) {
                showStatus(verifier);
            }
            if (jCheckBoxFermerApres.isSelected()) {
                close();
            }

        } else {
            JOptionPane.showMessageDialog(parentWindow, "Il faut d'abord sélectionner un fichier!");
        }

    }

    /**
     * 
     */
    public void ShowInputFileSelector() {
        if (fileToVerify != null) {
            fc = new JFileChooser(fileToVerify);
        } else {
            fc = new JFileChooser(".");
        }
        fc.addChoosableFileFilter(new FileFilter() {

            public boolean accept(File f) {
                return f.isDirectory() || f.getName().toUpperCase().endsWith("XML");
            }

            public String getDescription() {
                return "Document XML";
            }
            });
        // Show open dialog; this method does not return until the dialog is closed
        fc.showOpenDialog(null);
        fileToVerify = fc.getSelectedFile();
        if (fileToVerify != null) {
            textFieldInputFile.setText(fileToVerify.getAbsolutePath());
        }

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    public void run() {
        setSize(405, 470);
        setVisible(true);
    }

    /**
     * 
     */
    public void close() {
        SwingUtilities.getWindowAncestor(this).dispose();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                JFrame frame = new JFrame("test");
                DlglSignatureFull dialog = new DlglSignatureFull(frame, true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });

                dialog.run();
            }
            });
    }
    private class LocalNSCtx implements NamespaceContext {

        public String getNamespaceURI(String prefix) {
            if("ds".equals(prefix)) return Constants.SignatureSpecNS;
            else return "http://www.minefi.gouv.fr/cp/helios/pes_v2/Rev0/aller";
        }

        public String getPrefix(String namespaceURI) {
            if(Constants.SignatureSpecNS.equals(namespaceURI)) return "ds";
            else return "n";
        }

        public Iterator getPrefixes(String namespaceURI) {
            if(Constants.SignatureSpecNS.equals(namespaceURI)) return new StringIterator("ds");
            else return new StringIterator("n");
        }
        
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jDialog1 = new javax.swing.JDialog();
        jDialog2 = new javax.swing.JDialog();
        jDialog3 = new javax.swing.JDialog();
        jDialog4 = new javax.swing.JDialog();
        jButtonOK = new javax.swing.JButton();
        jButtonAnnuler = new javax.swing.JButton();
        jCheckBoxReportBordereaux = new javax.swing.JCheckBox();
        jLabel1 = new javax.swing.JLabel();
        jRadioButtonUseApache = new javax.swing.JRadioButton();
        jRadioButtonUseLibxml = new javax.swing.JRadioButton();
        jButtonInputFile = new javax.swing.JButton();
        textFieldInputFile = new java.awt.TextField();
        label1 = new java.awt.Label();
        jCheckBoxValidateSchema = new javax.swing.JCheckBox();
        jLabel2 = new javax.swing.JLabel();
        textFieldXPath = new java.awt.TextField();
        label2 = new java.awt.Label();
        jCheckBoxFermerApres = new javax.swing.JCheckBox();

        org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );

        org.jdesktop.layout.GroupLayout jDialog2Layout = new org.jdesktop.layout.GroupLayout(jDialog2.getContentPane());
        jDialog2.getContentPane().setLayout(jDialog2Layout);
        jDialog2Layout.setHorizontalGroup(
            jDialog2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jDialog2Layout.setVerticalGroup(
            jDialog2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );

        org.jdesktop.layout.GroupLayout jDialog3Layout = new org.jdesktop.layout.GroupLayout(jDialog3.getContentPane());
        jDialog3.getContentPane().setLayout(jDialog3Layout);
        jDialog3Layout.setHorizontalGroup(
            jDialog3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jDialog3Layout.setVerticalGroup(
            jDialog3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );

        org.jdesktop.layout.GroupLayout jDialog4Layout = new org.jdesktop.layout.GroupLayout(jDialog4.getContentPane());
        jDialog4.getContentPane().setLayout(jDialog4Layout);
        jDialog4Layout.setHorizontalGroup(
            jDialog4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jDialog4Layout.setVerticalGroup(
            jDialog4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jButtonOK.setText("OK");
        jButtonOK.setName("jButtonOK"); // NOI18N
        jButtonOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonOKActionPerformed(evt);
            }
        });

        jButtonAnnuler.setText("Annuler");
        jButtonAnnuler.setName("jButtonAnnuler"); // NOI18N
        jButtonAnnuler.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAnnulerActionPerformed(evt);
            }
        });

        jCheckBoxReportBordereaux.setFont(new java.awt.Font("Tahoma", 0, 12));
        jCheckBoxReportBordereaux.setText("Reporter la signature dans les bordereaux");
        jCheckBoxReportBordereaux.setToolTipText("<html>Option valide uniquement avec la librarie apache. <br>Il s'agit uniquement d'un report textuel, pas d'une signature individuelle des bordereaux.<br>On vous demandera de choisir un fichier de sortie.");
        jCheckBoxReportBordereaux.setName("jCheckBoxReporter"); // NOI18N
        jCheckBoxReportBordereaux.setOpaque(false);

        jLabel1.setName("jLabel1"); // NOI18N

        buttonGroup1.add(jRadioButtonUseApache);
        jRadioButtonUseApache.setSelected(true);
        jRadioButtonUseApache.setText("Utiliser apache.xml.security");
        jRadioButtonUseApache.setToolTipText("<html>Utilise la librairie pur java.<br>\n Généralement conseillé, mais limité à des fichiers de taille raisonnable (< 10 M)");
        jRadioButtonUseApache.setName("jRadioButtonApache"); // NOI18N

        buttonGroup1.add(jRadioButtonUseLibxml);
        jRadioButtonUseLibxml.setText("Utiliser libxml/xmlsec ");
        jRadioButtonUseLibxml.setToolTipText("<html>Passe par JNI pour utiliser des librairies C; <br>\nSuppose que ces librairies sont dans le PATH");
        jRadioButtonUseLibxml.setName("jRadioButtonLibxml"); // NOI18N

        jButtonInputFile.setText("...");
        jButtonInputFile.setName("jButtonInputFile"); // NOI18N
        jButtonInputFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonInputFileActionPerformed(evt);
            }
        });

        textFieldInputFile.setEnabled(false);
        textFieldInputFile.setName("textFieldInputFile"); // NOI18N

        label1.setText("Utiliser le bouton \"... \" pour choisir le fichier Xml à vérifier");

        jCheckBoxValidateSchema.setFont(new java.awt.Font("Tahoma", 0, 12));
        jCheckBoxValidateSchema.setText("Valider d'après le schema (apache) ou un DTD externe (libxml)");
        jCheckBoxValidateSchema.setToolTipText("<html>Recherche et valide les schémas indiqués dans le fichier à étudier.<br>Assurez vous que ces schémas sont présents<br>Dans le cas libxml il faut passer par un DTD externe<br> dans le cas très particulier ou la signature signe un élément référencé par son ID<br>(Un sélécteur de fichier vous permettra de choisir ce fichier DTD) ");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 13));
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("VERIFICATION D'UN FICHIER PES SIGNE");

        textFieldXPath.setText("//ds:Signature");
        textFieldXPath.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldXPathActionPerformed(evt);
            }
        });

        label2.setText("XPath de recherche de signature");

        jCheckBoxFermerApres.setText("Fermer ce dialigue après exécution");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(10, 10, 10)
                        .add(label1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 315, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jRadioButtonUseLibxml))
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jRadioButtonUseApache))
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jCheckBoxFermerApres))
                    .add(layout.createSequentialGroup()
                        .addContainerGap()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                                .add(jButtonOK)
                                .add(241, 241, 241)
                                .add(jButtonAnnuler))
                            .add(org.jdesktop.layout.GroupLayout.LEADING, jCheckBoxReportBordereaux)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                                .add(label2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(19, 19, 19)
                                .add(textFieldXPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 143, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(org.jdesktop.layout.GroupLayout.LEADING, jCheckBoxValidateSchema)))
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .addContainerGap()
                            .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(layout.createSequentialGroup()
                                    .add(313, 313, 313)
                                    .add(jLabel1))
                                .add(layout.createSequentialGroup()
                                    .addContainerGap()
                                    .add(textFieldInputFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 303, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                            .add(26, 26, 26)
                            .add(jButtonInputFile))))
                .addContainerGap(25, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(16, 16, 16)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(23, 23, 23)
                        .add(jLabel1))
                    .add(layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jButtonInputFile)
                            .add(textFieldInputFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .add(label1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(30, 30, 30)
                .add(jRadioButtonUseApache)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jRadioButtonUseLibxml, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(52, 52, 52)
                .add(jCheckBoxValidateSchema)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jCheckBoxReportBordereaux)
                .add(24, 24, 24)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(label2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(textFieldXPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(26, 26, 26)
                .add(jCheckBoxFermerApres)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jButtonAnnuler, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jButtonOK, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE))
                .add(65, 65, 65))
        );

        label1.getAccessibleContext().setAccessibleName("");
        label1.getAccessibleContext().setAccessibleParent(jLabel1);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
        doVerify(); 
    }//GEN-LAST:event_jButtonOKActionPerformed
    private void jButtonAnnulerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAnnulerActionPerformed
        close();
    }//GEN-LAST:event_jButtonAnnulerActionPerformed
    private void jButtonInputFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonInputFileActionPerformed
        ShowInputFileSelector();
    }//GEN-LAST:event_jButtonInputFileActionPerformed

    private void textFieldXPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldXPathActionPerformed
    // TODO add your handling code here:
    }//GEN-LAST:event_textFieldXPathActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButtonAnnuler;
    private javax.swing.JButton jButtonInputFile;
    private javax.swing.JButton jButtonOK;
    private javax.swing.JCheckBox jCheckBoxFermerApres;
    private javax.swing.JCheckBox jCheckBoxReportBordereaux;
    private javax.swing.JCheckBox jCheckBoxValidateSchema;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JDialog jDialog2;
    private javax.swing.JDialog jDialog3;
    private javax.swing.JDialog jDialog4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JRadioButton jRadioButtonUseApache;
    private javax.swing.JRadioButton jRadioButtonUseLibxml;
    private java.awt.Label label1;
    private java.awt.Label label2;
    private java.awt.TextField textFieldInputFile;
    private java.awt.TextField textFieldXPath;
    // End of variables declaration//GEN-END:variables
}

