/** * 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; }
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; }
feature.addRange( range );
feature.addRange( range );