Package psidev.psi.mi.jami.model.impl
Class DefaultExperiment
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.DefaultExperiment
-
- All Implemented Interfaces:
Experiment
- Direct Known Subclasses:
DefaultNamedExperiment
,MitabExperiment
public class DefaultExperiment extends Object implements Experiment
Default implementation for Experiment Notes: The equals and hashcode methods have NOT been overridden because the Experiment object is a complex object. To compare Experiment objects, you can use some comparators provided by default: - DefaultExperimentComparator - UnambiguousExperimentComparator - DefaultECuratedExperimentComparator - UnambiguousCuratedExperimentComparator - ExperimentComparator- Since:
22/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from interface psidev.psi.mi.jami.model.Experiment
INFERRED_BY_CURATOR, INFERRED_BY_CURATOR_MI, UNSPECIFIED_METHOD, UNSPECIFIED_METHOD_MI
-
-
Constructor Summary
Constructors Constructor Description DefaultExperiment(Publication publication)
Constructor for DefaultExperiment.DefaultExperiment(Publication publication, CvTerm interactionDetectionMethod)
Constructor for DefaultExperiment.DefaultExperiment(Publication publication, CvTerm interactionDetectionMethod, Organism organism)
Constructor for DefaultExperiment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllInteractionEvidences(Collection<? extends InteractionEvidence> evidences)
This method will add all the interaction evidences and set the experiment of the new interaction evidences to this current experimentboolean
addAllVariableParameters(Collection<? extends VariableParameter> variableParameters)
This method will add all variableParameters and set the experiment of the new variableParameters to this current experimentboolean
addInteractionEvidence(InteractionEvidence evidence)
This method will add the interaction evidence and set the experiment of the new interaction evidence to this current experimentboolean
addVariableParameter(VariableParameter variableParameter)
This method will add the variableParameter and set the experiment of the new variableParameter to this current experimentCollection<Annotation>
getAnnotations()
Getter for the fieldannotations
.Collection<Confidence>
getConfidences()
Getter for the fieldconfidences
.Organism
getHostOrganism()
Getter for the fieldhostOrganism
.CvTerm
getInteractionDetectionMethod()
Getter for the fieldinteractionDetectionMethod
.Collection<InteractionEvidence>
getInteractionEvidences()
getInteractionEvidencesPublication
getPublication()
Getter for the fieldpublication
.Collection<VariableParameter>
getVariableParameters()
Getter for the fieldvariableParameters
.Collection<Xref>
getXrefs()
Getter for the fieldxrefs
.protected void
initialiseAnnotations()
initialiseAnnotationsprotected void
initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWithprotected void
initialiseConfidences()
initialiseConfidencesprotected void
initialiseConfidencesWith(Collection<Confidence> confs)
initialiseConfidencesWithprotected void
initialiseInteractions()
initialiseInteractionsprotected void
initialiseInteractionsWith(Collection<InteractionEvidence> interactionEvidences)
initialiseInteractionsWithprotected void
initialiseVariableParameters()
initialiseVariableParametersprotected void
initialiseVariableParametersWith(Collection<VariableParameter> variableParameters)
initialiseVariableParametersWithprotected void
initialiseXrefs()
initialiseXrefsprotected void
initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWithboolean
removeAllInteractionEvidences(Collection<? extends InteractionEvidence> evidences)
This method will remove the interaction evidences and set the experiment of the removed interaction evidences to null.boolean
removeAllVariableParameters(Collection<? extends VariableParameter> variableParameters)
This method will remove all the variableParameters and set the experiment of the removed variableParameters to null.boolean
removeInteractionEvidence(InteractionEvidence evidence)
This method will remove the interaction evidence and set the experiment of the new interaction evidence to nullboolean
removeVariableParameter(VariableParameter variableParameter)
This method will remove the variableParameter and set the experiment of the removed variableParameter to null.void
setHostOrganism(Organism organism)
Sets the host organism of an experimentvoid
setInteractionDetectionMethod(CvTerm term)
Set the interaction detection method for this experiment If term is null, this method will set the interaction detection method to 'unspecified method' (MI:0686).void
setPublication(Publication publication)
Set the publication where the experiment has been described.void
setPublicationAndAddExperiment(Publication publication)
Set the publication where the experiment has been described and add the experiment to the list of experiments for this publication If publication is null, it will remove this experiment from the previous publication attached to this experimentString
toString()
-
-
-
Constructor Detail
-
DefaultExperiment
public DefaultExperiment(Publication publication)
Constructor for DefaultExperiment.
- Parameters:
publication
- aPublication
object.
-
DefaultExperiment
public DefaultExperiment(Publication publication, CvTerm interactionDetectionMethod)
Constructor for DefaultExperiment.
- Parameters:
publication
- aPublication
object.interactionDetectionMethod
- aCvTerm
object.
-
DefaultExperiment
public DefaultExperiment(Publication publication, CvTerm interactionDetectionMethod, Organism organism)
Constructor for DefaultExperiment.
- Parameters:
publication
- aPublication
object.interactionDetectionMethod
- aCvTerm
object.organism
- aOrganism
object.
-
-
Method Detail
-
initialiseXrefs
protected void initialiseXrefs()
initialiseXrefs
-
initialiseAnnotations
protected void initialiseAnnotations()
initialiseAnnotations
-
initialiseInteractions
protected void initialiseInteractions()
initialiseInteractions
-
initialiseXrefsWith
protected void initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWith
- Parameters:
xrefs
- aCollection
object.
-
initialiseAnnotationsWith
protected void initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWith
- Parameters:
annotations
- aCollection
object.
-
initialiseInteractionsWith
protected void initialiseInteractionsWith(Collection<InteractionEvidence> interactionEvidences)
initialiseInteractionsWith
- Parameters:
interactionEvidences
- aCollection
object.
-
initialiseConfidences
protected void initialiseConfidences()
initialiseConfidences
-
initialiseVariableParameters
protected void initialiseVariableParameters()
initialiseVariableParameters
-
initialiseConfidencesWith
protected void initialiseConfidencesWith(Collection<Confidence> confs)
initialiseConfidencesWith
- Parameters:
confs
- aCollection
object.
-
initialiseVariableParametersWith
protected void initialiseVariableParametersWith(Collection<VariableParameter> variableParameters)
initialiseVariableParametersWith
- Parameters:
variableParameters
- aCollection
object.
-
getPublication
public Publication getPublication()
Getter for the field
publication
.- Specified by:
getPublication
in interfaceExperiment
- Returns:
- a
Publication
object.
-
setPublication
public void setPublication(Publication publication)
Set the publication where the experiment has been described.- Specified by:
setPublication
in interfaceExperiment
- Parameters:
publication
- : the publication
-
setPublicationAndAddExperiment
public void setPublicationAndAddExperiment(Publication publication)
Set the publication where the experiment has been described and add the experiment to the list of experiments for this publication If publication is null, it will remove this experiment from the previous publication attached to this experiment- Specified by:
setPublicationAndAddExperiment
in interfaceExperiment
- Parameters:
publication
- : the publication
-
getXrefs
public Collection<Xref> getXrefs()
Getter for the field
xrefs
.- Specified by:
getXrefs
in interfaceExperiment
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations
.- Specified by:
getAnnotations
in interfaceExperiment
- Returns:
- a
Collection
object.
-
getConfidences
public Collection<Confidence> getConfidences()
Getter for the field
confidences
.- Specified by:
getConfidences
in interfaceExperiment
- Returns:
- a
Collection
object.
-
getInteractionDetectionMethod
public CvTerm getInteractionDetectionMethod()
Getter for the field
interactionDetectionMethod
.- Specified by:
getInteractionDetectionMethod
in interfaceExperiment
- Returns:
- a
CvTerm
object.
-
setInteractionDetectionMethod
public void setInteractionDetectionMethod(CvTerm term)
Set the interaction detection method for this experiment If term is null, this method will set the interaction detection method to 'unspecified method' (MI:0686).- Specified by:
setInteractionDetectionMethod
in interfaceExperiment
- Parameters:
term
- : the detection method
-
getHostOrganism
public Organism getHostOrganism()
Getter for the field
hostOrganism
.- Specified by:
getHostOrganism
in interfaceExperiment
- Returns:
- a
Organism
object.
-
setHostOrganism
public void setHostOrganism(Organism organism)
Sets the host organism of an experiment- Specified by:
setHostOrganism
in interfaceExperiment
- Parameters:
organism
- : host organism
-
getInteractionEvidences
public Collection<InteractionEvidence> getInteractionEvidences()
getInteractionEvidences
- Specified by:
getInteractionEvidences
in interfaceExperiment
- Returns:
- a
Collection
object.
-
addInteractionEvidence
public boolean addInteractionEvidence(InteractionEvidence evidence)
This method will add the interaction evidence and set the experiment of the new interaction evidence to this current experiment- Specified by:
addInteractionEvidence
in interfaceExperiment
- Parameters:
evidence
- : evidence to add- Returns:
- true if interaction evidence is added to the list of interactions
-
removeInteractionEvidence
public boolean removeInteractionEvidence(InteractionEvidence evidence)
This method will remove the interaction evidence and set the experiment of the new interaction evidence to null- Specified by:
removeInteractionEvidence
in interfaceExperiment
- Parameters:
evidence
- : evidence to remove- Returns:
- true if interaction evidence is removed from the list of interactions
-
addAllInteractionEvidences
public boolean addAllInteractionEvidences(Collection<? extends InteractionEvidence> evidences)
This method will add all the interaction evidences and set the experiment of the new interaction evidences to this current experiment- Specified by:
addAllInteractionEvidences
in interfaceExperiment
- Parameters:
evidences
- : evidences to add- Returns:
- true if interaction evidences are added to the list of interaction evidences
-
removeAllInteractionEvidences
public boolean removeAllInteractionEvidences(Collection<? extends InteractionEvidence> evidences)
This method will remove the interaction evidences and set the experiment of the removed interaction evidences to null.- Specified by:
removeAllInteractionEvidences
in interfaceExperiment
- Parameters:
evidences
- : evidences to remove- Returns:
- true if interaction evidences are removed from the list of interactions
-
getVariableParameters
public Collection<VariableParameter> getVariableParameters()
Getter for the field
variableParameters
.- Specified by:
getVariableParameters
in interfaceExperiment
- Returns:
- a
Collection
object.
-
addVariableParameter
public boolean addVariableParameter(VariableParameter variableParameter)
This method will add the variableParameter and set the experiment of the new variableParameter to this current experiment- Specified by:
addVariableParameter
in interfaceExperiment
- Parameters:
variableParameter
- : parameter to add- Returns:
- true if variableParameter is added to the list of variableParameters
-
removeVariableParameter
public boolean removeVariableParameter(VariableParameter variableParameter)
This method will remove the variableParameter and set the experiment of the removed variableParameter to null.- Specified by:
removeVariableParameter
in interfaceExperiment
- Parameters:
variableParameter
- : parameter to remove- Returns:
- true if variableParameter is removed from the list of variableParameters
-
addAllVariableParameters
public boolean addAllVariableParameters(Collection<? extends VariableParameter> variableParameters)
This method will add all variableParameters and set the experiment of the new variableParameters to this current experiment- Specified by:
addAllVariableParameters
in interfaceExperiment
- Parameters:
variableParameters
- : parameters to add- Returns:
- true if variableParameters are added to the list of variableParameters
-
removeAllVariableParameters
public boolean removeAllVariableParameters(Collection<? extends VariableParameter> variableParameters)
This method will remove all the variableParameters and set the experiment of the removed variableParameters to null.- Specified by:
removeAllVariableParameters
in interfaceExperiment
- Parameters:
variableParameters
- : parameters to remove- Returns:
- true if variableParameters are removed from the list of variableParameters
-
-