Package org.brerp.sped.nfe.util
Class XMLUtil
java.lang.Object
org.brerp.sped.nfe.util.XMLUtil
XML Util
- Version:
- $Id: XMLUtil.java, v1.0 2012/05/20 5:10:45 PM, ralexsander Exp $
- Author:
- Ricardo Santana (Kenos, www.kenos.com.br)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetElement(Document document, int index, String value) Get the result of XML nodestatic StringgetElement(Document document, String value) Get the result of XML nodestatic StringgetElement(NodeList nl, int index, String value) Get the result of XML nodestatic StringgetElement(NodeList nl, String value) Get the result of XML nodestatic BigDecimalgetElementAsBD(Document document, int index, String value) Get the result of XML nodestatic BigDecimalgetElementAsBD(Document document, String value) Get the result of XML nodestatic BigDecimalgetElementAsBD(NodeList nl, int index, String value) Get the result of XML nodestatic BigDecimalgetElementAsBD(NodeList nl, String value) Get the result of XML nodestatic booleangetElementAsBool(Document document, String value) Get the result of XML nodestatic booleangetElementAsBool(Document document, String value, boolean defValue) Get the result of XML nodestatic booleangetElementAsBool(Document document, String value, int index, boolean defValue) Get the result of XML nodestatic intgetElementAsInt(Document document, int index, String value) Get the int value of XML nodestatic intgetElementAsInt(Document document, String value) Get the int value of XML nodestatic intgetElementAsInt(NodeList nl, int index, String value) Get the int value of XML nodestatic intgetElementAsInt(NodeList nl, String value) Get the int value of XML nodestatic net.sf.jasperreports.engine.JasperPrintCria o JasperPrint a Partir de um XML.static FilegetParametersDanfe(MLBRDocFiscal df, File jasper) Preenche os ParĂ¢metros da DANFe Frente msgVersaoTeste PreImpresso msgPrevisualizacaostatic Filestatic StringprintDANFe(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, PrintInfo printInfo) Imprime a DANFe a partir de um JasperPrintstatic StringprintDANFe(net.sf.jasperreports.engine.JasperPrint jasperPrint, PrintInfo printInfo) Imprime a DANFe a partir de um JasperPrint
-
Constructor Details
-
XMLUtil
public XMLUtil()
-
-
Method Details
-
getElementAsInt
Get the int value of XML node- Parameters:
doc-- Returns:
- 0 or int value
-
getElementAsInt
Get the int value of XML node- Parameters:
doc-- Returns:
- 0 or int value
-
getElementAsBool
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElementAsBool
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElementAsBool
public static boolean getElementAsBool(Document document, String value, int index, boolean defValue) Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc-index-value-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc-index-value-- Returns:
- "" or result
-
getElementAsInt
Get the int value of XML node- Parameters:
doc-- Returns:
- 0 or int value
-
getElementAsInt
Get the int value of XML node- Parameters:
doc-- Returns:
- 0 or int value
-
getElementAsBD
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElementAsBD
Get the result of XML node- Parameters:
doc-value-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc-index-value-- Returns:
- "" or result
-
getElement
Get the result of XML node- Parameters:
doc-index-value-- Returns:
- "" or result
-
printDANFe
public static String printDANFe(net.sf.jasperreports.engine.JasperPrint jasperPrint, PrintInfo printInfo) throws IOException, net.sf.jasperreports.engine.JRException Imprime a DANFe a partir de um JasperPrint- Parameters:
jasperPrint-- Returns:
- Throws:
IOExceptionnet.sf.jasperreports.engine.JRException
-
printDANFe
public static String printDANFe(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, PrintInfo printInfo) throws IOException, net.sf.jasperreports.engine.JRException Imprime a DANFe a partir de um JasperPrint- Parameters:
jasperPrint-- Returns:
- Throws:
IOExceptionnet.sf.jasperreports.engine.JRException
-
getJasperPrint
public static net.sf.jasperreports.engine.JasperPrint getJasperPrint(Map<String, Object> parameters, File xmlNF, File jasperFile) throws net.sf.jasperreports.engine.JRException, AdempiereException, IOExceptionCria o JasperPrint a Partir de um XML.- Parameters:
parameters-xmlNF-jasperFile-- Returns:
- Throws:
net.sf.jasperreports.engine.JRExceptionAdempiereExceptionIOException
-
getParametersDanfe
Preenche os ParĂ¢metros da DANFe Frente msgVersaoTeste PreImpresso msgPrevisualizacao- Returns:
-
getPDF
public static File getPDF(net.sf.jasperreports.engine.JasperPrint jasperPrint, String fileName) throws IOException, net.sf.jasperreports.engine.JRException - Throws:
IOExceptionnet.sf.jasperreports.engine.JRException
-
getLotPDF
public static File getLotPDF(List<net.sf.jasperreports.engine.JasperPrint> jasperPrintList, String fileName) throws IOException, net.sf.jasperreports.engine.JRException - Throws:
IOExceptionnet.sf.jasperreports.engine.JRException
-