Search in sources :

Example 16 with Dtos

use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.

the class ChangeLogTag method doStartTagInternal.

@Override
protected int doStartTagInternal() throws Exception {
    ChangeLoggable item = (ChangeLoggable) this.item;
    if (item.getChangeLog().isEmpty()) {
        return SKIP_BODY;
    }
    ObjectMapper mapper = new ObjectMapper();
    pageContext.getOut().append(String.format("<br/><h1>Changes</h1><table id='changelog' class='display no-border ui-widget-content'></table><script type='text/javascript'>jQuery(document).ready(function () { ListUtils.createStaticTable('changelog', ListTarget.changelog, {}, %1$s);});</script>", mapper.writeValueAsString(item.getChangeLog().stream().map(Dtos::asDto).collect(Collectors.toList()))));
    return SKIP_BODY;
}
Also used : Dtos(uk.ac.bbsrc.tgac.miso.dto.Dtos) ChangeLoggable(uk.ac.bbsrc.tgac.miso.core.data.ChangeLoggable) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 17 with Dtos

use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.

the class BoxRestController method getBoxScan.

/**
 * Gets the Box Scanner scan results (map of box positions and barcodes)
 *
 * @param boxId
 * @param requestData
 * @return a serialized box object containing the Boxable items
 *         linked with each barcode at each position indicated by the scan results. Any errors are returned with a message containing the
 *         type of
 *         error (unable to read at certain positions; multiple items associated with a single barcode; unable to find box scanner), a
 *         message
 *         about the error, the positions that were successfully read (if applicable) and the positions at which the error was triggered
 *         (if
 *         applicable)
 */
