private void xref(DbReference psiref, Set<Xref> bpXrefs) { // process ref type String refType = (psiref.hasRefType()) ? psiref.getRefType() : null; String refTypeAc = (psiref.hasRefTypeAc()) ? psiref.getRefTypeAc() : null; String psiDBRefId = psiref.getId(); String psiDBRefDb = psiref.getDb(); // If multiple ids given with comma separated values, then split them. for (String dbRefId : psiDBRefId.split(",")) { Xref bpXref = null; // Let's not make UnificationXrefs. RelationshipXref is more safe. // Often, a gene or omim ID (can be another species') is a protein's xref id with 'identity' type... if(!"pubmed".equalsIgnoreCase(psiDBRefDb)) { bpXref = relationshipXref(psiDBRefDb, dbRefId, refType, refTypeAc); } else { //TODO shall we skip PublicationXref here (IntAct puts the same PSIMI paper pmid everywhere...)? bpXref = publicationXref(psiDBRefDb, dbRefId); } if (bpXref != null) bpXrefs.add(bpXref); } }