X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=ef391eb2a24372248d369a75088f249c9e34db23;hb=8b875ed4be8113683a34f4d4df36b3a6bb1c556e;hp=3d8744fc47616c6cfa617090604d872a2ffde693;hpb=94e3d91558ad96de545821aeb548934f8c8353a3;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 3d8744f..ef391eb 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -51,9 +51,7 @@ public class SequenceFeature { this.type = type; this.description = desc; - if(status!=null) - setValue("status", status); - + setValue("status", status); this.begin = begin; this.end = end; this.featureGroup = featureGroup; @@ -75,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).equals - (sf.type+sf.description)) + if(!(type+description+featureGroup).equals + (sf.type+sf.description+sf.featureGroup)) return false; return true; @@ -197,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); + } + } + + + /* + * The following methods are added to maintain + * the castor Uniprot mapping file for the moment. + */ + public void setStatus(String status) + { + setValue("status", status); + } - otherDetails.put(key, value); + 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; + } }