Class AbstractBinaryInteraction<T extends Participant>
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.AbstractInteraction<T>
-
- psidev.psi.mi.jami.binary.impl.AbstractBinaryInteraction<T>
-
- All Implemented Interfaces:
BinaryInteraction<T>,Interaction<T>
- Direct Known Subclasses:
AbstractExtendedXmlBinaryInteraction,AbstractXmlBinaryInteraction,DefaultBinaryInteraction,DefaultBinaryInteractionEvidence,DefaultModelledBinaryInteraction
public abstract class AbstractBinaryInteraction<T extends Participant> extends AbstractInteraction<T> implements BinaryInteraction<T>
Abstract class for BinaryInteraction. A binary interaction is an interaction but will not allow to add more than two participants. As a consequence, the method getParticipants return a Unmodifiable collection and to add/remove participants, we must use the setParticipantA/B methods or the add/removeParticipant methods provided by the Interaction interface- Since:
09/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractBinaryInteraction()Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, CvTerm type)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, CvTerm type, CvTerm complexExpansion)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, CvTerm type, T participantA, T participantB)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, CvTerm type, T participantA, T participantB, CvTerm complexExpansion)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, CvTerm type, T participantA, T participantB, CvTerm complexExpansion, CvTerm causalRegulatoryMechanism)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, T participantA, T participantB)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(String shortName, T participantA, T participantB, CvTerm complexExpansion)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(CvTerm complexExpansion)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(T participantA, T participantB)Constructor for AbstractBinaryInteraction.AbstractBinaryInteraction(T participantA, T participantB, CvTerm complexExpansion)Constructor for AbstractBinaryInteraction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllParticipants(Collection<? extends T> participants)This method will add all the participant and set the interaction of the new participant to this current interactionbooleanaddParticipant(T part)addParticipantCvTermgetCausalRegulatoryMechanism()Getter for the fieldcausalRegulatoryMechanism.CvTermgetComplexExpansion()Getter for the fieldcomplexExpansion.TgetParticipantA()Getter for the fieldparticipantA.TgetParticipantB()Getter for the fieldparticipantB.Collection<T>getParticipants()Getter for the fieldparticipants.booleanremoveAllParticipants(Collection<? extends T> participants)This method will remove the participant and set the interaction of the removed participant to null.booleanremoveParticipant(T part)removeParticipantvoidsetCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)Setter for the fieldcausalRegulatoryMechanism.voidsetComplexExpansion(CvTerm expansion)Sets the complex expansion of this binary interactionvoidsetParticipantA(T participantA)Setter for the fieldparticipantA.voidsetParticipantB(T participantB)Setter for the fieldparticipantB.StringtoString()-
Methods inherited from class psidev.psi.mi.jami.model.impl.AbstractInteraction
clearPropertiesLinkedToChecksums, getAnnotations, getChecksums, getCreatedDate, getIdentifiers, getInteractionType, getRigid, getShortName, getUpdatedDate, getXrefs, initialiseAnnotations, initialiseAnnotationsWith, initialiseChecksums, initialiseChecksumWith, initialiseIdentifiers, initialiseIdentifiersWith, initialiseParticipants, initialiseParticipantsWith, initialiseXrefs, initialiseXrefsWith, processAddedChecksumEvent, processRemovedChecksumEvent, setCreatedDate, setInteractionType, setRigid, setShortName, setUpdatedDate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.model.Interaction
getAnnotations, getChecksums, getCreatedDate, getIdentifiers, getInteractionType, getRigid, getShortName, getUpdatedDate, getXrefs, setCreatedDate, setInteractionType, setRigid, setShortName, setUpdatedDate
-
-
-
-
Constructor Detail
-
AbstractBinaryInteraction
public AbstractBinaryInteraction()
Constructor for AbstractBinaryInteraction.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName)
Constructor for AbstractBinaryInteraction.
- Parameters:
shortName- aStringobject.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, CvTerm type)
Constructor for AbstractBinaryInteraction.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(T participantA, T participantB)
Constructor for AbstractBinaryInteraction.
- Parameters:
participantA- a T object.participantB- a T object.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, T participantA, T participantB)
Constructor for AbstractBinaryInteraction.
- Parameters:
shortName- aStringobject.participantA- a T object.participantB- a T object.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, CvTerm type, T participantA, T participantB)
Constructor for AbstractBinaryInteraction.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(CvTerm complexExpansion)
Constructor for AbstractBinaryInteraction.
- Parameters:
complexExpansion- aCvTermobject.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, CvTerm type, CvTerm complexExpansion)
Constructor for AbstractBinaryInteraction.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(T participantA, T participantB, CvTerm complexExpansion)
Constructor for AbstractBinaryInteraction.
- Parameters:
participantA- a T object.participantB- a T object.complexExpansion- aCvTermobject.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, T participantA, T participantB, CvTerm complexExpansion)
Constructor for AbstractBinaryInteraction.
-
AbstractBinaryInteraction
public AbstractBinaryInteraction(String shortName, CvTerm type, T participantA, T participantB, CvTerm complexExpansion)
Constructor for AbstractBinaryInteraction.
-
-
Method Detail
-
getParticipantA
public T getParticipantA()
Getter for the field
participantA.- Specified by:
getParticipantAin interfaceBinaryInteraction<T extends Participant>- Returns:
- a T object.
-
getParticipantB
public T getParticipantB()
Getter for the field
participantB.- Specified by:
getParticipantBin interfaceBinaryInteraction<T extends Participant>- Returns:
- a T object.
-
setParticipantA
public void setParticipantA(T participantA)
Setter for the field
participantA.- Specified by:
setParticipantAin interfaceBinaryInteraction<T extends Participant>- Parameters:
participantA- a T object.
-
setParticipantB
public void setParticipantB(T participantB)
Setter for the field
participantB.- Specified by:
setParticipantBin interfaceBinaryInteraction<T extends Participant>- Parameters:
participantB- a T object.
-
getComplexExpansion
public CvTerm getComplexExpansion()
Getter for the field
complexExpansion.- Specified by:
getComplexExpansionin interfaceBinaryInteraction<T extends Participant>- Returns:
- a
CvTermobject.
-
setComplexExpansion
public void setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interaction- Specified by:
setComplexExpansionin interfaceBinaryInteraction<T extends Participant>- Parameters:
expansion- : the complex expansion
-
getCausalRegulatoryMechanism
public CvTerm getCausalRegulatoryMechanism()
Getter for the field
causalRegulatoryMechanism.- Specified by:
getCausalRegulatoryMechanismin interfaceBinaryInteraction<T extends Participant>- Returns:
- a
CvTermobject.
-
setCausalRegulatoryMechanism
public void setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the field
causalRegulatoryMechanism.- Specified by:
setCausalRegulatoryMechanismin interfaceBinaryInteraction<T extends Participant>- Parameters:
causalRegulatoryMechanism- aCvTermobject.
-
getParticipants
public Collection<T> getParticipants()
Getter for the field
The collection of participants for this binary interaction. It cannot be changed.participants.- Specified by:
getParticipantsin interfaceInteraction<T extends Participant>- Overrides:
getParticipantsin classAbstractInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
addParticipant
public boolean addParticipant(T part)
addParticipant
Adds a new Participant and set the Interaction of this participant if added. If the participant B and A are null, it will first set the participantA. If the participantA is set, it will set the ParticipantB- Specified by:
addParticipantin interfaceInteraction<T extends Participant>- Overrides:
addParticipantin classAbstractInteraction<T extends Participant>- Parameters:
part- a T object.- Returns:
- a boolean.
-
removeParticipant
public boolean removeParticipant(T part)
removeParticipant
Removes the Participant from this binary interaction- Specified by:
removeParticipantin interfaceInteraction<T extends Participant>- Overrides:
removeParticipantin classAbstractInteraction<T extends Participant>- Parameters:
part- a T object.- Returns:
- a boolean.
-
addAllParticipants
public boolean addAllParticipants(Collection<? extends T> participants)
This method will add all the participant and set the interaction of the new participant to this current interaction Adds the participants and set the Interaction of this participant if added. If the participant B and A are null, it will first set the participantA. If the participantA is set, it will set the ParticipantB- Specified by:
addAllParticipantsin interfaceInteraction<T extends Participant>- Overrides:
addAllParticipantsin classAbstractInteraction<T extends Participant>- Parameters:
participants- : participants to add- Returns:
- true if participant are added to the list of participants
-
removeAllParticipants
public boolean removeAllParticipants(Collection<? extends T> participants)
This method will remove the participant and set the interaction of the removed participant to null.- Specified by:
removeAllParticipantsin interfaceInteraction<T extends Participant>- Overrides:
removeAllParticipantsin classAbstractInteraction<T extends Participant>- Parameters:
participants- : participants to remove- Returns:
- true if participant are removed from the list of participants
-
toString
public String toString()
- Overrides:
toStringin classAbstractInteraction<T extends Participant>
-
-