Dtos { public static TissueOrigin to(TissueOriginDto from) { TissueOrigin to = new TissueOriginImpl(); if (from.getId() != null) to.setId(from.getId()); setString(to::setAlias, from.getAlias()); setString(to::setDescription, from.getDescription()); return to; }  static TissueOriginDto asDto(@Nonnull TissueOrigin from); static Set<TissueOriginDto> asTissueOriginDtos(@Nonnull Collection<TissueOrigin> from); static TissueOrigin to(TissueOriginDto from); static TissueTypeDto asDto(@Nonnull TissueType from); static Set<TissueTypeDto> asTissueTypeDtos(@Nonnull Set<TissueType> from); static TissueType to(@Nonnull TissueTypeDto from); static SubprojectDto asDto(@Nonnull Subproject from); static Set<SubprojectDto> asSubprojectDtos(@Nonnull Collection<Subproject> from); static Subproject to(@Nonnull SubprojectDto from); static SampleClassDto asDto(@Nonnull SampleClass from); static Set<SampleClassDto> asSampleClassDtos(@Nonnull Set<SampleClass> from); static SampleClass to(@Nonnull SampleClassDto from); static DetailedQcStatusDto asDto(@Nonnull DetailedQcStatus from); static Set<DetailedQcStatusDto> asDetailedQcStatusDtos(@Nonnull Set<DetailedQcStatus> from); static DetailedQcStatus to(@Nonnull DetailedQcStatusDto from); static SampleDto asMinimalDto(@Nonnull Sample from); static SampleDto asDto(@Nonnull Sample from, boolean includeBoxPositions); static SampleDto asDto(@Nonnull Sample from, boolean includeBoxPositions, int libraryCount); static List<SampleDto> asSampleDtos(@Nonnull Collection<Sample> from, boolean fullIncludingBoxPositions); static TissueMaterialDto asDto(@Nonnull TissueMaterial from); static Set<TissueMaterialDto> asTissueMaterialDtos(@Nonnull Collection<TissueMaterial> from); static TissueMaterial to(@Nonnull TissueMaterialDto from); static SamplePurposeDto asDto(@Nonnull SamplePurpose from); static Set<SamplePurposeDto> asSamplePurposeDtos(@Nonnull Collection<SamplePurpose> from); static SamplePurpose to(@Nonnull SamplePurposeDto from); static SampleGroupDto asDto(@Nonnull SampleGroupId from); static Set<SampleGroupDto> asSampleGroupDtos(@Nonnull Set<SampleGroupId> from); static SampleGroupId to(@Nonnull SampleGroupDto from); static Sample to(@Nonnull SampleDto from); static SampleNumberPerProjectDto asDto(@Nonnull SampleNumberPerProject from); static Set<SampleNumberPerProjectDto> asSampleNumberPerProjectDtos(@Nonnull Set<SampleNumberPerProject> from); static SampleNumberPerProject to(@Nonnull SampleNumberPerProjectDto from); static SampleValidRelationshipDto asDto(@Nonnull SampleValidRelationship from); static Set<SampleValidRelationshipDto> asSampleValidRelationshipDtos(@Nonnull Set<SampleValidRelationship> from); static SampleValidRelationship to(@Nonnull SampleValidRelationshipDto from); static InstituteDto asDto(@Nonnull Institute from); static Set<InstituteDto> asInstituteDtos(@Nonnull Collection<Institute> from); static Institute to(@Nonnull InstituteDto from); static LabDto asDto(@Nonnull Lab from); static Set<LabDto> asLabDtos(@Nonnull Collection<Lab> from); static Lab to(@Nonnull LabDto from); static KitDescriptorDto asDto(@Nonnull KitDescriptor from); static Set<KitDescriptorDto> asKitDescriptorDtos(@Nonnull Collection<KitDescriptor> from); static KitDescriptor to(@Nonnull KitDescriptorDto from); static LibraryDesignCodeDto asDto(@Nonnull LibraryDesignCode from); static LibraryDesignCode to(@Nonnull LibraryDesignCodeDto from); static DetailedLibrary toDetailedLibrary(DetailedLibraryDto from); static SequencingOrderDto asDto(@Nonnull SequencingOrder from, IndexChecker indexChecker); static Set<SequencingOrderDto> asSequencingOrderDtos(@Nonnull Collection<SequencingOrder> from, IndexChecker indexChecker); static SequencingOrder to(@Nonnull SequencingOrderDto from); static SequencingParametersDto asDto(@Nonnull SequencingParameters from); static SequencingParameters to(@Nonnull SequencingParametersDto from); static List<SequencingParametersDto> asSequencingParametersDtos(@Nonnull Collection<SequencingParameters> from); static LibraryDto asDto(@Nonnull Library from, boolean includeBoxPositions); static Library to(@Nonnull LibraryDto from); static List<BoxDto> asBoxDtosWithPositions(@Nonnull Collection<Box> boxes); static BoxDto asDto(@Nonnull Box from, boolean includePositions); static BoxDto asDtoWithBoxables(@Nonnull Box from, @Nonnull Collection<BoxableView> boxables); static List<BoxableDto> asBoxableDtos(@Nonnull List<BoxableView> boxables); static BoxableDto asDto(@Nonnull BoxableView from); static Box to(@Nonnull BoxDto from); static LibraryAliquotDto asDto(@Nonnull LibraryAliquot from, boolean includeBoxPositions); static LibraryAliquotDto asDto(@Nonnull PoolableElementView from); static LibraryAliquot to(@Nonnull LibraryAliquotDto from); static PoolDto asDto(@Nonnull Pool from, boolean includeContents, boolean includeBoxPositions, IndexChecker indexChecker); static PoolDto asDto(@Nonnull ListPoolView from, IndexChecker indexChecker); static RunDto asDto(@Nonnull Run from); static RunDto asDto(@Nonnull Run from, boolean includeContainers, boolean includeContainerPartitions,
      boolean includePoolContents); static List<RunDto> asRunDtos(Collection<Run> runSubset); static Run to(@Nonnull RunDto dto); static ContainerDto asDto(@Nonnull SequencerPartitionContainer from, IndexChecker indexChecker); static ContainerDto asDto(@Nonnull SequencerPartitionContainer from, boolean includePartitions, boolean includePoolContents,
      IndexChecker indexChecker); static List<ContainerDto> asContainerDtos(@Nonnull Collection<SequencerPartitionContainer> containerSubset,
      boolean includeContainerPartitions, boolean includePoolContents); static SequencerPartitionContainer to(@Nonnull ContainerDto from); static RunPositionDto asDto(@Nonnull RunPosition from); static SequencingContainerModelDto asDto(@Nonnull SequencingContainerModel from); static SequencingContainerModel to(@Nonnull SequencingContainerModelDto from); static List<PartitionDto> asPartitionDtos(@Nonnull Collection<Partition> partitionSubset, boolean includePoolContents,
      IndexChecker indexChecker); static List<SequencingContainerModelDto> asDtos(@Nonnull Collection<SequencingContainerModel> models); static Set<QcTypeDto> asQcTypeDtos(@Nonnull Set<QcType> from); static QcTypeDto asDto(@Nonnull QcType from); static QcType to(@Nonnull QcTypeDto from); static QcDto asDto(@Nonnull QC from); static QC to(@Nonnull QcDto dto); static List<QcTypeDto> asQcTypeDtos(@Nonnull Collection<QcType> qcTypeSubset); static SequencingOrderCompletionDto asDto(@Nonnull SequencingOrderSummaryView from, IndexChecker indexChecker); static InstrumentModelDto asDto(@Nonnull InstrumentModel from); static InstrumentModel to(@Nonnull InstrumentModelDto from); static InstrumentPositionDto asDto(@Nonnull InstrumentPosition from); static InstrumentPosition to(@Nonnull InstrumentPositionDto from); static ProjectDto asDto(@Nonnull Project from); static List<ProjectDto> asProjectDtos(@Nonnull Collection<Project> from); static Project to(@Nonnull ProjectDto dto); static LibraryDesignDto asDto(@Nonnull LibraryDesign from); static LibraryDesign to(@Nonnull LibraryDesignDto from); static LibraryTypeDto asDto(@Nonnull LibraryType from); static LibraryType to(@Nonnull LibraryTypeDto from); static LibrarySelectionTypeDto asDto(@Nonnull LibrarySelectionType from); static LibrarySelectionType to(@Nonnull LibrarySelectionTypeDto from); static LibraryStrategyTypeDto asDto(@Nonnull LibraryStrategyType from); static LibraryStrategyType to(@Nonnull LibraryStrategyTypeDto from); static IndexDto asDto(@Nonnull Index from); static IndexDto asDto(@Nonnull Index from, boolean includeFamily); static Index to(@Nonnull IndexDto from); static IndexFamilyDto asDto(@Nonnull IndexFamily from); static IndexFamily to(@Nonnull IndexFamilyDto from); static StainDto asDto(@Nonnull Stain from); static Stain to(@Nonnull StainDto from); static Run to(@Nonnull NotificationDto from); static TargetedSequencingDto asDto(@Nonnull TargetedSequencing from); static Set<TargetedSequencingDto> asTargetedSequencingDtos(Collection<TargetedSequencing> from); static TargetedSequencing to(@Nonnull TargetedSequencingDto dto); static Pool to(@Nonnull PoolDto dto); static PrinterBackendDto asDto(@Nonnull Backend from); static PrinterDriverDto asDto(@Nonnull Driver from); static PrinterDto asDto(@Nonnull Printer from); static Printer to(@Nonnull PrinterDto dto); static StudyDto asDto(@Nonnull Study from); static Study to(@Nonnull StudyDto dto); static StudyTypeDto asDto(@Nonnull StudyType from); static StudyType to(@Nonnull StudyTypeDto from); static ChangeLogDto asDto(@Nonnull ChangeLog from); static UserDto asDto(@Nonnull User from); static User to(@Nonnull UserDto dto); static GroupDto asDto(@Nonnull Group from); static Group to(@Nonnull GroupDto dto); static InstrumentDto asDto(@Nonnull Instrument from); static Instrument to(@Nonnull InstrumentDto dto); static ReferenceGenomeDto asDto(@Nonnull ReferenceGenome from); static ReferenceGenome to(@Nonnull ReferenceGenomeDto from); static PartitionDto asDto(@Nonnull Partition from, IndexChecker indexChecker); static PartitionDto asDto(@Nonnull Partition from, boolean includePoolContents, IndexChecker indexChecker); static PartitionQCTypeDto asDto(@Nonnull PartitionQCType from); static PartitionQCType to(@Nonnull PartitionQCTypeDto from); static ExperimentDto asDto(@Nonnull Experiment from); static Experiment to(@Nonnull ExperimentDto dto); static KitConsumableDto asDto(@Nonnull Kit from); static Kit to(@Nonnull KitConsumableDto dto); static Partition to(@Nonnull PartitionDto dto); static SubmissionDto asDto(@Nonnull Submission from); static Submission to(@Nonnull SubmissionDto dto); static ArrayDto asDto(@Nonnull Array from); static Array to(@Nonnull ArrayDto from); static ArrayRunDto asDto(@Nonnull ArrayRun from); static List<ArrayDto> asArrayDtos(Collection<Array> arrays); static ArrayModelDto asDto(@Nonnull ArrayModel from); static ArrayModel to(@Nonnull ArrayModelDto from); static final ArrayRun to(@Nonnull ArrayRunDto from); static InstrumentStatusDto asDto(@Nonnull InstrumentStatus from); static SpreadsheetFormatDto asDto(@Nonnull SpreadSheetFormat from); static SpreadsheetDto asDto(@Nonnull Spreadsheet<?> from); static SampleSpreadSheetDto asDto(@Nonnull SampleSpreadSheets from); static DeletionDto asDto(@Nonnull Deletion from); static BarcodableDto asDto(@Nonnull BarcodableView from); static LibraryTemplateDto asDto(@Nonnull LibraryTemplate from); static List<LibraryTemplateDto> asLibraryTemplateDtos(@Nonnull Collection<LibraryTemplate> from); static WorkflowNameDto asDto(@Nonnull WorkflowName from); static WorkflowStateDto asDto(@Nonnull Workflow from); static WorkflowStateDto asDto(@Nonnull Workflow from, int stepNumber); static StorageLocationDto asDto(@Nonnull StorageLocation from, boolean includeChildLocations, boolean recursive); static StorageLocation to(@Nonnull StorageLocationDto from); static StorageLocationMapDto asDto(@Nonnull StorageLocationMap from); static StorageLocationMap to(@Nonnull StorageLocationMapDto from); static QcTargetDto asDto(@Nonnull QcTarget from); static IssueDto asDto(@Nonnull Issue from); static AttachmentDto asDto(@Nonnull FileAttachment from); static ConcentrationUnitDto asDto(ConcentrationUnit from); static ServiceRecordDto asDto(@Nonnull ServiceRecord from); static ServiceRecord to(@Nonnull ServiceRecordDto dto); static VolumeUnitDto asDto(VolumeUnit from); static WorksetDto asDto(@Nonnull Workset from); static Workset to(@Nonnull WorksetDto from); static LibraryTemplate to(@Nonnull LibraryTemplateDto from); static DetailedLibraryTemplate toDetailedLibraryTemplate(DetailedLibraryTemplateDto from); static LibrarySpikeInDto asDto(@Nonnull LibrarySpikeIn from); static LibrarySpikeIn to(@Nonnull LibrarySpikeInDto from); static AttachmentCategoryDto asDto(@Nonnull AttachmentCategory from); static AttachmentCategory to(@Nonnull AttachmentCategoryDto from); static PoreVersionDto asDto(@Nonnull PoreVersion from); static SampleTypeDto asDto(@Nonnull SampleType from); static SampleType to(@Nonnull SampleTypeDto from); static StainCategoryDto asDto(@Nonnull StainCategory from); static StainCategory to(@Nonnull StainCategoryDto from); static BoxUseDto asDto(@Nonnull BoxUse from); static BoxUse to(@Nonnull BoxUseDto from); static BoxSizeDto asDto(@Nonnull BoxSize from); static BoxSize to(@Nonnull BoxSizeDto from); static PoolOrderDto asDto(@Nonnull PoolOrder from); static PoolOrderDto asDto(@Nonnull PoolOrder from, IndexChecker indexChecker); static PoolOrder to(@Nonnull PoolOrderDto from); static RunPurposeDto asDto(@Nonnull RunPurpose from); static RunPurpose to(@Nonnull RunPurposeDto from); static TissuePieceTypeDto asDto(@Nonnull TissuePieceType from); static TissuePieceType to(@Nonnull TissuePieceTypeDto from); static TransferDto asDto(@Nonnull Transfer from); static Transfer to(@Nonnull TransferDto from); static ListTransferViewDto asDto(@Nonnull ListTransferView from); static RunPartitionAliquotDto asDto(@Nonnull RunPartitionAliquot from); static RunPartitionAliquot to(@Nonnull RunPartitionAliquotDto from); static WorkstationDto asDto(@Nonnull Workstation from); static Workstation to(@Nonnull WorkstationDto from); static ListWorksetViewDto asDto(@Nonnull ListWorksetView from); static SequencingControlTypeDto asDto(@Nonnull SequencingControlType from); static SequencingControlType to(@Nonnull SequencingControlTypeDto from); static ListContainerViewDto asDto(@Nonnull ListContainerView from); static ScientificNameDto asDto(@Nonnull ScientificName from); static ScientificName to(@Nonnull ScientificNameDto from); static SopDto asDto(@Nonnull Sop from); static Sop to(@Nonnull SopDto from); static LibraryBatchDto asDto(@Nonnull LibraryBatch from); static PlatformType getMisoPlatformTypeFromRunscanner(@Nonnull ca.on.oicr.gsi.runscanner.dto.type.Platform rsType); static HealthType getMisoHealthTypeFromRunscanner(@Nonnull ca.on.oicr.gsi.runscanner.dto.type.HealthType rsType); static IlluminaChemistry getMisoIlluminaChemistryFromRunscanner(
      @Nonnull ca.on.oicr.gsi.runscanner.dto.type.IlluminaChemistry rsType);  }
@Test public void testConvertToUtilDate_Illumina() throws ParseException { NotificationDto dto = fullyPopulatedIlluminaNotificationDto("RUN_B"); Run run = Dtos.to(dto); assertThat(DateTimeFormatter.ISO_LOCAL_DATE.withZone(ZoneId.systemDefault()).format(dto.getStartDate()), is(LimsUtils.formatDate(run.getStartDate()))); }
@Test public void testConvertToUtilDate_PacBio() throws ParseException { NotificationDto dto = fullyPopulatedPacBioNotificationDto("RUN_B"); Run run = Dtos.to(dto); assertThat(DateTimeFormatter.ISO_LOCAL_DATE.withZone(ZoneId.systemDefault()).format(dto.getStartDate()), is(LimsUtils.formatDate(run.getStartDate()))); }