/** * Convenience method to get the interactors - delegates the logic to the interactions * * @return Interactors */ public Collection<Interactor> getInteractors() { if (interactors != null) { return interactors.keySet(); } else if (!interactorsList.isEmpty()){ return interactorsList; } interactors = new IdentityMap(); for (Interaction interaction : getInteractions()) { for (Component comp : IntactCore.ensureInitializedParticipants(interaction)) { interactors.put(comp.getInteractor(), null); } } return interactors.keySet(); }
/** * Convenience method to get the interactors - delegates the logic to the interactions * * @return Interactors */ public Collection<Interactor> getInteractors() { if (interactors != null) { return interactors.keySet(); } else if (!interactorsList.isEmpty()){ return interactorsList; } interactors = new IdentityMap(); for (Interaction interaction : getInteractions()) { for (Component comp : IntactCore.ensureInitializedParticipants(interaction)) { interactors.put(comp.getInteractor(), null); } } return interactors.keySet(); }
protected void failIfInconsistentConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi, int numberOfAuthorConfAttributes) { Collection<Experiment> experiments; Collection<Component> participants; Collection<Confidence> confidences; if (isCheckInitializedCollections()){ experiments = IntactCore.ensureInitializedExperiments(intact); participants = IntactCore.ensureInitializedParticipants(intact); confidences = IntactCore.ensureInitializedConfidences(intact); } else { experiments = intact.getExperiments(); participants = intact.getComponents(); confidences = intact.getConfidences(); } failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments()); failIfInconsistentCollectionSize("participant", participants, psi.getParticipants()); Collection<Confidence> confs = confidences; if (confs.size() > 0 && psi.getConfidences().size() + numberOfAuthorConfAttributes > 0 && confs.size() != (psi.getConfidences().size() + numberOfAuthorConfAttributes)) { throw new InconsistentConversionException("Confidence", confs.size(), psi.getConfidences().size() + numberOfAuthorConfAttributes); } }
protected void failIfInconsistentPsiConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi) { Collection<Experiment> experiments; Collection<Component> participants; Collection<Confidence> confidences; if (isCheckInitializedCollections()){ experiments = IntactCore.ensureInitializedExperiments(intact); participants = IntactCore.ensureInitializedParticipants(intact); confidences = IntactCore.ensureInitializedConfidences(intact); } else { experiments = intact.getExperiments(); participants = intact.getComponents(); confidences = intact.getConfidences(); } failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments()); failIfInconsistentCollectionSize("participant", participants, psi.getParticipants()); Collection<Confidence> confs = confidences; if (confs.size() > 0 && psi.getConfidences().size() > 0 && (confs.size()) != psi.getConfidences().size()) { throw new InconsistentConversionException("Confidence", confs.size(), psi.getConfidences().size()); } }
Collection<Component> initializedComponents1 = IntactCore.ensureInitializedParticipants(this); Collection<Component> initializedComponents2 = IntactCore.ensureInitializedParticipants(interaction);
Collection<Component> initializedComponents1 = IntactCore.ensureInitializedParticipants(this); Collection<Component> initializedComponents2 = IntactCore.ensureInitializedParticipants(interaction);
components = IntactCore.ensureInitializedParticipants(intactObject); confidences = IntactCore.ensureInitializedConfidences(intactObject); parameters = IntactCore.ensureInitializedInteractionParameters(intactObject);
protected void failIfInconsistentConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi) { Collection<Experiment> experiments; Collection<Component> participants; Collection<Confidence> confidences; if (isCheckInitializedCollections()){ experiments = IntactCore.ensureInitializedExperiments(intact); participants = IntactCore.ensureInitializedParticipants(intact); confidences = IntactCore.ensureInitializedConfidences(intact); } else { experiments = intact.getExperiments(); participants = intact.getComponents(); confidences = intact.getConfidences(); } failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments()); failIfInconsistentCollectionSize("participant", participants, psi.getParticipants()); failIfInconsistentCollectionSize( "confidence", confidences, psi.getConfidences()); }
Collection<Component> components = IntactCore.ensureInitializedParticipants(interaction);
Collection<Component> components = IntactCore.ensureInitializedParticipants(interaction);