|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.harvesting.HarvestDocumentation
public class HarvestDocumentation
This class contains code for documenting a harvest. Metadata is read from the directories associated with a given harvest-job-attempt (i.e. one DoCrawlMessage sent to a harvest server). The collected metadata are written to a new ARC file that is managed by IngestableFiles. Temporary metadata files will be deleted after this metadata-ARC file has been written.
Field Summary | |
---|---|
static java.util.regex.Pattern |
metadataFilenamePattern
|
Constructor Summary | |
---|---|
HarvestDocumentation()
|
Method Summary | |
---|---|
static void |
documentHarvest(java.io.File crawlDir,
long jobID,
long harvestID)
Documents the harvest under the given dir in a packaged metadata arc file in a directory 'metadata' under the current dir. |
static java.util.List<java.io.File> |
documentOldJob(java.io.File crawlDir,
long jobID,
long harvestID)
Document an old job from an oldjobs directory on the harvesters. |
static java.net.URI |
getCDXURI(java.lang.String harvestID,
java.lang.String jobID,
java.lang.String timeStamp,
java.lang.String serialNumber)
Generates a URI identifying CDX info for one harvested ARC file. |
static java.lang.String |
getMetadataARCFileName(java.lang.String jobID)
Generates a name for an ARC file containing metadata regarding a given job. |
static java.lang.String |
getPreharvestMetadataARCFileName(long jobID)
Generates a name for an ARC file containing "preharvest" metadata regarding a given job (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern metadataFilenamePattern
Constructor Detail |
---|
public HarvestDocumentation()
Method Detail |
---|
public static void documentHarvest(java.io.File crawlDir, long jobID, long harvestID) throws IOFailure
crawlDir
- The directory the crawl was performed injobID
- the ID of the job for this harvestharvestID
- the ID of the harvestdefinition which created this job.
ArgumentNotValid
- if crawlDir is null or does not exist, or if
jobID or harvestID is negative.
IOFailure
- if
- reading ARC files or temporary files fails
- writing a file to arcFilesDir failspublic static java.net.URI getCDXURI(java.lang.String harvestID, java.lang.String jobID, java.lang.String timeStamp, java.lang.String serialNumber) throws ArgumentNotValid, UnknownID
harvestID
- The number of the harvest that generated the ARC file.jobID
- The number of the job that generated the ARC file.timeStamp
- The timestamp in the name of the ARC file.serialNumber
- The serial no. in the name of the ARC file.
ArgumentNotValid
- if any parameter is null.
UnknownID
- if something goes terribly wrong in our URI
construction.public static java.lang.String getPreharvestMetadataARCFileName(long jobID) throws ArgumentNotValid
jobID
- the number of the harvester job
ArgumentNotValid
- If jobId is negativepublic static java.util.List<java.io.File> documentOldJob(java.io.File crawlDir, long jobID, long harvestID)
crawlDir
- the given crawlDirjobID
- the given job-identifierharvestID
- the given harvest-identifier
public static java.lang.String getMetadataARCFileName(java.lang.String jobID) throws ArgumentNotValid
jobID
- The number of the job that generated the ARC file.
ArgumentNotValid
- if any parameter was null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |