Commit 5eaef346 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

some columns are marked as deprecated

parent d04da2a3
minerva (12.3.1~beta.1) unstable; urgency=low
* Small improvement: model_name renamed to map_name in data overlay columns
(#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
(#822)
* Bug fix: genetic variant overlay without name caused problems (#832)
......
......@@ -7,6 +7,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
......@@ -720,7 +721,15 @@ public class ColorSchemaReader {
} else {
String columnNames = "";
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() + ", ";
}
}
......
......@@ -19,7 +19,7 @@ public enum ColorSchemaColumn {
/**
* Name of the element.
*/
NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC}),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
......@@ -43,7 +43,7 @@ public enum ColorSchemaColumn {
/**
* Class type of the element.
*/
TYPE(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
TYPE(new ColorSchemaType[] { ColorSchemaType.GENERIC}),
/**
* New element/reaction color.
......@@ -99,11 +99,13 @@ public enum ColorSchemaColumn {
/**
* What's the {@link ReferenceGenomeType}.
*/
@Deprecated
REFERENCE_GENOME_TYPE(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/**
* {@link ReferenceGenome#version Version} of the reference genome.
*/
@Deprecated
REFERENCE_GENOME_VERSION(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment