public void removeFeature( Feature feature ) { boolean removed = this.bindingDomains.remove( feature ); if ( removed ) { feature.setComponent( null ); } }
public void addFeature( Feature feature ) { // we accept duplicated features in a participant if we want to link a binding site to different features //if ( !this.bindingDomains.contains( feature ) ) { this.bindingDomains.add( feature ); feature.setComponent( this ); //} }
public void removeFeature( Feature feature ) { boolean removed = this.bindingDomains.remove( feature ); if ( removed ) { feature.setComponent( null ); } }
public void addFeature( Feature feature ) { // we accept duplicated features in a participant if we want to link a binding site to different features //if ( !this.bindingDomains.contains( feature ) ) { this.bindingDomains.add( feature ); feature.setComponent( this ); //} }
public void removeBindingDomain( Feature feature ) { boolean removed = this.bindingDomains.remove( feature ); if ( removed ) { feature.setComponent( null ); } }
public void addBindingDomain( Feature feature ) { if ( !this.bindingDomains.contains( feature ) ) { this.bindingDomains.add( feature ); feature.setComponent( this ); } }
/** * This creates a stable (non-random) interaction */ public Interaction createDeterministicInteraction() { Interaction interaction = createInteraction("fooprey-barbait", createDeterministicProtein("A2", "barbait"), createDeterministicProtein("A1", "fooprey"), createDeterministicExperiment()); interaction.getAnnotations().add(createAnnotation("This is an annotation", CvTopic.COMMENT_MI_REF, CvTopic.COMMENT)); CvFeatureType featureType = createCvObject(CvFeatureType.class, CvFeatureType.EXPERIMENTAL_FEATURE_MI_REF, CvFeatureType.EXPERIMENTAL_FEATURE); Feature feature = createFeature("feature1", featureType); feature.setComponent(null); Range range = createRange(1, 1, 5, 5); feature.addRange(range); interaction.getComponents().iterator().next().addBindingDomain(feature); // interaction.getComponents().iterator().next().addComponentParameter(createDeterministicComponentParameter()); // interaction.addXref(createPrimaryReferenceXref( interaction , "testreference")); interaction.addConfidence( createDeterministicConfidence()); interaction.addParameter( createDeterministicInteractionParameter() ); return interaction; }
/** * This creates a stable (non-random) interaction */ public Interaction createDeterministicInteraction() { Interaction interaction = createInteraction("fooprey-barbait", createDeterministicProtein("A2", "barbait"), createDeterministicProtein("A1", "fooprey"), createDeterministicExperiment()); interaction.getAnnotations().add(createAnnotation("This is an annotation", CvTopic.COMMENT_MI_REF, CvTopic.COMMENT)); CvFeatureType featureType = createCvObject(CvFeatureType.class, CvFeatureType.EXPERIMENTAL_FEATURE_MI_REF, CvFeatureType.EXPERIMENTAL_FEATURE); Feature feature = createFeature("feature1", featureType); feature.setComponent(null); Range range = createRange(1, 1, 5, 5); feature.addRange(range); interaction.getComponents().iterator().next().addBindingDomain(feature); // interaction.getComponents().iterator().next().addComponentParameter(createDeterministicComponentParameter()); // interaction.addXref(createPrimaryReferenceXref( interaction , "testreference")); interaction.addConfidence( createDeterministicConfidence()); interaction.addParameter( createDeterministicInteractionParameter() ); return interaction; }
private void synchronizeFeature( Feature feature, boolean synchronizeAnnotatedAttributes ) { feature.setBoundDomain( synchronize( feature.getBoundDomain() ) ); feature.setComponent( synchronize( feature.getComponent() ) ); feature.setCvFeatureIdentification( synchronize( feature.getCvFeatureIdentification() ) ); feature.setCvFeatureType( synchronize( feature.getCvFeatureType() ) ); // cannot call setRanges in interaction because of orphan relationship limitation if (IntactCore.isInitializedAndDirty(feature.getRanges())){ Collection<Range> ranges = synchronizeRanges(feature.getRanges(), feature); feature.getRanges().clear(); feature.getRanges().addAll(ranges); } if (synchronizeAnnotatedAttributes){ synchronizeAnnotatedObjectCommons( feature ); } }
private void synchronizeFeature( Feature feature, boolean synchronizeAnnotatedAttributes ) { feature.setBoundDomain( synchronize( feature.getBoundDomain() ) ); feature.setComponent( synchronize( feature.getComponent() ) ); feature.setCvFeatureIdentification( synchronize( feature.getCvFeatureIdentification() ) ); feature.setCvFeatureType( synchronize( feature.getCvFeatureType() ) ); // cannot call setRanges in interaction because of orphan relationship limitation if (IntactCore.isInitializedAndDirty(feature.getRanges())){ Collection<Range> ranges = synchronizeRanges(feature.getRanges(), feature); feature.getRanges().clear(); feature.getRanges().addAll(ranges); } if (synchronizeAnnotatedAttributes){ synchronizeAnnotatedObjectCommons( feature ); } }
Feature feature = featureConverter.psiToIntact(psiFeature); component.getBindingDomains().add(feature); feature.setComponent(component);
protected void copyComponent( Component source, Component target ) { copyProperty(source, "stoichiometry", target); copyProperty(source, "interaction", target); copyProperty(source, "interactor", target); copyProperty(source, "cvBiologicalRole", target); copyProperty(source, "cvExperimentalRole", target); copyProperty(source, "expressedIn", target); copyCollection( source.getBindingDomains(), target.getBindingDomains() ); for (Feature bindingDomain : target.getBindingDomains()) { bindingDomain.setComponent(target); } copyCollection( source.getExperimentalPreparations(), target.getExperimentalPreparations() ); copyCollection( source.getParticipantDetectionMethods(), target.getParticipantDetectionMethods() ); copyCollection( source.getParameters(), target.getParameters() ); }
protected void copyComponent( Component source, Component target ) { copyProperty(source, "stoichiometry", target); copyProperty(source, "interaction", target); copyProperty(source, "interactor", target); copyProperty(source, "cvBiologicalRole", target); copyProperty(source, "cvExperimentalRole", target); copyProperty(source, "expressedIn", target); copyCollection( source.getBindingDomains(), target.getBindingDomains() ); for (Feature bindingDomain : target.getBindingDomains()) { bindingDomain.setComponent(target); } copyCollection( source.getExperimentalPreparations(), target.getExperimentalPreparations() ); copyCollection( source.getParticipantDetectionMethods(), target.getParticipantDetectionMethods() ); copyCollection( source.getParameters(), target.getParameters() ); }
public Feature cloneFeature(Feature feature) throws IntactClonerException { if (feature == null) return null; Feature clone = new Feature(); clonerManager.addClone(feature, clone); clone.setOwner(clone(feature.getOwner())); clone.setShortLabel(feature.getShortLabel()); clone.setCvFeatureType(clone(feature.getCvFeatureType())); clone.setCvFeatureIdentification(clone(feature.getCvFeatureIdentification())); if (isCollectionClonable(feature.getRanges())) { Collection<Range> ranges = IntactCore.ensureInitializedRanges(feature); for (Range range : ranges) { clone.addRange(clone(range)); } } clone.setComponent(clone(feature.getComponent())); return clone; }
public Feature cloneFeature(Feature feature) throws IntactClonerException { if (feature == null) return null; Feature clone = new Feature(); clonerManager.addClone(feature, clone); clone.setOwner(clone(feature.getOwner())); clone.setShortLabel(feature.getShortLabel()); clone.setCvFeatureType(clone(feature.getCvFeatureType())); clone.setCvFeatureIdentification(clone(feature.getCvFeatureIdentification())); if (isCollectionClonable(feature.getRanges())) { Collection<Range> ranges = IntactCore.ensureInitializedRanges(feature); for (Range range : ranges) { clone.addRange(clone(range)); } } clone.setComponent(clone(feature.getComponent())); return clone; }
intactObject.setComponent(component);