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;
|
|
|
|
|
2024-02-02 17:09:09 +01:00
|
|
|
import org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean;
|
2017-04-25 15:41:27 +02:00
|
|
|
|
2022-10-27 12:04:50 +02:00
|
|
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
/**
|
2024-02-08 14:09:56 +01:00
|
|
|
* This bean will contain during ckan metadata creation information related to
|
|
|
|
* the future build.
|
|
|
|
*
|
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")
|
2022-10-27 12:04:50 +02:00
|
|
|
public class DatasetBean implements Serializable, IsSerializable {
|
2016-05-27 19:08:03 +02:00
|
|
|
|
|
|
|
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;
|
2017-04-25 15:41:27 +02:00
|
|
|
private String authorEmail; // owner's email
|
2016-05-27 19:08:03 +02:00
|
|
|
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)
|
2017-04-05 18:42:07 +02:00
|
|
|
private String chosenType; // the name of the MetaDataType 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 ...
|
2017-04-25 15:41:27 +02:00
|
|
|
private boolean visible; // Private (false) or Public(true)
|
2024-02-08 14:09:56 +01:00
|
|
|
private List<OrganizationBean> organizationList; // list of organization in which the user is present and could
|
|
|
|
// create the dataset
|
|
|
|
private ResourceElementBean resourceRoot; // in case of workspace, this is the directory root or the single file
|
|
|
|
// information
|
2017-04-25 15:41:27 +02:00
|
|
|
private List<MetaDataProfileBean> metadataList;
|
2017-03-15 11:02:21 +01:00
|
|
|
private List<String> tags; // on retrieve, they are the keys of the product
|
2017-04-05 18:42:07 +02:00
|
|
|
private List<String> tagsVocabulary; // when available
|
2016-12-07 10:58:11 +01:00
|
|
|
private Map<String, List<String>> customFields;
|
2017-04-25 15:41:27 +02:00
|
|
|
private List<OrganizationBean> groups;
|
2017-04-27 16:24:21 +02:00
|
|
|
private List<OrganizationBean> groupsForceCreation;
|
2024-02-08 14:09:56 +01:00
|
|
|
private List<ResourceElementBean> resources;
|
2016-06-07 17:50:33 +02:00
|
|
|
|
2024-02-08 14:09:56 +01:00
|
|
|
public DatasetBean() {
|
2016-05-27 19:08:03 +02:00
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2024-02-08 14:09:56 +01:00
|
|
|
/**
|
|
|
|
* Create a metadata bean object.
|
|
|
|
*
|
2016-05-27 19:08:03 +02:00
|
|
|
* @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
|
|
|
*/
|
2024-02-08 14:09:56 +01:00
|
|
|
public DatasetBean(String id, String title, String description, Map<String, List<String>> customFields,
|
|
|
|
List<String> tags, String license, boolean visible, String source, long version, String authorName,
|
|
|
|
String authorSurname, String authorEmail, String maintainer, String maintainerEmail, String ownerIdentifier,
|
|
|
|
List<OrganizationBean> organizationList, String selectedOrganization, ResourceElementBean resourceRoot,
|
2017-04-25 15:41:27 +02:00
|
|
|
List<MetaDataProfileBean> metadataList, List<OrganizationBean> groups, List<String> tagsVocabulary) {
|
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;
|
2017-04-25 15:41:27 +02:00
|
|
|
this.visible = visible;
|
2016-05-27 19:08:03 +02:00
|
|
|
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;
|
2017-02-22 17:40:16 +01:00
|
|
|
this.resourceRoot = resourceRoot;
|
2017-04-25 15:41:27 +02:00
|
|
|
this.metadataList = metadataList;
|
2016-11-14 18:37:45 +01:00
|
|
|
this.groups = groups;
|
2017-04-05 18:42:07 +02:00
|
|
|
this.tagsVocabulary = tagsVocabulary;
|
2016-06-08 18:31:54 +02:00
|
|
|
}
|
|
|
|
|
2017-04-05 18:42:07 +02:00
|
|
|
public String getChosenType() {
|
|
|
|
return chosenType;
|
2016-06-08 18:31:54 +02:00
|
|
|
}
|
|
|
|
|
2017-04-05 18:42:07 +02:00
|
|
|
public void setChosenType(String chosenType) {
|
|
|
|
this.chosenType = chosenType;
|
|
|
|
}
|
|
|
|
|
2017-04-25 15:41:27 +02:00
|
|
|
public List<MetaDataProfileBean> getMetadataList() {
|
|
|
|
return metadataList;
|
2017-04-05 18:42:07 +02:00
|
|
|
}
|
|
|
|
|
2017-04-25 15:41:27 +02:00
|
|
|
public void setMetadataList(List<MetaDataProfileBean> metadataListTypes) {
|
|
|
|
this.metadataList = metadataListTypes;
|
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() {
|
2017-04-25 15:41:27 +02:00
|
|
|
return visible;
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
|
2017-04-25 15:41:27 +02:00
|
|
|
public void setVisibile(boolean visibile) {
|
|
|
|
this.visible = visibile;
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-02-22 17:40:16 +01:00
|
|
|
public ResourceElementBean getResourceRoot() {
|
|
|
|
return resourceRoot;
|
2016-06-06 17:24:52 +02:00
|
|
|
}
|
|
|
|
|
2017-02-22 17:40:16 +01:00
|
|
|
public void setResourceRoot(ResourceElementBean resourceRoot) {
|
|
|
|
this.resourceRoot = resourceRoot;
|
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
|
|
|
|
2017-04-25 15:41:27 +02:00
|
|
|
public List<OrganizationBean> getGroups() {
|
2016-11-14 18:37:45 +01:00
|
|
|
return groups;
|
|
|
|
}
|
|
|
|
|
2017-04-25 15:41:27 +02:00
|
|
|
public void setGroups(List<OrganizationBean> groups) {
|
2016-11-14 18:37:45 +01:00
|
|
|
this.groups = groups;
|
|
|
|
}
|
|
|
|
|
2017-04-05 18:42:07 +02:00
|
|
|
public List<String> getTagsVocabulary() {
|
|
|
|
return tagsVocabulary;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTagsVocabulary(List<String> tagsVocabulary) {
|
|
|
|
this.tagsVocabulary = tagsVocabulary;
|
|
|
|
}
|
|
|
|
|
2017-04-27 16:24:21 +02:00
|
|
|
public List<OrganizationBean> getGroupsForceCreation() {
|
|
|
|
return groupsForceCreation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setGroupsForceCreation(List<OrganizationBean> groupsForceCreation) {
|
|
|
|
this.groupsForceCreation = groupsForceCreation;
|
|
|
|
}
|
|
|
|
|
2024-02-08 14:09:56 +01:00
|
|
|
public void setResources(List<ResourceElementBean> resources) {
|
|
|
|
this.resources = resources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<ResourceElementBean> getCkanResources() {
|
|
|
|
return resources;
|
|
|
|
}
|
|
|
|
|
2016-05-27 19:08:03 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2022-10-27 12:38:49 +02:00
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
builder.append("DatasetBean [id=");
|
|
|
|
builder.append(id);
|
|
|
|
builder.append(", title=");
|
|
|
|
builder.append(title);
|
|
|
|
builder.append(", description=");
|
|
|
|
builder.append(description);
|
|
|
|
builder.append(", license=");
|
|
|
|
builder.append(license);
|
|
|
|
builder.append(", source=");
|
|
|
|
builder.append(source);
|
|
|
|
builder.append(", authorName=");
|
|
|
|
builder.append(authorName);
|
|
|
|
builder.append(", authorSurname=");
|
|
|
|
builder.append(authorSurname);
|
|
|
|
builder.append(", authorFullName=");
|
|
|
|
builder.append(authorFullName);
|
|
|
|
builder.append(", authorEmail=");
|
|
|
|
builder.append(authorEmail);
|
|
|
|
builder.append(", maintainer=");
|
|
|
|
builder.append(maintainer);
|
|
|
|
builder.append(", maintainerEmail=");
|
|
|
|
builder.append(maintainerEmail);
|
|
|
|
builder.append(", ownerIdentifier=");
|
|
|
|
builder.append(ownerIdentifier);
|
|
|
|
builder.append(", chosenType=");
|
|
|
|
builder.append(chosenType);
|
|
|
|
builder.append(", selectedOrganization=");
|
|
|
|
builder.append(selectedOrganization);
|
|
|
|
builder.append(", version=");
|
|
|
|
builder.append(version);
|
|
|
|
builder.append(", visible=");
|
|
|
|
builder.append(visible);
|
|
|
|
builder.append(", organizationList=");
|
|
|
|
builder.append(organizationList);
|
|
|
|
builder.append(", metadataList=");
|
|
|
|
builder.append(metadataList);
|
|
|
|
builder.append(", tags=");
|
|
|
|
builder.append(tags);
|
|
|
|
builder.append(", tagsVocabulary=");
|
|
|
|
builder.append(tagsVocabulary);
|
|
|
|
builder.append(", customFields=");
|
|
|
|
builder.append(customFields);
|
|
|
|
builder.append(", groups=");
|
|
|
|
builder.append(groups);
|
|
|
|
builder.append(", groupsForceCreation=");
|
|
|
|
builder.append(groupsForceCreation);
|
|
|
|
builder.append("]");
|
|
|
|
return builder.toString();
|
2016-05-27 19:08:03 +02:00
|
|
|
}
|
2017-02-22 17:40:16 +01:00
|
|
|
|
2022-10-27 12:38:49 +02:00
|
|
|
|
|
|
|
|
2017-02-22 17:40:16 +01:00
|
|
|
}
|