public float score;\r
public String type;\r
public String description;\r
- public String status;\r
Hashtable otherDetails;\r
public java.util.Vector links;\r
\r
{\r
this.type = type;\r
this.description = desc;\r
- this.status = status;\r
+ setValue("status", status);\r
this.begin = begin;\r
this.end = end;\r
this.featureGroup = featureGroup;\r
}\r
+\r
public SequenceFeature(String type,\r
String desc,\r
int begin, int end,\r
{\r
this.type = type;\r
this.description = desc;\r
- this.status = status;\r
this.begin = begin;\r
this.end = end;\r
this.score = score;\r
\r
public boolean equals(SequenceFeature sf)\r
{\r
- if(begin != sf.begin\r
- || end != sf.end)\r
- return false;\r
-\r
+ if (begin != sf.begin\r
+ || end != sf.end\r
+ || score != sf.score)\r
+ return false;\r
\r
- if(!(type+description+status).equals\r
- (sf.type+sf.description+sf.status))\r
+ if(!(type+description+featureGroup).equals\r
+ (sf.type+sf.description+sf.featureGroup))\r
return false;\r
\r
return true;\r
description = desc;\r
}\r
\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @return DOCUMENT ME!\r
- */\r
- public String getStatus()\r
- {\r
- return status;\r
- }\r
-\r
- public void setStatus(String status)\r
- {\r
- this.status = status;\r
- }\r
-\r
public String getFeatureGroup()\r
{\r
return featureGroup;\r
*/\r
public void setValue(String key, Object value)\r
{\r
- if(otherDetails == null)\r
- otherDetails = new Hashtable();\r
+ if(value!=null)\r
+ {\r
+ if (otherDetails == null)\r
+ otherDetails = new Hashtable();\r
\r
- otherDetails.put(key, value);\r
+ otherDetails.put(key, value);\r
+ }\r
}\r
\r
\r
+ /*\r
+ * The following methods are added to maintain\r
+ * the castor Uniprot mapping file for the moment.\r
+ */\r
+ public void setStatus(String status)\r
+ {\r
+ setValue("status", status);\r
+ }\r
+\r
+ public String getStatus()\r
+ {\r
+ if (otherDetails != null)\r
+ return otherDetails.get("status").toString();\r
+ else\r
+ return null;\r
+ }\r
+\r
+ public void setPosition(int pos)\r
+ {\r
+ begin = pos;\r
+ end = pos;\r
+ }\r
+\r
+ public int getPosition()\r
+ {\r
+ return begin;\r
+ }\r
+\r
}\r