/** * * @return the interactor factory we want to use to create the complex for bipartite expansion */ public InteractorFactory getInteractorFactory() { if (this.interactorFactory == null){ this.interactorFactory = new DefaultInteractorFactory(); } return interactorFactory; }
/** * * @return the factory used by the complex epxansion to create new binaryInteraction instances */ public BinaryInteractionFactory getBinaryInteractionFactory() { if (this.factory == null){ this.factory = new DefaultBinaryInteractionFactory(); } return this.factory; }
public DefaultInteractorFactory(){ initialiseDeterministicInteractorMaps(); }
/** * Creates an interactor from a given category (should be the canonical name of an Interactor interface) * @param category : the category of interactor * @param name : name * @param type : interactor type * @return the created interactor */ protected Interactor createInteractorFromRecognizedCategory(InteractorCategory category, String name, CvTerm type){ switch (category){ case protein: return createProtein(name, type); case gene: return createGene(name); case nucleic_acid: return createNucleicAcid(name, type); case bioactive_entity: return createBioactiveEntity(name, type); case polymer: return createPolymer(name, type); case complex: return createComplex(name, type); case interactor_set: return createInteractorSet(name, type); default: return createInteractor(name, type); } } }
public static void initialiseAllIntactMitabWriters() { InteractionWriterFactory writerFactory = InteractionWriterFactory.getInstance(); Map<String, Object> supportedOptions28 = createMITABInteractionWriterOptions(null, null, null, null); writerFactory.registerDataSourceWriter(DefaultIntactMitabWriter.class, supportedOptions28); }
public ComplexExpansionMethod createComplexExpansionMethod(InteractionCategory category, ComplexExpansionType type) { switch (type){ case bipartite: return createBipartiteComplexExpansion(category); case matrix: return createMatrixComplexExpansion(category); case spoke: return createSpokeComplexExpansion(category); default: throw new IllegalArgumentException("Cannot create a complex expansion method for ComplexExpansionType "+type); } }
@Override protected <P extends Participant> BinaryInteractionEvidence createBinaryInteraction(InteractionEvidence interaction, P c1, P c2) { return getBinaryInteractionFactory().createBinaryInteractionEvidenceFrom(interaction, (ParticipantEvidence)c1, (ParticipantEvidence)c2, getMethod()); }
@Override protected <P extends Participant> ModelledBinaryInteraction createBinaryInteraction(ModelledInteraction interaction, P p1, P p2) { return getBinaryInteractionFactory().createModelledBinaryInteractionFrom(interaction, (ModelledParticipant)p1, (ModelledParticipant)p2, getMethod()); }
@Override protected <P extends Participant> BinaryInteraction createBinaryInteraction(Interaction interaction, P c1, P c2) { return getBinaryInteractionFactory().createBasicBinaryInteractionFrom(interaction, c1, c2, getMethod()); }
public BinaryInteractionEvidence createSelfBinaryInteractionEvidenceFrom(InteractionEvidence interaction) { BinaryInteractionEvidence binary = instantiateNewBinaryInteractionEvidence(); InteractionCloner.copyAndOverrideInteractionEvidenceProperties(interaction, binary, false, true); InteractionCloner.copyAndOverrideParticipantsEvidencesToBinary(interaction, binary, false, true); return binary; }
/** * * @param interaction : the interaction with only two participants * @return the collection of binary interaction wrappers generated from this interaction with two partcipants */ protected Collection<B> createBinaryInteractionWrappersFrom(T interaction) { return Collections.singletonList((B) getBinaryInteractionFactory().createBinaryInteractionWrapperFrom(interaction)); }
public BinaryInteraction createSelfBinaryInteractionFrom(Interaction interaction) { BinaryInteraction<Participant> binary = instantiateNewBinaryInteraction(); InteractionCloner.copyAndOverrideBasicInteractionProperties(interaction, binary, false, true); InteractionCloner.copyAndOverrideBasicParticipantsToBinary(interaction, binary, false, true); return binary; }
public ModelledBinaryInteraction createSelfModelledBinaryInteractionFrom(ModelledInteraction interaction) { ModelledBinaryInteraction binary = instantiateNewModelledBinaryInteraction(); InteractionCloner.copyAndOverrideModelledInteractionProperties(interaction, binary, false, true); InteractionCloner.copyAndOverrideModelledParticipantsToBinary(interaction, binary, false, true); return binary; }
@Override protected <P extends Participant> BinaryInteractionEvidence createBinaryInteraction(InteractionEvidence interaction, P c1, P c2){ return getBinaryInteractionFactory().createBinaryInteractionEvidenceFrom(interaction, (ParticipantEvidence)c1, (ParticipantEvidence)c2, getMethod()); }
@Override protected <P extends Participant> ModelledBinaryInteraction createBinaryInteraction(ModelledInteraction interaction, P p1, P p2){ return getBinaryInteractionFactory().createModelledBinaryInteractionFrom(interaction, (ModelledParticipant)p1, (ModelledParticipant)p2, getMethod()); }
@Override protected BinaryInteraction createBinaryInteraction(Interaction interaction, Participant c1, Participant c2) { return getBinaryInteractionFactory().createBasicBinaryInteractionFrom(interaction, c1, c2, getMethod()); }
public BinaryInteractionEvidence createBinaryInteractionEvidenceFrom(InteractionEvidence interaction, ParticipantEvidence p1, ParticipantEvidence p2, CvTerm expansionMethod) { BinaryInteractionEvidence binary = instantiateNewBinaryInteractionEvidence(); binary.setComplexExpansion(expansionMethod); InteractionCloner.copyAndOverrideInteractionEvidenceProperties(interaction, binary, false, true); binary.setParticipantA(p1); binary.setParticipantB(p2); return binary; }
@Override protected <P extends Participant> BinaryInteractionEvidence createBinaryInteraction(InteractionEvidence interaction, P c1, P c2) { return getBinaryInteractionFactory().createBinaryInteractionEvidenceFrom(interaction, (ParticipantEvidence)c1, (ParticipantEvidence)c2, getMethod()); }
@Override protected <P extends Participant> ModelledBinaryInteraction createBinaryInteraction(ModelledInteraction interaction, P p1, P p2) { return getBinaryInteractionFactory().createModelledBinaryInteractionFrom(interaction, (ModelledParticipant)p1, (ModelledParticipant)p2, getMethod()); }
@Override protected BinaryInteraction createBinaryInteraction(Interaction interaction, Participant c1, Participant c2) { return getBinaryInteractionFactory().createBasicBinaryInteractionFrom(interaction, c2, c2, getMethod()); }