Search in sources :

Example 1 with WorksetCategory

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

the class Dtos method toWorksetCategory.

public static WorksetCategory toWorksetCategory(SimpleAliasableDto from) {
    WorksetCategory to = new WorksetCategory();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    return to;
}
Also used : WorksetCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory) 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)

Example 2 with WorksetCategory

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

the class Dtos method to.

public static Workset to(@Nonnull WorksetDto from) {
    Workset workset = new Workset();
    setLong(workset::setId, from.getId(), false);
    setString(workset::setAlias, from.getAlias());
    setString(workset::setDescription, from.getDescription());
    setObject(workset::setCategory, WorksetCategory::new, from.getCategoryId());
    setObject(workset::setStage, WorksetStage::new, from.getStageId());
    setWorksetItems(workset::setWorksetSamples, from.getSampleIds(), WorksetSample::new, SampleImpl::new);
    setWorksetItems(workset::setWorksetLibraries, from.getLibraryIds(), WorksetLibrary::new, LibraryImpl::new);
    setWorksetItems(workset::setWorksetLibraryAliquots, from.getLibraryAliquotIds(), WorksetLibraryAliquot::new, LibraryAliquot::new);
    return workset;
}
Also used : WorksetStage(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetStage) WorksetSample(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetSample) Workset(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.Workset) WorksetLibrary(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetLibrary) WorksetLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetLibraryAliquot) WorksetCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory) LibraryImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryImpl) DetailedLibraryImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl) TransferLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.transfer.TransferLibraryAliquot) WorksetLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetLibraryAliquot) OrderLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.OrderLibraryAliquot) DetailedLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryAliquot) LibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryAliquot) SampleImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleImpl) DetailedSampleImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedSampleImpl)

Example 3 with WorksetCategory

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

the class HibernateWorksetCategoryDaoIT method getCreateItem.

@Override
public WorksetCategory getCreateItem() {
    WorksetCategory category = new WorksetCategory();
    category.setAlias("Category C");
    return category;
}
Also used : WorksetCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory)

Example 4 with WorksetCategory

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

the class ListWorksetsController method listWorksets.

@RequestMapping("/worksets")
public ModelAndView listWorksets(ModelMap model) throws IOException {
    Stream<String> tabs = Stream.of(Workset.ReservedWord.MINE.getText(), Workset.ReservedWord.ALL.getText());
    List<WorksetCategory> categories = worksetCategoryService.list();
    if (!categories.isEmpty()) {
        tabs = Stream.concat(tabs, categories.stream().map(WorksetCategory::getAlias).sorted());
        tabs = Stream.concat(tabs, Stream.of(Workset.ReservedWord.UNCATEGORIZED.getText()));
    }
    return new TabbedListItemsPage("workset", "category", tabs, (t1, t2) -> 1, Function.identity(), String::toLowerCase).list(model);
}
Also used : Workset(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.Workset) Autowired(org.springframework.beans.factory.annotation.Autowired) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) WorksetCategoryService(uk.ac.bbsrc.tgac.miso.core.service.WorksetCategoryService) IOException(java.io.IOException) Controller(org.springframework.stereotype.Controller) Function(java.util.function.Function) ModelMap(org.springframework.ui.ModelMap) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) Stream(java.util.stream.Stream) ModelAttribute(org.springframework.web.bind.annotation.ModelAttribute) TabbedListItemsPage(uk.ac.bbsrc.tgac.miso.webapp.util.TabbedListItemsPage) WorksetCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory) WorksetCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory) TabbedListItemsPage(uk.ac.bbsrc.tgac.miso.webapp.util.TabbedListItemsPage) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

WorksetCategory (uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetCategory)4 Workset (uk.ac.bbsrc.tgac.miso.core.data.impl.workset.Workset)2 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 IOException (java.io.IOException)1 List (java.util.List)1 Function (java.util.function.Function)1 Stream (java.util.stream.Stream)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 Controller (org.springframework.stereotype.Controller)1 ModelMap (org.springframework.ui.ModelMap)1 ModelAttribute (org.springframework.web.bind.annotation.ModelAttribute)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1 DetailedLibraryAliquot (uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryAliquot)1 DetailedLibraryImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl)1 DetailedSampleImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedSampleImpl)1 LibraryAliquot (uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryAliquot)1 LibraryImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryImpl)1