git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@90467 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-01-24 10:36:24 +00:00
parent e4795d14dc
commit 0a03a28480
2 changed files with 0 additions and 154 deletions

View File

@ -1,57 +0,0 @@
package org.gcube.portlets.user.td.widgetcommonevent.shared.column;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
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<ColumnDataType> getColumnDataTypes(){
List<ColumnDataType> types=new ArrayList<ColumnDataType>();
types.add(Boolean);
types.add(Geometry);
types.add(Integer);
types.add(Numeric);
types.add(Text);
return types;
}
public List<String> getColumnDataTypesAsString(){
List<String> types=new ArrayList<String>();
types.add(Boolean.toString());
types.add(Geometry.toString());
types.add(Integer.toString());
types.add(Numeric.toString());
types.add(Text.toString());
return types;
}
}

View File

@ -1,97 +0,0 @@
package org.gcube.portlets.user.td.widgetcommonevent.shared.column;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
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 String getColumnTypeCodeLabel() {
switch (this) {
case ANNOTATION:
return "Annotation";
case ATTRIBUTE:
return "Attribute";
case CODE:
return "Code";
case CODEDESCRIPTION:
return "Code Description";
case CODENAME:
return "Code Name";
case DIMENSION:
return "Dimension";
case MEASURE:
return "Measure";
case TIMEDIMENSION:
return "Time Dimension";
default:
return null;
}
}
public List<ColumnTypeCode> getColumnTypesCode() {
List<ColumnTypeCode> types = new ArrayList<ColumnTypeCode>();
types.add(ANNOTATION);
types.add(ATTRIBUTE);
types.add(CODE);
types.add(CODEDESCRIPTION);
types.add(CODENAME);
types.add(DIMENSION);
types.add(MEASURE);
types.add(TIMEDIMENSION);
return types;
}
public List<String> getColumnTypesCodeAsString() {
List<String> types = new ArrayList<String>();
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<String> getColumnTypesCodeLabels() {
List<String> types = new ArrayList<String>();
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;
}
}