use of org.obiba.mica.dataset.domain.StudyDataset in project mica2 by obiba.
the class PublishedCollectedDatasetVariableResource method getContingencyDto.
private Mica.DatasetVariableContingencyDto getContingencyDto(DatasetVariable var, DatasetVariable crossVar) {
StudyDataset dataset = getDataset(StudyDataset.class, datasetId);
StudyTable studyTable = dataset.getSafeStudyTable();
try {
return dtos.asContingencyDto(studyTable, var, crossVar, datasetService.getContingencyTable(dataset, var, crossVar)).build();
} catch (Exception e) {
log.warn("Unable to retrieve contingency table: " + e.getMessage(), e);
return dtos.asContingencyDto(studyTable, var, crossVar, null).build();
}
}
Aggregations