Package psidev.psi.mi.jami.model.impl
Class AbstractEntity<F extends Feature>
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.AbstractEntity<F>
-
- All Implemented Interfaces:
Entity<F>
- Direct Known Subclasses:
AbstractParticipant,AbstractParticipantCandidate
public abstract class AbstractEntity<F extends Feature> extends Object implements Entity<F>
Abstract class for Entity- Since:
09/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractEntity(Interactor interactor)Constructor for AbstractEntity.AbstractEntity(Interactor interactor, Stoichiometry stoichiometry)Constructor for AbstractEntity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllFeatures(Collection<? extends F> features)This method will add all features and set the entity of the new features to this current entitybooleanaddFeature(F feature)addFeatureCollection<CausalRelationship>getCausalRelationships()Getter for the fieldcausalRelationships.EntityInteractorChangeListenergetChangeListener()Getter for the fieldchangeListener.Collection<F>getFeatures()Getter for the fieldfeatures.InteractorgetInteractor()Getter for the fieldinteractor.StoichiometrygetStoichiometry()Getter for the fieldstoichiometry.protected voidinitialiseCausalRelationships()initialiseCausalRelationshipsprotected voidinitialiseCausalRelationshipsWith(Collection<CausalRelationship> relationships)initialiseCausalRelationshipsWithprotected voidinitialiseFeatures()initialiseFeaturesprotected voidinitialiseFeaturesWith(Collection<F> features)initialiseFeaturesWithbooleanremoveAllFeatures(Collection<? extends F> features)This method will remove all the features and set the entity of the removed features to null.booleanremoveFeature(F feature)removeFeaturevoidsetChangeListener(EntityInteractorChangeListener listener)Sets the entity change listenervoidsetInteractor(Interactor interactor)Sets the interactorvoidsetStoichiometry(Integer stoichiometry)Sets the mean stoichiometry for this participant.voidsetStoichiometry(Stoichiometry stoichiometry)Setter for the fieldstoichiometry.StringtoString()
-
-
-
Constructor Detail
-
AbstractEntity
public AbstractEntity(Interactor interactor)
Constructor for AbstractEntity.
- Parameters:
interactor- aInteractorobject.
-
AbstractEntity
public AbstractEntity(Interactor interactor, Stoichiometry stoichiometry)
Constructor for AbstractEntity.
- Parameters:
interactor- aInteractorobject.stoichiometry- aStoichiometryobject.
-
-
Method Detail
-
initialiseFeatures
protected void initialiseFeatures()
initialiseFeatures
-
initialiseCausalRelationships
protected void initialiseCausalRelationships()
initialiseCausalRelationships
-
initialiseCausalRelationshipsWith
protected void initialiseCausalRelationshipsWith(Collection<CausalRelationship> relationships)
initialiseCausalRelationshipsWith
- Parameters:
relationships- aCollectionobject.
-
initialiseFeaturesWith
protected void initialiseFeaturesWith(Collection<F> features)
initialiseFeaturesWith
- Parameters:
features- aCollectionobject.
-
getInteractor
public Interactor getInteractor()
Getter for the field
interactor.- Specified by:
getInteractorin interfaceEntity<F extends Feature>- Returns:
- a
Interactorobject.
-
setInteractor
public void setInteractor(Interactor interactor)
Sets the interactor- Specified by:
setInteractorin interfaceEntity<F extends Feature>- Parameters:
interactor- : interactor
-
getCausalRelationships
public Collection<CausalRelationship> getCausalRelationships()
Getter for the field
causalRelationships.- Specified by:
getCausalRelationshipsin interfaceEntity<F extends Feature>- Returns:
- a
Collectionobject.
-
getStoichiometry
public Stoichiometry getStoichiometry()
Getter for the field
stoichiometry.- Specified by:
getStoichiometryin interfaceEntity<F extends Feature>- Returns:
- a
Stoichiometryobject.
-
setStoichiometry
public void setStoichiometry(Integer stoichiometry)
Sets the mean stoichiometry for this participant.- Specified by:
setStoichiometryin interfaceEntity<F extends Feature>- Parameters:
stoichiometry- : mean stoichiometry value
-
setStoichiometry
public void setStoichiometry(Stoichiometry stoichiometry)
Setter for the field
stoichiometry.- Specified by:
setStoichiometryin interfaceEntity<F extends Feature>- Parameters:
stoichiometry- aStoichiometryobject.
-
getFeatures
public Collection<F> getFeatures()
Getter for the field
features.- Specified by:
getFeaturesin interfaceEntity<F extends Feature>- Returns:
- a
Collectionobject.
-
getChangeListener
public EntityInteractorChangeListener getChangeListener()
Getter for the field
changeListener.- Specified by:
getChangeListenerin interfaceEntity<F extends Feature>- Returns:
- a
EntityInteractorChangeListenerobject.
-
setChangeListener
public void setChangeListener(EntityInteractorChangeListener listener)
Sets the entity change listener- Specified by:
setChangeListenerin interfaceEntity<F extends Feature>- Parameters:
listener- : the entity change listener
-
addFeature
public boolean addFeature(F feature)
addFeature
- Specified by:
addFeaturein interfaceEntity<F extends Feature>- Parameters:
feature- a F object.- Returns:
- a boolean.
-
removeFeature
public boolean removeFeature(F feature)
removeFeature
- Specified by:
removeFeaturein interfaceEntity<F extends Feature>- Parameters:
feature- a F object.- Returns:
- a boolean.
-
addAllFeatures
public boolean addAllFeatures(Collection<? extends F> features)
This method will add all features and set the entity of the new features to this current entity- Specified by:
addAllFeaturesin interfaceEntity<F extends Feature>- Parameters:
features- : features to add- Returns:
- true if features are added to the list of features
-
removeAllFeatures
public boolean removeAllFeatures(Collection<? extends F> features)
This method will remove all the features and set the entity of the removed features to null.- Specified by:
removeAllFeaturesin interfaceEntity<F extends Feature>- Parameters:
features- : features to remove- Returns:
- true if features are removed from the list of features
-
-