/** * Gets the Interaction Participant List. * * @param interaction Interaction object. * @return Castor Participant List. */ private InteractionElementType.ParticipantList getParticipantList( org.cytoscape.coreplugin.psi_mi.model.Interaction interaction) { InteractionElementType.ParticipantList participantList = new InteractionElementType.ParticipantList(); List interactors = interaction.getInteractors(); for (int i = 0; i < interactors.size(); i++) { Interactor interactor = (Interactor) interactors.get(i); String name = interactor.getName(); ParticipantType participant1 = createParticipant(name); participantList.getParticipant().add(participant1); } return participantList; }
/** * Gets a complete list of NonRedundant Proteins. * * @return HashMap of NonRedundant Proteins. */ private HashMap getNonRedundantInteractors() { HashMap interactorMap = new HashMap(); for (int i = 0; i < interactions.size(); i++) { org.cytoscape.coreplugin.psi_mi.model.Interaction interaction = (org.cytoscape.coreplugin.psi_mi.model.Interaction) interactions.get(i); List interactors = interaction.getInteractors(); for (int j = 0; j < interactors.size(); j++) { Interactor interactor = (Interactor) interactors.get(j); addToHashMap(interactor, interactorMap); } } return interactorMap; }