salomeTMF_plug.pluginxlsxml.Export
Class FromXmlToExcel

java.lang.Object
  extended by salomeTMF_plug.pluginxlsxml.Export.FromXmlToExcel

public class FromXmlToExcel
extends java.lang.Object

Read a XML file, generated by SalomeTMF via DocXML Plugin, having requirements and test cases, and transform it in XLS file

Author:
adm_dfej

Constructor Summary
FromXmlToExcel(java.lang.String fichierXml, boolean selectionExportExigence, boolean selectionExportTest, boolean selectionExportParametre, boolean selectionExportEnvironnement, boolean selectionExportCampagne, boolean selectionExportExecutionCampagne, boolean selectionExportAnomalies, boolean selectionfusionCellule)
          Function that transform the XML file to a XLS file
 
Method Summary
 java.lang.String createXlsFile(java.lang.String nomFichierSortie)
          Function that create a XLS File
 java.lang.String getfichierDeSortieXLS()
          recupere fichierDeSortieXLS
 boolean getWriteErrorXLS()
          Get ErreurEcritureXLS
 void openXmlFile(java.lang.String fichierXml)
          function that tries to open the XML File
 void readFileAttachements(java.lang.String pathXML, int colonneURL, int numeroLigne, jxl.write.WritableSheet feuilleExcel)
          Function that read file attachements for all spreadsheets
 void readRequirementsSettings(java.lang.String ParsingRequirementID)
          Read requirement options
 void readURLAttachements(java.lang.String pathXML, int colonneURL, int numeroLigne, jxl.write.WritableSheet feuilleExcel)
          Function that read URL attachements for all spreadsheets
 void readXMLFileAnomalies(org.dom4j.Document documentXml)
          Function that parse Xml file to read Bugs
 void readXMLFileCampagne(org.dom4j.Document documentXml)
          Function that parse Xml file to read campaigns
 void readXMLFileEnvironnement(org.dom4j.Document documentXml)
          Function that parse Xml file to read environnements
 void readXMLFileExecutionCampagne(org.dom4j.Document documentXml)
          Function that parse Xml file to read Campaigns executions
 void readXMLFileParametre(org.dom4j.Document documentXml)
          Function that parse Xml file to read parameters
 void readXMLFileRequirement(org.dom4j.Document documentXml, boolean selectionExportAnomalies)
          Function that parse Xml file to read requirements
 void readXMLFileTest(org.dom4j.Document documentXml, boolean selectionExportAnomalies)
          Function that parse Xml file to read tests
 java.lang.String RemiseEnFormeDescription(java.lang.String valeurDescription)
          Permet d'enlever les espaces en trop d'une chaine de caracteres pour la cellule Description
 java.lang.String removeSpecialCharacters(java.lang.String chaineAModifier)
          Modify a string to pass special characters like quote
 boolean setErreurEcritureXLS()
          Set ErreurEcriturXLs to True
 void writeXLSHeading(boolean selectionExportAnomalies)
          Function that write XLS heading
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FromXmlToExcel

public FromXmlToExcel(java.lang.String fichierXml,
                      boolean selectionExportExigence,
                      boolean selectionExportTest,
                      boolean selectionExportParametre,
                      boolean selectionExportEnvironnement,
                      boolean selectionExportCampagne,
                      boolean selectionExportExecutionCampagne,
                      boolean selectionExportAnomalies,
                      boolean selectionfusionCellule)
               throws org.dom4j.DocumentException,
                      java.lang.Exception,
                      java.io.IOException
Function that transform the XML file to a XLS file

Parameters:
selectionExportParametre - parametre case a cocher
selectionExportEnvironnement - parametre case a cocher
selectionExportCampagne - parametre case a cocher
selectionExportExecutionCampagne - parametre case a cocher
selectionExportAnomalies - parametre case a cocher
selectionExportExigence - parametre case a cocher
selectionExportTest - parametre case a cocher
fichierXml - Name of the XML file
selectionfusionCellule - Choix pour la fusion des cellules
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Lang.Exception
java.io.IOException - IOException
Method Detail

readXMLFileAnomalies

public void readXMLFileAnomalies(org.dom4j.Document documentXml)
                          throws org.dom4j.DocumentException,
                                 java.lang.Exception
Function that parse Xml file to read Bugs

Parameters:
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

openXmlFile

public void openXmlFile(java.lang.String fichierXml)
                 throws org.dom4j.DocumentException
function that tries to open the XML File

Parameters:
fichierXml - Name of the XML File
Throws:
org.dom4j.DocumentException - DocumentException

readXMLFileExecutionCampagne

