dk.netarkivet.harvester.indexserver
Class GetMetadataArchiveBatchJob

java.lang.Object
  extended by dk.netarkivet.common.utils.batch.FileBatchJob
      extended by dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
          extended by dk.netarkivet.common.utils.archive.ArchiveBatchJob
              extended by dk.netarkivet.harvester.indexserver.GetMetadataArchiveBatchJob
All Implemented Interfaces:
java.io.Serializable

public class GetMetadataArchiveBatchJob
extends ArchiveBatchJob

A batch job that extracts metadata.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
FileBatchJob.ExceptionOccurrence
 
Field Summary
 
Fields inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
noOfRecordsProcessed
 
Fields inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed
 
Constructor Summary
GetMetadataArchiveBatchJob(java.util.regex.Pattern urlMatcher, java.util.regex.Pattern mimeMatcher)
          Constructor.
 
Method Summary
 void finish(java.io.OutputStream os)
          Method for post-processing the data.
 void initialize(java.io.OutputStream os)
          Initialize method.
 void processRecord(ArchiveRecordBase record, java.io.OutputStream os)
          The method for processing the arc-records.
 java.lang.String toString()
          Humanly readable description of this instance.
 
Methods inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJob
getFilter, processFile
 
Methods inherited from class dk.netarkivet.common.utils.archive.ArchiveBatchJobBase
getExceptionArray, handleException, handleOurException, noOfRecordsProcessed
 
Methods inherited from class dk.netarkivet.common.utils.batch.FileBatchJob
addException, addFinishException, addInitializeException, getBatchJobTimeout, getExceptions, getFilenamePattern, getFilesFailed, getNoOfFilesProcessed, maxExceptionsReached, postProcess, processOnlyFileNamed, processOnlyFilesMatching, processOnlyFilesMatching, processOnlyFilesNamed, setBatchJobTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetMetadataArchiveBatchJob

public GetMetadataArchiveBatchJob(java.util.regex.Pattern urlMatcher,
                                  java.util.regex.Pattern mimeMatcher)
Constructor.

Parameters:
urlMatcher - A pattern for matching URLs of the desired entries. If null, a .* pattern will be used.
mimeMatcher - A pattern for matching mime-types of the desired entries. If null, a .* pattern will be used. The batchJobTimeout is set to one day.
Method Detail

initialize

public void initialize(java.io.OutputStream os)
Initialize method. Run before the arc-records are being processed. Currently does nothing.

Specified by:
initialize in class ArchiveBatchJobBase
Parameters:
os - The output stream to print any pre-processing data.

processRecord

public void processRecord(ArchiveRecordBase record,
                          java.io.OutputStream os)
                   throws IOFailure
The method for processing the arc-records.

Specified by:
processRecord in class ArchiveBatchJob
Parameters:
record - The arc-record to process.
os - The output stream to write the results of the processing.
Throws:
IOFailure - In an IOException is caught during handling of the arc record.

finish

public void finish(java.io.OutputStream os)
Method for post-processing the data. Currently does nothing.

Specified by:
finish in class ArchiveBatchJobBase
Parameters:
os - The output stream to write the results of the post-processing data.

toString

public java.lang.String toString()
Humanly readable description of this instance.

Overrides:
toString in class java.lang.Object
Returns:
The human readable description of this instance.