204 lines
3.7 KiB
Java
204 lines
3.7 KiB
Java
/**
|
|
*
|
|
*/
|
|
|
|
package org.gcube.common.workspacetaskexecutor.shared.dataminer;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Map;
|
|
|
|
import org.gcube.common.workspacetaskexecutor.TaskConfiguration;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
|
|
|
/**
|
|
* The Class AlgorithmConfiguration.
|
|
*
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
* Apr 26, 2018
|
|
*/
|
|
public class AlgorithmConfiguration implements TaskConfiguration, Serializable {
|
|
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = -3380573762288127547L;
|
|
private String taskId;
|
|
@JsonIgnoreProperties
|
|
private String taskDescription; //optional
|
|
private String token;
|
|
private String workspaceItemId;
|
|
private Map<String, String> mapParameters;
|
|
|
|
/**
|
|
* Instantiates a new run algorithm configuration.
|
|
*/
|
|
public AlgorithmConfiguration() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Instantiates a new algorithm configuration.
|
|
*
|
|
* @param taskId the task id
|
|
* @param taskDescription the task description
|
|
* @param token the token
|
|
* @param workspaceItemId the workspace item id
|
|
* @param mapParameters the map parameters
|
|
*/
|
|
public AlgorithmConfiguration(
|
|
String taskId, String taskDescription, String token,
|
|
String workspaceItemId, Map<String, String> mapParameters) {
|
|
|
|
super();
|
|
this.taskId = taskId;
|
|
this.taskDescription = taskDescription;
|
|
this.token = token;
|
|
this.workspaceItemId = workspaceItemId;
|
|
this.mapParameters = mapParameters;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the task id.
|
|
*
|
|
* @return the taskId
|
|
*/
|
|
public String getTaskId() {
|
|
|
|
return taskId;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the task description.
|
|
*
|
|
* @return the taskDescription
|
|
*/
|
|
public String getTaskDescription() {
|
|
|
|
return taskDescription;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the token.
|
|
*
|
|
* @return the token
|
|
*/
|
|
public String getToken() {
|
|
|
|
return token;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the workspace item id.
|
|
*
|
|
* @return the workspaceItemId
|
|
*/
|
|
public String getWorkspaceItemId() {
|
|
|
|
return workspaceItemId;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the map parameters.
|
|
*
|
|
* @return the mapParameters
|
|
*/
|
|
public Map<String, String> getMapParameters() {
|
|
|
|
return mapParameters;
|
|
}
|
|
|
|
|
|
/**
|
|
* Sets the task id.
|
|
*
|
|
* @param taskId the taskId to set
|
|
*/
|
|
public void setTaskId(String taskId) {
|
|
|
|
this.taskId = taskId;
|
|
}
|
|
|
|
|
|
/**
|
|
* Sets the task description.
|
|
*
|
|
* @param taskDescription the taskDescription to set
|
|
*/
|
|
public void setTaskDescription(String taskDescription) {
|
|
|
|
this.taskDescription = taskDescription;
|
|
}
|
|
|
|
|
|
/**
|
|
* Sets the token.
|
|
*
|
|
* @param token the token to set
|
|
*/
|
|
public void setToken(String token) {
|
|
|
|
this.token = token;
|
|
}
|
|
|
|
/**
|
|
* Sets the workspace item id.
|
|
*
|
|
* @param workspaceItemId the workspaceItemId to set
|
|
*/
|
|
public void setWorkspaceItemId(String workspaceItemId) {
|
|
|
|
this.workspaceItemId = workspaceItemId;
|
|
}
|
|
|
|
|
|
/**
|
|
* Sets the map parameters.
|
|
*
|
|
* @param mapParameters the mapParameters to set
|
|
*/
|
|
public void setMapParameters(Map<String, String> mapParameters) {
|
|
|
|
this.mapParameters = mapParameters;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
|
|
int hash = 1;
|
|
hash = hash * 13 + (taskId == null ? 0 : taskId.hashCode());
|
|
hash = hash * 17 + (workspaceItemId == null ? 0 : workspaceItemId.hashCode());
|
|
return hash;
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see java.lang.Object#toString()
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
builder.append("AlgorithmConfiguration [taskId=");
|
|
builder.append(taskId);
|
|
builder.append(", taskDescription=");
|
|
builder.append(taskDescription);
|
|
builder.append(", token=");
|
|
builder.append(token);
|
|
builder.append(", workspaceItemId=");
|
|
builder.append(workspaceItemId);
|
|
builder.append(", mapParameters=");
|
|
builder.append(mapParameters);
|
|
builder.append("]");
|
|
return builder.toString();
|
|
}
|
|
|
|
|
|
|
|
}
|