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:
|
case FILE:
|
||||||
FileResource fileResource = (FileResource) res;
|
FileResource fileResource = (FileResource) res;
|
||||||
String fileName=retrieveFileName(fileResource.getUrl());
|
String fileName=retrieveFileName(fileResource.getUrl());
|
||||||
logger.debug("Entry: " + key + " = "+ fileResource+", FileName="+fileName);
|
logger.debug("Entry: " + key + " = "+ fileResource+", FileName:"+fileName);
|
||||||
return "FileName: "+fileName + ", PublicLink = "+fileResource.getUrl();
|
return "FileName: "+fileName + ", PublicLink:"+fileResource.getUrl();
|
||||||
case IMAGE:
|
case IMAGE:
|
||||||
ImageResource imageResource = (ImageResource) res;
|
ImageResource imageResource = (ImageResource) res;
|
||||||
String imageName=retrieveFileName(imageResource.getLink());
|
String imageName=retrieveFileName(imageResource.getLink());
|
||||||
logger.debug("Entry: " + key + " = "+ imageResource+", ImageName="+imageName);
|
logger.debug("Entry: " + key + " = "+ imageResource+", ImageName:"+imageName);
|
||||||
return "ImageName: " + imageName + ", PublicLink = "+ imageResource.getLink();
|
return "ImageName: " + imageName + ", PublicLink: "+ imageResource.getLink();
|
||||||
case MAP:
|
case MAP:
|
||||||
logger.debug("Entry: " + key + " = "+ res);
|
logger.debug("Entry: " + key + "= "+ res);
|
||||||
return "Entry: " + key + " = "+ res;
|
return "Entry: " + key + " = "+ res;
|
||||||
case OBJECT:
|
case OBJECT:
|
||||||
logger.debug("Entry: " + key + " = "+ res);
|
logger.debug("Entry: " + key + "= "+ res);
|
||||||
return "Entry: " + key + " = "+ res;
|
return "Entry: " + key + " = "+ res;
|
||||||
case TABULAR:
|
case TABULAR:
|
||||||
TableResource tableResource = (TableResource) res;
|
TableResource tableResource = (TableResource) res;
|
||||||
String tableName=retrieveFileName(tableResource.getResourceId());
|
String tableName=retrieveFileName(tableResource.getResourceId());
|
||||||
logger.debug("TableName: " + tableName + ", ResourceId = "+ tableResource.getResourceId());
|
logger.debug("TableName: " + tableName + ", ResourceId: "+ tableResource.getResourceId());
|
||||||
return "TableName: " + tableName + ", ResourceId = "+ tableResource.getResourceId();
|
return "TableName: " + tableName + ", ResourceId: "+ tableResource.getResourceId();
|
||||||
default:
|
default:
|
||||||
logger.debug("Entry: " + key + " = "+ res);
|
logger.debug("Entry: " + key + "= "+ res);
|
||||||
return "Entry: " + key + " = "+ res;
|
return "Entry: " + key + "= "+ res;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Random;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
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.dataminer.WorkspaceDataMinerTaskExecutor;
|
||||||
import org.gcube.common.workspacetaskexecutor.shared.TaskParameter;
|
import org.gcube.common.workspacetaskexecutor.shared.TaskParameter;
|
||||||
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType;
|
import org.gcube.common.workspacetaskexecutor.shared.TaskParameterType;
|
||||||
|
@ -35,7 +36,7 @@ public class TestDataMinerTaskExecutor {
|
||||||
|
|
||||||
|
|
||||||
public static String USERNAME = "francesco.mangiacrapa";
|
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";
|
public static String WORKSPACE_FOLDER_ID = "682ff48e-0cc9-44df-884d-185fabe8909b";
|
||||||
|
|
||||||
|
@ -90,10 +91,12 @@ public class TestDataMinerTaskExecutor {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
jsonCheck();
|
//jsonCheck();
|
||||||
|
|
||||||
//ScopeProvider.instance.set(SCOPE);
|
ScopeProvider.instance.set(SCOPE);
|
||||||
// listDummyConf = gelDummyListOfConfigurations(3);
|
checkGubeProperties(null);
|
||||||
|
listDummyConf = getDummyListOfConfigurations(3);
|
||||||
|
checkGubeProperties(listDummyConf);
|
||||||
// WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance();
|
// WorkspaceDataMinerTaskExecutor exec = WorkspaceDataMinerTaskExecutor.getInstance();
|
||||||
// exec.withOwner(USERNAME);
|
// exec.withOwner(USERNAME);
|
||||||
// //jsonCheck();
|
// //jsonCheck();
|
||||||
|
@ -147,7 +150,6 @@ public class TestDataMinerTaskExecutor {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//checkGubeProperties(null);
|
|
||||||
|
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
|
@ -194,7 +196,7 @@ public class TestDataMinerTaskExecutor {
|
||||||
try {
|
try {
|
||||||
WorkspaceItem workspaceItem = WsUtil.getItem(USERNAME, WORKSPACE_FOLDER_ID);
|
WorkspaceItem workspaceItem = WsUtil.getItem(USERNAME, WORKSPACE_FOLDER_ID);
|
||||||
|
|
||||||
/*if(listConfigurations!=null){
|
if(listConfigurations!=null){
|
||||||
JSONArray jsonArray = jUtil.toJSONArray(listConfigurations);
|
JSONArray jsonArray = jUtil.toJSONArray(listConfigurations);
|
||||||
System.out.println("Json array to save: "+jsonArray);
|
System.out.println("Json array to save: "+jsonArray);
|
||||||
WsUtil.setPropertyValue(workspaceItem, WorkspaceDataMinerTaskExecutor.WS_DM_TASK_TASK_CONF, jsonArray.toString());
|
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...");
|
System.out.println("Json array to listUnM...");
|
||||||
for (TaskConfiguration taskConfiguration : listUnM) {
|
for (TaskConfiguration taskConfiguration : listUnM) {
|
||||||
System.out.println(taskConfiguration);
|
System.out.println(taskConfiguration);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in New Issue