public class BasicIntegrityReporter extends Object implements IntegrityReporter
Constructor and Description |
---|
BasicIntegrityReporter(String collectionID,
String workflowType,
File reportsDir) |
Modifier and Type | Method and Description |
---|---|
void |
generateReport()
Creates the human readable report for the entire integrity issue.
|
String |
generateSummaryOfReport()
Create a human readable summary of the integrity issue.
|
String |
getCollectionID()
Return the ID of the collection that the report is about.
|
File |
getReport()
Retrieves the written report
|
boolean |
hasIntegrityIssues() |
boolean |
hasReport()
Method to test if a report is available
|
void |
reportChecksumIssue(String fileID,
String pillarID)
Report that a file have a checksum issues on a given pillar
|
void |
reportDeletedFile(String fileID)
Report that a file has been deleted from the collection.
|
void |
reportMissingChecksum(String fileID,
String pillarID)
Report that a file is missing a checksum on a given pillar
|
void |
reportMissingFile(String fileID,
String pillarID)
Report that a file is missing from a pillar
|
void |
reportObsoleteChecksum(String fileID,
String pillarID)
Report that a file have an obsolete checksum on a given pillar
|
public boolean hasIntegrityIssues()
hasIntegrityIssues
in interface IntegrityReporter
public boolean hasReport()
IntegrityReporter
hasReport
in interface IntegrityReporter
public File getReport() throws FileNotFoundException
IntegrityReporter
getReport
in interface IntegrityReporter
FileNotFoundException
- if no report is foundpublic void generateReport() throws IOException
IntegrityReporter
generateReport
in interface IntegrityReporter
IOException
public String generateSummaryOfReport()
IntegrityReporter
generateSummaryOfReport
in interface IntegrityReporter
public String getCollectionID()
IntegrityReporter
getCollectionID
in interface IntegrityReporter
public void reportDeletedFile(String fileID) throws IOException
IntegrityReporter
reportDeletedFile
in interface IntegrityReporter
fileID
- The ID of the file that has been removedIOException
- if writing failspublic void reportMissingFile(String fileID, String pillarID) throws IOException
IntegrityReporter
reportMissingFile
in interface IntegrityReporter
fileID
- The ID of the file that is missingpillarID
- The ID of the pillar that the file is missing on.IOException
public void reportChecksumIssue(String fileID, String pillarID) throws IOException
IntegrityReporter
reportChecksumIssue
in interface IntegrityReporter
fileID
- The ID of the file that has a checksum issuepillarID
- The ID of the pillar with the checksum issueIOException
public void reportMissingChecksum(String fileID, String pillarID) throws IOException
IntegrityReporter
reportMissingChecksum
in interface IntegrityReporter
fileID
- The ID of the file that is missing a checksumpillarID
- The ID of the pillar that does not have the checksum for the fileIOException
public void reportObsoleteChecksum(String fileID, String pillarID) throws IOException
IntegrityReporter
reportObsoleteChecksum
in interface IntegrityReporter
fileID
- The ID of the file with the obsolete checksumpillarID
- The ID of the pillar that have the obsolete checksumIOException
Copyright © 2010-2013 The State and University Library, The Royal Library and The State Archives, Denmark. All Rights Reserved.