protected void copyInteractor( Interactor source, Interactor target ) { copyCollection( source.getActiveInstances(), target.getActiveInstances() ); copyInteractorCommons( source, target ); }
protected void copyInteractor( Interactor source, Interactor target ) { copyCollection( source.getActiveInstances(), target.getActiveInstances() ); copyInteractorCommons( source, target ); }
public GeneratedEntry addInteractor(Interactor interactor) { if (interactor == null) throw new NullPointerException("interactor"); for (Component component : interactor.getActiveInstances()) { addInteraction(component.getInteraction()); } return this; }
public GeneratedEntry addInteractor(Interactor interactor) { if (interactor == null) throw new NullPointerException("interactor"); for (Component component : interactor.getActiveInstances()) { addInteraction(component.getInteraction()); } return this; }
public GeneratedEntry addInteractor(Interactor interactor) { if (interactor == null) throw new NullPointerException("interactor"); for (Component component : interactor.getActiveInstances()) { addInteraction(component.getInteraction()); } return this; }
private void synchronizeInteractor( Interactor interactor, boolean synchronizeAnnotatedAtributes ) { if (IntactCore.isInitializedAndDirty(interactor.getActiveInstances())){ Collection<Component> activeInstances = synchronizeCollection(interactor.getActiveInstances()); interactor.getActiveInstances().clear(); interactor.getActiveInstances().addAll(activeInstances); } interactor.setBioSource( synchronize( interactor.getBioSource() ) ); interactor.setCvInteractorType( synchronize( interactor.getCvInteractorType() ) ); if (synchronizeAnnotatedAtributes){ synchronizeAnnotatedObjectCommons( interactor ); } }
private void synchronizeInteractor( Interactor interactor, boolean synchronizeAnnotatedAtributes ) { if (IntactCore.isInitializedAndDirty(interactor.getActiveInstances())){ Collection<Component> activeInstances = synchronizeCollection(interactor.getActiveInstances()); interactor.getActiveInstances().clear(); interactor.getActiveInstances().addAll(activeInstances); } interactor.setBioSource( synchronize( interactor.getBioSource() ) ); interactor.setCvInteractorType( synchronize( interactor.getCvInteractorType() ) ); if (synchronizeAnnotatedAtributes){ synchronizeAnnotatedObjectCommons( interactor ); } }
@Override protected T syncAttributes(T intactObject) { if (intactObject.getBioSource() != null) { BioSource syncedBioSource = BioSourcePersister.getInstance().syncIfTransient(intactObject.getBioSource()); intactObject.setBioSource(syncedBioSource); } if (intactObject.getCvInteractorType() != null) { CvInteractorType cvIntType = (CvInteractorType) CvObjectPersister.getInstance().syncIfTransient(intactObject.getCvInteractorType()); intactObject.setCvInteractorType(cvIntType); } if ( intactObject.getActiveInstances() != null ) { Collection<Component> components = new ArrayList<Component>( intactObject.getActiveInstances().size() ); for ( Component component : intactObject.getActiveInstances() ) { final Component c = ComponentPersister.getInstance().syncIfTransient( component ); c.setInteractor( intactObject ); c.setInteraction( component.getInteraction() ); components.add( c ); } intactObject.setActiveInstances( components ); } return super.syncAttributes(intactObject); }
@Override protected void saveOrUpdateAttributes(T intactObject) throws PersisterException { super.saveOrUpdateAttributes(intactObject); if (intactObject.getBioSource() != null) { BioSourcePersister.getInstance().saveOrUpdate(intactObject.getBioSource()); } if (intactObject.getCvInteractorType() != null) { CvObjectPersister.getInstance().saveOrUpdate(intactObject.getCvInteractorType()); } if ( intactObject.getActiveInstances() != null ) { for ( Component c : intactObject.getActiveInstances() ) { ComponentPersister.getInstance().saveOrUpdate( c ); } } }
boolean hasLinks = !interactor.getActiveInstances().isEmpty(); Set<String> experimentAcs = new HashSet<String>(); for ( Component c : interactor.getActiveInstances() ) { for ( Component c : interactor.getActiveInstances() ) { Interaction interaction = c.getInteraction(); cvs.add( interaction.getCvInteractionType() );