diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/ChangeTableRequestType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/ChangeTableRequestType.java index 6b3eba2..52ee690 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/ChangeTableRequestType.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/ChangeTableRequestType.java @@ -32,6 +32,7 @@ public enum ChangeTableRequestType { ROLLBACK, EDITROW, SHARE, + GEOSPATIALCREATECOORDINATES, TASKRESUME, TASKRESUBMIT, STATISTICALOPERATION; diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/RibbonType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/RibbonType.java index 18e0c77..3f1222f 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/RibbonType.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/RibbonType.java @@ -15,65 +15,67 @@ public enum RibbonType { CLOSE, DELETE, PROPERTIES, - IMPORTSDMX, - IMPORTCSV, - IMPORTJSON, - EXPORTSDMX, - EXPORTCSV, - EXPORTJSON, - TEMPLATEOPEN, - TEMPLATENEW, - TEMPLATEDELETE, + IMPORT_SDMX, + IMPORT_CSV, + IMPORT_JSON, + EXPORT_SDMX, + EXPORT_CSV, + EXPORT_JSON, + TEMPLATE_OPEN, + TEMPLATE_NEW, + TEMPLATE_DELETE, SHARE, TIMELINE, - BACKGROUNDTASKS, + BACKGROUND_TASKS, HISTORY, UNDO, - DISCARDALL, + DISCARD_ALL, LOGS, HELP, - RULENEW, - RULEMANAGE, - DUPLICATEDETECTION, - TEMPLATEAPPLY, - TABLETYPE, - COLUMNLABEL, - COLUMNTYPE, - COLUMNADD, - COLUMNDELETE, - COLUMNSPLIT, - COLUMNMERGE, + RULE_NEW, + RULE_MANAGE, + DUPLICATE_DETECTION, + TEMPLATE_APPLY, + TABLE_TYPE, + COLUMN_LABEL, + COLUMN_TYPE, + COLUMN_ADD, + COLUMN_DELETE, + COLUMN_SPLIT, + COLUMN_MERGE, DENORMALIZE, NORMALIZE, - EXTRACTCODELIST, - CODELISTMAPPING, - GENERATESUMMARY, - TABLEFILTER, - TABLEUNION, - TABLEGROUPBY, - TABLETIMEAGGREGATE, - TABLEREPLACEBYEXTERNALCOL, - TABLEAGGREAGETE, - ROWADD, - ROWDELETE, - DUPLICATEDELETE, - ANNOTATIONADD, - COLUMNFILTER, - COLUMNBATCHREPLACE, - ANALYSETABLEFILTER, - ANALYSETABLEUNION, - ANALYSETABLEGROUPBY, - ANALYSETABLEAGGREAGETE, - ANALYSEROWADD, - ANALYSEROWDELETE, - ANALYSEDUPLICATEDELETE, - ANALYSEANNOTATIONADD, - ANALYSECOLUMNFILTER, - ANALYSECOLUMNEDIT, - CHARTCREATE, - RSTUDIO, + EXTRACT_CODELIST, + CODELIST_MAPPING, + GENERATE_SUMMARY, + TABLE_FILTER, + TABLE_UNION, + TABLE_GROUPBY, + TABLE_TIME_AGGREGATE, + TABLE_REPLACE_BY_EXTERNAL_COL, + TABLE_AGGREAGETE, + ROW_ADD, + ROW_DELETE, + DUPLICATE_DELETE, + GEOSPATIAL_CSQUARE, + GEOSPATIAL_OCEAN_AREA, + ANNOTATION_ADD, + COLUMN_FILTER, + COLUMN_BATCH_REPLACE, + ANALYSE_TABLE_FILTER, + ANALYSE_TABLE_UNION, + ANALYSE_TABLE_GROUPBY, + ANALYSE_TABLE_AGGREAGETE, + ANALYSE_ROW_ADD, + ANALYSE_ROW_DELETE, + ANALYSE_DUPLICATE_DELETE, + ANALYSE_ANNOTATION_ADD, + ANALYSE_COLUMN_FILTER, + ANALYSE_COLUMN_EDIT, + CHART_CREATE, + R_STUDIO, STATISTICAL, SPREAD, - CREATEGISMAP; + CREATE_GIS_MAP; } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/WidgetRequestType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/WidgetRequestType.java index 070d02b..d65e5b8 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/WidgetRequestType.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/WidgetRequestType.java @@ -25,6 +25,7 @@ public enum WidgetRequestType { VALIDATIONSTASKSPANEL, CURATIONBYREPLACEBATCHDIALOG, MONITORBACKGROUNDPANEL, - RESOURCESPANEL; + RESOURCESPANEL, + GEOSPATIALCREATECOORDINATESPANEL; } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestProperties.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestProperties.java index 8e08886..2a35e3a 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestProperties.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestProperties.java @@ -12,22 +12,22 @@ public class RequestProperties implements Serializable { private static final long serialVersionUID = -3084969072634114974L; - HashMap map; + HashMap map; public RequestProperties(){ } - public RequestProperties(HashMap map){ + public RequestProperties(HashMap map){ this.map=map; } - public HashMap getMap() { + public HashMap getMap() { return map; } - public void setMap(HashMap map) { + public void setMap(HashMap map) { this.map = map; } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestPropertiesParameterType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestPropertiesParameterType.java new file mode 100644 index 0000000..9e47b81 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/RequestPropertiesParameterType.java @@ -0,0 +1,32 @@ +package org.gcube.portlets.user.td.widgetcommonevent.shared; + +/** + * + * @author giancarlo + * email: g.panichi@isti.cnr.it + * + */ +public enum RequestPropertiesParameterType { + Coordinates("Coordinates"), + InvocationS ("InvocationS"), + RefColumn("RefColumn"), + ColumnId("ColumnId"), + TaskId("TaskId"), + ConditionCode("ConditionCode"), + ValidationColumnColumnId("ValidationColumnColumnId"); + + /** + * @param text + */ + private RequestPropertiesParameterType(final String id) { + this.id = id; + } + + private final String id; + + @Override + public String toString() { + return id; + } + +} diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/geospatial/GeospatialCoordinatesType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/geospatial/GeospatialCoordinatesType.java index bc75abe..1dfdc3d 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/geospatial/GeospatialCoordinatesType.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/geospatial/GeospatialCoordinatesType.java @@ -1,5 +1,8 @@ package org.gcube.portlets.user.td.widgetcommonevent.shared.geospatial; +import java.util.Arrays; +import java.util.List; + /** * * @author "Giancarlo Panichi" getList(){ + return Arrays.asList(values()); + + } + public static GeospatialCoordinatesType getGeospatialCoordinatesTypeFromId( String id) { @@ -36,5 +45,19 @@ public enum GeospatialCoordinatesType { } } } - + + public String getLabel(){ + switch(this){ + case C_SQUARE: + return "C-Square"; + + case OCEAN_AREA: + return "Ocean Area"; + default: + return null; + + } + } + + } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/OperationsId.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/OperationsId.java index 827e84b..225e553 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/OperationsId.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/OperationsId.java @@ -123,10 +123,13 @@ public enum OperationsId { StatisticalOperation("10001"), ExportToStatisticalOperation("10002"), ImportFromStatistical("10003"), + CoordinatesEnhancement("10101"), ExtractCodelist("11001"), GuessCodelist("11002"), CodelistMappingImport("12001"); + + /** * @param text */ diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/UIOperationsId.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/UIOperationsId.java index ccd8c5a..1436a7b 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/UIOperationsId.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/operations/UIOperationsId.java @@ -49,6 +49,7 @@ public enum UIOperationsId { GenerateMap("Generate Map"), StatisticalOperation("Statistical Operation"), ChartTopRating("Top Rating Chart"), + GeospatialCreateCoordinates("Geospatial Create Coordinates"), Pending("Pending"); /** diff --git a/src/test/java/org/gcube/portlets/user/td/widgetcommonevent/client/GwtTestWidgetCommonEvent.java b/src/test/java/org/gcube/portlets/user/td/widgetcommonevent/client/GwtTestWidgetCommonEvent.java index 01505a6..7df440f 100644 --- a/src/test/java/org/gcube/portlets/user/td/widgetcommonevent/client/GwtTestWidgetCommonEvent.java +++ b/src/test/java/org/gcube/portlets/user/td/widgetcommonevent/client/GwtTestWidgetCommonEvent.java @@ -43,9 +43,9 @@ public class GwtTestWidgetCommonEvent extends GWTTestCase { } }); - eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTSDMX)); - eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTCSV)); - eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORTJSON)); + eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORT_SDMX)); + eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORT_CSV)); + eventBus.fireEvent(new RibbonEvent(RibbonType.IMPORT_JSON)); } @@ -54,13 +54,13 @@ public class GwtTestWidgetCommonEvent extends GWTTestCase { System.out.println("doRibbonCommand Type: " + event.getRibbonType()); try { switch (event.getRibbonType()) { - case IMPORTSDMX: + case IMPORT_SDMX: System.out.println("Start Import SDMX"); break; - case IMPORTCSV: + case IMPORT_CSV: System.out.println("Start Import CSV"); break; - case IMPORTJSON: + case IMPORT_JSON: System.out.println("Start Import JSON"); break; default: