public class Reporter extends Object implements AutoCloseable
ReportMap.| Constructor and Description |
|---|
Reporter(ReportMap reportMap)
Create a new reporter that will record results to the given
ReportMap. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(TikaDocument tikaDocument,
ExtractionStatus result)
Check an extraction result.
|
void |
close() |
Report |
report(TikaDocument tikaDocument)
Check the extraction result of a given tikaDocument.
|
void |
save(TikaDocument tikaDocument,
ExtractionStatus status)
Save the extraction status for the given tikaDocument.
|
void |
save(TikaDocument tikaDocument,
ExtractionStatus status,
Exception exception)
Save the extraction status and optional exception for the given tikaDocument.
|
void |
save(TikaDocument tikaDocument,
Report report)
Save the extraction report for the given tikaDocument.
|
boolean |
skip(TikaDocument tikaDocument)
Check whether a path should be skipped.
|
public Report report(TikaDocument tikaDocument)
tikaDocument - the tikaDocument to checknull if no result was recorded for the file.public void save(TikaDocument tikaDocument, Report report)
tikaDocument - the tikaDocumentreport - the extraction reportpublic void save(TikaDocument tikaDocument, ExtractionStatus status, Exception exception)
tikaDocument - the tikaDocumentstatus - the extraction statusexception - any exception caught during extractionpublic void save(TikaDocument tikaDocument, ExtractionStatus status)
tikaDocument - the tikaDocumentstatus - the extraction statuspublic boolean check(TikaDocument tikaDocument, ExtractionStatus result)
tikaDocument - the tikaDocument to checkresult - matched against the actual resulttrue if the results match or false if there is no match or no recorded result.public boolean skip(TikaDocument tikaDocument)
tikaDocument - the tikaDocument to checktrue if the tikaDocument should be skipped.public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2018 The International Consortium of Investigative Journalists. All rights reserved.