sb.append(" <data key=\"identifier\">").append(db + "#" + id).append("</data>").append(NEW_LINE); final String specieName = getSpecieName(interactor.getOrganism()); if (specieName != null) { sb.append(" <data key=\"specie\">").append(escape(specieName)).append("</data>").append(NEW_LINE);
public SimpleInteractor( Interactor interactor ) { if ( interactor == null ) { this.identifiers = new ArrayList<CrossReference>(); } else { this.identifiers = interactor.getIdentifiers(); if ( interactor.hasOrganism() ) { for ( CrossReference cr : interactor.getOrganism().getIdentifiers() ) { if ( cr.getDatabase().equals( "taxid" ) ) { taxid = new Integer( cr.getIdentifier() ); } } } } }
public boolean isEmpty() { //We don not want to have a empty interactor, we prefer a null interactor return (this.getIdentifiers() == null || this.getIdentifiers().isEmpty()) && (this.getAlternativeIdentifiers() == null || this.getAlternativeIdentifiers().isEmpty()) && (this.getAliases() == null || this.getAliases().isEmpty()) && (!this.hasOrganism() || (this.hasOrganism() && this.getOrganism().getIdentifiers().isEmpty() && this.getOrganism().getTaxid() == null || this.getOrganism().getTaxid().isEmpty()) ) && (this.getBiologicalRoles() == null || this.getBiologicalRoles().isEmpty()) && (this.getExperimentalRoles() == null || this.getExperimentalRoles().isEmpty()) && (this.getInteractorTypes() == null || this.getInteractorTypes().isEmpty()) && (this.getXrefs() == null || this.getXrefs().isEmpty()) && (this.getChecksums() == null || this.getChecksums().isEmpty()) && (this.getFeatures() == null || this.getFeatures().isEmpty()) && (this.getStoichiometry() == null || this.getStoichiometry().isEmpty()) && (this.getParticipantIdentificationMethods() == null || this.getParticipantIdentificationMethods().isEmpty()); } /////////////////////////////
public void enrich(Interactor interactor) throws Exception { if (interactor.getOrganism() != null) { enrich(interactor.getOrganism().getIdentifiers()); } if (interactor instanceof ExtendedInteractor) { ExtendedInteractor ei = (ExtendedInteractor) interactor; enrich(ei.getBiologicalRoles()); enrich(ei.getExperimentalRoles()); enrich(ei.getInteractorType()); enrich(ei.getProperties()); } }
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()); } } }
Collection<CrossReference> crA = binaryInteraction.getInteractorA().getOrganism().getIdentifiers(); for (CrossReference crAElement : crA) { if (speciesSet.contains(crAElement.getText())) { Collection<CrossReference> crB = binaryInteraction.getInteractorB().getOrganism().getIdentifiers(); for (CrossReference crBElement : crB) { if (speciesSet.contains(crBElement.getText())) {
for ( CrossReference organism : interactor.getOrganism().getIdentifiers() ) { String name = organism.getText(); if ( name != null ) {
if(iA.getOrganism() != null){ encoreInteraction.addOrganismsA(iA.getOrganism().getIdentifiers()); } else { logger.warn("Organism is null"); if(iB.getOrganism() != null){ encoreInteraction.addOrganismsB(iB.getOrganism().getIdentifiers()); } else { logger.warn("Organism is null");
public void enrich(Interactor interactor) throws Exception { if (interactor == null){ return; } // enrich organisms if (interactor.getOrganism() != null) { enrich(interactor.getOrganism().getIdentifiers()); } // enrich biological role if (interactor.getBiologicalRoles() != null) { enrich(interactor.getBiologicalRoles()); } // enrich experimental roles if (interactor.getExperimentalRoles() != null) { enrich(interactor.getExperimentalRoles()); } // enrich interactor types if (interactor.getInteractorTypes()!= null) { enrich(interactor.getInteractorTypes()); } // enrich xrefs if (interactor.getXrefs()!= null) { enrich(interactor.getXrefs()); } // enrich participant detection methods if (interactor.getParticipantIdentificationMethods()!= null) { enrich(interactor.getParticipantIdentificationMethods()); } }
psidev.psi.mi.tab.model.Organism o = tabInteractor.getOrganism();
line[PsimiTabColumns.TAXID_A.ordinal()] = joinOrganism(interactorA.getOrganism());// 10 line[PsimiTabColumns.TAXID_B.ordinal()] = joinOrganism(interactorB.getOrganism()); // 11 } else{