Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@92767 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
61d7e8b579
commit
74d17d8b1c
|
@ -165,7 +165,8 @@ public class C_ExpressionParser {
|
|||
|
||||
private Expression getValueIsIn(C_Expression exp) {
|
||||
C_ValueIsIn v = (C_ValueIsIn) exp;
|
||||
ValueIsIn valueIsIn = new ValueIsIn(parse(v.getLeftArgument()), parse(v.getRightArgument()));
|
||||
ValueIsIn valueIsIn = new ValueIsIn(parse(v.getLeftArgument()),
|
||||
parse(v.getRightArgument()));
|
||||
return valueIsIn;
|
||||
}
|
||||
|
||||
|
@ -202,7 +203,8 @@ public class C_ExpressionParser {
|
|||
|
||||
private Expression getBetween(C_Expression exp) {
|
||||
C_Between bet = (C_Between) exp;
|
||||
Between between=new Between(parse(bet.getLeftArgument()),parse(bet.getRightArgument()));
|
||||
Between between = new Between(parse(bet.getLeftArgument()),
|
||||
parse(bet.getRightArgument()));
|
||||
return between;
|
||||
}
|
||||
|
||||
|
@ -221,69 +223,85 @@ public class C_ExpressionParser {
|
|||
|
||||
private Expression getTextMatchSQLRegexp(C_Expression exp) {
|
||||
C_TextMatchSQLRegexp reg = (C_TextMatchSQLRegexp) exp;
|
||||
TextMatchSQLRegexp regExp=new TextMatchSQLRegexp(parse(reg.getLeftArgument()),parse(reg.getRightArgument()));
|
||||
TextMatchSQLRegexp regExp = new TextMatchSQLRegexp(
|
||||
parse(reg.getLeftArgument()), parse(reg.getRightArgument()));
|
||||
return regExp;
|
||||
|
||||
}
|
||||
|
||||
private Expression getTextEndWith(C_Expression exp) {
|
||||
C_TextEndsWith textEnd = (C_TextEndsWith) exp;
|
||||
TextEndsWith textEndWith=new TextEndsWith(parse(textEnd.getLeftArgument()),parse(textEnd.getRightArgument()));
|
||||
TextEndsWith textEndWith = new TextEndsWith(
|
||||
parse(textEnd.getLeftArgument()),
|
||||
parse(textEnd.getRightArgument()));
|
||||
return textEndWith;
|
||||
}
|
||||
|
||||
private Expression getTextContains(C_Expression exp) {
|
||||
C_TextContains textContains = (C_TextContains) exp;
|
||||
TextContains textCont=new TextContains(parse(textContains.getLeftArgument()),parse(textContains.getRightArgument()));
|
||||
TextContains textCont = new TextContains(
|
||||
parse(textContains.getLeftArgument()),
|
||||
parse(textContains.getRightArgument()));
|
||||
return textCont;
|
||||
}
|
||||
|
||||
private Expression getTextBeginWith(C_Expression exp) {
|
||||
C_TextBeginsWith textB = (C_TextBeginsWith) exp;
|
||||
TextBeginsWith textBegins=new TextBeginsWith(parse(textB.getLeftArgument()),parse(textB.getRightArgument()));
|
||||
TextBeginsWith textBegins = new TextBeginsWith(
|
||||
parse(textB.getLeftArgument()), parse(textB.getRightArgument()));
|
||||
return textBegins;
|
||||
}
|
||||
|
||||
private Expression getNotLess(C_Expression exp) {
|
||||
C_NotLess notL = (C_NotLess) exp;
|
||||
NotLess notLess=new NotLess(parse(notL.getLeftArgument()),parse(notL.getRightArgument()));
|
||||
NotLess notLess = new NotLess(parse(notL.getLeftArgument()),
|
||||
parse(notL.getRightArgument()));
|
||||
return notLess;
|
||||
}
|
||||
|
||||
private Expression getNotGreater(C_Expression exp) {
|
||||
C_NotGreater notG = (C_NotGreater) exp;
|
||||
NotGreater notGreater=new NotGreater(parse(notG.getLeftArgument()),parse(notG.getRightArgument()));
|
||||
NotGreater notGreater = new NotGreater(parse(notG.getLeftArgument()),
|
||||
parse(notG.getRightArgument()));
|
||||
return notGreater;
|
||||
}
|
||||
|
||||
private Expression getNotEquals(C_Expression exp) {
|
||||
C_NotEquals notE = (C_NotEquals) exp;
|
||||
NotEquals notEquals=new NotEquals(parse(notE.getLeftArgument()),parse(notE.getRightArgument()));
|
||||
NotEquals notEquals = new NotEquals(parse(notE.getLeftArgument()),
|
||||
parse(notE.getRightArgument()));
|
||||
return notEquals;
|
||||
}
|
||||
|
||||
private Expression getLessThan(C_Expression exp) {
|
||||
C_LessThan lessT = (C_LessThan) exp;
|
||||
LessThan lessThan=new LessThan(parse(lessT.getLeftArgument()),parse(lessT.getRightArgument()));
|
||||
LessThan lessThan = new LessThan(parse(lessT.getLeftArgument()),
|
||||
parse(lessT.getRightArgument()));
|
||||
return lessThan;
|
||||
}
|
||||
|
||||
private Expression getLessOrEquals(C_Expression exp) {
|
||||
C_LessOrEquals lessOrE = (C_LessOrEquals) exp;
|
||||
LessOrEquals lessOrEquals=new LessOrEquals(parse(lessOrE.getLeftArgument()),parse(lessOrE.getRightArgument()));
|
||||
LessOrEquals lessOrEquals = new LessOrEquals(
|
||||
parse(lessOrE.getLeftArgument()),
|
||||
parse(lessOrE.getRightArgument()));
|
||||
return lessOrEquals;
|
||||
}
|
||||
|
||||
private Expression getGreaterThan(C_Expression exp) {
|
||||
C_GreaterThan greaterThan = (C_GreaterThan) exp;
|
||||
GreaterThan greater=new GreaterThan(parse(greaterThan.getLeftArgument()),parse(greaterThan.getRightArgument()));
|
||||
GreaterThan greater = new GreaterThan(
|
||||
parse(greaterThan.getLeftArgument()),
|
||||
parse(greaterThan.getRightArgument()));
|
||||
return greater;
|
||||
|
||||
}
|
||||
|
||||
private Expression getGreaterOrEquals(C_Expression exp) {
|
||||
C_GreaterOrEquals greaterOrEq = (C_GreaterOrEquals) exp;
|
||||
GreaterOrEquals greaterOrEquals=new GreaterOrEquals(parse(greaterOrEq.getLeftArgument()),parse(greaterOrEq.getRightArgument()));
|
||||
GreaterOrEquals greaterOrEquals = new GreaterOrEquals(
|
||||
parse(greaterOrEq.getLeftArgument()),
|
||||
parse(greaterOrEq.getRightArgument()));
|
||||
return greaterOrEquals;
|
||||
|
||||
}
|
||||
|
@ -373,8 +391,8 @@ public class C_ExpressionParser {
|
|||
|
||||
protected Expression getRange(C_Expression exp) {
|
||||
C_Range c = (C_Range) exp;
|
||||
Range range = new Range(getExpressionValue(c.getMaximum()),
|
||||
getExpressionValue(c.getMinimum()));
|
||||
Range range = new Range(getExpressionValue(c.getMinimum()),
|
||||
getExpressionValue(c.getMaximum()));
|
||||
return range;
|
||||
}
|
||||
|
||||
|
@ -383,9 +401,7 @@ public class C_ExpressionParser {
|
|||
TableId tableId = new TableId(Long.valueOf(c.getTrId().getTableId()));
|
||||
ColumnLocalId columnId = new ColumnLocalId(c.getColumnId());
|
||||
|
||||
TypedColumnReference ref = new TypedColumnReference(
|
||||
tableId,
|
||||
columnId,
|
||||
TypedColumnReference ref = new TypedColumnReference(tableId, columnId,
|
||||
mapColumnDataType(c.getDataType()));
|
||||
return ref;
|
||||
}
|
||||
|
@ -398,5 +414,4 @@ public class C_ExpressionParser {
|
|||
return eq;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue