Skip to content
Snippets Groups Projects
Commit 5eaef346 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

some columns are marked as deprecated

parent d04da2a3
No related branches found
No related tags found
2 merge requests!805Merge 13.1.0 beta.1,!801Resolve "Overlay data columns - review"
Pipeline #10546 canceled
minerva (12.3.1~beta.1) unstable; urgency=low minerva (12.3.1~beta.1) unstable; urgency=low
* Small improvement: model_name renamed to map_name in data overlay columns * Small improvement: model_name renamed to map_name in data overlay columns
(#827) (#827)
* Small improvement: name, type, reference_genome_type and
reference_genome_version column in genetic variant data overlay are
deprecated (#827)
* Bug fix: deprecated columns in data overlay are not visible to the end user
(#827)
* Bug fix: invalid color in data overlay provides proper feedback to the user * Bug fix: invalid color in data overlay provides proper feedback to the user
(#822) (#822)
* Bug fix: genetic variant overlay without name caused problems (#832) * Bug fix: genetic variant overlay without name caused problems (#832)
......
...@@ -7,6 +7,7 @@ import java.io.FileInputStream; ...@@ -7,6 +7,7 @@ import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
...@@ -720,7 +721,15 @@ public class ColorSchemaReader { ...@@ -720,7 +721,15 @@ public class ColorSchemaReader {
} else { } else {
String columnNames = ""; String columnNames = "";
for (ColorSchemaColumn schemaColumn : ColorSchemaColumn.values()) { for (ColorSchemaColumn schemaColumn : ColorSchemaColumn.values()) {
if (schemaColumn.getTypes().contains(type)) { boolean deprecated = false;
try {
Field f = ColorSchemaColumn.class.getField(schemaColumn.name());
if (f.isAnnotationPresent(Deprecated.class))
deprecated = true;
} catch (NoSuchFieldException | SecurityException e) {
}
if (schemaColumn.getTypes().contains(type) && !deprecated) {
columnNames += schemaColumn.getColumnName() + ", "; columnNames += schemaColumn.getColumnName() + ", ";
} }
} }
......
...@@ -19,7 +19,7 @@ public enum ColorSchemaColumn { ...@@ -19,7 +19,7 @@ public enum ColorSchemaColumn {
/** /**
* Name of the element. * Name of the element.
*/ */
NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }), NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC}),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }), GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
...@@ -43,7 +43,7 @@ public enum ColorSchemaColumn { ...@@ -43,7 +43,7 @@ public enum ColorSchemaColumn {
/** /**
* Class type of the element. * Class type of the element.
*/ */
TYPE(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }), TYPE(new ColorSchemaType[] { ColorSchemaType.GENERIC}),
/** /**
* New element/reaction color. * New element/reaction color.
...@@ -99,11 +99,13 @@ public enum ColorSchemaColumn { ...@@ -99,11 +99,13 @@ public enum ColorSchemaColumn {
/** /**
* What's the {@link ReferenceGenomeType}. * What's the {@link ReferenceGenomeType}.
*/ */
@Deprecated
REFERENCE_GENOME_TYPE(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }), REFERENCE_GENOME_TYPE(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/** /**
* {@link ReferenceGenome#version Version} of the reference genome. * {@link ReferenceGenome#version Version} of the reference genome.
*/ */
@Deprecated
REFERENCE_GENOME_VERSION(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }), REFERENCE_GENOME_VERSION(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/** /**
......
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