Search in sources :

Example 1 with DetailedLibraryTemplate

use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate in project miso-lims by miso-lims.

the class EditLibraryTemplateController method create.

@GetMapping("/new")
public ModelAndView create(@RequestParam(name = "projectId", required = false) Long projectId, ModelMap model) throws IOException {
    LibraryTemplate template = isDetailedSampleEnabled() ? new DetailedLibraryTemplate() : new LibraryTemplate();
    if (projectId != null) {
        Project project = projectService.get(projectId);
        if (project == null) {
            throw new ClientErrorException("No project found with ID: " + projectId);
        }
        template.getProjects().add(project);
    }
    model.put(PageMode.PROPERTY, PageMode.CREATE.getLabel());
    model.put("title", "New Library Template");
    return libraryTemplatePage(template, model);
}
Also used : Project(uk.ac.bbsrc.tgac.miso.core.data.Project) DetailedLibraryTemplate(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate) ClientErrorException(uk.ac.bbsrc.tgac.miso.webapp.controller.component.ClientErrorException) DetailedLibraryTemplate(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate) LibraryTemplate(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryTemplate)

Example 2 with DetailedLibraryTemplate

use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate in project miso-lims by miso-lims.

the class DefaultLibraryTemplateService method applyChanges.

@Override
protected void applyChanges(LibraryTemplate target, LibraryTemplate source) {
    target.setAlias(source.getAlias());
    target.setPlatformType(source.getPlatformType());
    target.setLibraryType(source.getLibraryType());
    target.setLibrarySelectionType(source.getLibrarySelectionType());
    target.setLibraryStrategyType(source.getLibraryStrategyType());
    target.setKitDescriptor(source.getKitDescriptor());
    target.setIndexFamily(source.getIndexFamily());
    target.setDefaultVolume(source.getDefaultVolume());
    target.setVolumeUnits(source.getVolumeUnits());
    applyProjectChanges(target.getProjects(), source.getProjects());
    if (target instanceof DetailedLibraryTemplate) {
        DetailedLibraryTemplate dSource = (DetailedLibraryTemplate) source;
        DetailedLibraryTemplate dTarget = (DetailedLibraryTemplate) target;
        dTarget.setLibraryDesign(dSource.getLibraryDesign());
        dTarget.setLibraryDesignCode(dSource.getLibraryDesignCode());
    }
    applyIndexChanges(target.getIndexOnes(), source.getIndexOnes());
    applyIndexChanges(target.getIndexTwos(), source.getIndexTwos());
}
Also used : DetailedLibraryTemplate(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate)

Example 3 with DetailedLibraryTemplate

use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate in project miso-lims by miso-lims.

the class Dtos method toDetailedLibraryTemplate.

public static DetailedLibraryTemplate toDetailedLibraryTemplate(DetailedLibraryTemplateDto from) {
    if (from == null)
        return null;
    DetailedLibraryTemplate to = new DetailedLibraryTemplate();
    setObject(to::setLibraryDesign, LibraryDesign::new, from.getDesignId());
    setObject(to::setLibraryDesignCode, LibraryDesignCode::new, from.getDesignCodeId());
    return to;
}
Also used : LibraryDesignCode(uk.ac.bbsrc.tgac.miso.core.data.LibraryDesignCode) LibraryDesign(uk.ac.bbsrc.tgac.miso.core.data.LibraryDesign) DetailedLibraryTemplate(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate) IonTorrentRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto) QcHierarchyNodeDto(uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto) RunPositionDto(uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto) PacBioRunDto(uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto) Ls454RunDto(uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto) IlluminaNotificationDto(ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto) OxfordNanoporeRunDto(uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto) IlluminaRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto) NotificationDto(ca.on.oicr.gsi.runscanner.dto.NotificationDto) OxfordNanoporeNotificationDto(ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) SolidRunDto(uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto) OrderAliquotDto(uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)

Aggregations

DetailedLibraryTemplate (uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryTemplate)3 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)1 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)1 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)1 LibraryDesign (uk.ac.bbsrc.tgac.miso.core.data.LibraryDesign)1 LibraryDesignCode (uk.ac.bbsrc.tgac.miso.core.data.LibraryDesignCode)1 Project (uk.ac.bbsrc.tgac.miso.core.data.Project)1 LibraryTemplate (uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryTemplate)1 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)1 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)1 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)1 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)1 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)1 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)1 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)1 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)1 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)1 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)1 ClientErrorException (uk.ac.bbsrc.tgac.miso.webapp.controller.component.ClientErrorException)1