+ SequenceI matched = matcher
+ .findIdMatch(map.getTo());
+ if (matched != null)
+ {
+ /*
+ * already got an xref to this sequence; update this
+ * map to point to the same sequence, and add
+ * any new dbrefs to it
+ */
+ for (DBRefEntry ref : map.getTo().getDBRefs())
+ {
+ matched.addDBRef(ref); // add or update mapping
+ }
+ map.setTo(matched);
+ }
+ else
+ {
+ matcher.add(map.getTo());
+ }