data-miner-manager/src/main/java/org/gcube/portlets/user/dataminermanager/client/bean/ComputationItem.java

140 lines
3.0 KiB
Java

/**
*
*/
package org.gcube.portlets.user.dataminermanager.client.bean;
import java.io.Serializable;
import java.util.Date;
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
/**
*
* @author Giancarlo Panichi email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ComputationItem implements Serializable {
private static final long serialVersionUID = 7948340340190844208L;
private ComputationId computationId;
private String id;
private String name;
private String description;
private String categoryId;
private String operatorId;
private String infrastructure;
private Date creationDate;
private Date endDate;
private ComputationStatus status;
private Resource resource;
private Operator operator;
/**
*
*/
public ComputationItem() {
super();
}
public ComputationItem(ComputationId computationId, String operatorId) {
this.computationId=computationId;
this.operatorId=operatorId;
}
/*
public ComputationItem(ComputationId computationId, String name,
String description, String categoryId, String operatorId,
String infrastructure, Date creationDate, Date endDate,
ComputationStatus status, Resource resource) {
super();
this.computationId = computationId;
this.id = computationId.getId();
this.name = name;
this.description = description;
this.categoryId = categoryId;
this.operatorId = operatorId;
this.infrastructure = infrastructure;
this.creationDate = creationDate;
this.endDate = endDate;
this.status = status;
this.resource = resource;
}*/
public OperatorCategory getOperatorCategory() {
/*OperatorsClassification classification = DataMinerManager
.getDefaultOperatorsClassification();
if (classification == null)
return null;
else
return classification.getCategoryById(categoryId);
*/
return null;
}
public Operator getOperator() {
/*if (operator == null) {
OperatorsClassification classification = DataMinerManager
.getDefaultOperatorsClassification();
if (classification != null)
operator = classification.getOperatorById(operatorId);
}
return operator;*/
return null;
}
public ComputationId getComputationId() {
return computationId;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public String getCategoryId() {
return categoryId;
}
public String getOperatorId() {
return operatorId;
}
public String getInfrastructure() {
return infrastructure;
}
public Date getCreationDate() {
return creationDate;
}
public Date getEndDate() {
return endDate;
}
public ComputationStatus getStatus() {
return status;
}
public Resource getResource() {
return resource;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
}