2521: Explore the possibility to port the StatMan interface onto Dataminer

https://support.d4science.org/issues/2521

Fixed DeleteItem

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@128274 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-04-22 13:49:49 +00:00
parent bd115101c0
commit e43bac9129
38 changed files with 673 additions and 1058 deletions

View File

@ -224,6 +224,7 @@
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>
<scope>compile</scope>
</dependency>
<!-- Session Checker -->

View File

@ -1,15 +1,9 @@
package org.gcube.portlets.user.dataminermanager.client;
import java.util.List;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.dataspace.DataSpacePanel;
import org.gcube.portlets.user.dataminermanager.client.events.MaskEvent;
import org.gcube.portlets.user.dataminermanager.client.experimentArea.ExperimentPanel;
import org.gcube.portlets.user.dataminermanager.client.experiments.ExperimentPanel;
import org.gcube.portlets.user.dataminermanager.client.resources.Resources;
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
import org.gcube.portlets.user.dataminermanager.shared.Constants;
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
import com.allen_sauer.gwt.log.client.Log;
@ -48,7 +42,7 @@ public class DataMinerManager implements EntryPoint {
.create(DataMinerPortletService.class);*/
private static final String SM_DIV = "contentDiv";
private static List<OperatorsClassification> operatorsClassifications = null;
//private static List<OperatorsClassification> operatorsClassifications = null;
private DataMinerManagerController dataMinerManagerController;
@ -120,14 +114,13 @@ public class DataMinerManager implements EntryPoint {
}
private void loadMainPanel() {
homeMenu = createMenuPanel();
dataSpacePanel = new DataSpacePanel();
experimentPanel = new ExperimentPanel();
// AccountingManagerResources.INSTANCE.accountingManagerCSS().ensureInjected();
// ScriptInjector.fromString(AccountingManagerResources.INSTANCE.jqueryJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
dataMinerManagerController = new DataMinerManagerController();
homeMenu = createMenuPanel();
dataSpacePanel = new DataSpacePanel();
experimentPanel = new ExperimentPanel();
// Layout
mainPanelLayout = new BorderLayoutContainer();
@ -250,7 +243,7 @@ public class DataMinerManager implements EntryPoint {
*
*/
private void bindEvents() {
EventBusProvider.INSTANCE.addHandler(MaskEvent.getType(),
/*EventBusProvider.INSTANCE.addHandler(MaskEvent.getType(),
new MaskEvent.MaskHandler() {
@Override
public void onMask(MaskEvent event) {
@ -266,7 +259,7 @@ public class DataMinerManager implements EntryPoint {
// Constants.maskLoadingStyle);
}
});
*/
/*
* EventBusProvider.getInstance().addHandler(
* SessionExpiredEvent.getType(), new
@ -374,7 +367,7 @@ public class DataMinerManager implements EntryPoint {
/**
* @return the operatorsClassification
*/
public static List<OperatorsClassification> getOperatorsClassifications() {
return operatorsClassifications;
}
@ -382,13 +375,14 @@ public class DataMinerManager implements EntryPoint {
/**
* @param operatorsClassification
* the operatorsClassification to set
*/
public static void setOperatorsClassifications(
List<OperatorsClassification> operatorsClassifications) {
DataMinerManager.operatorsClassifications = operatorsClassifications;
}
public static OperatorsClassification getDefaultOperatorsClassification() {
*/
/*public static OperatorsClassification getDefaultOperatorsClassification() {
if (operatorsClassifications == null)
return null;
OperatorsClassification find = null;
@ -408,7 +402,7 @@ public class DataMinerManager implements EntryPoint {
if (oc.getName().equals(classificationName))
find = oc;
return (find == null ? getDefaultOperatorsClassification() : find);
}
}*/
/*public static DataMinerPortletServiceAsync getService() {
return dataMinerService;

View File

@ -1,9 +1,15 @@
package org.gcube.portlets.user.dataminermanager.client;
import java.util.List;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationEvent;
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionEvent;
import org.gcube.portlets.user.dataminermanager.client.events.ResubmitComputationExecutionRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
@ -12,6 +18,7 @@ import org.gcube.portlets.user.dataminermanager.client.events.StartComputationEx
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaEventType;
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.ComputationId;
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
import org.gcube.portlets.user.dataminermanager.shared.session.UserInfo;
@ -19,7 +26,6 @@ import org.gcube.portlets.user.dataminermanager.shared.workspace.DataMinerWorkAr
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
@ -30,12 +36,11 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
*
*/
public class DataMinerManagerController {
private EventBus eventBus;
private UserInfo userInfo;
private DataMinerWorkArea dataMinerWorkArea;
private List<OperatorsClassification> operatorsClassifications;
public DataMinerManagerController() {
eventBus = EventBusProvider.INSTANCE;
init();
}
@ -48,9 +53,9 @@ public class DataMinerManagerController {
}
private void init() {
bind();
callHello();
checkSession();
bindToEvents();
}
private void checkSession() {
@ -104,7 +109,7 @@ public class DataMinerManagerController {
}
private void bindToEvents() {
private void bind() {
EventBusProvider.INSTANCE.addHandler(SessionExpiredEvent.TYPE,
new SessionExpiredEvent.SessionExpiredEventHandler() {
@ -116,31 +121,30 @@ public class DataMinerManagerController {
}
});
EventBusProvider.INSTANCE
.addHandler(
StartComputationExecutionRequestEvent.TYPE,
new StartComputationExecutionRequestEvent.StartComputationExecutionRequestEventHandler() {
@Override
public void onStart(
StartComputationExecutionRequestEvent event) {
Log.debug("Catch StartComputationExecutionRequestEvent");
startComputationRequest(event);
}
});
EventBusProvider.INSTANCE
.addHandler(
CancelComputationRequestEvent.TYPE,
new CancelComputationRequestEvent.CancelComputationRequestEventHandler() {
StartComputationExecutionRequestEvent.TYPE,
new StartComputationExecutionRequestEvent.StartComputationExecutionRequestEventHandler() {
@Override
public void onStart(
StartComputationExecutionRequestEvent event) {
Log.debug("Catch StartComputationExecutionRequestEvent: "+event);
startComputationRequest(event);
}
});
EventBusProvider.INSTANCE
.addHandler(
CancelComputationExecutionRequestEvent.TYPE,
new CancelComputationExecutionRequestEvent.CancelComputationExecutionRequestEventHandler() {
@Override
public void onCancel(
CancelComputationRequestEvent event) {
Log.debug("Catch CancelComputationRequestEvent");
CancelComputationExecutionRequestEvent event) {
Log.debug("Catch CancelComputationRequestEvent: "+event);
cancelComputationRequest(event);
}
@ -154,14 +158,45 @@ public class DataMinerManagerController {
@Override
public void onResubmit(
ResubmitComputationExecutionRequestEvent event) {
Log.debug("Catch ResubmitComputationExecutionRequestEvent");
Log.debug("Catch ResubmitComputationExecutionRequestEvent: "+event);
resubmitComputationRequest(event);
}
});
EventBusProvider.INSTANCE
.addHandler(
OperatorsClassificationRequestEvent.TYPE,
new OperatorsClassificationRequestEvent.OperatorsClassificationRequestEventHandler() {
@Override
public void onRequest(
OperatorsClassificationRequestEvent event) {
Log.debug("Catch OperatorsClassificationRequestEvent: "+event);
operatorsClassificationRequest(event);
}
});
EventBusProvider.INSTANCE
.addHandler(
DeleteItemRequestEvent.TYPE,
new DeleteItemRequestEvent.DeleteItemRequestEventHandler() {
@Override
public void onDeleteRequest(
DeleteItemRequestEvent event) {
Log.debug("Catch DeleteItemRequestEvent: "+ event);
deleteItemRequest(event);
}
});
/*
* EventBusProvider.INSTANCE.addHandler(
* ResubmitComputationEvent.getType(), new
@ -174,6 +209,8 @@ public class DataMinerManagerController {
}
private void startComputationRequest(
final StartComputationExecutionRequestEvent event) {
@ -213,7 +250,7 @@ public class DataMinerManagerController {
EventBusProvider.INSTANCE.fireEvent(event);
}
private void cancelComputationRequest(CancelComputationRequestEvent event) {
private void cancelComputationRequest(CancelComputationExecutionRequestEvent event) {
final ComputationId computationId = event.getComputationId();
DataMinerPortletServiceAsync.INSTANCE.cancelComputation(computationId,
@ -246,38 +283,125 @@ public class DataMinerManagerController {
private void resubmitComputationRequest(
final ResubmitComputationExecutionRequestEvent event) {
DataMinerPortletServiceAsync.INSTANCE.resubmit(event.getComputationId(), new AsyncCallback<ComputationId>() {
DataMinerPortletServiceAsync.INSTANCE.resubmit(
event.getComputationId(), new AsyncCallback<ComputationId>() {
@Override
public void onFailure(Throwable caught) {
UtilsGXT3.alert("Error",
"Failed to resubmit computation "
+ event.getComputationId()
+ "<br/>Cause:" + caught.getCause()
+ "<br/>Message:" + caught.getMessage());
}
@Override
public void onFailure(Throwable caught) {
UtilsGXT3
.alert("Error",
"Failed to resubmit computation "
+ event.getComputationId()
+ "<br/>Cause:"
+ caught.getCause()
+ "<br/>Message:"
+ caught.getMessage());
@Override
public void onSuccess(ComputationId result) {
if (result == null)
UtilsGXT3
.alert("Error",
"Failed to resubmit computation, the computation id is null!");
else {
resubmitComputation(result);
}
}
});
}
@Override
public void onSuccess(ComputationId result) {
if (result == null)
UtilsGXT3
.alert("Error",
"Failed to resubmit computation, the computation id is null!");
else {
resubmitComputation(result);
}
}
});
}
private void resubmitComputation(ComputationId computationId) {
ComputationItem computationItem=new ComputationItem(computationId, null);
ComputationItem computationItem = new ComputationItem(computationId,
null);
ResubmitComputationExecutionEvent event = new ResubmitComputationExecutionEvent(
computationItem);
EventBusProvider.INSTANCE.fireEvent(event);
}
private void operatorsClassificationRequest(
OperatorsClassificationRequestEvent event) {
if (operatorsClassifications == null) {
getOperatorsClassifications(event);
} else {
if (event.getOperatorsClassificationRequestType() == null) {
return;
}
switch (event.getOperatorsClassificationRequestType()) {
case ByName:
getOperatorsClassificationByName(event);
break;
case Default:
getOperatorsClassificationDefault(event);
break;
default:
break;
}
}
}
private void getOperatorsClassifications(
final OperatorsClassificationRequestEvent event) {
DataMinerPortletServiceAsync.INSTANCE
.getOperatorsClassifications(new AsyncCallback<List<OperatorsClassification>>() {
@Override
public void onSuccess(List<OperatorsClassification> result) {
operatorsClassifications = result;
operatorsClassificationRequest(event);
}
@Override
public void onFailure(Throwable caught) {
UtilsGXT3.alert("Error",
"Error retrieving operators classification!");
Log.error("Error retrieving operators classification: "
+ caught.getLocalizedMessage());
caught.printStackTrace();
}
});
}
private void getOperatorsClassificationDefault(
OperatorsClassificationRequestEvent event) {
OperatorsClassification find = null;
for (OperatorsClassification oc : operatorsClassifications){
if (oc.getName().equals(Constants.UserClassificationName)){
find = oc;
break;
}
}
OperatorsClassificationEvent ocEvent=new OperatorsClassificationEvent(find);
EventBusProvider.INSTANCE.fireEvent(ocEvent);
}
private void getOperatorsClassificationByName(
OperatorsClassificationRequestEvent event) {
OperatorsClassification find = null;
for (OperatorsClassification oc : operatorsClassifications){
if (oc.getName().equals(event.getClassificationName())){
find = oc;
break;
}
}
if(find==null){
for (OperatorsClassification oc : operatorsClassifications){
if (oc.getName().equals(Constants.UserClassificationName)){
find = oc;
break;
}
}
}
OperatorsClassificationEvent ocEvent=new OperatorsClassificationEvent(event.getClassificationName(),find);
EventBusProvider.INSTANCE.fireEvent(ocEvent);
}
private void retrieveDataMinerWorkArea() {
@ -312,7 +436,13 @@ public class DataMinerManagerController {
dataMinerWorkArea = result;
DataMinerWorkAreaEvent dataMinerWorkAreaEvent = new DataMinerWorkAreaEvent(
DataMinerWorkAreaEventType.OPEN, result);
eventBus.fireEvent(dataMinerWorkAreaEvent);
EventBusProvider.INSTANCE.fireEvent(dataMinerWorkAreaEvent);
}
private void deleteItemRequest(DeleteItemRequestEvent event) {
//DataMinerPortletServiceAsync.INSTANCE.
}
}

View File

@ -63,24 +63,29 @@ public class ComputationItem implements Serializable {
this.status = status;
this.resource = resource;
}*/
public OperatorCategory getOperatorCategory() {
OperatorsClassification classification = DataMinerManager
/*OperatorsClassification classification = DataMinerManager
.getDefaultOperatorsClassification();
if (classification == null)
return null;
else
return classification.getCategoryById(categoryId);
*/
return null;
}
public Operator getOperator() {
if (operator == null) {
/*if (operator == null) {
OperatorsClassification classification = DataMinerManager
.getDefaultOperatorsClassification();
if (classification != null)
operator = classification.getOperatorById(operatorId);
}
return operator;
return operator;*/
return null;
}
public ComputationId getComputationId() {

View File

@ -1,166 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.bean;
import java.io.Serializable;
/**
* @author ceras
*
*/
public class CsvMetadata implements Serializable {
/**
*
*/
private static final long serialVersionUID = -6513418575213232121L;
private boolean hasHeader;
private String fileAbsolutePath, template, tableName, description, delimiterChar, commentChar;
public CsvMetadata() {
super();
}
/**
* @param hasHeader
* @param fileAbsolutePath
* @param tableName
* @param delimiterChar
* @param commentChar
*/
public CsvMetadata(boolean hasHeader, String fileAbsolutePath, String delimiterChar, String commentChar) {
super();
this.hasHeader = hasHeader;
this.fileAbsolutePath = fileAbsolutePath;
this.delimiterChar = delimiterChar;
this.commentChar = commentChar;
}
/**
* @return the hasHeader
*/
public boolean isHasHeader() {
return hasHeader;
}
/**
* @param hasHeader the hasHeader to set
*/
public void setHasHeader(boolean hasHeader) {
this.hasHeader = hasHeader;
}
/**
* @return the fileAbsolutePath
*/
public String getFileAbsolutePath() {
return fileAbsolutePath;
}
/**
* @param fileAbsolutePath the fileAbsolutePath to set
*/
public void setFileAbsolutePath(String fileAbsolutePath) {
this.fileAbsolutePath = fileAbsolutePath;
}
/**
* @return the template
*/
public String getTemplate() {
return template;
}
/**
* @param template the template to set
*/
public void setTemplate(String template) {
this.template = template;
}
/**
* @return the tableName
*/
public String getTableName() {
return tableName;
}
/**
* @param tableName the tableName to set
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the delimiterChar
*/
public String getDelimiterChar() {
return delimiterChar;
}
/**
* @param delimiterChar the delimiterChar to set
*/
public void setDelimiterChar(String delimiterChar) {
this.delimiterChar = delimiterChar;
}
/**
* @return the commentChar
*/
public String getCommentChar() {
return commentChar;
}
/**
* @param commentChar the commentChar to set
*/
public void setCommentChar(String commentChar) {
this.commentChar = commentChar;
}
/**
* @return the serialversionuid
*/
public static long getSerialversionuid() {
return serialVersionUID;
}
}

View File

@ -1,129 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.bean;
import java.io.Serializable;
public class FileMetadata implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String fileAbsolutePath, fileTaxaPath,fileVernaculaPath, fileName, description, type;
public FileMetadata() {
super();
}
public FileMetadata( String fileAbsolutePath,String type) {
super();
this.fileAbsolutePath = fileAbsolutePath;
this.fileTaxaPath=null;
this.fileVernaculaPath=null;
this.type=type;
}
public FileMetadata( String fileAbsolutePath,String fileTaxaPath, String fileVernacularPath,String type) {
super();
this.fileAbsolutePath = fileAbsolutePath;
this.fileTaxaPath=fileTaxaPath;
this.fileVernaculaPath=fileVernacularPath;
this.type=type;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type=type;
}
/**
* @return the fileAbsolutePath
*/
public String getTaxaFileAbsolutePath() {
return fileTaxaPath;
}
/**
* @param fileAbsolutePath the fileAbsolutePath to set
*/
public void setTaxaFileAbsolutePath(String fileTaxaPath) {
this.fileTaxaPath = fileTaxaPath;
}
/**
* @return the fileAbsolutePath
*/
public String getVernacularFileAbsolutePath() {
return fileVernaculaPath;
}
/**
* @param fileAbsolutePath the fileAbsolutePath to set
*/
public void setVernacularFileAbsolutePath(String fileVernaculaPath) {
this.fileVernaculaPath = fileVernaculaPath;
}
/**
* @return the fileAbsolutePath
*/
public String getFileAbsolutePath() {
return fileAbsolutePath;
}
/**
* @param fileAbsolutePath the fileAbsolutePath to set
*/
public void setFileAbsolutePath(String fileAbsolutePath) {
this.fileAbsolutePath = fileAbsolutePath;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the fileName
*/
public String getFileName() {
return fileName;
}
/**
* @param fileName the tableName to set
*/
public void setFileName(String fileName) {
this.fileName = fileName;
}
}

View File

@ -1,139 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.bean;
import java.io.Serializable;
import java.util.Date;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
/**
* @author ceras
*
*/
public class ImportStatus implements Serializable {
/**
*
*/
private static final long serialVersionUID = 190974315819110637L;
Status status;
String id, fileName, resourceId;
Date date;
Resource resource;
/**
*
*/
public ImportStatus() {
super();
}
/**
* @param id
* @param fileName
* @param isCompleted
*/
public ImportStatus(String id, String fileName, Status status, Date date) {
super();
this.id = id;
this.fileName = fileName;
this.status = status;
this.date = date;
this.resource=new Resource();
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the fileName
*/
public String getFileName() {
return fileName;
}
/**
* @param fileName the fileName to set
*/
public void setFileName(String fileName) {
this.fileName = fileName;
}
/**
* @return the status
*/
public Status getStatus() {
return status;
}
/**
* @param status the status to set
*/
public void setStatus(Status status) {
this.status = status;
}
/**
* @return the date
*/
public Date getDate() {
return date;
}
/**
* @return the resourceId
*/
public String getResourceId() {
return resourceId;
}
/**
* @param resourceId the resourceId to set
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public void setResource(Resource resource)
{
this.resource=resource;
}
public Resource getResoruce()
{
return resource;
}
/**
* @param date the date to set
*/
public void setDate(Date date) {
this.date = date;
}
public boolean isFailed() {
return this.status == Status.FAILED;
}
public boolean isComplete() {
return this.status == Status.COMPLETE;
}
public boolean isTerminated() {
return this.status==Status.COMPLETE || this.status==Status.FAILED;
}
}

View File

@ -1,150 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.bean;
import java.io.Serializable;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ResourceItem implements Serializable {
private static final long serialVersionUID = 2814548224382024267L;
private List<String> columnNames = new ArrayList<String>();
private Type type;
private String id;
private String name;
private String description;
private String template;
private Provenance provenance;
private Date creationDate;
private String operatorId;
private String url;
private Operator operator;
public enum Provenance {
IMPORTED,
COMPUTED,
SYSTEM
};
public enum Type {
TABLE,
FILE
}
public ResourceItem() {
super();
}
public ResourceItem(Type type, String id, String name, String description,
String template, Provenance provenance, Date creationDate,
String operatorId, String url) {
this.type=type;
this.id= id;
this.name=name;
this.description=description;
this.template=template;
this.provenance=provenance;
this.creationDate=creationDate;
this.operatorId=operatorId;
this.url=url;
}
public void setColumnNames(List<String> columnNames) {
this.columnNames = columnNames;
}
/**
* @return the columnNames
*/
public List<String> getColumnNames() {
return columnNames;
}
/**
* @param columnName
*/
public void addColumnName(String columnName) {
this.columnNames.add(columnName);
}
public Operator getOperator() {
if (operator==null) {
OperatorsClassification classification = DataMinerManager.getDefaultOperatorsClassification();
if (classification!=null)
operator=classification.getOperatorById(operatorId);
}
return operator;
}
public boolean isFile() {
return type==Type.FILE;
}
public boolean isTable() {
return type==Type.TABLE;
}
public Type getType() {
return type;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public String getTemplate() {
return template;
}
public Provenance getProvenance() {
return provenance;
}
public Date getCreationDate() {
return creationDate;
}
public String getOperatorId() {
return operatorId;
}
public String getUrl() {
return url;
}
}

View File

@ -2,10 +2,11 @@ package org.gcube.portlets.user.dataminermanager.client.dataspace;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
import org.gcube.portlets.user.dataminermanager.client.events.UIStateEvent;
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
@ -313,7 +314,8 @@ public class InputDataSetsPanel extends ContentPanel {
selectedItem.getId(), selectedItem.getName(),
selectedItem.getOwner(), selectedItem.getPath(), selectedItem
.getType().name());
DeleteItemEvent deleteItemEvent = new DeleteItemEvent(itemDescription);
DeleteItemRequestEvent deleteItemEvent = new DeleteItemRequestEvent(
DataMinerWorkAreaElementType.InputDataSets, itemDescription);
EventBusProvider.INSTANCE.fireEvent(deleteItemEvent);
Log.debug("Fired: " + deleteItemEvent);
}

View File

@ -2,10 +2,11 @@ package org.gcube.portlets.user.dataminermanager.client.dataspace;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.events.DataMinerWorkAreaEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemEvent;
import org.gcube.portlets.user.dataminermanager.client.events.DeleteItemRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.SessionExpiredEvent;
import org.gcube.portlets.user.dataminermanager.client.events.UIStateEvent;
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
import org.gcube.portlets.user.dataminermanager.client.type.DataMinerWorkAreaElementType;
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
@ -173,7 +174,7 @@ public class OutputDataSetsPanel extends ContentPanel {
selectedItem = null;
}
};
wsResourcesExplorerPanel
.addWorkspaceExplorerSelectNotificationListener(wsResourceExplorerListener);
wsResourcesExplorerPanel.ensureDebugId("wsResourceExplorerPanel");
@ -224,7 +225,7 @@ public class OutputDataSetsPanel extends ContentPanel {
};
dnd.addWorkspaceUploadNotificationListener(workspaceUploaderListener);
// ToolBar
btnOpen = new TextButton("Open");
// btnOpen.setIcon(StatAlgoImporterResources.INSTANCE.download16());
@ -239,7 +240,7 @@ public class OutputDataSetsPanel extends ContentPanel {
}
});
btnDelete = new TextButton("Delete");
// btnDelete.setIcon(StatAlgoImporterResources.INSTANCE.delete16());
btnDelete.setScale(ButtonScale.SMALL);
@ -303,7 +304,8 @@ public class OutputDataSetsPanel extends ContentPanel {
}
} catch (Throwable e) {
Log.error("Error in OutputDataSetsPanel: " + e.getLocalizedMessage());
Log.error("Error in OutputDataSetsPanel: "
+ e.getLocalizedMessage());
e.printStackTrace();
}
}
@ -313,7 +315,8 @@ public class OutputDataSetsPanel extends ContentPanel {
selectedItem.getId(), selectedItem.getName(),
selectedItem.getOwner(), selectedItem.getPath(), selectedItem
.getType().name());
DeleteItemEvent deleteItemEvent = new DeleteItemEvent(itemDescription);
DeleteItemRequestEvent deleteItemEvent = new DeleteItemRequestEvent(
DataMinerWorkAreaElementType.OutputDataSets, itemDescription);
EventBusProvider.INSTANCE.fireEvent(deleteItemEvent);
Log.debug("Fired: " + deleteItemEvent);
}

View File

@ -0,0 +1,70 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Cancel Computation Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CancelComputationExecutionRequestEvent
extends
GwtEvent<CancelComputationExecutionRequestEvent.CancelComputationExecutionRequestEventHandler> {
public static Type<CancelComputationExecutionRequestEventHandler> TYPE = new Type<CancelComputationExecutionRequestEventHandler>();
private ComputationId computationId;
public interface CancelComputationExecutionRequestEventHandler extends
EventHandler {
void onCancel(CancelComputationExecutionRequestEvent event);
}
public interface HasCancelComputationExecutionRequestEventHandler extends
HasHandlers {
public HandlerRegistration addCancelComputationExecutionRequestEventHandler(
CancelComputationExecutionRequestEventHandler handler);
}
public CancelComputationExecutionRequestEvent(ComputationId computationId) {
this.computationId = computationId;
}
@Override
protected void dispatch(
CancelComputationExecutionRequestEventHandler handler) {
handler.onCancel(this);
}
@Override
public Type<CancelComputationExecutionRequestEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<CancelComputationExecutionRequestEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
CancelComputationExecutionRequestEvent event) {
source.fireEvent(event);
}
public ComputationId getComputationId() {
return computationId;
}
@Override
public String toString() {
return "CancelComputationExecutionRequestEvent [computationId="
+ computationId + "]";
}
}

View File

@ -1,68 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Cancel Computation Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CancelComputationRequestEvent
extends
GwtEvent<CancelComputationRequestEvent.CancelComputationRequestEventHandler> {
public static Type<CancelComputationRequestEventHandler> TYPE = new Type<CancelComputationRequestEventHandler>();
private ComputationId computationId;
public interface CancelComputationRequestEventHandler extends EventHandler {
void onCancel(CancelComputationRequestEvent event);
}
public interface HasCancelComputationRequestEventHandler extends
HasHandlers {
public HandlerRegistration addCancelComputationRequestEventHandler(
CancelComputationRequestEventHandler handler);
}
public CancelComputationRequestEvent(ComputationId computationId) {
this.computationId = computationId;
}
@Override
protected void dispatch(CancelComputationRequestEventHandler handler) {
handler.onCancel(this);
}
@Override
public Type<CancelComputationRequestEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<CancelComputationRequestEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
CancelComputationRequestEvent event) {
source.fireEvent(event);
}
public ComputationId getComputationId() {
return computationId;
}
@Override
public String toString() {
return "CancelComputationRequestEvent [computationId=" + computationId
+ "]";
}
}

View File

@ -1,59 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Component Refresh Layout Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ComponentRefreshLayoutEvent
extends
GwtEvent<ComponentRefreshLayoutEvent.ComponentRefreshLayoutEventHandler> {
public static Type<ComponentRefreshLayoutEventHandler> TYPE = new Type<ComponentRefreshLayoutEventHandler>();
public interface ComponentRefreshLayoutEventHandler extends EventHandler {
void onRefresh(ComponentRefreshLayoutEvent event);
}
public interface HasComponentRefreshLayoutEventHandler extends HasHandlers {
public HandlerRegistration addComponentRefreshLayoutEventHandler(
ComponentRefreshLayoutEventHandler handler);
}
public ComponentRefreshLayoutEvent() {
}
@Override
protected void dispatch(ComponentRefreshLayoutEventHandler handler) {
handler.onRefresh(this);
}
@Override
public Type<ComponentRefreshLayoutEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<ComponentRefreshLayoutEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
ComponentRefreshLayoutEvent event) {
source.fireEvent(event);
}
@Override
public String toString() {
return "ComponentRefreshLayoutEvent []";
}
}

View File

@ -1,68 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.shared.workspace.ItemDescription;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Delete Item Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DeleteItemEvent extends
GwtEvent<DeleteItemEvent.DeleteItemEventHandler> {
public static Type<DeleteItemEventHandler> TYPE = new Type<DeleteItemEventHandler>();
private ItemDescription itemDescription;
public interface DeleteItemEventHandler extends EventHandler {
void onDelete(DeleteItemEvent event);
}
public interface HasDeleteItemEventHandler extends HasHandlers {
public HandlerRegistration addDeleteItemEventHandler(
DeleteItemEventHandler handler);
}
public DeleteItemEvent(ItemDescription itemDescription) {
this.itemDescription = itemDescription;
}
@Override
protected void dispatch(DeleteItemEventHandler handler) {
handler.onDelete(this);
}
@Override
public Type<DeleteItemEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<DeleteItemEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source, DeleteItemEvent deleteItemEvent) {
source.fireEvent(deleteItemEvent);
}
public ItemDescription getItemDescription() {
return itemDescription;
}
@Override
public String toString() {
return "DeleteItemEvent [itemDescription=" + itemDescription + "]";
}
}

View File

@ -0,0 +1,76 @@
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 com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Delete Item Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DeleteItemRequestEvent extends
GwtEvent<DeleteItemRequestEvent.DeleteItemRequestEventHandler> {
public static Type<DeleteItemRequestEventHandler> TYPE = new Type<DeleteItemRequestEventHandler>();
private DataMinerWorkAreaElementType dataMinerWorkAreaElementType;
private ItemDescription itemDescription;
public interface DeleteItemRequestEventHandler extends EventHandler {
void onDeleteRequest(DeleteItemRequestEvent event);
}
public interface HasDeleteItemRequestEventHandler extends HasHandlers {
public HandlerRegistration addDeleteItemRequestEventHandler(
DeleteItemRequestEventHandler handler);
}
public DeleteItemRequestEvent(
DataMinerWorkAreaElementType dataMinerWorkAreaElementType,
ItemDescription itemDescription) {
this.itemDescription = itemDescription;
this.dataMinerWorkAreaElementType = dataMinerWorkAreaElementType;
}
@Override
protected void dispatch(DeleteItemRequestEventHandler handler) {
handler.onDeleteRequest(this);
}
@Override
public Type<DeleteItemRequestEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<DeleteItemRequestEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
DeleteItemRequestEvent deleteItemEvent) {
source.fireEvent(deleteItemEvent);
}
public ItemDescription getItemDescription() {
return itemDescription;
}
public DataMinerWorkAreaElementType getDataMinerWorkAreaElementType() {
return dataMinerWorkAreaElementType;
}
@Override
public String toString() {
return "DeleteItemRequestEvent [dataMinerWorkAreaElementType="
+ dataMinerWorkAreaElementType + ", itemDescription="
+ itemDescription + "]";
}
}

View File

@ -1,42 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.EventHandler;
import java.lang.String;
import com.google.gwt.event.shared.HasHandlers;
public class MaskEvent extends GwtEvent<MaskEvent.MaskHandler> {
public static Type<MaskHandler> TYPE = new Type<MaskHandler>();
private String message;
public interface MaskHandler extends EventHandler {
void onMask(MaskEvent event);
}
public MaskEvent(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
@Override
protected void dispatch(MaskHandler handler) {
handler.onMask(this);
}
@Override
public Type<MaskHandler> getAssociatedType() {
return TYPE;
}
public static Type<MaskHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source, String message) {
source.fireEvent(new MaskEvent(message));
}
}

View File

@ -0,0 +1,96 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.type.OperatorsClassificationRequestType;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Operators Classification Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class OperatorsClassificationEvent
extends
GwtEvent<OperatorsClassificationEvent.OperatorsClassificationEventHandler> {
public static Type<OperatorsClassificationEventHandler> TYPE = new Type<OperatorsClassificationEventHandler>();
private OperatorsClassificationRequestType operatorsClassificationRequestType;
private String classificationName;
private OperatorsClassification operatorsClassification;
public interface OperatorsClassificationEventHandler extends
EventHandler {
void onOperatorsClassification(OperatorsClassificationEvent event);
}
public interface HasOperatorsClassificationEventHandler extends
HasHandlers {
public HandlerRegistration addOperatorsClassificationEventHandler(
OperatorsClassificationEventHandler handler);
}
public OperatorsClassificationEvent(OperatorsClassification operatorsClassification) {
this.operatorsClassificationRequestType = OperatorsClassificationRequestType.Default;
this.operatorsClassification=operatorsClassification;
}
public OperatorsClassificationEvent(
String classificationName, OperatorsClassification operatorsClassification) {
this.operatorsClassificationRequestType = OperatorsClassificationRequestType.ByName;
this.classificationName=classificationName;
this.operatorsClassification=operatorsClassification;
}
@Override
protected void dispatch(OperatorsClassificationEventHandler handler) {
handler.onOperatorsClassification(this);
}
@Override
public Type<OperatorsClassificationEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<OperatorsClassificationEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
OperatorsClassificationEvent event) {
source.fireEvent(event);
}
public OperatorsClassificationRequestType getOperatorsClassificationRequestType() {
return operatorsClassificationRequestType;
}
public String getClassificationName() {
return classificationName;
}
public OperatorsClassification getOperatorsClassification() {
return operatorsClassification;
}
@Override
public String toString() {
return "OperatorsClassificationEvent [operatorsClassificationRequestType="
+ operatorsClassificationRequestType
+ ", classificationName="
+ classificationName
+ ", operatorsClassification="
+ operatorsClassification + "]";
}
}

View File

@ -0,0 +1,84 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.client.type.OperatorsClassificationRequestType;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
* Operators Classification Request Event
*
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class OperatorsClassificationRequestEvent
extends
GwtEvent<OperatorsClassificationRequestEvent.OperatorsClassificationRequestEventHandler> {
public static Type<OperatorsClassificationRequestEventHandler> TYPE = new Type<OperatorsClassificationRequestEventHandler>();
private OperatorsClassificationRequestType operatorsClassificationRequestType;
private String classificationName;
public interface OperatorsClassificationRequestEventHandler extends
EventHandler {
void onRequest(OperatorsClassificationRequestEvent event);
}
public interface HasOperatorsClassificationRequestEventHandler extends
HasHandlers {
public HandlerRegistration addOperatorsClassificationRequestEventHandler(
OperatorsClassificationRequestEventHandler handler);
}
public OperatorsClassificationRequestEvent() {
this.operatorsClassificationRequestType = OperatorsClassificationRequestType.Default;
}
public OperatorsClassificationRequestEvent(
String classificationName) {
this.operatorsClassificationRequestType = OperatorsClassificationRequestType.ByName;
this.classificationName=classificationName;
}
@Override
protected void dispatch(OperatorsClassificationRequestEventHandler handler) {
handler.onRequest(this);
}
@Override
public Type<OperatorsClassificationRequestEventHandler> getAssociatedType() {
return TYPE;
}
public static Type<OperatorsClassificationRequestEventHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source,
OperatorsClassificationRequestEvent event) {
source.fireEvent(event);
}
public OperatorsClassificationRequestType getOperatorsClassificationRequestType() {
return operatorsClassificationRequestType;
}
public String getClassificationName() {
return classificationName;
}
@Override
public String toString() {
return "OperatorsClassificationRequestEvent [operatorsClassificationRequestType="
+ operatorsClassificationRequestType
+ ", classificationName="
+ classificationName + "]";
}
}

View File

@ -1,43 +0,0 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.EventHandler;
import java.lang.String;
import com.google.gwt.event.shared.HasHandlers;
public class TablesGridGotDirtyEvent extends
GwtEvent<TablesGridGotDirtyEvent.TablesGridGotDirtyHandler> {
public static Type<TablesGridGotDirtyHandler> TYPE = new Type<TablesGridGotDirtyHandler>();
private String tableId;
public interface TablesGridGotDirtyHandler extends EventHandler {
void onTablesGridGotDirty(TablesGridGotDirtyEvent event);
}
public TablesGridGotDirtyEvent(String tableId) {
this.tableId = tableId;
}
public String getTableId() {
return tableId;
}
@Override
protected void dispatch(TablesGridGotDirtyHandler handler) {
handler.onTablesGridGotDirty(this);
}
@Override
public Type<TablesGridGotDirtyHandler> getAssociatedType() {
return TYPE;
}
public static Type<TablesGridGotDirtyHandler> getType() {
return TYPE;
}
public static void fire(HasHandlers source, String tableId) {
source.fireEvent(new TablesGridGotDirtyEvent(tableId));
}
}

View File

@ -1,6 +1,8 @@
package org.gcube.portlets.user.dataminermanager.client.events;
import org.gcube.portlets.user.dataminermanager.client.type.WPSMenuType;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.LinkedHashMap;
import java.util.Map;

View File

@ -1,11 +1,11 @@
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.events.ComputationReadyEvent;
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.experimentArea.ComputationParametersPanel.ComputationParametersPanelHandler;
import org.gcube.portlets.user.dataminermanager.client.experiments.ComputationParametersPanel.ComputationParametersPanelHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.HTML;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.Date;
import java.util.HashMap;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.Date;
@ -9,7 +9,7 @@ import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus.Status;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationRequestEvent;
import org.gcube.portlets.user.dataminermanager.client.events.CancelComputationExecutionRequestEvent;
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;
@ -136,7 +136,7 @@ public class ComputationStatusPanel extends SimpleContainer {
private void cancelComputation(){
CancelComputationRequestEvent event=new CancelComputationRequestEvent(computationId);
CancelComputationExecutionRequestEvent event=new CancelComputationExecutionRequestEvent(computationId);
EventBusProvider.INSTANCE.fireEvent(event);
}

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import java.util.ArrayList;
import java.util.HashMap;
@ -12,8 +12,10 @@ import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorCategory;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
import org.gcube.portlets.user.dataminermanager.client.common.EventBusProvider;
import org.gcube.portlets.user.dataminermanager.client.events.OperatorsClassificationEvent;
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 com.allen_sauer.gwt.log.client.Log;
@ -22,7 +24,6 @@ import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HTML;
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
import com.sencha.gxt.core.client.util.Margins;
@ -48,13 +49,16 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
public class OperatorsPanel extends FramedPanel {
private static final String LOADING_MESSAGE = "Loading Operators...";
private static final String ERROR_GET_OPERATORS = "Operators not loaded.";
// private static final String ERROR_GET_OPERATORS =
// "Operators not loaded.";
private static final String SHOW_ALL_OPERATORS_TOOLTIP = "Show all Operators without category classification.";
private static final String SHOW_CATEGORIES_TOOLTIP = "Show Operators by Categories";
private OperatorsPanelHandler handler;
private VerticalLayoutContainer topV;
private ToolBar toolBar;
private VerticalLayoutContainer v;
private OperatorsClassification operatorsClassification;
private List<Operator> operators;
// private ArrayList<OperatorCategoryPanel> categoryPanels;
private Map<String, List<OperatorCategoryPanel>> mapCategoriesPanels = new HashMap<String, List<OperatorCategoryPanel>>();
@ -72,7 +76,9 @@ public class OperatorsPanel extends FramedPanel {
public OperatorsPanel(OperatorsPanelHandler handler) {
super();
this.handler = handler;
this.operators = new ArrayList<Operator>();
init();
bind();
create();
}
@ -82,6 +88,42 @@ public class OperatorsPanel extends FramedPanel {
setBodyStyle("backgroundColor:white;");
}
private void bind() {
EventBusProvider.INSTANCE
.addHandler(
OperatorsClassificationEvent.TYPE,
new OperatorsClassificationEvent.OperatorsClassificationEventHandler() {
@Override
public void onOperatorsClassification(
OperatorsClassificationEvent event) {
Log.debug("OperatorsPanel catch OperatorsClassificationEvent: "
+ event);
manageOperatorsClassificationEvent(event);
}
});
}
private void manageOperatorsClassificationEvent(
OperatorsClassificationEvent event) {
if (event.getOperatorsClassificationRequestType().compareTo(
OperatorsClassificationRequestType.ByName) == 0) {
if (currentClassificationName.compareTo(event
.getClassificationName()) == 0) {
waitMessage(false);
if (event.getOperatorsClassification() != null) {
operatorsClassification = event
.getOperatorsClassification();
operators.clear();
operators.addAll(event.getOperatorsClassification()
.getOperators());
}
showCategoriesList(false);
}
}
}
private void create() {
topV = new VerticalLayoutContainer();
initToolbar();
@ -92,31 +134,31 @@ public class OperatorsPanel extends FramedPanel {
operators.add(v);
topV.add(operators, new VerticalLayoutData(1, 1, new Margins(0)));
add(topV);
waitMessage(true);
OperatorsClassificationRequestEvent operatorsClassificationRequestEvent = new OperatorsClassificationRequestEvent(
currentClassificationName);
Log.debug("OperatorsPanel fire: "+operatorsClassificationRequestEvent);
EventBusProvider.INSTANCE
.fireEvent(operatorsClassificationRequestEvent);
// if the operators classification is not loaded, let's load by an rpc
if (DataMinerManager.getOperatorsClassifications() == null) {
waitMessage(true);
DataMinerPortletServiceAsync.INSTANCE.getOperatorsClassifications(
new AsyncCallback<List<OperatorsClassification>>() {
@Override
public void onSuccess(
List<OperatorsClassification> result) {
waitMessage(false);
DataMinerManager
.setOperatorsClassifications(result);
showCategoriesList(false);
}
@Override
public void onFailure(Throwable caught) {
waitMessage(false);
UtilsGXT3.alert("Error", ERROR_GET_OPERATORS);
}
});
} else
showCategoriesList(false);
/*
* // if the operators classification is not loaded, let's load by an
* rpc if (DataMinerManager.getOperatorsClassifications() == null) {
*
* DataMinerPortletServiceAsync.INSTANCE
* .getOperatorsClassifications(new
* AsyncCallback<List<OperatorsClassification>>() {
*
* @Override public void onSuccess( List<OperatorsClassification>
* result) { waitMessage(false);
*
* DataMinerManager .setOperatorsClassifications(result);
* showCategoriesList(false); }
*
* @Override public void onFailure(Throwable caught) {
* waitMessage(false); UtilsGXT3.alert("Error", ERROR_GET_OPERATORS); }
* }); } else showCategoriesList(false);
*/
}
/**
@ -152,7 +194,7 @@ public class OperatorsPanel extends FramedPanel {
}
});
filterField.setWidth(100);
TextButton showAllOperatorsButton = new TextButton();
showAllOperatorsButton.setIcon(DataMinerManager.resources
.sortAscending());
@ -182,14 +224,13 @@ public class OperatorsPanel extends FramedPanel {
showCategoriesButton.setToolTip(SHOW_CATEGORIES_TOOLTIP);
final TextButton btnMenuPerspective = new TextButton(
currentClassificationName);
btnMenuPerspective
.setIcon(DataMinerManager.resources.userPerspective());
Menu menuPerspective = new Menu();
for (final String perspectiveName : Constants.ClassificationNames) {
final ImageResource img = perspectiveName
.equals(Constants.UserClassificationName) ? DataMinerManager.resources
@ -256,9 +297,7 @@ public class OperatorsPanel extends FramedPanel {
}
private void showFilteredList(String searchText) {
List<Operator> operators = DataMinerManager
.getOperatorsClassificationByName(currentClassificationName)
.getOperators();
List<Operator> filteredOperators = new ArrayList<Operator>();
List<String> ids = new ArrayList<String>();
for (Operator op : operators)
@ -292,15 +331,13 @@ public class OperatorsPanel extends FramedPanel {
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels
.get(currentClassificationName);
if (categoryPanels == null) {
// get category panels from classification
categoryPanels = new ArrayList<OperatorCategoryPanel>();
for (OperatorCategory cat : DataMinerManager
.getOperatorsClassificationByName(
currentClassificationName)
.getOperatorCategories()) {
// Log.debug("OperatorCategoryPanel");
categoryPanels.add(new OperatorCategoryPanel(handler,
cat));
if (operatorsClassification != null) {
for (OperatorCategory cat : operatorsClassification
.getOperatorCategories()) {
categoryPanels.add(new OperatorCategoryPanel(
handler, cat));
}
}
mapCategoriesPanels.put(currentClassificationName,
categoryPanels);
@ -320,10 +357,6 @@ public class OperatorsPanel extends FramedPanel {
private void showAllOperatorsList() {
if (view != View.ALL) {
List<Operator> operators = DataMinerManager
.getOperatorsClassificationByName(currentClassificationName)
.getOperators();
v.clear();
HTML html = new HTML("All Operators <span class='counter'>("

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.experimentArea;
package org.gcube.portlets.user.dataminermanager.client.experiments;
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;

View File

@ -6,7 +6,6 @@ import java.util.Map;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.bean.ResourceItem;
import org.gcube.portlets.user.dataminermanager.client.bean.output.ImagesResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.MapResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
@ -28,11 +27,11 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
@RemoteServiceRelativePath("dataminerman")
public interface DataMinerPortletService extends RemoteService {
/*
// get tables info belongs to a given templates set (for relative user)
public List<TableItemSimple> getTableItems(List<String> templates)
throws Exception;
*/
public List<TableItemSimple> getFileItems(List<String> templates)
throws Exception;
@ -53,10 +52,7 @@ public interface DataMinerPortletService extends RemoteService {
public void removeResource(String id) throws Exception;
public void removeImport(String id) throws Exception;
public String exportResource(String folderId, String fileName,
ResourceItem resourceItem) throws Exception;
/**
* Dataminer

View File

@ -6,7 +6,6 @@ import java.util.Map;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.bean.ResourceItem;
import org.gcube.portlets.user.dataminermanager.client.bean.output.ImagesResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.MapResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
@ -32,10 +31,10 @@ public interface DataMinerPortletServiceAsync {
public static DataMinerPortletServiceAsync INSTANCE = (DataMinerPortletServiceAsync) GWT
.create(DataMinerPortletService.class);
/*
void getTableItems(List<String> templates,
AsyncCallback<List<TableItemSimple>> callback);
*/
void getFileItems(List<String> templates,
AsyncCallback<List<TableItemSimple>> callback);
@ -56,9 +55,6 @@ public interface DataMinerPortletServiceAsync {
void removeImport(String id, AsyncCallback<Void> callback);
void exportResource(String folderId, String fileName,
ResourceItem resourceItem, AsyncCallback<String> callback);
/**
* DataMiner

View File

@ -0,0 +1,11 @@
package org.gcube.portlets.user.dataminermanager.client.type;
/**
*
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public enum DataMinerWorkAreaElementType {
InputDataSets, OutputDataSets, Computations;
}

View File

@ -0,0 +1,11 @@
package org.gcube.portlets.user.dataminermanager.client.type;
/**
*
* @author Giancarlo Panichi
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public enum OperatorsClassificationRequestType {
Default, ByName;
}

View File

@ -1,4 +1,4 @@
package org.gcube.portlets.user.dataminermanager.client.events;
package org.gcube.portlets.user.dataminermanager.client.type;
/**
*

View File

@ -21,7 +21,6 @@ import org.gcube.common.homelibrary.util.WorkspaceUtil;
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationStatus;
import org.gcube.portlets.user.dataminermanager.client.bean.Operator;
import org.gcube.portlets.user.dataminermanager.client.bean.OperatorsClassification;
import org.gcube.portlets.user.dataminermanager.client.bean.ResourceItem;
import org.gcube.portlets.user.dataminermanager.client.bean.output.ImagesResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.MapResource;
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
@ -198,6 +197,7 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
}
}
/*
@Override
public List<TableItemSimple> getTableItems(List<String> templates)
throws Exception {
@ -214,7 +214,7 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
throw new Exception(e.getLocalizedMessage());
}
}
}*/
@Override
public List<TableItemSimple> getFileItems(List<String> templates)
@ -308,7 +308,7 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
try {
HttpSession session = this.getThreadLocalRequest().getSession();
ASLSession aslSession = SessionUtil.getASLSession(session);
SClient smClient = SessionUtil.getSClient(session, aslSession);
//SClient smClient = SessionUtil.getSClient(session, aslSession);
// SMComputation computation =
// factory.gegetComputation(computationId);
// String computationName = computation.title() == null ?
@ -378,37 +378,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
}
}
@Override
public String exportResource(String folderId, String fileName,
ResourceItem resourceItem) throws Exception {
try {
HttpSession session = this.getThreadLocalRequest().getSession();
ASLSession aslSession = SessionUtil.getASLSession(session);
String id = resourceItem.getId();
InputStream inputStream;
if (resourceItem.isTable()) {
} else
inputStream = StorageUtil
.getStorageClientInputStream(resourceItem.getUrl());
Workspace workspace = HomeLibrary.getUserWorkspace(aslSession
.getUsername());
WorkspaceFolder wsFolder = (WorkspaceFolder) workspace
.getItem(folderId);
String realFileName = WorkspaceUtil.getUniqueName(fileName,
wsFolder);
return realFileName;
} catch (Exception e) {
logger.error(e.getLocalizedMessage(), e);
throw (e);
}
}
@Override
public TableItemSimple retrieveTableInformation(Item item)
throws ServiceException {

View File

@ -51,19 +51,19 @@
<entry-point
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
<!--
<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"
/> -->
/>
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" 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" /> -->
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="DISABLED"
/> -->