|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.harvester.harvesting.IngestableFiles
public class IngestableFiles
Encapsulation of files to be ingested into the archive. These files are presently placed subdirectories under the crawldir.
Constructor Summary | |
---|---|
IngestableFiles(java.io.File crawlDir,
long jobID)
Constructor for this class. |
Method Summary | |
---|---|
void |
closeOpenFiles(int waitSeconds)
Close any ".open" files left by a crashed Heritrix. |
java.util.List<java.io.File> |
getArcFiles()
Get a list of all ARC files that should get ingested. |
java.util.List<java.io.File> |
getMetadataArcFiles()
Gets the files containing the metadata. |
org.archive.io.arc.ARCWriter |
getMetadataArcWriter()
Get a ARCWriter for the temporary metadata arc-file. |
boolean |
isMetadataFailed()
Return true if the metadata generation process is known to have failed. |
boolean |
isMetadataReady()
Check, if the metadatafile already exists. |
void |
setMetadataGenerationSucceeded(boolean success)
Marks generated metadata as final. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IngestableFiles(java.io.File crawlDir, long jobID)
crawlDir
- directory, where all files for the harvestjob
(including metadataFile) arejobID
- ID for the given harvestjob
ArgumentNotValid
- if null-arguments are given;
if jobID < 1;
if crawlDir does not existMethod Detail |
---|
public boolean isMetadataReady()
public boolean isMetadataFailed()
public void setMetadataGenerationSucceeded(boolean success)
success
- True if metadata was successfully generated, false
otherwise.
PermissionDenied
- If the metadata has already been marked as
ready, or if no metadata file exists upon success.
IOFailure
- if there is an error marking the metadata as ready.public org.archive.io.arc.ARCWriter getMetadataArcWriter()
PermissionDenied
- if metadata generation is already
finished.public java.util.List<java.io.File> getMetadataArcFiles()
PermissionDenied
- if the metadata file is not ready, either
because generation is still going on or there was an error generating
the metadata.public java.util.List<java.io.File> getArcFiles()
public void closeOpenFiles(int waitSeconds)
waitSeconds
- How many seconds to wait before closing files. This
may be done in order to allow Heritrix to finish writing before we close
the files.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |