- // TODO: deal with ID collisions - SequenceI should be appended to list
- // associated with this key.
- names.put(new SeqIdName(seq.getDisplayId(true)), seq);
- SequenceI dbseq = seq;
- while (dbseq.getDatasetSequence() != null)
- {
- dbseq = dbseq.getDatasetSequence();
- }
- // add in any interesting identifiers
- if (dbseq.getDBRef() != null)
+ add(seq);
+ }
+ }
+
+ /**
+ * Adds one sequence to this matcher
+ *
+ * @param seq
+ */
+ public void add(SequenceI seq)
+ {
+ // TODO: deal with ID collisions - SequenceI should be appended to list
+ // associated with this key.
+ names.put(new SeqIdName(seq.getDisplayId(true)), seq);
+ SequenceI dbseq = seq;
+ while (dbseq.getDatasetSequence() != null)
+ {
+ dbseq = dbseq.getDatasetSequence();
+ }
+ // add in any interesting identifiers
+ if (dbseq.getDBRefs() != null)
+ {
+ DBRefEntry dbr[] = dbseq.getDBRefs();
+ SeqIdName sid = null;
+ for (int r = 0; r < dbr.length; r++)