diff --git a/src/edu/stanford/dlss/was/WasapiFile.java b/src/edu/stanford/dlss/was/WasapiFile.java index 706d015..a83cd22 100644 --- a/src/edu/stanford/dlss/was/WasapiFile.java +++ b/src/edu/stanford/dlss/was/WasapiFile.java @@ -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; @@ -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; } @@ -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(); } } diff --git a/test/edu/stanford/dlss/was/TestWasapiFile.java b/test/edu/stanford/dlss/was/TestWasapiFile.java index 1ca6d6a..fd4303a 100644 --- a/test/edu/stanford/dlss/was/TestWasapiFile.java +++ b/test/edu/stanford/dlss/was/TestWasapiFile.java @@ -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")); } } diff --git a/test/fixtures/webdata_filename_response.json b/test/fixtures/webdata_filename_response.json index 973ea10..78ab9b6 100644 --- a/test/fixtures/webdata_filename_response.json +++ b/test/fixtures/webdata_filename_response.json @@ -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,