2016-10-08 20:46:17 +02:00
|
|
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
2016-10-08 20:46:17 +02:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.CustomField;
|
2016-10-08 20:46:17 +02:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Group;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.custom_annotations.Tag;
|
2016-10-07 18:23:23 +02:00
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Source;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Status;
|
|
|
|
import org.gcube.data_catalogue.grsf_publish_ws.utils.groups.Type;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Information that both Stock and Fishery must contain
|
|
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
|
|
|
*/
|
|
|
|
public class Common {
|
|
|
|
|
|
|
|
@JsonProperty("description")
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
@JsonProperty("license")
|
|
|
|
private String license;
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
@JsonProperty("author") // @JsonIgnoreProperties(ignoreUnknown=true) // ignore in serialization/deserialization
|
|
|
|
private String author;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
|
|
|
@JsonProperty("version")
|
2016-10-08 23:10:25 +02:00
|
|
|
private Long version;
|
2016-10-07 18:23:23 +02:00
|
|
|
|
|
|
|
@JsonProperty("author_contact")
|
|
|
|
private String authorContact;
|
|
|
|
|
|
|
|
@JsonProperty("maintainer")
|
|
|
|
private String maintainer;
|
|
|
|
|
|
|
|
@JsonProperty("maintainer_contact")
|
|
|
|
private String maintainerContact;
|
|
|
|
|
|
|
|
@JsonProperty("catches_or_landings")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Catches or landings")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String catchesOrLandings;
|
|
|
|
|
|
|
|
@JsonProperty("database_sources")
|
2016-10-08 20:46:17 +02:00
|
|
|
@Group
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Database sources")
|
2016-10-07 18:23:23 +02:00
|
|
|
private Source databaseSources;
|
|
|
|
|
|
|
|
@JsonProperty("source_of_information")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Source of information")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String sourceOfInformation;
|
|
|
|
|
|
|
|
@JsonProperty("data_owner")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Data owner")
|
2016-10-07 18:23:23 +02:00
|
|
|
private String dataOwner;
|
|
|
|
|
|
|
|
@JsonProperty("type")
|
2016-10-08 20:46:17 +02:00
|
|
|
@Tag
|
|
|
|
@Group
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Type")
|
2016-10-07 18:23:23 +02:00
|
|
|
private Type type;
|
|
|
|
|
|
|
|
@JsonProperty("status")
|
2016-10-08 20:46:17 +02:00
|
|
|
@Tag
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Status")
|
2016-10-07 18:23:23 +02:00
|
|
|
private Status status;
|
|
|
|
|
2016-10-08 20:46:17 +02:00
|
|
|
@JsonProperty("resources")
|
|
|
|
private List<Resource> resources;
|
|
|
|
|
|
|
|
@JsonProperty("extras")
|
2016-10-08 23:10:25 +02:00
|
|
|
private Map<String, String> extras = new HashMap<>();
|
2016-10-08 20:46:17 +02:00
|
|
|
|
|
|
|
@JsonProperty("spatial")
|
2016-10-08 23:10:25 +02:00
|
|
|
@CustomField(key="Spatial")
|
2016-10-08 20:46:17 +02:00
|
|
|
private String spatial;
|
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
public Common() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
public Common(String description, String license, String author,
|
2016-10-08 23:10:25 +02:00
|
|
|
Long version, String authorContact, String maintainer,
|
2016-10-07 18:23:23 +02:00
|
|
|
String maintainerContact, String catchesOrLandings,
|
|
|
|
Source databaseSources, String sourceOfInformation,
|
2016-10-08 20:46:17 +02:00
|
|
|
String dataOwner, Type type, Status status,
|
2016-10-08 23:10:25 +02:00
|
|
|
List<Resource> resources, Map<String, String> extras,
|
2016-10-08 20:46:17 +02:00
|
|
|
String spatial) {
|
2016-10-07 18:23:23 +02:00
|
|
|
super();
|
|
|
|
this.description = description;
|
|
|
|
this.license = license;
|
|
|
|
this.author = author;
|
|
|
|
this.version = version;
|
|
|
|
this.authorContact = authorContact;
|
|
|
|
this.maintainer = maintainer;
|
|
|
|
this.maintainerContact = maintainerContact;
|
|
|
|
this.catchesOrLandings = catchesOrLandings;
|
|
|
|
this.databaseSources = databaseSources;
|
|
|
|
this.sourceOfInformation = sourceOfInformation;
|
|
|
|
this.dataOwner = dataOwner;
|
|
|
|
this.type = type;
|
|
|
|
this.status = status;
|
2016-10-08 20:46:17 +02:00
|
|
|
this.resources = resources;
|
2016-10-08 22:16:59 +02:00
|
|
|
this.extras = extras;
|
2016-10-08 20:46:17 +02:00
|
|
|
this.spatial = spatial;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSpatial() {
|
|
|
|
return spatial;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSpatial(String spatial) {
|
|
|
|
this.spatial = spatial;
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getLicense() {
|
|
|
|
return license;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLicense(String license) {
|
|
|
|
this.license = license;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAuthor() {
|
|
|
|
return author;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAuthor(String author) {
|
|
|
|
this.author = author;
|
|
|
|
}
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
public Long getVersion() {
|
2016-10-07 18:23:23 +02:00
|
|
|
return version;
|
|
|
|
}
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
public void setVersion(Long version) {
|
2016-10-07 18:23:23 +02:00
|
|
|
this.version = version;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAuthorContact() {
|
|
|
|
return authorContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAuthorContact(String authorContact) {
|
|
|
|
this.authorContact = authorContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getMaintainer() {
|
|
|
|
return maintainer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMaintainer(String maintainer) {
|
|
|
|
this.maintainer = maintainer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getMaintainerContact() {
|
|
|
|
return maintainerContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMaintainerContact(String maintainerContact) {
|
|
|
|
this.maintainerContact = maintainerContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getCatchesOrLandings() {
|
|
|
|
return catchesOrLandings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setCatchesOrLandings(String catchesOrLandings) {
|
|
|
|
this.catchesOrLandings = catchesOrLandings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Source getDatabaseSources() {
|
|
|
|
return databaseSources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDatabaseSources(Source databaseSources) {
|
|
|
|
this.databaseSources = databaseSources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSourceOfInformation() {
|
|
|
|
return sourceOfInformation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSourceOfInformation(String sourceOfInformation) {
|
|
|
|
this.sourceOfInformation = sourceOfInformation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDataOwner() {
|
|
|
|
return dataOwner;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDataOwner(String dataOwner) {
|
|
|
|
this.dataOwner = dataOwner;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Type getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setType(Type type) {
|
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Status getStatus() {
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setStatus(Status status) {
|
|
|
|
this.status = status;
|
|
|
|
}
|
|
|
|
|
2016-10-08 20:46:17 +02:00
|
|
|
public List<Resource> getResources() {
|
|
|
|
return resources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setResources(List<Resource> resources) {
|
|
|
|
this.resources = resources;
|
|
|
|
}
|
|
|
|
|
2016-10-09 12:52:33 +02:00
|
|
|
public void setExtras(Map<String, String> extras) {
|
2016-10-08 22:16:59 +02:00
|
|
|
this.extras = extras;
|
2016-10-08 20:46:17 +02:00
|
|
|
}
|
|
|
|
|
2016-10-08 23:10:25 +02:00
|
|
|
public Map<String, String> getExtras() {
|
2016-10-08 22:16:59 +02:00
|
|
|
return extras;
|
2016-10-08 20:46:17 +02:00
|
|
|
}
|
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "Common [description=" + description + ", license=" + license
|
|
|
|
+ ", author=" + author + ", version=" + version
|
|
|
|
+ ", authorContact=" + authorContact + ", maintainer="
|
|
|
|
+ maintainer + ", maintainerContact=" + maintainerContact
|
|
|
|
+ ", catchesOrLandings=" + catchesOrLandings
|
|
|
|
+ ", databaseSources=" + databaseSources
|
|
|
|
+ ", sourceOfInformation=" + sourceOfInformation
|
|
|
|
+ ", dataOwner=" + dataOwner + ", type=" + type + ", status="
|
2016-10-08 22:16:59 +02:00
|
|
|
+ status + ", resources=" + resources + ", extras="
|
|
|
|
+ extras + ", spatial=" + spatial + "]";
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|
2016-10-08 20:46:17 +02:00
|
|
|
|
2016-10-07 18:23:23 +02:00
|
|
|
}
|