Class XmlParticipantWrapper
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.extension.xml253.XmlParticipantWrapper
-
- All Implemented Interfaces:
FileSourceContext,Entity<ModelledFeature>,ModelledEntity,ModelledParticipant,NamedParticipant<ModelledInteraction,ModelledFeature>,Participant<ModelledInteraction,ModelledFeature>,ExtendedPsiXmlEntity<ModelledFeature>,ExtendedPsiXmlParticipant<ModelledInteraction,ModelledFeature>
- Direct Known Subclasses:
XmlParticipantPoolWrapper
public class XmlParticipantWrapper extends Object implements ModelledParticipant, ExtendedPsiXmlParticipant<ModelledInteraction,ModelledFeature>, FileSourceContext
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 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 entityList<Alias>getAliases()Collection of aliases which give more information about the participant.Collection<Annotation>getAnnotations()Collection of annotations describing the participant.CvTermgetBiologicalEffect()The biological effect of the participant in a causal interaction.CvTermgetBiologicalRole()The biological role of the participant.Collection<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.StringgetFullName()The full name of the entity.intgetId()getId.ModelledInteractiongetInteraction()The interaction in which the participant is involved.InteractorgetInteractor()The molecule/complex of molecules which interacts.StringgetShortName()The short name of the entity.FileSourceLocatorgetSourceLocator()The locator of a position in a file.StoichiometrygetStoichiometry()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 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.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(ModelledInteraction interaction)Sets the interaction.voidsetInteractionAndAddParticipant(ModelledInteraction interaction)Sets the Interaction and add the new Participant to its list of Participants.voidsetInteractor(Interactor interactor)Sets the interactorvoidsetShortName(String name)Sets the short name of an entityvoidsetSourceLocator(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
-
XmlParticipantWrapper
public XmlParticipantWrapper(ExtendedPsiXmlParticipant part, ModelledInteraction wrapper)
Constructor for XmlParticipantWrapper.
- Parameters:
part- aExtendedPsiXmlParticipantobject.wrapper- aModelledInteractionobject.
-
-
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:
getAliasesin 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:
getXrefsin interfaceParticipant<ModelledInteraction,ModelledFeature>- Returns:
- the xrefs
-
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
-
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:
getAnnotationsin 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:
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
-
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:
getBiologicalRolein 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:
setBiologicalRolein 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:
getBiologicalEffectin 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:
setBiologicalEffectin interfaceParticipant<ModelledInteraction,ModelledFeature>- Parameters:
biologicalEffect- : biological effect
-
initialiseFeatures
protected void initialiseFeatures()
initialiseFeatures.
-
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 ExtendedPsiXmlParticipant<Interaction,Feature> getWrappedParticipant()
getWrappedParticipant.
- Returns:
- a
ExtendedPsiXmlParticipantobject.
-
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:
setInteractionAndAddParticipantin 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:
getInteractionin interfaceParticipant<ModelledInteraction,ModelledFeature>- Returns:
- the interaction
-
setInteraction
public void setInteraction(ModelledInteraction interaction)
Sets the interaction.- Specified by:
setInteractionin interfaceParticipant<ModelledInteraction,ModelledFeature>- Parameters:
interaction- : interaction
-
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
-
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.
-
getShortName
public String getShortName()
The short name of the entity. It can be null or empty.- Specified by:
getShortNamein interfaceNamedParticipant<ModelledInteraction,ModelledFeature>- Returns:
- the short name
-
setShortName
public void setShortName(String name)
Sets the short name of an entity- Specified by:
setShortNamein interfaceNamedParticipant<ModelledInteraction,ModelledFeature>- Parameters:
name- : short name
-
getFullName
public String getFullName()
The full name of the entity. It can be null- Specified by:
getFullNamein interfaceNamedParticipant<ModelledInteraction,ModelledFeature>- Returns:
- the full name
-
setFullName
public void setFullName(String name)
Sets the full name of the entity- Specified by:
setFullNamein interfaceNamedParticipant<ModelledInteraction,ModelledFeature>- Parameters:
name- : full name
-
-