if (dbrefs == null)
dbrefs = new DBRefEntry[0];
- DBRefEntry[] temp = new DBRefEntry[dbrefs.length + 1];
- System.arraycopy(dbrefs, 0, temp, 0, dbrefs.length);
+ int i, iSize = dbrefs.length;
+ for(i=0; i<iSize; i++)
+ if(dbrefs[i].getAccessionId().equals(entry.getAccessionId())
+ && dbrefs[i].getSource().equals(entry.getSource())
+ && dbrefs[i].getVersion().equals(entry.getVersion()))
+ {
+ return;
+ }
+
+ DBRefEntry[] temp = new DBRefEntry[iSize + 1];
temp[temp.length - 1] = entry;
dbrefs = temp;