From 1f5da4f93703b00be31b26ff066dcdd64d10001c Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 2 Feb 2024 17:09:09 +0100 Subject: [PATCH 01/37] In progress: implement the Edit facility #26640 --- CHANGELOG.md | 5 +- pom.xml | 7 +- .../CKanMetadataPublisher.gwt.xml | 25 +- .../client/CKanMetadataPublisher.java | 15 +- .../client/CKanPublisherService.java | 4 +- .../client/CKanPublisherServiceAsync.java | 4 +- .../client/ui/form/CreateDatasetForm.java | 58 +- .../client/ui/form/MetaDataField.java | 324 +-- .../client/ui/metadata/CategoryPanel.java | 160 +- .../client/ui/metadata/CategoryPanel.ui.xml | 6 +- .../ui/metadata/CustomFieldEntry.ui.xml | 4 +- .../ui/metadata/MetaDataFieldSkeleton.java | 1810 ++++++++--------- .../ui/metadata/MetaDataFieldSkeleton.ui.xml | 6 +- .../metadata/timeandreanges/DataTimeBox.java | 276 +-- .../timeandreanges/DataTimeBox.ui.xml | 4 +- .../ui/resources/AddResourceContainer.java | 74 +- .../ui/resources/AddResourceContainer.ui.xml | 6 +- .../ui/resources/AddResourceToDataset.java | 2 +- .../ui/resources/AddResourceToDataset.ui.xml | 8 +- .../ui/resources/AddedResourcesSummary.java | 320 +-- .../ui/resources/AddedResourcesSummary.ui.xml | 4 +- .../client/ui/tags/TagsPanel.java | 558 ++--- .../client/ui/tags/TagsPanel.ui.xml | 4 +- .../client/ui/utils/GcubeDialogExtended.java | 310 +-- .../client/ui/utils/InfoIconsLabels.java | 2 + .../client/ui/utils/LoaderIcon.java | 124 +- .../server/CKANPublisherServicesImpl.java | 4 +- .../server/utils/MetadataDiscovery.java | 14 +- .../shared/DatasetBean.java | 2 +- .../shared/licenses/LicenseBean.java | 104 +- .../shared/metadata/CategoryWrapper.java | 154 +- .../shared/metadata/DataTypeWrapper.java | 52 +- .../shared/metadata/FieldAsGroup.java | 124 +- .../shared/metadata/FieldAsTag.java | 124 +- .../shared/metadata/MetaDataProfileBean.java | 176 +- .../shared/metadata/MetadataFieldWrapper.java | 682 +++---- .../shared/metadata/TaggingGroupingValue.java | 132 +- src/main/webapp/WEB-INF/web.xml | 12 + .../TestPublishingWidget.java | 1 - 39 files changed, 2871 insertions(+), 2830 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5154fba..3c4f100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +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.3-SNAPSHOT] - 2023-07-25 +## [v2.2.0-SNAPSHOT] - 2024-02-02 **Enhancement** -- [#25433] Added spinner during resource creation +- Implemented the Edit facility [#26640] +- Added spinner during resource creation [#25433] ## [v2.1.2] - 2023-03-10 diff --git a/pom.xml b/pom.xml index 36790ff..37f6994 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.widgets ckan-metadata-publisher-widget - 2.1.3-SNAPSHOT + 2.2.0-SNAPSHOT gCube Ckan metadata publisher widget @@ -94,6 +94,11 @@ portal-manager provided + + org.gcube.portlets.widgets + metadata-profile-form-builder-widget + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) + org.gcube.data-catalogue gcubedatacatalogue-metadata-discovery diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/CKanMetadataPublisher.gwt.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/CKanMetadataPublisher.gwt.xml index 55363b4..cf4f3cf 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/CKanMetadataPublisher.gwt.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/CKanMetadataPublisher.gwt.xml @@ -6,17 +6,26 @@ - - + + - - - - + + - + - + + + + + profiles = receivedBean.getMetadataList(); @@ -797,7 +808,7 @@ public class CreateDatasetForm extends Composite { receivedBean.setChosenType(null); } else { receivedBean.setChosenType(selectedItemText); - addFields(selectedItemText); + addFields(selectedItemText, operation); } } }); @@ -835,7 +846,7 @@ public class CreateDatasetForm extends Composite { * * @param selectedItem */ - protected void addFields(String selectedItem) { + protected void addFields(String selectedItem, OPERATION operation) { for (MetaDataProfileBean bean : receivedBean.getMetadataList()) { if (bean.getType().equals(selectedItem)) { @@ -860,7 +871,7 @@ public class CreateDatasetForm extends Composite { MetaDataField fieldWidget; try { - fieldWidget = new MetaDataField(field, eventBus); + fieldWidget = new MetaDataField(field, eventBus, operation); metadataFieldsPanel.add(fieldWidget); listOfMetadataFields.add(fieldWidget); } catch (Exception e) { @@ -891,7 +902,7 @@ public class CreateDatasetForm extends Composite { MetaDataField fieldWidget; try { - fieldWidget = new MetaDataField(metadataFieldWrapper, eventBus); + fieldWidget = new MetaDataField(metadataFieldWrapper, eventBus, operation); cp.addField(fieldWidget); listOfMetadataFields.add(fieldWidget); } catch (Exception e) { @@ -915,7 +926,7 @@ public class CreateDatasetForm extends Composite { MetaDataField fieldWidget; try { - fieldWidget = new MetaDataField(field, eventBus); + fieldWidget = new MetaDataField(field, eventBus, operation); extrasCategory.addField(fieldWidget); listOfMetadataFields.add(fieldWidget); } catch (Exception e) { @@ -1273,6 +1284,7 @@ public class CreateDatasetForm extends Composite { tabPanel.setWidth("100%"); // add the form + resourceForm = new AddResourceToDataset(eventBus, createdDatasetBean.getId(), createdDatasetBean.getTitle(), createdDatasetBean.getSelectedOrganization(), owner, datasetUrl); @@ -1615,7 +1627,7 @@ public class CreateDatasetForm extends Composite { // disable profile fields for (MetaDataField metaField : listOfMetadataFields) { for (MetaDataFieldSkeleton field : metaField.getListOfMetadataFields()) { - field.freeze(); + field.freeze(true); } } diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/MetaDataField.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/MetaDataField.java index 69015ca..24c4bfc 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/MetaDataField.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/form/MetaDataField.java @@ -1,162 +1,162 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form; - -import java.util.ArrayList; -import java.util.List; - -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.MetaDataFieldSkeleton; -import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.MetadataFieldWrapper; - -import com.github.gwtbootstrap.client.ui.Button; -import com.github.gwtbootstrap.client.ui.Label; -import com.github.gwtbootstrap.client.ui.constants.LabelType; -import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.shared.HandlerManager; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; - - -/** - * The Class MetaDataField. - * - * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) - * - * Jun 10, 2019 - */ -public class MetaDataField extends Composite { - - private static MetaDataFieldUiBinder uiBinder = GWT.create(MetaDataFieldUiBinder.class); - - @UiField VerticalPanel panelMetaDataFieldsSkeleton; - - @UiField Label repeatabilityLabel; - - //@UiField ControlGroup cgMetaDataFieldSkeletonFields; - - @UiField Button addFieldButton; - - @UiField Button removeFieldButton; - - private List listOfMetadataFields = new ArrayList(); - - private MetadataFieldWrapper fieldWrapper; - - private HandlerManager eventBus; - - /** - * The Interface MetaDataFieldUiBinder. - * - * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) - * - * Jun 10, 2019 - */ - interface MetaDataFieldUiBinder extends UiBinder { - } - - - /** - * Instantiates a new meta data field. - * - * @param field the field - * @param eventBus the event bus - * @throws Exception the exception - */ - public MetaDataField(final MetadataFieldWrapper field, HandlerManager eventBus) throws Exception { - initWidget(uiBinder.createAndBindUi(this)); - this.fieldWrapper = field; - this.eventBus = eventBus; - addNewOccurrenceOfField(); - checkAllowedAddField(); - checkAllowedRemoveField(); - - addFieldButton.addClickHandler(new ClickHandler() { - - @Override - public void onClick(ClickEvent event) { - addNewOccurrenceOfField(); - checkAllowedAddField(); - checkAllowedRemoveField(); - } - }); - - removeFieldButton.addClickHandler(new ClickHandler() { - - @Override - public void onClick(ClickEvent event) { - removeLatestOccurrenceOfFiled(); - checkAllowedAddField(); - checkAllowedRemoveField(); - } - }); - - //The field is repeatable - if(field.getMaxOccurs()>1) { - repeatabilityLabel.setVisible(true); - repeatabilityLabel.setType(LabelType.INFO); - addFieldButton.setTitle("Add another "+field.getFieldName()); - removeFieldButton.setTitle("Remove latest "+field.getFieldName()); -// String maxTxt = field.getMaxOccurs()==Integer.MAX_VALUE?"":"(max occurs declared are "+field.getMaxOccurs()+" times)"; - } - } - - - /** - * Check allowed remove field. - */ - private void checkAllowedRemoveField() { - boolean removeCond = fieldWrapper.getMaxOccurs()>1 && listOfMetadataFields.size()>1; - removeFieldButton.setVisible(removeCond); - } - - /** - * Checks if is allowed add occurrence. - */ - private void checkAllowedAddField() { - - boolean repeatibilityCond = fieldWrapper.getMaxOccurs()>1 && listOfMetadataFields.size() getListOfMetadataFields() { - return listOfMetadataFields; - } - -} +//package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form; +// +//import java.util.ArrayList; +//import java.util.List; +// +//import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.MetaDataFieldSkeleton; +//import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.MetadataFieldWrapper; +// +//import com.github.gwtbootstrap.client.ui.Button; +//import com.github.gwtbootstrap.client.ui.Label; +//import com.github.gwtbootstrap.client.ui.constants.LabelType; +//import com.google.gwt.core.client.GWT; +//import com.google.gwt.event.dom.client.ClickEvent; +//import com.google.gwt.event.dom.client.ClickHandler; +//import com.google.gwt.event.shared.HandlerManager; +//import com.google.gwt.uibinder.client.UiBinder; +//import com.google.gwt.uibinder.client.UiField; +//import com.google.gwt.user.client.ui.Composite; +//import com.google.gwt.user.client.ui.VerticalPanel; +//import com.google.gwt.user.client.ui.Widget; +// +// +///** +// * The Class MetaDataField. +// * +// * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) +// * +// * Jun 10, 2019 +// */ +//public class MetaDataField extends Composite { +// +// private static MetaDataFieldUiBinder uiBinder = GWT.create(MetaDataFieldUiBinder.class); +// +// @UiField VerticalPanel panelMetaDataFieldsSkeleton; +// +// @UiField Label repeatabilityLabel; +// +// //@UiField ControlGroup cgMetaDataFieldSkeletonFields; +// +// @UiField Button addFieldButton; +// +// @UiField Button removeFieldButton; +// +// private List listOfMetadataFields = new ArrayList(); +// +// private MetadataFieldWrapper fieldWrapper; +// +// private HandlerManager eventBus; +// +// /** +// * The Interface MetaDataFieldUiBinder. +// * +// * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) +// * +// * Jun 10, 2019 +// */ +// interface MetaDataFieldUiBinder extends UiBinder { +// } +// +// +// /** +// * Instantiates a new meta data field. +// * +// * @param field the field +// * @param eventBus the event bus +// * @throws Exception the exception +// */ +// public MetaDataField(final MetadataFieldWrapper field, HandlerManager eventBus) throws Exception { +// initWidget(uiBinder.createAndBindUi(this)); +// this.fieldWrapper = field; +// this.eventBus = eventBus; +// addNewOccurrenceOfField(); +// checkAllowedAddField(); +// checkAllowedRemoveField(); +// +// addFieldButton.addClickHandler(new ClickHandler() { +// +// @Override +// public void onClick(ClickEvent event) { +// addNewOccurrenceOfField(); +// checkAllowedAddField(); +// checkAllowedRemoveField(); +// } +// }); +// +// removeFieldButton.addClickHandler(new ClickHandler() { +// +// @Override +// public void onClick(ClickEvent event) { +// removeLatestOccurrenceOfFiled(); +// checkAllowedAddField(); +// checkAllowedRemoveField(); +// } +// }); +// +// //The field is repeatable +// if(field.getMaxOccurs()>1) { +// repeatabilityLabel.setVisible(true); +// repeatabilityLabel.setType(LabelType.INFO); +// addFieldButton.setTitle("Add another "+field.getFieldName()); +// removeFieldButton.setTitle("Remove latest "+field.getFieldName()); +//// String maxTxt = field.getMaxOccurs()==Integer.MAX_VALUE?"":"(max occurs declared are "+field.getMaxOccurs()+" times)"; +// } +// } +// +// +// /** +// * Check allowed remove field. +// */ +// private void checkAllowedRemoveField() { +// boolean removeCond = fieldWrapper.getMaxOccurs()>1 && listOfMetadataFields.size()>1; +// removeFieldButton.setVisible(removeCond); +// } +// +// /** +// * Checks if is allowed add occurrence. +// */ +// private void checkAllowedAddField() { +// +// boolean repeatibilityCond = fieldWrapper.getMaxOccurs()>1 && listOfMetadataFields.size() getListOfMetadataFields() { +// return listOfMetadataFields; +// } +// +//} diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java index 4e5326b..cf34c34 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.java @@ -1,80 +1,80 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; - -import java.util.ArrayList; -import java.util.List; - -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.MetaDataField; - -import com.github.gwtbootstrap.client.ui.PageHeader; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Style.Float; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; - -public class CategoryPanel extends Composite{ - - private static CategoryPanelUiBinder uiBinder = GWT - .create(CategoryPanelUiBinder.class); - - interface CategoryPanelUiBinder extends UiBinder { - } - - @UiField VerticalPanel fieldsPanel; - @UiField PageHeader categoryHeader; - //private List fieldsForThisCategory; - - private List fieldsForThisCategory; - - public CategoryPanel() { - initWidget(uiBinder.createAndBindUi(this)); - } - - /** - * - * @param fieldsForThisCategory - * @param title - * @param description - */ - public CategoryPanel(String title, String description) { - initWidget(uiBinder.createAndBindUi(this)); - title = title == null ? "" : title; - description = description == null ? "" : description; - categoryHeader.setTitle(title); - categoryHeader.setText(title); - categoryHeader.setSubtext(description); - categoryHeader.getElement().getStyle().setFloat(Float.LEFT); - } - - /** - * Add a field to this widget - * @param fieldWidget - */ - /*public void addField(MetaDataFieldSkeleton fieldWidget) { - if(fieldsForThisCategory == null){ - fieldsForThisCategory = new ArrayList(); - fieldWidget.setVisible(true); - fieldsPanel.setVisible(true); - } - fieldsForThisCategory.add(fieldWidget); - fieldsPanel.add(fieldWidget); - }*/ - - - /** - * Add a field to this widget - * @param fieldWidget - */ - public void addField(MetaDataField fieldWidget) { - if(fieldsForThisCategory == null){ - fieldsForThisCategory = new ArrayList(); - fieldWidget.setVisible(true); - fieldsPanel.setVisible(true); - } - fieldsForThisCategory.add(fieldWidget); - fieldsPanel.add(fieldWidget); - } - -} +//package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; +// +//import java.util.ArrayList; +//import java.util.List; +// +//import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.form.MetaDataField; +// +//import com.github.gwtbootstrap.client.ui.PageHeader; +//import com.google.gwt.core.client.GWT; +//import com.google.gwt.dom.client.Style.Float; +//import com.google.gwt.uibinder.client.UiBinder; +//import com.google.gwt.uibinder.client.UiField; +//import com.google.gwt.user.client.ui.Composite; +//import com.google.gwt.user.client.ui.VerticalPanel; +//import com.google.gwt.user.client.ui.Widget; +// +//public class CategoryPanel extends Composite{ +// +// private static CategoryPanelUiBinder uiBinder = GWT +// .create(CategoryPanelUiBinder.class); +// +// interface CategoryPanelUiBinder extends UiBinder { +// } +// +// @UiField VerticalPanel fieldsPanel; +// @UiField PageHeader categoryHeader; +// //private List fieldsForThisCategory; +// +// private List fieldsForThisCategory; +// +// public CategoryPanel() { +// initWidget(uiBinder.createAndBindUi(this)); +// } +// +// /** +// * +// * @param fieldsForThisCategory +// * @param title +// * @param description +// */ +// public CategoryPanel(String title, String description) { +// initWidget(uiBinder.createAndBindUi(this)); +// title = title == null ? "" : title; +// description = description == null ? "" : description; +// categoryHeader.setTitle(title); +// categoryHeader.setText(title); +// categoryHeader.setSubtext(description); +// categoryHeader.getElement().getStyle().setFloat(Float.LEFT); +// } +// +// /** +// * Add a field to this widget +// * @param fieldWidget +// */ +// /*public void addField(MetaDataFieldSkeleton fieldWidget) { +// if(fieldsForThisCategory == null){ +// fieldsForThisCategory = new ArrayList(); +// fieldWidget.setVisible(true); +// fieldsPanel.setVisible(true); +// } +// fieldsForThisCategory.add(fieldWidget); +// fieldsPanel.add(fieldWidget); +// }*/ +// +// +// /** +// * Add a field to this widget +// * @param fieldWidget +// */ +// public void addField(MetaDataField fieldWidget) { +// if(fieldsForThisCategory == null){ +// fieldsForThisCategory = new ArrayList(); +// fieldWidget.setVisible(true); +// fieldsPanel.setVisible(true); +// } +// fieldsForThisCategory.add(fieldWidget); +// fieldsPanel.add(fieldWidget); +// } +// +//} diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml index 68e9845..ef8a2d0 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CategoryPanel.ui.xml @@ -1,12 +1,12 @@ - + + Here will be placed the metadata fields formats - \ No newline at end of file + --> \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml index 780c41a..66c05ca 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/CustomFieldEntry.ui.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java index 3eb43ca..1da9a21 100644 --- a/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java +++ b/src/main/java/org/gcube/portlets/widgets/ckandatapublisherwidget/client/ui/metadata/MetaDataFieldSkeleton.java @@ -1,906 +1,906 @@ -package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata; - -import java.util.ArrayList; -import java.util.List; - -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEvent; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.events.CloseCreationFormEventHandler; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.openlayerwidget.GeoJsonAreaSelectionDialog; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.metadata.timeandreanges.DataTimeBox; -import org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.utils.GcubeDialogExtended; -import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.FieldAsGroup; -import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.FieldAsTag; -import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.MetadataFieldWrapper; -import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.metadata.TaggingGroupingValue; - -import com.github.gwtbootstrap.client.ui.Alert; -import com.github.gwtbootstrap.client.ui.Button; -import com.github.gwtbootstrap.client.ui.CheckBox; -import com.github.gwtbootstrap.client.ui.ControlGroup; -import com.github.gwtbootstrap.client.ui.ControlLabel; -import com.github.gwtbootstrap.client.ui.Controls; -import com.github.gwtbootstrap.client.ui.Icon; -import com.github.gwtbootstrap.client.ui.ListBox; -import com.github.gwtbootstrap.client.ui.Popover; -import com.github.gwtbootstrap.client.ui.TextArea; -import com.github.gwtbootstrap.client.ui.TextBox; -import com.github.gwtbootstrap.client.ui.constants.AlertType; -import com.github.gwtbootstrap.client.ui.constants.ControlGroupType; -import com.github.gwtbootstrap.client.ui.constants.IconType; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.SpanElement; -import com.google.gwt.dom.client.Style.Cursor; -import com.google.gwt.dom.client.Style.Display; -import com.google.gwt.dom.client.Style.Unit; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.logical.shared.ResizeEvent; -import com.google.gwt.event.logical.shared.ResizeHandler; -import com.google.gwt.event.shared.HandlerManager; -import com.google.gwt.uibinder.client.UiBinder; -import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.uibinder.client.UiHandler; -import com.google.gwt.user.client.Command; -import com.google.gwt.user.client.Window; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.FlowPanel; -import com.google.gwt.user.client.ui.FocusPanel; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; - -public class MetaDataFieldSkeleton extends Composite{ - - private static MetaDataFieldSkeletonUiBinder uiBinder = GWT - .create(MetaDataFieldSkeletonUiBinder.class); - - interface MetaDataFieldSkeletonUiBinder extends - UiBinder { - } - - @UiField Element mandatorySymbol; - @UiField SpanElement name; - @UiField SimplePanel elementPanel; - @UiField FlowPanel noteFieldContainer; - @UiField Popover noteFieldPopover; - @UiField ControlLabel controlLabel; - @UiField Controls controls; - @UiField Icon infoIcon; - @UiField FocusPanel focusPanelIconContainer; - @UiField ControlGroup metafieldControlGroup; - - // private static final String REGEX_IS_NUMBER = "[0-9]+[.]?[0-9]+"; - - // the element that holds the value (it could be a checkbox, textbox or listbox, textarea, calendar, two calendars, more calendars) - private Widget holder; - - // the field this object represents - private MetadataFieldWrapper field; - - // the dialog box for this metadata - private GcubeDialogExtended dialog; - - // range list - private List rangesList = new ArrayList(); - - private List