refs 4172: Dataminer interface enhancements
https://support.d4science.org/issues/4172 Added SelectAreaDialog in DataMiner git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@130791 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cf49f22d33
commit
fb58622ff4
12
pom.xml
12
pom.xml
|
@ -147,9 +147,9 @@
|
||||||
<artifactId>gxt</artifactId>
|
<artifactId>gxt</artifactId>
|
||||||
<version>${gxtVersion}</version>
|
<version>${gxtVersion}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.portlet</groupId>
|
<groupId>javax.portlet</groupId>
|
||||||
<artifactId>portlet-api</artifactId>
|
<artifactId>portlet-api</artifactId>
|
||||||
|
@ -297,6 +297,12 @@
|
||||||
<version>[1.4.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
<version>[1.4.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- OpenLayer Basic Widget -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
|
<artifactId>openlayer-basic-widgets</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- LOGGING -->
|
<!-- LOGGING -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredS
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnListParameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnListParameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter.ParameterTypology;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -104,9 +105,9 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
try {
|
try {
|
||||||
String location = Location.getHref();
|
String location = Location.getHref();
|
||||||
String[] locationData = location.split("\\?");
|
String[] locationData = location.split("\\?");
|
||||||
locationRef=locationData[0];
|
locationRef = locationData[0];
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Log.error("Error retrieving location: "+e.getLocalizedMessage());
|
Log.error("Error retrieving location: " + e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
HtmlLayoutContainer title = new HtmlLayoutContainer("<span><a href='"
|
HtmlLayoutContainer title = new HtmlLayoutContainer("<span><a href='"
|
||||||
|
@ -246,9 +247,12 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Parameter p : operator.getOperatorParameters()) {
|
for (Parameter p : operator.getOperatorParameters()) {
|
||||||
if (p.isColumn() || p.isColumnList()) {
|
if (p.getTypology().compareTo(ParameterTypology.COLUMN) == 0
|
||||||
|
|| p.getTypology().compareTo(
|
||||||
|
ParameterTypology.COLUMN_LIST) == 0) {
|
||||||
// search for the table parameter which it depends
|
// search for the table parameter which it depends
|
||||||
String tabParamName = (p.isColumn() ? ((ColumnParameter) p)
|
String tabParamName = (p.getTypology().compareTo(
|
||||||
|
ParameterTypology.COLUMN) == 0 ? ((ColumnParameter) p)
|
||||||
.getReferredTabularParameterName()
|
.getReferredTabularParameterName()
|
||||||
: ((ColumnListParameter) p)
|
: ((ColumnListParameter) p)
|
||||||
.getReferredTabularParameterName());
|
.getReferredTabularParameterName());
|
||||||
|
|
|
@ -29,22 +29,40 @@ public class OperatorFieldWidget {
|
||||||
this.parameter = p;
|
this.parameter = p;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (p.isObject())
|
if (p.getTypology() != null) {
|
||||||
field = createObjectField(p);
|
switch (p.getTypology()) {
|
||||||
else if (p.isEnum())
|
case COLUMN:
|
||||||
field = new EnumFld(p);
|
field = new ColumnFld(p);
|
||||||
else if (p.isTabular())
|
break;
|
||||||
field = new TabularFld(p);
|
case COLUMN_LIST:
|
||||||
else if (p.isTabularList())
|
field = new ColumnListFld(p);
|
||||||
field = new TabularListFld(p);
|
break;
|
||||||
else if (p.isColumn())
|
case ENUM:
|
||||||
field = new ColumnFld(p);
|
field = new EnumFld(p);
|
||||||
else if (p.isColumnList())
|
break;
|
||||||
field = new ColumnListFld(p);
|
case FILE:
|
||||||
else if (p.isList())
|
field = new FileFld(p);
|
||||||
field = createListField(p);
|
break;
|
||||||
else if (p.isFile())
|
case LIST:
|
||||||
field = new FileFld(p);
|
field = createListField(p);
|
||||||
|
break;
|
||||||
|
case OBJECT:
|
||||||
|
field = createObjectField(p);
|
||||||
|
break;
|
||||||
|
case TABULAR:
|
||||||
|
field = new TabularFld(p);
|
||||||
|
break;
|
||||||
|
case TABULAR_LIST:
|
||||||
|
field = new TabularListFld(p);
|
||||||
|
break;
|
||||||
|
case WKT:
|
||||||
|
field = new WKTFld(p);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (field == null) {
|
if (field == null) {
|
||||||
parameterLabel = new FieldLabel(null, p.getName());
|
parameterLabel = new FieldLabel(null, p.getName());
|
||||||
|
|
|
@ -0,0 +1,249 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.WKTParameter;
|
||||||
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaDialogEvent;
|
||||||
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.event.SelectAreaDialogEvent.SelectAreaDialogEventHandler;
|
||||||
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.AreaSelectionDialog;
|
||||||
|
import org.gcube.portlets.widgets.openlayerbasicwidgets.client.widgets.GeometryType;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.shared.GWT;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WKTFld extends AbstractFld {
|
||||||
|
|
||||||
|
private VerticalLayoutContainer vp;
|
||||||
|
|
||||||
|
// FileSelector fileSelector;
|
||||||
|
private AreaSelectionDialog areaSelectionDialog;
|
||||||
|
private TextButton selectButton, selectButton2, cancelButton;
|
||||||
|
private String selectedArea = null;
|
||||||
|
|
||||||
|
private WKTParameter wktParameter;
|
||||||
|
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
|
||||||
|
private HBoxLayoutContainer horiz;
|
||||||
|
|
||||||
|
private TextField selectedAreaField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param parameter
|
||||||
|
*/
|
||||||
|
public WKTFld(Parameter parameter) {
|
||||||
|
super(parameter);
|
||||||
|
wktParameter = (WKTParameter) parameter;
|
||||||
|
|
||||||
|
SimpleContainer wktContainer = new SimpleContainer();
|
||||||
|
vp = new VerticalLayoutContainer();
|
||||||
|
init();
|
||||||
|
wktContainer.add(vp, new MarginData(new Margins(0)));
|
||||||
|
|
||||||
|
fieldContainer = new SimpleContainer();
|
||||||
|
horiz = new HBoxLayoutContainer();
|
||||||
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
if (wktParameter.getDescription() == null) {
|
||||||
|
descr = new HtmlLayoutContainer(
|
||||||
|
"<p style='margin-left:5px !important;'></p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
descr = new HtmlLayoutContainer(
|
||||||
|
"<p style='margin-left:5px !important;'>"
|
||||||
|
+ wktParameter.getDescription() + "</p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
}
|
||||||
|
|
||||||
|
horiz.add(wktContainer, new BoxLayoutData(new Margins()));
|
||||||
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
|
fieldContainer.add(horiz);
|
||||||
|
showNoSelectionField();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private GeometryType getGeometryType() {
|
||||||
|
if (wktParameter.getWktGeometryType() == null) {
|
||||||
|
return GeometryType.Polygon;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (wktParameter.getWktGeometryType()) {
|
||||||
|
case Box:
|
||||||
|
return GeometryType.Box;
|
||||||
|
case Circle:
|
||||||
|
return GeometryType.Circle;
|
||||||
|
case Hexagon:
|
||||||
|
return GeometryType.Hexagon;
|
||||||
|
case LineString:
|
||||||
|
return GeometryType.LineString;
|
||||||
|
case Pentagon:
|
||||||
|
return GeometryType.Pentagon;
|
||||||
|
case Point:
|
||||||
|
return GeometryType.Point;
|
||||||
|
case Polygon:
|
||||||
|
return GeometryType.Polygon;
|
||||||
|
case Square:
|
||||||
|
return GeometryType.Square;
|
||||||
|
case Triangle:
|
||||||
|
return GeometryType.Triangle;
|
||||||
|
default:
|
||||||
|
return GeometryType.Polygon;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawAGeometry() {
|
||||||
|
SelectAreaDialogEventHandler handler = new SelectAreaDialogEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(SelectAreaDialogEvent event) {
|
||||||
|
GWT.log("SelectAreaDialog Response: " + event);
|
||||||
|
switch (event.getSelectAreaDialogEventType()) {
|
||||||
|
case Aborted:
|
||||||
|
Log.debug("No area selected!");
|
||||||
|
break;
|
||||||
|
case Completed:
|
||||||
|
selectedArea = event.getArea();
|
||||||
|
Log.debug("SelectedFileItem: " + selectedArea);
|
||||||
|
showFieldWithSelection();
|
||||||
|
break;
|
||||||
|
case Failed:
|
||||||
|
Log.error("Error during area selection: "
|
||||||
|
+ event.getException());
|
||||||
|
UtilsGXT3.alert("Error", event.getErrorMessage());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
areaSelectionDialog = new AreaSelectionDialog(getGeometryType());
|
||||||
|
areaSelectionDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
areaSelectionDialog.addSelectAreaDialogEventHandler(handler);
|
||||||
|
areaSelectionDialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
selectButton = new TextButton("Draw a "
|
||||||
|
+ wktParameter.getWktGeometryType().getLabel());
|
||||||
|
selectButton.setIcon(DataMinerManager.resources.folderExplore());
|
||||||
|
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
drawAGeometry();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//selectButton.setToolTip("Draw a "
|
||||||
|
// + wktParameter.getWktGeometryType().getLabel());
|
||||||
|
|
||||||
|
selectButton2 = new TextButton("");
|
||||||
|
selectButton2.setIcon(DataMinerManager.resources.folderExplore());
|
||||||
|
selectButton2.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
drawAGeometry();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//selectButton2.setToolTip("Select Another "
|
||||||
|
// + wktParameter.getWktGeometryType().getLabel());
|
||||||
|
|
||||||
|
cancelButton = new TextButton("");
|
||||||
|
cancelButton.setIcon(DataMinerManager.resources.cancel());
|
||||||
|
cancelButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
selectedArea = null;
|
||||||
|
showNoSelectionField();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showNoSelectionField() {
|
||||||
|
vp.clear();
|
||||||
|
vp.add(selectButton);
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showFieldWithSelection() {
|
||||||
|
if (selectedArea == null || selectedArea.isEmpty()) {
|
||||||
|
selectedArea = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedAreaField = new TextField();
|
||||||
|
if (selectedArea != null && !selectedArea.isEmpty()) {
|
||||||
|
selectedAreaField.setValue(selectedArea);
|
||||||
|
}
|
||||||
|
selectedAreaField.setReadOnly(true);
|
||||||
|
|
||||||
|
HBoxLayoutContainer h = new HBoxLayoutContainer();
|
||||||
|
h.add(selectedAreaField, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectButton2, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(cancelButton, new BoxLayoutData(new Margins()));
|
||||||
|
vp.clear();
|
||||||
|
vp.add(h);
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getValue() {
|
||||||
|
if (selectedAreaField != null) {
|
||||||
|
return selectedAreaField.getCurrentValue();
|
||||||
|
} else {
|
||||||
|
return wktParameter.getDefaultValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
if (selectedAreaField != null) {
|
||||||
|
return selectedAreaField.isValid();
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Widget getWidget() {
|
||||||
|
return fieldContainer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -2,29 +2,25 @@
|
||||||
<module rename-to='dataminermanager'>
|
<module rename-to='dataminermanager'>
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
<inherits name="com.google.gwt.http.HTTP" />
|
<inherits name="com.google.gwt.http.HTTP" />
|
||||||
|
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
|
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
||||||
|
|
||||||
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
|
||||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
|
||||||
|
|
||||||
<!-- Debug CSS style -->
|
|
||||||
<set-configuration-property name="CssResource.style" value="pretty"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!--
|
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
||||||
<inherits name="org.gcube.portlets.user.tdw.TabularDataWidget" />
|
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
|
||||||
<inherits name='org.gcube.portlets.user.csvimportwizard.CSVImportWizard' /> -->
|
<!-- Debug CSS style -->
|
||||||
|
<set-configuration-property name="CssResource.style"
|
||||||
|
value="pretty" />
|
||||||
|
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
||||||
<!--
|
|
||||||
|
<!-- OpenLayer Basic Widgets -->
|
||||||
<inherits
|
<inherits
|
||||||
name="org.gcube.portlets.user.csvimportwizard.ws.CSVImportWizardWorkspace" />
|
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- inherits WorkspaceExplorer widget -->
|
<!-- inherits WorkspaceExplorer widget -->
|
||||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||||
|
|
||||||
|
@ -32,38 +28,22 @@
|
||||||
<inherits
|
<inherits
|
||||||
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader" />
|
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader" />
|
||||||
|
|
||||||
<!--
|
|
||||||
<inherits name='org.gwtopenmaps.openlayers.OpenLayers' />
|
|
||||||
<inherits
|
|
||||||
name='org.gcube.portlets.widgets.file_dw_import_wizard.filedwimportwizard' />
|
|
||||||
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<replace-with class="org.gcube.portlets.user.dataminermanager.client.custom.Gxt2ZIndexXDOM">
|
|
||||||
<when-type-is class="com.sencha.gxt.core.client.dom.XDOM.XDOMImpl" />
|
|
||||||
</replace-with> -->
|
|
||||||
|
|
||||||
<entry-point
|
<entry-point
|
||||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||||
|
<!-- <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||||
<!--
|
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
|
||||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||||
/> -->
|
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
|
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
|
|
||||||
/> -->
|
|
||||||
|
|
||||||
|
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
<source path='shared' />
|
<source path='shared' />
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@ import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParamete
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularListParameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularListParameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularParameter;
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularParameter;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.WKTGeometryType;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.shared.parameters.WKTParameter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -159,10 +161,17 @@ public class WPS2SM {
|
||||||
converted = new ListParameter(id, title,
|
converted = new ListParameter(id, title,
|
||||||
guessedType, separator);
|
guessedType, separator);
|
||||||
} else {
|
} else {
|
||||||
converted = new ObjectParameter(id, title,
|
if (title.contains("[WKT_")) {
|
||||||
guessPrimitiveType(guessedType),
|
logger.debug("WKT parameter: " + title);
|
||||||
defaultValue);
|
converted = retrieveWKTParameter(id, title,
|
||||||
|
defaultValue);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
converted = new ObjectParameter(id, title,
|
||||||
|
guessPrimitiveType(guessedType),
|
||||||
|
defaultValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,6 +187,71 @@ public class WPS2SM {
|
||||||
return converted;
|
return converted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Parameter retrieveWKTParameter(String id, String title,
|
||||||
|
String defaultValue) {
|
||||||
|
|
||||||
|
if (title.contains("[WKT_POINT]")) {
|
||||||
|
//title.replace("[WKT_POINT]", "");
|
||||||
|
return new WKTParameter(id, title, WKTGeometryType.Point,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_LINESTRING]")) {
|
||||||
|
//title.replace("[WKT_LINESTRING]", "");
|
||||||
|
return new WKTParameter(id, title, WKTGeometryType.LineString,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_POLYGON]")) {
|
||||||
|
//title.replace("[WKT_POLYGON]", "");
|
||||||
|
return new WKTParameter(id, title, WKTGeometryType.Polygon,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_CIRCLE]")) {
|
||||||
|
//title.replace("[WKT_CIRCLE]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Circle, defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_TRIANGLE]")) {
|
||||||
|
//title.replace("[WKT_TRIANGLE]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Triangle, defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_SQUARE]")) {
|
||||||
|
//title.replace("[WKT_SQUARE]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Square, defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_PENTAGON]")) {
|
||||||
|
//title.replace("[WKT_PENTAGON]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Pentagon,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_HEXAGON]")) {
|
||||||
|
//title.replace("[WKT_HEXAGON]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Hexagon,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
if (title.contains("[WKT_BOX]")) {
|
||||||
|
//title.replace("[WKT_BOX]", "");
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Box,
|
||||||
|
defaultValue);
|
||||||
|
} else {
|
||||||
|
return new WKTParameter(id, title,
|
||||||
|
WKTGeometryType.Polygon,
|
||||||
|
defaultValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param maxMegaBytes
|
* @param maxMegaBytes
|
||||||
|
@ -335,7 +409,7 @@ public class WPS2SM {
|
||||||
.getSupported().getFormatArray());
|
.getSupported().getFormatArray());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("Conversion to SM Type->Name=" + id);
|
logger.debug("Conversion to SM Type->Name=" + id);
|
||||||
logger.debug("Conversion to SM Type->Title=" + title);
|
logger.debug("Conversion to SM Type->Title=" + title);
|
||||||
logger.debug("Conversion to SM Type->Number of Inputs to Manage="
|
logger.debug("Conversion to SM Type->Number of Inputs to Manage="
|
||||||
|
@ -403,29 +477,22 @@ public class WPS2SM {
|
||||||
|
|
||||||
String description = title;
|
String description = title;
|
||||||
/*
|
/*
|
||||||
String innerDescription = "";
|
* String innerDescription = "";
|
||||||
|
*
|
||||||
if (maxMegabytes != null && maxMegabytes.trim().length() > 0) {
|
* if (maxMegabytes != null && maxMegabytes.trim().length() > 0) {
|
||||||
innerDescription += "Max MB Size:" + maxMegabytes.trim() + "; ";
|
* innerDescription += "Max MB Size:" + maxMegabytes.trim() + "; "; } if
|
||||||
}
|
* (UoM != null && UoM.trim().length() > 0) { innerDescription +=
|
||||||
if (UoM != null && UoM.trim().length() > 0) {
|
* "Unit of Measure:" + UoM.trim() + "; "; } if (minElements > 0) {
|
||||||
innerDescription += "Unit of Measure:" + UoM.trim() + "; ";
|
* innerDescription += "Min N. of Entries:" + minElements + "; "; } if
|
||||||
}
|
* (maxElements > 0) { innerDescription += "Max N. of Entries:" +
|
||||||
if (minElements > 0) {
|
* maxElements + "; "; } if (defaultValue != null &&
|
||||||
innerDescription += "Min N. of Entries:" + minElements + "; ";
|
* defaultValue.trim().length() > 0) { innerDescription += "default:" +
|
||||||
}
|
* defaultValue.trim() + "; "; }
|
||||||
if (maxElements > 0) {
|
*
|
||||||
innerDescription += "Max N. of Entries:" + maxElements + "; ";
|
* if (innerDescription.length() > 0) description += " [" +
|
||||||
}
|
* innerDescription.substring(0,
|
||||||
if (defaultValue != null && defaultValue.trim().length() > 0) {
|
* innerDescription.lastIndexOf(";")).trim() + "]";
|
||||||
innerDescription += "default:" + defaultValue.trim() + "; ";
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
if (innerDescription.length() > 0)
|
|
||||||
description += " ["
|
|
||||||
+ innerDescription.substring(0,
|
|
||||||
innerDescription.lastIndexOf(";")).trim() + "]";
|
|
||||||
*/
|
|
||||||
return description;
|
return description;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ public class Constants {
|
||||||
|
|
||||||
public static final String DEFAULT_USER = "giancarlo.panichi";
|
public static final String DEFAULT_USER = "giancarlo.panichi";
|
||||||
public static final String DEFAULT_ROLE = "OrganizationMember";
|
public static final String DEFAULT_ROLE = "OrganizationMember";
|
||||||
public static final String DEFAULT_SCOPE = "/gcube/devsec/devVRE";
|
//public static final String DEFAULT_SCOPE = "/gcube/devsec/devVRE";
|
||||||
// public final static String DEFAULT_SCOPE = "/gcube/devNext";
|
// public final static String DEFAULT_SCOPE = "/gcube/devNext";
|
||||||
// public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext";
|
public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,42 +4,42 @@
|
||||||
package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ColumnListParameter extends Parameter implements Serializable {
|
public class ColumnListParameter extends Parameter implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6743494426144267089L;
|
private static final long serialVersionUID = -6743494426144267089L;
|
||||||
String referredTabularParameterName;
|
private String referredTabularParameterName;
|
||||||
List<String> columnNames = new ArrayList<String>();
|
// private List<String> columnNames = new ArrayList<String>();
|
||||||
String value;
|
private String value;
|
||||||
private String separator;
|
private String separator;
|
||||||
|
|
||||||
public ColumnListParameter() {
|
public ColumnListParameter() {
|
||||||
super();
|
super();
|
||||||
this.typology = ParameterTypology.COLUMN_LIST;
|
this.typology = ParameterTypology.COLUMN_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ColumnListParameter(String name, String description, String referredTabularParameterName, String separator) {
|
public ColumnListParameter(String name, String description,
|
||||||
|
String referredTabularParameterName, String separator) {
|
||||||
super(name, ParameterTypology.COLUMN_LIST, description);
|
super(name, ParameterTypology.COLUMN_LIST, description);
|
||||||
this.referredTabularParameterName = referredTabularParameterName;
|
this.referredTabularParameterName = referredTabularParameterName;
|
||||||
this.separator = separator;
|
this.separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param referredTabularParameterName the referredTabularParameterName to set
|
* @param referredTabularParameterName
|
||||||
|
* the referredTabularParameterName to set
|
||||||
*/
|
*/
|
||||||
public void setReferredTabularParameterName(String referredTabularParameterName) {
|
public void setReferredTabularParameterName(
|
||||||
|
String referredTabularParameterName) {
|
||||||
this.referredTabularParameterName = referredTabularParameterName;
|
this.referredTabularParameterName = referredTabularParameterName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the referredTabularParameterName
|
* @return the referredTabularParameterName
|
||||||
*/
|
*/
|
||||||
|
@ -53,13 +53,12 @@ public class ColumnListParameter extends Parameter implements Serializable {
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the separator
|
* @return the separator
|
||||||
*/
|
*/
|
||||||
|
@ -67,4 +66,17 @@ public class ColumnListParameter extends Parameter implements Serializable {
|
||||||
return separator;
|
return separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSeparator(String separator) {
|
||||||
|
this.separator = separator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ColumnListParameter [referredTabularParameterName="
|
||||||
|
+ referredTabularParameterName + ", value=" + value
|
||||||
|
+ ", separator=" + separator + ", name=" + name
|
||||||
|
+ ", description=" + description + ", typology=" + typology
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,10 @@ package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ColumnParameter extends Parameter implements Serializable {
|
public class ColumnParameter extends Parameter implements Serializable {
|
||||||
|
@ -18,9 +17,9 @@ public class ColumnParameter extends Parameter implements Serializable {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -5084557326770554659L;
|
private static final long serialVersionUID = -5084557326770554659L;
|
||||||
String referredTabularParameterName;
|
private String referredTabularParameterName;
|
||||||
String defaultColumn;
|
private String defaultColumn;
|
||||||
String value;
|
private String value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -33,20 +32,22 @@ public class ColumnParameter extends Parameter implements Serializable {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public ColumnParameter(String name, String description, String referredTabularParameterName, String defaultColumn) {
|
public ColumnParameter(String name, String description,
|
||||||
|
String referredTabularParameterName, String defaultColumn) {
|
||||||
super(name, ParameterTypology.COLUMN, description);
|
super(name, ParameterTypology.COLUMN, description);
|
||||||
this.referredTabularParameterName = referredTabularParameterName;
|
this.referredTabularParameterName = referredTabularParameterName;
|
||||||
this.defaultColumn = defaultColumn;
|
this.defaultColumn = defaultColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param referredTabularParameterName the referredTabularParameterName to set
|
* @param referredTabularParameterName
|
||||||
|
* the referredTabularParameterName to set
|
||||||
*/
|
*/
|
||||||
public void setReferredTabularParameterName(
|
public void setReferredTabularParameterName(
|
||||||
String referredTabularParameterName) {
|
String referredTabularParameterName) {
|
||||||
this.referredTabularParameterName = referredTabularParameterName;
|
this.referredTabularParameterName = referredTabularParameterName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the referredTabularParameterName
|
* @return the referredTabularParameterName
|
||||||
*/
|
*/
|
||||||
|
@ -60,25 +61,34 @@ public class ColumnParameter extends Parameter implements Serializable {
|
||||||
public String getDefaultColumn() {
|
public String getDefaultColumn() {
|
||||||
return defaultColumn;
|
return defaultColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param defaultValue the defaultValue to set
|
* @param defaultValue
|
||||||
|
* the defaultValue to set
|
||||||
*/
|
*/
|
||||||
public void setDefaultColumn(String defaultColumn) {
|
public void setDefaultColumn(String defaultColumn) {
|
||||||
this.defaultColumn = defaultColumn;
|
this.defaultColumn = defaultColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the value
|
* @return the value
|
||||||
*/
|
*/
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ColumnParameter [referredTabularParameterName="
|
||||||
|
+ referredTabularParameterName + ", defaultColumn="
|
||||||
|
+ defaultColumn + ", value=" + value + ", name=" + name
|
||||||
|
+ ", description=" + description + ", typology=" + typology
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
public class EnumParameter extends Parameter implements IsSerializable {
|
public class EnumParameter extends Parameter implements IsSerializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1673874854501249519L;
|
private static final long serialVersionUID = 1673874854501249519L;
|
||||||
List<String> values = new ArrayList<String>();
|
private List<String> values = new ArrayList<String>();
|
||||||
String defaultValue;
|
private String defaultValue;
|
||||||
String value;
|
private String value;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,6 +74,8 @@ public class EnumParameter extends Parameter implements IsSerializable {
|
||||||
this.values.add(value);
|
this.values.add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the value
|
* @return the value
|
||||||
*/
|
*/
|
||||||
|
@ -88,4 +90,15 @@ public class EnumParameter extends Parameter implements IsSerializable {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EnumParameter [values=" + values + ", defaultValue="
|
||||||
|
+ defaultValue + ", value=" + value + ", name=" + name
|
||||||
|
+ ", description=" + description + ", typology=" + typology
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,14 +70,18 @@ public class FileParameter extends Parameter implements IsSerializable {
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value=value;
|
this.value=value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FileParameter [value=" + value + ", defaultMimeType="
|
return "FileParameter [value=" + value + ", defaultMimeType="
|
||||||
+ defaultMimeType + ", supportedMimeTypes="
|
+ defaultMimeType + ", supportedMimeTypes="
|
||||||
+ supportedMimeTypes + "]";
|
+ supportedMimeTypes + ", name=" + name + ", description="
|
||||||
|
+ description + ", typology=" + typology + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,10 @@ package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ListParameter extends Parameter implements IsSerializable {
|
public class ListParameter extends Parameter implements IsSerializable {
|
||||||
|
@ -31,38 +30,38 @@ public class ListParameter extends Parameter implements IsSerializable {
|
||||||
* @param defaultValue
|
* @param defaultValue
|
||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
public ListParameter(String name, String description, String type, String separator) {
|
public ListParameter(String name, String description, String type,
|
||||||
|
String separator) {
|
||||||
super(name, ParameterTypology.LIST, description);
|
super(name, ParameterTypology.LIST, description);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.separator = separator;
|
this.separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the type
|
* @return the type
|
||||||
*/
|
*/
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param type the type to set
|
* @param type
|
||||||
|
* the type to set
|
||||||
*/
|
*/
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the separator
|
* @return the separator
|
||||||
*/
|
*/
|
||||||
|
@ -70,6 +69,10 @@ public class ListParameter extends Parameter implements IsSerializable {
|
||||||
return separator;
|
return separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSeparator(String separator) {
|
||||||
|
this.separator = separator;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ListParameter [type=" + type + ", value=" + value
|
return "ListParameter [type=" + type + ", value=" + value
|
||||||
|
@ -77,7 +80,5 @@ public class ListParameter extends Parameter implements IsSerializable {
|
||||||
+ ", description=" + description + ", typology=" + typology
|
+ ", description=" + description + ", typology=" + typology
|
||||||
+ "]";
|
+ "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,5 +86,6 @@ public class ObjectParameter extends Parameter implements IsSerializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ public abstract class Parameter implements Serializable {
|
||||||
private static final long serialVersionUID = -555286289487491703L;
|
private static final long serialVersionUID = -555286289487491703L;
|
||||||
|
|
||||||
public enum ParameterTypology {
|
public enum ParameterTypology {
|
||||||
OBJECT, TABULAR, FILE, ENUM, LIST, COLUMN, COLUMN_LIST, TABULAR_LIST
|
OBJECT, TABULAR, FILE, ENUM, LIST, COLUMN, COLUMN_LIST, TABULAR_LIST, WKT
|
||||||
};
|
};
|
||||||
|
|
||||||
protected String name;
|
protected String name;
|
||||||
|
@ -89,38 +89,6 @@ public abstract class Parameter implements Serializable {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isObject() {
|
|
||||||
return this.typology == ParameterTypology.OBJECT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isTabular() {
|
|
||||||
return this.typology == ParameterTypology.TABULAR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isFile() {
|
|
||||||
return this.typology == ParameterTypology.FILE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEnum() {
|
|
||||||
return this.typology == ParameterTypology.ENUM;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isList() {
|
|
||||||
return this.typology == ParameterTypology.LIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isColumn() {
|
|
||||||
return this.typology == ParameterTypology.COLUMN;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isColumnList() {
|
|
||||||
return this.typology == ParameterTypology.COLUMN_LIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isTabularList() {
|
|
||||||
return this.typology == ParameterTypology.TABULAR_LIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Parameter [name=" + name + ", description=" + description
|
return "Parameter [name=" + name + ", description=" + description
|
||||||
|
|
|
@ -102,7 +102,10 @@ public class TabularListParameter extends Parameter implements Serializable {
|
||||||
return "TabularListParameter [value=" + value + ", separator="
|
return "TabularListParameter [value=" + value + ", separator="
|
||||||
+ separator + ", templates=" + templates + ", defaultMimeType="
|
+ separator + ", templates=" + templates + ", defaultMimeType="
|
||||||
+ defaultMimeType + ", supportedMimeTypes="
|
+ defaultMimeType + ", supportedMimeTypes="
|
||||||
+ supportedMimeTypes + "]";
|
+ supportedMimeTypes + ", name=" + name + ", description="
|
||||||
|
+ description + ", typology=" + typology + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public enum WKTGeometryType {
|
||||||
|
Point("Point"), LineString("LineString"), Polygon("Polygon"), Circle(
|
||||||
|
"Circle"), Triangle("Triangle"), Square("Square"), Pentagon(
|
||||||
|
"Pentagon"), Hexagon("Hexagon"), Box("Box");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
private WKTGeometryType(final String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String label;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return name();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param label
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static WKTGeometryType getFromLabel(String label) {
|
||||||
|
if (label == null || label.isEmpty())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
for (WKTGeometryType type : values()) {
|
||||||
|
if (type.label.compareToIgnoreCase(label) == 0) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<WKTGeometryType> asList() {
|
||||||
|
List<WKTGeometryType> list = Arrays.asList(values());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.dataminermanager.shared.parameters;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WKTParameter extends Parameter implements IsSerializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1673874854501249519L;
|
||||||
|
private WKTGeometryType wktGeometryType;
|
||||||
|
private String defaultValue;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public WKTParameter() {
|
||||||
|
super();
|
||||||
|
this.typology = ParameterTypology.WKT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type
|
||||||
|
* @param defaultValue
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
public WKTParameter(String name, String description,
|
||||||
|
WKTGeometryType wktGeometryType, String defaultValue) {
|
||||||
|
super(name, ParameterTypology.WKT, description);
|
||||||
|
this.wktGeometryType = wktGeometryType;
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the defaultValue
|
||||||
|
*/
|
||||||
|
public String getDefaultValue() {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param defaultValue
|
||||||
|
* the defaultValue to set
|
||||||
|
*/
|
||||||
|
public void setDefaultValue(String defaultValue) {
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the WKT Geometry Type
|
||||||
|
*/
|
||||||
|
public WKTGeometryType getWktGeometryType() {
|
||||||
|
return wktGeometryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param wktGeometryType
|
||||||
|
* set the WKT Geometry Type
|
||||||
|
*/
|
||||||
|
public void setWktGeometryType(WKTGeometryType wktGeometryType) {
|
||||||
|
this.wktGeometryType = wktGeometryType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the value
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "WKTParameter [wktGeometryType=" + wktGeometryType
|
||||||
|
+ ", defaultValue=" + defaultValue + ", value=" + value
|
||||||
|
+ ", name=" + name + ", description=" + description
|
||||||
|
+ ", typology=" + typology + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,12 +14,12 @@
|
||||||
<set-configuration-property name="CssResource.style"
|
<set-configuration-property name="CssResource.style"
|
||||||
value="pretty" />
|
value="pretty" />
|
||||||
|
|
||||||
<!-- <inherits name="org.gcube.portlets.user.tdw.TabularDataWidget" /> <inherits
|
|
||||||
name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> <inherits name='org.gcube.portlets.user.csvimportwizard.CSVImportWizard'
|
|
||||||
/> -->
|
|
||||||
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
||||||
<!-- <inherits name="org.gcube.portlets.user.csvimportwizard.ws.CSVImportWizardWorkspace"
|
|
||||||
/> -->
|
<!-- OpenLayer Basic Widgets -->
|
||||||
|
<inherits
|
||||||
|
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||||
|
|
||||||
<!-- inherits WorkspaceExplorer widget -->
|
<!-- inherits WorkspaceExplorer widget -->
|
||||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||||
|
@ -29,32 +29,19 @@
|
||||||
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader" />
|
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader" />
|
||||||
|
|
||||||
|
|
||||||
<!-- <inherits name='org.gcube.portlets.widgets.lighttree.WorkspacePortletLightTree'
|
|
||||||
/> -->
|
|
||||||
<!-- <inherits name='org.gwtopenmaps.openlayers.OpenLayers' /> <inherits
|
|
||||||
name='org.gcube.portlets.widgets.file_dw_import_wizard.filedwimportwizard'
|
|
||||||
/> <script src="http://www.openlayers.org/api/OpenLayers.js"></script> -->
|
|
||||||
|
|
||||||
<!-- <replace-with class="org.gcube.portlets.user.dataminermanager.client.custom.Gxt2ZIndexXDOM">
|
|
||||||
<when-type-is class="com.sencha.gxt.core.client.dom.XDOM.XDOMImpl" /> </replace-with> -->
|
|
||||||
|
|
||||||
<entry-point
|
<entry-point
|
||||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||||
<!--
|
<!-- <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
|
||||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||||
/> -->
|
|
||||||
|
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
|
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||||
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
|
|
||||||
/> -->
|
|
||||||
|
|
||||||
|
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
/* FIX FOR Portal Theme */
|
/* FIX FOR Portal Theme */
|
||||||
|
/* OpenLayer Form fix */
|
||||||
|
#wkt-geometry-text-area {
|
||||||
|
width: 400px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#combo-geometry-type {
|
||||||
|
width: 406px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.aui body {
|
.aui body {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
|
@ -40,7 +49,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.aui ul, .aui ol {
|
.aui ul, .aui ol {
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Data Miner */
|
/* Data Miner */
|
||||||
|
|
|
@ -7,10 +7,15 @@
|
||||||
<link type="text/css" rel="stylesheet" href="dataminermanager/reset.css">
|
<link type="text/css" rel="stylesheet" href="dataminermanager/reset.css">
|
||||||
<link type="text/css" rel="stylesheet" href="DataMinerManager.css">
|
<link type="text/css" rel="stylesheet" href="DataMinerManager.css">
|
||||||
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
|
<link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="dataminermanager/css/ol.css">
|
||||||
|
|
||||||
<title>Data Miner Manager</title>
|
<title>Data Miner Manager</title>
|
||||||
|
<script type="text/javascript" src="dataminermanager/js/jquery-1.11.0.min.js"></script>
|
||||||
|
<script type="text/javascript" src="dataminermanager/js/ol.js"></script>
|
||||||
|
<!--
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="dataminermanager/js/jquery-1.10.1.min.js"></script>
|
src="dataminermanager/js/jquery-1.10.1.min.js"></script> -->
|
||||||
|
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="dataminermanager/js/bootstrap.min.js"></script>
|
src="dataminermanager/js/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
|
|
|
@ -13,11 +13,15 @@
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="<%=request.getContextPath()%>/gxt/css/gxt-all.css"
|
href="<%=request.getContextPath()%>/gxt/css/gxt-all.css"
|
||||||
type="text/css">
|
type="text/css">
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<%=request.getContextPath()%>/dataminermanager/css/ol.css"
|
||||||
|
type="text/css">
|
||||||
|
|
||||||
<script
|
<script
|
||||||
src='<%=request.getContextPath()%>/dataminermanager/js/jquery-1.10.1.min.js'></script>
|
src='<%=request.getContextPath()%>/dataminermanager/js/jquery-1.11.0.min.js'></script>
|
||||||
|
<script src='<%=request.getContextPath()%>/dataminermanager/js/ol.js'></script>
|
||||||
<script
|
<script
|
||||||
src='<%=request.getContextPath()%>/dataminermanager/js/bootstrap.min.js'></script>
|
src='<%=request.getContextPath()%>/dataminermanager/js/bootstrap.min.js'></script>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
src='<%=request.getContextPath()%>/dataminermanager/dataminermanager.nocache.js'></script>
|
src='<%=request.getContextPath()%>/dataminermanager/dataminermanager.nocache.js'></script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue