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.xml253.AbstractEntityRef<T>
-
- psidev.psi.mi.jami.xml.model.reference.xml253.AbstractParticipantRef<I,T>
-
- All Implemented Interfaces:
FileSourceContext,Entity<T>,NamedParticipant<I,T>,Participant<I,T>,ExtendedPsiXmlEntity<T>,ExtendedPsiXmlParticipant<I,T>,XmlIdReference
public abstract class AbstractParticipantRef<I extends Interaction,T extends Feature> extends AbstractEntityRef<T> implements ExtendedPsiXmlParticipant<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 booleanaddAllFeatures(Collection<? extends T> features)This method will add all features and set the entity of the new features to this current entitybooleanaddFeature(T feature)addFeature.Collection<Alias>getAliases()getAliases.Collection<Annotation>getAnnotations()getAnnotations.CvTermgetBiologicalEffect()The biological effect of the participant in a causal interaction.CvTermgetBiologicalRole()getBiologicalRole.EntityInteractorChangeListenergetChangeListener()getChangeListener.protected ExtendedPsiXmlParticipant<I,T>getDelegate()Getter for the fielddelegate.Collection<T>getFeatures()getFeatures.StringgetFullName()The full name of the entity.intgetId()getId.IgetInteraction()The interaction in which the participant is involved.StringgetShortName()The short name of the entity.StoichiometrygetStoichiometry()getStoichiometry.Collection<Xref>getXrefs()getXrefs.booleanremoveAllFeatures(Collection<? extends T> features)This method will remove all the features and set the entity of the removed features to null.booleanremoveFeature(T feature)removeFeature.voidsetBiologicalEffect(CvTerm biologicalEffect)Sets the biological effect of the participant in a causal interaction.voidsetBiologicalRole(CvTerm bioRole)Sets the biological role.voidsetChangeListener(EntityInteractorChangeListener listener)Sets the entity change listenervoidsetFullName(String name)Sets the full name of the entityvoidsetId(int id)setId.voidsetInteraction(I interaction)Sets the interaction.voidsetInteractionAndAddParticipant(I interaction)Sets the Interaction and add the new Participant to its list of Participants.voidsetShortName(String name)Sets the short name of an entityvoidsetStoichiometry(Integer stoichiometry)Sets the mean stoichiometry for this participant.voidsetStoichiometry(Stoichiometry stoichiometry)setStoichiometry.StringtoString()toString-
Methods inherited from class psidev.psi.mi.jami.xml.model.reference.xml253.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:
setInteractionAndAddParticipantin 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:
getInteractionin interfaceParticipant<I extends Interaction,T extends Feature>- Returns:
- the interaction
-
setInteraction
public void setInteraction(I interaction)
Sets the interaction.- Specified by:
setInteractionin interfaceParticipant<I extends Interaction,T extends Feature>- Parameters:
interaction- : interaction
-
getBiologicalRole
public CvTerm getBiologicalRole()
getBiologicalRole.
- Specified by:
getBiologicalRolein interfaceParticipant<I extends Interaction,T extends Feature>- Returns:
- a
CvTermobject.
-
setBiologicalRole
public void setBiologicalRole(CvTerm bioRole)
Sets the biological role. If the bioRole is null, should create a bioRole- Specified by:
setBiologicalRolein 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:
getBiologicalEffectin 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:
setBiologicalEffectin interfaceParticipant<I extends Interaction,T extends Feature>- Parameters:
biologicalEffect- : biological effect
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs.
- Specified by:
getXrefsin interfaceParticipant<I extends Interaction,T extends Feature>- Returns:
- a
Collectionobject.
-
getAnnotations
public Collection<Annotation> getAnnotations()
getAnnotations.
- Specified by:
getAnnotationsin interfaceParticipant<I extends Interaction,T extends Feature>- Returns:
- a
Collectionobject.
-
getAliases
public Collection<Alias> getAliases()
getAliases.
- Specified by:
getAliasesin interfaceParticipant<I extends Interaction,T extends Feature>- Returns:
- a
Collectionobject.
-
getStoichiometry
public Stoichiometry getStoichiometry()
getStoichiometry.
- Specified by:
getStoichiometryin interfaceEntity<I extends Interaction>- Overrides:
getStoichiometryin classAbstractEntityRef<T extends Feature>- Returns:
- a
Stoichiometryobject.
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometryin interfaceEntity<I extends Interaction>- Overrides:
setStoichiometryin classAbstractEntityRef<T extends Feature>- Parameters:
stoichiometry- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
setStoichiometry.
- Specified by:
setStoichiometryin interfaceEntity<I extends Interaction>- Overrides:
setStoichiometryin classAbstractEntityRef<T extends Feature>- Parameters:
stoichiometry- aStoichiometryobject.
-
getFeatures
public Collection<T> getFeatures()
getFeatures.
- Specified by:
getFeaturesin interfaceEntity<I extends Interaction>- Overrides:
getFeaturesin classAbstractEntityRef<T extends Feature>- Returns:
- a
Collectionobject.
-
getChangeListener
public EntityInteractorChangeListener getChangeListener()
getChangeListener.
- Specified by:
getChangeListenerin interfaceEntity<I extends Interaction>- Overrides:
getChangeListenerin classAbstractEntityRef<T extends Feature>- Returns:
- a
EntityInteractorChangeListenerobject.
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListenerin interfaceEntity<I extends Interaction>- Overrides:
setChangeListenerin classAbstractEntityRef<T extends Feature>- Parameters:
listener- : the entity change listener
-
addFeature
public boolean addFeature(T feature)
addFeature.
- Specified by:
addFeaturein interfaceEntity<I extends Interaction>- Overrides:
addFeaturein classAbstractEntityRef<T extends Feature>- Parameters:
feature- a T object.- Returns:
- a boolean.
-
removeFeature
public boolean removeFeature(T feature)
removeFeature.
- Specified by:
removeFeaturein interfaceEntity<I extends Interaction>- Overrides:
removeFeaturein 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:
addAllFeaturesin interfaceEntity<I extends Interaction>- Overrides:
addAllFeaturesin 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:
removeAllFeaturesin interfaceEntity<I extends Interaction>- Overrides:
removeAllFeaturesin 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:
setIdin interfaceExtendedPsiXmlEntity<I extends Interaction>- Overrides:
setIdin classAbstractEntityRef<T extends Feature>- Parameters:
id- a int.
-
getId
public int getId()
getId.
- Specified by:
getIdin interfaceExtendedPsiXmlEntity<I extends Interaction>- Overrides:
getIdin 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:
getShortNamein 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:
setShortNamein 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:
getFullNamein 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:
setFullNamein interfaceNamedParticipant<I extends Interaction,T extends Feature>- Parameters:
name- : full name
-
toString
public String toString()
toString
- Specified by:
toStringin interfaceFileSourceContext- Overrides:
toStringin 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:
getDelegatein classAbstractEntityRef<T extends Feature>- Returns:
- a
ExtendedPsiXmlSourceobject.
-
-