private Boolean isIntraMolecular(BinaryInteraction<?> binaryInteraction) { Interactor A = binaryInteraction.getInteractorA(); Interactor B = binaryInteraction.getInteractorB(); if ((A == null && B != null && !B.isEmpty())) { //We have only one participant in mitab so we don't need to check the stoichiometry. return true; } else if (B == null && A != null && !A.isEmpty()) { return true; } return false; }
pB = interactorConverter.buildParticipantB(iB, binaryInteraction, 0); } else if (A != null && !A.isEmpty()) { interactionIdBuilder.append(binaryInteraction.getInteractorA().getIdentifiers().iterator().next().getIdentifier()); Interactor iA = interactorConverter.fromMitab(binaryInteraction.getInteractorA()); } else if (B != null && !B.isEmpty()) { interactionIdBuilder.append(binaryInteraction.getInteractorB().getIdentifiers().iterator().next().getIdentifier()); Interactor iB = interactorConverter.fromMitab(binaryInteraction.getInteractorB());
interactionIdBuilder.append("_"); interactionIdBuilder.append(binaryInteraction.getInteractorB().getIdentifiers().iterator().next().getIdentifier()); } else if (A != null && !A.isEmpty()) { interactionIdBuilder.append(binaryInteraction.getInteractorA().getIdentifiers().iterator().next().getIdentifier()); } else if (B != null && !B.isEmpty()) { interactionIdBuilder.append(binaryInteraction.getInteractorB().getIdentifiers().iterator().next().getIdentifier()); } else {
if(!interactorA.isEmpty() && (interactorA.getIdentifiers() == null || interactorA.getIdentifiers().isEmpty())){ if(!interactorB.isEmpty() && (interactorB.getIdentifiers() == null || interactorB.getIdentifiers().isEmpty())){ if(interactorA.isEmpty() && interactorB.isEmpty()){ if(interactorA.isEmpty() && !interactorB.isEmpty()){ interaction.setInteractorA(null); if(interactorB.isEmpty() && !interactorA.isEmpty()){ interaction.setInteractorB(null);