Class XmlParticipantWrapper
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.extension.xml300.XmlParticipantWrapper
-
- All Implemented Interfaces:
FileSourceContext
,Entity<ModelledFeature>
,ModelledEntity
,ModelledParticipant
,NamedParticipant<ModelledInteraction,ModelledFeature>
,Participant<ModelledInteraction,ModelledFeature>
,ExtendedPsiXmlEntity<ModelledFeature>
- Direct Known Subclasses:
XmlParticipantPoolWrapper
public class XmlParticipantWrapper extends Object implements ModelledParticipant, FileSourceContext, ExtendedPsiXmlEntity<ModelledFeature>, NamedParticipant<ModelledInteraction,ModelledFeature>
Wrapper for XmlParticipant- Since:
30/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
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 XmlParticipantWrapper(ExtendedPsiXmlParticipant part, ModelledInteraction wrapper)
Constructor for XmlParticipantWrapper.
-
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 entityList<Alias>
getAliases()
Collection of aliases which give more information about the participant.Collection<Annotation>
getAnnotations()
Collection of annotations describing the participant.CvTerm
getBiologicalEffect()
The biological effect of the participant in a causal interaction.CvTerm
getBiologicalRole()
The biological role of the participant.Collection<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.String
getFullName()
The full name of the entity.int
getId()
getId.ModelledInteraction
getInteraction()
The interaction in which the participant is involved.Interactor
getInteractor()
The molecule/complex of molecules which interacts.String
getShortName()
The short name of the entity.FileSourceLocator
getSourceLocator()
The locator of a position in a file.Stoichiometry
getStoichiometry()
The stoichiometry for this participant.ExtendedPsiXmlParticipant<Interaction,Feature>
getWrappedParticipant()
getWrappedParticipant.Collection<Xref>
getXrefs()
Collection of cross references which give more information about the participant.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
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(ModelledInteraction interaction)
Sets the interaction.void
setInteractionAndAddParticipant(ModelledInteraction interaction)
Sets the Interaction and add the new Participant to its list of Participants.void
setInteractor(Interactor interactor)
Sets the interactorvoid
setShortName(String name)
Sets the short name of an entityvoid
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
-
XmlParticipantWrapper
public XmlParticipantWrapper(ExtendedPsiXmlParticipant part, ModelledInteraction wrapper)
Constructor for XmlParticipantWrapper.
- Parameters:
part
- aExtendedPsiXmlParticipant
object.wrapper
- aModelledInteraction
object.
-
-
Method Detail
-
getAliases
public List<Alias> getAliases()
Collection of aliases which give more information about the participant. The set of aliases cannot be null. If the participant does not have any aliases, the method should return an empty Collection. Ex: author assigned name, ...- Specified by:
getAliases
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the xrefs
-
getXrefs
public Collection<Xref> getXrefs()
Collection of cross references which give more information about the participant. The set of xrefs cannot be null. If the participant does not have any xrefs, the method should return an empty Collection. Ex: author identifiers, ...- Specified by:
getXrefs
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the xrefs
-
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
-
getAnnotations
public Collection<Annotation> getAnnotations()
Collection of annotations describing the participant. The set cannot be null. If the participant does not have any annotations, the method should return an empty Collection.- Specified by:
getAnnotations
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the annotations
-
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
-
getBiologicalRole
public CvTerm getBiologicalRole()
The biological role of the participant. It is a controlled vocabulary term and cannot be null. It the biological role of a participant is not known or not relevant, the method should return unspecified role (MI:0499) Ex: enzyme, enzyme target, ...- Specified by:
getBiologicalRole
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the biological role
-
setBiologicalRole
public void setBiologicalRole(CvTerm bioRole)
Sets the biological role. If the bioRole is null, should create a bioRole- Specified by:
setBiologicalRole
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- 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<ModelledInteraction,ModelledFeature>
- 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<ModelledInteraction,ModelledFeature>
- Parameters:
biologicalEffect
- : biological effect
-
initialiseFeatures
protected void initialiseFeatures()
initialiseFeatures.
-
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
-
getWrappedParticipant
public ExtendedPsiXmlParticipant<Interaction,Feature> getWrappedParticipant()
getWrappedParticipant.
- Returns:
- a
ExtendedPsiXmlParticipant
object.
-
setInteractionAndAddParticipant
public void setInteractionAndAddParticipant(ModelledInteraction 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<ModelledInteraction,ModelledFeature>
- Parameters:
interaction
- : interaction
-
getInteraction
public ModelledInteraction 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<ModelledInteraction,ModelledFeature>
- Returns:
- the interaction
-
setInteraction
public void setInteraction(ModelledInteraction interaction)
Sets the interaction.- Specified by:
setInteraction
in interfaceParticipant<ModelledInteraction,ModelledFeature>
- Parameters:
interaction
- : interaction
-
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.
-
getShortName
public String getShortName()
The short name of the entity. It can be null or empty.- Specified by:
getShortName
in interfaceNamedParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the short name
-
setShortName
public void setShortName(String name)
Sets the short name of an entity- Specified by:
setShortName
in interfaceNamedParticipant<ModelledInteraction,ModelledFeature>
- Parameters:
name
- : short name
-
getFullName
public String getFullName()
The full name of the entity. It can be null- Specified by:
getFullName
in interfaceNamedParticipant<ModelledInteraction,ModelledFeature>
- Returns:
- the full name
-
setFullName
public void setFullName(String name)
Sets the full name of the entity- Specified by:
setFullName
in interfaceNamedParticipant<ModelledInteraction,ModelledFeature>
- Parameters:
name
- : full name
-
-