Manifest.java
package info.textgrid.services.textapi.apiv2;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonInclude;
@JsonPropertyOrder({
"@context",
"textapiVersion",
"id",
"textapiType",
"revision",
"created",
"modified",
"titles",
"agents",
"license",
"total",
"items"
})
public class Manifest {
@JsonProperty("@context")
private String context;
private String textapiVersion;
private String id;
private String textapiType;
private String revision;
private String created;
private String modified;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> titles = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Agent> agents = new ArrayList<>();
private String license;
private Integer total;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Item> items = new ArrayList<>();
public String getContext() {
return context;
}
public Manifest setContext(String context) {
this.context = context;
return this;
}
public String getTextapiVersion() {
return textapiVersion;
}
public Manifest setTextapiVersion(String textapiVersion) {
this.textapiVersion = textapiVersion;
return this;
}
public String getId() {
return id;
}
public Manifest setId(String id) {
this.id = id;
return this;
}
public String getTextapiType() {
return textapiType;
}
public Manifest setTextapiType(String textapiType) {
this.textapiType = textapiType;
return this;
}
public String getRevision() {
return revision;
}
public Manifest setRevision(String revision) {
this.revision = revision;
return this;
}
public String getCreated() {
return created;
}
public Manifest setCreated(String created) {
this.created = created;
return this;
}
public String getModified() {
return modified;
}
public Manifest setModified(String modified) {
this.modified = modified;
return this;
}
public List<String> getTitles() {
return titles;
}
public Manifest setTitles(List<String> titles) {
this.titles = titles;
return this;
}
public Manifest addTitle(String title) {
this.titles.add(title);
return this;
}
public List<Agent> getAgents() {
return agents;
}
public Manifest setAgents(List<Agent> agents) {
this.agents = agents;
return this;
}
public Manifest addAgent(Agent agent) {
this.agents.add(agent);
return this;
}
public String getLicense() {
return license;
}
public Manifest setLicense(String license) {
this.license = license;
return this;
}
public Integer getTotal() {
return total;
}
public Manifest setTotal(Integer total) {
this.total = total;
return this;
}
public List<Item> getItems() {
return items;
}
public Manifest setItems(List<Item> items) {
this.items = items;
return this;
}
public Manifest addItem(Item item) {
this.items.add(item);
return this;
}
}