@Test public void testSimpleFITSReport() throws Exception{ Reader simpleFits = new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("fits/simple-fits.xml"), "UTF8"); Reader fitsToHtml = new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream("fits/fits-to-html.xsl"), "UTF8"); StringBuilder buffer = new StringBuilder(); CharacterisationReportGenerator reportGen = new CharacterisationReportGenerator(); reportGen.generateReportFromXML(simpleFits, fitsToHtml, new OutputStreamWriter(System.out)); }
public void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslInput)); transformer.transform(new StreamSource(xmlInput), new StreamResult(writer)); }
CharacterisationReportGenerator { public void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslInput)); transformer.transform(new StreamSource(xmlInput), new StreamResult(writer)); } }
CharacterisationReportGenerator { public void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslInput)); transformer.transform(new StreamSource(xmlInput), new StreamResult(writer)); }  }
CharacterisationReportGenerator { public void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslInput)); transformer.transform(new StreamSource(xmlInput), new StreamResult(writer)); }  String generateHTMLReport(final DigitalObject object); void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer); }
CharacterisationReportGenerator { public void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslInput)); transformer.transform(new StreamSource(xmlInput), new StreamResult(writer)); }  String generateHTMLReport(final DigitalObject object); void generateReportFromXML(final Reader xmlInput, final Reader xslInput, final Writer writer);  }