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 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)addParticipantprotected voidclearPropertiesLinkedToChecksums()clearPropertiesLinkedToChecksumsCollection<Annotation>getAnnotations()Getter for the fieldannotations.Collection<Checksum>getChecksums()Getter for the fieldchecksums.DategetCreatedDate()Getter for the fieldcreatedDate.Collection<Xref>getIdentifiers()Getter for the fieldidentifiers.CvTermgetInteractionType()Getter for the fieldinteractionType.Collection<T>getParticipants()Getter for the fieldparticipants.StringgetRigid()Getter for the fieldrigid.StringgetShortName()Getter for the fieldshortName.DategetUpdatedDate()Getter for the fieldupdatedDate.Collection<Xref>getXrefs()Getter for the fieldxrefs.protected voidinitialiseAnnotations()initialiseAnnotationsprotected voidinitialiseAnnotationsWith(Collection<Annotation> annotations)initialiseAnnotationsWithprotected voidinitialiseChecksums()initialiseChecksumsprotected voidinitialiseChecksumWith(Collection<Checksum> checksums)initialiseChecksumWithprotected voidinitialiseIdentifiers()initialiseIdentifiersprotected voidinitialiseIdentifiersWith(Collection<Xref> identifiers)initialiseIdentifiersWithprotected voidinitialiseParticipants()initialiseParticipantsprotected voidinitialiseParticipantsWith(Collection<T> participants)initialiseParticipantsWithprotected voidinitialiseXrefs()initialiseXrefsprotected voidinitialiseXrefsWith(Collection<Xref> xrefs)initialiseXrefsWithprotected voidprocessAddedChecksumEvent(Checksum added)processAddedChecksumEventprotected voidprocessRemovedChecksumEvent(Checksum removed)processRemovedChecksumEventbooleanremoveAllParticipants(Collection<? extends T> participants)This method will remove the participant and set the interaction of the removed participant to null.booleanremoveParticipant(T part)removeParticipantvoidsetCreatedDate(Date created)Sets the created datevoidsetInteractionType(CvTerm term)Sets the interaction type.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()
-
-
-
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- aCollectionobject.
-
initialiseChecksums
protected void initialiseChecksums()
initialiseChecksums
-
initialiseXrefsWith
protected void initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWith
- Parameters:
xrefs- aCollectionobject.
-
initialiseIdentifiersWith
protected void initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWith
- Parameters:
identifiers- aCollectionobject.
-
initialiseChecksumWith
protected void initialiseChecksumWith(Collection<Checksum> checksums)
initialiseChecksumWith
- Parameters:
checksums- aCollectionobject.
-
initialiseAnnotationsWith
protected void initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWith
- Parameters:
annotations- aCollectionobject.
-
getShortName
public String getShortName()
Getter for the field
shortName.- Specified by:
getShortNamein interfaceInteraction<T extends Participant>- Returns:
- a
Stringobject.
-
setShortName
public void setShortName(String name)
Sets the short name of the interaction- Specified by:
setShortNamein interfaceInteraction<T extends Participant>- Parameters:
name- : short name
-
getRigid
public String getRigid()
Getter for the field
rigid.- Specified by:
getRigidin interfaceInteraction<T extends Participant>- 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<T extends Participant>- Parameters:
rigid- : the rigid
-
getIdentifiers
public Collection<Xref> getIdentifiers()
Getter for the field
identifiers.- Specified by:
getIdentifiersin interfaceInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
getXrefs
public Collection<Xref> getXrefs()
Getter for the field
xrefs.- Specified by:
getXrefsin interfaceInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
getChecksums
public Collection<Checksum> getChecksums()
Getter for the field
checksums.- Specified by:
getChecksumsin interfaceInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations.- Specified by:
getAnnotationsin interfaceInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
getUpdatedDate
public Date getUpdatedDate()
Getter for the field
updatedDate.- Specified by:
getUpdatedDatein interfaceInteraction<T extends Participant>- Returns:
- a
Dateobject.
-
setUpdatedDate
public void setUpdatedDate(Date updated)
Sets the last update date- Specified by:
setUpdatedDatein interfaceInteraction<T extends Participant>- Parameters:
updated- : last update date
-
getCreatedDate
public Date getCreatedDate()
Getter for the field
createdDate.- Specified by:
getCreatedDatein interfaceInteraction<T extends Participant>- Returns:
- a
Dateobject.
-
setCreatedDate
public void setCreatedDate(Date created)
Sets the created date- Specified by:
setCreatedDatein interfaceInteraction<T extends Participant>- Parameters:
created- : created date
-
getInteractionType
public CvTerm getInteractionType()
Getter for the field
interactionType.- Specified by:
getInteractionTypein interfaceInteraction<T extends Participant>- Returns:
- a
CvTermobject.
-
setInteractionType
public void setInteractionType(CvTerm term)
Sets the interaction type.- Specified by:
setInteractionTypein interfaceInteraction<T extends Participant>- Parameters:
term- : interaction type
-
getParticipants
public Collection<T> getParticipants()
Getter for the field
participants.- Specified by:
getParticipantsin interfaceInteraction<T extends Participant>- Returns:
- a
Collectionobject.
-
addParticipant
public boolean addParticipant(T part)
addParticipant
- Specified by:
addParticipantin interfaceInteraction<T extends Participant>- Parameters:
part- a T object.- Returns:
- a boolean.
-
removeParticipant
public boolean removeParticipant(T part)
removeParticipant
- Specified by:
removeParticipantin 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:
addAllParticipantsin 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:
removeAllParticipantsin 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- aChecksumobject.
-
processRemovedChecksumEvent
protected void processRemovedChecksumEvent(Checksum removed)
processRemovedChecksumEvent
- Parameters:
removed- aChecksumobject.
-
clearPropertiesLinkedToChecksums
protected void clearPropertiesLinkedToChecksums()
clearPropertiesLinkedToChecksums
-
-