Skip to content
Snippets Groups Projects
Commit 82c13126 authored by kfilippopolitis's avatar kfilippopolitis
Browse files

Add the TabularVisualizationDTO class

parent 192daf69
No related branches found
No related tags found
1 merge request!23Dev/mip 62/mip engine integration with the mip portalbackend
package eu.hbp.mip.models.DTOs;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.HashMap;
import java.util.List;
@Data
@AllArgsConstructor
public class TabularVisualizationDTO {
private final String name;
private final String profile;
private final HashMap<String, List<Field>> schema;
private final List<List<Object>> data;
public TabularVisualizationDTO(MIPEngineAlgorithmResultDTO mipEngineAlgorithmResultDTO) {
HashMap<String, List<TabularVisualizationDTO.Field>> schema = new HashMap<>();
schema.put("fields", mipEngineAlgorithmResultDTO.getColumns());
this.name = mipEngineAlgorithmResultDTO.getTitle();
this.profile = "tabular-data-resource";
this.schema = schema;
this.data = mipEngineAlgorithmResultDTO.getData();
}
@Data
@AllArgsConstructor
public static class Field {
private final String name;
private final String type;
}
}
......@@ -20,6 +20,7 @@ import eu.hbp.mip.models.galaxy.GalaxyWorkflowResult;
import eu.hbp.mip.models.galaxy.PostWorkflowToGalaxyDtoResponse;
import eu.hbp.mip.repositories.ExperimentRepository;
import eu.hbp.mip.utils.Exceptions.BadRequestException;
import eu.hbp.mip.utils.Exceptions.InternalServerError;
import eu.hbp.mip.utils.JsonConverters;
import eu.hbp.mip.utils.Logger;
import org.codehaus.jettison.json.JSONException;
......@@ -364,6 +365,7 @@ public class GalaxyService {
sleep(2000);
} catch (InterruptedException e) {
Logger.LogExperimentAction(experimentDAO.getName(), experimentDAO.getUuid(), "Sleep was disrupted: " + e.getMessage());
throw new InternalServerError(e.getMessage());
}
Logger.LogExperimentAction(experimentDAO.getName(), experimentDAO.getUuid(), "Fetching status for experiment Id: " + experimentDAO.getUuid());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment