sqinfo.put("Name", seq.getName());\r
sqinfo.put("Start", new Integer(seq.getStart()));\r
sqinfo.put("End", new Integer(seq.getEnd()));\r
- sqinfo.put("SeqFeatures", (seq.getSequenceFeatures() !=null) ? seq.getSequenceFeatures() : null);\r
+ Vector sfeat = new Vector();\r
+ jalview.datamodel.SequenceFeature[] sfarray=seq.getSequenceFeatures();\r
+ if (sfarray!=null && sfarray.length>0) {\r
+ for (int i=0;i<sfarray.length;i++)\r
+ sfeat.add(sfarray[i]);\r
+ }\r
+ sqinfo.put("SeqFeatures", sfeat);\r
sqinfo.put("PdbId",\r
(seq.getPDBId() != null) ? seq.getPDBId() : new Vector());\r
sqinfo.put("datasetSequence", (seq.getDatasetSequence() !=null) ? seq.getDatasetSequence() : new Sequence("THISISAPLACEHOLDER",""));\r
* TODO: replace these methods with something more elegant.\r
* @param sq SequenceI\r
* @param sqinfo Hashtable\r
- * @return boolean\r
+ * @return boolean true if name was not updated from sqinfo Name entry\r
*/\r
public static boolean SeqCharacterUnhash(SequenceI sq, Hashtable sqinfo)\r
{\r
String oldname = (String) sqinfo.get("Name");\r
Integer start = (Integer) sqinfo.get("Start");\r
Integer end = (Integer) sqinfo.get("End");\r
- SequenceFeature [] sfeatures = (SequenceFeature[]) sqinfo.get(\r
+ Vector sfeatures = (Vector) sqinfo.get(\r
"SeqFeatures");\r
Vector pdbid = (Vector) sqinfo.get("PdbId");\r
Sequence seqds = (Sequence) sqinfo.get("datasetSequence");\r
sq.setEnd(end.intValue());\r
}\r
\r
- if ((sfeatures != null) && (sfeatures.length>0))\r
+ if ((sfeatures != null) && (sfeatures.size()>0))\r
{\r
- sq.setSequenceFeatures(sfeatures);\r
+ SequenceFeature[] sfarray = (SequenceFeature[]) sfeatures.toArray();\r
+ sq.setSequenceFeatures(sfarray);\r
}\r
+\r
if ((seqds!=null) && !(seqds.getName().equals("THISISAPLACEHOLDER") && seqds.getLength()==0)) {\r
sq.setDatasetSequence(seqds);\r
}\r