Package psidev.psi.mi.jami.model.impl
Class AbstractParticipantPool<I extends Interaction,F extends Feature,P extends ParticipantCandidate>
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.AbstractEntity<F>
-
- psidev.psi.mi.jami.model.impl.AbstractParticipant<I,F>
-
- psidev.psi.mi.jami.model.impl.AbstractParticipantPool<I,F,P>
-
- All Implemented Interfaces:
Iterable<P>
,Collection<P>
,EventListener
,EntityInteractorChangeListener
,Entity<F>
,Participant<I,F>
,ParticipantPool<I,F,P>
- Direct Known Subclasses:
DefaultExperimentalParticipantPool
,DefaultModelledParticipantPool
,DefaultParticipantPool
public abstract class AbstractParticipantPool<I extends Interaction,F extends Feature,P extends ParticipantCandidate> extends AbstractParticipant<I,F> implements ParticipantPool<I,F,P>, EntityInteractorChangeListener
Abstract class for Participant pool- Since:
09/07/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 AbstractParticipantPool(String poolName)
Constructor for AbstractParticipantPool.AbstractParticipantPool(String poolName, CvTerm bioRole)
Constructor for AbstractParticipantPool.AbstractParticipantPool(String poolName, CvTerm bioRole, Stoichiometry stoichiometry)
Constructor for AbstractParticipantPool.AbstractParticipantPool(String poolName, Stoichiometry stoichiometry)
Constructor for AbstractParticipantPool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(P interactor)
addboolean
addAll(Collection<? extends P> interactors)
void
clear()
clearboolean
contains(Object o)
boolean
containsAll(Collection<?> objects)
InteractorPool
getInteractor()
Getter for the fieldinteractor
.CvTerm
getType()
Getter for the fieldtype
.protected void
initialiseComponentCandidatesSet()
initialiseComponentCandidatesSetprotected void
initialiseComponentCandidatesSetWith(Collection<P> candidates)
initialiseComponentCandidatesSetWithboolean
isEmpty()
isEmptyIterator<P>
iterator()
iteratorvoid
onInteractorUpdate(Entity entity, Interactor oldInteractor)
onInteractorUpdateboolean
remove(Object o)
boolean
removeAll(Collection<?> objects)
boolean
retainAll(Collection<?> objects)
void
setInteractor(Interactor interactor)
Sets the interactorvoid
setType(CvTerm type)
Sets the pool type for this participant pool If the given type is null, this method automatically sets the interactor type to 'molecule set' (MI:1304)int
size()
sizeObject[]
toArray()
toArray<T> T[]
toArray(T[] ts)
toArrayString
toString()
-
Methods inherited from class psidev.psi.mi.jami.model.impl.AbstractParticipant
addAllFeatures, addFeature, getAliases, getAnnotations, getBiologicalEffect, getBiologicalRole, getInteraction, getXrefs, initialiseAliases, initialiseAliasesWith, initialiseAnnotations, initialiseAnnotationsWith, initialiseXrefs, initialiseXrefsWith, removeAllFeatures, removeFeature, setBiologicalEffect, setBiologicalRole, setInteraction, setInteractionAndAddParticipant
-
Methods inherited from class psidev.psi.mi.jami.model.impl.AbstractEntity
getCausalRelationships, getChangeListener, getFeatures, getStoichiometry, initialiseCausalRelationships, initialiseCausalRelationshipsWith, initialiseFeatures, initialiseFeaturesWith, setChangeListener, setStoichiometry, setStoichiometry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Methods inherited from interface psidev.psi.mi.jami.model.Entity
addAllFeatures, addFeature, getCausalRelationships, getChangeListener, getFeatures, getStoichiometry, removeAllFeatures, removeFeature, setChangeListener, setStoichiometry, setStoichiometry
-
Methods inherited from interface psidev.psi.mi.jami.model.Participant
getAliases, getAnnotations, getBiologicalEffect, getBiologicalRole, getInteraction, getXrefs, setBiologicalEffect, setBiologicalRole, setInteraction, setInteractionAndAddParticipant
-
-
-
-
Constructor Detail
-
AbstractParticipantPool
public AbstractParticipantPool(String poolName)
Constructor for AbstractParticipantPool.
- Parameters:
poolName
- aString
object.
-
AbstractParticipantPool
public AbstractParticipantPool(String poolName, CvTerm bioRole)
Constructor for AbstractParticipantPool.
-
AbstractParticipantPool
public AbstractParticipantPool(String poolName, Stoichiometry stoichiometry)
Constructor for AbstractParticipantPool.
- Parameters:
poolName
- aString
object.stoichiometry
- aStoichiometry
object.
-
AbstractParticipantPool
public AbstractParticipantPool(String poolName, CvTerm bioRole, Stoichiometry stoichiometry)
Constructor for AbstractParticipantPool.
- Parameters:
poolName
- aString
object.bioRole
- aCvTerm
object.stoichiometry
- aStoichiometry
object.
-
-
Method Detail
-
initialiseComponentCandidatesSet
protected void initialiseComponentCandidatesSet()
initialiseComponentCandidatesSet
-
initialiseComponentCandidatesSetWith
protected void initialiseComponentCandidatesSetWith(Collection<P> candidates)
initialiseComponentCandidatesSetWith
- Parameters:
candidates
- aCollection
object.
-
getInteractor
public InteractorPool getInteractor()
Getter for the field
interactor
.- Specified by:
getInteractor
in interfaceEntity<I extends Interaction>
- Overrides:
getInteractor
in classAbstractEntity<F extends Feature>
- Returns:
- a
Interactor
object.
-
setInteractor
public void setInteractor(Interactor interactor)
Sets the interactor- Specified by:
setInteractor
in interfaceEntity<I extends Interaction>
- Overrides:
setInteractor
in classAbstractEntity<F extends Feature>
- Parameters:
interactor
- : interactor
-
getType
public CvTerm getType()
Getter for the field
type
.- Specified by:
getType
in interfaceParticipantPool<I extends Interaction,F extends Feature,P extends ParticipantCandidate>
- Returns:
- a
CvTerm
object.
-
setType
public void setType(CvTerm type)
Sets the pool type for this participant pool If the given type is null, this method automatically sets the interactor type to 'molecule set' (MI:1304) Sets the component set type. Sets the type to molecule set (MI:1304) if the given type is null- Specified by:
setType
in interfaceParticipantPool<I extends Interaction,F extends Feature,P extends ParticipantCandidate>
- Parameters:
type
- : molecule type
-
size
public int size()
size
- Specified by:
size
in interfaceCollection<I extends Interaction>
- Returns:
- a int.
-
isEmpty
public boolean isEmpty()
isEmpty
- Specified by:
isEmpty
in interfaceCollection<I extends Interaction>
- Returns:
- a boolean.
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<I extends Interaction>
-
iterator
public Iterator<P> iterator()
iterator
- Specified by:
iterator
in interfaceCollection<I extends Interaction>
- Specified by:
iterator
in interfaceIterable<I extends Interaction>
- Returns:
- a
Iterator
object.
-
toArray
public Object[] toArray()
toArray
- Specified by:
toArray
in interfaceCollection<I extends Interaction>
- Returns:
- an array of
Object
objects.
-
toArray
public <T> T[] toArray(T[] ts)
toArray
- Specified by:
toArray
in interfaceCollection<I extends Interaction>
- Type Parameters:
T
- a T object.- Parameters:
ts
- an array of T objects.- Returns:
- an array of T objects.
-
add
public boolean add(P interactor)
add
- Specified by:
add
in interfaceCollection<I extends Interaction>
- Parameters:
interactor
- a P object.- Returns:
- a boolean.
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<I extends Interaction>
-
containsAll
public boolean containsAll(Collection<?> objects)
- Specified by:
containsAll
in interfaceCollection<I extends Interaction>
-
addAll
public boolean addAll(Collection<? extends P> interactors)
- Specified by:
addAll
in interfaceCollection<I extends Interaction>
-
retainAll
public boolean retainAll(Collection<?> objects)
- Specified by:
retainAll
in interfaceCollection<I extends Interaction>
-
removeAll
public boolean removeAll(Collection<?> objects)
- Specified by:
removeAll
in interfaceCollection<I extends Interaction>
-
clear
public void clear()
clear
- Specified by:
clear
in interfaceCollection<I extends Interaction>
-
onInteractorUpdate
public void onInteractorUpdate(Entity entity, Interactor oldInteractor)
onInteractorUpdate
- Specified by:
onInteractorUpdate
in interfaceEntityInteractorChangeListener
- Parameters:
entity
- : updated entityoldInteractor
- : old interactor
-
toString
public String toString()
- Overrides:
toString
in classAbstractParticipant<I extends Interaction,F extends Feature>
-
-