Details
-
Sub-task
-
Resolution: Fixed
-
Major
-
None
-
None
-
Rough
Description
The class dk.netarkivet.common.distribute.arcrepository.BitarchiveRecord only supports ARCRecords. Maybe just add another BitarchiveRecord constructer to support WARCRecords:
public BitarchiveRecord(WARCRecord record) { ArgumentNotValid.checkNotNull(record, "WARCRecord record"); //fileName = record.getMetaData().getArcFile().getName(); offset = record.getHeader().getOffset(); length = record.getHeader().getLength(); fileName = (String) record.getHeader().getHeaderValue(WARCRecord.HEADER_KEY_FILENAME); .... }
The same class also uses method ARCUtils.readARCRecord(ARCRecord ar), and we may also need such a method for reading WarcRecords?
public static byte[] readWARCRecord(WARCRecord in) throws IOException {..}
The method dk.netarkivet.archive.bitarchive.Bitarchive.get(String arcfile, long index) needs to work for WARC-files as well as ARC-files.
Attachments
Issue Links
- is duplicated by
-
NAS-1605 Enable retrieval of WARCRecords from the bitarchives
- Closed