use of uk.ac.bbsrc.tgac.miso.core.data.GroupIdentifiable in project miso-lims by miso-lims.
the class Dtos method asDetailedDto.
private static DetailedLibraryAliquotDto asDetailedDto(DetailedLibraryAliquot from) {
DetailedLibraryAliquotDto dto = new DetailedLibraryAliquotDto();
setId(dto::setLibraryDesignCodeId, from.getLibraryDesignCode());
setBoolean(dto::setNonStandardAlias, from.isNonStandardAlias(), false);
GroupIdentifiable effective = from.getEffectiveGroupIdEntity();
if (effective != null) {
dto.setEffectiveGroupId(effective.getGroupId());
dto.setEffectiveGroupIdSample(effective.getAlias());
}
setString(dto::setGroupId, from.getGroupId());
setString(dto::setGroupDescription, from.getGroupDescription());
return dto;
}
use of uk.ac.bbsrc.tgac.miso.core.data.GroupIdentifiable in project miso-lims by miso-lims.
the class Dtos method asDetailedLibraryDto.
private static DetailedLibraryDto asDetailedLibraryDto(@Nonnull DetailedLibrary from) {
DetailedLibraryDto dto = new DetailedLibraryDto();
if (from.getLibraryDesign() != null) {
dto.setLibraryDesignId(from.getLibraryDesign().getId());
}
dto.setLibraryDesignCodeId(from.getLibraryDesignCode().getId());
dto.setPreMigrationId(from.getPreMigrationId());
dto.setArchived(from.getArchived());
dto.setNonStandardAlias(from.hasNonStandardAlias());
GroupIdentifiable effective = from.getEffectiveGroupIdEntity();
if (effective != null) {
dto.setEffectiveGroupId(effective.getGroupId());
dto.setEffectiveGroupIdSample(effective.getAlias());
}
if (from.getGroupId() != null) {
dto.setGroupId(from.getGroupId());
}
if (from.getGroupDescription() != null) {
dto.setGroupDescription(from.getGroupDescription());
}
if (from.getSample() != null) {
DetailedSample detailed = (DetailedSample) from.getSample();
if (detailed.getSubproject() != null) {
dto.setSubprojectAlias(detailed.getSubproject().getAlias());
dto.setSubprojectPriority(detailed.getSubproject().getPriority());
}
if (detailed.getIdentityAttributes() != null) {
ParentIdentityAttributes identity = detailed.getIdentityAttributes();
setString(dto::setIdentityConsentLevel, maybeGetProperty(identity.getConsentLevel(), ConsentLevel::getLabel));
}
if (detailed.getTissueAttributes() != null) {
ParentTissueAttributes tissue = detailed.getTissueAttributes();
setString(dto::setEffectiveTissueOriginAlias, tissue.getTissueOrigin().getAlias());
setString(dto::setEffectiveTissueOriginDescription, tissue.getTissueOrigin().getDescription());
setString(dto::setEffectiveTissueTypeAlias, tissue.getTissueType().getAlias());
setString(dto::setEffectiveTissueTypeDescription, tissue.getTissueType().getDescription());
}
}
return dto;
}
use of uk.ac.bbsrc.tgac.miso.core.data.GroupIdentifiable in project miso-lims by miso-lims.
the class NotificationManager method makeSampleTable.
private static ContainerTag makeSampleTable(Collection<TransferSample> transferSamples) {
boolean detailed = LimsUtils.isDetailedSample(transferSamples.iterator().next().getItem());
ContainerTag headerRow = tr(makeTh("Alias"));
if (detailed) {
headerRow = headerRow.with(makeTh("Type"), makeTh("Exernal Identifier"));
}
headerRow = headerRow.with(makeTh("