just some fixes in getOutputMessage
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/workspace-task-executor-library@169331 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b4ce45fe73
commit
6d1d797bbd
|
@ -279,27 +279,27 @@ public class DMConverter {
|
|||
case FILE:
|
||||
FileResource fileResource = (FileResource) res;
|
||||
String fileName=retrieveFileName(fileResource.getUrl());
|
||||
logger.debug("Entry: " + key + " = "+ fileResource+", FileName="+fileName);
|
||||
return "FileName: "+fileName + ", PublicLink = "+fileResource.getUrl();
|
||||
logger.debug("Entry: " + key + " = "+ fileResource+", FileName:"+fileName);
|
||||
return "FileName: "+fileName + ", PublicLink:"+fileResource.getUrl();
|
||||
case IMAGE:
|
||||
ImageResource imageResource = (ImageResource) res;
|
||||
String imageName=retrieveFileName(imageResource.getLink());
|
||||
logger.debug("Entry: " + key + " = "+ imageResource+", ImageName="+imageName);
|
||||
return "ImageName: " + imageName + ", PublicLink = "+ imageResource.getLink();
|
||||
logger.debug("Entry: " + key + " = "+ imageResource+", ImageName:"+imageName);
|
||||
return "ImageName: " + imageName + ", PublicLink: "+ imageResource.getLink();
|
||||
case MAP:
|
||||
logger.debug("Entry: " + key + " = "+ res);
|
||||
logger.debug("Entry: " + key + "= "+ res);
|
||||
return "Entry: " + key + " = "+ res;
|
||||
case OBJECT:
|
||||
logger.debug("Entry: " + key + " = "+ res);
|
||||
logger.debug("Entry: " + key + "= "+ res);
|
||||
return "Entry: " + key + " = "+ res;
|
||||
case TABULAR:
|
||||
TableResource tableResource = (TableResource) res;
|
||||
String tableName=retrieveFileName(tableResource.getResourceId());
|
||||
logger.debug("TableName: " + tableName + ", ResourceId = "+ tableResource.getResourceId());
|
||||
return "TableName: " + tableName + ", ResourceId = "+ tableResource.getResourceId();
|
||||
logger.debug("TableName: " + tableName + ", ResourceId: "+ tableResource.getResourceId());
|
||||
return "TableName: " + tableName + ", ResourceId: "+ tableResource.getResourceId();
|
||||
default:
|
||||
logger.debug("Entry: " + key + " = "+ res);
|
||||
return "Entry: " + key + " = "+ res;
|
||||
logger.debug("Entry: " + key + "= "+ res);
|
||||
return "Entry: " + key + "= "+ res;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Random;
|
|||
import java.util.UUID;
|
||||
|
||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.common.workspacetaskexecutor.dataminer.WorkspaceDataMinerTaskExecutor;
|
||||
import org.gcube.common.workspacetaskexecutor.shared.TaskParameter;
|
||||
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType;
|
||||
|
@ -35,7 +36,7 @@ public class TestDataMinerTaskExecutor {
|
|||
|
||||
|
||||
public static String USERNAME = "francesco.mangiacrapa";
|
||||
public static String SCOPE = "/gcube/devsec";
|
||||
public static String SCOPE = "/gcube";
|
||||
|
||||
public static String WORKSPACE_FOLDER_ID = "682ff48e-0cc9-44df-884d-185fabe8909b";
|
||||
|
||||
|
@ -90,10 +91,12 @@ public class TestDataMinerTaskExecutor {
|
|||
|
||||
public static void main(String[] args) {
|
||||
|
||||
jsonCheck();
|
||||
//jsonCheck();
|
||||
|
||||
//ScopeProvider.instance.set(SCOPE);
|
||||
// listDummyConf = gelDummyListOfConfigurations(3);
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
checkGubeProperties(null);
|
||||
listDummyConf = getDummyListOfConfigurations(3);
|
||||
checkGubeProperties(listDummyConf);
|
||||
// WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance();
|
||||
// exec.withOwner(USERNAME);
|
||||
// //jsonCheck();
|
||||
|
@ -147,7 +150,6 @@ public class TestDataMinerTaskExecutor {
|
|||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
//checkGubeProperties(null);
|
||||
|
||||
|
||||
// try {
|
||||
|
@ -194,7 +196,7 @@ public class TestDataMinerTaskExecutor {
|
|||
try {
|
||||
WorkspaceItem workspaceItem = WsUtil.getItem(USERNAME, WORKSPACE_FOLDER_ID);
|
||||
|
||||
/*if(listConfigurations!=null){
|
||||
if(listConfigurations!=null){
|
||||
JSONArray jsonArray = jUtil.toJSONArray(listConfigurations);
|
||||
System.out.println("Json array to save: "+jsonArray);
|
||||
WsUtil.setPropertyValue(workspaceItem, WorkspaceDataMinerTaskExecutor.WS_DM_TASK_TASK_CONF, jsonArray.toString());
|
||||
|
@ -210,7 +212,7 @@ public class TestDataMinerTaskExecutor {
|
|||
System.out.println("Json array to listUnM...");
|
||||
for (TaskConfiguration taskConfiguration : listUnM) {
|
||||
System.out.println(taskConfiguration);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue