|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.archive.bitarchive.Bitarchive
public class Bitarchive
The central class in the bit archive. Implements the API: upload(), get(), correct(), batch(). A bit archive is expected to not know about any other bit archives, and is not considered responsible for making MD5 checksums.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
Logging output place. |
Method Summary | |
---|---|
BatchStatus |
batch(java.lang.String bitarchiveAppId,
FileBatchJob job)
Run a batch job on all ARC entries in the archive. |
void |
close()
Release all resources allocated by the bitarchive Ensures that all admin data and log data are flushed. |
BitarchiveRecord |
get(java.lang.String arcfile,
long index)
Get an ARC or WARC record out of the archive. |
java.io.File |
getFile(java.lang.String arcFileID)
Get a file for a given arcFileID. |
static Bitarchive |
getInstance()
Get the one instance of the bitarchive. |
void |
upload(RemoteFile arcfile,
java.lang.String fileName)
Upload an ARC file to this archive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
Method Detail |
---|
public void close()
public BitarchiveRecord get(java.lang.String arcfile, long index) throws ArgumentNotValid, UnknownID, IOFailure
arcfile
- The name of an Archive file.index
- Index of the Archive record in the file
ArgumentNotValid
- If arcfile is null/empty, or if index is out of bounds
IOFailure
- If there were problems reading the arcfile.
UnknownID
- Does it really, and when ?public void upload(RemoteFile arcfile, java.lang.String fileName) throws PermissionDenied, ArgumentNotValid, IOFailure
arcfile
- A file to add to the archive.fileName
- the arcfiles filename. The file will be identified in
the archive by this filename
PermissionDenied
- if arcfile already exists in the archive
IOFailure
- if an IO failure occurs (e.g. running out of disk space)
ArgumentNotValid
- if arcfile is null or the filename is null or empty.public BatchStatus batch(java.lang.String bitarchiveAppId, FileBatchJob job) throws ArgumentNotValid, IOFailure
bitarchiveAppId
- A String representing the bitarchive AppId.job
- An object that implements the ARCBatchJob interface. The
initialize() method will be called before processing and the
finish() method will be called afterwards. The process()
method will be called with each ARC entry.
ArgumentNotValid
- if job or file is null.
IOFailure
- if there was problems writing to the RemoteFilepublic java.io.File getFile(java.lang.String arcFileID) throws ArgumentNotValid
arcFileID
- name of the file to be retrieved.
ArgumentNotValid
- If arcFileID was null or empty.public static Bitarchive getInstance() throws PermissionDenied
PermissionDenied
- If the storage area used for files is not accessible.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |