Class XMLUtilsWriter
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.util.XMLUtilsWriter
-
public final class XMLUtilsWriter extends Object
The class implements common action to create control quality report.- Since:
- 1.3
- Author:
- Sandrine Perrin
-
-
Constructor Summary
Constructors Constructor Description XMLUtilsWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
buildXMLCommonTagHeader(Document doc, Element parent, RunData data)
Add common tag in document header xml to describe Aozan and if data exists on run.static String
createHTMLFileFromXSL(File XMLFile, File XSLFile)
Transform a XML file using XSL style sheet.static String
createHTMLFileFromXSL(String XMLPath, String XSLPath)
Transform a XML file using XSL style sheet.static String
createHTMLFileFromXSL(Document doc, InputStream isXslFile)
Create a html file from document xml and xsl files.static void
createHTMLFileFromXSL(Document doc, InputStream isXslFile, File reportHtml)
Create a html file from document xml and xsl files.static void
createXMLFile(Document doc, File output)
Create a xml file from document xml.static String
createXMLFileContent(Document doc)
Create a XML file content from XML document.
-
-
-
Method Detail
-
buildXMLCommonTagHeader
public static void buildXMLCommonTagHeader(Document doc, Element parent, RunData data) throws AozanException
Add common tag in document header xml to describe Aozan and if data exists on run.- Parameters:
doc
- document xmlparent
- parent element on tagdata
- instance of run data- Throws:
AozanException
- if document or parent element doesn't exist
-
createXMLFile
public static void createXMLFile(Document doc, File output) throws IOException, AozanException
Create a xml file from document xml.- Parameters:
doc
- document xmloutput
- the output- Throws:
IOException
- if an error occurs while writing the fileAozanException
- if document or output file doesn't exist or if an error occurs during transforming document.
-
createXMLFileContent
public static String createXMLFileContent(Document doc) throws IOException, AozanException
Create a XML file content from XML document.- Parameters:
doc
- the XML document- Returns:
- a String with the XML document
- Throws:
IOException
- if an error occurs while writing the fileAozanException
- if document or output file doesn't exist or if an error occurs during transforming document.
-
createHTMLFileFromXSL
public static String createHTMLFileFromXSL(String XMLPath, String XSLPath) throws AozanException
Transform a XML file using XSL style sheet.- Parameters:
XMLPath
- XML fileXSLPath
- XSL file- Returns:
- the QC report as a String
- Throws:
AozanException
- if an error occurs while creating the report
-
createHTMLFileFromXSL
public static String createHTMLFileFromXSL(File XMLFile, File XSLFile) throws AozanException
Transform a XML file using XSL style sheet.- Parameters:
XMLFile
- XML fileXSLFile
- XSL file- Returns:
- the QC report as a String
- Throws:
AozanException
- if an error occurs while creating the report
-
createHTMLFileFromXSL
public static void createHTMLFileFromXSL(Document doc, InputStream isXslFile, File reportHtml) throws IOException, AozanException
Create a html file from document xml and xsl files.- Parameters:
doc
- document xmlisXslFile
- input stream on the xsl filereportHtml
- output html file- Throws:
IOException
- if an error occurs while writing the fileAozanException
- if document or output file or xsl file doesn't exist or if an error occurs during transforming document.
-
createHTMLFileFromXSL
public static String createHTMLFileFromXSL(Document doc, InputStream isXslFile) throws AozanException
Create a html file from document xml and xsl files.- Parameters:
doc
- document xmlisXslFile
- input stream on the xsl file- Returns:
- document xml in html format
- Throws:
AozanException
- if document or output file or xsl file doesn't exist or if an error occurs during transforming document.
-
-