Package psidev.psi.mi.jami.model.impl
Class AbstractInteraction<T extends Participant>
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.AbstractInteraction<T>
-
- All Implemented Interfaces:
Interaction<T>
- Direct Known Subclasses:
AbstractBinaryInteraction
,DefaultInteraction
,DefaultInteractionEvidence
,DefaultModelledInteraction
public abstract class AbstractInteraction<T extends Participant> extends Object implements Interaction<T>
Abstract class for interactions- Since:
09/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractInteraction()
Constructor for AbstractInteraction.AbstractInteraction(String shortName)
Constructor for AbstractInteraction.AbstractInteraction(String shortName, CvTerm type)
Constructor for AbstractInteraction.
-
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)
addParticipantprotected void
clearPropertiesLinkedToChecksums()
clearPropertiesLinkedToChecksumsCollection<Annotation>
getAnnotations()
Getter for the fieldannotations
.Collection<Checksum>
getChecksums()
Getter for the fieldchecksums
.Date
getCreatedDate()
Getter for the fieldcreatedDate
.Collection<Xref>
getIdentifiers()
Getter for the fieldidentifiers
.CvTerm
getInteractionType()
Getter for the fieldinteractionType
.Collection<T>
getParticipants()
Getter for the fieldparticipants
.String
getRigid()
Getter for the fieldrigid
.String
getShortName()
Getter for the fieldshortName
.Date
getUpdatedDate()
Getter for the fieldupdatedDate
.Collection<Xref>
getXrefs()
Getter for the fieldxrefs
.protected void
initialiseAnnotations()
initialiseAnnotationsprotected void
initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWithprotected void
initialiseChecksums()
initialiseChecksumsprotected void
initialiseChecksumWith(Collection<Checksum> checksums)
initialiseChecksumWithprotected void
initialiseIdentifiers()
initialiseIdentifiersprotected void
initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWithprotected void
initialiseParticipants()
initialiseParticipantsprotected void
initialiseParticipantsWith(Collection<T> participants)
initialiseParticipantsWithprotected void
initialiseXrefs()
initialiseXrefsprotected void
initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWithprotected void
processAddedChecksumEvent(Checksum added)
processAddedChecksumEventprotected void
processRemovedChecksumEvent(Checksum removed)
processRemovedChecksumEventboolean
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
setCreatedDate(Date created)
Sets the created datevoid
setInteractionType(CvTerm term)
Sets the interaction type.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()
-
-
-
Method Detail
-
initialiseAnnotations
protected void initialiseAnnotations()
initialiseAnnotations
-
initialiseXrefs
protected void initialiseXrefs()
initialiseXrefs
-
initialiseIdentifiers
protected void initialiseIdentifiers()
initialiseIdentifiers
-
initialiseParticipants
protected void initialiseParticipants()
initialiseParticipants
-
initialiseParticipantsWith
protected void initialiseParticipantsWith(Collection<T> participants)
initialiseParticipantsWith
- Parameters:
participants
- aCollection
object.
-
initialiseChecksums
protected void initialiseChecksums()
initialiseChecksums
-
initialiseXrefsWith
protected void initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWith
- Parameters:
xrefs
- aCollection
object.
-
initialiseIdentifiersWith
protected void initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWith
- Parameters:
identifiers
- aCollection
object.
-
initialiseChecksumWith
protected void initialiseChecksumWith(Collection<Checksum> checksums)
initialiseChecksumWith
- Parameters:
checksums
- aCollection
object.
-
initialiseAnnotationsWith
protected void initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWith
- Parameters:
annotations
- aCollection
object.
-
getShortName
public String getShortName()
Getter for the field
shortName
.- Specified by:
getShortName
in interfaceInteraction<T extends Participant>
- Returns:
- a
String
object.
-
setShortName
public void setShortName(String name)
Sets the short name of the interaction- Specified by:
setShortName
in interfaceInteraction<T extends Participant>
- Parameters:
name
- : short name
-
getRigid
public String getRigid()
Getter for the field
rigid
.- Specified by:
getRigid
in interfaceInteraction<T extends Participant>
- 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<T extends Participant>
- Parameters:
rigid
- : the rigid
-
getIdentifiers
public Collection<Xref> getIdentifiers()
Getter for the field
identifiers
.- Specified by:
getIdentifiers
in interfaceInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
getXrefs
public Collection<Xref> getXrefs()
Getter for the field
xrefs
.- Specified by:
getXrefs
in interfaceInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
getChecksums
public Collection<Checksum> getChecksums()
Getter for the field
checksums
.- Specified by:
getChecksums
in interfaceInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations
.- Specified by:
getAnnotations
in interfaceInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
getUpdatedDate
public Date getUpdatedDate()
Getter for the field
updatedDate
.- Specified by:
getUpdatedDate
in interfaceInteraction<T extends Participant>
- Returns:
- a
Date
object.
-
setUpdatedDate
public void setUpdatedDate(Date updated)
Sets the last update date- Specified by:
setUpdatedDate
in interfaceInteraction<T extends Participant>
- Parameters:
updated
- : last update date
-
getCreatedDate
public Date getCreatedDate()
Getter for the field
createdDate
.- Specified by:
getCreatedDate
in interfaceInteraction<T extends Participant>
- Returns:
- a
Date
object.
-
setCreatedDate
public void setCreatedDate(Date created)
Sets the created date- Specified by:
setCreatedDate
in interfaceInteraction<T extends Participant>
- Parameters:
created
- : created date
-
getInteractionType
public CvTerm getInteractionType()
Getter for the field
interactionType
.- Specified by:
getInteractionType
in interfaceInteraction<T extends Participant>
- Returns:
- a
CvTerm
object.
-
setInteractionType
public void setInteractionType(CvTerm term)
Sets the interaction type.- Specified by:
setInteractionType
in interfaceInteraction<T extends Participant>
- Parameters:
term
- : interaction type
-
getParticipants
public Collection<T> getParticipants()
Getter for the field
participants
.- Specified by:
getParticipants
in interfaceInteraction<T extends Participant>
- Returns:
- a
Collection
object.
-
addParticipant
public boolean addParticipant(T part)
addParticipant
- Specified by:
addParticipant
in interfaceInteraction<T extends Participant>
- Parameters:
part
- a T object.- Returns:
- a boolean.
-
removeParticipant
public boolean removeParticipant(T part)
removeParticipant
- Specified by:
removeParticipant
in interfaceInteraction<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- Specified by:
addAllParticipants
in interfaceInteraction<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>
- Parameters:
participants
- : participants to remove- Returns:
- true if participant are removed from the list of participants
-
processAddedChecksumEvent
protected void processAddedChecksumEvent(Checksum added)
processAddedChecksumEvent
- Parameters:
added
- aChecksum
object.
-
processRemovedChecksumEvent
protected void processRemovedChecksumEvent(Checksum removed)
processRemovedChecksumEvent
- Parameters:
removed
- aChecksum
object.
-
clearPropertiesLinkedToChecksums
protected void clearPropertiesLinkedToChecksums()
clearPropertiesLinkedToChecksums
-
-