public void readXMLFileExecutionCampagne(org.dom4j.Document documentXml)
                                  throws org.dom4j.DocumentException,
                                         java.lang.Exception
Function that parse Xml file to read Campaigns executions

Parameters:
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

readXMLFileCampagne

public void readXMLFileCampagne(org.dom4j.Document documentXml)
                         throws org.dom4j.DocumentException,
                                java.lang.Exception
Function that parse Xml file to read campaigns

Parameters:
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

readFileAttachements

public void readFileAttachements(java.lang.String pathXML,
                                 int colonneURL,
                                 int numeroLigne,
                                 jxl.write.WritableSheet feuilleExcel)
                          throws jxl.write.biff.RowsExceededException,
                                 jxl.write.WriteException
Function that read file attachements for all spreadsheets

Parameters:
pathXML - Xml directory path
colonneURL - Column number to read
numeroLigne - line number to read
feuilleExcel - Excel Spreadsheet to read
Throws:
jxl.write.biff.RowsExceededException - Excel Exception
jxl.write.WriteException - Write Exception

readURLAttachements

public void readURLAttachements(java.lang.String pathXML,
                                int colonneURL,
                                int numeroLigne,
                                jxl.write.WritableSheet feuilleExcel)
                         throws jxl.write.biff.RowsExceededException,
                                jxl.write.WriteException
Function that read URL attachements for all spreadsheets

Parameters:
pathXML - Xml directory path
colonneURL - Column number to read
numeroLigne - line number to read
feuilleExcel - Excel Spreadsheet to read
Throws:
jxl.write.biff.RowsExceededException - Excel Exception
jxl.write.WriteException - Write Exception

readXMLFileEnvironnement

public void readXMLFileEnvironnement(org.dom4j.Document documentXml)
                              throws org.dom4j.DocumentException,
                                     java.lang.Exception
Function that parse Xml file to read environnements

Parameters:
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

readXMLFileParametre

public void readXMLFileParametre(org.dom4j.Document documentXml)
                          throws org.dom4j.DocumentException,
                                 java.lang.Exception
Function that parse Xml file to read parameters

Parameters:
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

readXMLFileTest

public void readXMLFileTest(org.dom4j.Document documentXml,
                            boolean selectionExportAnomalies)
                     throws org.dom4j.DocumentException,
                            java.lang.Exception
Function that parse Xml file to read tests

Parameters:
selectionExportAnomalies - Veryfy bug spreadsheet presence
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

removeSpecialCharacters

public java.lang.String removeSpecialCharacters(java.lang.String chaineAModifier)
Modify a string to pass special characters like quote

Parameters:
chaineAModifier - A string for argument
Returns:
A string

readXMLFileRequirement

public void readXMLFileRequirement(org.dom4j.Document documentXml,
                                   boolean selectionExportAnomalies)
                            throws org.dom4j.DocumentException,
                                   java.lang.Exception
Function that parse Xml file to read requirements

Parameters:
selectionExportAnomalies - Veryfy bug spreadsheet presence
documentXml - document Xml
Throws:
org.dom4j.DocumentException - DocumentException
java.lang.Exception - Exception

readRequirementsSettings

public void readRequirementsSettings(java.lang.String ParsingRequirementID)
                              throws jxl.write.WriteException
Read requirement options

Parameters:
ParsingRequirementID - ID requirememnt
Throws:
jxl.write.WriteException - Erreur Ecriture Excel

RemiseEnFormeDescription

public java.lang.String RemiseEnFormeDescription(java.lang.String valeurDescription)
Permet d'enlever les espaces en trop d'une chaine de caracteres pour la cellule Description

Parameters:
valeurDescription - chaine a modifier
Returns:
chaine modifiee

writeXLSHeading

public void writeXLSHeading(boolean selectionExportAnomalies)
                     throws jxl.write.WriteException
Function that write XLS heading

Parameters:
selectionExportAnomalies - Veryfy bug spreadsheet presence
Throws:
jxl.write.WriteException - WriteException

getWriteErrorXLS

public boolean getWriteErrorXLS()
Get ErreurEcritureXLS

Returns:
ErreurEcritureXLS

setErreurEcritureXLS

public boolean setErreurEcritureXLS()
Set ErreurEcriturXLs to True

Returns:
True

createXlsFile

public java.lang.String createXlsFile(java.lang.String nomFichierSortie)
Function that create a XLS File

Parameters:
nomFichierSortie - Name of the XML File
Returns:
The real name of the XLS file generated

getfichierDeSortieXLS

public java.lang.String getfichierDeSortieXLS()
recupere fichierDeSortieXLS

Returns:
fichierDeSortieXLS