@PostMapping(value = "/{boxId}/scan")
@ResponseBody
public ScanResultsDto getBoxScan(@PathVariable(required = true) int boxId, @RequestBody(required = true) ScanRequest requestData) {
    try {
        BoxScanner boxScanner = boxScanners.get(requestData.getScannerName());
        if (boxScanner == null) {
            throw new RestException("Invalid scanner specified", Status.BAD_REQUEST);
        }
        BoxScan scan = boxScanner.getScan();
        if (scan == null) {
            throw new RestException("The scanner did not detect a box!", Status.CONFLICT);
        }
        Map<String, String> barcodesByPosition = scan.getBarcodesMap();
        // Extract the valid barcodes and build a barcode to item map
        Set<String> validBarcodes = barcodesByPosition.values().stream().filter(barcode -> isRealBarcode(scan, barcode)).collect(Collectors.toSet());
        Map<String, BoxableView> boxablesByBarcode = boxService.getViewsFromBarcodeList(validBarcodes).stream().collect(Collectors.toMap(BoxableView::getIdentificationBarcode, Function.identity()));
        // For all the valid barcodes, build a list of DTOs with the updated positions
        List<BoxableDto> items = barcodesByPosition.entrySet().stream().filter(entry -> isRealBarcode(scan, entry.getValue()) && boxablesByBarcode.containsKey(entry.getValue())).map(entry -> {
            BoxableDto dto = Dtos.asDto(boxablesByBarcode.get(entry.getValue()));
            dto.setCoordinates(entry.getKey());
            return dto;
        }).collect(Collectors.toList());
        // Collect all the errors
        List<ErrorMessage> errors = new ArrayList<>();
        // If there's a barcode that wasn't found in the DB, create an error.
        barcodesByPosition.entrySet().stream().filter(entry -> isRealBarcode(scan, entry.getValue()) && !boxablesByBarcode.containsKey(entry.getValue())).map(entry -> {
            ErrorMessage dto = new ErrorMessage();
            dto.setCoordinates(entry.getKey());
            dto.setMessage("Barcode " + entry.getValue() + " not found.");
            return dto;
        }).forEachOrdered(errors::add);
        // If there was a read error, produce an error.
        scan.getReadErrorPositions().stream().map(position -> {
            ErrorMessage dto = new ErrorMessage();
            dto.setCoordinates(position);
            dto.setMessage("Cannot read tube.");
            return dto;
        }).forEachOrdered(errors::add);
        long totalBarcodes = barcodesByPosition.values().stream().filter(barcode -> isRealBarcode(scan, barcode)).count();
        if (validBarcodes.size() != totalBarcodes) {
            ErrorMessage dto = new ErrorMessage();
            dto.message = "Duplicate barcodes detected!";
            errors.add(dto);
        }
        // Build the diffs for this box
        List<DiffMessage> diffs = new ArrayList<>();
        Box box;
        Map<String, BoxableView> boxables;
        try {
            box = boxService.get(boxId);
            boxables = boxService.getBoxContents(boxId).stream().collect(Collectors.toMap(BoxableView::getBoxPosition, Function.identity()));
        } catch (IOException e) {
            throw new RestException("Cannot get the Box: " + e.getMessage(), Status.INTERNAL_SERVER_ERROR);
        }
        if (box.getSize().getRows() != scan.getRowCount() || box.getSize().getColumns() != scan.getColumnCount())
            throw new RestException(String.format("Box is %d×%d, but scanner detected %d×%d.", box.getSize().getRows(), box.getSize().getColumns(), scan.getRowCount(), scan.getColumnCount()), Status.BAD_REQUEST);
        box.getSize().positionStream().map(position -> {
            BoxableView originalItem = boxables.containsKey(position) ? boxables.get(position) : null;
            BoxableView newItem = barcodesByPosition.containsKey(position) && boxablesByBarcode.containsKey(barcodesByPosition.get(position)) ? boxablesByBarcode.get(barcodesByPosition.get(position)) : null;
            if (originalItem != null && newItem != null && !newItem.getIdentificationBarcode().equals(originalItem.getIdentificationBarcode())) {
                DiffMessage dto = new DiffMessage();
                dto.action = "changed";
                dto.modified = Dtos.asDto(newItem);
                dto.original = Dtos.asDto(originalItem);
                return dto;
            } else if (originalItem != null && newItem == null) {
                DiffMessage dto = new DiffMessage();
                dto.action = "removed";
                dto.original = Dtos.asDto(originalItem);
                return dto;
            } else if (originalItem == null && newItem != null) {
                DiffMessage dto = new DiffMessage();
                dto.action = "added";
                dto.modified = Dtos.asDto(newItem);
                return dto;
            } else {
                return null;
            }
        }).filter(Objects::nonNull);
        ScanResultsDto scanResults = new ScanResultsDto();
        scanResults.setEmptyPositions(// 
        barcodesByPosition.entrySet().stream().filter(// 
        entry -> !isRealBarcode(scan, entry.getValue())).map(// 
        Entry::getKey).collect(Collectors.toList()));
        scanResults.setItems(items);
        scanResults.setErrors(errors);
        scanResults.setDiffs(diffs);
        scanResults.setRows(scan.getRowCount());
        scanResults.setColumns(scan.getColumnCount());
        return scanResults;
    } catch (IntegrationException | IOException e) {
        throw new RestException("Error scanning box: " + e.getMessage(), Status.INTERNAL_SERVER_ERROR);
    }
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) Arrays(java.util.Arrays) RequestParam(org.springframework.web.bind.annotation.RequestParam) PaginationFilter(uk.ac.bbsrc.tgac.miso.core.util.PaginationFilter) BoxSize(uk.ac.bbsrc.tgac.miso.core.data.BoxSize) BiFunction(java.util.function.BiFunction) BoxableDto(uk.ac.bbsrc.tgac.miso.dto.BoxableDto) DataTablesResponseDto(uk.ac.bbsrc.tgac.miso.dto.DataTablesResponseDto) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Dtos(uk.ac.bbsrc.tgac.miso.dto.Dtos) XSSFWorkbook(org.apache.poi.xssf.usermodel.XSSFWorkbook) DetailedSample(uk.ac.bbsrc.tgac.miso.core.data.DetailedSample) BoxUtils(uk.ac.bbsrc.tgac.miso.core.util.BoxUtils) BoxScanner(uk.ac.bbsrc.tgac.miso.integration.BoxScanner) SampleSlide(uk.ac.bbsrc.tgac.miso.core.data.SampleSlide) PutMapping(org.springframework.web.bind.annotation.PutMapping) Sample(uk.ac.bbsrc.tgac.miso.core.data.Sample) Box(uk.ac.bbsrc.tgac.miso.core.data.Box) Map(java.util.Map) DeleteMapping(org.springframework.web.bind.annotation.DeleteMapping) PostMapping(org.springframework.web.bind.annotation.PostMapping) SampleService(uk.ac.bbsrc.tgac.miso.core.service.SampleService) ValidationResult(uk.ac.bbsrc.tgac.miso.core.service.exception.ValidationResult) BoxStorageAmount(uk.ac.bbsrc.tgac.miso.core.data.impl.StorageLocation.BoxStorageAmount) ImmutableMap(com.google.common.collect.ImmutableMap) AdvancedSearchParser(uk.ac.bbsrc.tgac.miso.webapp.controller.component.AdvancedSearchParser) HttpHeaders(org.springframework.http.HttpHeaders) Collection(java.util.Collection) MediaType(org.springframework.http.MediaType) Resource(javax.annotation.Resource) Set(java.util.Set) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) BoxPosition(uk.ac.bbsrc.tgac.miso.core.data.BoxPosition) List(java.util.List) HttpEntity(org.springframework.http.HttpEntity) Entry(java.util.Map.Entry) JSONObject(net.sf.json.JSONObject) IntegrationException(uk.ac.bbsrc.tgac.miso.integration.util.IntegrationException) SampleIdentity(uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity) BoxableId(uk.ac.bbsrc.tgac.miso.core.data.BoxableId) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) HashMap(java.util.HashMap) Controller(org.springframework.stereotype.Controller) Function(java.util.function.Function) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) LibraryAliquotService(uk.ac.bbsrc.tgac.miso.core.service.LibraryAliquotService) ArrayList(java.util.ArrayList) XSSFRow(org.apache.poi.xssf.usermodel.XSSFRow) Value(org.springframework.beans.factory.annotation.Value) RequestBody(org.springframework.web.bind.annotation.RequestBody) LibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryAliquot) HttpServletRequest(javax.servlet.http.HttpServletRequest) LimsUtils(uk.ac.bbsrc.tgac.miso.core.util.LimsUtils) Library(uk.ac.bbsrc.tgac.miso.core.data.Library) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) Status(javax.ws.rs.core.Response.Status) ValidationError(uk.ac.bbsrc.tgac.miso.core.service.exception.ValidationError) BoxScan(uk.ac.bbsrc.tgac.miso.integration.BoxScan) Logger(org.slf4j.Logger) StorageLocationService(uk.ac.bbsrc.tgac.miso.core.service.StorageLocationService) LibraryService(uk.ac.bbsrc.tgac.miso.core.service.LibraryService) WhineyFunction(uk.ac.bbsrc.tgac.miso.core.util.WhineyFunction) HttpServletResponse(javax.servlet.http.HttpServletResponse) MisoFilesManager(uk.ac.bbsrc.tgac.miso.core.manager.MisoFilesManager) FileOutputStream(java.io.FileOutputStream) IOException(java.io.IOException) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) BoxableView(uk.ac.bbsrc.tgac.miso.core.data.impl.view.box.BoxableView) BoxService(uk.ac.bbsrc.tgac.miso.core.service.BoxService) File(java.io.File) HttpStatus(org.springframework.http.HttpStatus) BoxDto(uk.ac.bbsrc.tgac.miso.dto.BoxDto) XSSFSheet(org.apache.poi.xssf.usermodel.XSSFSheet) PaginatedDataSource(uk.ac.bbsrc.tgac.miso.core.util.PaginatedDataSource) Comparator(java.util.Comparator) AsyncOperationManager(uk.ac.bbsrc.tgac.miso.webapp.controller.component.AsyncOperationManager) StorageLocation(uk.ac.bbsrc.tgac.miso.core.data.impl.StorageLocation) InputStream(java.io.InputStream) EntityType(uk.ac.bbsrc.tgac.miso.core.data.Boxable.EntityType) ArrayList(java.util.ArrayList) BoxScan(uk.ac.bbsrc.tgac.miso.integration.BoxScan) BoxableView(uk.ac.bbsrc.tgac.miso.core.data.impl.view.box.BoxableView) Entry(java.util.Map.Entry) BoxScanner(uk.ac.bbsrc.tgac.miso.integration.BoxScanner) BoxableDto(uk.ac.bbsrc.tgac.miso.dto.BoxableDto) IntegrationException(uk.ac.bbsrc.tgac.miso.integration.util.IntegrationException) Box(uk.ac.bbsrc.tgac.miso.core.data.Box) IOException(java.io.IOException) Objects(java.util.Objects) PostMapping(org.springframework.web.bind.annotation.PostMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 18 with Dtos

use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.

the class LabRestController method updateLab.

@PutMapping(value = "/{id}", headers = { "Content-type=application/json" })
@ResponseBody
public LabDto updateLab(@PathVariable("id") Long id, @RequestBody LabDto labDto, UriComponentsBuilder uriBuilder) throws IOException {
    LabDto updated = RestUtils.updateObject("Lab", id, labDto, Dtos::to, labService, Dtos::asDto);
    constantsController.refreshConstants();
    return updated;
}
Also used : Dtos(uk.ac.bbsrc.tgac.miso.dto.Dtos) LabDto(uk.ac.bbsrc.tgac.miso.dto.LabDto) PutMapping(org.springframework.web.bind.annotation.PutMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 19 with Dtos

use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.

the class RunRestController method getPotentialExperiments.

@GetMapping("/{runId}/potentialExperiments")
@ResponseBody
public List<StudiesForExperiment> getPotentialExperiments(@PathVariable long runId) throws IOException {
    Run run = getRun(runId);
    RunDto runDto = Dtos.asDto(run);
    InstrumentModelDto instrumentModelDto = Dtos.asDto(run.getSequencer().getInstrumentModel());
    Map<Library, List<Partition>> libraryGroups = getLibraryGroups(run);
    return libraryGroups.entrySet().stream().map(group -> new Pair<>(group.getKey(), group.getValue().stream().map(partition -> Dtos.asDto(partition, indexChecker)).map(partitionDto -> new RunPartitionDto(runDto, partitionDto)).collect(Collectors.toList()))).map(group -> {
        StudiesForExperiment result = new StudiesForExperiment();
        result.experiment = new ExperimentDto();
        result.experiment.setLibrary(Dtos.asDto(group.getKey(), false));
        result.experiment.setInstrumentModel(instrumentModelDto);
        result.experiment.setPartitions(group.getValue());
        result.studies = group.getKey().getSample().getProject().getStudies().stream().map(Dtos::asDto).collect(Collectors.toList());
        return result;
    }).collect(Collectors.toList());
}
Also used : RunPurposeService(uk.ac.bbsrc.tgac.miso.core.service.RunPurposeService) PathVariable(org.springframework.web.bind.annotation.PathVariable) UriComponentsBuilder(org.springframework.web.util.UriComponentsBuilder) RequestParam(org.springframework.web.bind.annotation.RequestParam) SampleTissueProcessing(uk.ac.bbsrc.tgac.miso.core.data.SampleTissueProcessing) PaginationFilter(uk.ac.bbsrc.tgac.miso.core.util.PaginationFilter) DataTablesResponseDto(uk.ac.bbsrc.tgac.miso.dto.DataTablesResponseDto) Autowired(org.springframework.beans.factory.annotation.Autowired) SampleSheet(uk.ac.bbsrc.tgac.miso.core.util.SampleSheet) RunPartition(uk.ac.bbsrc.tgac.miso.core.data.RunPartition) Dtos(uk.ac.bbsrc.tgac.miso.dto.Dtos) RunPartitionDto(uk.ac.bbsrc.tgac.miso.dto.ExperimentDto.RunPartitionDto) PutMapping(org.springframework.web.bind.annotation.PutMapping) Sample(uk.ac.bbsrc.tgac.miso.core.data.Sample) Map(java.util.Map) SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) PartitionQCType(uk.ac.bbsrc.tgac.miso.core.data.PartitionQCType) RunPartitionAliquotService(uk.ac.bbsrc.tgac.miso.core.service.RunPartitionAliquotService) ValidationException(uk.ac.bbsrc.tgac.miso.core.service.exception.ValidationException) PostMapping(org.springframework.web.bind.annotation.PostMapping) SampleService(uk.ac.bbsrc.tgac.miso.core.service.SampleService) PoolDto(uk.ac.bbsrc.tgac.miso.dto.PoolDto) AdvancedSearchParser(uk.ac.bbsrc.tgac.miso.webapp.controller.component.AdvancedSearchParser) HttpHeaders(org.springframework.http.HttpHeaders) ListLibraryAliquotView(uk.ac.bbsrc.tgac.miso.core.data.impl.view.ListLibraryAliquotView) Collection(java.util.Collection) MediaType(org.springframework.http.MediaType) ExperimentDto(uk.ac.bbsrc.tgac.miso.dto.ExperimentDto) Partition(uk.ac.bbsrc.tgac.miso.core.data.Partition) Collectors(java.util.stream.Collectors) IndexChecker(uk.ac.bbsrc.tgac.miso.core.util.IndexChecker) RunLibrarySpreadsheets(uk.ac.bbsrc.tgac.miso.core.data.spreadsheet.RunLibrarySpreadsheets) Objects(java.util.Objects) LibraryDto(uk.ac.bbsrc.tgac.miso.dto.LibraryDto) List(java.util.List) HttpEntity(org.springframework.http.HttpEntity) MisoWebUtils(uk.ac.bbsrc.tgac.miso.webapp.util.MisoWebUtils) Stream(java.util.stream.Stream) SampleStock(uk.ac.bbsrc.tgac.miso.core.data.SampleStock) RunService(uk.ac.bbsrc.tgac.miso.core.service.RunService) Pair(uk.ac.bbsrc.tgac.miso.core.data.Pair) LibraryAliquotDto(uk.ac.bbsrc.tgac.miso.dto.LibraryAliquotDto) InstrumentModelDto(uk.ac.bbsrc.tgac.miso.dto.InstrumentModelDto) InstrumentModel(uk.ac.bbsrc.tgac.miso.core.data.InstrumentModel) SampleIdentity(uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity) StudyDto(uk.ac.bbsrc.tgac.miso.dto.StudyDto) User(com.eaglegenomics.simlims.core.User) RunPurpose(uk.ac.bbsrc.tgac.miso.core.data.impl.RunPurpose) AuthorizationManager(uk.ac.bbsrc.tgac.miso.core.security.AuthorizationManager) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) Controller(org.springframework.stereotype.Controller) LibraryAliquotService(uk.ac.bbsrc.tgac.miso.core.service.LibraryAliquotService) ArrayList(java.util.ArrayList) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) Value(org.springframework.beans.factory.annotation.Value) RequestBody(org.springframework.web.bind.annotation.RequestBody) LibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryAliquot) HttpServletRequest(javax.servlet.http.HttpServletRequest) SampleDto(uk.ac.bbsrc.tgac.miso.dto.SampleDto) Run(uk.ac.bbsrc.tgac.miso.core.data.Run) RunPartitionAliquot(uk.ac.bbsrc.tgac.miso.core.data.RunPartitionAliquot) RunPartitionAliquotDto(uk.ac.bbsrc.tgac.miso.dto.RunPartitionAliquotDto) LimsUtils(uk.ac.bbsrc.tgac.miso.core.util.LimsUtils) Library(uk.ac.bbsrc.tgac.miso.core.data.Library) ContainerService(uk.ac.bbsrc.tgac.miso.core.service.ContainerService) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) PoolElement(uk.ac.bbsrc.tgac.miso.core.data.impl.view.PoolElement) RunPartitionService(uk.ac.bbsrc.tgac.miso.core.service.RunPartitionService) Status(javax.ws.rs.core.Response.Status) SampleAliquot(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot) SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) LibraryService(uk.ac.bbsrc.tgac.miso.core.service.LibraryService) WhineyFunction(uk.ac.bbsrc.tgac.miso.core.util.WhineyFunction) HttpServletResponse(javax.servlet.http.HttpServletResponse) SpreadsheetRequest(uk.ac.bbsrc.tgac.miso.dto.SpreadsheetRequest) IOException(java.io.IOException) ResponseBody(org.springframework.web.bind.annotation.ResponseBody) WhineyConsumer(uk.ac.bbsrc.tgac.miso.core.util.WhineyConsumer) ContainerDto(uk.ac.bbsrc.tgac.miso.dto.ContainerDto) Consumer(java.util.function.Consumer) HttpStatus(org.springframework.http.HttpStatus) RunPosition(uk.ac.bbsrc.tgac.miso.core.data.impl.RunPosition) ExperimentService(uk.ac.bbsrc.tgac.miso.core.service.ExperimentService) PartitionQcTypeService(uk.ac.bbsrc.tgac.miso.core.service.PartitionQcTypeService) PlatformType(uk.ac.bbsrc.tgac.miso.core.data.type.PlatformType) PaginatedDataSource(uk.ac.bbsrc.tgac.miso.core.util.PaginatedDataSource) PartitionDto(uk.ac.bbsrc.tgac.miso.dto.PartitionDto) Pool(uk.ac.bbsrc.tgac.miso.core.data.Pool) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) ExperimentDto(uk.ac.bbsrc.tgac.miso.dto.ExperimentDto) Run(uk.ac.bbsrc.tgac.miso.core.data.Run) List(java.util.List) ArrayList(java.util.ArrayList) Library(uk.ac.bbsrc.tgac.miso.core.data.Library) RunPartitionDto(uk.ac.bbsrc.tgac.miso.dto.ExperimentDto.RunPartitionDto) InstrumentModelDto(uk.ac.bbsrc.tgac.miso.dto.InstrumentModelDto) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 20 with Dtos

