ref 11720: DataMiner - Update to StorageHUB
https://support.d4science.org/issues/11720 Integrated DataMiner CL for simplify integration with new StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@167298 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
88a1c06837
commit
85f986f6ac
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/data-miner-manager-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/data-miner-manager-1.7.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/data-miner-manager-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-1.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -34,5 +34,5 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="target/data-miner-manager-1.6.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/data-miner-manager-1.7.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
11
pom.xml
11
pom.xml
|
@ -12,7 +12,7 @@
|
|||
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>data-miner-manager</artifactId>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<version>1.7.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>data-miner-manager</name>
|
||||
|
@ -199,9 +199,6 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- GCube Widgets -->
|
||||
<!-- <dependency> <groupId>org.gcube.portlets.user</groupId> <artifactId>gcube-widgets</artifactId>
|
||||
<scope>compile</scope> </dependency> -->
|
||||
|
||||
<!-- Storage -->
|
||||
<dependency>
|
||||
|
@ -242,6 +239,12 @@
|
|||
<artifactId>ic-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DataMiner CL -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.analysis</groupId>
|
||||
<artifactId>data-miner-manager-cl</artifactId>
|
||||
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Nord52 -->
|
||||
<dependency>
|
||||
|
|
|
@ -2,6 +2,12 @@ package org.gcube.portlets.user.dataminermanager.client;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.CancelExecutionFromComputationsRequestEvent;
|
||||
|
@ -30,14 +36,8 @@ import org.gcube.portlets.user.dataminermanager.client.type.MenuType;
|
|||
import org.gcube.portlets.user.dataminermanager.client.util.InfoMessageBox;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValue;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFileList;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueImage;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValue;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFileList;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueImage;
|
||||
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueImage;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueImage;
|
||||
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEle
|
|||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload.UPLOAD_TYPE;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
|
|
|
@ -3,11 +3,11 @@ package org.gcube.portlets.user.dataminermanager.client.computations;
|
|||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValue;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFileList;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueImage;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValue;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueFileList;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationValueImage;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEle
|
|||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload.UPLOAD_TYPE;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEle
|
|||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.DialogUpload.UPLOAD_TYPE;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.uploader.dragdrop.MultipleDNDUpload;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.portlets.user.dataminermanager.client.events;
|
|||
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaRegionType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.OperatorsClassificationRequestType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.events;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.StartComputationExecutionRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||
|
|
|
@ -13,14 +13,14 @@ import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
|||
import org.gcube.portlets.user.dataminermanager.client.widgets.FileViewer;
|
||||
import org.gcube.portlets.user.dataminermanager.client.widgets.ImageViewer;
|
||||
import org.gcube.portlets.user.dataminermanager.client.widgets.ResourceViewer;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.FileResource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.ImageResource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.MapResource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.ObjectResource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.Resource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.Resource.ResourceType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.TableResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.FileResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ImageResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ObjectResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource.ResourceType;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.TableResource;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -143,8 +143,6 @@ public class ComputationOutputPanel extends SimpleContainer {
|
|||
v.add(getMultipleOutput(mapResource), new VerticalLayoutData(1,
|
||||
-1, new Margins(0)));
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
case OBJECT:
|
||||
break;
|
||||
default:
|
||||
|
@ -227,8 +225,6 @@ public class ComputationOutputPanel extends SimpleContainer {
|
|||
break;
|
||||
case MAP:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEv
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent.ComputationReadyEventHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent.HasComputationReadyEventHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.client.experiments.ComputationParametersPanel.ComputationParametersPanelHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
|
|
|
@ -20,11 +20,11 @@ import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServi
|
|||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
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.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ParameterType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ParameterType;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
|
|
@ -11,9 +11,9 @@ import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationE
|
|||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus.Status;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus.Status;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.experiments;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.sencha.gxt.widget.core.client.Dialog;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.experiments;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.dataminermanager.client.experiments;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorCategory;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorCategory;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.experiments;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
|
|
|
@ -14,9 +14,9 @@ import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassific
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationRequestEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.type.OperatorsClassificationRequestType;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorCategory;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorCategory;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.event.dom.client.KeyUpEvent;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.experiments;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
|||
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.sencha.gxt.widget.core.client.TabItemConfig;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
|
||||
|
|
|
@ -8,10 +8,10 @@ import java.util.ArrayList;
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEvent.TabularFldChangeEventHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.client.properties.ColumnItemPropertiesCombo;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
|
|
@ -9,10 +9,10 @@ import java.util.List;
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEvent.TabularFldChangeEventHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.client.properties.ColumnItemProperties;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ColumnListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.cell.client.AbstractCell;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
|
|
@ -5,8 +5,8 @@ package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.DateParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.DateParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.EnumParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.EnumParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
|
||||
|
|
|
@ -13,9 +13,9 @@ import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEven
|
|||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.FileParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -7,9 +7,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -6,9 +6,9 @@ package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
|
||||
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
|
|
|
@ -9,10 +9,10 @@ import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
|
|
@ -15,11 +15,11 @@ import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEv
|
|||
import org.gcube.portlets.user.dataminermanager.client.events.TabularFldChangeEvent.TabularFldChangeEventHandler;
|
||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.SessionExpiredServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TabularParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
|
|
@ -6,9 +6,9 @@ package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.TabularParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularListParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularParameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
|
|
@ -5,8 +5,8 @@ package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TimeParameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TimeParameter;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
|
|
|
@ -5,8 +5,8 @@ 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.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.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;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.properties;
|
||||
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.core.client.ValueProvider;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.properties;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.data.shared.LabelProvider;
|
||||
|
|
|
@ -2,18 +2,18 @@ package org.gcube.portlets.user.dataminermanager.client.rpc;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.google.gwt.user.client.rpc.RemoteService;
|
||||
|
|
|
@ -2,17 +2,17 @@ package org.gcube.portlets.user.dataminermanager.client.rpc;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.widgets;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.FileResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.FileResource;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.gcube.portlets.user.dataminermanager.client.widgets;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.ImageResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ImageResource;
|
||||
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
|
|
|
@ -6,8 +6,8 @@ package org.gcube.portlets.user.dataminermanager.client.widgets;
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.ObjectResource;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.Resource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ObjectResource;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
|
||||
|
||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||
|
||||
|
|
|
@ -6,27 +6,30 @@
|
|||
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
||||
|
||||
<!--
|
||||
<inherits name="com.google.gwt.logging.Logging" /> -->
|
||||
|
||||
<!-- <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" /> -->
|
||||
<!-- Debug CSS style <set-configuration-property name="CssResource.style"
|
||||
value="pretty" /> -->
|
||||
|
||||
|
||||
<inherits name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
||||
|
||||
|
||||
<!-- DataMiner CL -->
|
||||
<inherits
|
||||
name='org.gcube.data.analysis.dataminermanagercl.dataminermanagercl' />
|
||||
|
||||
<!-- OpenLayer Basic Widgets -->
|
||||
<inherits
|
||||
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||
|
||||
|
||||
<!-- NetCDF Basic Widgets -->
|
||||
<inherits
|
||||
name='org.gcube.portlets.widgets.netcdfbasicwidgets.netcdfbasicwidgets' />
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- inherits WorkspaceExplorer widget -->
|
||||
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
|
||||
|
||||
|
@ -34,22 +37,21 @@
|
|||
<inherits
|
||||
name="org.gcube.portlets.widgets.workspaceuploader.WorkspaceUploader" />
|
||||
|
||||
|
||||
|
||||
<entry-point
|
||||
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"
|
||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||
/> -->
|
||||
/> -->
|
||||
|
||||
|
||||
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
|
||||
|
||||
|
||||
<source path='client' />
|
||||
|
|
|
@ -7,23 +7,23 @@ import javax.servlet.ServletException;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletService;
|
||||
import org.gcube.portlets.user.dataminermanager.server.dmservice.SClient;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
|
||||
import org.gcube.portlets.user.dataminermanager.server.storage.StorageUtil;
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.DataMinerWorkAreaManager;
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.ServiceCredentials;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.TableReader;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.OutputData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationData;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.ComputationStatus;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorsClassification;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
//import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry;
|
||||
//import org.gcube.portlets.widgets.file_dw_import_wizard.server.file.TargetRegistry;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
|
|
|
@ -3,8 +3,8 @@ package org.gcube.portlets.user.dataminermanager.server;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorCategory;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.process.OperatorCategory;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@ import javax.servlet.http.HttpSession;
|
|||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.gcube.portlets.user.dataminermanager.server.storage.StorageUtil;
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.ServiceCredentials;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
|
@ -12,11 +12,11 @@ import org.apache.log4j.Logger;
|
|||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portlets.user.dataminermanager.server.dmservice.SClient;
|
||||
import org.gcube.portlets.user.dataminermanager.server.dmservice.SClient4WPSBuilder;
|
||||
import org.gcube.portlets.user.dataminermanager.server.dmservice.SClientBuilder;
|
||||
import org.gcube.portlets.user.dataminermanager.server.dmservice.SClientDirector;
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.ServiceCredentials;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient4WPSBuilder;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClientBuilder;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClientDirector;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.Constants;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.OutputData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationData;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.ComputationStatus;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.Operator;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.process.OperatorsClassification;
|
||||
|
||||
/**
|
||||
*
|
||||
* Client of service
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class SClient implements Serializable{
|
||||
|
||||
|
||||
private static final long serialVersionUID = 7087349607933493388L;
|
||||
|
||||
public SClient() {
|
||||
super();
|
||||
}
|
||||
|
||||
public abstract List<OperatorsClassification> getOperatorsClassifications()
|
||||
throws Exception;
|
||||
|
||||
public abstract List<Parameter> getInputParameters(Operator operator)
|
||||
throws Exception;
|
||||
|
||||
public abstract ComputationId startComputation(Operator operator)
|
||||
throws Exception;
|
||||
|
||||
public abstract ComputationStatus getComputationStatus(
|
||||
ComputationId computationId) throws Exception;
|
||||
|
||||
public abstract OutputData getOutputDataByComputationId(
|
||||
ComputationId computationId) throws Exception;
|
||||
|
||||
public abstract ComputationData getComputationDataByComputationProperties(
|
||||
Map<String, String> computationProperties) throws Exception;
|
||||
|
||||
public abstract String cancelComputation(ComputationId computationId)
|
||||
throws Exception;
|
||||
|
||||
public abstract ComputationId resubmitComputation(
|
||||
Map<String, String> computationProperties) throws Exception;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SClient []";
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Builder of Client 4 WPS Service
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SClient4WPSBuilder extends SClientBuilder {
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(SClient4WPSBuilder.class);
|
||||
private ServiceCredentials serviceCredendial;
|
||||
|
||||
public SClient4WPSBuilder(ServiceCredentials serviceCredential) {
|
||||
this.serviceCredendial= serviceCredential;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildSClient() throws ServiceException {
|
||||
try {
|
||||
logger.debug("Build SC4WPS");
|
||||
logger.debug("ServiceCredential: " + serviceCredendial);
|
||||
SClient sClient = new SClient4WPS(serviceCredendial);
|
||||
|
||||
sClientSpec.setSClient(sClient);
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new ServiceException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
|
||||
/**
|
||||
* Abstract class for build client of service
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class SClientBuilder {
|
||||
protected SClientSpec sClientSpec;
|
||||
|
||||
public SClientSpec getSClientSpec() {
|
||||
return sClientSpec;
|
||||
}
|
||||
|
||||
public void createSpec() {
|
||||
sClientSpec = new SClientSpec();
|
||||
|
||||
}
|
||||
|
||||
public abstract void buildSClient() throws ServiceException;
|
||||
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
|
||||
|
||||
/**
|
||||
* Director
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SClientDirector {
|
||||
SClientBuilder sClientBuilder;
|
||||
|
||||
public void setSClientBuilder(
|
||||
SClientBuilder sClientBuilder) {
|
||||
this.sClientBuilder = sClientBuilder;
|
||||
}
|
||||
|
||||
public SClient getSClient() {
|
||||
return sClientBuilder.getSClientSpec().getSClient();
|
||||
|
||||
}
|
||||
|
||||
public void constructSClient() throws ServiceException {
|
||||
sClientBuilder.createSpec();
|
||||
sClientBuilder.buildSClient();
|
||||
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice;
|
||||
|
||||
/**
|
||||
* Specification
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SClientSpec {
|
||||
private SClient sClient;
|
||||
|
||||
public SClient getSClient() {
|
||||
return sClient;
|
||||
}
|
||||
|
||||
public void setSClient(SClient sClient) {
|
||||
this.sClient = sClient;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps;
|
||||
|
||||
import org.n52.wps.client.AbstractClientGETRequest;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DClientDescribeProcessRequest extends AbstractClientGETRequest {
|
||||
|
||||
private static String IDENTIFIER_REQ_PARAM_NAME = "identifier";
|
||||
private static String REQUEST_REQ_PARAM_VALUE = "DescribeProcess";
|
||||
|
||||
public DClientDescribeProcessRequest() {
|
||||
super();
|
||||
setRequestParamValue(REQUEST_REQ_PARAM_VALUE);
|
||||
}
|
||||
|
||||
public void setIdentifier(String[] ids) {
|
||||
String idsString = "";
|
||||
for(int i = 0; i < ids.length; i++) {
|
||||
idsString = idsString + ids[i];
|
||||
if(i != ids.length -1) {
|
||||
idsString = idsString + ",";
|
||||
}
|
||||
}
|
||||
requestParams.put(IDENTIFIER_REQ_PARAM_NAME, idsString);
|
||||
}
|
||||
|
||||
public boolean valid() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.opengis.wps.x100.InputDescriptionType;
|
||||
import net.opengis.wps.x100.OutputDescriptionType;
|
||||
import net.opengis.wps.x100.ProcessDescriptionType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProcessInformations implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4729933672312944832L;
|
||||
private ProcessDescriptionType processDescription;
|
||||
private InputDescriptionType[] inputs;
|
||||
private OutputDescriptionType[] outputs;
|
||||
|
||||
public ProcessInformations(ProcessDescriptionType processDescription) {
|
||||
super();
|
||||
this.processDescription = processDescription;
|
||||
this.inputs = new InputDescriptionType[0];
|
||||
this.outputs = new OutputDescriptionType[0];
|
||||
}
|
||||
|
||||
public ProcessInformations(ProcessDescriptionType processDescription,
|
||||
InputDescriptionType[] inputs, OutputDescriptionType[] outputs) {
|
||||
super();
|
||||
this.processDescription = processDescription;
|
||||
this.inputs = inputs;
|
||||
this.outputs = outputs;
|
||||
}
|
||||
|
||||
public ProcessDescriptionType getProcessDescription() {
|
||||
return processDescription;
|
||||
}
|
||||
|
||||
public void setProcessDescription(
|
||||
ProcessDescriptionType processDescription) {
|
||||
this.processDescription = processDescription;
|
||||
}
|
||||
|
||||
public InputDescriptionType[] getInputs() {
|
||||
return inputs;
|
||||
}
|
||||
|
||||
public void setInputs(InputDescriptionType[] inputs) {
|
||||
this.inputs = inputs;
|
||||
}
|
||||
|
||||
public OutputDescriptionType[] getOutputs() {
|
||||
return outputs;
|
||||
}
|
||||
|
||||
public void setOutputs(OutputDescriptionType[] outputs) {
|
||||
this.outputs = outputs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProcessInformations [processDescription="
|
||||
+ processDescription + ", inputs="
|
||||
+ Arrays.toString(inputs) + ", outputs="
|
||||
+ Arrays.toString(outputs) + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ResponseWPS implements Serializable {
|
||||
private static final long serialVersionUID = 3449817768583395068L;
|
||||
private String data;
|
||||
private String description;
|
||||
private String mimeType;
|
||||
|
||||
public ResponseWPS() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ResponseWPS(String data, String description, String mimeType) {
|
||||
super();
|
||||
this.data = data;
|
||||
this.description = description;
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResponseWPS [data=" + data + ", description=" + description
|
||||
+ ", mimeType=" + mimeType + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,753 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import net.opengis.ows.x11.ExceptionReportDocument;
|
||||
import net.opengis.ows.x11.OperationDocument.Operation;
|
||||
import net.opengis.wps.x100.CapabilitiesDocument;
|
||||
import net.opengis.wps.x100.ExecuteDocument;
|
||||
import net.opengis.wps.x100.ExecuteResponseDocument;
|
||||
import net.opengis.wps.x100.ProcessBriefType;
|
||||
import net.opengis.wps.x100.ProcessDescriptionType;
|
||||
import net.opengis.wps.x100.ProcessDescriptionsDocument;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.xmlbeans.XmlException;
|
||||
import org.apache.xmlbeans.XmlObject;
|
||||
import org.apache.xmlbeans.XmlOptions;
|
||||
import org.n52.wps.client.ClientCapabiltiesRequest;
|
||||
import org.n52.wps.client.WPSClientException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SClient4WPSSession implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1387670579312851370L;
|
||||
private static Logger logger = LoggerFactory.getLogger(SClient4WPSSession.class);
|
||||
private static final String OGC_OWS_URI = "http://www.opengeospatial.net/ows";
|
||||
private static String SUPPORTED_VERSION = "1.0.0";
|
||||
|
||||
// private static StatWPSClientSession session;
|
||||
private HashMap<String, CapabilitiesDocument> loggedServices;
|
||||
private XmlOptions options = null;
|
||||
|
||||
// a Map of <url, all available process descriptions>
|
||||
public HashMap<String, ProcessDescriptionsDocument> processDescriptions;
|
||||
private String user;
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* Initializes a WPS client session.
|
||||
*
|
||||
* @param user
|
||||
* user
|
||||
* @param password
|
||||
* password
|
||||
*/
|
||||
public SClient4WPSSession(String user, String password) {
|
||||
super();
|
||||
logger.debug("Create SClient4WPSSession: [user=" + user + ", password=" + password + "]");
|
||||
this.user = user;
|
||||
this.password = password;
|
||||
options = new XmlOptions();
|
||||
options.setLoadStripWhitespace();
|
||||
options.setLoadTrimTextBuffer();
|
||||
loggedServices = new HashMap<String, CapabilitiesDocument>();
|
||||
processDescriptions = new HashMap<String, ProcessDescriptionsDocument>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Connects to a WPS and retrieves Capabilities plus puts all available
|
||||
* Descriptions into cache.
|
||||
*
|
||||
* @param url
|
||||
* the entry point for the service. This is used as id for
|
||||
* further identification of the service.
|
||||
* @return true, if connect succeeded, false else.
|
||||
* @throws WPSClientException
|
||||
* wps client exception
|
||||
*/
|
||||
|
||||
public boolean connect(String url) throws WPSClientException {
|
||||
logger.info("CONNECT: " + url);
|
||||
logger.debug("LoggedSevices: " + loggedServices.keySet());
|
||||
if (loggedServices.containsKey(url)) {
|
||||
logger.debug("Service already registered: " + url);
|
||||
return false;
|
||||
}
|
||||
logger.debug("Service not registered");
|
||||
CapabilitiesDocument capsDoc = retrieveCapsViaGET(url);
|
||||
if (capsDoc != null) {
|
||||
logger.debug("Adding caps to logged services " + url);
|
||||
loggedServices.put(url, capsDoc);
|
||||
logger.debug("Logged Services key: " + loggedServices.keySet());
|
||||
} else {
|
||||
logger.error("CapsDoc is null!");
|
||||
}
|
||||
|
||||
ProcessDescriptionsDocument processDescs = describeAllProcesses(url);
|
||||
if (processDescs != null && capsDoc != null) {
|
||||
logger.debug("Adding processes descriptions to logged services " + url);
|
||||
processDescriptions.put(url, processDescs);
|
||||
logger.debug("ProcessDescriptions key: " + processDescriptions.keySet());
|
||||
return true;
|
||||
|
||||
} else {
|
||||
logger.error("ProcessDescs is null!");
|
||||
}
|
||||
|
||||
logger.warn("retrieving caps failed, caps are null");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connects to a WPS and retrieves Capabilities plus puts all available
|
||||
* Descriptions into cache.
|
||||
*
|
||||
* @param url
|
||||
* the entry point for the service. This is used as id for
|
||||
* further identification of the service.
|
||||
* @return true, if connect succeeded, false else.
|
||||
* @throws WPSClientException
|
||||
* wps client exception
|
||||
*/
|
||||
public boolean connectForMonitoring(String url) throws WPSClientException {
|
||||
logger.debug("CONNECT");
|
||||
if (loggedServices.containsKey(url)) {
|
||||
logger.debug("Service already registered: " + url);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.warn("retrieving caps failed, caps are null");
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* removes a service from the session
|
||||
*
|
||||
* @param url
|
||||
* url
|
||||
*/
|
||||
public void disconnect(String url) {
|
||||
/*
|
||||
* if (loggedServices.containsKey(url)) { loggedServices.remove(url);
|
||||
* processDescriptions.remove(url);
|
||||
* logger.info("service removed successfully: " + url); }
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the serverIDs of all loggedServices
|
||||
*
|
||||
* @return list of service
|
||||
*/
|
||||
public List<String> getLoggedServices() {
|
||||
if (loggedServices != null && loggedServices.keySet() != null) {
|
||||
return new ArrayList<String>(loggedServices.keySet());
|
||||
} else {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* informs you if the descriptions for the specified service is already in
|
||||
* the session. in normal case it should return true :)
|
||||
*
|
||||
* @param serverID
|
||||
* server id
|
||||
* @return success if contain descriptions in cache
|
||||
*/
|
||||
public boolean descriptionsAvailableInCache(String serverID) {
|
||||
return processDescriptions.containsKey(serverID);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the cached processdescriptions of a service.
|
||||
*
|
||||
*
|
||||
* @param wpsUrl
|
||||
* wps url
|
||||
* @return process description document
|
||||
* @throws IOException
|
||||
* IO exception
|
||||
*/
|
||||
private ProcessDescriptionsDocument getProcessDescriptionsFromCache(String wpsUrl) throws IOException {
|
||||
if (!descriptionsAvailableInCache(wpsUrl)) {
|
||||
try {
|
||||
connect(wpsUrl);
|
||||
} catch (WPSClientException e) {
|
||||
throw new IOException("Could not initialize WPS " + wpsUrl);
|
||||
}
|
||||
}
|
||||
return processDescriptions.get(wpsUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the processDescription for a specific process from Cache.
|
||||
*
|
||||
* @param serverID
|
||||
* server id
|
||||
* @param processID
|
||||
* process id
|
||||
* @return a ProcessDescription for a specific process from Cache.
|
||||
* @throws IOException
|
||||
* IO exception
|
||||
*/
|
||||
public ProcessDescriptionType getProcessDescription(String serverID, String processID) throws IOException {
|
||||
ProcessDescriptionType[] processes = getProcessDescriptionsFromCache(serverID).getProcessDescriptions()
|
||||
.getProcessDescriptionArray();
|
||||
for (ProcessDescriptionType process : processes) {
|
||||
if (process.getIdentifier().getStringValue().equals(processID)) {
|
||||
return process;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delivers all ProcessDescriptions from a WPS
|
||||
*
|
||||
* @param wpsUrl
|
||||
* the URL of the WPS
|
||||
* @return An Array of ProcessDescriptions
|
||||
* @throws IOException
|
||||
* IO exception
|
||||
*/
|
||||
public ProcessDescriptionType[] getAllProcessDescriptions(String wpsUrl) throws IOException {
|
||||
return getProcessDescriptionsFromCache(wpsUrl).getProcessDescriptions().getProcessDescriptionArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* looks up, if the service exists already in session.
|
||||
*
|
||||
* @param serverID
|
||||
* service id
|
||||
* @return true if service is registered
|
||||
*/
|
||||
public boolean serviceAlreadyRegistered(String serverID) {
|
||||
return loggedServices.containsKey(serverID);
|
||||
}
|
||||
|
||||
/**
|
||||
* provides you the cached capabilities for a specified service.
|
||||
*
|
||||
* @param url
|
||||
* service url
|
||||
* @return capabilities document
|
||||
*/
|
||||
public CapabilitiesDocument getWPSCaps(String url) {
|
||||
return loggedServices.get(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieves all current available ProcessDescriptions of a WPS. Mention: to
|
||||
* get the current list of all processes, which will be requested, the
|
||||
* cached capabilities will be used. Please keep that in mind. the retrieved
|
||||
* descriptions will not be cached, so only transient information!
|
||||
*
|
||||
* @param url
|
||||
* service url
|
||||
* @return process descriptions document
|
||||
* @throws WPSClientException
|
||||
* WPS Client expcetion
|
||||
*/
|
||||
public ProcessDescriptionsDocument describeAllProcesses(String url) throws WPSClientException {
|
||||
CapabilitiesDocument doc = loggedServices.get(url);
|
||||
if (doc == null) {
|
||||
logger.warn("serviceCaps are null, perhaps server does not exist");
|
||||
return null;
|
||||
}
|
||||
ProcessBriefType[] processes = doc.getCapabilities().getProcessOfferings().getProcessArray();
|
||||
String[] processIDs = new String[processes.length];
|
||||
for (int i = 0; i < processIDs.length; i++) {
|
||||
processIDs[i] = processes[i].getIdentifier().getStringValue();
|
||||
}
|
||||
return describeProcess(processIDs, url);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieves the desired description for a service. the retrieved
|
||||
* information will not be held in cache!
|
||||
*
|
||||
*
|
||||
* @param processIDs
|
||||
* process ids
|
||||
* @param serverID
|
||||
* server id
|
||||
* @return process description document
|
||||
* @throws WPSClientException
|
||||
* WPS Client expcetion
|
||||
*/
|
||||
public ProcessDescriptionsDocument describeProcess(String[] processIDs, String serverID) throws WPSClientException {
|
||||
|
||||
CapabilitiesDocument caps = this.loggedServices.get(serverID);
|
||||
Operation[] operations = caps.getCapabilities().getOperationsMetadata().getOperationArray();
|
||||
String url = null;
|
||||
for (Operation operation : operations) {
|
||||
if (operation.getName().equals("DescribeProcess")) {
|
||||
url = operation.getDCPArray()[0].getHTTP().getGetArray()[0].getHref();
|
||||
}
|
||||
}
|
||||
if (url == null) {
|
||||
throw new WPSClientException("Missing DescribeOperation in Capabilities");
|
||||
}
|
||||
return retrieveDescriptionViaGET(processIDs, url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a process at a WPS
|
||||
*
|
||||
* @param url
|
||||
* url of server not the entry additionally defined in the caps.
|
||||
* @param execute
|
||||
* Execute document
|
||||
* @return either an ExecuteResponseDocument or an InputStream if asked for
|
||||
* RawData or an Exception Report
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @param serverID
|
||||
* server id
|
||||
* @param execute
|
||||
* execute document
|
||||
* @param rawData
|
||||
* true if raw data
|
||||
* @return Object
|
||||
* @throws WPSClientException
|
||||
* WPS Client exception
|
||||
*/
|
||||
private Object execute(String serverID, ExecuteDocument execute, boolean rawData) throws WPSClientException {
|
||||
CapabilitiesDocument caps = loggedServices.get(serverID);
|
||||
Operation[] operations = caps.getCapabilities().getOperationsMetadata().getOperationArray();
|
||||
String url = null;
|
||||
for (Operation operation : operations) {
|
||||
if (operation.getName().equals("Execute")) {
|
||||
url = operation.getDCPArray()[0].getHTTP().getPostArray()[0].getHref();
|
||||
}
|
||||
}
|
||||
if (url == null) {
|
||||
throw new WPSClientException(
|
||||
"Caps does not contain any information about the entry point for process execution");
|
||||
}
|
||||
execute.getExecute().setVersion(SUPPORTED_VERSION);
|
||||
return retrieveExecuteResponseViaPOST(url, execute, rawData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a process at a WPS
|
||||
*
|
||||
* @param serverId
|
||||
* server id url of server not the entry additionally defined in
|
||||
* the caps.
|
||||
* @param execute
|
||||
* Execute document
|
||||
* @return either an ExecuteResponseDocument or an InputStream if asked for
|
||||
* RawData or an Exception Report
|
||||
* @throws WPSClientException
|
||||
* WPS Client Exception
|
||||
*/
|
||||
public Object execute(String serverId, ExecuteDocument execute) throws WPSClientException {
|
||||
if (execute.getExecute().isSetResponseForm() == true && execute.getExecute().isSetResponseForm() == true
|
||||
&& execute.getExecute().getResponseForm().isSetRawDataOutput() == true) {
|
||||
return execute(serverId, execute, true);
|
||||
} else {
|
||||
return execute(serverId, execute, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private CapabilitiesDocument retrieveCapsViaGET(String url) throws WPSClientException {
|
||||
logger.debug("retrieveCapsViaGET: " + url);
|
||||
ClientCapabiltiesRequest req = new ClientCapabiltiesRequest();
|
||||
url = req.getRequest(url);
|
||||
|
||||
try {
|
||||
String authString = user + ":" + password;
|
||||
logger.debug("auth string: " + authString);
|
||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||
String encoded = new String(authEncBytes);
|
||||
logger.debug("Base64 encoded auth string: " + encoded);
|
||||
|
||||
URL urlObj = new URL(url);
|
||||
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setDoOutput(true);
|
||||
connection.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
InputStream is = connection.getInputStream();
|
||||
Document doc = checkInputStream(is);
|
||||
CapabilitiesDocument capabilitiesDocument = CapabilitiesDocument.Factory.parse(doc, options);
|
||||
return capabilitiesDocument;
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Capabilities URL seems to be unvalid: " + url, e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while retrieving capabilities from url: " + url, e);
|
||||
} catch (XmlException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while parsing XML", e);
|
||||
}
|
||||
}
|
||||
|
||||
private ProcessDescriptionsDocument retrieveDescriptionViaGET(String[] processIDs, String url)
|
||||
throws WPSClientException {
|
||||
try {
|
||||
logger.debug("RetrieveDescription GET: " + processIDs + " url:" + url);
|
||||
|
||||
Path tempFile = Files.createTempFile("WPSProcessDescriptions", "txt");
|
||||
|
||||
List<String> lines = new ArrayList<>();
|
||||
lines.add("<wps:ProcessDescriptions xmlns:wps=\"http://www.opengis.net/wps/1.0.0\" "
|
||||
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
|
||||
+ "xmlns:ows=\"http://www.opengis.net/ows/1.1\" "
|
||||
+ "xsi:schemaLocation=\"http://www.opengis.net/wps/1.0.0 "
|
||||
+ "http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd\" " + "xml:lang=\"en-US\" "
|
||||
+ "service=\"WPS\" version=\"1.0.0\">");
|
||||
Files.write(tempFile, lines, Charset.defaultCharset(), StandardOpenOption.APPEND);
|
||||
|
||||
for (String processId : processIDs) {
|
||||
String[] process = { processId };
|
||||
DClientDescribeProcessRequest req = new DClientDescribeProcessRequest();
|
||||
req.setIdentifier(process);
|
||||
String requestURL = req.getRequest(url);
|
||||
|
||||
String authString = user + ":" + password;
|
||||
logger.debug("auth string: " + authString);
|
||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||
String encoded = new String(authEncBytes);
|
||||
logger.debug("Base64 encoded auth string: " + encoded);
|
||||
|
||||
URL urlObj = new URL(requestURL);
|
||||
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setDoOutput(true);
|
||||
connection.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
InputStream is = connection.getInputStream();
|
||||
lines = retrievesSingleDescription(is);
|
||||
Files.write(tempFile, lines, Charset.defaultCharset(), StandardOpenOption.APPEND);
|
||||
}
|
||||
lines = new ArrayList<>();
|
||||
lines.add("</wps:ProcessDescriptions>");
|
||||
Files.write(tempFile, lines, Charset.defaultCharset(), StandardOpenOption.APPEND);
|
||||
|
||||
logger.debug(tempFile.toString());
|
||||
Document doc = null;
|
||||
try (InputStream inputStream = Files.newInputStream(tempFile, StandardOpenOption.READ)) {
|
||||
doc = checkInputStream(inputStream);
|
||||
|
||||
}
|
||||
ProcessDescriptionsDocument processDescriptionsDocument = ProcessDescriptionsDocument.Factory.parse(doc,
|
||||
options);
|
||||
|
||||
Files.delete(tempFile);
|
||||
return processDescriptionsDocument;
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
logger.error("URL seems not to be valid");
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("URL seems not to be valid", e);
|
||||
} catch (IOException e) {
|
||||
logger.error("Error occured while receiving data");
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while receiving data", e);
|
||||
} catch (XmlException e) {
|
||||
logger.error("Error occured while parsing ProcessDescription document");
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while parsing ProcessDescription document", e);
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException(e.getLocalizedMessage(), new Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
protected List<String> retrievesSingleDescription(InputStream is) throws WPSClientException {
|
||||
try {
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
||||
|
||||
List<String> lines = new ArrayList<>();
|
||||
String line = null;
|
||||
boolean elementProcessDescriptionsFound = false;
|
||||
boolean elementProcessDescriptionsClosureFound = false;
|
||||
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (elementProcessDescriptionsFound) {
|
||||
if (elementProcessDescriptionsClosureFound) {
|
||||
if (line.contains("</wps:ProcessDescriptions>")) {
|
||||
break;
|
||||
} else {
|
||||
lines.add(line);
|
||||
}
|
||||
} else {
|
||||
int closeIndex = line.indexOf(">");
|
||||
if (closeIndex != -1) {
|
||||
elementProcessDescriptionsClosureFound = true;
|
||||
if (closeIndex == line.length() - 1) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (line.contains("<wps:ProcessDescriptions")) {
|
||||
elementProcessDescriptionsFound = true;
|
||||
int closeIndex = line.indexOf(">");
|
||||
if (closeIndex != -1) {
|
||||
elementProcessDescriptionsClosureFound = true;
|
||||
if (closeIndex == line.length() - 1) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return lines;
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException(e.getLocalizedMessage(), new Exception(e));
|
||||
}
|
||||
}
|
||||
|
||||
private InputStream retrieveDataViaPOST(XmlObject obj, String urlString) throws WPSClientException {
|
||||
try {
|
||||
logger.debug("RetrieveDataViaPost(): " + urlString);
|
||||
String authString = user + ":" + password;
|
||||
logger.debug("auth string: " + authString);
|
||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||
String encoded = new String(authEncBytes);
|
||||
logger.debug("Base64 encoded auth string: " + encoded);
|
||||
|
||||
URL url = new URL(urlString);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
conn.setRequestProperty("Accept-Encoding", "gzip");
|
||||
conn.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
|
||||
conn.setDoOutput(true);
|
||||
obj.save(conn.getOutputStream());
|
||||
InputStream input = null;
|
||||
String encoding = conn.getContentEncoding();
|
||||
if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
|
||||
logger.debug("Read encoding GZIP");
|
||||
input = new GZIPInputStream(conn.getInputStream());
|
||||
} else {
|
||||
logger.debug("Read encoding: "+encoding);
|
||||
input = conn.getInputStream();
|
||||
}
|
||||
return input;
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("URL seems to be unvalid", e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error while transmission", e);
|
||||
}
|
||||
}
|
||||
|
||||
private Document checkInputStream(InputStream is) throws WPSClientException {
|
||||
try {
|
||||
DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
|
||||
fac.setNamespaceAware(true);
|
||||
Document doc = fac.newDocumentBuilder().parse(is);
|
||||
logger.debug("Document: " + doc);
|
||||
if (doc == null) {
|
||||
logger.error("Document is null");
|
||||
throw new WPSClientException("Error in check input stream: Document is null");
|
||||
}
|
||||
|
||||
if (getFirstElementNode(doc.getFirstChild()).getLocalName().equals("ExceptionReport")
|
||||
&& getFirstElementNode(doc.getFirstChild()).getNamespaceURI().equals(OGC_OWS_URI)) {
|
||||
try {
|
||||
ExceptionReportDocument exceptionDoc = ExceptionReportDocument.Factory.parse(doc);
|
||||
logger.debug(exceptionDoc.xmlText(options));
|
||||
throw new WPSClientException("Error occured while executing query", exceptionDoc);
|
||||
} catch (XmlException e) {
|
||||
throw new WPSClientException("Error while parsing ExceptionReport retrieved from server", e);
|
||||
}
|
||||
} else {
|
||||
logger.debug("No Exception Report");
|
||||
}
|
||||
return doc;
|
||||
} catch (SAXException e) {
|
||||
logger.error("Error while parsing input: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error while parsing input", e);
|
||||
} catch (IOException e) {
|
||||
logger.error("Error occured while transfer: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while transfer", e);
|
||||
} catch (ParserConfigurationException e) {
|
||||
logger.error("Error occured, parser is not correctly configured: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured, parser is not correctly configured", e);
|
||||
} catch (WPSClientException e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private Node getFirstElementNode(Node node) {
|
||||
if (node == null) {
|
||||
return null;
|
||||
}
|
||||
if (node.getNodeType() == Node.ELEMENT_NODE) {
|
||||
return node;
|
||||
} else {
|
||||
return getFirstElementNode(node.getNextSibling());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Object retrieveExecuteResponseViaPOST(String url, ExecuteDocument doc, boolean rawData)
|
||||
throws WPSClientException {
|
||||
InputStream is = retrieveDataViaPOST(doc, url);
|
||||
if (rawData) {
|
||||
return is;
|
||||
}
|
||||
Document documentObj = checkInputStream(is);
|
||||
ExceptionReportDocument erDoc = null;
|
||||
try {
|
||||
|
||||
return ExecuteResponseDocument.Factory.parse(documentObj);
|
||||
} catch (XmlException e) {
|
||||
try {
|
||||
erDoc = ExceptionReportDocument.Factory.parse(documentObj);
|
||||
} catch (XmlException e1) {
|
||||
throw new WPSClientException("Error occured while parsing executeResponse", e);
|
||||
}
|
||||
return erDoc;
|
||||
}
|
||||
}
|
||||
|
||||
public String[] getProcessNames(String url) throws IOException {
|
||||
ProcessDescriptionType[] processes = getProcessDescriptionsFromCache(url).getProcessDescriptions()
|
||||
.getProcessDescriptionArray();
|
||||
String[] processNames = new String[processes.length];
|
||||
for (int i = 0; i < processNames.length; i++) {
|
||||
processNames[i] = processes[i].getIdentifier().getStringValue();
|
||||
}
|
||||
return processNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a process at a WPS
|
||||
*
|
||||
* @param urlString
|
||||
* url of server not the entry additionally defined in the caps.
|
||||
* @param executeAsGETString
|
||||
* KVP Execute request
|
||||
* @return either an ExecuteResponseDocument or an InputStream if asked for
|
||||
* RawData or an Exception Report
|
||||
* @throws WPSClientException
|
||||
* WPS Client exception
|
||||
*/
|
||||
public Object executeViaGET(String urlString, String executeAsGETString) throws WPSClientException {
|
||||
urlString = urlString + executeAsGETString;
|
||||
logger.debug("ExecuteViaGet() Url: " + urlString);
|
||||
try {
|
||||
// TODO
|
||||
String authString = user + ":" + password;
|
||||
logger.debug("auth string: " + authString);
|
||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||
String encoded = new String(authEncBytes);
|
||||
logger.debug("Base64 encoded auth string: " + encoded);
|
||||
|
||||
URL url = new URL(urlString);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
conn.setDoOutput(true);
|
||||
InputStream is = conn.getInputStream();
|
||||
|
||||
if (executeAsGETString.toUpperCase().contains("RAWDATA")) {
|
||||
logger.debug("ExecuteAsGETString as RAWDATA");
|
||||
return is;
|
||||
}
|
||||
Document doc = checkInputStream(is);
|
||||
ExceptionReportDocument erDoc = null;
|
||||
logger.debug("ExecuteAsGETString as Document");
|
||||
|
||||
try {
|
||||
return ExecuteResponseDocument.Factory.parse(doc);
|
||||
} catch (XmlException e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
erDoc = ExceptionReportDocument.Factory.parse(doc);
|
||||
} catch (XmlException e1) {
|
||||
e1.printStackTrace();
|
||||
throw new WPSClientException("Error occured while parsing executeResponse", e);
|
||||
|
||||
}
|
||||
throw new WPSClientException("Error occured while parsing executeResponse", erDoc);
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Capabilities URL seems to be unvalid: " + urlString, e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while retrieving capabilities from url: " + urlString, e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String cancelComputation(String url, String computationId) throws WPSClientException {
|
||||
|
||||
try {
|
||||
String authString = user + ":" + password;
|
||||
logger.debug("auth string: " + authString);
|
||||
byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
|
||||
String encoded = new String(authEncBytes);
|
||||
logger.debug("Base64 encoded auth string: " + encoded);
|
||||
|
||||
url += "?id=" + computationId;
|
||||
URL urlObj = new URL(url);
|
||||
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setDoOutput(true);
|
||||
connection.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
String responseMessage = connection.getResponseMessage();
|
||||
return responseMessage;
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Capabilities URL seems to be unvalid: " + url, e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new WPSClientException("Error occured while retrieving capabilities from url: " + url, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,542 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.opengis.ows.x11.AllowedValuesDocument.AllowedValues;
|
||||
import net.opengis.ows.x11.DomainMetadataType;
|
||||
import net.opengis.ows.x11.ValueType;
|
||||
import net.opengis.wps.x100.ComplexDataDescriptionType;
|
||||
import net.opengis.wps.x100.InputDescriptionType;
|
||||
import net.opengis.wps.x100.LiteralInputType;
|
||||
import net.opengis.wps.x100.LiteralOutputType;
|
||||
import net.opengis.wps.x100.OutputDescriptionType;
|
||||
import net.opengis.wps.x100.SupportedComplexDataInputType;
|
||||
import net.opengis.wps.x100.SupportedComplexDataType;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
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.DateParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.EnumParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.FileParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ListParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.ObjectParameter;
|
||||
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.TabularParameter;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.parameters.TimeParameter;
|
||||
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.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class WPS2DM {
|
||||
private final static String SEPARATOR = "|";
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(WPS2DM.class);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param title
|
||||
* title
|
||||
* @param minOcc
|
||||
* min occurrences
|
||||
* @param maxOcc
|
||||
* max occurrences
|
||||
* @param rangeOccs
|
||||
* range occurrences
|
||||
* @param id
|
||||
* id
|
||||
* @param crs
|
||||
* crs
|
||||
* @return parameter
|
||||
*/
|
||||
public static Parameter manageBoundingBoxInformation(String title, int minOcc, int maxOcc, int rangeOccs, String id,
|
||||
String crs) {
|
||||
Parameter converted = null;
|
||||
title = "Bounding Box Input in OGC 06-121r3 spec. E.g. 102,46,103,47,urn:ogc:def:crs:EPSG:4328 " + title;
|
||||
if (crs != null && crs.length() > 0)
|
||||
title += " Supported CRS " + crs;
|
||||
|
||||
title = buildParameterDescription(title, null, null, minOcc, maxOcc, null);
|
||||
if ((maxOcc == 1) || (maxOcc < 0) || (maxOcc == 0))
|
||||
converted = new ObjectParameter(id, title, String.class.getName(), " ");
|
||||
|
||||
else
|
||||
converted = new ListParameter(id, title, String.class.getName(), SEPARATOR);
|
||||
|
||||
return converted;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param title
|
||||
* title
|
||||
* @param minOcc
|
||||
* min occurrences
|
||||
* @param maxOcc
|
||||
* max occurences
|
||||
* @param rangeOccs
|
||||
* range occurrences
|
||||
* @param defaultValue
|
||||
* default value
|
||||
* @param id
|
||||
* id
|
||||
* @param uoms
|
||||
* uoms
|
||||
* @param type
|
||||
* type
|
||||
* @return parameter
|
||||
*/
|
||||
public static Parameter manageLiteral(String title, int minOcc, int maxOcc, int rangeOccs, String defaultValue,
|
||||
String id, String uoms, DomainMetadataType type) {
|
||||
Parameter converted = null;
|
||||
logger.debug("WPS type:" + type.getStringValue());
|
||||
String guessedType = guessWPSLiteralType(type);
|
||||
logger.debug("Guessed type: " + guessedType);
|
||||
|
||||
// rebuild title
|
||||
if ((defaultValue == null || defaultValue.trim().length() == 0))
|
||||
defaultValue = guessDefaultValue(guessedType);
|
||||
|
||||
logger.debug("Guessed default value: " + defaultValue);
|
||||
|
||||
title = buildParameterDescription(title, null, uoms, minOcc, maxOcc, defaultValue);
|
||||
if ((maxOcc == 1) || (maxOcc < 0) || (maxOcc == 0)) {
|
||||
if (title != null && !title.isEmpty()) {
|
||||
if (title.contains("[a sequence of names of columns from ")) {
|
||||
Pattern pattern = Pattern
|
||||
.compile("a sequence of names of columns from (\\w+) separated by (\\p{ASCII})");
|
||||
Matcher matcher = pattern.matcher(title);
|
||||
logger.debug("Machter title: " + title);
|
||||
logger.debug("Machter find: " + matcher.find());
|
||||
logger.debug("Machter group: " + matcher.group());
|
||||
logger.debug("Machter start: " + matcher.start());
|
||||
logger.debug("Machter end: " + matcher.end());
|
||||
logger.debug("Machter Group Count: " + matcher.groupCount());
|
||||
String referredTabularParameterName = matcher.group(1);
|
||||
logger.debug("Matcher referredTabularParameterName: " + referredTabularParameterName);
|
||||
String separator = matcher.group(2);
|
||||
logger.debug("Matcher separator: " + separator);
|
||||
|
||||
converted = new ColumnListParameter(id, title, referredTabularParameterName, separator);
|
||||
} else {
|
||||
if (title.contains("[the name of a column from ")) {
|
||||
Pattern pattern = Pattern.compile("the name of a column from (\\w+)");
|
||||
Matcher matcher = pattern.matcher(title);
|
||||
logger.debug("Machter title: " + title);
|
||||
logger.debug("Machter find: " + matcher.find());
|
||||
logger.debug("Machter group: " + matcher.group());
|
||||
logger.debug("Machter start: " + matcher.start());
|
||||
logger.debug("Machter end: " + matcher.end());
|
||||
logger.debug("Machter Group Count: " + matcher.groupCount());
|
||||
String referredTabularParameterName = matcher.group(1);
|
||||
logger.debug("Matcher referredTabularParameterName: " + referredTabularParameterName);
|
||||
|
||||
converted = new ColumnParameter(id, title, referredTabularParameterName, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[a sequence of values separated by ")) {
|
||||
Pattern pattern = Pattern.compile("a sequence of values separated by (\\p{ASCII})");
|
||||
Matcher matcher = pattern.matcher(title);
|
||||
logger.debug("Machter title: " + title);
|
||||
logger.debug("Machter find: " + matcher.find());
|
||||
logger.debug("Machter group: " + matcher.group());
|
||||
logger.debug("Machter start: " + matcher.start());
|
||||
logger.debug("Machter end: " + matcher.end());
|
||||
logger.debug("Machter Group Count: " + matcher.groupCount());
|
||||
|
||||
String separator = matcher.group(1);
|
||||
logger.debug("Matcher separator: " + separator);
|
||||
|
||||
converted = new ListParameter(id, title, guessedType, separator);
|
||||
} else {
|
||||
if (title.contains("[WKT_")) {
|
||||
logger.debug("WKT parameter: " + title);
|
||||
converted = retrieveWKTParameter(id, title, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[DATE]")) {
|
||||
logger.debug("DATE parameter: " + title);
|
||||
title = title.replace("[DATE]", "");
|
||||
converted = new DateParameter(id, title, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[TIME]")) {
|
||||
logger.debug("TIME parameter: " + title);
|
||||
title = title.replace("[TIME]", "");
|
||||
converted = new TimeParameter(id, title, defaultValue);
|
||||
} else {
|
||||
converted = new ObjectParameter(id, title, guessPrimitiveType(guessedType),
|
||||
defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
converted = new ObjectParameter(id, title, guessPrimitiveType(guessedType), defaultValue);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (guessedType.compareTo(Boolean.class.getName()) == 0) {
|
||||
converted = new ObjectParameter(id, title, guessedType, defaultValue);
|
||||
} else {
|
||||
converted = new ListParameter(id, title, String.class.getName(), SEPARATOR);
|
||||
}
|
||||
|
||||
}
|
||||
return converted;
|
||||
}
|
||||
|
||||
private static Parameter retrieveWKTParameter(String id, String title, String defaultValue) {
|
||||
|
||||
if (title.contains("[WKT_POINT]")) {
|
||||
title = title.replace("[WKT_POINT]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Point, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_LINESTRING]")) {
|
||||
title = title.replace("[WKT_LINESTRING]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.LineString, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_POLYGON]")) {
|
||||
title = title.replace("[WKT_POLYGON]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Polygon, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_CIRCLE]")) {
|
||||
title = title.replace("[WKT_CIRCLE]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Circle, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_TRIANGLE]")) {
|
||||
title = title.replace("[WKT_TRIANGLE]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Triangle, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_SQUARE]")) {
|
||||
title = title.replace("[WKT_SQUARE]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Square, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_PENTAGON]")) {
|
||||
title = title.replace("[WKT_PENTAGON]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Pentagon, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_HEXAGON]")) {
|
||||
title = title.replace("[WKT_HEXAGON]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Hexagon, defaultValue);
|
||||
} else {
|
||||
if (title.contains("[WKT_BOX]")) {
|
||||
title = title.replace("[WKT_BOX]", "");
|
||||
return new WKTParameter(id, title, WKTGeometryType.Box, defaultValue);
|
||||
} else {
|
||||
return new WKTParameter(id, title, WKTGeometryType.Polygon, defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param maxMegaBytes
|
||||
* max mega bytes
|
||||
* @param title
|
||||
* title
|
||||
* @param minOcc
|
||||
* min occurrences
|
||||
* @param maxOcc
|
||||
* max occurrences
|
||||
* @param rangeOccs
|
||||
* range occurrences
|
||||
* @param id
|
||||
* id
|
||||
* @param defaultType
|
||||
* default type
|
||||
* @param supportedTypes
|
||||
* supported type
|
||||
* @return parameter
|
||||
*/
|
||||
public static Parameter manageComplexData(String maxMegaBytes, String title, int minOcc, int maxOcc, int rangeOccs,
|
||||
String id, ComplexDataDescriptionType defaultType, ComplexDataDescriptionType[] supportedTypes) {
|
||||
Parameter converted = null;
|
||||
String mimeType = null;
|
||||
String schema = null;
|
||||
String encoding = null;
|
||||
ArrayList<String> supportedMimeTypes = new ArrayList<String>();
|
||||
|
||||
// GenericFileDataConstants.MIME_TYPE_TEXT_XML
|
||||
mimeType = defaultType.getMimeType();
|
||||
schema = defaultType.getSchema();
|
||||
encoding = defaultType.getEncoding();
|
||||
|
||||
logger.debug("Default MimeType: " + mimeType);
|
||||
logger.debug("Default Schema: " + schema);
|
||||
logger.debug("Default Encoding: " + encoding);
|
||||
|
||||
for (ComplexDataDescriptionType supported : supportedTypes) {
|
||||
supportedMimeTypes.add(supported.getMimeType());
|
||||
}
|
||||
// rebuild title
|
||||
title = buildParameterDescription(title, maxMegaBytes, null, minOcc, maxOcc, null);
|
||||
if ((maxOcc == 1) || (maxOcc < 0) || (maxOcc == 0)) {
|
||||
if (title != null && !title.isEmpty()) {
|
||||
if (title.contains("[a http link to a table")) {
|
||||
converted = new TabularParameter(id, title, " ", new ArrayList<String>(), mimeType,
|
||||
supportedMimeTypes);
|
||||
} else {
|
||||
if (title.contains("[a http link to a file")) {
|
||||
if (title.contains("[NETCDF]")) {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||
} else {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||
}
|
||||
} else {
|
||||
if (title.contains("[a sequence of http links")) {
|
||||
Pattern pattern = Pattern.compile(
|
||||
"\\[a sequence of http links separated by (\\p{ASCII}) , each indicating a table");
|
||||
|
||||
Matcher matcher = pattern.matcher(title);
|
||||
boolean match = false;
|
||||
if (match = matcher.find()) {
|
||||
logger.debug("Machter title: " + title);
|
||||
logger.debug("Machter find: " + match);
|
||||
logger.debug("Machter group: " + matcher.group());
|
||||
logger.debug("Machter start: " + matcher.start());
|
||||
logger.debug("Machter end: " + matcher.end());
|
||||
logger.debug("Machter Group Count: " + matcher.groupCount());
|
||||
String separator = matcher.group(1);
|
||||
logger.debug("Matcher separator: " + separator);
|
||||
converted = new TabularListParameter(id, title, separator, mimeType,
|
||||
supportedMimeTypes);
|
||||
} else {
|
||||
if (title.contains("[NETCDF]")) {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||
} else {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (title.contains("[NETCDF]")) {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||
} else {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||
}
|
||||
} else {
|
||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||
}
|
||||
return converted;
|
||||
}
|
||||
|
||||
public static Parameter convert2DMType(InputDescriptionType wpsType) throws ServiceException {
|
||||
try {
|
||||
|
||||
String id = wpsType.getIdentifier().getStringValue();
|
||||
|
||||
String title = wpsType.getTitle() != null ? wpsType.getTitle().getStringValue() : "";
|
||||
int minOcc = wpsType.getMinOccurs().intValue();
|
||||
int maxOcc = wpsType.getMaxOccurs().intValue();
|
||||
int rangeOccs = maxOcc - minOcc;
|
||||
if (rangeOccs == 0)
|
||||
rangeOccs = 1;
|
||||
|
||||
// default
|
||||
Parameter converted = new ObjectParameter(id, title, String.class.getName(), " ");
|
||||
if (rangeOccs > 1)
|
||||
converted = new ListParameter(id, title, String.class.getName(), SEPARATOR);
|
||||
|
||||
// Bounding Boxes
|
||||
if (wpsType.isSetBoundingBoxData()) {
|
||||
logger.debug("Conversion to DM Type->" + id + " is a Bounding Box Input");
|
||||
converted = manageBoundingBoxInformation(title, minOcc, maxOcc, rangeOccs, id,
|
||||
wpsType.getBoundingBoxData().getDefault().getCRS());
|
||||
}
|
||||
// Literals
|
||||
else if (wpsType.isSetLiteralData()) {
|
||||
logger.debug("Conversion to DM Type->" + id + " is a Literal Input");
|
||||
LiteralInputType literal = wpsType.getLiteralData();
|
||||
String uoms = literal.getUOMs() == null ? "" : literal.getUOMs().getDefault().getUOM().getStringValue();
|
||||
String defaultValue = literal.getDefaultValue();
|
||||
converted = manageLiteral(title, minOcc, maxOcc, rangeOccs, defaultValue, id, uoms,
|
||||
literal.getDataType());
|
||||
AllowedValues allowedValues = literal.getAllowedValues();
|
||||
if (allowedValues != null) {
|
||||
ValueType[] values = allowedValues.getValueArray();
|
||||
logger.debug("ValueType[]:" + Arrays.toString(values));
|
||||
List<String> enumValues = new ArrayList<>();
|
||||
|
||||
for (ValueType v : values) {
|
||||
enumValues.add(v.getStringValue());
|
||||
}
|
||||
if (values.length > 1) {
|
||||
ObjectParameter conv = (ObjectParameter) converted;
|
||||
if (conv.getType() != null && !conv.getType().isEmpty()
|
||||
&& conv.getType().compareToIgnoreCase(Boolean.class.getName()) != 0) {
|
||||
converted = new EnumParameter(conv.getName(), conv.getDescription(), enumValues,
|
||||
conv.getDefaultValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (wpsType.isSetComplexData()) {
|
||||
logger.debug("Conversion to DM Type->" + id + " is a Complex Input");
|
||||
SupportedComplexDataInputType complex = wpsType.getComplexData();
|
||||
String maxMegaBytes = complex.getMaximumMegabytes() != null ? complex.getMaximumMegabytes().toString()
|
||||
: "1";
|
||||
logger.debug("Max Megabytes: " + maxMegaBytes);
|
||||
converted = manageComplexData(maxMegaBytes, title, minOcc, maxOcc, rangeOccs, id,
|
||||
complex.getDefault().getFormat(), complex.getSupported().getFormatArray());
|
||||
|
||||
}
|
||||
|
||||
logger.debug("Conversion to DM Type->Name=" + id);
|
||||
logger.debug("Conversion to DM Type->Title=" + title);
|
||||
logger.debug("Conversion to DM Type->Number of Inputs to Manage=" + rangeOccs);
|
||||
|
||||
return converted;
|
||||
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
logger.error(e.getLocalizedMessage());
|
||||
throw new ServiceException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static Parameter convert2DMType(OutputDescriptionType wpsType) {
|
||||
|
||||
String id = wpsType.getIdentifier().getStringValue();
|
||||
String title = wpsType.getTitle() != null ? wpsType.getTitle().getStringValue() : "";
|
||||
|
||||
// default
|
||||
Parameter converted = new ObjectParameter(id, title, String.class.getName(), " ");
|
||||
|
||||
logger.debug("Conversion to DM Type->Output id:" + id);
|
||||
logger.debug("Conversion to DM Type->Title:" + title);
|
||||
|
||||
// Bounding Boxes
|
||||
if (wpsType.isSetBoundingBoxOutput()) {
|
||||
logger.debug("Bounding Box Output");
|
||||
converted = manageBoundingBoxInformation(title, -1, -1, -1, id, "");
|
||||
}
|
||||
// Literals
|
||||
else if (wpsType.isSetLiteralOutput()) {
|
||||
logger.debug("Literal Output");
|
||||
LiteralOutputType literal = wpsType.getLiteralOutput();
|
||||
String uoms = literal.getUOMs() == null ? "" : literal.getUOMs().toString();
|
||||
converted = manageLiteral(title, -1, -1, -1, "", id, uoms, literal.getDataType());
|
||||
} else if (wpsType.isSetComplexOutput()) {
|
||||
logger.debug("Complex Output");
|
||||
SupportedComplexDataType complex = wpsType.getComplexOutput();
|
||||
converted = manageComplexData("", title, -1, -1, -1, id, complex.getDefault().getFormat(),
|
||||
complex.getSupported().getFormatArray());
|
||||
}
|
||||
|
||||
return converted;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param title
|
||||
* title
|
||||
* @param maxMegabytes
|
||||
* max mega bytes
|
||||
* @param UoM
|
||||
* UoM
|
||||
* @param minElements
|
||||
* min elements
|
||||
* @param maxElements
|
||||
* max elements
|
||||
* @param defaultValue
|
||||
* default value
|
||||
* @return description
|
||||
*/
|
||||
public static String buildParameterDescription(String title, String maxMegabytes, String UoM, int minElements,
|
||||
int maxElements, String defaultValue) {
|
||||
|
||||
String description = title;
|
||||
/*
|
||||
* String innerDescription = "";
|
||||
*
|
||||
* if (maxMegabytes != null && maxMegabytes.trim().length() > 0) {
|
||||
* innerDescription += "Max MB Size:" + maxMegabytes.trim() + "; "; } if
|
||||
* (UoM != null && UoM.trim().length() > 0) { innerDescription +=
|
||||
* "Unit of Measure:" + UoM.trim() + "; "; } if (minElements > 0) {
|
||||
* innerDescription += "Min N. of Entries:" + minElements + "; "; } if
|
||||
* (maxElements > 0) { innerDescription += "Max N. of Entries:" +
|
||||
* maxElements + "; "; } if (defaultValue != null &&
|
||||
* defaultValue.trim().length() > 0) { innerDescription += "default:" +
|
||||
* defaultValue.trim() + "; "; }
|
||||
*
|
||||
* if (innerDescription.length() > 0) description += " [" +
|
||||
* innerDescription.substring(0,
|
||||
* innerDescription.lastIndexOf(";")).trim() + "]";
|
||||
*/
|
||||
return description;
|
||||
|
||||
}
|
||||
|
||||
public static String guessWPSLiteralType(DomainMetadataType type) {
|
||||
|
||||
if (type == null || type.getStringValue() == null)
|
||||
return String.class.getName();
|
||||
else {
|
||||
String typeS = type.getReference().trim();
|
||||
if (typeS.length() == 0)
|
||||
return String.class.getName();
|
||||
else if (typeS.contains("float") || typeS.contains("double") || typeS.contains("decimal"))
|
||||
return Double.class.getName();
|
||||
else if (typeS.contains("int"))
|
||||
return Integer.class.getName();
|
||||
else if (typeS.contains("long"))
|
||||
return Long.class.getName();
|
||||
else if (typeS.contains("short"))
|
||||
return Short.class.getName();
|
||||
else if (typeS.contains("boolean"))
|
||||
return Boolean.class.getName();
|
||||
|
||||
}
|
||||
|
||||
return String.class.getName();
|
||||
}
|
||||
|
||||
public static String guessDefaultValue(String type) {
|
||||
if (type.equals(String.class.getName()))
|
||||
return " ";
|
||||
else
|
||||
return "0";
|
||||
}
|
||||
|
||||
public static String guessPrimitiveType(String type) {
|
||||
|
||||
if (type.equals(Integer.class.getName())) {
|
||||
return Integer.class.getName();
|
||||
} else if (type.equals(String.class.getName())) {
|
||||
return String.class.getName();
|
||||
} else if (type.equals(Boolean.class.getName())) {
|
||||
return Boolean.class.getName();
|
||||
} else if (type.equals(Double.class.getName())) {
|
||||
return Double.class.getName();
|
||||
} else if (type.equals(Float.class.getName())) {
|
||||
return Float.class.getName();
|
||||
} else
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.dmservice.wps.computationsvalue;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationItemPropertiesValue;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValue;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFileList;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueImage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationValueBuilder {
|
||||
private static Logger logger = LoggerFactory.getLogger(ComputationValueBuilder.class);
|
||||
|
||||
private ArrayList<ComputationItemPropertiesValue> valueParameters;
|
||||
private LinkedHashMap<String, ComputationValue> computationsValueParameters;
|
||||
|
||||
public ComputationValueBuilder(ArrayList<ComputationItemPropertiesValue> valueParameters) {
|
||||
this.valueParameters = valueParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return map from parameter to computation value
|
||||
*/
|
||||
public LinkedHashMap<String, ComputationValue> create() {
|
||||
computationsValueParameters = new LinkedHashMap<String, ComputationValue>();
|
||||
if (valueParameters != null && !valueParameters.isEmpty()) {
|
||||
for (ComputationItemPropertiesValue valueParameter : valueParameters) {
|
||||
String value = valueParameter.getValue();
|
||||
if (value != null && !value.isEmpty() && value.startsWith("http")) {
|
||||
if (value.contains("|")) {
|
||||
ComputationValue valueFileList = createComputationValueFileList(value);
|
||||
computationsValueParameters.put(valueParameter.getKey(), valueFileList);
|
||||
} else {
|
||||
ComputationValue computationValue = retrieveFileName(value);
|
||||
computationsValueParameters.put(valueParameter.getKey(), computationValue);
|
||||
}
|
||||
} else {
|
||||
ComputationValue valueString = new ComputationValue(value);
|
||||
computationsValueParameters.put(valueParameter.getKey(), valueString);
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.debug("CompuatationsValues: " + computationsValueParameters);
|
||||
return computationsValueParameters;
|
||||
|
||||
}
|
||||
|
||||
private ComputationValue createComputationValueFileList(String value) {
|
||||
ArrayList<ComputationValue> fileList = new ArrayList<>();
|
||||
int indexSeparator;
|
||||
String file;
|
||||
ComputationValue computationValue;
|
||||
while ((indexSeparator = value.indexOf("|")) != -1) {
|
||||
file = value.substring(0, indexSeparator);
|
||||
value = value.substring(indexSeparator + 1);
|
||||
computationValue = retrieveFileName(file);
|
||||
fileList.add(computationValue);
|
||||
}
|
||||
computationValue = retrieveFileName(value);
|
||||
fileList.add(computationValue);
|
||||
ComputationValueFileList computationValueFileList = new ComputationValueFileList(fileList, "|");
|
||||
return computationValueFileList;
|
||||
|
||||
}
|
||||
|
||||
private ComputationValue retrieveFileName(final String value) {
|
||||
URLConnection conn = null;
|
||||
logger.debug("Retrieve File Header from Storage for value: " + value);
|
||||
try {
|
||||
// Use URL connection because in internal network is more fast
|
||||
URL url = new URL(value);
|
||||
conn = url.openConnection();
|
||||
return extractFileName(conn, value);
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("Retrieve File Name: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
return new ComputationValueFile(value, null, null, false);
|
||||
}
|
||||
}
|
||||
|
||||
private ComputationValue extractFileName(URLConnection conn, String value) {
|
||||
ComputationValue computationValue = null;
|
||||
String fileName = null;
|
||||
String mimeType = null;
|
||||
|
||||
logger.debug("Connection-Header: " + conn.getHeaderFields());
|
||||
|
||||
String contentDisposition = conn.getHeaderField("Content-Disposition");
|
||||
if (contentDisposition == null) {
|
||||
Map<String, List<String>> headerFields = conn.getHeaderFields();
|
||||
boolean found = false;
|
||||
for (String key : headerFields.keySet()) {
|
||||
List<String> headerField = headerFields.get(key);
|
||||
for (String fieldValue : headerField) {
|
||||
if (fieldValue.toLowerCase().contains("filename=")) {
|
||||
contentDisposition = fieldValue;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug("Content-Disposition: " + contentDisposition);
|
||||
// Content-Disposition="attachment; filename=abc.png"
|
||||
if (contentDisposition != null && contentDisposition.indexOf("=") != -1) {
|
||||
fileName = contentDisposition.split("=")[1]; // getting value
|
||||
// after '='
|
||||
if (fileName != null && !fileName.isEmpty()) {
|
||||
if (fileName.startsWith("\"")) {
|
||||
fileName = fileName.substring(1);
|
||||
}
|
||||
if (fileName.endsWith("\"")) {
|
||||
fileName = fileName.substring(0, fileName.length() - 1);
|
||||
}
|
||||
}
|
||||
} else { // fall back to random generated file name? }
|
||||
}
|
||||
mimeType = conn.getContentType();
|
||||
if ((mimeType != null && mimeType.compareToIgnoreCase("image/png") == 0)
|
||||
|| fileName != null && fileName.endsWith(".png")) {
|
||||
computationValue = new ComputationValueImage(value, fileName, mimeType);
|
||||
} else {
|
||||
if ((mimeType != null && mimeType.compareToIgnoreCase("application/x-netcdf") == 0)
|
||||
|| fileName != null && fileName.endsWith(".nc")) {
|
||||
computationValue = new ComputationValueFile(value, fileName, mimeType, true);
|
||||
} else {
|
||||
computationValue = new ComputationValueFile(value, fileName, mimeType, false);
|
||||
}
|
||||
}
|
||||
|
||||
return computationValue;
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.is;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||
import org.gcube.resources.discovery.icclient.ICFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class InformationSystemUtils {
|
||||
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(InformationSystemUtils.class);
|
||||
|
||||
public static List<String> retrieveServiceAddress(String category,
|
||||
String name, String scope) throws Exception {
|
||||
try {
|
||||
|
||||
if (scope == null || scope.length() == 0)
|
||||
return new ArrayList<String>();
|
||||
|
||||
ScopeProvider.instance.set(scope);
|
||||
|
||||
SimpleQuery query = ICFactory.queryFor(ServiceEndpoint.class);
|
||||
query.addCondition(
|
||||
"$resource/Profile/Category/text() eq '" + category + "'")
|
||||
.addCondition(
|
||||
"$resource/Profile/Name/text() eq '" + name + "'")
|
||||
.setResult(
|
||||
"$resource/Profile/AccessPoint/Interface/Endpoint/text()");
|
||||
DiscoveryClient<String> client = ICFactory.client();
|
||||
List<String> addresses = client.submit(query);
|
||||
|
||||
return addresses;
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("Error in discovery DataMiner Service Endpoint in scope: "
|
||||
+ scope);
|
||||
logger.error("Error: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -2,8 +2,6 @@ package org.gcube.portlets.user.dataminermanager.server.storage;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
|
@ -12,10 +10,6 @@ import org.gcube.common.homelibrary.home.workspace.Workspace;
|
|||
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.common.homelibrary.util.zip.ZipUtil;
|
||||
import org.gcube.contentmanagement.blobstorage.service.IClient;
|
||||
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
|
||||
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
|
||||
import org.gcube.contentmanager.storageclient.wrapper.StorageClient;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -255,34 +249,4 @@ public class StorageUtil {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param is
|
||||
* input stream
|
||||
* @return public link
|
||||
* @throws ServiceException
|
||||
* service exception
|
||||
*/
|
||||
public static String saveOnStorageInTemporalFile(InputStream is) throws ServiceException {
|
||||
try {
|
||||
logger.debug("SaveOnStorageInTemporalFile()");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
|
||||
Double v = Math.random() * 10000;
|
||||
String tempFile = "P_" + sdf.format(new Date()) + "_" + v.intValue() + ".xml";
|
||||
String remotePath = "/DataMiner/AlgoritmsParameters/" + tempFile;
|
||||
IClient client = new StorageClient("DataAnalysis", "DataMiner", "DataMiner", AccessType.PUBLIC,
|
||||
MemoryType.VOLATILE).getClient();
|
||||
String storageId = client.put(true).LFile(is).RFile(remotePath);
|
||||
logger.debug("Storage id: " + storageId);
|
||||
String publicLink = client.getHttpUrl().RFile(remotePath);
|
||||
logger.debug("Storage public link: " + publicLink);
|
||||
return publicLink;
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
throw new ServiceException(e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,11 +4,12 @@ package org.gcube.portlets.user.dataminermanager.server.util;
|
|||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.portlets.user.dataminermanager.server.storage.StorageUtil;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.Computations;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.OutputDataSets;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.InputDataSets;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.Computations;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.OutputDataSets;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.DataMinerWorkArea;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.InputDataSets;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.workspace.ItemDescription;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
@ -1,141 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.server.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ServiceCredentials implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3560918948310315680L;
|
||||
private String userName;
|
||||
private String fullName;
|
||||
private String name;
|
||||
private String lastName;
|
||||
private String email;
|
||||
private String scope;
|
||||
private String groupId;
|
||||
private String groupName;
|
||||
private String userAvatarURL;
|
||||
private String token;
|
||||
|
||||
public ServiceCredentials() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ServiceCredentials(String userName, String scope, String token) {
|
||||
super();
|
||||
this.userName = userName;
|
||||
this.scope = scope;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public ServiceCredentials(String userName, String fullName, String name,
|
||||
String lastName, String email, String scope, String groupId,
|
||||
String groupName, String userAvatarURL, String token) {
|
||||
super();
|
||||
this.userName = userName;
|
||||
this.fullName = fullName;
|
||||
this.name = name;
|
||||
this.lastName = lastName;
|
||||
this.email = email;
|
||||
this.scope = scope;
|
||||
this.groupId = groupId;
|
||||
this.groupName = groupName;
|
||||
this.userAvatarURL = userAvatarURL;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getUserAvatarURL() {
|
||||
return userAvatarURL;
|
||||
}
|
||||
|
||||
public void setUserAvatarURL(String userAvatarURL) {
|
||||
this.userAvatarURL = userAvatarURL;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServiceCredentials [userName=" + userName + ", fullName="
|
||||
+ fullName + ", name=" + name + ", lastName=" + lastName
|
||||
+ ", email=" + email + ", scope=" + scope + ", groupId="
|
||||
+ groupId + ", groupName=" + groupName + ", userAvatarURL="
|
||||
+ userAvatarURL + ", token=" + token + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -9,9 +9,10 @@ import java.util.List;
|
|||
|
||||
import net.sf.csv4j.CSVReader;
|
||||
|
||||
import org.gcube.data.analysis.dataminermanagercl.server.util.ServiceCredentials;
|
||||
import org.gcube.portlets.user.dataminermanager.server.storage.StorageUtil;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.ColumnItem;
|
||||
import org.gcube.data.analysis.dataminermanagercl.shared.data.TableItemSimple;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ServiceException;
|
||||
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -48,7 +49,7 @@ public class TableReader {
|
|||
TableItemSimple tableItemSimple=new TableItemSimple(publicLink,item.getName(), item.getType().name());
|
||||
ArrayList<ColumnItem> columnItemList=new ArrayList<ColumnItem>();
|
||||
for(int i=0; i<columns.size(); i++){
|
||||
ColumnItem columnItem=new ColumnItem(i, columns.get(i));
|
||||
ColumnItem columnItem=new ColumnItem(String.valueOf(i), columns.get(i));
|
||||
columnItemList.add(columnItem);
|
||||
}
|
||||
tableItemSimple.setColumns(columnItemList);
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ColumnItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3451466410777498956L;
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
public ColumnItem() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ColumnItem(Integer id, String name) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ColumnItem [id=" + id + ", name=" + name + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.Resource;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class OutputData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3039151542008171640L;
|
||||
private ComputationId computationId;
|
||||
private Resource resource;
|
||||
|
||||
public OutputData() {
|
||||
super();
|
||||
}
|
||||
|
||||
public OutputData(ComputationId computationId, Resource resource) {
|
||||
super();
|
||||
this.computationId = computationId;
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public ComputationId getComputationId() {
|
||||
return computationId;
|
||||
}
|
||||
|
||||
public Resource getResource() {
|
||||
return resource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OutputData [computationId=" + computationId + ", resource="
|
||||
+ resource + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TableItemSimple implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1204016958353092014L;
|
||||
private String id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String type;
|
||||
private ArrayList<ColumnItem> columns;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public TableItemSimple() {
|
||||
super();
|
||||
columns = new ArrayList<ColumnItem>();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* id
|
||||
* @param name
|
||||
* name
|
||||
* @param description
|
||||
* description
|
||||
* @param type
|
||||
* type
|
||||
*/
|
||||
public TableItemSimple(String id, String name, String description, String type) {
|
||||
super();
|
||||
columns = new ArrayList<ColumnItem>();
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* id
|
||||
* @param name
|
||||
* name
|
||||
* @param description
|
||||
* description
|
||||
*/
|
||||
public TableItemSimple(String id, String name, String description) {
|
||||
super();
|
||||
columns = new ArrayList<ColumnItem>();
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* the name to set
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description
|
||||
* the description to set
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* the type to set
|
||||
*/
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public ArrayList<ColumnItem> getColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
public void setColumns(ArrayList<ColumnItem> columns) {
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TableItemSimple [id=" + id + ", name=" + name + ", description=" + description + ", type=" + type
|
||||
+ ", columns=" + columns + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3039151542008171640L;
|
||||
private ComputationId computationId;
|
||||
private LinkedHashMap<String, ComputationValue> inputParameters;
|
||||
private LinkedHashMap<String, ComputationValue> outputParameters;
|
||||
private String operatorDescription;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
private String status;
|
||||
private String executionType;
|
||||
private String vre;
|
||||
|
||||
public ComputationData() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ComputationData(ComputationId computationId,
|
||||
LinkedHashMap<String, ComputationValue> inputParameters,
|
||||
LinkedHashMap<String, ComputationValue> outputParameters,
|
||||
String operatorDescription, String startDate, String endDate,
|
||||
String status, String executionType, String vre) {
|
||||
super();
|
||||
this.computationId = computationId;
|
||||
this.inputParameters = inputParameters;
|
||||
this.outputParameters = outputParameters;
|
||||
this.operatorDescription = operatorDescription;
|
||||
this.startDate = startDate;
|
||||
this.endDate = endDate;
|
||||
this.status = status;
|
||||
this.executionType = executionType;
|
||||
this.vre = vre;
|
||||
}
|
||||
|
||||
public ComputationId getComputationId() {
|
||||
return computationId;
|
||||
}
|
||||
|
||||
public void setComputationId(ComputationId computationId) {
|
||||
this.computationId = computationId;
|
||||
}
|
||||
|
||||
public LinkedHashMap<String, ComputationValue> getInputParameters() {
|
||||
return inputParameters;
|
||||
}
|
||||
|
||||
public void setInputParameters(LinkedHashMap<String, ComputationValue> inputParameters) {
|
||||
this.inputParameters = inputParameters;
|
||||
}
|
||||
|
||||
public LinkedHashMap<String, ComputationValue> getOutputParameters() {
|
||||
return outputParameters;
|
||||
}
|
||||
|
||||
public void setOutputParameters(
|
||||
LinkedHashMap<String, ComputationValue> outputParameters) {
|
||||
this.outputParameters = outputParameters;
|
||||
}
|
||||
|
||||
public String getOperatorDescription() {
|
||||
return operatorDescription;
|
||||
}
|
||||
|
||||
public void setOperatorDescription(String operatorDescription) {
|
||||
this.operatorDescription = operatorDescription;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getExecutionType() {
|
||||
return executionType;
|
||||
}
|
||||
|
||||
public void setExecutionType(String executionType) {
|
||||
this.executionType = executionType;
|
||||
}
|
||||
|
||||
public String getVre() {
|
||||
return vre;
|
||||
}
|
||||
|
||||
public void setVre(String vre) {
|
||||
this.vre = vre;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationData [computationId=" + computationId
|
||||
+ ", inputParameters=" + inputParameters
|
||||
+ ", outputParameters=" + outputParameters
|
||||
+ ", operatorDescription=" + operatorDescription
|
||||
+ ", startDate=" + startDate + ", endDate=" + endDate
|
||||
+ ", status=" + status + ", executionType=" + executionType
|
||||
+ ", vre=" + vre + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationId implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7898676192287822723L;
|
||||
private String id;
|
||||
private String urlId;
|
||||
private String operatorId;
|
||||
private String operatorName;
|
||||
private String equivalentRequest;
|
||||
|
||||
public ComputationId() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ComputationId(String id, String urlId, String operatorId,
|
||||
String operatorName, String equivalentRequest) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.urlId = urlId;
|
||||
this.operatorId = operatorId;
|
||||
this.operatorName = operatorName;
|
||||
this.equivalentRequest = equivalentRequest;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUrlId() {
|
||||
return urlId;
|
||||
}
|
||||
|
||||
public void setUrlId(String urlId) {
|
||||
this.urlId = urlId;
|
||||
}
|
||||
|
||||
public String getOperatorId() {
|
||||
return operatorId;
|
||||
}
|
||||
|
||||
public void setOperatorId(String operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public String getOperatorName() {
|
||||
return operatorName;
|
||||
}
|
||||
|
||||
public void setOperatorName(String operatorName) {
|
||||
this.operatorName = operatorName;
|
||||
}
|
||||
|
||||
public String getEquivalentRequest() {
|
||||
return equivalentRequest;
|
||||
}
|
||||
|
||||
public void setEquivalentRequest(String equivalentRequest) {
|
||||
this.equivalentRequest = equivalentRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationId [id=" + id + ", urlId=" + urlId + ", operatorId="
|
||||
+ operatorId + ", operatorName=" + operatorName
|
||||
+ ", equivalentRequest=" + equivalentRequest + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationItemPropertiesValue implements Serializable,
|
||||
Comparable<ComputationItemPropertiesValue> {
|
||||
|
||||
private static final long serialVersionUID = 8917614711815918760L;
|
||||
private Integer order;
|
||||
private String key;
|
||||
private String value;
|
||||
|
||||
public ComputationItemPropertiesValue() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ComputationItemPropertiesValue(Integer order, String key,
|
||||
String value) {
|
||||
super();
|
||||
this.order = order;
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ComputationItemPropertiesValue o) {
|
||||
return order.compareTo(o.getOrder());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationItemPropertiesValue [order=" + order + ", key="
|
||||
+ key + ", value=" + value + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationValue implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2047623108851748745L;
|
||||
protected ComputationValueType type;
|
||||
protected String value;
|
||||
|
||||
public ComputationValue() {
|
||||
super();
|
||||
this.type = ComputationValueType.String;
|
||||
}
|
||||
|
||||
public ComputationValue(ComputationValueType type) {
|
||||
super();
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public ComputationValue(String value) {
|
||||
super();
|
||||
this.type = ComputationValueType.String;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public ComputationValue(ComputationValueType type, String value) {
|
||||
super();
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public ComputationValueType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(ComputationValueType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationValue [type=" + type + ", value=" + value + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationValueFile extends ComputationValue {
|
||||
private static final long serialVersionUID = -5845606225432949795L;
|
||||
|
||||
private String fileName;
|
||||
private String mimeType;
|
||||
private boolean netcdf;
|
||||
|
||||
public ComputationValueFile() {
|
||||
super(ComputationValueType.File);
|
||||
}
|
||||
|
||||
public ComputationValueFile(String url, String fileName, String mimeType, boolean netcdf) {
|
||||
super(ComputationValueType.File, url);
|
||||
this.fileName = fileName;
|
||||
this.mimeType = mimeType;
|
||||
this.netcdf = netcdf;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public boolean isNetcdf() {
|
||||
return netcdf;
|
||||
}
|
||||
|
||||
public void setNetcdf(boolean netcdf) {
|
||||
this.netcdf = netcdf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationValueFile [fileName=" + fileName + ", mimeType=" + mimeType + ", netcdf=" + netcdf + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationValueFileList extends ComputationValue {
|
||||
private static final long serialVersionUID = -5845606225432949795L;
|
||||
|
||||
private ArrayList<ComputationValue> fileList;
|
||||
private String separator;
|
||||
|
||||
public ComputationValueFileList() {
|
||||
super(ComputationValueType.FileList);
|
||||
}
|
||||
|
||||
public ComputationValueFileList(ArrayList<ComputationValue> fileList,
|
||||
String separator) {
|
||||
super(ComputationValueType.FileList);
|
||||
this.fileList = fileList;
|
||||
this.separator = separator;
|
||||
value = new String();
|
||||
for (ComputationValue file : fileList) {
|
||||
value = value + file.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<ComputationValue> getFileList() {
|
||||
return fileList;
|
||||
}
|
||||
|
||||
public void setFileList(ArrayList<ComputationValue> fileList) {
|
||||
this.fileList = fileList;
|
||||
}
|
||||
|
||||
public String getSeparator() {
|
||||
return separator;
|
||||
}
|
||||
|
||||
public void setSeparator(String separator) {
|
||||
this.separator = separator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationValueFileList [fileList=" + fileList
|
||||
+ ", separator=" + separator + ", type=" + type + ", value="
|
||||
+ value + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ComputationValueImage extends ComputationValue {
|
||||
private static final long serialVersionUID = -5845606225432949795L;
|
||||
|
||||
private String fileName;
|
||||
private String mimeType;
|
||||
|
||||
public ComputationValueImage(){
|
||||
super(ComputationValueType.Image);
|
||||
}
|
||||
|
||||
public ComputationValueImage(String url, String fileName, String mimeType) {
|
||||
super(ComputationValueType.Image, url);
|
||||
this.fileName = fileName;
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ComputationValueImage [fileName=" + fileName + ", mimeType="
|
||||
+ mimeType + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package org.gcube.portlets.user.dataminermanager.shared.data.computations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum ComputationValueType {
|
||||
FileList, File, Image, String;
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.shared.data.output;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FileResource extends Resource {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 799627064179136509L;
|
||||
|
||||
private String url;
|
||||
private String mimeType;
|
||||
private boolean netcdf;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public FileResource() {
|
||||
super();
|
||||
this.setResourceType(ResourceType.FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param resourceId
|
||||
* resource id
|
||||
* @param name
|
||||
* name
|
||||
* @param description
|
||||
* description
|
||||
* @param url
|
||||
* url
|
||||
* @param mimeType
|
||||
* mime type
|
||||
* @param netcdf
|
||||
* netcdf
|
||||
*/
|
||||
public FileResource(String resourceId, String name, String description, String url, String mimeType,
|
||||
boolean netcdf) {
|
||||
super(resourceId, name, description, ResourceType.FILE);
|
||||
this.url = url;
|
||||
this.mimeType = mimeType;
|
||||
this.netcdf = netcdf;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the url
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param url
|
||||
* the url to set
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mimeType
|
||||
*/
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mimeType
|
||||
* the mimeType to set
|
||||
*/
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if is NetCDF file
|
||||
*/
|
||||
public boolean isNetcdf() {
|
||||
return netcdf;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param netcdf
|
||||
* true if is NetCDF file
|
||||
*/
|
||||
public void setNetcdf(boolean netcdf) {
|
||||
this.netcdf = netcdf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FileResource [url=" + url + ", mimeType=" + mimeType + ", netcdf=" + netcdf + ", getResourceId()="
|
||||
+ getResourceId() + ", getName()=" + getName() + ", getDescription()=" + getDescription()
|
||||
+ ", getResourceType()=" + getResourceType() + ", isTabular()=" + isTabular() + ", isObject()="
|
||||
+ isObject() + ", isFile()=" + isFile() + ", isMap()=" + isMap() + ", isImages()=" + isImages()
|
||||
+ ", isError()=" + isError() + ", toString()=" + super.toString() + ", getClass()=" + getClass()
|
||||
+ ", hashCode()=" + hashCode() + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.shared.data.output;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ImageResource extends Resource {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8772836076910728324L;
|
||||
private String link;
|
||||
private String mimeType;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public ImageResource() {
|
||||
super();
|
||||
this.setResourceType(ResourceType.IMAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param resourceId
|
||||
* resource id
|
||||
* @param name
|
||||
* name
|
||||
* @param description
|
||||
* description
|
||||
* @param link
|
||||
* link
|
||||
* @param mimeType
|
||||
* mime type
|
||||
*/
|
||||
public ImageResource(String resourceId, String name, String description, String link, String mimeType) {
|
||||
super(resourceId, name, description, ResourceType.IMAGE);
|
||||
this.link = link;
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return link
|
||||
*/
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param link link
|
||||
*/
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ImagesResource [link=" + link + ", mimeType=" + mimeType + ", getResourceId()=" + getResourceId()
|
||||
+ ", getName()=" + getName() + ", getDescription()=" + getDescription() + ", getResourceType()="
|
||||
+ getResourceType() + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.dataminermanager.shared.data.output;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class MapResource extends Resource {
|
||||
|
||||
private static final long serialVersionUID = 8772836076910728324L;
|
||||
private LinkedHashMap<String, Resource> map;
|
||||
|
||||
public MapResource() {
|
||||
super();
|
||||
this.setResourceType(ResourceType.MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param resourceId
|
||||
* resource id
|
||||
* @param name
|
||||
* name
|
||||
* @param description
|
||||
* description
|
||||
* @param map
|
||||
* map of resources
|
||||
*/
|
||||
public MapResource(String resourceId, String name, String description, LinkedHashMap<String, Resource> map) {
|
||||
super(resourceId, name, description, ResourceType.MAP);
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public Map<String, Resource> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void setMap(LinkedHashMap<String, Resource> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MapResource [map=" + map + ", getResourceId()=" + getResourceId() + ", getName()=" + getName()
|
||||
+ ", getDescription()=" + getDescription() + ", getResourceType()=" + getResourceType() + "]";
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue