Class DefaultComplex

  • All Implemented Interfaces:
    Complex, Interaction<ModelledParticipant>, Interactor, ModelledInteraction, NamedInteraction<ModelledParticipant>
    Direct Known Subclasses:
    MitabComplex

    public class DefaultComplex
    extends DefaultInteractor
    implements Complex
    Default implementation for complexes Notes: The equals and hashcode methods have NOT been overridden because the Complex object is a complex object. To compare Complex objects, you can use some comparators provided by default: - DefaultComplexComparator - UnambiguousComplexComparator - DefaultExactComplexComparator - UnambiguousExactComplexComparator - ComplexComparator
    Since:
    04/02/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • DefaultComplex

        public DefaultComplex​(String name,
                              CvTerm interactorType)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        interactorType - a CvTerm object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              CvTerm interactorType)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        interactorType - a CvTerm object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              CvTerm interactorType,
                              Organism organism)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        interactorType - a CvTerm object.
        organism - a Organism object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              CvTerm interactorType,
                              Organism organism)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        interactorType - a CvTerm object.
        organism - a Organism object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              CvTerm interactorType,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        interactorType - a CvTerm object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              CvTerm interactorType,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        interactorType - a CvTerm object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              CvTerm interactorType,
                              Organism organism,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        interactorType - a CvTerm object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              CvTerm interactorType,
                              Organism organism,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        interactorType - a CvTerm object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              Organism organism)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        organism - a Organism object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              Organism organism)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        organism - a Organism object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              Organism organism,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        organism - a Organism object.
        uniqueId - a Xref object.
      • DefaultComplex

        public DefaultComplex​(String name,
                              String fullName,
                              Organism organism,
                              Xref uniqueId)

        Constructor for DefaultComplex.

        Parameters:
        name - a String object.
        fullName - a String object.
        organism - a Organism object.
        uniqueId - a Xref object.
    • Method Detail

      • initialiseInteractionEvidences

        protected void initialiseInteractionEvidences()

        initialiseInteractionEvidences

      • initialiseInteractionEvidencesWith

        protected void initialiseInteractionEvidencesWith​(Collection<InteractionEvidence> interactionEvidences)

        initialiseInteractionEvidencesWith

        Parameters:
        interactionEvidences - a Collection object.
      • initialiseCooperativeEffects

        protected void initialiseCooperativeEffects()

        initialiseCooperativeEffects

      • initialiseCooperativeEffectsWith

        protected void initialiseCooperativeEffectsWith​(Collection<CooperativeEffect> cooperativeEffects)

        initialiseCooperativeEffectsWith

        Parameters:
        cooperativeEffects - a Collection object.
      • initialiseConfidences

        protected void initialiseConfidences()

        initialiseConfidences

      • initialiseConfidencesWith

        protected void initialiseConfidencesWith​(Collection<ModelledConfidence> confidences)

        initialiseConfidencesWith

        Parameters:
        confidences - a Collection object.
      • initialiseParameters

        protected void initialiseParameters()

        initialiseParameters

      • initialiseParametersWith

        protected void initialiseParametersWith​(Collection<ModelledParameter> parameters)

        initialiseParametersWith

        Parameters:
        parameters - a Collection object.
      • initialiseComponents

        protected void initialiseComponents()

        initialiseComponents

      • setSource

        public void setSource​(Source source)
        Sets the source reporting the interaction.
        Specified by:
        setSource in interface ModelledInteraction
        Parameters:
        source - : source for this interaction
      • addAllParticipants

        public boolean addAllParticipants​(Collection<? extends ModelledParticipant> participants)
        This method will add all the participant and set the interaction of the new participant to this current interaction
        Specified by:
        addAllParticipants in interface Interaction<ModelledParticipant>
        Parameters:
        participants - : participants to add
        Returns:
        true if participant are added to the list of participants
      • removeAllParticipants

        public boolean removeAllParticipants​(Collection<? extends ModelledParticipant> participants)
        This method will remove the participant and set the interaction of the removed participant to null.
        Specified by:
        removeAllParticipants in interface Interaction<ModelledParticipant>
        Parameters:
        participants - : participants to remove
        Returns:
        true if participant are removed from the list of participants
      • getComplexAc

        public String getComplexAc()
        Complex accession if the complex has been curated under the Complex Portal curation rules. It can be null if the complex is not registered in the Complex Portal. This complex accession should be a shortcut to the complex-primary Xref in the collection of xrefs. Ex: CPX-123
        Specified by:
        getComplexAc in interface Complex
        Returns:
        the complex accession
      • getComplexVersion

        public String getComplexVersion()
        Complex version if the complex has been curated under the Complex Portal curation rules. It can be null if the complex is not registered in the Complex Portal. This complex version should be a shortcut to the complex-primary Xref version in the collection of xrefs. Ex: 1
        Specified by:
        getComplexVersion in interface Complex
        Returns:
        the complex version
      • assignComplexAc

        public void assignComplexAc​(String accession,
                                    String version)
        Assign a complex accession to a complex. It will add the new complex-primary ref to the collection of xrefs
        Specified by:
        assignComplexAc in interface Complex
        Parameters:
        accession - : the complex accession
        version - : the version of the complex if it is provided. If version is null it will create the complex with version 1
      • assignComplexAc

        public void assignComplexAc​(String accession)
        Assign a complex accession to a complex. It will add the new complex-primary ref to the collection of xrefs
        Specified by:
        assignComplexAc in interface Complex
        Parameters:
        accession - : the complex accession. If the version is added to the accession e.g. CPX-1234.2 the complex will be updated with the corresponding version, if not it is assumed version 1
      • setPhysicalProperties

        public void setPhysicalProperties​(String properties)
        Sets the physical properties of this complex. It will remove the old complex-properties annotation from the collection of annotations and replace it with the new complex-properties annotation. If the new complex-properties is null, all the existing complex-properties annotations will be removed from the collection of annotations
        Specified by:
        setPhysicalProperties in interface Complex
        Parameters:
        properties - : complex properties
      • setRecommendedName

        public void setRecommendedName​(String name)
        Sets the recommended name of this complex. It will remove the old recommended name from the collection of aliases and replace it with the new recommended name. If the new recommended name is null, all the existing recommended names will be removed from the collection of aliases
        Specified by:
        setRecommendedName in interface Complex
        Parameters:
        name - : the recommended name
      • setSystematicName

        public void setSystematicName​(String name)
        Sets the systematic name of this complex. It will remove the old systematic name from the collection of aliases and replace it with the new systematic name. If the new systematic name is null, all the existing systematic names will be removed from the collection of aliases
        Specified by:
        setSystematicName in interface Complex
        Parameters:
        name - : the systematic name
      • setInteractorType

        public void setInteractorType​(CvTerm interactorType)
        Sets the molecule type for this interactor If the given type is null, this method automatically sets the interactor type to 'unknown participant' (MI:0329)

        Sets the interactor type for this complex. If the given interactorType is null, it will set the interactor type to 'complex' (MI:0314)

        Specified by:
        setInteractorType in interface Interactor
        Overrides:
        setInteractorType in class DefaultInteractor
        Parameters:
        interactorType - : molecule type
      • setRigid

        public void setRigid​(String rigid)
        Sets the rigid of this interaction. It will remove the previous rigid from the list of checksum and add the new one. If rigid is null, it will remove all the rigid in the list of checksum
        Specified by:
        setRigid in interface Interaction<ModelledParticipant>
        Parameters:
        rigid - : the rigid
      • processAddedAnnotationEvent

        protected void processAddedAnnotationEvent​(Annotation added)

        processAddedAnnotationEvent

        Parameters:
        added - a Annotation object.
      • processRemovedAnnotationEvent

        protected void processRemovedAnnotationEvent​(Annotation removed)

        processRemovedAnnotationEvent

        Parameters:
        removed - a Annotation object.
      • clearPropertiesLinkedToAnnotations

        protected void clearPropertiesLinkedToAnnotations()

        clearPropertiesLinkedToAnnotations

      • processAddedChecksumEvent

        protected void processAddedChecksumEvent​(Checksum added)

        processAddedChecksumEvent

        Parameters:
        added - a Checksum object.
      • processRemovedChecksumEvent

        protected void processRemovedChecksumEvent​(Checksum removed)

        processRemovedChecksumEvent

        Parameters:
        removed - a Checksum object.
      • clearPropertiesLinkedToChecksums

        protected void clearPropertiesLinkedToChecksums()

        clearPropertiesLinkedToChecksums

      • processAddedAliasEvent

        protected void processAddedAliasEvent​(Alias added)

        processAddedAliasEvent

        Parameters:
        added - a Alias object.
      • processRemovedAliasEvent

        protected void processRemovedAliasEvent​(Alias removed)

        processRemovedAliasEvent

        Parameters:
        removed - a Alias object.
      • clearPropertiesLinkedToAliases

        protected void clearPropertiesLinkedToAliases()

        clearPropertiesLinkedToAliases

      • processAddedXrefEvent

        protected void processAddedXrefEvent​(Xref added)

        processAddedXrefEvent

        Parameters:
        added - a Xref object.
      • processRemovedXrefEvent

        protected void processRemovedXrefEvent​(Xref removed)

        processRemovedXrefEvent

        Parameters:
        removed - a Xref object.
      • clearPropertiesLinkedToXrefs

        protected void clearPropertiesLinkedToXrefs()