use of uk.ac.bbsrc.tgac.miso.dto.Dtos in project miso-lims by miso-lims.

the class SampleClassRestController method createSampleClass.

@PostMapping(headers = { "Content-type=application/json" })
@ResponseStatus(HttpStatus.CREATED)
@ResponseBody
public SampleClassDto createSampleClass(@RequestBody SampleClassDto sampleClassDto) throws IOException {
    return RestUtils.createObject("Sample Class", sampleClassDto, Dtos::to, sampleClassService, sampleClass -> {
        SampleClassDto dto = Dtos.asDto(sampleClass);
        constantsController.refreshConstants();
        return dto;
    });
}
Also used : Dtos(uk.ac.bbsrc.tgac.miso.dto.Dtos) SampleClassDto(uk.ac.bbsrc.tgac.miso.dto.SampleClassDto) PostMapping(org.springframework.web.bind.annotation.PostMapping) ResponseStatus(org.springframework.web.bind.annotation.ResponseStatus) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Dtos (uk.ac.bbsrc.tgac.miso.dto.Dtos)29 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)14 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)12 ModelAndView (org.springframework.web.servlet.ModelAndView)11 NotFoundException (org.springframework.security.acls.model.NotFoundException)10 GetMapping (org.springframework.web.bind.annotation.GetMapping)10 PostMapping (org.springframework.web.bind.annotation.PostMapping)8 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)8 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)7 PutMapping (org.springframework.web.bind.annotation.PutMapping)7 IOException (java.io.IOException)6 Collectors (java.util.stream.Collectors)6 Autowired (org.springframework.beans.factory.annotation.Autowired)6 Controller (org.springframework.stereotype.Controller)6 PathVariable (org.springframework.web.bind.annotation.PathVariable)6 User (com.eaglegenomics.simlims.core.User)5 List (java.util.List)5 ArrayList (java.util.ArrayList)4 Objects (java.util.Objects)4 Stream (java.util.stream.Stream)4