Minor Updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@92710 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-05 17:32:33 +00:00
parent c60d56f0a9
commit 222594fb68
3 changed files with 0 additions and 112 deletions

View File

@ -1,51 +0,0 @@
package org.gcube.portlets.user.td.informationwidget.client.table;
import java.io.Serializable;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TableType;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableTypeElement implements Serializable {
private static final long serialVersionUID = -5913441587564742269L;
protected Integer id;
protected TableType tableType;
public TableTypeElement(Integer id, TableType tableType){
this.id=id;
this.tableType=tableType;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public TableType getTableType() {
return tableType;
}
public void setTableType(TableType tableType) {
this.tableType = tableType;
}
public String getLabel(){
return tableType.toString();
}
@Override
public String toString() {
return "TableTypeElement [id=" + id + ", tableType=" + tableType + "]";
}
}

View File

@ -1,17 +0,0 @@
package org.gcube.portlets.user.td.informationwidget.client.table;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
public interface TableTypeProperties extends PropertyAccess<TableTypeElement> {
@Path("id")
ModelKeyProvider<TableTypeElement> id();
LabelProvider<TableTypeElement> label();
}

View File

@ -1,44 +0,0 @@
package org.gcube.portlets.user.td.informationwidget.client.table;
import java.util.ArrayList;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TableType;
public class TableTypeStore {
protected static TableTypeElement genericElement=new TableTypeElement(1, TableType.GENERIC);
protected static TableTypeElement codelistElement=new TableTypeElement(2, TableType.CODELIST);
protected static TableTypeElement datasetElement=new TableTypeElement(3, TableType.DATASET);
protected static ArrayList<TableTypeElement> tableType = new ArrayList<TableTypeElement>() {
private static final long serialVersionUID = -6559885743626876431L;
{
add(genericElement);
add(codelistElement);
add(datasetElement);
}
};
public static ArrayList<TableTypeElement> getTableTypes() {
return tableType;
}
public static TableTypeElement getTableTypeElement(String tableType){
if(tableType.compareTo(TableType.GENERIC.toString())==0){
return genericElement;
} else {
if(tableType.compareTo(TableType.CODELIST.toString())==0){
return codelistElement;
} else {
if(tableType.compareTo(TableType.DATASET.toString())==0){
return datasetElement;
} else {
return null;
}
}
}
}
}