Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@111756 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-02-06 09:25:59 +00:00
parent 3e241e25e7
commit cb365a5a61
3 changed files with 63 additions and 78 deletions

View File

@ -30,7 +30,33 @@ public enum ColumnDataType {
return id;
}
public static ColumnDataType getColumnDataTypeFromId(String id){
if(id.compareTo(Boolean.id)==0){
return Boolean;
} else {
if(id.compareTo(Geometry.id)==0){
return Geometry;
} else {
if(id.compareTo(Integer.id)==0){
return Integer;
} else {
if(id.compareTo(Numeric.id)==0){
return Numeric;
} else {
if(id.compareTo(Date.id)==0){
return Date;
} else {
if(id.compareTo(Text.id)==0){
return Text;
} else {
return null;
}
}
}
}
}
}
}
}

View File

@ -1,6 +1,5 @@
package org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column;
/**
*
* @author "Giancarlo Panichi" <a
@ -50,4 +49,40 @@ public enum ColumnTypeCode {
}
public static ColumnTypeCode getColumnTypeCodeFromId(String id) {
if (id.compareTo(ANNOTATION.id) == 0) {
return ANNOTATION;
} else {
if (id.compareTo(ATTRIBUTE.id) == 0) {
return ATTRIBUTE;
} else {
if (id.compareTo(CODE.id) == 0) {
return CODE;
} else {
if (id.compareTo(CODEDESCRIPTION.id) == 0) {
return CODEDESCRIPTION;
} else {
if (id.compareTo(CODENAME.id) == 0) {
return CODENAME;
} else {
if (id.compareTo(DIMENSION.id) == 0) {
return DIMENSION;
} else {
if (id.compareTo(MEASURE.id) == 0) {
return MEASURE;
} else {
if (id.compareTo(TIMEDIMENSION.id) == 0) {
return TIMEDIMENSION;
} else {
return null;
}
}
}
}
}
}
}
}
}
}

View File

@ -1,76 +0,0 @@
package org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnTypeMap {
public static ColumnDataType getColumnDataType(String id){
if(id.compareTo(ColumnDataType.Integer.toString())==0){
return ColumnDataType.Integer;
} else {
if(id.compareTo(ColumnDataType.Geometry.toString())==0){
return ColumnDataType.Geometry;
} else {
if(id.compareTo(ColumnDataType.Boolean.toString())==0){
return ColumnDataType.Boolean;
} else {
if(id.compareTo(ColumnDataType.Numeric.toString())==0){
return ColumnDataType.Numeric;
} else {
if(id.compareTo(ColumnDataType.Date.toString())==0){
return ColumnDataType.Date;
} else {
if(id.compareTo(ColumnDataType.Text.toString())==0){
return ColumnDataType.Text;
} else {
return null;
}
}
}
}
}
}
}
public static ColumnTypeCode getColumnTypeCode(String id){
if(id.compareTo(ColumnTypeCode.ANNOTATION.toString())==0){
return ColumnTypeCode.ANNOTATION;
} else {
if(id.compareTo(ColumnTypeCode.ATTRIBUTE.toString())==0){
return ColumnTypeCode.ATTRIBUTE;
} else {
if(id.compareTo(ColumnTypeCode.MEASURE.toString())==0){
return ColumnTypeCode.MEASURE;
} else {
if(id.compareTo(ColumnTypeCode.CODE.toString())==0){
return ColumnTypeCode.CODE;
} else {
if(id.compareTo(ColumnTypeCode.CODENAME.toString())==0){
return ColumnTypeCode.CODENAME;
} else {
if(id.compareTo(ColumnTypeCode.CODEDESCRIPTION.toString())==0){
return ColumnTypeCode.CODEDESCRIPTION;
} else {
if(id.compareTo(ColumnTypeCode.DIMENSION.toString())==0){
return ColumnTypeCode.DIMENSION;
} else {
if(id.compareTo(ColumnTypeCode.TIMEDIMENSION.toString())==0){
return ColumnTypeCode.TIMEDIMENSION;
} else {
return null;
}
}
}
}
}
}
}
}
}
}