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