diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java index 84bb97a..22f6102 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ColumnExpressionDialog.java @@ -87,6 +87,7 @@ public class ColumnExpressionDialog extends Window { } public void setExpression(Expression exp) { + Log.debug("New Expression set:"+exp.toString()); this.exp = exp; } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ConditionWidget.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ConditionWidget.java index 60acca9..9c789ed 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ConditionWidget.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/ConditionWidget.java @@ -373,8 +373,19 @@ public class ConditionWidget extends SimpleContainer { ComboBox comboOp = (ComboBox) horiz .getItemByItemId(itemIdCombo); Log.debug("combo:" + comboOp.getCurrentValue().toString()); - + mapOperation + } return exp; } + + + protected Expression mapOperation(Operation op, firstArg, secondArg){ + Expression single_exp=null; + if()op.getOperatorType(). + } + + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/operation/OperationsStore.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/operation/OperationsStore.java index 47baefe..8575939 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/operation/OperationsStore.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/operation/OperationsStore.java @@ -53,19 +53,79 @@ public class OperationsStore { add(new Operation(15,"NOT_IN","The value is not in",OperatorType.NOT_IN)); }}; + static ArrayList operationsBoolean = new ArrayList() { + + + private static final long serialVersionUID = -1095217157799110522L; + + { + add(new Operation(1,"EQUALS","The value is equal to",OperatorType.EQUALS)); + add(new Operation(2,"NOT_EQUALS","The value is not equal to",OperatorType.NOT_EQUALS)); + add(new Operation(3,"IS_NULL","The value is null",OperatorType.IS_NULL)); + add(new Operation(4,"IS_NOT_NULL","The value is not null",OperatorType.IS_NOT_NULL)); + + }}; + + static ArrayList operationsDate = new ArrayList() { + + + private static final long serialVersionUID = -1095217157799110522L; + + { + add(new Operation(1,"EQUALS","The value is equal to",OperatorType.EQUALS)); + add(new Operation(2,"GREATER","The value is greater than",OperatorType.GREATER)); + add(new Operation(3,"GREATER_OR_EQUALS","The value is greater than or equal to",OperatorType.GREATER_OR_EQUALS)); + add(new Operation(4,"LESSER","The value is less than",OperatorType.LESSER)); + add(new Operation(5,"LESSER_OR_EQUALS","The value is less than or equal to",OperatorType.LESSER_OR_EQUALS)); + add(new Operation(6,"NOT_EQUALS","The value is not equal to",OperatorType.NOT_EQUALS)); + add(new Operation(7,"NOT_GREATER","The value is not greater than",OperatorType.NOT_GREATER)); + add(new Operation(8,"NOT_LESSER","The value is not less than",OperatorType.NOT_LESSER)); + add(new Operation(9,"IS_NULL","The value is null",OperatorType.IS_NULL)); + add(new Operation(10,"IS_NOT_NULL","The value is not null",OperatorType.IS_NOT_NULL)); + add(new Operation(11,"BETWEEN","The value is between",OperatorType.BETWEEN)); + add(new Operation(12,"NOT_BETWEEN","The value is not between",OperatorType.NOT_BETWEEN)); + add(new Operation(13,"IN","The value is in",OperatorType.IN)); + add(new Operation(14,"NOT_IN","The value is not in",OperatorType.NOT_IN)); + + }}; + + static ArrayList operationsGeometry = new ArrayList() { + + + private static final long serialVersionUID = -1095217157799110522L; + + { + add(new Operation(1,"EQUALS","The value is equal to",OperatorType.EQUALS)); + add(new Operation(2,"GREATER","The value is greater than",OperatorType.GREATER)); + add(new Operation(3,"GREATER_OR_EQUALS","The value is greater than or equal to",OperatorType.GREATER_OR_EQUALS)); + add(new Operation(4,"LESSER","The value is less than",OperatorType.LESSER)); + add(new Operation(5,"LESSER_OR_EQUALS","The value is less than or equal to",OperatorType.LESSER_OR_EQUALS)); + add(new Operation(6,"NOT_EQUALS","The value is not equal to",OperatorType.NOT_EQUALS)); + add(new Operation(7,"NOT_GREATER","The value is not greater than",OperatorType.NOT_GREATER)); + add(new Operation(8,"NOT_LESSER","The value is not less than",OperatorType.NOT_LESSER)); + add(new Operation(9,"IS_NULL","The value is null",OperatorType.IS_NULL)); + add(new Operation(10,"IS_NOT_NULL","The value is not null",OperatorType.IS_NOT_NULL)); + add(new Operation(11,"BETWEEN","The value is between",OperatorType.BETWEEN)); + add(new Operation(12,"NOT_BETWEEN","The value is not between",OperatorType.NOT_BETWEEN)); + add(new Operation(13,"IN","The value is in",OperatorType.IN)); + add(new Operation(14,"NOT_IN","The value is not in",OperatorType.NOT_IN)); + + }}; + + public static ArrayList getAll(String dataTypeName){ if(dataTypeName.compareTo("Boolean")==0){ - operations=operationsNumeric; + operations=operationsBoolean; } else { if(dataTypeName.compareTo("Date")==0){ - operations=operationsNumeric; + operations=operationsDate; } else { if(dataTypeName.compareTo("Integer")==0){ operations=operationsNumeric; } else { if(dataTypeName.compareTo("Geometry")==0){ - operations=operationsNumeric; + operations=operationsGeometry; } else { if(dataTypeName.compareTo("Numeric")==0){ operations=operationsNumeric; @@ -73,7 +133,7 @@ public class OperationsStore { if(dataTypeName.compareTo("Text")==0){ operations=operationsText; } else { - operations=operationsText; + operations=new ArrayList(); } } } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/Expression.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/Expression.java index 33bdca9..c589c4d 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/Expression.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/Expression.java @@ -6,7 +6,21 @@ public class Expression implements Serializable{ private static final long serialVersionUID = 7818512507606450235L; + + protected String id="Expression"; + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @Override + public String toString() { + return "Expression [id=" + id + "]"; + } } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/OperatorTypeMap.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/OperatorTypeMap.java new file mode 100644 index 0000000..b6614b5 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/OperatorTypeMap.java @@ -0,0 +1,105 @@ +package org.gcube.portlets.user.td.expressionwidget.shared.model; + +import java.util.List; + +import net.sf.saxon.functions.Contains; + +import org.gcube.portlets.user.td.expressionwidget.shared.model.composite.text.TextBeginsWith; +import org.gcube.portlets.user.td.expressionwidget.shared.model.composite.text.TextContains; +import org.gcube.portlets.user.td.expressionwidget.shared.model.logical.Between; + + + +/** + * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * + */ +public class OperatorTypeMap { + protected Expression exp=null; + + OperatorTypeMap(OperatorType operatorType, String firstArg, String secondArg){ + switch (operatorType) { + case ADDITION: + break; + case ALL: + break; + case AND: + break; + case ANY: + break; + case BEGINS_WITH: + exp=new TextBeginsWith(firstArg,secondArg); + break; + case BETWEEN: + exp=new Between(arguments.get(0),arguments.get(1)); + break; + case CONTAINS: + exp=new TextContains(arguments.get(0),arguments.get(1)); + break; + case DIVISION: + break; + case ENDS_WITH: + break; + case EQUALS: + break; + case EXISTS: + break; + case GREATER: + break; + case GREATER_OR_EQUALS: + break; + case IN: + break; + case IS_NOT_NULL: + break; + case IS_NULL: + break; + case LESSER: + break; + case LESSER_OR_EQUALS: + break; + case LIKE: + break; + case MATCH_REGEX: + break; + case MODULUS: + break; + case MULTIPLICATION: + break; + case NOT: + break; + case NOT_BEGINS_WITH: + break; + case NOT_BETWEEN: + break; + case NOT_CONTAINS: + break; + case NOT_ENDS_WITH: + break; + case NOT_EQUALS: + break; + case NOT_GREATER: + break; + case NOT_IN: + break; + case NOT_LESSER: + break; + case NOT_LIKE: + break; + case NOT_MATCH_REGEX: + break; + case OR: + break; + case SELECT_IN: + break; + case SUBTRACTION: + break; + case UNIQUE: + break; + default: + break; + } + } +} diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/Equals.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/Equals.java index 475178f..64679d5 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/Equals.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/Equals.java @@ -10,6 +10,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; * */ public class Equals extends Expression { + protected String id="Equals"; + private static final long serialVersionUID = 3154667914317692836L; Expression leftArgument; Expression rightArgument; @@ -27,4 +29,12 @@ public class Equals extends Expression { return "Boolean"; } + @Override + public String toString() { + return "Equals [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterOrEquals.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterOrEquals.java index b9425fe..d65c026 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterOrEquals.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterOrEquals.java @@ -11,6 +11,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class GreaterOrEquals extends Expression { private static final long serialVersionUID = -5441076239992740424L; + + protected String id="GreaterOrEquals"; protected Expression leftArgument; protected Expression rightArgument; @@ -27,4 +29,12 @@ public class GreaterOrEquals extends Expression { return "Boolean"; } + @Override + public String toString() { + return "GreaterOrEquals [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterThan.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterThan.java index 3b049e4..340b762 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterThan.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/GreaterThan.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class GreaterThan extends Expression { private static final long serialVersionUID = -8878360512708863164L; + protected String id="GreaterThan"; protected Expression leftArgument; protected Expression rightArgument; @@ -27,4 +28,12 @@ public class GreaterThan extends Expression { return "Boolean"; } + @Override + public String toString() { + return "GreaterThan [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessOrEquals.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessOrEquals.java index bc7da96..7f58e33 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessOrEquals.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessOrEquals.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class LessOrEquals extends Expression { private static final long serialVersionUID = 7693397481316523615L; + protected String id="LessOrEquals"; Expression leftArgument; Expression rightArgument; @@ -26,4 +27,13 @@ public class LessOrEquals extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "LessOrEquals [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessThan.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessThan.java index 19754c7..38d5cce 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessThan.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/LessThan.java @@ -12,6 +12,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class LessThan extends Expression { private static final long serialVersionUID = 6420164520127827750L; + protected String id="LessThan"; Expression leftArgument; Expression rightArgument; @@ -27,4 +28,13 @@ public class LessThan extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "LessThan [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotEquals.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotEquals.java index 69884ea..7c80515 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotEquals.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotEquals.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class NotEquals extends Expression { private static final long serialVersionUID = 7587723477959909679L; + protected String id="NotEquals"; Expression leftArgument; Expression rightArgument; @@ -26,4 +27,12 @@ public class NotEquals extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "NotEquals [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotGreater.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotGreater.java index 6ea8fa4..027a1b0 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotGreater.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotGreater.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class NotGreater extends Expression { private static final long serialVersionUID = 6783019184437499833L; + protected String id="NotGreater"; Expression leftArgument; Expression rightArgument; @@ -26,4 +27,13 @@ public class NotGreater extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "NotGreater [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotLess.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotLess.java index d674088..e7c2de4 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotLess.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/comparable/NotLess.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class NotLess extends Expression { private static final long serialVersionUID = 4497500830326659077L; + protected String id="NotLess"; Expression leftArgument; Expression rightArgument; @@ -26,4 +27,13 @@ public class NotLess extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "NotLess [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextBeginsWith.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextBeginsWith.java index a2acff3..322c189 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextBeginsWith.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextBeginsWith.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class TextBeginsWith extends Expression { private static final long serialVersionUID = 222662008523199480L; + protected String id="TextBeginsWith"; protected Expression leftArgument; protected Expression rightArgument; @@ -27,4 +28,12 @@ public class TextBeginsWith extends Expression { return "Boolean"; } + @Override + public String toString() { + return "TextBeginsWith [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextContains.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextContains.java index 69f16e3..f58d0bb 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextContains.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextContains.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class TextContains extends Expression { private static final long serialVersionUID = 7951499429397693592L; + protected String id="TextContains"; protected Expression leftArgument; protected Expression rightArgument; @@ -26,4 +27,13 @@ public class TextContains extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "TextContains [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextEndsWith.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextEndsWith.java index 2768c20..c91451e 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextEndsWith.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextEndsWith.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class TextEndsWith extends Expression { private static final long serialVersionUID = -5149428840566398839L; + protected String id="TextEndsWith"; protected Expression leftArgument; protected Expression rightArgument; @@ -27,4 +28,12 @@ public class TextEndsWith extends Expression { return "Boolean"; } + @Override + public String toString() { + return "TextEndsWith [id=" + id + ", leftArgument=" + leftArgument + + ", rightArgument=" + rightArgument + "]"; + } + + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextMatchSQLRegexp.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextMatchSQLRegexp.java index 0cc9f98..1cb6713 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextMatchSQLRegexp.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/composite/text/TextMatchSQLRegexp.java @@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.OperatorType; */ public class TextMatchSQLRegexp extends Expression { private static final long serialVersionUID = -4097780009381262681L; + protected String id="TextMatchSQLRegexp"; protected Expression leftArgument; protected Expression rightArgument; @@ -26,6 +27,14 @@ public class TextMatchSQLRegexp extends Expression { public String getReturnedDataType() { return "Boolean"; } + + @Override + public String toString() { + return "TextMatchSQLRegexp [id=" + id + ", leftArgument=" + + leftArgument + ", rightArgument=" + rightArgument + "]"; + } + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ColumnReferencePlaceholder.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ColumnReferencePlaceholder.java new file mode 100644 index 0000000..f91449e --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ColumnReferencePlaceholder.java @@ -0,0 +1,17 @@ +package org.gcube.portlets.user.td.expressionwidget.shared.model.leaf; + +import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType; + +public class ColumnReferencePlaceholder extends Leaf { + + private static final long serialVersionUID = 275747262118236529L; + protected String id = "ConstantList"; + protected String columnId; + protected ColumnDataType dataType; + + ColumnReferencePlaceholder(ColumnDataType dataType, String columnId){ + this.dataType=dataType; + this.columnId=columnId; + + } +} diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ConstantList.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ConstantList.java index 08ad380..9858369 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ConstantList.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/ConstantList.java @@ -1,5 +1,22 @@ package org.gcube.portlets.user.td.expressionwidget.shared.model.leaf; -public class ConstantList { +import java.util.List; + +public class ConstantList extends Leaf { + private static final long serialVersionUID = 222662008523199480L; + + protected String id = "ConstantList"; + List arguments; + + public ConstantList(List arguments) { + this.arguments = arguments; + } + + @Override + public String toString() { + return "ConstantList [id=" + id + ", arguments=" + arguments + "]"; + } + + } diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/Leaf.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/Leaf.java new file mode 100644 index 0000000..e53bdab --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/Leaf.java @@ -0,0 +1,18 @@ +package org.gcube.portlets.user.td.expressionwidget.shared.model.leaf; + +import org.gcube.portlets.user.td.expressionwidget.shared.model.Expression; + +public class Leaf extends Expression { + + + private static final long serialVersionUID = -2354159908167637688L; + + protected String id="Leaf"; + + @Override + public String toString() { + return "Leaf [id=" + id + "]"; + } + + +} diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/TD_Value.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/TD_Value.java new file mode 100644 index 0000000..ba1ef6c --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/shared/model/leaf/TD_Value.java @@ -0,0 +1,37 @@ +package org.gcube.portlets.user.td.expressionwidget.shared.model.leaf; + +import java.io.Serializable; + +import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType; + +public class TD_Value implements Serializable { + + private static final long serialVersionUID = 2802022467528178596L; + protected String id="TD_Value"; + protected String value; + protected ColumnDataType valueType; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ColumnDataType getValueType() { + return valueType; + } + + public void setValueType(ColumnDataType valueType) { + this.valueType = valueType; + } + + @Override + public String toString() { + return "TD_Value [value=" + value + ", valueType=" + valueType + "]"; + } + + + +}