Class 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)
    • Constructor Detail

      • DefaultExperiment

        public DefaultExperiment​(Publication publication)

        Constructor for DefaultExperiment.

        Parameters:
        publication - a Publication object.
      • DefaultExperiment

        public DefaultExperiment​(Publication publication,
                                 CvTerm interactionDetectionMethod)

        Constructor for DefaultExperiment.

        Parameters:
        publication - a Publication object.
        interactionDetectionMethod - a CvTerm object.
      • DefaultExperiment

        public DefaultExperiment​(Publication publication,
                                 CvTerm interactionDetectionMethod,
                                 Organism organism)

        Constructor for DefaultExperiment.

        Parameters:
        publication - a Publication object.
        interactionDetectionMethod - a CvTerm object.
        organism - a Organism 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 - a Collection object.
      • initialiseAnnotationsWith

        protected void initialiseAnnotationsWith​(Collection<Annotation> annotations)

        initialiseAnnotationsWith

        Parameters:
        annotations - a Collection object.
      • initialiseInteractionsWith

        protected void initialiseInteractionsWith​(Collection<InteractionEvidence> interactionEvidences)

        initialiseInteractionsWith

        Parameters:
        interactionEvidences - a Collection object.
      • initialiseConfidences

        protected void initialiseConfidences()

        initialiseConfidences

      • initialiseVariableParameters

        protected void initialiseVariableParameters()

        initialiseVariableParameters

      • initialiseConfidencesWith

        protected void initialiseConfidencesWith​(Collection<Confidence> confs)

        initialiseConfidencesWith

        Parameters:
        confs - a Collection object.
      • initialiseVariableParametersWith

        protected void initialiseVariableParametersWith​(Collection<VariableParameter> variableParameters)

        initialiseVariableParametersWith

        Parameters:
        variableParameters - a Collection object.
      • setPublication

        public void setPublication​(Publication publication)
        Set the publication where the experiment has been described.
        Specified by:
        setPublication in interface Experiment
        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 interface Experiment
        Parameters:
        publication - : the publication
      • 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 interface Experiment
        Parameters:
        term - : the detection method
      • setHostOrganism

        public void setHostOrganism​(Organism organism)
        Sets the host organism of an experiment
        Specified by:
        setHostOrganism in interface Experiment
        Parameters:
        organism - : host organism
      • 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 interface Experiment
        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 interface Experiment
        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 interface Experiment
        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 interface Experiment
        Parameters:
        evidences - : evidences to remove
        Returns:
        true if interaction evidences are removed from the list of interactions
      • 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 interface Experiment
        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 interface Experiment
        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 interface Experiment
        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 interface Experiment
        Parameters:
        variableParameters - : parameters to remove
        Returns:
        true if variableParameters are removed from the list of variableParameters