Skip to content

Commit

Permalink
Merge pull request digital-preservation#367 from digital-preservation…
Browse files Browse the repository at this point in the history
…/manage-new-warc-365

Manage opening of WARC 1.1 and update identification of WARC 1.0
  • Loading branch information
jcharlet authored Jan 31, 2020
2 parents e94e3bb + c9678e7 commit b7d1dbc
Show file tree
Hide file tree
Showing 8 changed files with 431 additions and 400 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public class ResultPrinter {
private static final String ARC_ARCHIVE = "x-fmt/219";
private static final String ARC_ARCHIVE_OTHER = "fmt/410";
private static final String WARC_ARCHIVE = "fmt/289";
private static final String WARC_ARCHIVE_1_1 = "fmt/1281";
private static final String WARC_ARCHIVE_1_0 = "fmt/1355";
private static final String ISO_9660 = "fmt/468";
private static final String SEVEN_ZIP = "fmt/484";
private static final String BZIP2_ARCHIVE = "x-fmt/267";
Expand Down Expand Up @@ -227,6 +229,8 @@ public void print(final IdentificationResultCollection results,
}
break;
case WARC_ARCHIVE:
case WARC_ARCHIVE_1_0:
case WARC_ARCHIVE_1_1:
if ((archiveConfiguration.getExpandAllWebArchives() || containsCaseInsensitive("WARC", archiveConfiguration.getExpandWebArchiveTypes()))) {
WarcArchiveContentIdentifier warcArchiveIdentifier =
new WarcArchiveContentIdentifier(binarySignatureIdentifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ record = iterator.next();
&& httpACCEPTED == record.getHttpHeader().statusCode) {
// no directory structure, so we use the full url as name
String name = record.header.warcTargetUriStr;
Long time = record.header.warcDate == null ? null : record.header.warcDate.getTime();

RequestMetaData metaData = new RequestMetaData(
record.header.contentLength,
record.header.warcDate.getTime(),
time,
name);

final RequestIdentifier identifier = new RequestIdentifier(uri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ archive.zip=x-fmt/263
archive.tar=x-fmt/265
archive.gz=x-fmt/266
archive.arc=x-fmt/219, fmt/410
archive.warc=fmt/289
archive.warc=fmt/289, fmt/1281, fmt/1355
archive.bz=x-fmt/267, x-fmt/268
archive.7z=fmt/484
archive.iso=fmt/468
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ archive.zip=x-fmt/263
archive.tar=x-fmt/265
archive.gz=x-fmt/266
archive.arc=x-fmt/219, fmt/410
archive.warc=fmt/289
archive.warc=fmt/289, fmt/1281, fmt/1355
archive.bz=x-fmt/267, x-fmt/268
archive.7z=fmt/484
archive.iso=fmt/468
Expand Down
6 changes: 6 additions & 0 deletions droid-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
<developer>
<name>Annabel Baynes</name>
</developer>
<developer>
<name>Jeremie Charlet</name>
</developer>
<developer>
<name>Saurabh Parkhi</name>
</developer>
</developers>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ http://www.springframework.org/schema/context http://www.springframework.org/sch
<entry key="7Z" value="${archive.7z}"/>
<entry key="ISO" value="${archive.iso}"/>
<entry key="RAR" value="${archive.rar}"/>
<entry key="FAT" value="fmt/1087"/>
<entry key="FAT" value="${archive.fat}}"/>
</map>
</property>
</bean>
Expand Down
2 changes: 1 addition & 1 deletion droid-results/src/main/resources/archive-puids.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ archive.zip=x-fmt/263
archive.tar=x-fmt/265
archive.gz=x-fmt/266
archive.arc=x-fmt/219, fmt/410
archive.warc=fmt/289
archive.warc=fmt/289, fmt/1281, fmt/1355
archive.bz=x-fmt/267, x-fmt/268
archive.7z=fmt/484
archive.iso=fmt/468
Expand Down
Loading

0 comments on commit b7d1dbc

Please sign in to comment.