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 boolean
addAllParticipants(Collection<? extends T> participants)
This method will add all the participant and set the interaction of the new participant to this current interactionboolean
addParticipant(T part)
addParticipantCvTerm
getCausalRegulatoryMechanism()
Getter for the fieldcausalRegulatoryMechanism
.CvTerm
getComplexExpansion()
Getter for the fieldcomplexExpansion
.T
getParticipantA()
Getter for the fieldparticipantA
.T
getParticipantB()
Getter for the fieldparticipantB
.Collection<T>
getParticipants()
Getter for the fieldparticipants
.boolean
removeAllParticipants(Collection<? extends T> participants)
This method will remove the participant and set the interaction of the removed participant to null.boolean
removeParticipant(T part)
removeParticipantvoid
setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the fieldcausalRegulatoryMechanism
.void
setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interactionvoid
setParticipantA(T participantA)
Setter for the fieldparticipantA
.void
setParticipantB(T participantB)
Setter for the fieldparticipantB
.String
toString()
-
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
- aString
object.
-
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
- aString
object.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
- aCvTerm
object.
-
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
- aCvTerm
object.
-
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:
getParticipantA
in interfaceBinaryInteraction<T extends Participant>
- Returns:
- a T object.
-
getParticipantB
public T getParticipantB()
Getter for the field
participantB
.- Specified by:
getParticipantB
in interfaceBinaryInteraction<T extends Participant>
- Returns:
- a T object.
-
setParticipantA
public void setParticipantA(T participantA)
Setter for the field
participantA
.- Specified by:
setParticipantA
in interfaceBinaryInteraction<T extends Participant>
- Parameters:
participantA
- a T object.
-
setParticipantB
public void setParticipantB(T participantB)
Setter for the field
participantB
.- Specified by:
setParticipantB
in interfaceBinaryInteraction<T extends Participant>
- Parameters:
participantB
- a T object.
-
getComplexExpansion
public CvTerm getComplexExpansion()
Getter for the field
complexExpansion
.- Specified by:
getComplexExpansion
in interfaceBinaryInteraction<T extends Participant>
- Returns:
- a
CvTerm
object.
-
setComplexExpansion
public void setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interaction- Specified by:
setComplexExpansion
in interfaceBinaryInteraction<T extends Participant>
- Parameters:
expansion
- : the complex expansion
-
getCausalRegulatoryMechanism
public CvTerm getCausalRegulatoryMechanism()
Getter for the field
causalRegulatoryMechanism
.- Specified by:
getCausalRegulatoryMechanism
in interfaceBinaryInteraction<T extends Participant>
- Returns:
- a
CvTerm
object.
-
setCausalRegulatoryMechanism
public void setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the field
causalRegulatoryMechanism
.- Specified by:
setCausalRegulatoryMechanism
in interfaceBinaryInteraction<T extends Participant>
- Parameters:
causalRegulatoryMechanism
- aCvTerm
object.
-
getParticipants
public Collection<T> getParticipants()
Getter for the field
The collection of participants for this binary interaction. It cannot be changed.participants
.- Specified by:
getParticipants
in interfaceInteraction<T extends Participant>
- Overrides:
getParticipants
in classAbstractInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
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:
addParticipant
in interfaceInteraction<T extends Participant>
- Overrides:
addParticipant
in 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:
removeParticipant
in interfaceInteraction<T extends Participant>
- Overrides:
removeParticipant
in 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:
addAllParticipants
in interfaceInteraction<T extends Participant>
- Overrides:
addAllParticipants
in 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:
removeAllParticipants
in interfaceInteraction<T extends Participant>
- Overrides:
removeAllParticipants
in 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:
toString
in classAbstractInteraction<T extends Participant>
-
-