updated date format
This commit is contained in:
parent
b6d6d07aa7
commit
0ef68513b4
|
@ -20,6 +20,10 @@ public class ConstantsMPFormBuilder {
|
||||||
|
|
||||||
public static final int LIMIT_UPLOADS = 50;
|
public static final int LIMIT_UPLOADS = 50;
|
||||||
|
|
||||||
|
public static final String DATE_FORMAT = "yyyy-MM-dd";
|
||||||
|
|
||||||
|
public static final String TIME_FORMAT = "HH:mm";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log.
|
* Log.
|
||||||
*
|
*
|
||||||
|
|
|
@ -633,8 +633,8 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericDatasetBean gdb = new GenericDatasetBean();
|
GenericDatasetBean gdb = new GenericDatasetBean();
|
||||||
gdb.setMetadataList(metadataProfiles);
|
gdb.setMetadataProfileList(metadataProfiles);
|
||||||
gdb.setCustomFields(customFieldsMap);
|
gdb.setFormDataEntryFields(customFieldsMap);
|
||||||
gdb.setFilesUploaded(listFilesUploaded);
|
gdb.setFilesUploaded(listFilesUploaded);
|
||||||
formDataBean = gdb;
|
formDataBean = gdb;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.portlets.widgets.mpformbuilder.client.ui.timeandranges;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.gcube.portlets.widgets.mpformbuilder.client.ConstantsMPFormBuilder;
|
||||||
|
|
||||||
import com.github.gwtbootstrap.datepicker.client.ui.DateBox;
|
import com.github.gwtbootstrap.datepicker.client.ui.DateBox;
|
||||||
import com.github.gwtbootstrap.datetimepicker.client.ui.DateTimeBox;
|
import com.github.gwtbootstrap.datetimepicker.client.ui.DateTimeBox;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -32,8 +34,8 @@ public class DataTimeBox extends Composite{
|
||||||
private static final String INSERT_TIME_INSTANT_LABEL = "Hour and minutes";
|
private static final String INSERT_TIME_INSTANT_LABEL = "Hour and minutes";
|
||||||
private static final String INSERT_DATE_START_LABEL = "Insert a start date";
|
private static final String INSERT_DATE_START_LABEL = "Insert a start date";
|
||||||
private static final String INSERT_DATE_END_LABEL = "Insert an end date";
|
private static final String INSERT_DATE_END_LABEL = "Insert an end date";
|
||||||
private static final DateTimeFormat formatDate = DateTimeFormat.getFormat("yyyy-MM-dd");
|
private static final DateTimeFormat formatDate = DateTimeFormat.getFormat(ConstantsMPFormBuilder.DATE_FORMAT);
|
||||||
private static final DateTimeFormat formatTime = DateTimeFormat.getFormat("HH:mm");
|
private static final DateTimeFormat formatTime = DateTimeFormat.getFormat(ConstantsMPFormBuilder.TIME_FORMAT);
|
||||||
|
|
||||||
private boolean isRange;
|
private boolean isRange;
|
||||||
|
|
||||||
|
|
|
@ -13,18 +13,21 @@ import org.gcube.portlets.widgets.mpformbuilder.shared.upload.FileUploaded;
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
*
|
*
|
||||||
* Oct 8, 2020
|
* Oct 19, 2020
|
||||||
*/
|
*/
|
||||||
public class GenericDatasetBean implements Serializable {
|
public class GenericDatasetBean implements Serializable {
|
||||||
|
|
||||||
/**
|
/** The Constant serialVersionUID. */
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -5215392381589702647L;
|
private static final long serialVersionUID = -5215392381589702647L;
|
||||||
|
|
||||||
|
|
||||||
private List<MetaDataProfileBean> metadataList;
|
/** The metadata profile list. */
|
||||||
private Map<String, List<String>> customFields;
|
private List<MetaDataProfileBean> metadataProfileList;
|
||||||
|
|
||||||
|
/** The form data entry fields. */
|
||||||
|
private Map<String, List<String>> formDataEntryFields;
|
||||||
|
|
||||||
|
/** The files uploaded. */
|
||||||
private List<FileUploaded> filesUploaded;
|
private List<FileUploaded> filesUploaded;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,53 +37,91 @@ public class GenericDatasetBean implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public GenericDatasetBean(List<MetaDataProfileBean> metadataList, Map<String, List<String>> customFields,
|
/**
|
||||||
|
* Instantiates a new generic dataset bean.
|
||||||
|
*
|
||||||
|
* @param metadataProfileList the metadata profile list
|
||||||
|
* @param formDataEntryFields the form data entry fields
|
||||||
|
* @param filesUploaded the files uploaded
|
||||||
|
*/
|
||||||
|
public GenericDatasetBean(List<MetaDataProfileBean> metadataProfileList, Map<String, List<String>> formDataEntryFields,
|
||||||
List<FileUploaded> filesUploaded) {
|
List<FileUploaded> filesUploaded) {
|
||||||
super();
|
super();
|
||||||
this.metadataList = metadataList;
|
this.metadataProfileList = metadataProfileList;
|
||||||
this.customFields = customFields;
|
this.formDataEntryFields = formDataEntryFields;
|
||||||
this.filesUploaded = filesUploaded;
|
this.filesUploaded = filesUploaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<MetaDataProfileBean> getMetadataList() {
|
/**
|
||||||
return metadataList;
|
* Gets the metadata profile list.
|
||||||
}
|
*
|
||||||
|
* @return the metadata profile list
|
||||||
public void setMetadataList(List<MetaDataProfileBean> metadataList) {
|
*/
|
||||||
this.metadataList = metadataList;
|
public List<MetaDataProfileBean> getMetadataProfileList() {
|
||||||
}
|
return metadataProfileList;
|
||||||
|
|
||||||
public Map<String, List<String>> getCustomFields() {
|
|
||||||
return customFields;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCustomFields(Map<String, List<String>> customFields) {
|
|
||||||
this.customFields = customFields;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the metadata profile list.
|
||||||
|
*
|
||||||
|
* @param metadataProfileList the new metadata profile list
|
||||||
|
*/
|
||||||
|
public void setMetadataProfileList(List<MetaDataProfileBean> metadataProfileList) {
|
||||||
|
this.metadataProfileList = metadataProfileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the form data entry fields.
|
||||||
|
*
|
||||||
|
* @return the form data entry fields
|
||||||
|
*/
|
||||||
|
public Map<String, List<String>> getFormDataEntryFields() {
|
||||||
|
return formDataEntryFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the form data entry fields.
|
||||||
|
*
|
||||||
|
* @param formDataEntryFields the form data entry fields
|
||||||
|
*/
|
||||||
|
public void setFormDataEntryFields(Map<String, List<String>> formDataEntryFields) {
|
||||||
|
this.formDataEntryFields = formDataEntryFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the files uploaded.
|
||||||
|
*
|
||||||
|
* @return the files uploaded
|
||||||
|
*/
|
||||||
public List<FileUploaded> getFilesUploaded() {
|
public List<FileUploaded> getFilesUploaded() {
|
||||||
return filesUploaded;
|
return filesUploaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the files uploaded.
|
||||||
|
*
|
||||||
|
* @param filesUploaded the new files uploaded
|
||||||
|
*/
|
||||||
public void setFilesUploaded(List<FileUploaded> filesUploaded) {
|
public void setFilesUploaded(List<FileUploaded> filesUploaded) {
|
||||||
this.filesUploaded = filesUploaded;
|
this.filesUploaded = filesUploaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To string.
|
||||||
|
*
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
return "GenericDatasetBean [metadataProfileList=" + metadataProfileList + ", formDataEntryFields="
|
||||||
builder.append("GenericDatasetBean [metadataList=");
|
+ formDataEntryFields + ", filesUploaded=" + filesUploaded + "]";
|
||||||
builder.append(metadataList);
|
|
||||||
builder.append(", customFields=");
|
|
||||||
builder.append(customFields);
|
|
||||||
builder.append(", filesUploaded=");
|
|
||||||
builder.append(filesUploaded);
|
|
||||||
builder.append("]");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue