git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@114377 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3ee14bc7f9
commit
382280a981
|
@ -60,7 +60,7 @@ import com.sencha.gxt.widget.core.client.info.Info;
|
||||||
*/
|
*/
|
||||||
public class ColumnExpressionPanel extends FramedPanel {
|
public class ColumnExpressionPanel extends FramedPanel {
|
||||||
private static final String RULE_DESCRIPTION_HEIGHT = "44px";
|
private static final String RULE_DESCRIPTION_HEIGHT = "44px";
|
||||||
private static final String RULE_PLACE_HOLDER_ID = "RulePlaceHolderId";
|
private static final String RULE_PLACE_HOLDER_ID = "Column";
|
||||||
|
|
||||||
private enum ColumnExpressionPanelType {
|
private enum ColumnExpressionPanelType {
|
||||||
MultiColumnFilter, ColumnFilter, RowDeleteByExpression, Template, Rule;
|
MultiColumnFilter, ColumnFilter, RowDeleteByExpression, Template, Rule;
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class C_TextMatchSQLRegexp extends C_Expression {
|
||||||
this.leftArgument = leftArgument;
|
this.leftArgument = leftArgument;
|
||||||
this.rightArgument = rightArgument;
|
this.rightArgument = rightArgument;
|
||||||
if (leftArgument != null && rightArgument != null) {
|
if (leftArgument != null && rightArgument != null) {
|
||||||
this.readableExpression = "TextMatchSQLRegexp("
|
this.readableExpression = "Match("
|
||||||
+ leftArgument.getReadableExpression() + ","
|
+ leftArgument.getReadableExpression() + ","
|
||||||
+ rightArgument.getReadableExpression() + ")";
|
+ rightArgument.getReadableExpression() + ")";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class C_TextReplaceMatchingRegex extends C_Expression {
|
||||||
this.regexp = regexp;
|
this.regexp = regexp;
|
||||||
this.replacing = replacing;
|
this.replacing = replacing;
|
||||||
if (toCheckText != null && regexp != null && replacing != null) {
|
if (toCheckText != null && regexp != null && replacing != null) {
|
||||||
this.readableExpression = "TextReplaceMatchingRegex("
|
this.readableExpression = "ReplaceByExpression("
|
||||||
+ toCheckText.getReadableExpression() + ","
|
+ toCheckText.getReadableExpression() + ","
|
||||||
+ regexp.getReadableExpression() + ","
|
+ regexp.getReadableExpression() + ","
|
||||||
+ replacing.getReadableExpression() + ")";
|
+ replacing.getReadableExpression() + ")";
|
||||||
|
|
|
@ -17,9 +17,8 @@ public class C_ColumnReferencePlaceholder extends C_Leaf {
|
||||||
this.dataType = dataType;
|
this.dataType = dataType;
|
||||||
this.columnId = columnId;
|
this.columnId = columnId;
|
||||||
if (dataType != null && columnId != null) {
|
if (dataType != null && columnId != null) {
|
||||||
this.readableExpression = "PlaceHolder("
|
this.readableExpression = "$"+columnId+"["
|
||||||
+ dataType.getColumnDataTypeLabel() +
|
+ dataType.getColumnDataTypeLabel() + "]";
|
||||||
"," + columnId + ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,26 @@ public class TD_Value extends C_Leaf {
|
||||||
this.valueType = valueType;
|
this.valueType = valueType;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
if (valueType != null) {
|
if (valueType != null) {
|
||||||
this.readableExpression = "TDValue("
|
switch(valueType){
|
||||||
+ valueType.getColumnDataTypeLabel() + "," + value + ")";
|
case Boolean:
|
||||||
|
case Date:
|
||||||
|
case Geometry:
|
||||||
|
case Integer:
|
||||||
|
case Numeric:
|
||||||
|
this.readableExpression = value;
|
||||||
|
break;
|
||||||
|
case Text:
|
||||||
|
this.readableExpression = "\""+ value + "\"";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.readableExpression = "";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.readableExpression = "InvalidType";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue