From 230707c6879c2a9f8f1578d7ff8d5ed2611c9613 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Sat, 24 Apr 2010 14:27:53 +0000 Subject: [PATCH] LMS-1491 screening api: fix feature datasets listing SVN: 15623 --- .../plugin/screening/server/logic/ScreeningApiImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java index b67b2c625aa..62dbfac6490 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java @@ -83,10 +83,11 @@ public class ScreeningApiImpl List<FeatureVectorDatasetReference> result = new ArrayList<FeatureVectorDatasetReference>(); List<ImageDatasetReference> imageDatasets = listImageDatasets(plates); ISampleBO sampleBO = businessObjectFactory.createSampleBO(session); + Set<ExperimentPE> visitedExperiments = new HashSet<ExperimentPE>(); for (PlateIdentifier plate : plates) { ExperimentPE experiment = tryGetExperiment(sampleBO, plate); - if (experiment != null) + if (experiment != null && visitedExperiments.contains(experiment) == false) { List<ExternalDataPE> datasets = daoFactory.getExternalDataDAO().listExternalData(experiment); @@ -95,6 +96,7 @@ public class ScreeningApiImpl ScreeningUtils.filterDatasetsByType(childrenDatasets, ScreeningConstants.IMAGE_ANALYSIS_DATASET_TYPE); result.addAll(asFeatureVectorDatasets(featureVectorDatasets)); + visitedExperiments.add(experiment); } } return result; -- GitLab