public Collection<Checksum> getChecksums() { return wrappedInteraction.getChecksums(); }
protected void createChecksumFromId(Interaction interaction, MitabXref ref) { // create checksum from xref MitabChecksum checksum = new MitabChecksum(ref.getDatabase(), ref.getId(), ref.getSourceLocator()); interaction.getChecksums().add(checksum); if (listener != null){ listener.onSyntaxWarning(ref, "Found a Checksum in the interaction identifiers column. Will load it as a checksum."); } }
interaction.getChecksums().addAll(checksumI);
target.getChecksums().clear(); target.getChecksums().addAll(source.getChecksums()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs());
/** * This method will copy basic properties from the Interaction source in the complex target. * It will erase existing annotations, xrefs, checksums and identifiers * This method does not copy the participants of the source * @param source * @param target */ public static void copyAndOverrideBasicComplexPropertiesWithInteractionProperties(Interaction source, Complex target){ if (source != null && target != null){ target.setInteractionType(source.getInteractionType()); target.setCreatedDate(source.getCreatedDate()); target.setUpdatedDate(source.getUpdatedDate()); if (source.getShortName() != null){ target.setShortName(source.getShortName()); } // copy collections target.getAnnotations().clear(); target.getAnnotations().addAll(source.getAnnotations()); target.getXrefs().clear(); target.getXrefs().addAll(source.getXrefs()); target.getIdentifiers().clear(); target.getIdentifiers().addAll(source.getIdentifiers()); target.getChecksums().clear(); target.getChecksums().addAll(source.getChecksums()); } }