Class XmlParticipantCandidateWrapper
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.extension.xml300.XmlParticipantCandidateWrapper
-
- All Implemented Interfaces:
FileSourceContext,Entity<ModelledFeature>,ModelledEntity,ModelledParticipantCandidate,ParticipantCandidate<ModelledParticipantPool,ModelledFeature>,ExtendedPsiXmlEntity<ModelledFeature>
public class XmlParticipantCandidateWrapper extends Object implements ModelledParticipantCandidate, ExtendedPsiXmlEntity<ModelledFeature>, FileSourceContext
Wrapper for XmlParticipantCandidate so it implements ModelledParticipantCanidate- Since:
30/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description XmlParticipantCandidateWrapper(ParticipantCandidate part, ModelledParticipantPool parent)Constructor for XmlParticipantCandidateWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllFeatures(Collection<? extends ModelledFeature> features)This method will add all features and set the entity of the new features to this current entitybooleanaddFeature(ModelledFeature feature)This method will add the feature and set the entity of the new feature to this current entityCollection<CausalRelationship>getCausalRelationships()The causal relationships of this entity on other entities usually part of an interaction.EntityInteractorChangeListenergetChangeListener()The entity change listener if set, null otherwise.Collection<ModelledFeature>getFeatures()Properties for this entity.intgetId()getId.InteractorgetInteractor()The molecule/complex of molecules which interacts.ModelledParticipantPoolgetParentPool()The participant pool parent with which the candidate is involved.FileSourceLocatorgetSourceLocator()The locator of a position in a file.StoichiometrygetStoichiometry()The stoichiometry for this participant.ParticipantCandidate<ParticipantPool,Feature>getWrappedParticipant()getWrappedParticipant.protected voidinitialiseFeatures()initialiseFeatures.booleanremoveAllFeatures(Collection<? extends ModelledFeature> features)This method will remove all the features and set the entity of the removed features to null.booleanremoveFeature(ModelledFeature feature)This method will remove the feature and set the entity of the removed feature to null.voidsetChangeListener(EntityInteractorChangeListener listener)Sets the entity change listenervoidsetId(int id)setId.voidsetInteractor(Interactor interactor)Sets the interactorvoidsetParentPool(ModelledParticipantPool pool)Sets the participant pool parent.voidsetSourceLocator(FileSourceLocator locator)Sets the source locatorvoidsetStoichiometry(Integer stoichiometry)Sets the mean stoichiometry for this participant.voidsetStoichiometry(Stoichiometry stoichiometry)Sets the stoichiometry for this participant.StringtoString()toString
-
-
-
Constructor Detail
-
XmlParticipantCandidateWrapper
public XmlParticipantCandidateWrapper(ParticipantCandidate part, ModelledParticipantPool parent)
Constructor for XmlParticipantCandidateWrapper.
- Parameters:
part- aParticipantCandidateobject.parent- aModelledParticipantPoolobject.
-
-
Method Detail
-
getInteractor
public Interactor getInteractor()
The molecule/complex of molecules which interacts. It cannot be null.- Specified by:
getInteractorin interfaceEntity<ModelledFeature>- Returns:
- the interactor
-
setInteractor
public void setInteractor(Interactor interactor)
Sets the interactor- Specified by:
setInteractorin interfaceEntity<ModelledFeature>- Parameters:
interactor- : interactor
-
getCausalRelationships
public Collection<CausalRelationship> getCausalRelationships()
The causal relationships of this entity on other entities usually part of an interaction. The set of causal relationship cannot be null. If the entity does not have any causal relationship, the method should return an empty Collection. Ex: increasing, decreasing, disrupting, etc.- Specified by:
getCausalRelationshipsin interfaceEntity<ModelledFeature>- Returns:
- the collection of causal relationships attached to this entity
-
getStoichiometry
public Stoichiometry getStoichiometry()
The stoichiometry for this participant. If the stoichiometry for this participant is unknown, the method should return null.- Specified by:
getStoichiometryin interfaceEntity<ModelledFeature>- Returns:
- the stoichiometry
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometryin interfaceEntity<ModelledFeature>- Parameters:
stoichiometry- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
Sets the stoichiometry for this participant.- Specified by:
setStoichiometryin interfaceEntity<ModelledFeature>- Parameters:
stoichiometry- : the stoichiometry
-
getFeatures
public Collection<ModelledFeature> getFeatures()
Properties for this entity. The collection cannot be null. If the entity does not have any features, the method should return an empty collection.- Specified by:
getFeaturesin interfaceEntity<ModelledFeature>- Returns:
- the features
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListenerin interfaceEntity<ModelledFeature>- Parameters:
listener- : the entity change listener
-
addFeature
public boolean addFeature(ModelledFeature feature)
This method will add the feature and set the entity of the new feature to this current entity- Specified by:
addFeaturein interfaceEntity<ModelledFeature>- Parameters:
feature- : feature to add- Returns:
- true if feature is added to the list of features
-
removeFeature
public boolean removeFeature(ModelledFeature feature)
This method will remove the feature and set the entity of the removed feature to null.- Specified by:
removeFeaturein interfaceEntity<ModelledFeature>- Parameters:
feature- : feature to remove- Returns:
- true if feature is removed from the list of features
-
addAllFeatures
public boolean addAllFeatures(Collection<? extends ModelledFeature> features)
This method will add all features and set the entity of the new features to this current entity- Specified by:
addAllFeaturesin interfaceEntity<ModelledFeature>- Parameters:
features- : features to add- Returns:
- true if features are added to the list of features
-
removeAllFeatures
public boolean removeAllFeatures(Collection<? extends ModelledFeature> features)
This method will remove all the features and set the entity of the removed features to null.- Specified by:
removeAllFeaturesin interfaceEntity<ModelledFeature>- Parameters:
features- : features to remove- Returns:
- true if features are removed from the list of features
-
getChangeListener
public EntityInteractorChangeListener getChangeListener()
The entity change listener if set, null otherwise. The entity change listener listen to changes in entity (interactor changes)- Specified by:
getChangeListenerin interfaceEntity<ModelledFeature>- Returns:
- the participant change listener
-
initialiseFeatures
protected void initialiseFeatures()
initialiseFeatures.
-
getSourceLocator
public FileSourceLocator getSourceLocator()
The locator of a position in a file. It can be null- Specified by:
getSourceLocatorin interfaceFileSourceContext- Returns:
- the file locator
-
setSourceLocator
public void setSourceLocator(FileSourceLocator locator)
Sets the source locator- Specified by:
setSourceLocatorin interfaceFileSourceContext- Parameters:
locator- : the file locator
-
toString
public String toString()
toString
- Specified by:
toStringin interfaceFileSourceContext- Overrides:
toStringin classObject- Returns:
- the file source context as a String. If the source locator is not null, it should give the source locator properties
-
getWrappedParticipant
public ParticipantCandidate<ParticipantPool,Feature> getWrappedParticipant()
getWrappedParticipant.
- Returns:
- a
ParticipantCandidateobject.
-
getParentPool
public ModelledParticipantPool getParentPool()
The participant pool parent with which the candidate is involved. It can be null if the participant candidate is not part of any participant pool. It can happen if the participant candidate has been removed from a participant pool and is now invalid.- Specified by:
getParentPoolin interfaceParticipantCandidate<ModelledParticipantPool,ModelledFeature>- Returns:
- the participant pool parent
-
setParentPool
public void setParentPool(ModelledParticipantPool pool)
Sets the participant pool parent.- Specified by:
setParentPoolin interfaceParticipantCandidate<ModelledParticipantPool,ModelledFeature>- Parameters:
pool- : participant pool
-
getId
public int getId()
getId.
- Specified by:
getIdin interfaceExtendedPsiXmlEntity<ModelledFeature>- Returns:
- a int.
-
setId
public void setId(int id)
setId.
- Specified by:
setIdin interfaceExtendedPsiXmlEntity<ModelledFeature>- Parameters:
id- a int.
-
-