dk.netarkivet.viewerproxy.webinterface
Class Reporting

java.lang.Object
  extended by dk.netarkivet.viewerproxy.webinterface.Reporting

public class Reporting
extends java.lang.Object

Methods for generating the batch results needed by the QA pages.


Method Summary
static java.io.File getCrawlLogForDomainInJob(java.lang.String domain, int jobid)
          Submit a batch job to extract the part of a crawl log that is associated with the given domain and job.
static java.io.File getCrawlLoglinesMatchingRegexp(int jobid, java.lang.String regexp)
          Return any crawllog lines for a given jobid matching the given regular expression.
static java.util.List<java.lang.String> getFilesForJob(int jobid)
          Submit a batch job to list all files for a job, and report result in a sorted list.
static java.util.List<CDXRecord> getMetdataCDXRecordsForJob(int jobid)
          Submit a batch job to generate cdx for all metadata files for a job, and report result in a list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilesForJob

public static java.util.List<java.lang.String> getFilesForJob(int jobid)
Submit a batch job to list all files for a job, and report result in a sorted list.

Parameters:
jobid - The job to get files for.
Returns:
A sorted list of files.
Throws:
ArgumentNotValid - If jobid is 0 or negative.
IOFailure - On trouble generating the file list

getMetdataCDXRecordsForJob

public static java.util.List<CDXRecord> getMetdataCDXRecordsForJob(int jobid)
Submit a batch job to generate cdx for all metadata files for a job, and report result in a list.

Parameters:
jobid - The job to get cdx for.
Returns:
A list of cdx records.
Throws:
ArgumentNotValid - If jobid is 0 or negative.
IOFailure - On trouble generating the cdx

getCrawlLogForDomainInJob

public static java.io.File getCrawlLogForDomainInJob(java.lang.String domain,
                                                     int jobid)
Submit a batch job to extract the part of a crawl log that is associated with the given domain and job.

Parameters:
domain - The domain to get crawl.log-lines for.
jobid - The jobid to get the crawl.log-lines for.
Returns:
A file containing the crawl.log lines. This file is temporary, and should be deleted after use.
Throws:
ArgumentNotValid - On negative jobids, or if domain is null or the empty string.

getCrawlLoglinesMatchingRegexp

public static java.io.File getCrawlLoglinesMatchingRegexp(int jobid,
                                                          java.lang.String regexp)
Return any crawllog lines for a given jobid matching the given regular expression.

Parameters:
jobid - The jobid
regexp - A regular expression
Returns:
a File with the matching lines.