Package psidev.psi.mi.jami.binary.impl
Class AbstractBinaryInteractionWrapper<I extends Interaction<T>,T extends Participant>
- java.lang.Object
-
- psidev.psi.mi.jami.binary.impl.AbstractBinaryInteractionWrapper<I,T>
-
- All Implemented Interfaces:
BinaryInteraction<T>
,Interaction<T>
- Direct Known Subclasses:
BinaryInteractionEvidenceWrapper
,BinaryInteractionWrapper
,ModelledBinaryInteractionWrapper
public class AbstractBinaryInteractionWrapper<I extends Interaction<T>,T extends Participant> extends Object implements BinaryInteraction<T>
Abstract class for binary interactions that wrap an Interaction.- Since:
05/06/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractBinaryInteractionWrapper(I interaction)
Constructor for AbstractBinaryInteractionWrapper.AbstractBinaryInteractionWrapper(I interaction, CvTerm complexExpansion)
Constructor for AbstractBinaryInteractionWrapper.
-
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)
Adds a new Participant and set the Interaction of this participant if added.Collection<Annotation>
getAnnotations()
Getter for the fieldannotations
.CvTerm
getCausalRegulatoryMechanism()
Getter for the fieldcausalRegulatoryMechanism
Collection<Checksum>
getChecksums()
getChecksumsCvTerm
getComplexExpansion()
Getter for the fieldcomplexExpansion
.Date
getCreatedDate()
getCreatedDateCollection<Xref>
getIdentifiers()
getIdentifiersCvTerm
getInteractionType()
getInteractionTypeT
getParticipantA()
Getter for the fieldparticipantA
.T
getParticipantB()
Getter for the fieldparticipantB
.Collection<T>
getParticipants()
The collection of participants for this binary interaction.String
getRigid()
getRigidString
getShortName()
getShortNameDate
getUpdatedDate()
getUpdatedDateprotected I
getWrappedInteraction()
Getter for the fieldwrappedInteraction
.Collection<Xref>
getXrefs()
getXrefsboolean
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)
Removes the Participant from this binary interactionvoid
setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the fieldcausalRegulatoryMechanism
.void
setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interactionvoid
setCreatedDate(Date created)
Sets the created datevoid
setInteractionType(CvTerm term)
Sets the interaction type.void
setParticipantA(T participantA)
Setter for the fieldparticipantA
.void
setParticipantB(T participantB)
Setter for the fieldparticipantB
.void
setRigid(String rigid)
Sets the rigid of this interaction.void
setShortName(String name)
Sets the short name of the interactionvoid
setUpdatedDate(Date updated)
Sets the last update dateString
toString()
-
-
-
Constructor Detail
-
AbstractBinaryInteractionWrapper
public AbstractBinaryInteractionWrapper(I interaction)
Constructor for AbstractBinaryInteractionWrapper.
- Parameters:
interaction
- : the interaction to wrap
-
-
Method Detail
-
getParticipantA
public T getParticipantA()
Getter for the field
participantA
.- Specified by:
getParticipantA
in interfaceBinaryInteraction<I extends Interaction<T>>
- Returns:
- a T object.
-
getParticipantB
public T getParticipantB()
Getter for the field
participantB
.- Specified by:
getParticipantB
in interfaceBinaryInteraction<I extends Interaction<T>>
- Returns:
- a T object.
-
setParticipantA
public void setParticipantA(T participantA)
Setter for the field
participantA
.- Specified by:
setParticipantA
in interfaceBinaryInteraction<I extends Interaction<T>>
- Parameters:
participantA
- a T object.
-
setParticipantB
public void setParticipantB(T participantB)
Setter for the field
participantB
.- Specified by:
setParticipantB
in interfaceBinaryInteraction<I extends Interaction<T>>
- Parameters:
participantB
- a T object.
-
getComplexExpansion
public CvTerm getComplexExpansion()
Getter for the field
complexExpansion
.- Specified by:
getComplexExpansion
in interfaceBinaryInteraction<I extends Interaction<T>>
- Returns:
- a
CvTerm
object.
-
setComplexExpansion
public void setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interaction- Specified by:
setComplexExpansion
in interfaceBinaryInteraction<I extends Interaction<T>>
- Parameters:
expansion
- : the complex expansion
-
getCausalRegulatoryMechanism
public CvTerm getCausalRegulatoryMechanism()
Getter for the fieldcausalRegulatoryMechanism
- Specified by:
getCausalRegulatoryMechanism
in interfaceBinaryInteraction<I extends Interaction<T>>
- Returns:
- a
CvTerm
object.
-
setCausalRegulatoryMechanism
public void setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the field
causalRegulatoryMechanism
.- Specified by:
setCausalRegulatoryMechanism
in interfaceBinaryInteraction<I extends Interaction<T>>
- Parameters:
causalRegulatoryMechanism
- aCvTerm
object.
-
getShortName
public String getShortName()
getShortName
- Specified by:
getShortName
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
String
object.
-
setShortName
public void setShortName(String name)
Sets the short name of the interaction- Specified by:
setShortName
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
name
- : short name
-
getRigid
public String getRigid()
getRigid
- Specified by:
getRigid
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
String
object.
-
setRigid
public void setRigid(String rigid)
Sets the rigid of this interaction. It will remove the previous rigid from the list of checksum and add the new one. If rigid is null, it will remove all the rigid in the list of checksum- Specified by:
setRigid
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
rigid
- : the rigid
-
getIdentifiers
public Collection<Xref> getIdentifiers()
getIdentifiers
- Specified by:
getIdentifiers
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Collection
object.
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs
- Specified by:
getXrefs
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Collection
object.
-
getChecksums
public Collection<Checksum> getChecksums()
getChecksums
- Specified by:
getChecksums
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations
.- Specified by:
getAnnotations
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Collection
object.
-
getUpdatedDate
public Date getUpdatedDate()
getUpdatedDate
- Specified by:
getUpdatedDate
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Date
object.
-
setUpdatedDate
public void setUpdatedDate(Date updated)
Sets the last update date- Specified by:
setUpdatedDate
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
updated
- : last update date
-
getCreatedDate
public Date getCreatedDate()
getCreatedDate
- Specified by:
getCreatedDate
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
Date
object.
-
setCreatedDate
public void setCreatedDate(Date created)
Sets the created date- Specified by:
setCreatedDate
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
created
- : created date
-
getInteractionType
public CvTerm getInteractionType()
getInteractionType
- Specified by:
getInteractionType
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- a
CvTerm
object.
-
setInteractionType
public void setInteractionType(CvTerm term)
Sets the interaction type.- Specified by:
setInteractionType
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
term
- : interaction type
-
getParticipants
public Collection<T> getParticipants()
The collection of participants for this binary interaction. It cannot be changed.- Specified by:
getParticipants
in interfaceInteraction<I extends Interaction<T>>
- Returns:
- The collection of participants
-
addParticipant
public boolean addParticipant(T part)
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<I extends Interaction<T>>
- Parameters:
part
- : participant to add- Returns:
- true if the participant has been added, false otherwise
- Throws:
IllegalArgumentException
- if this Binary interaction already contains two participants
-
removeParticipant
public boolean removeParticipant(T part)
Removes the Participant from this binary interaction- Specified by:
removeParticipant
in interfaceInteraction<I extends Interaction<T>>
- Parameters:
part
- : participant to remove- Returns:
- true if the participant has been removed, false otherwise
-
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<I extends Interaction<T>>
- 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<I extends Interaction<T>>
- Parameters:
participants
- : participants to remove- Returns:
- true if participant are removed from the list of participants
-
getWrappedInteraction
protected I getWrappedInteraction()
Getter for the field
wrappedInteraction
.- Returns:
- a I object.
-
-