19 package org.sleuthkit.autopsy.datasourceprocessors.xry;
21 import java.io.IOException;
22 import java.util.List;
23 import java.util.logging.Level;
31 final class XRYReportProcessor {
33 private static final Logger logger = Logger.getLogger(XRYReportProcessor.class.getName());
46 static void process(XRYFolder folder, Content parent)
throws IOException, TskCoreException {
48 List<XRYFileReader> xryFileReaders = folder.getXRYFileReaders();
51 for (XRYFileReader xryFileReader : xryFileReaders) {
52 String reportType = xryFileReader.getReportType();
53 if (XRYFileParserFactory.supports(reportType)) {
54 XRYFileParser parser = XRYFileParserFactory.get(reportType);
55 parser.parse(xryFileReader, parent);
57 logger.log(Level.WARNING, String.format(
"[XRY DSP] XRY File (in brackets) "
58 +
"[ %s ] was found, but no parser to support its report type exists. "
59 +
"Report type is [ %s ]", xryFileReader.getReportPath().toString(), reportType));
65 for (XRYFileReader xryFileReader : xryFileReaders) {
66 xryFileReader.close();
68 }
catch (IOException ex) {
69 logger.log(Level.WARNING,
"[XRY DSP] Encountered I/O exception trying "
70 +
"to close all xry file readers.", ex);
76 private XRYReportProcessor() {