- public boolean matches(DBRefEntry refa, DBRefEntry refb)
- {
- if (refa.getSource()!=null && refb.getSource()!=null
- && refb.getSource().equals(refa.getSource()))
+ if (refa.getSource() != null && refb.getSource() != null
+ && refb.getSource().equals(refa.getSource()))
+ {
+ // We dont care about version
+ // if ((refa.getVersion()==null || refb.getVersion()==null)
+ // || refb.getVersion().equals(refa.getVersion()))
+ // {
+ if (refa.getAccessionId() != null && refb.getAccessionId() != null
+ || refb.getAccessionId().equals(refa.getAccessionId()))
+ {
+ if ((refa.getMap() == null && refb.getMap() == null)
+ || (refa.getMap() != null && refb.getMap() != null))
+ if ((refb.getMap().getMap() == null && refa.getMap().getMap() == null)
+ || (refb.getMap().getMap() != null
+ && refa.getMap().getMap() != null && refb
+ .getMap().getMap().getInverse()
+ .equals(refa.getMap().getMap())))