Skip to content

Commit

Permalink
Merge 754f468 into 13a979f
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlittman committed Dec 9, 2019
2 parents 13a979f + 754f468 commit 09e8523
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/edu/stanford/dlss/was/WasapiFile.java
Expand Up @@ -30,6 +30,10 @@ public class WasapiFile {
/** Time the original content of the file was crawled (when the warc was created/opened) */
private String fileCrawlDateStr;

@JsonProperty("store-time")
/** Timestamp for the deposit of the WARC into storage */
private String storeDateStr;

private String filename;
/** The format of the archive file, e.g. `warc`, `wat`, `cdx` */
private String filetype;
Expand Down Expand Up @@ -72,6 +76,13 @@ public void setCrawlStartDateStr(String crawlStartDateStr) {
this.crawlStartDateStr = crawlStartDateStr;
}

public String getStoreDateStr() {
return storeDateStr;
}
public void setStoreDateStr(String storeDateStr) {
this.storeDateStr = storeDateStr;
}

public String getFileCrawlDateStr() {
return fileCrawlDateStr;
}
Expand Down Expand Up @@ -128,6 +139,7 @@ public String toString() {
sb.append("crawl: " + Integer.toString(getCrawlId()) + "\n");
sb.append("crawl-start: " + getCrawlStartDateStr() + "\n");
sb.append("crawl-time: " + getFileCrawlDateStr() + "\n");
sb.append("store-time: " + getStoreDateStr() + "\n");
return sb.toString();
}
}
1 change: 1 addition & 0 deletions test/edu/stanford/dlss/was/TestWasapiFile.java
Expand Up @@ -32,5 +32,6 @@ public void toStringImplemented() throws IOException {
assertThat(fileAsString, containsString("crawl: 299019"));
assertThat(fileAsString, containsString("crawl-start: 2017-05-04T22:58:04Z"));
assertThat(fileAsString, containsString("crawl-time: 2014-09-22T23:53:12Z"));
assertThat(fileAsString, containsString("store-time: 2014-09-23T23:53:12Z"));
}
}
1 change: 1 addition & 0 deletions test/fixtures/webdata_filename_response.json
Expand Up @@ -5,6 +5,7 @@
"collection": 5425,
"crawl-start": "2017-05-04T22:58:04Z",
"crawl-time": "2014-09-22T23:53:12Z",
"store-time": "2014-09-23T23:53:12Z",
"size": 231145356,
"filetype": "warc",
"account": 925,
Expand Down

0 comments on commit 09e8523

Please sign in to comment.