private void processSpecializedAnnotations( Collection<Annotation> annotations, psidev.psi.mi.xml.model.Interaction interaction) { // set boolean values final Iterator<Annotation> it = annotations.iterator(); int numberOfAuthConf = 0; while ( it.hasNext() ) { Annotation annotation = it.next(); if ( annotation.getCvTopic().getShortLabel().equals( NEGATIVE ) ) { interaction.setNegative( true ); } else if (annotation.getCvTopic().getShortLabel().equals( MODELLED )){ interaction.setModelled( true ); } else if (annotation.getCvTopic().getShortLabel().equals( INTRA_MOLECULAR )){ interaction.setIntraMolecular( true ); } } }
/** * Build a new Interaction with no participants but holding a copy of all other attributes of the given interaction. * <br/> WARNING: all attributes of the newly created interaction are the same as the source's (that is same object * instance). This is not an object clone. * * @param source the source interaction. * @return a target interaction which is a copy of the source interaction but the participants or * inferredInteractions. */ protected Interaction copyInteraction(Interaction source) { Interaction target = new Interaction(); // clone inner attributes target.setId(source.getId()); target.setImexId(source.getImexId()); // objects target.setNames(source.getNames()); target.setXref(source.getXref()); // collections target.getConfidences().addAll(source.getConfidences()); target.getExperiments().addAll(source.getExperiments()); target.getInteractionTypes().addAll(source.getInteractionTypes()); // added with mitab 27 target.setModelled(source.isModelled()); target.setIntraMolecular(source.isIntraMolecular()); target.setNegative(source.isNegative()); target.getParameters().addAll(source.getParameters()); target.getAttributes().addAll(source.getAttributes()); target.setAvailability(source.getAvailability()); return target; }
interaction.setNegative(negativeInteraction);
mInteraction.setNegative( jInteraction.isNegative() ); } else { mInteraction.setNegative( false );
mInteraction.setNegative( jInteraction.isNegative() ); } else { mInteraction.setNegative( false );