Search in sources :

Example 16 with DataNode

use of com.odysseusinc.arachne.portal.model.DataNode in project ArachneCentralAPI by OHDSI.

the class BaseAchillesController method receiveStats.

@ApiOperation("Store Achilles results for given datasource")
@RequestMapping(value = "datanode/datasource/{id}", method = RequestMethod.POST)
public void receiveStats(@PathVariable("id") Long datasourceId, @RequestParam(value = "file") MultipartFile data) throws NotExistException, IOException, ValidationException {
    DS dataSource = checkDataSource(datasourceId);
    final DataNode dataNode = dataSource.getDataNode();
    if (dataNode.getVirtual()) {
        throw new ValidationException("virtual datasource is not allowed for manual uploading");
    }
    LOGGER.info(ACHILLES_RESULT_LOADED_LOG, dataSource.getId(), dataSource.getName(), dataNode.getId(), dataNode.getName());
    achillesService.createCharacterization(dataSource, data);
}
Also used : ValidationException(com.odysseusinc.arachne.portal.exception.ValidationException) DataNode(com.odysseusinc.arachne.portal.model.DataNode) ApiOperation(io.swagger.annotations.ApiOperation) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

DataNode (com.odysseusinc.arachne.portal.model.DataNode)16 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 ApiOperation (io.swagger.annotations.ApiOperation)5 ObjectMessage (javax.jms.ObjectMessage)4 JsonResult (com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult)3 IUser (com.odysseusinc.arachne.portal.model.IUser)3 ArrayList (java.util.ArrayList)3 LinkedList (java.util.LinkedList)3 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)3 CommonEntityDTO (com.odysseusinc.arachne.commons.api.v1.dto.CommonEntityDTO)2 ConsumerTemplate (com.odysseusinc.arachne.commons.service.messaging.ConsumerTemplate)2 NotExistException (com.odysseusinc.arachne.portal.exception.NotExistException)2 FavouriteStudy (com.odysseusinc.arachne.portal.model.FavouriteStudy)2 Study (com.odysseusinc.arachne.portal.model.Study)2 UserStudy (com.odysseusinc.arachne.portal.model.UserStudy)2 List (java.util.List)2 Transactional (org.springframework.transaction.annotation.Transactional)2 JsonObject (com.google.gson.JsonObject)1 JsonParser (com.google.gson.JsonParser)1 JsonReader (com.google.gson.stream.JsonReader)1