X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=2110632457bf3f136b600662d1518ad4f3378897;hb=14307f5cfcbc90c419c892434613a500ca550ecc;hp=ffbd497025b6a2c6004e3cd0a859a82b40817b27;hpb=baa077bd19420018433d78927aad3ad139e47351;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index ffbd497..2110632 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -442,10 +442,31 @@ public class SequenceFeature implements FeatureLocationI } otherDetails.put(key, value); - FeatureAttributes.getInstance().addAttribute(this.type, key); + recordAttribute(key, value); } } + /** + * Notifies the addition of a feature attribute. This lets us keep track of + * which attributes are present on each feature type, and also the range of + * numerical-valued attributes. + * + * @param key + * @param value + */ + protected void recordAttribute(String key, Object value) + { + String attDesc = null; + if (source != null) + { + attDesc = FeatureSources.getInstance().getSource(source) + .getAttributeName(key); + } + + FeatureAttributes.getInstance().addAttribute(this.type, key, attDesc, + value.toString()); + } + /* * The following methods are added to maintain the castor Uniprot mapping file * for the moment.