X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=ef391eb2a24372248d369a75088f249c9e34db23;hb=8b875ed4be8113683a34f4d4df36b3a6bb1c556e;hp=b054ea1958b853212c5bf5a0c533362311cf7fe6;hpb=a2435635b288c8fa08f7f345b9e906c056514ff0;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index b054ea1..ef391eb 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -33,7 +33,6 @@ public class SequenceFeature public float score; public String type; public String description; - public String status; Hashtable otherDetails; public java.util.Vector links; @@ -52,11 +51,12 @@ public class SequenceFeature { this.type = type; this.description = desc; - this.status = status; + setValue("status", status); this.begin = begin; this.end = end; this.featureGroup = featureGroup; } + public SequenceFeature(String type, String desc, int begin, int end, @@ -65,7 +65,6 @@ public class SequenceFeature { this.type = type; this.description = desc; - this.status = status; this.begin = begin; this.end = end; this.score = score; @@ -74,13 +73,13 @@ public class SequenceFeature public boolean equals(SequenceFeature sf) { - if(begin != sf.begin - || end != sf.end) - return false; - + if (begin != sf.begin + || end != sf.end + || score != sf.score) + return false; - if(!(type+description+status).equals - (sf.type+sf.description+sf.status)) + if(!(type+description+featureGroup).equals + (sf.type+sf.description+sf.featureGroup)) return false; return true; @@ -147,21 +146,6 @@ public class SequenceFeature description = desc; } - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - public String getFeatureGroup() { return featureGroup; @@ -211,11 +195,42 @@ public class SequenceFeature */ public void setValue(String key, Object value) { - if(otherDetails == null) - otherDetails = new Hashtable(); + if(value!=null) + { + if (otherDetails == null) + otherDetails = new Hashtable(); - otherDetails.put(key, value); + otherDetails.put(key, value); + } } + /* + * The following methods are added to maintain + * the castor Uniprot mapping file for the moment. + */ + public void setStatus(String status) + { + setValue("status", status); + } + + public String getStatus() + { + if (otherDetails != null) + return otherDetails.get("status").toString(); + else + return null; + } + + public void setPosition(int pos) + { + begin = pos; + end = pos; + } + + public int getPosition() + { + return begin; + } + }