diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java index 5620e784013169ef5e3ae6ed6c3578825b803b6c..2980e7dcda0d5f2243c227cf876a1b717d58a660 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java @@ -24,7 +24,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess.db; public final class DatabaseVersionHolder { /** Current version of the database. */ - private static final String DATABASE_VERSION = "055";// S87 + private static final String DATABASE_VERSION = "056";// S89 private DatabaseVersionHolder() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java index 0fc24bfc278f6c4abbbb428bbd8c92baa9536ca4..1e268f159431fc1b87481bfa11ba8e6d35060cf6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java @@ -126,4 +126,11 @@ public class Material extends CodeWithRegistration<Material> implements { return getIdentifier(); } + + @Override + public String toString() + { + return getIdentifier(); + } + } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java index 1ebed662693faca021aee0289af4eef6020d6c79..af303183b0b0e78ff54d2daf1e71d641e51e388f 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/Dict.java @@ -36,6 +36,8 @@ public final class Dict extends ch.systemsx.cisd.openbis.generic.client.web.clie public static final String WELL_CONTENT_MATERIAL_TYPE = "WELL_CONTENT_MATERIAL_TYPE"; + public static final String WELL_CONTENT_PROPERTIES = "WELL_CONTENT_PROPERTIES"; + public static final String PLATE = "PLATE"; public static final String WELL = "WELL"; diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateMaterialReviewer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateMaterialReviewer.java index bed0c97cd2b2c244b49312020651a791968d525b..31fc626feb63cb415da54c3232e1be6cd4025b62 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateMaterialReviewer.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateMaterialReviewer.java @@ -56,8 +56,8 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.IEntityInformationHolder; import ch.systemsx.cisd.openbis.generic.shared.basic.IEntityInformationHolderWithIdentifier; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseModificationKind; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityReference; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ClientPluginFactory; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.DisplayTypeIDGenerator; @@ -289,7 +289,7 @@ public class PlateMaterialReviewer extends AbstractSimpleBrowserGrid<WellContent { public void handle(WellContent wellContent, boolean specialKeyPressed) { - EntityReference contentMaterial = wellContent.getMaterialContent(); + Material contentMaterial = wellContent.getMaterialContent(); ExperimentReference experiment = wellContent.getExperiment(); ExperimentSearchCriteria experimentCriteria = ExperimentSearchCriteria.createExperiment(experiment.getId(), @@ -353,6 +353,7 @@ public class PlateMaterialReviewer extends AbstractSimpleBrowserGrid<WellContent ColumnDefsAndConfigs<WellContent> schema = super.createColumnsDefinition(); setLinksRenderer(schema, new PlateMaterialReviewerColDefKind[] { PlateMaterialReviewerColDefKind.WELL_CONTENT_MATERIAL, + PlateMaterialReviewerColDefKind.WELL_CONTENT_MATERIAL, PlateMaterialReviewerColDefKind.PLATE, PlateMaterialReviewerColDefKind.WELL, PlateMaterialReviewerColDefKind.DATASET }); setImageRenderer(schema); diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ui/columns/specific/PlateMaterialReviewerColDefKind.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ui/columns/specific/PlateMaterialReviewerColDefKind.java index 93365fe6143398720c045d767b551ecc8877979a..c9bb8128f5e213eb124fb242509a3028ad6d8693 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ui/columns/specific/PlateMaterialReviewerColDefKind.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ui/columns/specific/PlateMaterialReviewerColDefKind.java @@ -19,6 +19,8 @@ package ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application. import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.AbstractColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.LinkExtractor; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.DatasetImagesReference; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellContent; @@ -57,6 +59,30 @@ public enum PlateMaterialReviewerColDefKind implements IColumnDefinitionKind<Wel } }), + WELL_CONTENT_PROPERTIES(new AbstractColumnDefinitionKind<WellContent>( + Dict.WELL_CONTENT_PROPERTIES, true) + { + @Override + public String tryGetValue(WellContent entity) + { + + Material material = entity.getMaterialContent(); + String separator = " <br/> "; + StringBuilder sb = new StringBuilder(); + for (IEntityProperty p : material.getProperties()) + { + if (sb.length() != 0) + { + sb.append(separator); + } + sb.append(p.getPropertyType().getCode()); + sb.append(": "); + sb.append(p.tryGetAsString()); + } + return sb.toString(); + } + }), + EXPERIMENT(new AbstractColumnDefinitionKind<WellContent>(Dict.EXPERIMENT, true) { @Override diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js index 6f7cf905c6b4e53d2273bd3533d4d42bc06de036..10038c31c451cb60aa0684de367e701e92e78e09 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/screening-dictionary.js @@ -44,6 +44,7 @@ var screening = { WELL_CONTENT_MATERIAL: "Content", WELL_CONTENT_MATERIAL_TYPE: "Content Type", + WELL_CONTENT_PROPERTIES: "Content Properties", PLATE_MATERIAL_REVIEWER_TITLE: "Wells Reviewing Panel", PLATE_MATERIAL_REVIEWER_HELP_INFO: "Specify a list of material codes contained in the wells (e.g. gene symbols, control names or compound names). Press the search button. The content of all wells in this experiment will be checked and wells containing specified materials will be shown.", PLATE_MATERIAL_REVIEWER_SPECIFY_METERIAL_ITEMS: "List of material codes contained in the wells (e.g. gene symbols, control names or compound names) separated by commas (\",\") or one code per line.", diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java index 47f29b4b1e44e9b11ec6dead39c37946772900eb..6030713c3938da2c8fcb48958038731f3884a215 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java @@ -36,6 +36,7 @@ import ch.rinn.restrictions.Friend; import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.openbis.generic.server.business.bo.common.DatabaseContextUtils; import ch.systemsx.cisd.openbis.generic.server.business.bo.datasetlister.IDatasetLister; +import ch.systemsx.cisd.openbis.generic.server.business.bo.materiallister.IMaterialLister; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DetailedSearchCriteria; @@ -44,7 +45,9 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DetailedSearchField; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityReference; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialAttributeSearchFieldKind; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SearchCriteriaConnection; import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE; @@ -386,17 +389,30 @@ public class GenePlateLocationsLoader wellLocations.add(convert(location)); } sortByMaterialName(wellLocations); + IMaterialLister materialLister = businessObjectFactory.createMaterialLister(session); + List<Material> containedMaterials = getMaterials(wellLocations); + materialLister.enrichWithProperties(containedMaterials); return wellLocations; } + private List<Material> getMaterials(List<WellContent> wellLocations) + { + List<Material> materials = new ArrayList<Material>(); + for (WellContent wc : wellLocations) + { + materials.add(wc.getMaterialContent()); + } + return materials; + } + private static void sortByMaterialName(List<? extends WellContent> wellLocations) { Collections.sort(wellLocations, new Comparator<WellContent>() { public int compare(WellContent o1, WellContent o2) { - EntityReference m1 = o1.getMaterialContent(); - EntityReference m2 = o2.getMaterialContent(); + Material m1 = o1.getMaterialContent(); + Material m2 = o2.getMaterialContent(); return m1.getCode().compareTo(m2.getCode()); } }); @@ -412,9 +428,12 @@ public class GenePlateLocationsLoader EntityReference plate = new EntityReference(loc.plate_id, loc.plate_code, loc.plate_type_code, EntityKind.SAMPLE, loc.plate_perm_id); - EntityReference materialContent = - new EntityReference(loc.material_content_id, loc.material_content_code, - loc.material_content_type_code, EntityKind.MATERIAL, null); + Material materialContent = new Material(); + materialContent.setCode(loc.material_content_code); + materialContent.setId(loc.material_content_id); + MaterialType type = new MaterialType(); + type.setCode(loc.material_content_type_code); + materialContent.setMaterialType(type); return new WellContent(location, well, plate, convertExperiment(loc), materialContent); } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellContent.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellContent.java index 229f3468fb798eb95e2a484138d86528c9662dba..d5ae969848daf776b3671f8adfb7843d84cdc2e2 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellContent.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellContent.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto; import com.google.gwt.user.client.rpc.IsSerializable; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityReference; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; /** * Describes the well and its location on the plate. Contains pointers to well and plate samples, a @@ -37,7 +38,7 @@ public class WellContent implements IsSerializable private ExperimentReference experiment; // a pointer to a material which was being searched for inside a well - private EntityReference materialContent; + private Material materialContent; // contains only images for this well, null if no images have been acquired private DatasetImagesReference imagesOrNull; @@ -49,7 +50,7 @@ public class WellContent implements IsSerializable } public WellContent(WellLocation locationOrNull, EntityReference well, EntityReference plate, - ExperimentReference experiment, EntityReference materialContent) + ExperimentReference experiment, Material materialContent) { this.locationOrNull = locationOrNull; this.well = well; @@ -73,7 +74,7 @@ public class WellContent implements IsSerializable return plate; } - public EntityReference getMaterialContent() + public Material getMaterialContent() { return materialContent; }