Class XmlExperimentalParticipantCandidateWrapper
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.extension.xml253.XmlExperimentalParticipantCandidateWrapper
-
- All Implemented Interfaces:
FileSourceContext
,Entity<ModelledFeature>
,ModelledEntity
,ModelledParticipantCandidate
,ParticipantCandidate<ModelledParticipantPool,ModelledFeature>
,ExtendedPsiXmlEntity<ModelledFeature>
public class XmlExperimentalParticipantCandidateWrapper extends Object implements ModelledParticipantCandidate, ExtendedPsiXmlEntity<ModelledFeature>, FileSourceContext
Wrapper for Xml participants candidates Addeding new modelled feature to this participant will not add new feature evidences to the wrapped participant evidence as they are incompatibles.- Since:
11/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description XmlExperimentalParticipantCandidateWrapper(ExperimentalParticipantCandidate part, ModelledParticipantPool wrapper)
Constructor for XmlExperimentalParticipantCandidateWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllFeatures(Collection<? extends ModelledFeature> features)
This method will add all features and set the entity of the new features to this current entityboolean
addFeature(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.EntityInteractorChangeListener
getChangeListener()
The entity change listener if set, null otherwise.Collection<ModelledFeature>
getFeatures()
Properties for this entity.int
getId()
getId.Interactor
getInteractor()
The molecule/complex of molecules which interacts.ModelledParticipantPool
getParentPool()
The participant pool parent with which the candidate is involved.FileSourceLocator
getSourceLocator()
The locator of a position in a file.Stoichiometry
getStoichiometry()
The stoichiometry for this participant.ExperimentalParticipantCandidate
getWrappedParticipant()
getWrappedParticipant.protected void
initialiseFeatures()
initialiseFeatures.boolean
removeAllFeatures(Collection<? extends ModelledFeature> features)
This method will remove all the features and set the entity of the removed features to null.boolean
removeFeature(ModelledFeature feature)
This method will remove the feature and set the entity of the removed feature to null.void
setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listenervoid
setId(int id)
setId.void
setInteractor(Interactor interactor)
Sets the interactorvoid
setParentPool(ModelledParticipantPool pool)
Sets the participant pool parent.void
setSourceLocator(FileSourceLocator locator)
Sets the source locatorvoid
setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.void
setStoichiometry(Stoichiometry stoichiometry)
Sets the stoichiometry for this participant.String
toString()
toString
-
-
-
Constructor Detail
-
XmlExperimentalParticipantCandidateWrapper
public XmlExperimentalParticipantCandidateWrapper(ExperimentalParticipantCandidate part, ModelledParticipantPool wrapper)
Constructor for XmlExperimentalParticipantCandidateWrapper.
- Parameters:
part
- aExperimentalParticipantCandidate
object.wrapper
- aModelledParticipantPool
object.
-
-
Method Detail
-
getInteractor
public Interactor getInteractor()
The molecule/complex of molecules which interacts. It cannot be null.- Specified by:
getInteractor
in interfaceEntity<ModelledFeature>
- Returns:
- the interactor
-
setInteractor
public void setInteractor(Interactor interactor)
Sets the interactor- Specified by:
setInteractor
in 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:
getCausalRelationships
in 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:
getStoichiometry
in interfaceEntity<ModelledFeature>
- Returns:
- the stoichiometry
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometry
in interfaceEntity<ModelledFeature>
- Parameters:
stoichiometry
- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
Sets the stoichiometry for this participant.- Specified by:
setStoichiometry
in 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:
getFeatures
in interfaceEntity<ModelledFeature>
- Returns:
- the features
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListener
in 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:
addFeature
in 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:
removeFeature
in 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:
addAllFeatures
in 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:
removeAllFeatures
in 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:
getChangeListener
in interfaceEntity<ModelledFeature>
- Returns:
- the participant change listener
-
toString
public String toString()
toString
- Specified by:
toString
in interfaceFileSourceContext
- Overrides:
toString
in classObject
- Returns:
- the file source context as a String. If the source locator is not null, it should give the source locator properties
-
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:
getParentPool
in interfaceParticipantCandidate<ModelledParticipantPool,ModelledFeature>
- Returns:
- the participant pool parent
-
setParentPool
public void setParentPool(ModelledParticipantPool pool)
Sets the participant pool parent.- Specified by:
setParentPool
in interfaceParticipantCandidate<ModelledParticipantPool,ModelledFeature>
- Parameters:
pool
- : participant pool
-
getWrappedParticipant
public ExperimentalParticipantCandidate getWrappedParticipant()
getWrappedParticipant.
- Returns:
- a
ExperimentalParticipantCandidate
object.
-
initialiseFeatures
protected void initialiseFeatures()
initialiseFeatures.
-
getSourceLocator
public FileSourceLocator getSourceLocator()
The locator of a position in a file. It can be null- Specified by:
getSourceLocator
in interfaceFileSourceContext
- Returns:
- the file locator
-
setSourceLocator
public void setSourceLocator(FileSourceLocator locator)
Sets the source locator- Specified by:
setSourceLocator
in interfaceFileSourceContext
- Parameters:
locator
- : the file locator
-
getId
public int getId()
getId.
- Specified by:
getId
in interfaceExtendedPsiXmlEntity<ModelledFeature>
- Returns:
- a int.
-
setId
public void setId(int id)
setId.
- Specified by:
setId
in interfaceExtendedPsiXmlEntity<ModelledFeature>
- Parameters:
id
- a int.
-
-