\r
\r
SequenceI refSeq = null;\r
- Hashtable annotationsHash = new Hashtable();\r
public boolean readAnnotationFile(AlignmentI al,\r
String file,\r
String protocol)\r
if(sg.getSize()>0)\r
{\r
al.addGroup(sg);\r
- annotationsHash.put(sg.getName(), sg);\r
}\r
}\r
\r
//So far we have only added groups to the annotationHash,\r
//the idea is in the future properties can be added to\r
//alignments, other annotations etc\r
- SequenceGroup sg = (SequenceGroup)annotationsHash.get(st.nextToken());\r
+ if(al.getGroups()==null)\r
+ return;\r
+ SequenceGroup sg = null;\r
+\r
+ String name = st.nextToken();\r
+\r
+ Vector groups = al.getGroups();\r
+ for(int i=0; i<groups.size(); i++)\r
+ {\r
+ sg = (SequenceGroup)groups.elementAt(i);\r
+ if(sg.getName().equals(name))\r
+ break;\r
+ else\r
+ sg = null;\r
+ }\r
\r
if(sg!=null)\r
{\r