Class AbstractParticipantRef<I extends Interaction,T extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.reference.AbstractXmlIdReference
-
- psidev.psi.mi.jami.xml.model.reference.xml254.AbstractEntityRef<T>
-
- psidev.psi.mi.jami.xml.model.reference.xml254.AbstractParticipantRef<I,T>
-
- All Implemented Interfaces:
FileSourceContext
,Entity<T>
,NamedParticipant<I,T>
,Participant<I,T>
,ExtendedPsiXmlEntity<T>
,XmlIdReference
public abstract class AbstractParticipantRef<I extends Interaction,T extends Feature> extends AbstractEntityRef<T> implements ExtendedPsiXmlEntity<T>, NamedParticipant<I,T>
Abstract participant reference- Since:
11/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from class psidev.psi.mi.jami.xml.model.reference.AbstractXmlIdReference
ref
-
Fields inherited from interface psidev.psi.mi.jami.model.Participant
ACCEPTOR_ROLE, ACCEPTOR_ROLE_MI, BAIT_ROLE, BAIT_ROLE_MI, DONOR_ROLE, DONOR_ROLE_MI, ELECTRON_ACCEPTOR_ROLE, ELECTRON_ACCEPTOR_ROLE_MI, ELECTRON_DONOR_ROLE, ELECTRON_DONOR_ROLE_MI, ENZYME_REGULATOR_ROLE, ENZYME_REGULATOR_ROLE_MI, ENZYME_ROLE, ENZYME_ROLE_MI, ENZYME_TARGET_ROLE, ENZYME_TARGET_ROLE_MI, FLUORESCENCE_ACCEPTOR_ROLE, FLUORESCENCE_ACCEPTOR_ROLE_MI, FLUORESCENCE_DONOR_ROLE, FLUORESCENCE_DONOR_ROLE_MI, INHIBITED, INHIBITED_MI, INHIBITOR, INHIBITOR_MI, NEUTRAL, NEUTRAL_MI, PHOSPHATE_ACCEPTOR_ROLE, PHOSPHATE_ACCEPTOR_ROLE_MI, PHOSPHATE_DONOR_ROLE, PHOSPHATE_DONOR_ROLE_MI, PHOTON_ACCEPTOR_ROLE, PHOTON_ACCEPTOR_ROLE_MI, PHOTON_DONOR_ROLE, PHOTON_DONOR_ROLE_MI, PREDETERMINED, PREDETERMINED_MI, PREY, PREY_MI, PUTATIVE_SELF_ROLE, PUTATIVE_SELF_ROLE_MI, SELF_ROLE, SELF_ROLE_MI, SUPPRESSED_GENE_ROLE, SUPPRESSED_GENE_ROLE_MI, SUPPRESSOR_GENE_ROLE, SUPPRESSOR_GENE_ROLE_MI, UNSPECIFIED_ROLE, UNSPECIFIED_ROLE_MI
-
-
Constructor Summary
Constructors Constructor Description AbstractParticipantRef(int ref)
Constructor for AbstractParticipantRef.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllFeatures(Collection<? extends T> features)
This method will add all features and set the entity of the new features to this current entityboolean
addFeature(T feature)
addFeature.Collection<Alias>
getAliases()
getAliases.Collection<Annotation>
getAnnotations()
getAnnotations.CvTerm
getBiologicalEffect()
The biological effect of the participant in a causal interaction.CvTerm
getBiologicalRole()
getBiologicalRole.EntityInteractorChangeListener
getChangeListener()
getChangeListener.protected ExtendedPsiXmlParticipant<I,T>
getDelegate()
Getter for the fielddelegate
.Collection<T>
getFeatures()
getFeatures.String
getFullName()
The full name of the entity.int
getId()
getId.I
getInteraction()
The interaction in which the participant is involved.String
getShortName()
The short name of the entity.Stoichiometry
getStoichiometry()
getStoichiometry.Collection<Xref>
getXrefs()
getXrefs.boolean
removeAllFeatures(Collection<? extends T> features)
This method will remove all the features and set the entity of the removed features to null.boolean
removeFeature(T feature)
removeFeature.void
setBiologicalEffect(CvTerm biologicalEffect)
Sets the biological effect of the participant in a causal interaction.void
setBiologicalRole(CvTerm bioRole)
Sets the biological role.void
setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listenervoid
setFullName(String name)
Sets the full name of the entityvoid
setId(int id)
setId.void
setInteraction(I interaction)
Sets the interaction.void
setInteractionAndAddParticipant(I interaction)
Sets the Interaction and add the new Participant to its list of Participants.void
setShortName(String name)
Sets the short name of an entityvoid
setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.void
setStoichiometry(Stoichiometry stoichiometry)
setStoichiometry.String
toString()
toString-
Methods inherited from class psidev.psi.mi.jami.xml.model.reference.xml254.AbstractEntityRef
getCausalRelationships, getInteractor, initialiseParticipantDelegate, setDelegate, setInteractor
-
Methods inherited from class psidev.psi.mi.jami.xml.model.reference.AbstractXmlIdReference
getRef, registerForResolution
-
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.Entity
getCausalRelationships, getInteractor, setInteractor
-
Methods inherited from interface psidev.psi.mi.jami.datasource.FileSourceContext
getSourceLocator, setSourceLocator
-
Methods inherited from interface psidev.psi.mi.jami.xml.model.reference.XmlIdReference
resolve
-
-
-
-
Method Detail
-
setInteractionAndAddParticipant
public void setInteractionAndAddParticipant(I interaction)
Sets the Interaction and add the new Participant to its list of Participants. If the given interaction is null, it will remove the Participant from the previous interaction it was attached to- Specified by:
setInteractionAndAddParticipant
in interfaceParticipant<I extends Interaction,T extends Feature>
- Parameters:
interaction
- : interaction
-
getInteraction
public I getInteraction()
The interaction in which the participant is involved. It can be null if the participant is not attached to any interactions. It can happen if the participant has been removed from an interaction and is now invalid.- Specified by:
getInteraction
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- the interaction
-
setInteraction
public void setInteraction(I interaction)
Sets the interaction.- Specified by:
setInteraction
in interfaceParticipant<I extends Interaction,T extends Feature>
- Parameters:
interaction
- : interaction
-
getBiologicalRole
public CvTerm getBiologicalRole()
getBiologicalRole.
- Specified by:
getBiologicalRole
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- a
CvTerm
object.
-
setBiologicalRole
public void setBiologicalRole(CvTerm bioRole)
Sets the biological role. If the bioRole is null, should create a bioRole- Specified by:
setBiologicalRole
in interfaceParticipant<I extends Interaction,T extends Feature>
- Parameters:
bioRole
- : biological role unspecified role (MI:0499)
-
getBiologicalEffect
public CvTerm getBiologicalEffect()
The biological effect of the participant in a causal interaction. It is a controlled vocabulary term and can be null.- Specified by:
getBiologicalEffect
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- the biological effect
-
setBiologicalEffect
public void setBiologicalEffect(CvTerm biologicalEffect)
Sets the biological effect of the participant in a causal interaction.- Specified by:
setBiologicalEffect
in interfaceParticipant<I extends Interaction,T extends Feature>
- Parameters:
biologicalEffect
- : biological effect
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs.
- Specified by:
getXrefs
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
getAnnotations.
- Specified by:
getAnnotations
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- a
Collection
object.
-
getAliases
public Collection<Alias> getAliases()
getAliases.
- Specified by:
getAliases
in interfaceParticipant<I extends Interaction,T extends Feature>
- Returns:
- a
Collection
object.
-
getStoichiometry
public Stoichiometry getStoichiometry()
getStoichiometry.
- Specified by:
getStoichiometry
in interfaceEntity<I extends Interaction>
- Overrides:
getStoichiometry
in classAbstractEntityRef<T extends Feature>
- Returns:
- a
Stoichiometry
object.
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometry
in interfaceEntity<I extends Interaction>
- Overrides:
setStoichiometry
in classAbstractEntityRef<T extends Feature>
- Parameters:
stoichiometry
- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
setStoichiometry.
- Specified by:
setStoichiometry
in interfaceEntity<I extends Interaction>
- Overrides:
setStoichiometry
in classAbstractEntityRef<T extends Feature>
- Parameters:
stoichiometry
- aStoichiometry
object.
-
getFeatures
public Collection<T> getFeatures()
getFeatures.
- Specified by:
getFeatures
in interfaceEntity<I extends Interaction>
- Overrides:
getFeatures
in classAbstractEntityRef<T extends Feature>
- Returns:
- a
Collection
object.
-
getChangeListener
public EntityInteractorChangeListener getChangeListener()
getChangeListener.
- Specified by:
getChangeListener
in interfaceEntity<I extends Interaction>
- Overrides:
getChangeListener
in classAbstractEntityRef<T extends Feature>
- Returns:
- a
EntityInteractorChangeListener
object.
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListener
in interfaceEntity<I extends Interaction>
- Overrides:
setChangeListener
in classAbstractEntityRef<T extends Feature>
- Parameters:
listener
- : the entity change listener
-
addFeature
public boolean addFeature(T feature)
addFeature.
- Specified by:
addFeature
in interfaceEntity<I extends Interaction>
- Overrides:
addFeature
in classAbstractEntityRef<T extends Feature>
- Parameters:
feature
- a T object.- Returns:
- a boolean.
-
removeFeature
public boolean removeFeature(T feature)
removeFeature.
- Specified by:
removeFeature
in interfaceEntity<I extends Interaction>
- Overrides:
removeFeature
in classAbstractEntityRef<T extends Feature>
- Parameters:
feature
- a T object.- Returns:
- a boolean.
-
addAllFeatures
public boolean addAllFeatures(Collection<? extends T> features)
This method will add all features and set the entity of the new features to this current entity- Specified by:
addAllFeatures
in interfaceEntity<I extends Interaction>
- Overrides:
addAllFeatures
in classAbstractEntityRef<T extends Feature>
- Parameters:
features
- : features to add- Returns:
- true if features are added to the list of features
-
removeAllFeatures
public boolean removeAllFeatures(Collection<? extends T> features)
This method will remove all the features and set the entity of the removed features to null.- Specified by:
removeAllFeatures
in interfaceEntity<I extends Interaction>
- Overrides:
removeAllFeatures
in classAbstractEntityRef<T extends Feature>
- Parameters:
features
- : features to remove- Returns:
- true if features are removed from the list of features
-
setId
public void setId(int id)
setId.
- Specified by:
setId
in interfaceExtendedPsiXmlEntity<I extends Interaction>
- Overrides:
setId
in classAbstractEntityRef<T extends Feature>
- Parameters:
id
- a int.
-
getId
public int getId()
getId.
- Specified by:
getId
in interfaceExtendedPsiXmlEntity<I extends Interaction>
- Overrides:
getId
in classAbstractEntityRef<T extends Feature>
- Returns:
- a int.
-
getShortName
public String getShortName()
The short name of the entity. It can be null or empty.- Specified by:
getShortName
in interfaceNamedParticipant<I extends Interaction,T extends Feature>
- Returns:
- the short name
-
setShortName
public void setShortName(String name)
Sets the short name of an entity- Specified by:
setShortName
in interfaceNamedParticipant<I extends Interaction,T extends Feature>
- Parameters:
name
- : short name
-
getFullName
public String getFullName()
The full name of the entity. It can be null- Specified by:
getFullName
in interfaceNamedParticipant<I extends Interaction,T extends Feature>
- Returns:
- the full name
-
setFullName
public void setFullName(String name)
Sets the full name of the entity- Specified by:
setFullName
in interfaceNamedParticipant<I extends Interaction,T extends Feature>
- Parameters:
name
- : full name
-
toString
public String toString()
toString
- Specified by:
toString
in interfaceFileSourceContext
- Overrides:
toString
in classAbstractEntityRef<T extends Feature>
- Returns:
- the file source context as a String. If the source locator is not null, it should give the source locator properties
-
getDelegate
protected ExtendedPsiXmlParticipant<I,T> getDelegate()
Getter for the field
delegate
.- Overrides:
getDelegate
in classAbstractEntityRef<T extends Feature>
- Returns:
- a
ExtendedPsiXmlSource
object.
-
-