protected void populateInteractor(Interactor source, Interactor target) { if (target != null && source != null){ target.getAlternativeIdentifiers().addAll(source.getAlternativeIdentifiers()); target.getAliases().addAll(source.getAliases()); if ( !target.hasOrganism() ) { target.setOrganism(new OrganismImpl()); } if( source.hasOrganism() ) { target.getOrganism().getIdentifiers().addAll(source.getOrganism().getIdentifiers()); } target.getAnnotations().addAll(source.getAnnotations()); target.getBiologicalRoles().addAll(source.getBiologicalRoles()); target.getChecksums().addAll(source.getChecksums()); target.getFeatures().addAll(source.getFeatures()); target.getInteractorTypes().addAll(source.getInteractorTypes()); target.getParticipantIdentificationMethods().addAll(source.getParticipantIdentificationMethods()); target.getStoichiometry().addAll(source.getStoichiometry()); target.getXrefs().addAll(source.getXrefs()); } } }
if (interactorA.getStoichiometry() != null && !interactorA.getStoichiometry().isEmpty()) { interactorB.setStoichiometry(Collections.singletonList(0)); List<Annotation> annotations = interactorB.getAnnotations(); List<Annotation> filterAnnotations = new ArrayList<Annotation>();
for (Annotation annotation : interactor.getAnnotations()) { String comment = annotation.getText(); if (comment != null && (comment.equals("mint") || comment.equals("homomint") || comment.equals("domino"))) {
mitabInteractor.getAnnotations().add(annotField); mitabInteractor.getAnnotations().add(annotField);
if (tabInteractor.getAnnotations() != null) { if (!tabInteractor.getAnnotations().isEmpty()) { for (Annotation annotation : tabInteractor.getAnnotations()) { Attribute attribute = new Attribute(annotation.getTopic(), annotation.getText()); xmlInteractor.getAttributes().add(attribute);
line[PsimiTabColumns.ANNOTATIONS_A.ordinal()] = joinAnnotationsCollection(interactorA.getAnnotations());// 26 line[PsimiTabColumns.ANNOTATIONS_B.ordinal()] = joinAnnotationsCollection(interactorB.getAnnotations()); // 27