From 1b5c8f4a7296ae323fb886ebaa18c98110d34666 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 26 Feb 2018 15:59:53 +0000 Subject: [PATCH] JAL-2920 parse variation and original elements of the feature element, and include them in the returned description if they are present in the record --- resources/uniprot_mapping.xml | 16 ++++++--- .../datamodel/xdb/uniprot/UniprotFeature.java | 34 ++++++++++++++++++-- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/resources/uniprot_mapping.xml b/resources/uniprot_mapping.xml index 6344d1e..832d3e5 100755 --- a/resources/uniprot_mapping.xml +++ b/resources/uniprot_mapping.xml @@ -62,13 +62,19 @@ - + - - - - + + + + + + + + + + diff --git a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java index b1ed275..6102775 100644 --- a/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java +++ b/src/jalview/datamodel/xdb/uniprot/UniprotFeature.java @@ -27,7 +27,11 @@ public class UniprotFeature { private String type; - private String description; + private String description = null; + + private String original = null; + + private String variation = null; private String status; @@ -47,7 +51,13 @@ public class UniprotFeature public String getDescription() { - return description; + return (description == null && variation == null && original == null) + ? null + : (description == null ? "" : description) + + ((variation != null) + ? "Variation: '" + variation + "' " + : "") + + ((original != null) ? "Original: '" + original + "'" : ""); } public void setDescription(String d) @@ -95,4 +105,24 @@ public class UniprotFeature this.begin = p; this.end = p; } + + public String getOriginal() + { + return original; + } + + public void setOriginal(String original) + { + this.original = original; + } + + public String getVariation() + { + return variation; + } + + public void setVariation(String variant) + { + this.variation = variant; + } } -- 1.7.10.2