ref 8580:TDM - TabMan - Support Java 8 compatibility
https://support.d4science.org/issues/8580 Updated compatibility to Java 8 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@148655 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cd417b9004
commit
1472f74c0b
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/tabular-data-expression-widget-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/tabular-data-expression-widget-1.10.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/tabular-data-expression-widget-1.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/tabular-data-expression-widget-1.10.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -32,5 +32,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/tabular-data-expression-widget-1.9.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/tabular-data-expression-widget-1.10.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.tabular-data-expression-widget.1-10-0"
|
||||
date="2017-06-12">
|
||||
<Change>Support Java 8 compatibility [ticket #8580]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.tabular-data-expression-widget.1-9-0"
|
||||
date="2017-02-15">
|
||||
<Change>Updated to new PortalContext [ticket #6548]</Change>
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-expression-widget</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<version>1.10.0-SNAPSHOT</version>
|
||||
|
||||
|
||||
<name>tabular-data-expression-widget</name>
|
||||
|
@ -40,6 +40,8 @@
|
|||
<distroDirectory>distro</distroDirectory>
|
||||
<configDirectory>config</configDirectory>
|
||||
|
||||
<!-- JAVA -->
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
|
||||
|
||||
<!-- Next -->
|
||||
|
@ -50,7 +52,7 @@
|
|||
|
||||
<KEYS>${env.KEYS}</KEYS>
|
||||
|
||||
<!-- GWT needs at least java 1.5 -->
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
@ -115,7 +117,7 @@
|
|||
<!-- <version>[1.0.2-SNAPSHOT,2.0.0-SNAPSHOT)</version> -->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- service-client-impl -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.analysis.tabulardata</groupId>
|
||||
|
|
|
@ -55,9 +55,8 @@ import com.sencha.gxt.widget.core.client.info.Info;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class ColumnExpressionPanel extends FramedPanel {
|
||||
private static final String RULE_DESCRIPTION_HEIGHT = "44px";
|
||||
|
@ -65,7 +64,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
private static final String WIDTH = "658px";
|
||||
private static final String HEIGHT = "364px";
|
||||
private static final String RULE_HEIGHT = "388px";
|
||||
|
||||
|
||||
private enum ColumnExpressionPanelType {
|
||||
ColumnFilter, RowDeleteByExpression, Template, RuleOnColumn;
|
||||
}
|
||||
|
@ -99,12 +98,16 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parentFilterDialog
|
||||
* parent
|
||||
* @param column
|
||||
* column
|
||||
* @param columns
|
||||
* list of column
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ColumnExpressionPanel(ColumnFilterDialog parentFilterDialog,
|
||||
ColumnData column, ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
public ColumnExpressionPanel(ColumnFilterDialog parentFilterDialog, ColumnData column,
|
||||
ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -119,13 +122,16 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parentRowsDeleteByExpressionDialog
|
||||
* parent
|
||||
* @param column
|
||||
* column
|
||||
* @param columns
|
||||
* list of column
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ColumnExpressionPanel(
|
||||
RowsDeleteByExpressionDialog parentRowsDeleteByExpressionDialog,
|
||||
ColumnData column, ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
public ColumnExpressionPanel(RowsDeleteByExpressionDialog parentRowsDeleteByExpressionDialog, ColumnData column,
|
||||
ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(RULE_HEIGHT);
|
||||
|
@ -140,12 +146,14 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parentColumnExpressionDialog
|
||||
* parent
|
||||
* @param column
|
||||
* column
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ColumnExpressionPanel(
|
||||
TemplateColumnExpressionDialog parentColumnExpressionDialog,
|
||||
ColumnData column, EventBus eventBus) {
|
||||
public ColumnExpressionPanel(TemplateColumnExpressionDialog parentColumnExpressionDialog, ColumnData column,
|
||||
EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -161,10 +169,11 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parent
|
||||
* parent
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ColumnExpressionPanel(RuleOnColumnCreateDialog parent,
|
||||
EventBus eventBus) {
|
||||
public ColumnExpressionPanel(RuleOnColumnCreateDialog parent, EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -239,12 +248,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
add(basicLayout);
|
||||
|
||||
if (initialRuleDescriptionData == null) {
|
||||
|
@ -267,21 +273,16 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
ruleDescription.setHeight(RULE_DESCRIPTION_HEIGHT);
|
||||
ruleDescription.setToolTip("Rule Description");
|
||||
if (initialRuleDescriptionData != null) {
|
||||
ruleDescription.setValue(initialRuleDescriptionData
|
||||
.getDescription());
|
||||
ruleDescription.setValue(initialRuleDescriptionData.getDescription());
|
||||
}
|
||||
FieldLabel ruleDescriptionLabel = new FieldLabel(ruleDescription,
|
||||
"Rule Description");
|
||||
FieldLabel ruleDescriptionLabel = new FieldLabel(ruleDescription, "Rule Description");
|
||||
|
||||
// comboDataType
|
||||
ColumnDataTypeProperties propsDataType = GWT
|
||||
.create(ColumnDataTypeProperties.class);
|
||||
ListStore<ColumnDataTypeElement> storeComboDataType = new ListStore<ColumnDataTypeElement>(
|
||||
propsDataType.id());
|
||||
ColumnDataTypeProperties propsDataType = GWT.create(ColumnDataTypeProperties.class);
|
||||
ListStore<ColumnDataTypeElement> storeComboDataType = new ListStore<ColumnDataTypeElement>(propsDataType.id());
|
||||
storeComboDataType.addAll(ColumnDataTypeStore.getAttributeType());
|
||||
|
||||
comboDataType = new ComboBox<ColumnDataTypeElement>(storeComboDataType,
|
||||
propsDataType.label());
|
||||
comboDataType = new ComboBox<ColumnDataTypeElement>(storeComboDataType, propsDataType.label());
|
||||
Log.trace("ComboDataType created");
|
||||
|
||||
addHandlersForComboAttributeType(propsDataType.label());
|
||||
|
@ -292,13 +293,11 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
comboDataType.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
if (initialRuleDescriptionData != null) {
|
||||
Log.debug("Initial RuleDescriptionData: "
|
||||
+ initialRuleDescriptionData);
|
||||
Log.debug("Initial RuleDescriptionData: " + initialRuleDescriptionData);
|
||||
ColumnDataType cdt = retrieveColumnDataType();
|
||||
if (cdt != null) {
|
||||
Log.debug("Retrieved column data type: " + cdt);
|
||||
ColumnDataTypeElement cdte = ColumnDataTypeStore
|
||||
.selectedAttributeElement(cdt);
|
||||
ColumnDataTypeElement cdte = ColumnDataTypeStore.selectedAttributeElement(cdt);
|
||||
if (cdte != null) {
|
||||
comboDataType.setValue(cdte);
|
||||
|
||||
|
@ -310,19 +309,15 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
comboDataTypeLabel = new FieldLabel(comboDataType, "Data Type");
|
||||
|
||||
propertiesLayout.add(ruleNameLabel, new VerticalLayoutData(1, -1,
|
||||
new Margins(0)));
|
||||
propertiesLayout.add(ruleDescriptionLabel, new VerticalLayoutData(1,
|
||||
-1, new Margins(0)));
|
||||
propertiesLayout.add(ruleNameLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
propertiesLayout.add(ruleDescriptionLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
propertiesLayout.add(comboDataTypeLabel, new VerticalLayoutData(1, -1,
|
||||
new Margins(0)));
|
||||
propertiesLayout.add(comboDataTypeLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
}
|
||||
|
||||
private ColumnDataType retrieveColumnDataType() {
|
||||
TDRuleType tdRuleColumnType = initialRuleDescriptionData
|
||||
.getTdRuleType();
|
||||
TDRuleType tdRuleColumnType = initialRuleDescriptionData.getTdRuleType();
|
||||
if (tdRuleColumnType instanceof TDBaseColumnRuleType) {
|
||||
TDBaseColumnRuleType tdBaseColumnRuleType = (TDBaseColumnRuleType) tdRuleColumnType;
|
||||
return tdBaseColumnRuleType.getColumnDataType();
|
||||
|
@ -332,27 +327,17 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
}
|
||||
|
||||
protected void addHandlersForComboAttributeType(
|
||||
final LabelProvider<ColumnDataTypeElement> labelProvider) {
|
||||
comboDataType
|
||||
.addSelectionHandler(new SelectionHandler<ColumnDataTypeElement>() {
|
||||
public void onSelection(
|
||||
SelectionEvent<ColumnDataTypeElement> event) {
|
||||
Info.display(
|
||||
"Attribute Type Selected",
|
||||
"You selected "
|
||||
+ (event.getSelectedItem() == null ? "nothing"
|
||||
: labelProvider.getLabel(event
|
||||
.getSelectedItem())
|
||||
+ "!"));
|
||||
Log.debug("ComboAttributeType selected: "
|
||||
+ event.getSelectedItem());
|
||||
ColumnDataTypeElement attributeType = event
|
||||
.getSelectedItem();
|
||||
updateDataType(attributeType.getType());
|
||||
}
|
||||
protected void addHandlersForComboAttributeType(final LabelProvider<ColumnDataTypeElement> labelProvider) {
|
||||
comboDataType.addSelectionHandler(new SelectionHandler<ColumnDataTypeElement>() {
|
||||
public void onSelection(SelectionEvent<ColumnDataTypeElement> event) {
|
||||
Info.display("Attribute Type Selected", "You selected " + (event.getSelectedItem() == null ? "nothing"
|
||||
: labelProvider.getLabel(event.getSelectedItem()) + "!"));
|
||||
Log.debug("ComboAttributeType selected: " + event.getSelectedItem());
|
||||
ColumnDataTypeElement attributeType = event.getSelectedItem();
|
||||
updateDataType(attributeType.getType());
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected void updateCondition() {
|
||||
|
@ -374,13 +359,11 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
protected ColumnMockUp retrieveColumnMockUp() {
|
||||
ColumnMockUp columnMockUp = null;
|
||||
|
||||
ColumnDataTypeElement columnDataTypeElement = comboDataType
|
||||
.getCurrentValue();
|
||||
ColumnDataTypeElement columnDataTypeElement = comboDataType.getCurrentValue();
|
||||
if (columnDataTypeElement != null) {
|
||||
ColumnDataType dataType = columnDataTypeElement.getType();
|
||||
if (dataType != null) {
|
||||
columnMockUp = new ColumnMockUp(null, RULE_PLACE_HOLDER_ID,
|
||||
dataType, RULE_PLACE_HOLDER_ID);
|
||||
columnMockUp = new ColumnMockUp(null, RULE_PLACE_HOLDER_ID, dataType, RULE_PLACE_HOLDER_ID);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -402,27 +385,21 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
String ruleDescriptionS = ruleDescription.getCurrentValue();
|
||||
|
||||
if (ruleDescriptionS != null && !ruleDescriptionS.isEmpty()) {
|
||||
ColumnDataTypeElement columnDataTypeElement = comboDataType
|
||||
.getCurrentValue();
|
||||
ColumnDataTypeElement columnDataTypeElement = comboDataType.getCurrentValue();
|
||||
if (columnDataTypeElement != null) {
|
||||
ColumnDataType dataType = columnDataTypeElement.getType();
|
||||
if (dataType != null) {
|
||||
columnMockUp = new ColumnMockUp(null,
|
||||
RULE_PLACE_HOLDER_ID, dataType,
|
||||
RULE_PLACE_HOLDER_ID);
|
||||
columnMockUp = new ColumnMockUp(null, RULE_PLACE_HOLDER_ID, dataType, RULE_PLACE_HOLDER_ID);
|
||||
|
||||
} else {
|
||||
UtilsGXT3.alert("Attention",
|
||||
"Column data type not selected!");
|
||||
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||
}
|
||||
} else {
|
||||
UtilsGXT3.alert("Attention",
|
||||
"Column data type not selected!");
|
||||
UtilsGXT3.alert("Attention", "Column data type not selected!");
|
||||
}
|
||||
|
||||
} else {
|
||||
UtilsGXT3.alert("Attention",
|
||||
"Enter a valid description for the rule!");
|
||||
UtilsGXT3.alert("Attention", "Enter a valid description for the rule!");
|
||||
}
|
||||
} else {
|
||||
UtilsGXT3.alert("Attention", "Enter a valid name for the rule!");
|
||||
|
@ -437,12 +414,10 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
if (exp != null) {
|
||||
String ruleNameS = ruleName.getCurrentValue();
|
||||
String ruleDescriptionS = ruleDescription.getCurrentValue();
|
||||
TDBaseColumnRuleType tdBaseColumnRule = new TDBaseColumnRuleType(
|
||||
columnMockUp.getColumnDataType());
|
||||
TDBaseColumnRuleType tdBaseColumnRule = new TDBaseColumnRuleType(columnMockUp.getColumnDataType());
|
||||
|
||||
RuleDescriptionData ruleDescriptionData = new RuleDescriptionData(
|
||||
0, ruleNameS, ruleDescriptionS, new Date(),
|
||||
null, null, RuleScopeType.COLUMN, exp, tdBaseColumnRule);
|
||||
RuleDescriptionData ruleDescriptionData = new RuleDescriptionData(0, ruleNameS, ruleDescriptionS,
|
||||
new Date(), null, null, RuleScopeType.COLUMN, exp, tdBaseColumnRule);
|
||||
return ruleDescriptionData;
|
||||
} else {
|
||||
UtilsGXT3.alert("Attention", "Enter a valid condition!");
|
||||
|
@ -488,15 +463,13 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
columnType.setToolTip("The type of column");
|
||||
columnType.setReadOnly(true);
|
||||
columnType.setValue(column.getTypeCode());
|
||||
propertiesLayout.add(new FieldLabel(columnType, "Column Type"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
propertiesLayout.add(new FieldLabel(columnType, "Column Type"), new VerticalLayoutData(1, -1));
|
||||
|
||||
TextField dataType = new TextField();
|
||||
dataType.setToolTip("The data type");
|
||||
dataType.setReadOnly(true);
|
||||
dataType.setValue(column.getDataTypeName());
|
||||
propertiesLayout.add(new FieldLabel(dataType, "Data Type"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
propertiesLayout.add(new FieldLabel(dataType, "Data Type"), new VerticalLayoutData(1, -1));
|
||||
|
||||
conditionsField = new FieldSet();
|
||||
conditionsField.setHeadingText("Conditions");
|
||||
|
@ -535,12 +508,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
add(basicLayout);
|
||||
|
||||
}
|
||||
|
@ -569,11 +539,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
properties.add(propertiesLayout);
|
||||
|
||||
// Combo Column
|
||||
ColumnDataPropertiesCombo propsCols = GWT
|
||||
.create(ColumnDataPropertiesCombo.class);
|
||||
ColumnDataPropertiesCombo propsCols = GWT.create(ColumnDataPropertiesCombo.class);
|
||||
Log.debug("Props: " + propsCols);
|
||||
final ListStore<ColumnData> storeCols = new ListStore<ColumnData>(
|
||||
propsCols.id());
|
||||
final ListStore<ColumnData> storeCols = new ListStore<ColumnData>(propsCols.id());
|
||||
Log.debug("Store Col: " + storeCols);
|
||||
storeCols.addAll(columns);
|
||||
|
||||
|
@ -590,8 +558,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
setSelectedColumn();
|
||||
|
||||
propertiesLayout.add(new FieldLabel(comboCols, "Column"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
propertiesLayout.add(new FieldLabel(comboCols, "Column"), new VerticalLayoutData(1, -1));
|
||||
|
||||
//
|
||||
conditionsField = new FieldSet();
|
||||
|
@ -632,12 +599,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
|
||||
add(basicLayout);
|
||||
|
||||
|
@ -667,11 +631,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
properties.add(propertiesLayout);
|
||||
|
||||
// Combo Column
|
||||
ColumnDataPropertiesCombo propsCols = GWT
|
||||
.create(ColumnDataPropertiesCombo.class);
|
||||
ColumnDataPropertiesCombo propsCols = GWT.create(ColumnDataPropertiesCombo.class);
|
||||
Log.debug("Props: " + propsCols);
|
||||
final ListStore<ColumnData> storeCols = new ListStore<ColumnData>(
|
||||
propsCols.id());
|
||||
final ListStore<ColumnData> storeCols = new ListStore<ColumnData>(propsCols.id());
|
||||
Log.debug("Store Col: " + storeCols);
|
||||
storeCols.addAll(columns);
|
||||
|
||||
|
@ -688,8 +650,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
setSelectedColumn();
|
||||
|
||||
propertiesLayout.add(new FieldLabel(comboCols, "Column"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
propertiesLayout.add(new FieldLabel(comboCols, "Column"), new VerticalLayoutData(1, -1));
|
||||
|
||||
//
|
||||
conditionsField = new FieldSet();
|
||||
|
@ -701,8 +662,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
conditionsField.add(conditionWidget);
|
||||
|
||||
btnApply = new TextButton("Delete");
|
||||
btnApply.setIcon(ExpressionResources.INSTANCE
|
||||
.tableRowDeleteByExpression());
|
||||
btnApply.setIcon(ExpressionResources.INSTANCE.tableRowDeleteByExpression());
|
||||
btnApply.setIconAlign(IconAlign.RIGHT);
|
||||
btnApply.setToolTip("Delete rows");
|
||||
btnApply.addSelectHandler(new SelectHandler() {
|
||||
|
@ -731,12 +691,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
|
||||
add(basicLayout);
|
||||
|
||||
|
@ -746,14 +703,11 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
if (column == null) {
|
||||
|
||||
} else {
|
||||
ColumnTypeCode typeCode = ColumnTypeCode
|
||||
.getColumnTypeCodeFromId(column.getTypeCode());
|
||||
ColumnTypeCode typeCode = ColumnTypeCode.getColumnTypeCodeFromId(column.getTypeCode());
|
||||
HTML errorMessage;
|
||||
if (typeCode == null) {
|
||||
errorMessage = new HTML(
|
||||
"This column has column data type null!");
|
||||
UtilsGXT3.alert("Error",
|
||||
"This column has column data type null!!");
|
||||
errorMessage = new HTML("This column has column data type null!");
|
||||
UtilsGXT3.alert("Error", "This column has column data type null!!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -768,18 +722,14 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
break;
|
||||
case DIMENSION:
|
||||
case TIMEDIMENSION:
|
||||
errorMessage = new HTML(
|
||||
"This type of column is not supported for now!");
|
||||
errorMessage = new HTML("This type of column is not supported for now!");
|
||||
add(errorMessage);
|
||||
UtilsGXT3.alert("Error",
|
||||
"This type of column is not supported for now!");
|
||||
UtilsGXT3.alert("Error", "This type of column is not supported for now!");
|
||||
break;
|
||||
default:
|
||||
errorMessage = new HTML(
|
||||
"This type of column is not supported for now!");
|
||||
errorMessage = new HTML("This type of column is not supported for now!");
|
||||
add(errorMessage);
|
||||
UtilsGXT3.alert("Error",
|
||||
"This type of column is not supported for now!");
|
||||
UtilsGXT3.alert("Error", "This type of column is not supported for now!");
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -838,8 +788,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
columnName.setToolTip("Column");
|
||||
columnName.setReadOnly(true);
|
||||
columnName.setValue(column.getLabel());
|
||||
propertiesLayout.add(new FieldLabel(columnName, "Column"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
propertiesLayout.add(new FieldLabel(columnName, "Column"), new VerticalLayoutData(1, -1));
|
||||
|
||||
conditionsField = new FieldSet();
|
||||
conditionsField.setHeadingText("Conditions");
|
||||
|
@ -864,12 +813,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(properties, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
add(basicLayout);
|
||||
|
||||
}
|
||||
|
@ -893,11 +839,9 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
condContainer = new C_ExpressionContainer();
|
||||
condContainer.setId(C_ExpressionContainer.Contains.C_Expression);
|
||||
condContainer.setExp(exp);
|
||||
exWrapper = new ExpressionWrapper(column.getTrId(), column,
|
||||
condContainer);
|
||||
exWrapper = new ExpressionWrapper(column.getTrId(), column, condContainer);
|
||||
|
||||
ExpressionWrapperNotification expressionWrapperNotification = new ExpressionWrapperNotification(
|
||||
exWrapper);
|
||||
ExpressionWrapperNotification expressionWrapperNotification = new ExpressionWrapperNotification(exWrapper);
|
||||
Log.debug("Notification: " + expressionWrapperNotification);
|
||||
parentTemplateDialog.onExpression(expressionWrapperNotification);
|
||||
break;
|
||||
|
@ -937,8 +881,7 @@ public class ColumnExpressionPanel extends FramedPanel {
|
|||
return;
|
||||
}
|
||||
C_Expression notExp = new C_Not(exp);
|
||||
parentRowsDeleteByExpressionDialog.deleteRowsByExpression(column,
|
||||
notExp);
|
||||
parentRowsDeleteByExpressionDialog.deleteRowsByExpression(column, notExp);
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnFilterDialog extends Window implements MonitorDialogListener {
|
||||
|
|
|
@ -19,8 +19,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionWidgetEntry implements EntryPoint {
|
||||
|
|
|
@ -47,8 +47,8 @@ import com.sencha.gxt.widget.core.client.form.validator.EmptyValidator;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MultiColumnExpressionPanel extends FramedPanel {
|
||||
|
@ -66,7 +66,6 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
private static final String RULE_DESCRIPTION_HEIGHT = "44px";
|
||||
|
||||
|
||||
private enum MultiColumnExpressionPanelType {
|
||||
ColumnFilter, RowDeleteByExpression, Template, RuleOnTable;
|
||||
}
|
||||
|
@ -96,12 +95,14 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param columncreateOnRule
|
||||
* parent
|
||||
* @param columns
|
||||
* list of column
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public MultiColumnExpressionPanel(MultiColumnFilterDialog parent,
|
||||
ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
public MultiColumnExpressionPanel(MultiColumnFilterDialog parent, ArrayList<ColumnData> columns,
|
||||
EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -114,13 +115,14 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param column
|
||||
* Parent
|
||||
* @param columns
|
||||
* List of column
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public MultiColumnExpressionPanel(
|
||||
RowsDeleteByMultiColumnExpressionDialog parent,
|
||||
ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
public MultiColumnExpressionPanel(RowsDeleteByMultiColumnExpressionDialog parent, ArrayList<ColumnData> columns,
|
||||
EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(ROWS_DELETE_HEIGHT);
|
||||
|
@ -133,12 +135,14 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param column
|
||||
* parent
|
||||
* @param columns
|
||||
* list of column
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public MultiColumnExpressionPanel(
|
||||
TemplateMultiColumnExpressionDialog parent,
|
||||
ArrayList<ColumnData> columns, EventBus eventBus) {
|
||||
public MultiColumnExpressionPanel(TemplateMultiColumnExpressionDialog parent, ArrayList<ColumnData> columns,
|
||||
EventBus eventBus) {
|
||||
super();
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -151,10 +155,13 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param eventBus
|
||||
* parent
|
||||
* @param initialRuleDescriptionData
|
||||
* initial rule description
|
||||
* @throws MultiColumnExpressionPanelException
|
||||
* exception
|
||||
*/
|
||||
public MultiColumnExpressionPanel(RuleOnTableCreateDialog parent,
|
||||
RuleDescriptionData initialRuleDescriptionData)
|
||||
public MultiColumnExpressionPanel(RuleOnTableCreateDialog parent, RuleDescriptionData initialRuleDescriptionData)
|
||||
throws MultiColumnExpressionPanelException {
|
||||
super();
|
||||
Log.debug("MultiColumnExpressionPanel");
|
||||
|
@ -169,15 +176,13 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
protected void retrieveColumns() throws MultiColumnExpressionPanelException {
|
||||
if (initialRuleDescriptionData == null) {
|
||||
Log.error("No rules description data present!");
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"No rules description data present!");
|
||||
throw new MultiColumnExpressionPanelException("No rules description data present!");
|
||||
}
|
||||
|
||||
TDRuleType tdRuleType = initialRuleDescriptionData.getTdRuleType();
|
||||
if (tdRuleType == null) {
|
||||
Log.error("No Rule Type present!");
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"No Rule Type present!");
|
||||
throw new MultiColumnExpressionPanelException("No Rule Type present!");
|
||||
}
|
||||
|
||||
if (tdRuleType instanceof TDRuleTableType) {
|
||||
|
@ -190,8 +195,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
col.setId(ruleColumnPlaceHolderDescriptor.getId());
|
||||
col.setColumnId(ruleColumnPlaceHolderDescriptor.getLabel());
|
||||
col.setLabel(ruleColumnPlaceHolderDescriptor.getLabel());
|
||||
col.setDataTypeName(ruleColumnPlaceHolderDescriptor
|
||||
.getColumnDataType().getId());
|
||||
col.setDataTypeName(ruleColumnPlaceHolderDescriptor.getColumnDataType().getId());
|
||||
columns.add(col);
|
||||
}
|
||||
|
||||
|
@ -199,8 +203,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
} else {
|
||||
Log.error("No Table Rule Type present!");
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"No Table Rule Type present!");
|
||||
throw new MultiColumnExpressionPanelException("No Table Rule Type present!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,8 +227,8 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
conditionsField.setCollapsible(false);
|
||||
conditionsField.setWidth(RULE_CONDITION_FIELD_WIDTH);
|
||||
|
||||
conditionWidget = new ConditionOnMultiColumnWidget(columns,
|
||||
RULE_MULTI_CONDITION_WIDTH, RULE_MULTI_CONDITION_HEIGHT);
|
||||
conditionWidget = new ConditionOnMultiColumnWidget(columns, RULE_MULTI_CONDITION_WIDTH,
|
||||
RULE_MULTI_CONDITION_HEIGHT);
|
||||
conditionsField.add(conditionWidget);
|
||||
|
||||
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
|
||||
|
@ -257,24 +260,19 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
}
|
||||
});
|
||||
|
||||
flowButton
|
||||
.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
flowButton
|
||||
.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
VerticalLayoutContainer basicLayout = new VerticalLayoutContainer();
|
||||
// basicLayout.setAdjustForScroll(true);
|
||||
|
||||
basicLayout.add(propertiesField, new VerticalLayoutData(1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(propertiesField, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
|
||||
if (parentRuleOnTableCreateDialog != null) {
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36,
|
||||
new Margins(5, 2, 5, 2)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
}
|
||||
add(basicLayout);
|
||||
|
||||
|
@ -293,8 +291,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
}
|
||||
}
|
||||
|
||||
private void createRuleOnTableDecription(
|
||||
VerticalLayoutContainer propertiesLayout) {
|
||||
private void createRuleOnTableDecription(VerticalLayoutContainer propertiesLayout) {
|
||||
ruleName = new TextField();
|
||||
ruleName.addValidator(new EmptyValidator<String>());
|
||||
ruleName.setToolTip("Rule Name");
|
||||
|
@ -308,16 +305,12 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
ruleDescription.setHeight(RULE_DESCRIPTION_HEIGHT);
|
||||
ruleDescription.setToolTip("Rule Description");
|
||||
if (initialRuleDescriptionData != null) {
|
||||
ruleDescription.setValue(initialRuleDescriptionData
|
||||
.getDescription());
|
||||
ruleDescription.setValue(initialRuleDescriptionData.getDescription());
|
||||
}
|
||||
FieldLabel ruleDescriptionLabel = new FieldLabel(ruleDescription,
|
||||
"Rule Description");
|
||||
FieldLabel ruleDescriptionLabel = new FieldLabel(ruleDescription, "Rule Description");
|
||||
|
||||
propertiesLayout.add(ruleNameLabel, new VerticalLayoutData(1, -1,
|
||||
new Margins(0)));
|
||||
propertiesLayout.add(ruleDescriptionLabel, new VerticalLayoutData(1,
|
||||
-1, new Margins(0)));
|
||||
propertiesLayout.add(ruleNameLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
propertiesLayout.add(ruleDescriptionLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
}
|
||||
|
||||
|
@ -328,22 +321,18 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
if (exp != null) {
|
||||
String ruleNameS = ruleName.getCurrentValue();
|
||||
String ruleDescriptionS = ruleDescription.getCurrentValue();
|
||||
RuleDescriptionData ruleDescriptionData = new RuleDescriptionData(
|
||||
0, ruleNameS, ruleDescriptionS, new Date(), null,
|
||||
null, RuleScopeType.TABLE, exp,
|
||||
RuleDescriptionData ruleDescriptionData = new RuleDescriptionData(0, ruleNameS, ruleDescriptionS,
|
||||
new Date(), null, null, RuleScopeType.TABLE, exp,
|
||||
initialRuleDescriptionData.getTdRuleType());
|
||||
return ruleDescriptionData;
|
||||
} else {
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"Enter a valid condition!");
|
||||
throw new MultiColumnExpressionPanelException("Enter a valid condition!");
|
||||
}
|
||||
} else {
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"Enter a valid description for the rule!");
|
||||
throw new MultiColumnExpressionPanelException("Enter a valid description for the rule!");
|
||||
}
|
||||
} else {
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
"Enter a valid name for the rule!");
|
||||
throw new MultiColumnExpressionPanelException("Enter a valid name for the rule!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -401,10 +390,8 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
// basicLayout.setAdjustForScroll(true);
|
||||
// basicLayout.setScrollMode(ScrollMode.AUTO); Set In GXT 3.0.1
|
||||
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
add(basicLayout);
|
||||
|
||||
}
|
||||
|
@ -456,10 +443,8 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
VerticalLayoutContainer basicLayout = new VerticalLayoutContainer();
|
||||
// basicLayout.setAdjustForScroll(true);
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1,
|
||||
new Margins(0)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
|
||||
add(basicLayout);
|
||||
|
||||
|
@ -485,8 +470,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
conditionsField.add(conditionWidget);
|
||||
|
||||
btnApply = new TextButton("Delete");
|
||||
btnApply.setIcon(ExpressionResources.INSTANCE
|
||||
.tableRowDeleteByExpression());
|
||||
btnApply.setIcon(ExpressionResources.INSTANCE.tableRowDeleteByExpression());
|
||||
btnApply.setIconAlign(IconAlign.RIGHT);
|
||||
btnApply.setToolTip("Delete rows");
|
||||
btnApply.addSelectHandler(new SelectHandler() {
|
||||
|
@ -514,10 +498,8 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
VerticalLayoutContainer basicLayout = new VerticalLayoutContainer();
|
||||
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1,
|
||||
new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
basicLayout.add(conditionsField, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
basicLayout.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2)));
|
||||
|
||||
add(basicLayout);
|
||||
|
||||
|
@ -527,14 +509,11 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
if (column == null) {
|
||||
|
||||
} else {
|
||||
ColumnTypeCode typeCode = ColumnTypeCode
|
||||
.getColumnTypeCodeFromId(column.getTypeCode());
|
||||
ColumnTypeCode typeCode = ColumnTypeCode.getColumnTypeCodeFromId(column.getTypeCode());
|
||||
HTML errorMessage;
|
||||
if (typeCode == null) {
|
||||
errorMessage = new HTML(
|
||||
"This column has column data type null!");
|
||||
UtilsGXT3.alert("Error",
|
||||
"This column has column data type null!!");
|
||||
errorMessage = new HTML("This column has column data type null!");
|
||||
UtilsGXT3.alert("Error", "This column has column data type null!!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -549,18 +528,14 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
break;
|
||||
case DIMENSION:
|
||||
case TIMEDIMENSION:
|
||||
errorMessage = new HTML(
|
||||
"This type of column is not supported for now!");
|
||||
errorMessage = new HTML("This type of column is not supported for now!");
|
||||
add(errorMessage);
|
||||
UtilsGXT3.alert("Error",
|
||||
"This type of column is not supported for now!");
|
||||
UtilsGXT3.alert("Error", "This type of column is not supported for now!");
|
||||
break;
|
||||
default:
|
||||
errorMessage = new HTML(
|
||||
"This type of column is not supported for now!");
|
||||
errorMessage = new HTML("This type of column is not supported for now!");
|
||||
add(errorMessage);
|
||||
UtilsGXT3.alert("Error",
|
||||
"This type of column is not supported for now!");
|
||||
UtilsGXT3.alert("Error", "This type of column is not supported for now!");
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -609,8 +584,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
condContainer.setExp(exp);
|
||||
exWrapper = new ExpressionWrapper(null, null, condContainer);
|
||||
|
||||
ExpressionWrapperNotification expressionWrapperNotification = new ExpressionWrapperNotification(
|
||||
exWrapper);
|
||||
ExpressionWrapperNotification expressionWrapperNotification = new ExpressionWrapperNotification(exWrapper);
|
||||
Log.debug("Apply: " + expressionWrapperNotification);
|
||||
parentTemplateDialog.onExpression(expressionWrapperNotification);
|
||||
break;
|
||||
|
@ -672,8 +646,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
|
||||
}
|
||||
|
||||
public RuleDescriptionData getRuleOnTable()
|
||||
throws MultiColumnExpressionPanelException {
|
||||
public RuleDescriptionData getRuleOnTable() throws MultiColumnExpressionPanelException {
|
||||
if (!conditionWidget.isEnabled()) {
|
||||
throw new MultiColumnExpressionPanelException("Fill all field!");
|
||||
}
|
||||
|
@ -684,8 +657,7 @@ public class MultiColumnExpressionPanel extends FramedPanel {
|
|||
exp = conditionWidget.getExpression();
|
||||
} catch (ConditionTypeMapException e) {
|
||||
Log.debug(e.getLocalizedMessage());
|
||||
throw new MultiColumnExpressionPanelException(
|
||||
e.getLocalizedMessage());
|
||||
throw new MultiColumnExpressionPanelException(e.getLocalizedMessage());
|
||||
}
|
||||
RuleDescriptionData ruleDescriptionData = retrieveRuleDescriptionData(exp);
|
||||
return ruleDescriptionData;
|
||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MultiColumnFilterDialog extends Window implements MonitorDialogListener {
|
||||
|
|
|
@ -34,12 +34,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceColumnByExpressionDialog extends Window implements
|
||||
MonitorDialogListener {
|
||||
public class ReplaceColumnByExpressionDialog extends Window implements MonitorDialogListener {
|
||||
private static final String WIDTH = "900px";
|
||||
private static final String HEIGHT = "490px";
|
||||
// private static final String HEIGHT_REDUCE = "404px";
|
||||
|
@ -58,13 +57,16 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
*
|
||||
* Columns must have set columnId, label, columnTypeCode and ColumnDataType
|
||||
*
|
||||
* @param column
|
||||
* The column selected
|
||||
* @param columns
|
||||
*
|
||||
* @param columnMockUp
|
||||
* column mockup
|
||||
* @param columnMockUpList
|
||||
* columns mockup list
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ReplaceColumnByExpressionDialog(ColumnMockUp columnMockUp,
|
||||
ArrayList<ColumnMockUp> columnMockUpList, EventBus eventBus) {
|
||||
public ReplaceColumnByExpressionDialog(ColumnMockUp columnMockUp, ArrayList<ColumnMockUp> columnMockUpList,
|
||||
EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
column = new ColumnData();
|
||||
column.setColumnId(columnMockUp.getColumnId());
|
||||
|
@ -92,15 +94,17 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
/**
|
||||
*
|
||||
* @param trId
|
||||
* @param columnName
|
||||
* tabular resource id
|
||||
* @param columnId
|
||||
* column id
|
||||
* @param eventBus
|
||||
* event bus
|
||||
*/
|
||||
public ReplaceColumnByExpressionDialog(TRId trId, String columnId,
|
||||
EventBus eventBus) {
|
||||
public ReplaceColumnByExpressionDialog(TRId trId, String columnId, EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
this.trId = trId;
|
||||
if (columnId == null) {
|
||||
column=null;
|
||||
column = null;
|
||||
} else {
|
||||
column = new ColumnData();
|
||||
column.setColumnId(columnId);
|
||||
|
@ -119,14 +123,11 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
setResizable(false);
|
||||
setHeadingText("Replace Column By Expression");
|
||||
setClosable(true);
|
||||
getHeader().setIcon(
|
||||
ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void initTools() {
|
||||
super.initTools();
|
||||
|
@ -141,8 +142,8 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
protected void create() {
|
||||
replaceColumnByExpressionPanel = new ReplaceColumnByExpressionPanel(
|
||||
this, column, columns, eventBus, replaceExpressionType);
|
||||
replaceColumnByExpressionPanel = new ReplaceColumnByExpressionPanel(this, column, columns, eventBus,
|
||||
replaceExpressionType);
|
||||
add(replaceColumnByExpressionPanel);
|
||||
}
|
||||
|
||||
|
@ -155,59 +156,52 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
this.cConditionExpression = exp;
|
||||
}
|
||||
|
||||
protected void applyReplaceColumnByExpression(ColumnData column,
|
||||
boolean allRows, C_Expression cConditionExpression,
|
||||
protected void applyReplaceColumnByExpression(ColumnData column, boolean allRows, C_Expression cConditionExpression,
|
||||
String replaceValue) {
|
||||
this.column = column;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(
|
||||
column, allRows, cConditionExpression, replaceValue);
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(column,
|
||||
allRows, cConditionExpression, replaceValue);
|
||||
callApplyReplaceByExpression(replaceColumnByExpressionSession);
|
||||
}
|
||||
|
||||
protected void applyReplaceColumnByExpression(ColumnData column,
|
||||
boolean allRows, C_Expression cConditionExpression,
|
||||
protected void applyReplaceColumnByExpression(ColumnData column, boolean allRows, C_Expression cConditionExpression,
|
||||
C_Expression cReplaceExpression) {
|
||||
this.column = column;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(
|
||||
column, allRows, cConditionExpression, cReplaceExpression);
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(column,
|
||||
allRows, cConditionExpression, cReplaceExpression);
|
||||
callApplyReplaceByExpression(replaceColumnByExpressionSession);
|
||||
}
|
||||
|
||||
protected void load() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId, new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column",
|
||||
caught.getMessage());
|
||||
}
|
||||
}
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: " + caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column", caught.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -215,14 +209,11 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
ArrayList<ColumnData> removableColumn = new ArrayList<ColumnData>();
|
||||
for (ColumnData c : columns) {
|
||||
if (c.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString()) == 0
|
||||
|| c.getTypeCode().compareTo(
|
||||
ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
|| c.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
removableColumn.add(c);
|
||||
} else {
|
||||
if (c.getColumnId() != null && column != null
|
||||
&& column.getColumnId() != null
|
||||
&& !column.getColumnId().isEmpty()
|
||||
&& c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
if (c.getColumnId() != null && column != null && column.getColumnId() != null
|
||||
&& !column.getColumnId().isEmpty() && c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
column = c;
|
||||
}
|
||||
}
|
||||
|
@ -230,13 +221,11 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
columns.removeAll(removableColumn);
|
||||
}
|
||||
|
||||
protected void callApplyReplaceByExpression(
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession) {
|
||||
Log.debug("Replace Column By Expression Session "
|
||||
+ replaceColumnByExpressionSession);
|
||||
protected void callApplyReplaceByExpression(ReplaceColumnByExpressionSession replaceColumnByExpressionSession) {
|
||||
Log.debug("Replace Column By Expression Session " + replaceColumnByExpressionSession);
|
||||
|
||||
ExpressionServiceAsync.INSTANCE.startReplaceColumnByExpression(
|
||||
replaceColumnByExpressionSession, new AsyncCallback<String>() {
|
||||
ExpressionServiceAsync.INSTANCE.startReplaceColumnByExpression(replaceColumnByExpressionSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String taskId) {
|
||||
|
@ -248,25 +237,21 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error submitting replace column by expression: "
|
||||
+ caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
UtilsGXT3
|
||||
.alert("Error submitting replace column by expression",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error submitting replace column by expression",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -291,8 +276,7 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
public void operationComplete(OperationResult operationResult) {
|
||||
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(),
|
||||
why);
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(), why);
|
||||
eventBus.fireEvent(changeTableRequestEvent);
|
||||
close();
|
||||
}
|
||||
|
@ -305,12 +289,10 @@ public class ReplaceColumnByExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void operationStopped(OperationResult operationResult,
|
||||
String reason, String details) {
|
||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
||||
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(),
|
||||
why);
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(), why);
|
||||
eventBus.fireEvent(changeTableRequestEvent);
|
||||
close();
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceColumnByExpressionPanel extends FramedPanel {
|
||||
|
|
|
@ -34,12 +34,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceColumnByMultiColumnExpressionDialog extends Window implements
|
||||
MonitorDialogListener {
|
||||
public class ReplaceColumnByMultiColumnExpressionDialog extends Window implements MonitorDialogListener {
|
||||
private static final String WIDTH = "950px";
|
||||
private static final String HEIGHT = "490px";
|
||||
// private static final String HEIGHT_REDUCE = "404px";
|
||||
|
@ -58,10 +57,12 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
*
|
||||
* Columns must have set columnId, label, columnTypeCode and ColumnDataType
|
||||
*
|
||||
* @param column
|
||||
* The column selected
|
||||
* @param columns
|
||||
* @param columnMockUp
|
||||
* Column mockup
|
||||
* @param columnMockUpList
|
||||
* List of column mockup
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public ReplaceColumnByMultiColumnExpressionDialog(ColumnMockUp columnMockUp,
|
||||
ArrayList<ColumnMockUp> columnMockUpList, EventBus eventBus) {
|
||||
|
@ -92,15 +93,17 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
/**
|
||||
*
|
||||
* @param trId
|
||||
* @param columnName
|
||||
* Tabular Resource id
|
||||
* @param columnId
|
||||
* Column id
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public ReplaceColumnByMultiColumnExpressionDialog(TRId trId, String columnId,
|
||||
EventBus eventBus) {
|
||||
public ReplaceColumnByMultiColumnExpressionDialog(TRId trId, String columnId, EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
this.trId = trId;
|
||||
if (columnId == null) {
|
||||
column=null;
|
||||
column = null;
|
||||
} else {
|
||||
column = new ColumnData();
|
||||
column.setColumnId(columnId);
|
||||
|
@ -119,8 +122,7 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
setResizable(false);
|
||||
setHeadingText("Replace Column By Expression");
|
||||
setClosable(true);
|
||||
getHeader().setIcon(
|
||||
ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
|
||||
}
|
||||
|
||||
|
@ -141,8 +143,8 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
}
|
||||
|
||||
protected void create() {
|
||||
replaceColumnByMultiColumnExpressionPanel = new ReplaceColumnByMultiColumnExpressionPanel(
|
||||
this, column, columns, eventBus, replaceExpressionType);
|
||||
replaceColumnByMultiColumnExpressionPanel = new ReplaceColumnByMultiColumnExpressionPanel(this, column, columns,
|
||||
eventBus, replaceExpressionType);
|
||||
add(replaceColumnByMultiColumnExpressionPanel);
|
||||
}
|
||||
|
||||
|
@ -155,59 +157,52 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
this.cConditionExpression = exp;
|
||||
}
|
||||
|
||||
protected void applyReplaceColumnByExpression(ColumnData column,
|
||||
boolean allRows, C_Expression cConditionExpression,
|
||||
protected void applyReplaceColumnByExpression(ColumnData column, boolean allRows, C_Expression cConditionExpression,
|
||||
String replaceValue) {
|
||||
this.column = column;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(
|
||||
column, allRows, cConditionExpression, replaceValue);
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(column,
|
||||
allRows, cConditionExpression, replaceValue);
|
||||
callApplyReplaceByExpression(replaceColumnByExpressionSession);
|
||||
}
|
||||
|
||||
protected void applyReplaceColumnByExpression(ColumnData column,
|
||||
boolean allRows, C_Expression cConditionExpression,
|
||||
protected void applyReplaceColumnByExpression(ColumnData column, boolean allRows, C_Expression cConditionExpression,
|
||||
C_Expression cReplaceExpression) {
|
||||
this.column = column;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(
|
||||
column, allRows, cConditionExpression, cReplaceExpression);
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession = new ReplaceColumnByExpressionSession(column,
|
||||
allRows, cConditionExpression, cReplaceExpression);
|
||||
callApplyReplaceByExpression(replaceColumnByExpressionSession);
|
||||
}
|
||||
|
||||
protected void load() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId, new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column",
|
||||
caught.getMessage());
|
||||
}
|
||||
}
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: " + caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column", caught.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -215,14 +210,11 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
ArrayList<ColumnData> removableColumn = new ArrayList<ColumnData>();
|
||||
for (ColumnData c : columns) {
|
||||
if (c.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString()) == 0
|
||||
|| c.getTypeCode().compareTo(
|
||||
ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
|| c.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
removableColumn.add(c);
|
||||
} else {
|
||||
if (c.getColumnId() != null && column != null
|
||||
&& column.getColumnId() != null
|
||||
&& !column.getColumnId().isEmpty()
|
||||
&& c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
if (c.getColumnId() != null && column != null && column.getColumnId() != null
|
||||
&& !column.getColumnId().isEmpty() && c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
column = c;
|
||||
}
|
||||
}
|
||||
|
@ -230,13 +222,11 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
columns.removeAll(removableColumn);
|
||||
}
|
||||
|
||||
protected void callApplyReplaceByExpression(
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionSession) {
|
||||
Log.debug("Replace Column By Expression Session "
|
||||
+ replaceColumnByExpressionSession);
|
||||
protected void callApplyReplaceByExpression(ReplaceColumnByExpressionSession replaceColumnByExpressionSession) {
|
||||
Log.debug("Replace Column By Expression Session " + replaceColumnByExpressionSession);
|
||||
|
||||
ExpressionServiceAsync.INSTANCE.startReplaceColumnByExpression(
|
||||
replaceColumnByExpressionSession, new AsyncCallback<String>() {
|
||||
ExpressionServiceAsync.INSTANCE.startReplaceColumnByExpression(replaceColumnByExpressionSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String taskId) {
|
||||
|
@ -248,25 +238,21 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error submitting replace column by expression: "
|
||||
+ caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
UtilsGXT3
|
||||
.alert("Error submitting replace column by expression",
|
||||
caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error submitting replace column by expression",
|
||||
caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -291,8 +277,7 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
public void operationComplete(OperationResult operationResult) {
|
||||
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(),
|
||||
why);
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(), why);
|
||||
eventBus.fireEvent(changeTableRequestEvent);
|
||||
close();
|
||||
}
|
||||
|
@ -305,12 +290,10 @@ public class ReplaceColumnByMultiColumnExpressionDialog extends Window implement
|
|||
}
|
||||
|
||||
@Override
|
||||
public void operationStopped(OperationResult operationResult,
|
||||
String reason, String details) {
|
||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
||||
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(),
|
||||
why);
|
||||
ChangeTableRequestType.COLUMNFILTER, operationResult.getTrId(), why);
|
||||
eventBus.fireEvent(changeTableRequestEvent);
|
||||
close();
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceColumnByMultiColumnExpressionPanel extends FramedPanel {
|
||||
|
|
|
@ -27,18 +27,17 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceExpressionDialog extends Window implements
|
||||
HasExpressionWrapperNotificationListener {
|
||||
public class ReplaceExpressionDialog extends Window implements HasExpressionWrapperNotificationListener {
|
||||
private static final String WIDTH = "900px";
|
||||
private static final String HEIGHT = "360px";
|
||||
private ArrayList<ExpressionWrapperNotificationListener> listeners;
|
||||
private ColumnData column;
|
||||
private ArrayList<ColumnData> columns;
|
||||
//private String columnLocalId;
|
||||
// private String columnLocalId;
|
||||
private TRId trId;
|
||||
private EventBus eventBus;
|
||||
|
||||
|
@ -53,14 +52,16 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
*
|
||||
*
|
||||
* @param column
|
||||
* Column
|
||||
* @param trId
|
||||
* Tabular Resource id
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public ReplaceExpressionDialog(ColumnData column, TRId trId,
|
||||
EventBus eventBus) {
|
||||
listeners=new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
public ReplaceExpressionDialog(ColumnData column, TRId trId, EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
this.eventBus = eventBus;
|
||||
this.trId=trId;
|
||||
this.trId = trId;
|
||||
this.column = column;
|
||||
type = ReplaceExpressionType.Replace;
|
||||
initWindow();
|
||||
|
@ -68,23 +69,24 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* ColumnMockUp must have set columnId, label, columnTypeCode and ColumnDataType.
|
||||
* Column is not used to construct the expression. Columns are retrieved
|
||||
* from TRId.
|
||||
* ColumnMockUp must have set columnId, label, columnTypeCode and
|
||||
* ColumnDataType. Column is not used to construct the expression. Columns
|
||||
* are retrieved from TRId.
|
||||
*
|
||||
*
|
||||
* @param column
|
||||
* @param columnMockUp
|
||||
* Column mockup
|
||||
* @param trId
|
||||
* Tabular Resource id
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public ReplaceExpressionDialog(ColumnMockUp columnMockUp, TRId trId,
|
||||
EventBus eventBus) {
|
||||
listeners=new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
public ReplaceExpressionDialog(ColumnMockUp columnMockUp, TRId trId, EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
this.eventBus = eventBus;
|
||||
this.trId=trId;
|
||||
this.trId = trId;
|
||||
column = new ColumnData();
|
||||
column.setId(columnMockUp.getId());
|
||||
column.setColumnId(columnMockUp.getColumnId());
|
||||
|
@ -97,20 +99,24 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* ColumnMockUp and ColumnMockUpList must have set columnId, label, columnTypeCode and
|
||||
* ColumnDataType. Column is not used to construct the expression.
|
||||
* ColumnMockUp and ColumnMockUpList must have set columnId, label,
|
||||
* columnTypeCode and ColumnDataType. Column is not used to construct the
|
||||
* expression.
|
||||
*
|
||||
*
|
||||
* @param column
|
||||
* @param columns
|
||||
*
|
||||
* @param columnMockUp
|
||||
* Column mockup
|
||||
* @param columnMockUpList
|
||||
* List of column mockup
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public ReplaceExpressionDialog(ColumnMockUp columnMockUp,
|
||||
ArrayList<ColumnMockUp> columnMockUpList, EventBus eventBus) {
|
||||
listeners=new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
public ReplaceExpressionDialog(ColumnMockUp columnMockUp, ArrayList<ColumnMockUp> columnMockUpList,
|
||||
EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
this.eventBus = eventBus;
|
||||
column = new ColumnData();
|
||||
column.setId(columnMockUp.getId());
|
||||
|
@ -118,22 +124,22 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
column.setLabel(columnMockUp.getLabel());
|
||||
column.setDataTypeName(columnMockUp.getColumnDataType().toString());
|
||||
column.setTypeCode(columnMockUp.getColumnType().toString());
|
||||
Log.debug("ReplaceExpressionDialog: Column: "+column);
|
||||
|
||||
columns=new ArrayList<ColumnData>();
|
||||
Log.debug("ReplaceExpressionDialog: Column: " + column);
|
||||
|
||||
columns = new ArrayList<ColumnData>();
|
||||
Log.debug("ReplaceExpressionDialog Columns:");
|
||||
for(ColumnMockUp colMock:columnMockUpList){
|
||||
for (ColumnMockUp colMock : columnMockUpList) {
|
||||
ColumnData col = new ColumnData();
|
||||
col.setId(colMock.getId());
|
||||
col.setColumnId(colMock.getColumnId());
|
||||
col.setLabel(colMock.getLabel());
|
||||
col.setDataTypeName(colMock.getColumnDataType().toString());
|
||||
col.setTypeCode(colMock.getColumnType().toString());
|
||||
Log.debug("Columns: "+col);
|
||||
Log.debug("Columns: " + col);
|
||||
columns.add(col);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
type = ReplaceExpressionType.Template;
|
||||
initWindow();
|
||||
sanitizesColumns();
|
||||
|
@ -149,14 +155,10 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
setResizable(false);
|
||||
setHeadingText("Replace Expression");
|
||||
setClosable(true);
|
||||
getHeader().setIcon(
|
||||
ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
getHeader().setIcon(ExpressionResources.INSTANCE.columnReplaceByExpression());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initTools() {
|
||||
super.initTools();
|
||||
|
@ -171,48 +173,40 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
protected void create() {
|
||||
replaceExpressionPanel = new ReplaceExpressionPanel(this, column,
|
||||
columns, type, eventBus);
|
||||
replaceExpressionPanel = new ReplaceExpressionPanel(this, column, columns, type, eventBus);
|
||||
add(replaceExpressionPanel);
|
||||
}
|
||||
|
||||
protected void applyReplaceColumnByExpression(ExpressionWrapperNotification expressionWrapperNotification)
|
||||
{
|
||||
protected void applyReplaceColumnByExpression(ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
fire(expressionWrapperNotification);
|
||||
}
|
||||
|
||||
|
||||
protected void load() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId, new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column",
|
||||
caught.getMessage());
|
||||
}
|
||||
}
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: " + caught.getMessage());
|
||||
UtilsGXT3.alert("Error retrieving column", caught.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
Log.debug("Retrived columns: " + result);
|
||||
columns = result;
|
||||
sanitizesColumns();
|
||||
create();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -220,12 +214,10 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
ArrayList<ColumnData> removableColumn = new ArrayList<ColumnData>();
|
||||
for (ColumnData c : columns) {
|
||||
if (c.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString()) == 0
|
||||
|| c.getTypeCode().compareTo(
|
||||
ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
|| c.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
removableColumn.add(c);
|
||||
} else {
|
||||
if (column.getColumnId() != null
|
||||
&& c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
if (column.getColumnId() != null && c.getColumnId().compareTo(column.getColumnId()) == 0) {
|
||||
removableColumn.add(c);
|
||||
}
|
||||
}
|
||||
|
@ -240,42 +232,37 @@ public class ReplaceExpressionDialog extends Window implements
|
|||
@Override
|
||||
public void addExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.add(handler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExpressionWrapperNotificationListener(
|
||||
ExpressionWrapperNotificationListener handler) {
|
||||
public void removeExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.remove(handler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void fire(ExpressionWrapperNotification notification) {
|
||||
for(ExpressionWrapperNotificationListener listener:listeners){
|
||||
for (ExpressionWrapperNotificationListener listener : listeners) {
|
||||
listener.onExpression(notification);
|
||||
}
|
||||
hide();
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void fireAborted() {
|
||||
for(ExpressionWrapperNotificationListener listener:listeners){
|
||||
for (ExpressionWrapperNotificationListener listener : listeners) {
|
||||
listener.aborted();
|
||||
}
|
||||
hide();
|
||||
}
|
||||
|
||||
protected void fireFailed(Throwable throwable) {
|
||||
for(ExpressionWrapperNotificationListener listener:listeners){
|
||||
listener.failed(throwable);;
|
||||
for (ExpressionWrapperNotificationListener listener : listeners) {
|
||||
listener.failed(throwable);
|
||||
;
|
||||
}
|
||||
hide();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceExpressionPanel extends FramedPanel {
|
||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RowsDeleteByExpressionDialog extends Window implements MonitorDialogListener {
|
||||
|
|
|
@ -32,8 +32,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RowsDeleteByMultiColumnExpressionDialog extends Window implements MonitorDialogListener {
|
||||
|
|
|
@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleEditDialog extends Window implements
|
||||
|
|
|
@ -25,8 +25,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleEditPanel extends FramedPanel {
|
||||
|
|
|
@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleOnColumnCreateDialog extends Window implements
|
||||
|
@ -37,8 +37,7 @@ public class RuleOnColumnCreateDialog extends Window implements
|
|||
|
||||
/**
|
||||
*
|
||||
* @param columnMockUp
|
||||
* @param eventBus
|
||||
* @param eventBus Event Bus
|
||||
*/
|
||||
public RuleOnColumnCreateDialog(EventBus eventBus) {
|
||||
listeners = new ArrayList<RuleDialogNotificationListener>();
|
||||
|
|
|
@ -23,37 +23,36 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleOnTableCreateDialog extends Window implements
|
||||
HasRuleDialogNotificationListener {
|
||||
public class RuleOnTableCreateDialog extends Window implements HasRuleDialogNotificationListener {
|
||||
private static final String WIDTH = "940px";
|
||||
private static final String HEIGHT = "388px";
|
||||
private MultiColumnExpressionPanel multiColumnExpressionPanel;
|
||||
private EventBus eventBus;
|
||||
private ArrayList<RuleDialogNotificationListener> listeners;
|
||||
private Object initialRuleDescriptionData;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param columnMockUp
|
||||
* @param ruleDescriptionData
|
||||
* Rule description
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public RuleOnTableCreateDialog(RuleDescriptionData ruleDescriptionData, EventBus eventBus) {
|
||||
listeners = new ArrayList<RuleDialogNotificationListener>();
|
||||
initWindow();
|
||||
this.eventBus = eventBus;
|
||||
this.initialRuleDescriptionData=ruleDescriptionData;
|
||||
this.initialRuleDescriptionData = ruleDescriptionData;
|
||||
try {
|
||||
multiColumnExpressionPanel = new MultiColumnExpressionPanel(this, ruleDescriptionData);
|
||||
add(multiColumnExpressionPanel);
|
||||
} catch (MultiColumnExpressionPanelException e) {
|
||||
UtilsGXT3.alert("Attention", e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -101,34 +100,30 @@ public class RuleOnTableCreateDialog extends Window implements
|
|||
|
||||
public void saveColumnRule(RuleDescriptionData ruleDescriptionData) {
|
||||
|
||||
ExpressionServiceAsync.INSTANCE.saveRule(ruleDescriptionData,
|
||||
new AsyncCallback<String>() {
|
||||
ExpressionServiceAsync.INSTANCE.saveRule(ruleDescriptionData, new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String ruleId) {
|
||||
Log.debug("Saved Rule: " + ruleId);
|
||||
UtilsGXT3.info("Save Rule", "The rule is saved!");
|
||||
fireNotification(ruleId);
|
||||
@Override
|
||||
public void onSuccess(String ruleId) {
|
||||
Log.debug("Saved Rule: " + ruleId);
|
||||
UtilsGXT3.info("Save Rule", "The rule is saved!");
|
||||
fireNotification(ruleId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error saving column rule: "
|
||||
+ caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
UtilsGXT3.alert("Error saving column rule",
|
||||
caught.getLocalizedMessage());
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error saving column rule: " + caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
UtilsGXT3.alert("Error saving column rule", caught.getLocalizedMessage());
|
||||
|
||||
fireFailed(caught);
|
||||
}
|
||||
fireFailed(caught);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -137,14 +132,12 @@ public class RuleOnTableCreateDialog extends Window implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addRuleDialogNotificationListener(
|
||||
RuleDialogNotificationListener handler) {
|
||||
public void addRuleDialogNotificationListener(RuleDialogNotificationListener handler) {
|
||||
listeners.add(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeRuleDialogNotificationListener(
|
||||
RuleDialogNotificationListener handler) {
|
||||
public void removeRuleDialogNotificationListener(RuleDialogNotificationListener handler) {
|
||||
listeners.remove(handler);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,12 +30,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TemplateColumnExpressionDialog extends Window implements
|
||||
HasExpressionWrapperNotificationListener {
|
||||
public class TemplateColumnExpressionDialog extends Window implements HasExpressionWrapperNotificationListener {
|
||||
private static final String WIDTH = "670px";
|
||||
private static final String HEIGHT = "426px";
|
||||
private ArrayList<ExpressionWrapperNotificationListener> listeners;
|
||||
|
@ -48,7 +47,9 @@ public class TemplateColumnExpressionDialog extends Window implements
|
|||
/**
|
||||
*
|
||||
* @param columnMockUp
|
||||
* Column Mockup
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public TemplateColumnExpressionDialog(ColumnMockUp columnMockUp, EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
|
@ -66,8 +67,11 @@ public class TemplateColumnExpressionDialog extends Window implements
|
|||
/**
|
||||
*
|
||||
* @param trId
|
||||
* Tabular Resource id
|
||||
* @param columnId
|
||||
* Column id
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public TemplateColumnExpressionDialog(TRId trId, String columnId, EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
|
@ -113,27 +117,18 @@ public class TemplateColumnExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
protected void create() {
|
||||
if (column.getTypeCode()
|
||||
.compareTo(ColumnTypeCode.ANNOTATION.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(
|
||||
ColumnTypeCode.ATTRIBUTE.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(
|
||||
ColumnTypeCode.CODE.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(
|
||||
ColumnTypeCode.CODEDESCRIPTION.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(
|
||||
ColumnTypeCode.CODENAME.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(
|
||||
ColumnTypeCode.MEASURE.toString()) == 0) {
|
||||
columnExpressionPanel = new ColumnExpressionPanel(this, column,
|
||||
eventBus);
|
||||
if (column.getTypeCode().compareTo(ColumnTypeCode.ANNOTATION.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(ColumnTypeCode.ATTRIBUTE.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(ColumnTypeCode.CODE.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(ColumnTypeCode.CODEDESCRIPTION.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(ColumnTypeCode.CODENAME.toString()) == 0
|
||||
|| column.getTypeCode().compareTo(ColumnTypeCode.MEASURE.toString()) == 0) {
|
||||
columnExpressionPanel = new ColumnExpressionPanel(this, column, eventBus);
|
||||
add(columnExpressionPanel);
|
||||
} else {
|
||||
HTML errorMessage = new HTML(
|
||||
"This type of column is not supported for now!");
|
||||
HTML errorMessage = new HTML("This type of column is not supported for now!");
|
||||
add(errorMessage);
|
||||
AlertMessageBox d = new AlertMessageBox("Error",
|
||||
"This type of column is not supported for now!");
|
||||
AlertMessageBox d = new AlertMessageBox("Error", "This type of column is not supported for now!");
|
||||
d.addHideHandler(new HideHandler() {
|
||||
public void onHide(HideEvent event) {
|
||||
hide();
|
||||
|
@ -143,60 +138,51 @@ public class TemplateColumnExpressionDialog extends Window implements
|
|||
}
|
||||
}
|
||||
|
||||
protected void onExpression(ExpressionWrapperNotification expressionWrapperNotification){
|
||||
protected void onExpression(ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
fireNotification(expressionWrapperNotification);
|
||||
}
|
||||
|
||||
protected void load() {
|
||||
TDGWTServiceAsync.INSTANCE.getColumn(columnId, trId,
|
||||
new AsyncCallback<ColumnData>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: "
|
||||
+ caught.getMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error",
|
||||
"Error retrieving column: "
|
||||
+ caught.getMessage());
|
||||
}
|
||||
}
|
||||
fireFailed(caught);
|
||||
TDGWTServiceAsync.INSTANCE.getColumn(columnId, trId, new AsyncCallback<ColumnData>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked", caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrieving column: " + caught.getMessage());
|
||||
UtilsGXT3.alert("Error", "Error retrieving column: " + caught.getMessage());
|
||||
}
|
||||
}
|
||||
fireFailed(caught);
|
||||
|
||||
public void onSuccess(ColumnData result) {
|
||||
Log.debug("Retrived column: " + result);
|
||||
column = result;
|
||||
create();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
public void onSuccess(ColumnData result) {
|
||||
Log.debug("Retrived column: " + result);
|
||||
column = result;
|
||||
create();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addExpressionWrapperNotificationListener(
|
||||
ExpressionWrapperNotificationListener handler) {
|
||||
public void addExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.add(handler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExpressionWrapperNotificationListener(
|
||||
ExpressionWrapperNotificationListener handler) {
|
||||
public void removeExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.remove(handler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void fireNotification(ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
if (listeners != null) {
|
||||
for (ExpressionWrapperNotificationListener listener : listeners) {
|
||||
|
@ -224,6 +210,5 @@ public class TemplateColumnExpressionDialog extends Window implements
|
|||
hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -19,12 +19,11 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TemplateMultiColumnExpressionDialog extends Window implements
|
||||
HasExpressionWrapperNotificationListener {
|
||||
public class TemplateMultiColumnExpressionDialog extends Window implements HasExpressionWrapperNotificationListener {
|
||||
private static final String WIDTH = "940px";
|
||||
private static final String HEIGHT = "388px";
|
||||
private ArrayList<ExpressionWrapperNotificationListener> listeners;
|
||||
|
@ -35,10 +34,11 @@ public class TemplateMultiColumnExpressionDialog extends Window implements
|
|||
/**
|
||||
*
|
||||
* @param columnsMockUp
|
||||
* Columns mockup
|
||||
* @param eventBus
|
||||
* Event bus
|
||||
*/
|
||||
public TemplateMultiColumnExpressionDialog(
|
||||
ArrayList<ColumnMockUp> columnsMockUp, EventBus eventBus) {
|
||||
public TemplateMultiColumnExpressionDialog(ArrayList<ColumnMockUp> columnsMockUp, EventBus eventBus) {
|
||||
listeners = new ArrayList<ExpressionWrapperNotificationListener>();
|
||||
this.eventBus = eventBus;
|
||||
columns = new ArrayList<ColumnData>();
|
||||
|
@ -58,18 +58,18 @@ public class TemplateMultiColumnExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
protected void sanitizesColumns() {
|
||||
ArrayList<ColumnData> removableColumn=new ArrayList<ColumnData>();
|
||||
for(ColumnData c:columns){
|
||||
if(c.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString())==0||
|
||||
c.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString())==0 ){
|
||||
ArrayList<ColumnData> removableColumn = new ArrayList<ColumnData>();
|
||||
for (ColumnData c : columns) {
|
||||
if (c.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString()) == 0
|
||||
|| c.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
removableColumn.add(c);
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
columns.removeAll(removableColumn);
|
||||
}
|
||||
|
||||
|
||||
protected void initWindow() {
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -104,42 +104,37 @@ public class TemplateMultiColumnExpressionDialog extends Window implements
|
|||
}
|
||||
|
||||
protected void create() {
|
||||
if(columns.size()>0){
|
||||
multiColumnExpressionPanel = new MultiColumnExpressionPanel(this,columns,
|
||||
eventBus);
|
||||
if (columns.size() > 0) {
|
||||
multiColumnExpressionPanel = new MultiColumnExpressionPanel(this, columns, eventBus);
|
||||
add(multiColumnExpressionPanel);
|
||||
} else {
|
||||
HTML errorMessage = new HTML(
|
||||
"Attention no columns with a type supported(Dimension and TimeDimension is not supported)!");
|
||||
add(errorMessage);
|
||||
close();
|
||||
UtilsGXT3.alert("Attention","Attention no columns with a type supported(Dimension and TimeDimension is not supported)!");
|
||||
UtilsGXT3.alert("Attention",
|
||||
"Attention no columns with a type supported(Dimension and TimeDimension is not supported)!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void onExpression(
|
||||
ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
protected void onExpression(ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
fireNotification(expressionWrapperNotification);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addExpressionWrapperNotificationListener(
|
||||
ExpressionWrapperNotificationListener handler) {
|
||||
public void addExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.add(handler);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeExpressionWrapperNotificationListener(
|
||||
ExpressionWrapperNotificationListener handler) {
|
||||
public void removeExpressionWrapperNotificationListener(ExpressionWrapperNotificationListener handler) {
|
||||
listeners.remove(handler);
|
||||
|
||||
}
|
||||
|
||||
private void fireNotification(
|
||||
ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
private void fireNotification(ExpressionWrapperNotification expressionWrapperNotification) {
|
||||
if (listeners != null) {
|
||||
for (ExpressionWrapperNotificationListener listener : listeners) {
|
||||
listener.onExpression(expressionWrapperNotification);
|
||||
|
|
|
@ -13,8 +13,8 @@ import com.sencha.gxt.core.client.dom.XElement;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DefaultAppearance implements IconButtonAppearance {
|
||||
|
|
|
@ -16,8 +16,8 @@ import com.sencha.gxt.widget.core.client.Component;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class IconButton extends Component implements HasClickHandlers {
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.sencha.gxt.core.client.dom.XElement;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IconButtonAppearance {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.client.exception;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MultiColumnExpressionPanelException extends Exception {
|
||||
|
|
|
@ -53,8 +53,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConditionOnMultiColumnWidget extends SimpleContainer {
|
||||
|
|
|
@ -48,8 +48,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConditionWidget extends SimpleContainer {
|
||||
|
|
|
@ -45,8 +45,8 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceWidget extends SimpleContainer {
|
||||
|
|
|
@ -12,6 +12,11 @@ import com.sencha.gxt.core.client.XTemplates;
|
|||
import com.sencha.gxt.core.client.dom.XDOM;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*/
|
||||
public class HelpReplaceColumnByExpression {
|
||||
public interface HelpReplaceByExpTemplate extends XTemplates {
|
||||
@XTemplate(source = "HelpReplaceByExp.html")
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class HelpReplaceColumnByExpressionDialog extends Window {
|
||||
|
|
|
@ -23,8 +23,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class HelpReplaceColumnByExpressionPanel extends FramedPanel {
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum ArgType {
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ArgTypePropertiesCombo extends
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.client.multicolumn;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DepthOfExpressionElement {
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface DepthOfExpressionElementPropertiesCombo extends
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.ArrayList;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DepthOfExpressionStore implements Serializable {
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum DepthOfExpressionType {
|
||||
|
|
|
@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class LogicalDepth implements Serializable {
|
||||
|
|
|
@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.expression.Expression
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionWrapperNotification {
|
||||
|
|
|
@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.expressionwidget.client.notification;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleDialogNotification {
|
||||
|
|
|
@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.expressionwidget.client.notification;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleEditDialogNotification {
|
||||
|
|
|
@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.model.C_OperatorType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Operation implements Serializable {
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface OperationProperties extends PropertyAccess<Operation> {
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class OperationsStore {
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ColumnDataProperties extends
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ColumnDataPropertiesCombo extends
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ColumnDataTypeProperties extends
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
/**
|
||||
*
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ColumnTypeCodeProperties extends
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface LocaleTypeProperties extends
|
||||
|
|
|
@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.replace.ReplaceType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceElement implements Serializable {
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ReplaceElementProperties extends PropertyAccess<ReplaceElement> {
|
||||
|
|
|
@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.expressionwidget.shared.replace.ReplaceType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceElementStore {
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface RuleColumnPlaceHolderDescriptorProperties extends
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface TabResourceProperties extends PropertyAccess<TabResource> {
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface TabResourcePropertiesCombo extends
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.google.gwt.resources.client.ImageResource;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ExpressionResources extends ClientBundle {
|
||||
|
|
|
@ -26,68 +26,45 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|||
*
|
||||
* Implements the basic interfaces generate and submit Expression on service.
|
||||
*
|
||||
* <p>
|
||||
* Allows:
|
||||
* <ul>
|
||||
* <li>Generate Expression</li>
|
||||
* <ul>
|
||||
* </p>
|
||||
* Allows Generate Expression
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
@RemoteServiceRelativePath("ExpressionService")
|
||||
public interface ExpressionService extends RemoteService {
|
||||
|
||||
/**
|
||||
* Submit Column Filter Operation
|
||||
*
|
||||
* @param columnFilterSession
|
||||
* @throws ExpressionServiceException
|
||||
*/
|
||||
public String startFilterColumn(FilterColumnSession filterColumnSession)
|
||||
throws TDGWTServiceException;
|
||||
public String startFilterColumn(FilterColumnSession filterColumnSession) throws TDGWTServiceException;
|
||||
|
||||
public String startReplaceColumnByExpression(
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionColumnSession)
|
||||
ReplaceColumnByExpressionSession replaceColumnByExpressionColumnSession) throws TDGWTServiceException;
|
||||
|
||||
public String startAddColumn(AddColumnSession addColumnSession) throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRules() throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRules(RuleScopeType scope) throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getApplicableBaseColumnRules(ColumnData columnData)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public String startAddColumn(AddColumnSession addColumnSession)
|
||||
throws TDGWTServiceException;
|
||||
public String saveRule(RuleDescriptionData ruleDescriptionData) throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRules()
|
||||
throws TDGWTServiceException;
|
||||
public void updateColumnRule(RuleDescriptionData ruleDescriptionData) throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRules(RuleScopeType scope)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public ArrayList<RuleDescriptionData> getApplicableBaseColumnRules(
|
||||
ColumnData columnData) throws TDGWTServiceException;
|
||||
|
||||
public String saveRule(RuleDescriptionData ruleDescriptionData)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public void updateColumnRule(RuleDescriptionData ruleDescriptionData)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public void removeRulesById(ArrayList<RuleDescriptionData> rules) throws TDGWTServiceException;
|
||||
|
||||
|
||||
public String startApplyAndDetachColumnRules(ApplyAndDetachColumnRulesSession applyColumnRulesSession)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public void setDetachColumnRules(DetachColumnRulesSession detachColumnRulesSession)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
public void setDetachTableRules(DetachTableRulesSession detachTableRulesSession)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
|
||||
public String startApplyTableRule(ApplyTableRuleSession applyTableRuleSession)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
|
||||
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId)
|
||||
throws TDGWTServiceException;
|
||||
|
||||
|
||||
public void setDetachColumnRules(DetachColumnRulesSession detachColumnRulesSession) throws TDGWTServiceException;
|
||||
|
||||
public void setDetachTableRules(DetachTableRulesSession detachTableRulesSession) throws TDGWTServiceException;
|
||||
|
||||
public String startApplyTableRule(ApplyTableRuleSession applyTableRuleSession) throws TDGWTServiceException;
|
||||
|
||||
public AppliedRulesResponseData getActiveRulesByTabularResourceId(TRId trId) throws TDGWTServiceException;
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnDataTypeElement {
|
||||
|
|
|
@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnDataTypeStore implements Serializable {
|
||||
|
|
|
@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnTypeCodeElement {
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnTypeCodeStore implements Serializable {
|
||||
|
@ -127,10 +127,7 @@ public class ColumnTypeCodeStore implements Serializable {
|
|||
return store;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static ArrayList<ColumnTypeCodeElement> getColumnTypeCodesForGeneric() {
|
||||
store = new ArrayList<ColumnTypeCodeElement>();
|
||||
store.add(annotation);
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.io.Serializable;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class LocaleTypeElement implements Serializable {
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.io.Serializable;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Threshold implements Serializable {
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.sencha.gxt.data.shared.PropertyAccess;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ThresholdProperties extends PropertyAccess<Threshold> {
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.ArrayList;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ThresholdStore {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.client.type;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum ReplaceExpressionType {
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.sencha.gxt.widget.core.client.box.MessageBox;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class InfoMessageBox extends MessageBox {
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class UtilsGXT3 {
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CExpressionMapServlet extends HttpServlet {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -49,8 +49,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionServiceImpl extends TDGWTServiceImpl implements
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.column.ReplaceColumnByExp
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionSession {
|
||||
|
|
|
@ -16,8 +16,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class AppliedRulesResponseMap {
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleDescriptionMap {
|
||||
|
|
|
@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleScopeType;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleScopeMap {
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.DimensionRe
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RuleTypeMap {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Constants {
|
||||
|
|
|
@ -44,8 +44,8 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
/**
|
||||
* ConditionTypeMap creates a C_Expression usable client-side
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConditionOnMultiColumnTypeMap {
|
||||
|
|
|
@ -42,8 +42,8 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
/**
|
||||
* ConditionTypeMap creates a C_Expression usable client-side
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConditionTypeMap {
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared.exception;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConditionTypeMapException extends Exception {
|
||||
|
@ -18,17 +18,23 @@ public class ConditionTypeMapException extends Exception {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
*/
|
||||
public ConditionTypeMapException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
public ConditionTypeMapException(String message,Throwable t) {
|
||||
super(message,t);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
* @param throwable
|
||||
* Error
|
||||
*/
|
||||
public ConditionTypeMapException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared.exception;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionParserException extends Exception {
|
||||
|
@ -15,14 +15,23 @@ public class ExpressionParserException extends Exception {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
*/
|
||||
public ExpressionParserException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ExpressionParserException(String message, Throwable t) {
|
||||
super(message, t);
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
* @param throwable
|
||||
* Error
|
||||
*/
|
||||
public ExpressionParserException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared.exception;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ExpressionServiceException extends Exception {
|
||||
|
@ -19,16 +19,21 @@ public class ExpressionServiceException extends Exception {
|
|||
|
||||
/**
|
||||
* @param message
|
||||
* Message
|
||||
*/
|
||||
public ExpressionServiceException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
public ExpressionServiceException(String message,Throwable t) {
|
||||
super(message,t);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
* @param throwable
|
||||
* Error
|
||||
*/
|
||||
public ExpressionServiceException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared.exception;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ReplaceTypeMapException extends Exception {
|
||||
|
@ -18,17 +18,23 @@ public class ReplaceTypeMapException extends Exception {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
*/
|
||||
public ReplaceTypeMapException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
public ReplaceTypeMapException(String message,Throwable t) {
|
||||
super(message,t);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param message
|
||||
* Message
|
||||
* @param throwable
|
||||
* Error
|
||||
*/
|
||||
public ReplaceTypeMapException(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.expressionwidget.shared.model;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum C_OperatorType {
|
||||
|
|
|
@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Avg extends C_AggregationExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Avg extends C_AggregationExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Avg(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Count extends C_AggregationExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Count extends C_AggregationExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Count(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Max extends C_AggregationExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Max extends C_AggregationExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Max(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Min extends C_AggregationExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Min extends C_AggregationExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Min(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_ST_Extent extends C_AggregationExpression {
|
||||
|
@ -17,15 +17,11 @@ public class C_ST_Extent extends C_AggregationExpression {
|
|||
public C_ST_Extent() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_ST_Extent(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
this.readableExpression = "ST_Extent("
|
||||
+ argument.getReadableExpression() + ")";
|
||||
this.readableExpression = "ST_Extent(" + argument.getReadableExpression() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Sum extends C_AggregationExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Sum extends C_AggregationExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Sum(C_Expression argument) {
|
||||
this.argument = argument;
|
||||
if (argument != null) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Addition extends C_ArithmeticExpression {
|
||||
|
|
|
@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_ArithmeticExpression extends C_Expression {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Division extends C_ArithmeticExpression {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Exponentiation extends C_ArithmeticExpression {
|
||||
|
@ -18,10 +18,7 @@ public class C_Exponentiation extends C_ArithmeticExpression {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param argument
|
||||
*/
|
||||
|
||||
public C_Exponentiation(C_Expression leftArgument,
|
||||
C_Expression rightArgument) {
|
||||
this.leftArgument = leftArgument;
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Modulus extends C_ArithmeticExpression {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Multiplication extends C_ArithmeticExpression {
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class C_Subtraction extends C_ArithmeticExpression {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue