2016-05-27 19:08:03 +02:00
|
|
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.shared;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This bean will contain during ckan metadata creation the following information
|
|
|
|
* (related to the workspace folder that represents a dataset)
|
|
|
|
* <ul>
|
2016-09-28 16:41:55 +02:00
|
|
|
* <li> id -> the id that will be assigned by ckan
|
2016-05-27 19:08:03 +02:00
|
|
|
* <li> Title -> folder's name
|
|
|
|
* <li> Description -> folders' description
|
|
|
|
* <li> tags -> folder's custom fields keys' names
|
|
|
|
* <li> visibility -> as chosen by the creator (visible = true, not visible = false)
|
|
|
|
* <li> source -> url of the folder within the workspace
|
|
|
|
* <li> version -> during creation it is going to be 1.0
|
|
|
|
* <li> author, maintainer -> folder's owner
|
|
|
|
* <li> custom fields -> gcube items <key, value> couple
|
2016-06-06 17:24:52 +02:00
|
|
|
* <li> organizationsList -> list of organizations to which the user belong (and in which
|
|
|
|
* he wants to publish)
|
2016-06-08 18:31:54 +02:00
|
|
|
* <li> list of metadata, that is custom fields per vre
|
2016-09-28 16:41:55 +02:00
|
|
|
* <li> the name of the chosen profile used
|
2016-05-27 19:08:03 +02:00
|
|
|
* </ul>
|
2016-09-28 16:41:55 +02:00
|
|
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
2016-05-27 19:08:03 +02:00
|
|
|
*/
|
|
|
|
@SuppressWarnings("serial")
|
|
|
|
public class DatasetMetadataBean implements Serializable {
|
|
|
|
|
|
|
|
private String id;
|
|
|
|
private String title;
|
|
|
|
private String description;
|
|
|
|
private String license; // chosen by the user
|
|
|
|
private String source; // url of the folder in the workspace
|
2016-07-13 16:11:15 +02:00
|
|
|
private String authorName; // author name
|
|
|
|
private String authorSurname; // author surname
|
|
|
|
private String authorFullName;
|
2016-05-27 19:08:03 +02:00
|
|
|
private String authorEmail; // folder's email owner
|
|
|
|
private String maintainer;
|
|
|
|
private String maintainerEmail;
|
2016-06-08 18:31:54 +02:00
|
|
|
private String ownerIdentifier; // owner of the folder into the workspace (e.g., andrea.rossi)
|
2016-11-09 19:13:39 +01:00
|
|
|
private String chosenProfile; // the name of the MetaDataProfile chosen
|
2016-06-06 17:24:52 +02:00
|
|
|
private String selectedOrganization;
|
2016-11-09 19:13:39 +01:00
|
|
|
private long version; // version 1, 2 ...
|
|
|
|
private boolean visibility; // Private (false) or Public(true)
|
|
|
|
private List<OrganizationBean> organizationList; // list of organization in which the user is present and could create the dataset
|
|
|
|
private List<ResourceElementBean> resources; // in case of workspace, this is the list of children of the folder
|
2016-06-09 18:58:19 +02:00
|
|
|
private List<MetaDataProfileBean> metadataList;
|
2016-11-09 19:13:39 +01:00
|
|
|
private List<String> tags; // on retrieve, they are the keys of the custom fields
|
2016-12-07 10:58:11 +01:00
|
|
|
private Map<String, List<String>> customFields;
|
2016-11-14 18:37:45 +01:00
|
|
|
private List<GroupBean> groups;
|
2016-06-07 17:50:33 +02:00
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
public DatasetMetadataBean(){
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Create a metadata bean object.
|
|
|
|
* @param id
|
|
|
|
* @param title
|
|
|
|
* @param description
|
2016-06-06 17:24:52 +02:00
|
|
|
* @param customFields
|
2016-05-27 19:08:03 +02:00
|
|
|
* @param tags
|
|
|
|
* @param license
|
|
|
|
* @param visibility
|
|
|
|
* @param source
|
|
|
|
* @param version
|
|
|
|
* @param author
|
|
|
|
* @param authorEmail
|
|
|
|
* @param maintainer
|
|
|
|
* @param maintainerEmail
|
2016-06-08 18:31:54 +02:00
|
|
|
* @param ownerIdentifier
|
2016-06-06 17:24:52 +02:00
|
|
|
* @param organizationList
|
|
|
|
* @param selectedOrganization
|
2016-06-08 18:31:54 +02:00
|
|
|
* @param resourcesIds
|
|
|
|
* @param addResources
|
|
|
|
* @param metadataList
|
2016-05-27 19:08:03 +02:00
|
|
|
*/
|
|
|
|
public DatasetMetadataBean(String id, String title, String description,
|
2016-12-07 10:58:11 +01:00
|
|
|
Map<String, List<String>> customFields, List<String> tags,
|
2016-06-08 18:31:54 +02:00
|
|
|
String license, boolean visibility, String source, long version,
|
2016-07-13 16:11:15 +02:00
|
|
|
String authorName, String authorSurname, String authorEmail, String maintainer,
|
2016-06-08 18:31:54 +02:00
|
|
|
String maintainerEmail, String ownerIdentifier,
|
2016-07-20 22:41:15 +02:00
|
|
|
List<OrganizationBean> organizationList, String selectedOrganization,
|
2016-11-09 19:13:39 +01:00
|
|
|
List<ResourceElementBean> resources,
|
2016-11-14 18:37:45 +01:00
|
|
|
List<MetaDataProfileBean> metadataList, List<GroupBean> groups) {
|
2016-05-27 19:08:03 +02:00
|
|
|
super();
|
|
|
|
this.id = id;
|
|
|
|
this.title = title;
|
|
|
|
this.description = description;
|
|
|
|
this.customFields = customFields;
|
2016-06-06 17:24:52 +02:00
|
|
|
this.tags = tags;
|
2016-05-27 19:08:03 +02:00
|
|
|
this.license = license;
|
|
|
|
this.visibility = visibility;
|
|
|
|
this.source = source;
|
|
|
|
this.version = version;
|
2016-07-13 16:11:15 +02:00
|
|
|
this.authorName = authorName;
|
|
|
|
this.authorSurname = authorSurname;
|
2016-05-27 19:08:03 +02:00
|
|
|
this.authorEmail = authorEmail;
|
|
|
|
this.maintainer = maintainer;
|
|
|
|
this.maintainerEmail = maintainerEmail;
|
2016-06-08 18:31:54 +02:00
|
|
|
this.ownerIdentifier = ownerIdentifier;
|
2016-06-06 17:24:52 +02:00
|
|
|
this.organizationList = organizationList;
|
|
|
|
this.selectedOrganization = selectedOrganization;
|
2016-07-06 18:41:43 +02:00
|
|
|
this.resources = resources;
|
2016-06-08 18:31:54 +02:00
|
|
|
this.metadataList = metadataList;
|
2016-11-14 18:37:45 +01:00
|
|
|
this.groups = groups;
|
2016-06-08 18:31:54 +02:00
|
|
|
}
|
|
|
|
|
2016-06-09 18:58:19 +02:00
|
|
|
public List<MetaDataProfileBean> getMetadataList() {
|
2016-06-08 18:31:54 +02:00
|
|
|
return metadataList;
|
|
|
|
}
|
|
|
|
|
2016-06-09 18:58:19 +02:00
|
|
|
public void setMetadataList(List<MetaDataProfileBean> metadataList) {
|
2016-06-08 18:31:54 +02:00
|
|
|
this.metadataList = metadataList;
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
2016-06-08 18:31:54 +02:00
|
|
|
public String getOwnerIdentifier() {
|
|
|
|
return ownerIdentifier;
|
2016-06-06 17:24:52 +02:00
|
|
|
}
|
|
|
|
|
2016-06-08 18:31:54 +02:00
|
|
|
public void setOwnerIdentifier(String ownerIdentifier) {
|
|
|
|
this.ownerIdentifier = ownerIdentifier;
|
2016-06-06 17:24:52 +02:00
|
|
|
}
|
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
this.title = title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
2016-12-07 10:58:11 +01:00
|
|
|
public Map<String, List<String>> getCustomFields() {
|
2016-05-27 19:08:03 +02:00
|
|
|
return customFields;
|
|
|
|
}
|
|
|
|
|
2016-12-07 10:58:11 +01:00
|
|
|
public void setCustomFields(Map<String, List<String>> customFields) {
|
2016-05-27 19:08:03 +02:00
|
|
|
this.customFields = customFields;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<String> getTags() {
|
|
|
|
return tags;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTags(List<String> tags) {
|
|
|
|
this.tags = tags;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getLicense() {
|
|
|
|
return license;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLicense(String license) {
|
|
|
|
this.license = license;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean getVisibility() {
|
|
|
|
return visibility;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVisibility(boolean visibility) {
|
|
|
|
this.visibility = visibility;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSource() {
|
|
|
|
return source;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSource(String source) {
|
|
|
|
this.source = source;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getVersion() {
|
|
|
|
return version;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVersion(long version) {
|
|
|
|
this.version = version;
|
|
|
|
}
|
|
|
|
|
2016-07-13 16:11:15 +02:00
|
|
|
public String getAuthorName() {
|
|
|
|
return authorName;
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
|
2016-07-13 16:11:15 +02:00
|
|
|
public void setAuthorName(String authorName) {
|
|
|
|
this.authorName = authorName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAuthorSurname() {
|
|
|
|
return authorSurname;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAuthorSurname(String authorSurname) {
|
|
|
|
this.authorSurname = authorSurname;
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getAuthorEmail() {
|
|
|
|
return authorEmail;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAuthorEmail(String authorEmail) {
|
|
|
|
this.authorEmail = authorEmail;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getMaintainer() {
|
|
|
|
return maintainer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMaintainer(String maintainer) {
|
|
|
|
this.maintainer = maintainer;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getMaintainerEmail() {
|
|
|
|
return maintainerEmail;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMaintainerEmail(String maintainerEmail) {
|
|
|
|
this.maintainerEmail = maintainerEmail;
|
|
|
|
}
|
|
|
|
|
2016-07-20 22:41:15 +02:00
|
|
|
public List<OrganizationBean> getOrganizationList() {
|
2016-06-06 17:24:52 +02:00
|
|
|
return organizationList;
|
|
|
|
}
|
|
|
|
|
2016-07-20 22:41:15 +02:00
|
|
|
public void setOrganizationList(List<OrganizationBean> organizationList) {
|
2016-06-06 17:24:52 +02:00
|
|
|
this.organizationList = organizationList;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSelectedOrganization() {
|
|
|
|
return selectedOrganization;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSelectedOrganization(String selectedOrganization) {
|
|
|
|
this.selectedOrganization = selectedOrganization;
|
|
|
|
}
|
|
|
|
|
2016-11-09 19:13:39 +01:00
|
|
|
public List<ResourceElementBean> getResources() {
|
2016-07-06 18:41:43 +02:00
|
|
|
return resources;
|
2016-06-06 17:24:52 +02:00
|
|
|
}
|
|
|
|
|
2016-11-09 19:13:39 +01:00
|
|
|
public void setResources(List<ResourceElementBean> resources) {
|
2016-07-06 18:41:43 +02:00
|
|
|
this.resources = resources;
|
2016-06-06 17:24:52 +02:00
|
|
|
}
|
2016-11-09 19:13:39 +01:00
|
|
|
|
2016-07-13 16:11:15 +02:00
|
|
|
public String getAuthorFullName() {
|
|
|
|
return authorFullName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAuthorFullName(String authorFullName) {
|
|
|
|
this.authorFullName = authorFullName;
|
|
|
|
}
|
2016-11-09 19:13:39 +01:00
|
|
|
|
2016-09-28 16:41:55 +02:00
|
|
|
public String getChosenProfile() {
|
|
|
|
return chosenProfile;
|
|
|
|
}
|
2016-06-06 17:24:52 +02:00
|
|
|
|
2016-09-28 16:41:55 +02:00
|
|
|
public void setChosenProfile(String chosenProfile) {
|
|
|
|
this.chosenProfile = chosenProfile;
|
|
|
|
}
|
2016-11-14 18:37:45 +01:00
|
|
|
|
|
|
|
public List<GroupBean> getGroups() {
|
|
|
|
return groups;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setGroups(List<GroupBean> groups) {
|
|
|
|
this.groups = groups;
|
|
|
|
}
|
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "DatasetMetadataBean [id=" + id + ", title=" + title
|
2016-11-14 18:37:45 +01:00
|
|
|
+ ", description=" + description + ", license=" + license
|
|
|
|
+ ", source=" + source + ", authorName=" + authorName
|
2016-07-13 16:11:15 +02:00
|
|
|
+ ", authorSurname=" + authorSurname + ", authorFullName="
|
|
|
|
+ authorFullName + ", authorEmail=" + authorEmail
|
|
|
|
+ ", maintainer=" + maintainer + ", maintainerEmail="
|
|
|
|
+ maintainerEmail + ", ownerIdentifier=" + ownerIdentifier
|
2016-11-14 18:37:45 +01:00
|
|
|
+ ", chosenProfile=" + chosenProfile
|
2016-06-06 17:24:52 +02:00
|
|
|
+ ", selectedOrganization=" + selectedOrganization
|
2016-11-14 18:37:45 +01:00
|
|
|
+ ", version=" + version + ", visibility=" + visibility
|
|
|
|
+ ", organizationList=" + organizationList + ", resources="
|
|
|
|
+ resources + ", metadataList=" + metadataList + ", tags="
|
|
|
|
+ tags + ", customFields=" + customFields + ", groups="
|
|
|
|
+ groups + "]";
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
}
|