Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@91559 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
255f8dbdac
commit
7a946904d6
10
.classpath
10
.classpath
|
@ -22,16 +22,16 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/tabular-data-expression-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ColumnExpressionDialog extends Window {
|
|||
return exp;
|
||||
}
|
||||
|
||||
public void setExpression(C_Expression exp) {
|
||||
protected void setExpression(C_Expression exp) {
|
||||
Log.debug("New Expression set:"+exp.toString());
|
||||
this.exp = exp;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.gcube.portlets.user.td.expressionwidget.client;
|
|||
import org.gcube.portlets.user.td.expressionwidget.client.resource.ExpressionResources;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.C_Expression;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.data.analysis.tabulardata.expression.Expression;
|
||||
import org.gcube.data.analysis.tabulardata.expression.composite.comparable.Equals;
|
||||
import org.gcube.data.analysis.tabulardata.expression.leaf.ColumnReferencePlaceholder;
|
||||
import org.gcube.data.analysis.tabulardata.expression.leaf.ConstantList;
|
||||
import org.gcube.data.analysis.tabulardata.expression.leaf.Range;
|
||||
|
@ -27,6 +28,7 @@ import org.gcube.data.analysis.tabulardata.model.datatype.value.TDText;
|
|||
import org.gcube.data.analysis.tabulardata.model.datatype.value.TDTypeValue;
|
||||
import org.gcube.data.analysis.tabulardata.model.table.TableId;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.C_Expression;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.composite.comparable.C_Equals;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.C_ColumnReferencePlaceholder;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.C_ConstantList;
|
||||
import org.gcube.portlets.user.td.expressionwidget.shared.model.leaf.C_Range;
|
||||
|
@ -62,45 +64,62 @@ public class C_ExpressionParser {
|
|||
ex = getExpressionValue(value);
|
||||
break;
|
||||
case "Equals":
|
||||
ex = getEquals(exp);
|
||||
break;
|
||||
case "GreaterOrEquals":
|
||||
ex = getGreaterOrEquals(exp);
|
||||
break;
|
||||
case "GreaterThan":
|
||||
ex = getGreaterThan(exp);
|
||||
break;
|
||||
case "LessOrEquals":
|
||||
ex = getLessOrEquals(exp);
|
||||
break;
|
||||
case "LessThan":
|
||||
ex = getLessThan(exp);
|
||||
break;
|
||||
case "NotEquals":
|
||||
ex = getNotEquals(exp);
|
||||
break;
|
||||
case "NotGreater":
|
||||
ex = getNotGreater(exp);
|
||||
break;
|
||||
case "NotLess":
|
||||
ex = getNotLess(exp);
|
||||
break;
|
||||
case "TextBiginsWith":
|
||||
case "TextBeginsWith":
|
||||
ex = getTextBeginWith(exp);
|
||||
break;
|
||||
case "TextContains":
|
||||
ex = getTextContainsWith(exp);
|
||||
break;
|
||||
case "TextEndsWith":
|
||||
ex = getTextEndWith(exp);
|
||||
break;
|
||||
case "TextMatchSQLRegexp":
|
||||
ex = getTextMatchSQLRegexp(exp);
|
||||
break;
|
||||
case "And":
|
||||
ex = getAnd(exp);
|
||||
break;
|
||||
case "Beetween":
|
||||
case "Between":
|
||||
ex = getBetween(exp);
|
||||
break;
|
||||
case "IsNotNull":
|
||||
ex = getIsNotNull(exp);
|
||||
break;
|
||||
case "IsNull":
|
||||
ex = getIsNull(exp);
|
||||
break;
|
||||
case "Not":
|
||||
ex = getNot(exp);
|
||||
break;
|
||||
case "Or":
|
||||
ex = getOr(exp);
|
||||
break;
|
||||
case "ValueIsIn":
|
||||
ex = getValueIsIn(exp);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -108,6 +127,96 @@ public class C_ExpressionParser {
|
|||
return ex;
|
||||
}
|
||||
|
||||
private Expression getValueIsIn(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getOr(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getNot(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getIsNull(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getIsNotNull(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getBetween(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getAnd(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getTextMatchSQLRegexp(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getTextEndWith(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getTextContainsWith(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getTextBeginWith(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getNotLess(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getNotGreater(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getNotEquals(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getLessThan(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getLessOrEquals(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getGreaterThan(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
private Expression getGreaterOrEquals(C_Expression exp) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
protected TDTypeValue getExpressionValue(TD_Value value) {
|
||||
TDTypeValue ex = null;
|
||||
switch (value.getValueType()) {
|
||||
|
@ -209,5 +318,14 @@ public class C_ExpressionParser {
|
|||
mapColumnDataType(c.getDataType()));
|
||||
return ref;
|
||||
}
|
||||
|
||||
protected Expression getEquals(C_Expression exp) {
|
||||
C_Equals e = (C_Equals) exp;
|
||||
Expression left=parse(e.getLeftArgument());
|
||||
Expression right=parse(e.getRightArgument());
|
||||
Equals eq = new Equals(left,right);
|
||||
return eq;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,24 @@ public class C_Equals extends C_Expression {
|
|||
public String getReturnedDataType() {
|
||||
return "Boolean";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public C_Expression getLeftArgument() {
|
||||
return leftArgument;
|
||||
}
|
||||
|
||||
public void setLeftArgument(C_Expression leftArgument) {
|
||||
this.leftArgument = leftArgument;
|
||||
}
|
||||
|
||||
public C_Expression getRightArgument() {
|
||||
return rightArgument;
|
||||
}
|
||||
|
||||
public void setRightArgument(C_Expression rightArgument) {
|
||||
this.rightArgument = rightArgument;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
Loading…
Reference in New Issue