public static Collection<Object> nonRedundantInteractorsFromPsiEntry(Entry psiEntry) { Map<Integer, Object> nonRedundantInteractors = new HashMap<Integer, Object>(); if( ConverterContext.getInstance().isGenerateExpandedXml() ) { // iterate to get the unique experiments/interactors for (psidev.psi.mi.xml.model.Interaction interaction : psiEntry.getInteractions()) { for (Participant participant : interaction.getParticipants()) { if (participant.getInteractor() != null){ nonRedundantInteractors.put(participant.getInteractor().getId(), participant.getInteractor()); } else if (participant.getInteraction() != null){ nonRedundantInteractors.put(participant.getInteraction().getId(), participant.getInteraction()); } } } } else { for ( psidev.psi.mi.xml.model.Interactor interactor : psiEntry.getInteractors() ) { nonRedundantInteractors.put( interactor.getId(), interactor ); } } return nonRedundantInteractors.values(); }
participantInteractions.add(participant.getInteraction());
if (participant.getInteractor() == null && participant.getInteraction() == null) { throw new PsiConversionException("Participant without interactor found: "+participant+" in interaction: "+interaction);
else if (participant.getInteraction() != null){ interactor = this.interactionConverter.psiToIntact(participant.getInteraction());
} else if(participant.hasInteraction()) { entity = (Complex) processInteraction(participant.getInteraction(), avail, pro, true);
jParticipant.setInteractionRef( mParticipant.getInteraction().getId() ); } else { throw new ConverterException( "Neither an interactor or an interaction was present in participant " + mParticipant.getId() );
jParticipant.setInteractionRef( mParticipant.getInteraction().getId() ); } else { throw new ConverterException( "Neither an interactor or an interaction was present in participant " + mParticipant.getId() );