diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanMetadataPublisher.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanMetadataPublisher.java index 95942e5..f0a3493 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanMetadataPublisher.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanMetadataPublisher.java @@ -3,9 +3,9 @@ package org.gcube.portlets.widgets.ckandatapublisherwidget.client; import java.util.ArrayList; import java.util.List; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.CreateDatasetForm; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.MetaDataFieldSkeleton; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection.TwinColumnSelectionMainPanel; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.CreateDatasetForm; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.MetaDataFieldSkeleton; import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.ResourceElementBean; import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.MetadataFieldWrapper; @@ -227,10 +227,11 @@ public class CKanMetadataPublisher implements EntryPoint { } // test resources - TwinColumnSelectionMainPanel resourcesTwinPanel; - + @SuppressWarnings("unused") private void startTwinColumn() { + TwinColumnSelectionMainPanel resourcesTwinPanel; + Modal m = new Modal(); m.setTitle("Title ......"); m.setWidth("1200px"); diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanPublisherServiceAsync.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanPublisherServiceAsync.java index 5c576ac..29bce2b 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanPublisherServiceAsync.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/CKanPublisherServiceAsync.java @@ -91,8 +91,18 @@ public interface CKanPublisherServiceAsync { void isPublisherUser(boolean isWorkspaceRequest, AsyncCallback callback); + /** + * Get the list of vocabulary tags for this scope + * @param orgName + * @return + */ void getTagsForOrganization(String orgName, AsyncCallback> callback); + /** + * Validate a geo json field + * @param json + * @return + */ void isGeoJSONValid(String json, AsyncCallback callback); } diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/events/DeleteCustomFieldEvent.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/events/DeleteCustomFieldEvent.java index bf9287d..1111dbc 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/events/DeleteCustomFieldEvent.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/events/DeleteCustomFieldEvent.java @@ -1,5 +1,5 @@ package org.gcube.portlets.widgets.ckandatapublisherwidget.client.events; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.CustomFieldEntry; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.CustomFieldEntry; import com.google.gwt.event.shared.GwtEvent; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.java index 16a29bd..22fd71e 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form; import java.util.ArrayList; import java.util.HashMap; @@ -14,10 +14,13 @@ import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCre import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEvent; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEventHandler; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.TwinColumnSelection.TwinColumnSelectionMainPanel; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources.AddResourceContainer; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources.AddResourceToDataset; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources.AddedResourcesSummary; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources.TagsPanel; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.CategoryPanel; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.CustomFieldEntry; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.MetaDataFieldSkeleton; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.AddResourceContainer; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.AddResourceToDataset; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources.AddedResourcesSummary; +import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.tags.TagsPanel; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.utils.InfoIconsLabels; import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.DatasetBean; import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.ui.xml similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.ui.xml index fc82563..22a017f 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CreateDatasetForm.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/CreateDatasetForm.ui.xml @@ -1,7 +1,7 @@ + xmlns:m="urn:import:org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.tags"> .form-main-style { margin-left: 10px; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CategoryPanel.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CategoryPanel.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java index 8351e03..3552e69 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CategoryPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CategoryPanel.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CategoryPanel.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CustomFieldEntry.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CustomFieldEntry.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.java index 45a7ff1..ff7cf00 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CustomFieldEntry.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.DeleteCustomFieldEvent; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CustomFieldEntry.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/CustomFieldEntry.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java index cffd397..fafadbc 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/MetaDataFieldSkeleton.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceContainer.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceContainer.java similarity index 97% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceContainer.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceContainer.java index 8ab89a5..a5a72f2 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceContainer.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceContainer.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources; import com.github.gwtbootstrap.client.ui.TabPanel; import com.google.gwt.core.client.GWT; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceContainer.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceContainer.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceContainer.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceContainer.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceToDataset.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceToDataset.java index 20f4fd9..5347002 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceToDataset.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.CKanPublisherService; import org.gcube.portlets.widgets.ckandatapublisherwidget.client.CKanPublisherServiceAsync; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceToDataset.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddResourceToDataset.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddResourceToDataset.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddedResourcesSummary.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddedResourcesSummary.java similarity index 99% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddedResourcesSummary.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddedResourcesSummary.java index fc8db81..33e1ecc 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddedResourcesSummary.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddedResourcesSummary.java @@ -1,4 +1,4 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.resources; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddedResourcesSummary.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddedResourcesSummary.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/AddedResourcesSummary.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/resources/AddedResourcesSummary.ui.xml diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/TagsPanel.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/tags/TagsPanel.java similarity index 96% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/TagsPanel.java rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/tags/TagsPanel.java index b6e5c75..7ba74f9 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/TagsPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/tags/TagsPanel.java @@ -1,4 +1,5 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.dataset.resources; +package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.tags; + import java.util.ArrayList; import java.util.List; @@ -26,6 +27,10 @@ import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.FocusPanel; import com.google.gwt.user.client.ui.Widget; +/** + * Panel for tags. + * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) + */ public class TagsPanel extends Composite{ private static TagsPanelUiBinder uiBinder = GWT @@ -42,9 +47,8 @@ public class TagsPanel extends Composite{ @UiField ControlGroup tagsInsertGroup; @UiField ListBox tagsEnterListBox; - // regular expression for tags - private static final String REGEX_TAG = "^[a-zA-Z0-9_\\-.]*$"; + private static final String REGEX_TAG = "^[a-zA-Z0-9]*$"; // tags list private List tagsList = new ArrayList(); @@ -54,6 +58,8 @@ public class TagsPanel extends Composite{ public TagsPanel() { initWidget(uiBinder.createAndBindUi(this)); tagsEnterListBox.setVisible(false); + tagsPanel.clear(); + tagsList.clear(); } @@ -78,6 +84,8 @@ public class TagsPanel extends Composite{ tagsEnterListBox.setVisible(true); } + tagsPanel.clear(); + tagsList.clear(); } /** @@ -269,4 +277,4 @@ public class TagsPanel extends Composite{ tagsInsertGroup.setType(type); } -} +} \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/TagsPanel.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/tags/TagsPanel.ui.xml similarity index 100% rename from src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/dataset/resources/TagsPanel.ui.xml rename to src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/tags/TagsPanel.ui.xml