Skip to content
Snippets Groups Projects
Commit 3b54e66b authored by tpylak's avatar tpylak
Browse files

fix: keep supporting legacy microscopy types

SVN: 19982
parent 70361ab9
No related branches found
No related tags found
No related merge requests found
...@@ -1005,7 +1005,7 @@ public class DssServiceRpcScreening extends AbstractDssServiceRpc<IDssServiceRpc ...@@ -1005,7 +1005,7 @@ public class DssServiceRpcScreening extends AbstractDssServiceRpc<IDssServiceRpc
String datasetTypeCode = dataset.getDataSetType().getCode(); String datasetTypeCode = dataset.getDataSetType().getCode();
return datasetTypeCode.matches(ScreeningConstants.ANY_HCS_IMAGE_DATASET_TYPE_PATTERN) return datasetTypeCode.matches(ScreeningConstants.ANY_HCS_IMAGE_DATASET_TYPE_PATTERN)
|| datasetTypeCode || datasetTypeCode
.matches(ScreeningConstants.MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN); .matches(ScreeningConstants.ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN);
} }
private List<ImgFeatureDefDTO> getFeatureDefinitions(IDatasetIdentifier identifier) private List<ImgFeatureDefDTO> getFeatureDefinitions(IDatasetIdentifier identifier)
......
...@@ -110,19 +110,16 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree ...@@ -110,19 +110,16 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree
types.add(ScreeningConstants.MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN); types.add(ScreeningConstants.MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN);
} else if (entityKind == EntityKind.MATERIAL) } else if (entityKind == EntityKind.MATERIAL)
{ {
// Should we do this for materials? (* pattern)
types.add(ScreeningConstants.GENE_PLUGIN_TYPE_CODE); types.add(ScreeningConstants.GENE_PLUGIN_TYPE_CODE);
types.add(ScreeningConstants.SIRNA_PLUGIN_TYPE_NAME); types.add(ScreeningConstants.SIRNA_PLUGIN_TYPE_NAME);
// NOTE: it would be better to fetch all the material types from the db, but we cannot
// do this - this code is executed before the user logs in.
// Another way not to hardcode material types would be to allow the plugin to be used
// for all material types.
types.add("CONTROL"); types.add("CONTROL");
types.add("COMPOUND"); types.add("COMPOUND");
} else if (entityKind == EntityKind.DATA_SET) } else if (entityKind == EntityKind.DATA_SET)
{ {
types.add(ScreeningConstants.ANY_HCS_IMAGE_DATASET_TYPE_PATTERN); types.add(ScreeningConstants.ANY_HCS_IMAGE_DATASET_TYPE_PATTERN);
types.add(ScreeningConstants.MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN); types.add(ScreeningConstants.ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN);
} }
return types; return types;
} }
...@@ -250,7 +247,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree ...@@ -250,7 +247,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree
{ {
return createHCSImageDatasetTabItemFactory(entity); return createHCSImageDatasetTabItemFactory(entity);
} else if (datasetTypeCode } else if (datasetTypeCode
.matches(ScreeningConstants.MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN)) .matches(ScreeningConstants.ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN))
{ {
return createMicroscopyImageDatasetTabItemFactory(entity); return createMicroscopyImageDatasetTabItemFactory(entity);
} else } else
...@@ -362,7 +359,8 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree ...@@ -362,7 +359,8 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree
{ {
throw new UserFailureException("Cannot browse objects of the " throw new UserFailureException("Cannot browse objects of the "
+ ScreeningConstants.LIBRARY_PLUGIN_TYPE_CODE + " type."); + ScreeningConstants.LIBRARY_PLUGIN_TYPE_CODE + " type.");
} else if (sampleTypeCode.matches(ScreeningConstants.MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN)) } else if (sampleTypeCode
.matches(ScreeningConstants.MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN))
{ {
return createImageSampleViewer(entity, false); return createImageSampleViewer(entity, false);
} else } else
......
...@@ -75,22 +75,21 @@ public class ScreeningConstants ...@@ -75,22 +75,21 @@ public class ScreeningConstants
// --- Microscopy dataset types // --- Microscopy dataset types
public static final String ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN = ".*IMG.*"; private static final String MICROSCOPY_IMAGE_TYPE_PATTERN = ".*IMG.*";
// type of the dataset which stores microscopy images // type of the dataset which stores microscopy images
public static final String MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN = "MICROSCOPY_IMAGE|"// legacy public static final String ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN = "MICROSCOPY_IMAGE|"// legacy
+ ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN; + MICROSCOPY_IMAGE_TYPE_PATTERN;
// type of the dataset which stores image overlays // type of the dataset which stores image overlays
public static final String MICROSCOPY_SEGMENTATION_IMAGE_DATASET_TYPE_PATTERN = public static final String MICROSCOPY_SEGMENTATION_IMAGE_DATASET_TYPE_PATTERN =
ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN + ".*OVERLAY.*|" + // legacy MICROSCOPY_IMAGE_TYPE_PATTERN + ".*OVERLAY.*|" + // legacy
ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN + ".*SEGMENTATION.*"; MICROSCOPY_IMAGE_TYPE_PATTERN + ".*SEGMENTATION.*";
// --- Microscopy sample types // --- Microscopy sample types
// the sample is considered to be a microscopy sample if its type code contains this string // the sample is considered to be a microscopy sample if its type code contains this string
public static final String MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN = public static final String MICROSCOPY_IMAGE_SAMPLE_TYPE_PATTERN = MICROSCOPY_IMAGE_TYPE_PATTERN;
ANY_MICROSCOPY_IMAGE_DATASET_TYPE_PATTERN;
// --- Default dataset type codes for screening datasets // --- Default dataset type codes for screening datasets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment