2521: Explore the possibility to port the StatMan interface onto Dataminer

https://support.d4science.org/issues/2521

Updated shows results for computations

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128549 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-05-10 15:56:35 +00:00
parent 6b3f4ebff1
commit cba8207002
9 changed files with 838 additions and 0 deletions

View File

@ -0,0 +1,68 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author ceras
*
*/
public class ColumnListParameter extends Parameter implements Serializable {
private static final long serialVersionUID = -6743494426144267089L;
String referredTabularParameterName;
List<String> columnNames = new ArrayList<String>();
String value;
private String separator;
public ColumnListParameter() {
super();
this.typology = ParameterTypology.COLUMN_LIST;
}
public ColumnListParameter(String name, String description, String referredTabularParameterName, String separator) {
super(name, ParameterTypology.COLUMN_LIST, description);
this.referredTabularParameterName = referredTabularParameterName;
this.separator = separator;
}
/**
* @param referredTabularParameterName the referredTabularParameterName to set
*/
public void setReferredTabularParameterName(String referredTabularParameterName) {
this.referredTabularParameterName = referredTabularParameterName;
}
/**
* @return the referredTabularParameterName
*/
public String getReferredTabularParameterName() {
return referredTabularParameterName;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
/**
* @return the separator
*/
public String getSeparator() {
return separator;
}
}

View File

@ -0,0 +1,82 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.io.Serializable;
/**
* @author ceras
*
*/
public class ColumnParameter extends Parameter implements Serializable {
/**
*
*/
private static final long serialVersionUID = -5084557326770554659L;
String referredTabularParameterName;
String defaultColumn;
String value;
/**
*
*/
public ColumnParameter() {
super();
this.typology = ParameterTypology.COLUMN;
}
/**
*
*/
public ColumnParameter(String name, String description, String referredTabularParameterName, String defaultColumn) {
super(name, ParameterTypology.COLUMN, description);
this.referredTabularParameterName = referredTabularParameterName;
this.defaultColumn = defaultColumn;
}
/**
* @param referredTabularParameterName the referredTabularParameterName to set
*/
public void setReferredTabularParameterName(
String referredTabularParameterName) {
this.referredTabularParameterName = referredTabularParameterName;
}
/**
* @return the referredTabularParameterName
*/
public String getReferredTabularParameterName() {
return referredTabularParameterName;
}
/**
* @return the defaultValue
*/
public String getDefaultColumn() {
return defaultColumn;
}
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultColumn(String defaultColumn) {
this.defaultColumn = defaultColumn;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
}

View File

@ -0,0 +1,89 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
* @author ceras
*
*/
public class EnumParameter extends Parameter implements IsSerializable {
private static final long serialVersionUID = 1673874854501249519L;
List<String> values = new ArrayList<String>();
String defaultValue;
String value;
/**
*
*/
public EnumParameter() {
super();
this.typology = ParameterTypology.ENUM;
}
/**
* @param type
* @param defaultValue
* @param value
*/
public EnumParameter(String name, String description, List<String> values, String defaultValue) {
super(name, ParameterTypology.ENUM, description);
this.values = values;
this.defaultValue = defaultValue;
}
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @param values the values to set
*/
public void setValues(List<String> values) {
this.values = values;
}
/**
* @return the values
*/
public List<String> getValues() {
return values;
}
public void addValue(String value) {
this.values.add(value);
}
/**
* @return the value
*/
@Override
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
}

View File

@ -0,0 +1,81 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
* @author ceras
*
*/
public class FileParameter extends Parameter implements IsSerializable {
private static final long serialVersionUID = -2967577990287112937L;
private String value;
private String defaultMimeType;
private ArrayList<String> supportedMimeTypes;
/**
*
*/
public FileParameter() {
super();
this.typology = ParameterTypology.FILE;
}
/**
*
* @param name
* @param description
* @param fileName
* @param mimeType
*/
public FileParameter(String name, String description, String defaultMimeType, ArrayList<String> supportedMimeTypes) {
super(name, ParameterTypology.FILE, description);
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
public String getDefaultMimeType() {
return defaultMimeType;
}
public void setDefaultMimeType(String defaultMimeType) {
this.defaultMimeType = defaultMimeType;
}
public ArrayList<String> getSupportedMimeTypes() {
return supportedMimeTypes;
}
public void setSupportedMimeTypes(ArrayList<String> supportedMimeTypes) {
this.supportedMimeTypes = supportedMimeTypes;
}
/**
*
*/
public String getValue() {
return value;
}
/**
*
*/
@Override
public void setValue(String value) {
this.value=value;
}
@Override
public String toString() {
return "FileParameter [value=" + value + ", defaultMimeType="
+ defaultMimeType + ", supportedMimeTypes="
+ supportedMimeTypes + "]";
}
}

View File

@ -0,0 +1,81 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
* @author ceras
*
*/
public class ListParameter extends Parameter implements IsSerializable {
private static final long serialVersionUID = 5405965026753332225L;
private String type;
private String value;
private String separator;
/**
*
*/
public ListParameter() {
super();
this.typology = ParameterTypology.LIST;
}
/**
* @param defaultValue
* @param value
*/
public ListParameter(String name, String description, String type, String separator) {
super(name, ParameterTypology.LIST, description);
this.type = type;
this.separator = separator;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
return value;
}
/**
* @return the separator
*/
public String getSeparator() {
return separator;
}
@Override
public String toString() {
return "ListParameter [type=" + type + ", value=" + value
+ ", separator=" + separator + ", name=" + name
+ ", description=" + description + ", typology=" + typology
+ "]";
}
}

View File

@ -0,0 +1,88 @@
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
* @author ceras
*
*/
public class ObjectParameter extends Parameter implements IsSerializable {
private static final long serialVersionUID = 1058462575242430851L;
private String type;
private String defaultValue;
private String value;
/**
*
*/
public ObjectParameter() {
super();
this.typology = ParameterTypology.OBJECT;
}
public ObjectParameter(String name, String description, String type, String defaultValue) {
super(name, ParameterTypology.OBJECT, description);
this.type = type;
this.defaultValue = defaultValue;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "ObjectParameter [type=" + type + ", defaultValue="
+ defaultValue + ", value=" + value + ", name=" + name
+ ", description=" + description + ", typology=" + typology
+ "]";
}
}

View File

@ -0,0 +1,130 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.io.Serializable;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public abstract class Parameter implements Serializable {
/**
*
*/
private static final long serialVersionUID = -555286289487491703L;
public enum ParameterTypology {
OBJECT, TABULAR, FILE, ENUM, LIST, COLUMN, COLUMN_LIST, TABULAR_LIST
};
protected String name;
protected String description;
protected ParameterTypology typology;
/**
*
*/
public Parameter() {
super();
}
/**
* @param name
* @param type
* @param description
* @param defaultValue
* @param value
*/
public Parameter(String name, ParameterTypology type, String description) {
super();
this.name = name;
this.typology = type;
this.description = description;
}
public abstract void setValue(String value);
public abstract String getValue();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* @return the typology
*/
public ParameterTypology getTypology() {
return typology;
}
/**
* @param typology
* the typology to set
*/
public void setTypology(ParameterTypology typology) {
this.typology = typology;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(String description) {
this.description = description;
}
public boolean isObject() {
return this.typology == ParameterTypology.OBJECT;
}
public boolean isTabular() {
return this.typology == ParameterTypology.TABULAR;
}
public boolean isFile() {
return this.typology == ParameterTypology.FILE;
}
public boolean isEnum() {
return this.typology == ParameterTypology.ENUM;
}
public boolean isList() {
return this.typology == ParameterTypology.LIST;
}
public boolean isColumn() {
return this.typology == ParameterTypology.COLUMN;
}
public boolean isColumnList() {
return this.typology == ParameterTypology.COLUMN_LIST;
}
public boolean isTabularList() {
return this.typology == ParameterTypology.TABULAR_LIST;
}
@Override
public String toString() {
return "Parameter [name=" + name + ", description=" + description
+ ", typology=" + typology + "]";
}
}

View File

@ -0,0 +1,106 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.io.Serializable;
import java.util.ArrayList;
/**
* @author ceras
*
*/
public class TabularListParameter extends Parameter implements Serializable {
private static final long serialVersionUID = -1786477950530892502L;
private String value;
private String separator;
private ArrayList<String> templates = new ArrayList<String>();
private String defaultMimeType;
private ArrayList<String> supportedMimeTypes;
// private List<String> tableNames = new ArrayList<String>();
public TabularListParameter() {
super();
this.typology = ParameterTypology.TABULAR_LIST;
}
/**
* @param defaultValue
* @param value
*/
public TabularListParameter(String name, String description,
String separator, String defaultMimeType,
ArrayList<String> supportedMimeTypes) {
super(name, ParameterTypology.TABULAR_LIST, description);
this.separator = separator;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
@Override
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
return value;
}
/**
* @return the separator
*/
public String getSeparator() {
return separator;
}
/**
* @param templates
* the templates to set
*/
public void setTemplates(ArrayList<String> templates) {
this.templates = templates;
}
/**
* @return the templates
*/
public ArrayList<String> getTemplates() {
return templates;
}
public void addTemplate(String template) {
templates.add(template);
}
public String getDefaultMimeType() {
return defaultMimeType;
}
public void setDefaultMimeType(String defaultMimeType) {
this.defaultMimeType = defaultMimeType;
}
public ArrayList<String> getSupportedMimeTypes() {
return supportedMimeTypes;
}
public void setSupportedMimeTypes(ArrayList<String> supportedMimeTypes) {
this.supportedMimeTypes = supportedMimeTypes;
}
public void setSeparator(String separator) {
this.separator = separator;
}
@Override
public String toString() {
return "TabularListParameter [value=" + value + ", separator="
+ separator + ", templates=" + templates + ", defaultMimeType="
+ defaultMimeType + ", supportedMimeTypes="
+ supportedMimeTypes + "]";
}
}

View File

@ -0,0 +1,113 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.shared.parameters;
import java.io.Serializable;
import java.util.ArrayList;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularParameter extends Parameter implements Serializable {
private static final long serialVersionUID = 8038591467145151553L;
private String tableName;
private ArrayList<String> templates = new ArrayList<String>();
private String defaultMimeType;
private ArrayList<String> supportedMimeTypes;
/**
*
*/
public TabularParameter() {
super();
this.typology = ParameterTypology.TABULAR;
}
/**
*
* @param name
* @param description
* @param tableName
*/
public TabularParameter(String name, String description, String tableName,
String defaultMimeType, ArrayList<String> supportedMimeTypes) {
super(name, ParameterTypology.TABULAR, description);
this.tableName = tableName;
this.templates = null;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
/**
*
* @param name
* @param description
* @param tableName
* @param templates
*/
public TabularParameter(String name, String description, String tableName,
ArrayList<String> templates, String defaultMimeType,
ArrayList<String> supportedMimeTypes) {
super(name, ParameterTypology.TABULAR, description);
this.tableName = tableName;
this.templates = templates;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public ArrayList<String> getTemplates() {
return templates;
}
public void setTemplates(ArrayList<String> templates) {
this.templates = templates;
}
@Override
public String getValue() {
return getTableName();
}
@Override
public void setValue(String value) {
this.setTableName(value);
}
public String getDefaultMimeType() {
return defaultMimeType;
}
public void setDefaultMimeType(String defaultMimeType) {
this.defaultMimeType = defaultMimeType;
}
public ArrayList<String> getSupportedMimeTypes() {
return supportedMimeTypes;
}
public void setSupportedMimeTypes(ArrayList<String> supportedMimeTypes) {
this.supportedMimeTypes = supportedMimeTypes;
}
@Override
public String toString() {
return "TabularParameter [tableName=" + tableName + ", templates="
+ templates + ", defaultMimeType=" + defaultMimeType
+ ", supportedMimeTypes=" + supportedMimeTypes + "]";
}
}