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 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)Adds a new Participant and set the Interaction of this participant if added.Collection<Annotation>getAnnotations()Getter for the fieldannotations.CvTermgetCausalRegulatoryMechanism()Getter for the fieldcausalRegulatoryMechanismCollection<Checksum>getChecksums()getChecksumsCvTermgetComplexExpansion()Getter for the fieldcomplexExpansion.DategetCreatedDate()getCreatedDateCollection<Xref>getIdentifiers()getIdentifiersCvTermgetInteractionType()getInteractionTypeTgetParticipantA()Getter for the fieldparticipantA.TgetParticipantB()Getter for the fieldparticipantB.Collection<T>getParticipants()The collection of participants for this binary interaction.StringgetRigid()getRigidStringgetShortName()getShortNameDategetUpdatedDate()getUpdatedDateprotected IgetWrappedInteraction()Getter for the fieldwrappedInteraction.Collection<Xref>getXrefs()getXrefsbooleanremoveAllParticipants(Collection<? extends T> participants)This method will remove the participant and set the interaction of the removed participant to null.booleanremoveParticipant(T part)Removes the Participant from this binary interactionvoidsetCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)Setter for the fieldcausalRegulatoryMechanism.voidsetComplexExpansion(CvTerm expansion)Sets the complex expansion of this binary interactionvoidsetCreatedDate(Date created)Sets the created datevoidsetInteractionType(CvTerm term)Sets the interaction type.voidsetParticipantA(T participantA)Setter for the fieldparticipantA.voidsetParticipantB(T participantB)Setter for the fieldparticipantB.voidsetRigid(String rigid)Sets the rigid of this interaction.voidsetShortName(String name)Sets the short name of the interactionvoidsetUpdatedDate(Date updated)Sets the last update dateStringtoString()
-
-
-
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:
getParticipantAin interfaceBinaryInteraction<I extends Interaction<T>>- Returns:
- a T object.
-
getParticipantB
public T getParticipantB()
Getter for the field
participantB.- Specified by:
getParticipantBin interfaceBinaryInteraction<I extends Interaction<T>>- Returns:
- a T object.
-
setParticipantA
public void setParticipantA(T participantA)
Setter for the field
participantA.- Specified by:
setParticipantAin interfaceBinaryInteraction<I extends Interaction<T>>- Parameters:
participantA- a T object.
-
setParticipantB
public void setParticipantB(T participantB)
Setter for the field
participantB.- Specified by:
setParticipantBin interfaceBinaryInteraction<I extends Interaction<T>>- Parameters:
participantB- a T object.
-
getComplexExpansion
public CvTerm getComplexExpansion()
Getter for the field
complexExpansion.- Specified by:
getComplexExpansionin interfaceBinaryInteraction<I extends Interaction<T>>- Returns:
- a
CvTermobject.
-
setComplexExpansion
public void setComplexExpansion(CvTerm expansion)
Sets the complex expansion of this binary interaction- Specified by:
setComplexExpansionin interfaceBinaryInteraction<I extends Interaction<T>>- Parameters:
expansion- : the complex expansion
-
getCausalRegulatoryMechanism
public CvTerm getCausalRegulatoryMechanism()
Getter for the fieldcausalRegulatoryMechanism- Specified by:
getCausalRegulatoryMechanismin interfaceBinaryInteraction<I extends Interaction<T>>- Returns:
- a
CvTermobject.
-
setCausalRegulatoryMechanism
public void setCausalRegulatoryMechanism(CvTerm causalRegulatoryMechanism)
Setter for the field
causalRegulatoryMechanism.- Specified by:
setCausalRegulatoryMechanismin interfaceBinaryInteraction<I extends Interaction<T>>- Parameters:
causalRegulatoryMechanism- aCvTermobject.
-
getShortName
public String getShortName()
getShortName
- Specified by:
getShortNamein interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Stringobject.
-
setShortName
public void setShortName(String name)
Sets the short name of the interaction- Specified by:
setShortNamein interfaceInteraction<I extends Interaction<T>>- Parameters:
name- : short name
-
getRigid
public String getRigid()
getRigid
- Specified by:
getRigidin interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Stringobject.
-
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:
setRigidin interfaceInteraction<I extends Interaction<T>>- Parameters:
rigid- : the rigid
-
getIdentifiers
public Collection<Xref> getIdentifiers()
getIdentifiers
- Specified by:
getIdentifiersin interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Collectionobject.
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs
- Specified by:
getXrefsin interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Collectionobject.
-
getChecksums
public Collection<Checksum> getChecksums()
getChecksums
- Specified by:
getChecksumsin interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Collectionobject.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations.- Specified by:
getAnnotationsin interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Collectionobject.
-
getUpdatedDate
public Date getUpdatedDate()
getUpdatedDate
- Specified by:
getUpdatedDatein interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Dateobject.
-
setUpdatedDate
public void setUpdatedDate(Date updated)
Sets the last update date- Specified by:
setUpdatedDatein interfaceInteraction<I extends Interaction<T>>- Parameters:
updated- : last update date
-
getCreatedDate
public Date getCreatedDate()
getCreatedDate
- Specified by:
getCreatedDatein interfaceInteraction<I extends Interaction<T>>- Returns:
- a
Dateobject.
-
setCreatedDate
public void setCreatedDate(Date created)
Sets the created date- Specified by:
setCreatedDatein interfaceInteraction<I extends Interaction<T>>- Parameters:
created- : created date
-
getInteractionType
public CvTerm getInteractionType()
getInteractionType
- Specified by:
getInteractionTypein interfaceInteraction<I extends Interaction<T>>- Returns:
- a
CvTermobject.
-
setInteractionType
public void setInteractionType(CvTerm term)
Sets the interaction type.- Specified by:
setInteractionTypein 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:
getParticipantsin 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:
addParticipantin 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:
removeParticipantin 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:
addAllParticipantsin 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:
removeAllParticipantsin 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.
-
-