/** * For each experiment associated with this interaction, collect all respective participants and their identification method and * check if the dependencies are correct. * * @param participant a participant to check on. * @return a collection of validator messages. * if we fail to retreive the MI Ontology. */ public Collection<ValidatorMessage> check( ParticipantEvidence participant ) throws ValidatorException { Collection<ValidatorMessage> messages = Collections.EMPTY_LIST; if (participant.getInteraction() != null){ InteractionEvidence interaction = participant.getInteraction(); Experiment exp = interaction.getExperiment(); if (exp != null){ CvTerm detMethod = exp.getInteractionDetectionMethod(); if (detMethod != null){ if (!participant.getIdentificationMethods().isEmpty()){ messages = new ArrayList<ValidatorMessage>(participant.getIdentificationMethods().size()); for (CvTerm method : participant.getIdentificationMethods()){ // build a context in case of error MiContext context = RuleUtils.buildContext(participant, "participant"); context.addAssociatedContext(RuleUtils.buildContext(exp, "experiment")); messages.addAll( mapping.check( detMethod, method, context, this ) ); } } } } } return messages; }
/** * For each experiment associated with this interaction, collect all respective participants and their biological roles and * check if the dependencies are correct. * * @param participant a participant to check on. * @return a collection of validator messages. * if we fail to retreive the MI Ontology. */ public Collection<ValidatorMessage> check( ParticipantEvidence participant ) throws ValidatorException { Collection<ValidatorMessage> messages = Collections.EMPTY_LIST; CvTerm biolRole = participant.getBiologicalRole(); if (participant.getInteraction() != null){ InteractionEvidence interaction = participant.getInteraction(); Experiment exp = interaction.getExperiment(); if (exp != null){ CvTerm method = exp.getInteractionDetectionMethod(); // build a context in case of error MiContext context = RuleUtils.buildContext(participant, "participant"); context.addAssociatedContext(RuleUtils.buildContext(exp, "experiment")); messages=mapping.check( method, biolRole, context, this ); } } return messages; }
/** * For each experiment associated with this interaction, collect all respective participants and their experimental roles and * check if the dependencies are correct. * * @param participant a participant to check on. * @return a collection of validator messages. * if we fail to retreive the MI Ontology. */ public Collection<ValidatorMessage> check( ParticipantEvidence participant ) throws ValidatorException { Collection<ValidatorMessage> messages = Collections.EMPTY_LIST; CvTerm role = participant.getExperimentalRole(); if (participant.getInteraction() != null){ InteractionEvidence interaction = participant.getInteraction(); Experiment exp = interaction.getExperiment(); if (exp != null){ // build a context in case of error MiContext context = RuleUtils.buildContext(participant, "participant"); context.addAssociatedContext(RuleUtils.buildContext(exp, "experiment")); final CvTerm method = exp.getInteractionDetectionMethod(); messages=mapping.check( method, role, context, this ); } } return messages; }
else if (participant.getInteraction() != null){ InteractionEvidence interaction = participant.getInteraction(); if (interaction.getExperiment() != null){ Experiment exp = interaction.getExperiment();