Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@90544 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fe65f26a20
commit
884e96a2a3
|
@ -4,7 +4,6 @@ import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,4 +40,41 @@ public class ColumnDataTypeStore implements Serializable {
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ArrayList<ColumnDataTypeElement> getAttributeType(){
|
||||||
|
store=new ArrayList<ColumnDataTypeElement>();
|
||||||
|
store.add(new ColumnDataTypeElement(1,ColumnDataType.Integer));
|
||||||
|
store.add(new ColumnDataTypeElement(2,ColumnDataType.Numeric));
|
||||||
|
store.add(new ColumnDataTypeElement(3,ColumnDataType.Boolean));
|
||||||
|
store.add(new ColumnDataTypeElement(4,ColumnDataType.Geometry));
|
||||||
|
store.add(new ColumnDataTypeElement(5,ColumnDataType.Text));
|
||||||
|
|
||||||
|
return store;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int selectedAttribute(String selected){
|
||||||
|
int position=0;
|
||||||
|
if(selected.compareTo(ColumnDataType.Integer.toString())==0){
|
||||||
|
position=1;
|
||||||
|
} else {
|
||||||
|
if(selected.compareTo(ColumnDataType.Numeric.toString())==0){
|
||||||
|
position=2;
|
||||||
|
} else {
|
||||||
|
if(selected.compareTo(ColumnDataType.Boolean.toString())==0){
|
||||||
|
position=3;
|
||||||
|
} else {
|
||||||
|
if(selected.compareTo(ColumnDataType.Geometry.toString())==0){
|
||||||
|
position=4;
|
||||||
|
} else {
|
||||||
|
if(selected.compareTo(ColumnDataType.Text.toString())==0){
|
||||||
|
position=5;
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue