From: Jim Procter Date: Mon, 26 Feb 2018 15:59:53 +0000 (+0000) Subject: JAL-2920 parse variation and original elements of the feature element, and include... X-Git-Tag: Release_2_10_4~1^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1b5c8f4a7296ae323fb886ebaa18c98110d34666;p=jalview.git 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 --- 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; + } }