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<Confidence> initializedConfidence1 = IntactCore.ensureInitializedConfidences(this); Collection<Confidence> initializedConfidence2 = IntactCore.ensureInitializedConfidences(interaction);
Collection<Confidence> initializedConfidence1 = IntactCore.ensureInitializedConfidences(this); Collection<Confidence> initializedConfidence2 = IntactCore.ensureInitializedConfidences(interaction);
experiments = IntactCore.ensureInitializedExperiments(intactObject); components = IntactCore.ensureInitializedParticipants(intactObject); confidences = IntactCore.ensureInitializedConfidences(intactObject); parameters = IntactCore.ensureInitializedInteractionParameters(intactObject); annotations = IntactCore.ensureInitializedAnnotations(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<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);
Collection<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);