/** * Returns the first components marked as bait. If no such components is found, return null. * * @return The first components marked as bait, otherwise null. * * @deprecated this method should not be part of the model. A utility class should instead, * for isntance: uk.ac.ebi.intact.model.util.InteractionUtils. */ @Transient @Deprecated public Component getBait() { for ( Component component : components ) { CvExperimentalRole role = component.getCvExperimentalRole(); if ( null == role ) { return null; } if ( role.getShortLabel().equals( "bait" ) ) { return component; } } return null; }
String geneName = ProteinUtils.getGeneName(interactor); CvExperimentalRole role = component.getCvExperimentalRole();
CvObjectXref cvRoleIdentityXref = CvObjectUtils.getPsiMiIdentityXref( component.getCvExperimentalRole() ); String cvRoleMiRef = cvRoleIdentityXref.getPrimaryId(); if ( CvExperimentalRole.BAIT_PSI_REF.equals( cvRoleMiRef ) ) {
" (" + intactComponent.getCvExperimentalRole().getShortLabel() + "): " ); if ( psiRole.equals( intactComponent.getCvExperimentalRole() ) && psiProtein.equals( intactComponent.getInteractor() ) ) {
component.getCvExperimentalRole() );
CvExperimentalRole exp = component.getCvExperimentalRole(); CvBiologicalRole bio = component.getCvBiologicalRole();
String role = component.getCvExperimentalRole().getShortLabel(); String species = interactor.getBioSource().getTaxId();
intactObject.setCvExperimentalRole((CvExperimentalRole) cvPersister.syncIfTransient(intactObject.getCvExperimentalRole()));
if ( component.getCvExperimentalRole() != null ) { Element experimentalRoleList = session.createElement( "experimentalRoleList" ); element.appendChild( experimentalRoleList ); component.getCvExperimentalRole() );
@Override protected void saveOrUpdateAttributes(Component intactObject) throws PersisterException { super.saveOrUpdateAttributes(intactObject); if (intactObject.getExpressedIn() != null) { BioSourcePersister bioSourcePersister = BioSourcePersister.getInstance(); bioSourcePersister.saveOrUpdate(intactObject.getExpressedIn()); } CvObjectPersister cvPersister = CvObjectPersister.getInstance(); cvPersister.saveOrUpdate(intactObject.getCvBiologicalRole()); cvPersister.saveOrUpdate(intactObject.getCvExperimentalRole()); for (CvIdentification participantDetection : intactObject.getParticipantDetectionMethods()) { cvPersister.saveOrUpdate(participantDetection); } for (CvExperimentalPreparation experimentalPreparation : intactObject.getExperimentalPreparations()) { cvPersister.saveOrUpdate(experimentalPreparation); } InteractionPersister.getInstance().saveOrUpdate(intactObject.getInteraction()); InteractorPersister.getInstance().saveOrUpdate(intactObject.getInteractor()); for (Feature feature : intactObject.getBindingDomains()) { FeaturePersister.getInstance().saveOrUpdate(feature); } }