|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.harvesting.metadata.MetadataFileWriter
dk.netarkivet.harvester.harvesting.metadata.MetadataFileWriterArc
public class MetadataFileWriterArc
MetadataFileWriter that writes to ARC files.
Field Summary |
---|
Fields inherited from class dk.netarkivet.harvester.harvesting.metadata.MetadataFileWriter |
---|
MDF_ARC, MDF_WARC, metadataFormat |
Constructor Summary | |
---|---|
MetadataFileWriterArc()
|
Method Summary | |
---|---|
void |
close()
Close the metadatafile Writer. |
static MetadataFileWriter |
createWriter(java.io.File metadataARCFile)
Create a MetadataFileWriter for ARC output. |
java.io.File |
getFile()
|
void |
write(java.lang.String uri,
java.lang.String contentType,
java.lang.String hostIP,
long fetchBeginTimeStamp,
byte[] payload)
Write a record to the archive file. |
void |
writeFileTo(java.io.File file,
java.lang.String uri,
java.lang.String mime)
Write the given file to the metadata file. |
boolean |
writeTo(java.io.File fileToArchive,
java.lang.String URL,
java.lang.String mimetype)
Writes a File to an ARCWriter, if available, otherwise logs the failure to the class-logger. |
Methods inherited from class dk.netarkivet.harvester.harvesting.metadata.MetadataFileWriter |
---|
getMetadataArchiveFileName, initializeMetadataFormat, insertFiles, resetMetadataFormat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetadataFileWriterArc()
Method Detail |
---|
public static MetadataFileWriter createWriter(java.io.File metadataARCFile)
MetadataFileWriter
for ARC output.
metadataARCFile
- The metadata ARC File
MetadataFileWriter
for writing metadata files in ARCpublic void close()
MetadataFileWriter
close
in class MetadataFileWriter
public java.io.File getFile()
getFile
in class MetadataFileWriter
public void writeFileTo(java.io.File file, java.lang.String uri, java.lang.String mime)
MetadataFileWriter
writeFileTo
in class MetadataFileWriter
file
- A given file with metadata to write to the metadata archive file.uri
- The uri associated with the piece of metadatamime
- The mimetype associated with the piece of metadatapublic boolean writeTo(java.io.File fileToArchive, java.lang.String URL, java.lang.String mimetype)
writeTo
in class MetadataFileWriter
fileToArchive
- the File to archiveURL
- the URL with which it is stored in the arcfilemimetype
- The mimetype of the File-contents
public void write(java.lang.String uri, java.lang.String contentType, java.lang.String hostIP, long fetchBeginTimeStamp, byte[] payload) throws java.io.IOException
MetadataFileWriter
write
in class MetadataFileWriter
uri
- record URIcontentType
- content-type of recordhostIP
- resource ip-addressfetchBeginTimeStamp
- record datetimepayload
- A byte array containing the payload
java.io.IOException
ARCWriter.write(String uri, String contentType, String hostIP,
long fetchBeginTimeStamp, long recordLength, InputStream in)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |