Package com.cakupan.xslt.exception

Examples of com.cakupan.xslt.exception.XSLTCoverageException


      CoverageIOUtil.copy(HTMLCoverageReport.class.getResourceAsStream(BLANK_PNG), new FileOutputStream(outputDir + File.separator + BLANK_PNG));
      CoverageIOUtil.copy(HTMLCoverageReport.class.getResourceAsStream(UPSIMPLE_PNG), new FileOutputStream(outputDir + File.separator + UPSIMPLE_PNG));
      CoverageIOUtil.write(CoverageIOUtil.toString(HTMLCoverageReport.class.getResourceAsStream(CUSTOM_JS)), new File(outputDir + File.separator + CUSTOM_JS).toURI());
      CoverageIOUtil.write(CoverageIOUtil.toString(HTMLCoverageReport.class.getResourceAsStream(SOURCE_VIEWER_CSS)), new File(outputDir + File.separator + SOURCE_VIEWER_CSS).toURI());
    } catch (Exception e) {
      throw new XSLTCoverageException("could not write frame-summary data to file!", e);
    }
    String xml = null;
    calculateCoveragePercentage(coverageMap);
    XSLTToHTMLReport report = null;
    for (CoverageFile file : coverageMap.values()) {
      try {
        report = new XSLTToHTMLReport();
        xml = CoverageIOUtil.toString(new FileInputStream(new File(file.getUri())));
        CoverageIOUtil.write(report.build(file, xml), new FileOutputStream(outputDir + File.separator + file.getFileName() + HTML_EXT));
      } catch (Exception e) {
        throw new XSLTCoverageException("could not write the XSL report(s)!", e);
      }
    }
   
  }
View Full Code Here


    StreamSource xml = new StreamSource(new ByteArrayInputStream(getCoverageStats(coverageMap).getBytes()));
    String response = null;
    try {
      response = XMLHelper.doXSLT20(xml, xsl, null, null);
    } catch (Exception e) {
      throw new XSLTCoverageException("XSLT transformation error!", e);
    }
    return response;
  }
View Full Code Here

                    output.append("</pre></td></tr>\n");
                }
                rowCount++;
            }
        } catch (Exception e) {
           throw new XSLTCoverageException("XSLT document: HTML report couldnot be written!", e);
        }
        builder.append(output);
    }
View Full Code Here

    String response = null;
    try {
      response = XMLHelper.doXSLT20(xml, xsl, null, null);
      CoverageIOUtil.write(response, new FileOutputStream(outputDir + File.separator + "emma-report"+HTML_EXT));
    } catch (Exception e) {
      throw new XSLTCoverageException("XSLT transformation error!", e);
    }
    return response;
  }
View Full Code Here

TOP

Related Classes of com.cakupan.xslt.exception.XSLTCoverageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.