209 lines
3.5 KiB
Java
209 lines
3.5 KiB
Java
/**
|
|
*
|
|
*/
|
|
|
|
package org.gcube.common.workspacetaskexecutor.shared.dataminer;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Map;
|
|
|
|
import org.gcube.common.workspacetaskexecutor.shared.BaseTaskConfiguration;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
|
|
|
/**
|
|
* The Class TaskConfiguration.
|
|
*
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
* May 2, 2018
|
|
*/
|
|
public class TaskConfiguration implements BaseTaskConfiguration, Serializable {
|
|
|
|
/**
|
|
*
|
|
*/
|
|
private static final long serialVersionUID = -3380573762288127547L;
|
|
private String algorithmId;
|
|
@JsonIgnoreProperties
|
|
private String taskDescription; //optional
|
|
private String token;
|
|
private String workspaceItemId;
|
|
private Map<String, String> mapParameters;
|
|
|
|
/**
|
|
* Instantiates a new run algorithm configuration.
|
|
*/
|
|
public TaskConfiguration() {
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* Instantiates a new task configuration.
|
|
*
|
|
* @param algorithmId the algorithm id
|
|
* @param taskDescription the task description
|
|
* @param token the token
|
|
* @param workspaceItemId the workspace item id
|
|
* @param mapParameters the map parameters
|
|
*/
|
|
public TaskConfiguration(
|
|
String algorithmId, String taskDescription, String token,
|
|
String workspaceItemId, Map<String, String> mapParameters) {
|
|
|
|
super();
|
|
this.algorithmId = algorithmId;
|
|
this.taskDescription = taskDescription;
|
|
this.token = token;
|
|
this.workspaceItemId = workspaceItemId;
|
|
this.mapParameters = mapParameters;
|
|
}
|
|
|
|
|
|
/* (non-Javadoc)
|
|
* @see org.gcube.common.workspacetaskexecutor.TaskConfiguration#getTaskId()
|
|
*/
|
|
@Override
|
|
public String getTaskId() {
|
|
|
|
return algorithmId;
|
|
}
|
|
|
|
|
|
/**
|
|
* Gets the algorithm id.
|
|
*
|
|
* @return the algorithmId
|
|
*/
|
|
public String getAlgorithmId() {
|
|
|
|
return algorithmId;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 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 algorithm id.
|
|
*
|
|
* @param algorithmId the algorithmId to set
|
|
*/
|
|
public void setAlgorithmId(String algorithmId) {
|
|
|
|
this.algorithmId = algorithmId;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* (non-Javadoc)
|
|
* @see java.lang.Object#hashCode()
|
|
*/
|
|
@Override
|
|
public int hashCode() {
|
|
|
|
int hash = 1;
|
|
hash = hash * 13 + (algorithmId == null ? 0 : algorithmId.hashCode());
|
|
hash = hash * 17 + (workspaceItemId == null ? 0 : workspaceItemId.hashCode());
|
|
return hash;
|
|
}
|
|
|
|
}
|