Update classes: "Publication" and "Payload".
This commit is contained in:
parent
85ecc4a36b
commit
a6ab810ad3
|
@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|||
"mime_type",
|
||||
"size",
|
||||
"more_info",
|
||||
"md5",
|
||||
"hash",
|
||||
"location",
|
||||
"provenance"
|
||||
})
|
||||
|
@ -41,8 +41,8 @@ public class Payload {
|
|||
@JsonProperty("more_info")
|
||||
private String more_info;
|
||||
|
||||
@JsonProperty("md5")
|
||||
private String md5;
|
||||
@JsonProperty("hash")
|
||||
private String hash;
|
||||
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
@ -107,12 +107,12 @@ public class Payload {
|
|||
this.more_info = more_info;
|
||||
}
|
||||
|
||||
public String getMd5() {
|
||||
return md5;
|
||||
public String getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void setMd5(String md5) {
|
||||
this.md5 = md5;
|
||||
public void setHash(String hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
|
@ -141,7 +141,7 @@ public class Payload {
|
|||
", mime_type='" + mime_type + '\'' +
|
||||
", size='" + size + '\'' +
|
||||
", more_info='" + more_info + '\'' +
|
||||
", md5='" + md5 + '\'' +
|
||||
", hash='" + hash + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", provenance='" + provenance + '\'' +
|
||||
'}';
|
||||
|
|
|
@ -5,12 +5,17 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"id",
|
||||
"dedupid",
|
||||
"terms_of_reuse"
|
||||
"pids",
|
||||
"urls",
|
||||
"datasource",
|
||||
"termsOfReuse"
|
||||
})
|
||||
public class Publication {
|
||||
|
||||
|
@ -20,8 +25,78 @@ public class Publication {
|
|||
@JsonProperty("dedupid")
|
||||
private String dedupid;
|
||||
|
||||
@JsonProperty("terms_of_reuse")
|
||||
private String terms_of_reuse;
|
||||
@JsonProperty("pids")
|
||||
private List<String> pids;
|
||||
|
||||
@JsonProperty("urls")
|
||||
private List<String> urls;
|
||||
|
||||
@JsonProperty("datasource")
|
||||
private Datasource datasource;
|
||||
|
||||
@JsonProperty("termsOfReuse")
|
||||
private String termsOfReuse; // Takes values from the TermsOfReuseEnum.
|
||||
|
||||
public Publication(String id, String dedupid, List<String> pids, List<String> urls, Datasource datasource, String termsOfReuse) {
|
||||
this.id = id;
|
||||
this.dedupid = dedupid;
|
||||
this.pids = pids;
|
||||
this.urls = urls;
|
||||
this.datasource = datasource;
|
||||
this.termsOfReuse = termsOfReuse;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDedupid() {
|
||||
return dedupid;
|
||||
}
|
||||
|
||||
public void setDedupid(String dedupid) {
|
||||
this.dedupid = dedupid;
|
||||
}
|
||||
|
||||
public List<String> getPids() {
|
||||
return pids;
|
||||
}
|
||||
|
||||
public void setPids(List<String> pids) {
|
||||
this.pids = pids;
|
||||
}
|
||||
|
||||
public List<String> getUrls() {
|
||||
return urls;
|
||||
}
|
||||
|
||||
public void setUrls(List<String> urls) {
|
||||
this.urls = urls;
|
||||
}
|
||||
|
||||
public Datasource getDatasource() {
|
||||
return datasource;
|
||||
}
|
||||
|
||||
public void setDatasource(Datasource datasource) {
|
||||
this.datasource = datasource;
|
||||
}
|
||||
|
||||
public String getTermsOfReuse() {
|
||||
return termsOfReuse;
|
||||
}
|
||||
|
||||
public void setTermsOfReuse(String termsOfReuse) {
|
||||
this.termsOfReuse = termsOfReuse;
|
||||
}
|
||||
|
||||
public enum TermsOfReuseEnum {
|
||||
Full, Mining, Internal
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue