diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnDataType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnDataType.java new file mode 100644 index 0000000..312d965 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnDataType.java @@ -0,0 +1,45 @@ +package org.gcube.portlets.user.td.widgetcommonevent.shared.column; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * + */ +public enum ColumnDataType { + Boolean("Boolean"), + Geometry("Geometry"), + Integer("Integer"), + Numeric("Numeric"), + Text("Text"); + + + /** + * @param text + */ + private ColumnDataType(final String id) { + this.id = id; + } + + private final String id; + + @Override + public String toString() { + return id; + } + + public List getColumnDataTypes(){ + List types=new ArrayList(); + types.add(Boolean.toString()); + types.add(Geometry.toString()); + types.add(Integer.toString()); + types.add(Numeric.toString()); + types.add(Text.toString()); + + return types; + } + +} diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnTypeCode.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnTypeCode.java new file mode 100644 index 0000000..7b34b8c --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/column/ColumnTypeCode.java @@ -0,0 +1,66 @@ +package org.gcube.portlets.user.td.widgetcommonevent.shared.column; + + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * + */ +public enum ColumnTypeCode { + ANNOTATION("ANNOTATION"), + ATTRIBUTE("ATTRIBUTE"), + CODE("CODE"), + CODEDESCRIPTION("CODEDESCRIPTION"), + CODENAME("CODENAME"), + DIMENSION("DIMENSION"), + MEASURE("MESAURE"), + TIMEDIMENSION("TIMEDIMENSION"); + + + /** + * @param text + */ + private ColumnTypeCode(final String id) { + this.id = id; + } + + private final String id; + + @Override + public String toString() { + return id; + } + + public List getColumnDataTypes(){ + List types=new ArrayList(); + types.add(ANNOTATION.toString()); + types.add(ATTRIBUTE.toString()); + types.add(CODE.toString()); + types.add(CODEDESCRIPTION.toString()); + types.add(CODENAME.toString()); + types.add(DIMENSION.toString()); + types.add(MEASURE.toString()); + types.add(TIMEDIMENSION.toString()); + + return types; + } + + public List getColumnDataTypesLabel(){ + List types=new ArrayList(); + types.add("Annotation"); + types.add("Attribute"); + types.add("Code"); + types.add("Code Description"); + types.add("Code Name"); + types.add("Dimension"); + types.add("Measure"); + types.add("Time Dimension"); + + return types; + } + +}