From 471c1f373c9bdc96e1db8ed4a7481bc33755ee72 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 2 Feb 2024 16:52:40 +0100 Subject: [PATCH] Aligned to ckan-metadata-publisher-widget --- CHANGELOG.md | 6 + pom.xml | 2 +- .../form/catalogue/CreateDatasetForm.ui.xml | 18 +- .../shared/catalogue/DatasetBean.java | 670 +++++++++--------- 4 files changed, 351 insertions(+), 345 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35324ff..c6185d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.1.1-SNAPSHOT] - 2024-02-02 + +#### Enhancements + +- [#26656] Aligned the data-model to ckan-metadata-publisher-widget + ## [v2.1.0] - 2023-02-01 #### Enhancements diff --git a/pom.xml b/pom.xml index 5951622..ffbe3b8 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.gcube.portlets.widgets metadata-profile-form-builder-widget jar - 2.1.0 + 2.1.1-SNAPSHOT Metadata Profile Form Builder The Metadata Profile Form Builder is a widget able to build dynamically a web form by reading "gCube Metadata Profile/s" diff --git a/src/main/java/org/gcube/portlets/widgets/mpformbuilder/client/form/catalogue/CreateDatasetForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/mpformbuilder/client/form/catalogue/CreateDatasetForm.ui.xml index ef4aca5..2c728a6 100644 --- a/src/main/java/org/gcube/portlets/widgets/mpformbuilder/client/form/catalogue/CreateDatasetForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/mpformbuilder/client/form/catalogue/CreateDatasetForm.ui.xml @@ -1,4 +1,4 @@ - + + Alert blocks for info/errors @@ -104,7 +104,7 @@ - + TAGS Panel @@ -294,13 +294,13 @@ - + Alert block on continue - + Alert block on continue @@ -359,11 +359,11 @@ - + Here will be placed the metadata fields formats - + Custom fields can be dinamically added Custom Field(s): @@ -383,7 +383,7 @@ - + Alert block on create @@ -407,4 +407,4 @@ - \ No newline at end of file + --> \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/mpformbuilder/shared/catalogue/DatasetBean.java b/src/main/java/org/gcube/portlets/widgets/mpformbuilder/shared/catalogue/DatasetBean.java index 108c18b..8f27e03 100644 --- a/src/main/java/org/gcube/portlets/widgets/mpformbuilder/shared/catalogue/DatasetBean.java +++ b/src/main/java/org/gcube/portlets/widgets/mpformbuilder/shared/catalogue/DatasetBean.java @@ -1,335 +1,335 @@ -package org.gcube.portlets.widgets.mpformbuilder.shared.catalogue; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean; - -/** - * This bean will contain during ckan metadata creation information related to the future build. - * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) - */ -@SuppressWarnings("serial") -public class DatasetBean 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 - private String authorName; // author name - private String authorSurname; // author surname - private String authorFullName; - private String authorEmail; // owner's email - private String maintainer; - private String maintainerEmail; - private String ownerIdentifier; // owner of the folder into the workspace (e.g., andrea.rossi) - private String chosenType; // the name of the MetaDataType chosen - private String selectedOrganization; - private long version; // version 1, 2 ... - private boolean visible; // Private (false) or Public(true) - private List 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 - private List metadataList; - private List tags; // on retrieve, they are the keys of the product - private List tagsVocabulary; // when available - private Map> customFields; - private List groups; - private List groupsForceCreation; - - public DatasetBean(){ - super(); - } - - /** Create a metadata bean object. - * @param id - * @param title - * @param description - * @param customFields - * @param tags - * @param license - * @param visibility - * @param source - * @param version - * @param author - * @param authorEmail - * @param maintainer - * @param maintainerEmail - * @param ownerIdentifier - * @param organizationList - * @param selectedOrganization - * @param resourcesIds - * @param addResources - * @param metadataList - */ - public DatasetBean(String id, String title, String description, - Map> customFields, List tags, - String license, boolean visible, String source, long version, - String authorName, String authorSurname, String authorEmail, String maintainer, - String maintainerEmail, String ownerIdentifier, - List organizationList, String selectedOrganization, - ResourceElementBean resourceRoot, - List metadataList, List groups, List tagsVocabulary) { - super(); - this.id = id; - this.title = title; - this.description = description; - this.customFields = customFields; - this.tags = tags; - this.license = license; - this.visible = visible; - this.source = source; - this.version = version; - this.authorName = authorName; - this.authorSurname = authorSurname; - this.authorEmail = authorEmail; - this.maintainer = maintainer; - this.maintainerEmail = maintainerEmail; - this.ownerIdentifier = ownerIdentifier; - this.organizationList = organizationList; - this.selectedOrganization = selectedOrganization; - this.resourceRoot = resourceRoot; - this.metadataList = metadataList; - this.groups = groups; - this.tagsVocabulary = tagsVocabulary; - } - - public String getChosenType() { - return chosenType; - } - - public void setChosenType(String chosenType) { - this.chosenType = chosenType; - } - - public List getMetadataList() { - return metadataList; - } - - public void setMetadataList(List metadataListTypes) { - this.metadataList = metadataListTypes; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getOwnerIdentifier() { - return ownerIdentifier; - } - - public void setOwnerIdentifier(String ownerIdentifier) { - this.ownerIdentifier = ownerIdentifier; - } - - 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; - } - - public Map> getCustomFields() { - return customFields; - } - - public void setCustomFields(Map> customFields) { - this.customFields = customFields; - } - - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public String getLicense() { - return license; - } - - public void setLicense(String license) { - this.license = license; - } - - public boolean getVisibility() { - return visible; - } - - public void setVisibile(boolean visibile) { - this.visible = visibile; - } - - 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; - } - - public String getAuthorName() { - return authorName; - } - - public void setAuthorName(String authorName) { - this.authorName = authorName; - } - - public String getAuthorSurname() { - return authorSurname; - } - - public void setAuthorSurname(String authorSurname) { - this.authorSurname = authorSurname; - } - - 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; - } - - public List getOrganizationList() { - return organizationList; - } - - public void setOrganizationList(List organizationList) { - this.organizationList = organizationList; - } - - public String getSelectedOrganization() { - return selectedOrganization; - } - - public void setSelectedOrganization(String selectedOrganization) { - this.selectedOrganization = selectedOrganization; - } - - public ResourceElementBean getResourceRoot() { - return resourceRoot; - } - - public void setResourceRoot(ResourceElementBean resourceRoot) { - this.resourceRoot = resourceRoot; - } - - public String getAuthorFullName() { - return authorFullName; - } - - public void setAuthorFullName(String authorFullName) { - this.authorFullName = authorFullName; - } - - public List getGroups() { - return groups; - } - - public void setGroups(List groups) { - this.groups = groups; - } - - public List getTagsVocabulary() { - return tagsVocabulary; - } - - public void setTagsVocabulary(List tagsVocabulary) { - this.tagsVocabulary = tagsVocabulary; - } - - public List getGroupsForceCreation() { - return groupsForceCreation; - } - - public void setGroupsForceCreation(List groupsForceCreation) { - this.groupsForceCreation = groupsForceCreation; - } - - @Override - public String toString() { - return "DatasetBean [" - + (id != null ? "id=" + id + ", " : "") - + (title != null ? "title=" + title + ", " : "") - + (description != null ? "description=" + description + ", " - : "") - + (license != null ? "license=" + license + ", " : "") - + (source != null ? "source=" + source + ", " : "") - + (authorName != null ? "authorName=" + authorName + ", " : "") - + (authorSurname != null ? "authorSurname=" + authorSurname - + ", " : "") - + (authorFullName != null ? "authorFullName=" + authorFullName - + ", " : "") - + (authorEmail != null ? "authorEmail=" + authorEmail + ", " - : "") - + (maintainer != null ? "maintainer=" + maintainer + ", " : "") - + (maintainerEmail != null ? "maintainerEmail=" - + maintainerEmail + ", " : "") - + (ownerIdentifier != null ? "ownerIdentifier=" - + ownerIdentifier + ", " : "") - + (chosenType != null ? "chosenType=" + chosenType + ", " : "") - + (selectedOrganization != null ? "selectedOrganization=" - + selectedOrganization + ", " : "") - + "version=" - + version - + ", visible=" - + visible - + ", " - + (organizationList != null ? "organizationList=" - + organizationList + ", " : "") - + (resourceRoot != null ? "resourceRoot=" + resourceRoot + ", " - : "") - + (metadataList != null ? "metadataList=" + metadataList + ", " - : "") - + (tags != null ? "tags=" + tags + ", " : "") - + (tagsVocabulary != null ? "tagsVocabulary=" + tagsVocabulary - + ", " : "") - + (customFields != null ? "customFields=" + customFields + ", " - : "") - + (groups != null ? "groups=" + groups + ", " : "") - + (groupsForceCreation != null ? "groupsForceCreation=" - + groupsForceCreation : "") + "]"; - } - -} \ No newline at end of file +//package org.gcube.portlets.widgets.mpformbuilder.shared.catalogue; +// +//import java.io.Serializable; +//import java.util.List; +//import java.util.Map; +// +//import org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean; +// +///** +// * This bean will contain during ckan metadata creation information related to the future build. +// * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) +// */ +//@SuppressWarnings("serial") +//public class DatasetBean 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 +// private String authorName; // author name +// private String authorSurname; // author surname +// private String authorFullName; +// private String authorEmail; // owner's email +// private String maintainer; +// private String maintainerEmail; +// private String ownerIdentifier; // owner of the folder into the workspace (e.g., andrea.rossi) +// private String chosenType; // the name of the MetaDataType chosen +// private String selectedOrganization; +// private long version; // version 1, 2 ... +// private boolean visible; // Private (false) or Public(true) +// private List 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 +// private List metadataList; +// private List tags; // on retrieve, they are the keys of the product +// private List tagsVocabulary; // when available +// private Map> customFields; +// private List groups; +// private List groupsForceCreation; +// +// public DatasetBean(){ +// super(); +// } +// +// /** Create a metadata bean object. +// * @param id +// * @param title +// * @param description +// * @param customFields +// * @param tags +// * @param license +// * @param visibility +// * @param source +// * @param version +// * @param author +// * @param authorEmail +// * @param maintainer +// * @param maintainerEmail +// * @param ownerIdentifier +// * @param organizationList +// * @param selectedOrganization +// * @param resourcesIds +// * @param addResources +// * @param metadataList +// */ +// public DatasetBean(String id, String title, String description, +// Map> customFields, List tags, +// String license, boolean visible, String source, long version, +// String authorName, String authorSurname, String authorEmail, String maintainer, +// String maintainerEmail, String ownerIdentifier, +// List organizationList, String selectedOrganization, +// ResourceElementBean resourceRoot, +// List metadataList, List groups, List tagsVocabulary) { +// super(); +// this.id = id; +// this.title = title; +// this.description = description; +// this.customFields = customFields; +// this.tags = tags; +// this.license = license; +// this.visible = visible; +// this.source = source; +// this.version = version; +// this.authorName = authorName; +// this.authorSurname = authorSurname; +// this.authorEmail = authorEmail; +// this.maintainer = maintainer; +// this.maintainerEmail = maintainerEmail; +// this.ownerIdentifier = ownerIdentifier; +// this.organizationList = organizationList; +// this.selectedOrganization = selectedOrganization; +// this.resourceRoot = resourceRoot; +// this.metadataList = metadataList; +// this.groups = groups; +// this.tagsVocabulary = tagsVocabulary; +// } +// +// public String getChosenType() { +// return chosenType; +// } +// +// public void setChosenType(String chosenType) { +// this.chosenType = chosenType; +// } +// +// public List getMetadataList() { +// return metadataList; +// } +// +// public void setMetadataList(List metadataListTypes) { +// this.metadataList = metadataListTypes; +// } +// +// public String getId() { +// return id; +// } +// +// public void setId(String id) { +// this.id = id; +// } +// +// public String getOwnerIdentifier() { +// return ownerIdentifier; +// } +// +// public void setOwnerIdentifier(String ownerIdentifier) { +// this.ownerIdentifier = ownerIdentifier; +// } +// +// 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; +// } +// +// public Map> getCustomFields() { +// return customFields; +// } +// +// public void setCustomFields(Map> customFields) { +// this.customFields = customFields; +// } +// +// public List getTags() { +// return tags; +// } +// +// public void setTags(List tags) { +// this.tags = tags; +// } +// +// public String getLicense() { +// return license; +// } +// +// public void setLicense(String license) { +// this.license = license; +// } +// +// public boolean getVisibility() { +// return visible; +// } +// +// public void setVisibile(boolean visibile) { +// this.visible = visibile; +// } +// +// 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; +// } +// +// public String getAuthorName() { +// return authorName; +// } +// +// public void setAuthorName(String authorName) { +// this.authorName = authorName; +// } +// +// public String getAuthorSurname() { +// return authorSurname; +// } +// +// public void setAuthorSurname(String authorSurname) { +// this.authorSurname = authorSurname; +// } +// +// 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; +// } +// +// public List getOrganizationList() { +// return organizationList; +// } +// +// public void setOrganizationList(List organizationList) { +// this.organizationList = organizationList; +// } +// +// public String getSelectedOrganization() { +// return selectedOrganization; +// } +// +// public void setSelectedOrganization(String selectedOrganization) { +// this.selectedOrganization = selectedOrganization; +// } +// +// public ResourceElementBean getResourceRoot() { +// return resourceRoot; +// } +// +// public void setResourceRoot(ResourceElementBean resourceRoot) { +// this.resourceRoot = resourceRoot; +// } +// +// public String getAuthorFullName() { +// return authorFullName; +// } +// +// public void setAuthorFullName(String authorFullName) { +// this.authorFullName = authorFullName; +// } +// +// public List getGroups() { +// return groups; +// } +// +// public void setGroups(List groups) { +// this.groups = groups; +// } +// +// public List getTagsVocabulary() { +// return tagsVocabulary; +// } +// +// public void setTagsVocabulary(List tagsVocabulary) { +// this.tagsVocabulary = tagsVocabulary; +// } +// +// public List getGroupsForceCreation() { +// return groupsForceCreation; +// } +// +// public void setGroupsForceCreation(List groupsForceCreation) { +// this.groupsForceCreation = groupsForceCreation; +// } +// +// @Override +// public String toString() { +// return "DatasetBean [" +// + (id != null ? "id=" + id + ", " : "") +// + (title != null ? "title=" + title + ", " : "") +// + (description != null ? "description=" + description + ", " +// : "") +// + (license != null ? "license=" + license + ", " : "") +// + (source != null ? "source=" + source + ", " : "") +// + (authorName != null ? "authorName=" + authorName + ", " : "") +// + (authorSurname != null ? "authorSurname=" + authorSurname +// + ", " : "") +// + (authorFullName != null ? "authorFullName=" + authorFullName +// + ", " : "") +// + (authorEmail != null ? "authorEmail=" + authorEmail + ", " +// : "") +// + (maintainer != null ? "maintainer=" + maintainer + ", " : "") +// + (maintainerEmail != null ? "maintainerEmail=" +// + maintainerEmail + ", " : "") +// + (ownerIdentifier != null ? "ownerIdentifier=" +// + ownerIdentifier + ", " : "") +// + (chosenType != null ? "chosenType=" + chosenType + ", " : "") +// + (selectedOrganization != null ? "selectedOrganization=" +// + selectedOrganization + ", " : "") +// + "version=" +// + version +// + ", visible=" +// + visible +// + ", " +// + (organizationList != null ? "organizationList=" +// + organizationList + ", " : "") +// + (resourceRoot != null ? "resourceRoot=" + resourceRoot + ", " +// : "") +// + (metadataList != null ? "metadataList=" + metadataList + ", " +// : "") +// + (tags != null ? "tags=" + tags + ", " : "") +// + (tagsVocabulary != null ? "tagsVocabulary=" + tagsVocabulary +// + ", " : "") +// + (customFields != null ? "customFields=" + customFields + ", " +// : "") +// + (groups != null ? "groups=" + groups + ", " : "") +// + (groupsForceCreation != null ? "groupsForceCreation=" +// + groupsForceCreation : "") + "]"; +// } +// +//} \ No newline at end of file