Class AbstractEntityRef<T extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.xml.model.reference.AbstractXmlIdReference
-
- psidev.psi.mi.jami.xml.model.reference.xml254.AbstractEntityRef<T>
-
- All Implemented Interfaces:
FileSourceContext,Entity<T>,ExtendedPsiXmlEntity<T>,XmlIdReference
- Direct Known Subclasses:
AbstractParticipantRef
public abstract class AbstractEntityRef<T extends Feature> extends AbstractXmlIdReference implements ExtendedPsiXmlEntity<T>
Abstract entity 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
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityRef(int ref)Constructor for AbstractEntityRef.
-
Method Summary
All Methods Instance Methods Abstract 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<CausalRelationship>getCausalRelationships()getCausalRelationships.EntityInteractorChangeListenergetChangeListener()getChangeListener.protected ExtendedPsiXmlEntity<T>getDelegate()Getter for the fielddelegate.Collection<T>getFeatures()getFeatures.intgetId()getId.InteractorgetInteractor()getInteractor.StoichiometrygetStoichiometry()getStoichiometry.protected abstract voidinitialiseParticipantDelegate()initialiseParticipantDelegate.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.voidsetChangeListener(EntityInteractorChangeListener listener)Sets the entity change listenerprotected voidsetDelegate(ExtendedPsiXmlEntity<T> delegate)Setter for the fielddelegate.voidsetId(int id)setId.voidsetInteractor(Interactor interactor)Sets the interactorvoidsetStoichiometry(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.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.datasource.FileSourceContext
getSourceLocator, setSourceLocator
-
Methods inherited from interface psidev.psi.mi.jami.xml.model.reference.XmlIdReference
resolve
-
-
-
-
Method Detail
-
getInteractor
public Interactor getInteractor()
getInteractor.
- Specified by:
getInteractorin interfaceEntity<T extends Feature>- Returns:
- a
Interactorobject.
-
setInteractor
public void setInteractor(Interactor interactor)
Sets the interactor- Specified by:
setInteractorin interfaceEntity<T extends Feature>- Parameters:
interactor- : interactor
-
getCausalRelationships
public Collection<CausalRelationship> getCausalRelationships()
getCausalRelationships.
- Specified by:
getCausalRelationshipsin interfaceEntity<T extends Feature>- Returns:
- a
Collectionobject.
-
getStoichiometry
public Stoichiometry getStoichiometry()
getStoichiometry.
- Specified by:
getStoichiometryin interfaceEntity<T extends Feature>- Returns:
- a
Stoichiometryobject.
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometryin interfaceEntity<T extends Feature>- Parameters:
stoichiometry- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
setStoichiometry.
- Specified by:
setStoichiometryin interfaceEntity<T extends Feature>- Parameters:
stoichiometry- aStoichiometryobject.
-
getFeatures
public Collection<T> getFeatures()
getFeatures.
- Specified by:
getFeaturesin interfaceEntity<T extends Feature>- Returns:
- a
Collectionobject.
-
getChangeListener
public EntityInteractorChangeListener getChangeListener()
getChangeListener.
- Specified by:
getChangeListenerin interfaceEntity<T extends Feature>- Returns:
- a
EntityInteractorChangeListenerobject.
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListenerin interfaceEntity<T extends Feature>- Parameters:
listener- : the entity change listener
-
addFeature
public boolean addFeature(T feature)
addFeature.
- Specified by:
addFeaturein interfaceEntity<T extends Feature>- Parameters:
feature- a T object.- Returns:
- a boolean.
-
removeFeature
public boolean removeFeature(T feature)
removeFeature.
- Specified by:
removeFeaturein interfaceEntity<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<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<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<T extends Feature>- Parameters:
id- a int.
-
getId
public int getId()
getId.
- Specified by:
getIdin interfaceExtendedPsiXmlEntity<T extends Feature>- Returns:
- a int.
-
toString
public String toString()
toString
- Specified by:
toStringin interfaceFileSourceContext- Overrides:
toStringin classAbstractXmlIdReference- Returns:
- the file source context as a String. If the source locator is not null, it should give the source locator properties
-
initialiseParticipantDelegate
protected abstract void initialiseParticipantDelegate()
initialiseParticipantDelegate.
-
getDelegate
protected ExtendedPsiXmlEntity<T> getDelegate()
Getter for the field
delegate.- Returns:
- a
ExtendedPsiXmlSourceobject.
-
setDelegate
protected void setDelegate(ExtendedPsiXmlEntity<T> delegate)
Setter for the field
delegate.- Parameters:
delegate- aExtendedPsiXmlSourceobject.
-
-