Skip to content

Commit

Permalink
Merge pull request #115 from sul-dlss/tweak-pr113
Browse files Browse the repository at this point in the history
WasapiFile: follow on tweaks to PR #113
  • Loading branch information
jmartin-sul authored Jun 20, 2017
2 parents 38b1570 + afa52f3 commit f29d73c
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/edu/stanford/dlss/was/WasapiFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;

@SuppressWarnings({"checkstyle:LineLength", "checkstyle:MethodCount", "checkstyle:MethodLength"})
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:MethodCount"})
/**
* Class corresponding to JSON returned by WASAPI that represents WebdataFile
* @see https://github.com/WASAPI-Community/data-transfer-apis/blob/master/ait-implementation/wasapi/implemented-swagger.yaml#L132-L183
Expand All @@ -23,14 +23,18 @@ public class WasapiFile {
private int crawlId;

@JsonProperty("crawl-start")
/** Time the crawl started */
private String crawlStartDateStr;

@JsonProperty("crawl-time")
private String crawlTimeDateStr;
/** Time the original content of the file was crawled */
private String fileCrawlDateStr;

private String filename;
/** The format of the archive file, e.g. `warc`, `wat`, `cdx` */
private String filetype;
private String[] locations;
/** The size in bytes of the file */
private long size;

public int getAccountId() {
Expand Down Expand Up @@ -68,11 +72,11 @@ public void setCrawlStartDateStr(String crawlStartDateStr) {
this.crawlStartDateStr = crawlStartDateStr;
}

public String getCrawlTimeDateStr() {
return crawlTimeDateStr;
public String getFileCrawlDateStr() {
return fileCrawlDateStr;
}
public void setCrawlTimeDateStr(String crawlTimeDateStr) {
this.crawlTimeDateStr = crawlTimeDateStr;
public void setFileCrawlDateStr(String fileCrawlDateStr) {
this.fileCrawlDateStr = fileCrawlDateStr;
}

public String getFilename() {
Expand Down Expand Up @@ -104,6 +108,7 @@ public void setSize(long size) {
}

@Override
@SuppressWarnings("checkstyle:MethodLength")
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("***** Wasapi File Details *****\n");
Expand All @@ -122,7 +127,7 @@ public String toString() {
sb.append("collection: " + Integer.toString(getCollectionId()) + "\n");
sb.append("crawl: " + Integer.toString(getCrawlId()) + "\n");
sb.append("crawl_start: " + getCrawlStartDateStr() + "\n");
sb.append("crawl-time: " + getCrawlTimeDateStr() + "\n");
sb.append("crawl-time: " + getFileCrawlDateStr() + "\n");
return sb.toString();
}
}

0 comments on commit f29d73c

Please sign in to comment.