/** * 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; }
mInteraction.setAvailability( availabilityConverter.fromJaxb( jInteraction.getAvailability() ) );
mInteraction.setAvailability( availabilityConverter.fromJaxb( jInteraction.getAvailability() ) );