Class DefaultComplex
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.DefaultInteractor
-
- psidev.psi.mi.jami.model.impl.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)
-
-
Field Summary
-
Fields inherited from interface psidev.psi.mi.jami.model.Complex
COMPLEX, COMPLEX_MI
-
Fields inherited from interface psidev.psi.mi.jami.model.Interactor
UNKNOWN_INTERACTOR, UNKNOWN_INTERACTOR_MI
-
Fields inherited from interface psidev.psi.mi.jami.model.ModelledInteraction
ECO, ECO_MI
-
-
Constructor Summary
Constructors Constructor Description DefaultComplex(String name)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, CvTerm interactorType)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, CvTerm interactorType, Organism organism)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, CvTerm interactorType, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, CvTerm interactorType, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, Organism organism)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, String fullName, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, CvTerm interactorType)
Constructor for DefaultComplex.DefaultComplex(String name, CvTerm interactorType, Organism organism)
Constructor for DefaultComplex.DefaultComplex(String name, CvTerm interactorType, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, CvTerm interactorType, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, Organism organism)
Constructor for DefaultComplex.DefaultComplex(String name, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.DefaultComplex(String name, Xref uniqueId)
Constructor for DefaultComplex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllParticipants(Collection<? extends ModelledParticipant> participants)
This method will add all the participant and set the interaction of the new participant to this current interactionboolean
addParticipant(ModelledParticipant part)
addParticipantvoid
assignComplexAc(String accession)
Assign a complex accession to a complex.void
assignComplexAc(String accession, String version)
Assign a complex accession to a complex.protected void
clearPropertiesLinkedToAliases()
clearPropertiesLinkedToAliasesprotected void
clearPropertiesLinkedToAnnotations()
clearPropertiesLinkedToAnnotationsprotected void
clearPropertiesLinkedToChecksums()
clearPropertiesLinkedToChecksumsprotected void
clearPropertiesLinkedToXrefs()
Collection<Alias>
getAliases()
getAliasesCollection<Annotation>
getAnnotations()
getAnnotationsCollection<Checksum>
getChecksums()
getChecksumsString
getComplexAc()
Complex accession if the complex has been curated under the Complex Portal curation rules.String
getComplexVersion()
Complex version if the complex has been curated under the Complex Portal curation rules.Collection<CooperativeEffect>
getCooperativeEffects()
Getter for the fieldcooperativeEffects
.Date
getCreatedDate()
Getter for the fieldcreatedDate
.CvTerm
getEvidenceType()
Getter for the fieldevidenceType
.Collection<Xref>
getIdentifiers()
getIdentifiersCollection<InteractionEvidence>
getInteractionEvidences()
Getter for the fieldinteractionEvidences
.CvTerm
getInteractionType()
Getter for the fieldinteractionType
.Collection<ModelledConfidence>
getModelledConfidences()
getModelledConfidencesCollection<ModelledParameter>
getModelledParameters()
getModelledParametersCollection<ModelledParticipant>
getParticipants()
getParticipantsString
getPhysicalProperties()
Getter for the fieldphysicalProperties
.String
getRecommendedName()
Getter for the fieldrecommendedName
.String
getRigid()
Getter for the fieldrigid
.Source
getSource()
Getter for the fieldsource
.String
getSystematicName()
Getter for the fieldsystematicName
.Date
getUpdatedDate()
Getter for the fieldupdatedDate
.Collection<Xref>
getXrefs()
getXrefsprotected void
initialiseAliases()
initialiseAliasesprotected void
initialiseAnnotations()
initialiseAnnotationsprotected void
initialiseChecksums()
initialiseChecksumsprotected void
initialiseComponents()
initialiseComponentsprotected void
initialiseComponentsWith(Collection<ModelledParticipant> components)
initialiseComponentsWithprotected void
initialiseConfidences()
initialiseConfidencesprotected void
initialiseConfidencesWith(Collection<ModelledConfidence> confidences)
initialiseConfidencesWithprotected void
initialiseCooperativeEffects()
initialiseCooperativeEffectsprotected void
initialiseCooperativeEffectsWith(Collection<CooperativeEffect> cooperativeEffects)
initialiseCooperativeEffectsWithprotected void
initialiseInteractionEvidences()
initialiseInteractionEvidencesprotected void
initialiseInteractionEvidencesWith(Collection<InteractionEvidence> interactionEvidences)
initialiseInteractionEvidencesWithprotected void
initialiseParameters()
initialiseParametersprotected void
initialiseParametersWith(Collection<ModelledParameter> parameters)
initialiseParametersWithprotected void
initialiseXrefs()
initialiseXrefsprotected void
processAddedAliasEvent(Alias added)
processAddedAliasEventprotected void
processAddedAnnotationEvent(Annotation added)
processAddedAnnotationEventprotected void
processAddedChecksumEvent(Checksum added)
processAddedChecksumEventprotected void
processAddedXrefEvent(Xref added)
processAddedXrefEventprotected void
processRemovedAliasEvent(Alias removed)
processRemovedAliasEventprotected void
processRemovedAnnotationEvent(Annotation removed)
processRemovedAnnotationEventprotected void
processRemovedChecksumEvent(Checksum removed)
processRemovedChecksumEventprotected void
processRemovedXrefEvent(Xref removed)
processRemovedXrefEventboolean
removeAllParticipants(Collection<? extends ModelledParticipant> participants)
This method will remove the participant and set the interaction of the removed participant to null.boolean
removeParticipant(ModelledParticipant part)
removeParticipantvoid
setCreatedDate(Date created)
Sets the created datevoid
setEvidenceType(CvTerm eco)
Sets the evidence typevoid
setInteractionType(CvTerm term)
Sets the interaction type.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)void
setPhysicalProperties(String properties)
Sets the physical properties of this complex.void
setRecommendedName(String name)
Sets the recommended name of this complex.void
setRigid(String rigid)
Sets the rigid of this interaction.void
setSource(Source source)
Sets the source reporting the interaction.void
setSystematicName(String name)
Sets the systematic name of this complex.void
setUpdatedDate(Date updated)
Sets the last update dateString
toString()
-
Methods inherited from class psidev.psi.mi.jami.model.impl.DefaultInteractor
getFullName, getInteractorType, getOrganism, getPreferredIdentifier, getPreferredName, getShortName, initialiseAliasesWith, initialiseAnnotationsWith, initialiseChecksumsWith, initialiseIdentifiers, initialiseIdentifiersWith, initialiseXrefsWith, setFullName, setOrganism, setShortName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.model.Complex
getComparableParticipants
-
Methods inherited from interface psidev.psi.mi.jami.model.Interaction
getShortName, setShortName
-
Methods inherited from interface psidev.psi.mi.jami.model.Interactor
getFullName, getInteractorType, getOrganism, getPreferredIdentifier, getPreferredName, getShortName, setFullName, setOrganism, setShortName
-
Methods inherited from interface psidev.psi.mi.jami.model.NamedInteraction
getFullName, setFullName
-
-
-
-
Constructor Detail
-
DefaultComplex
public DefaultComplex(String name, CvTerm interactorType)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, CvTerm interactorType)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, CvTerm interactorType, Organism organism)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, CvTerm interactorType, Organism organism)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, CvTerm interactorType, Xref uniqueId)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, CvTerm interactorType, Xref uniqueId)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, CvTerm interactorType, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, CvTerm interactorType, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name)
Constructor for DefaultComplex.
- Parameters:
name
- aString
object.
-
DefaultComplex
public DefaultComplex(String name, Organism organism)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, Organism organism)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, String fullName, Xref uniqueId)
Constructor for DefaultComplex.
-
DefaultComplex
public DefaultComplex(String name, Organism organism, Xref uniqueId)
Constructor for DefaultComplex.
-
-
Method Detail
-
initialiseAnnotations
protected void initialiseAnnotations()
initialiseAnnotations
- Overrides:
initialiseAnnotations
in classDefaultInteractor
-
initialiseChecksums
protected void initialiseChecksums()
initialiseChecksums
- Overrides:
initialiseChecksums
in classDefaultInteractor
-
initialiseAliases
protected void initialiseAliases()
initialiseAliases
- Overrides:
initialiseAliases
in classDefaultInteractor
-
initialiseXrefs
protected void initialiseXrefs()
initialiseXrefs
- Overrides:
initialiseXrefs
in classDefaultInteractor
-
initialiseInteractionEvidences
protected void initialiseInteractionEvidences()
initialiseInteractionEvidences
-
initialiseInteractionEvidencesWith
protected void initialiseInteractionEvidencesWith(Collection<InteractionEvidence> interactionEvidences)
initialiseInteractionEvidencesWith
- Parameters:
interactionEvidences
- aCollection
object.
-
initialiseCooperativeEffects
protected void initialiseCooperativeEffects()
initialiseCooperativeEffects
-
initialiseCooperativeEffectsWith
protected void initialiseCooperativeEffectsWith(Collection<CooperativeEffect> cooperativeEffects)
initialiseCooperativeEffectsWith
- Parameters:
cooperativeEffects
- aCollection
object.
-
initialiseConfidences
protected void initialiseConfidences()
initialiseConfidences
-
initialiseConfidencesWith
protected void initialiseConfidencesWith(Collection<ModelledConfidence> confidences)
initialiseConfidencesWith
- Parameters:
confidences
- aCollection
object.
-
initialiseParameters
protected void initialiseParameters()
initialiseParameters
-
initialiseParametersWith
protected void initialiseParametersWith(Collection<ModelledParameter> parameters)
initialiseParametersWith
- Parameters:
parameters
- aCollection
object.
-
initialiseComponents
protected void initialiseComponents()
initialiseComponents
-
initialiseComponentsWith
protected void initialiseComponentsWith(Collection<ModelledParticipant> components)
initialiseComponentsWith
- Parameters:
components
- aCollection
object.
-
getSource
public Source getSource()
Getter for the field
source
.- Specified by:
getSource
in interfaceModelledInteraction
- Returns:
- a
Source
object.
-
setSource
public void setSource(Source source)
Sets the source reporting the interaction.- Specified by:
setSource
in interfaceModelledInteraction
- Parameters:
source
- : source for this interaction
-
getParticipants
public Collection<ModelledParticipant> getParticipants()
getParticipants
- Specified by:
getParticipants
in interfaceInteraction<ModelledParticipant>
- Returns:
- a
Collection
object.
-
addParticipant
public boolean addParticipant(ModelledParticipant part)
addParticipant
- Specified by:
addParticipant
in interfaceInteraction<ModelledParticipant>
- Parameters:
part
- aModelledParticipant
object.- Returns:
- a boolean.
-
removeParticipant
public boolean removeParticipant(ModelledParticipant part)
removeParticipant
- Specified by:
removeParticipant
in interfaceInteraction<ModelledParticipant>
- Parameters:
part
- aModelledParticipant
object.- Returns:
- a boolean.
-
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 interfaceInteraction<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 interfaceInteraction<ModelledParticipant>
- Parameters:
participants
- : participants to remove- Returns:
- true if participant are removed from the list of participants
-
getInteractionEvidences
public Collection<InteractionEvidence> getInteractionEvidences()
Getter for the field
interactionEvidences
.- Specified by:
getInteractionEvidences
in interfaceModelledInteraction
- Returns:
- a
Collection
object.
-
getModelledConfidences
public Collection<ModelledConfidence> getModelledConfidences()
getModelledConfidences
- Specified by:
getModelledConfidences
in interfaceModelledInteraction
- Returns:
- a
Collection
object.
-
getModelledParameters
public Collection<ModelledParameter> getModelledParameters()
getModelledParameters
- Specified by:
getModelledParameters
in interfaceModelledInteraction
- Returns:
- a
Collection
object.
-
getCooperativeEffects
public Collection<CooperativeEffect> getCooperativeEffects()
Getter for the field
cooperativeEffects
.- Specified by:
getCooperativeEffects
in interfaceModelledInteraction
- Returns:
- a
Collection
object.
-
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 interfaceComplex
- 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 interfaceComplex
- 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 interfaceComplex
- Parameters:
accession
- : the complex accessionversion
- : 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 interfaceComplex
- 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
-
getPhysicalProperties
public String getPhysicalProperties()
Getter for the field
physicalProperties
.- Specified by:
getPhysicalProperties
in interfaceComplex
- Returns:
- a
String
object.
-
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 interfaceComplex
- Parameters:
properties
- : complex properties
-
getRecommendedName
public String getRecommendedName()
Getter for the field
recommendedName
.- Specified by:
getRecommendedName
in interfaceComplex
- Returns:
- a
String
object.
-
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 interfaceComplex
- Parameters:
name
- : the recommended name
-
getSystematicName
public String getSystematicName()
Getter for the field
systematicName
.- Specified by:
getSystematicName
in interfaceComplex
- Returns:
- a
String
object.
-
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 interfaceComplex
- Parameters:
name
- : the systematic name
-
getEvidenceType
public CvTerm getEvidenceType()
Getter for the field
evidenceType
.- Specified by:
getEvidenceType
in interfaceModelledInteraction
- Returns:
- a
CvTerm
object.
-
setEvidenceType
public void setEvidenceType(CvTerm eco)
Sets the evidence type- Specified by:
setEvidenceType
in interfaceModelledInteraction
- Parameters:
eco
- : the evidence type
-
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 interfaceInteractor
- Overrides:
setInteractorType
in classDefaultInteractor
- Parameters:
interactorType
- : molecule type
-
getRigid
public String getRigid()
Getter for the field
rigid
.- Specified by:
getRigid
in interfaceInteraction<ModelledParticipant>
- Returns:
- a
String
object.
-
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 interfaceInteraction<ModelledParticipant>
- Parameters:
rigid
- : the rigid
-
getUpdatedDate
public Date getUpdatedDate()
Getter for the field
updatedDate
.- Specified by:
getUpdatedDate
in interfaceInteraction<ModelledParticipant>
- Returns:
- a
Date
object.
-
setUpdatedDate
public void setUpdatedDate(Date updated)
Sets the last update date- Specified by:
setUpdatedDate
in interfaceInteraction<ModelledParticipant>
- Parameters:
updated
- : last update date
-
getCreatedDate
public Date getCreatedDate()
Getter for the field
createdDate
.- Specified by:
getCreatedDate
in interfaceInteraction<ModelledParticipant>
- Returns:
- a
Date
object.
-
setCreatedDate
public void setCreatedDate(Date created)
Sets the created date- Specified by:
setCreatedDate
in interfaceInteraction<ModelledParticipant>
- Parameters:
created
- : created date
-
getInteractionType
public CvTerm getInteractionType()
Getter for the field
interactionType
.- Specified by:
getInteractionType
in interfaceInteraction<ModelledParticipant>
- Returns:
- a
CvTerm
object.
-
setInteractionType
public void setInteractionType(CvTerm term)
Sets the interaction type.- Specified by:
setInteractionType
in interfaceInteraction<ModelledParticipant>
- Parameters:
term
- : interaction type
-
getAnnotations
public Collection<Annotation> getAnnotations()
getAnnotations
- Specified by:
getAnnotations
in interfaceInteraction<ModelledParticipant>
- Specified by:
getAnnotations
in interfaceInteractor
- Overrides:
getAnnotations
in classDefaultInteractor
- Returns:
- a
Collection
object.
-
getChecksums
public Collection<Checksum> getChecksums()
getChecksums
- Specified by:
getChecksums
in interfaceInteraction<ModelledParticipant>
- Specified by:
getChecksums
in interfaceInteractor
- Overrides:
getChecksums
in classDefaultInteractor
- Returns:
- a
Collection
object.
-
getXrefs
public Collection<Xref> getXrefs()
getXrefs
- Specified by:
getXrefs
in interfaceInteraction<ModelledParticipant>
- Specified by:
getXrefs
in interfaceInteractor
- Overrides:
getXrefs
in classDefaultInteractor
- Returns:
- a
Collection
object.
-
getIdentifiers
public Collection<Xref> getIdentifiers()
getIdentifiers
- Specified by:
getIdentifiers
in interfaceInteraction<ModelledParticipant>
- Specified by:
getIdentifiers
in interfaceInteractor
- Overrides:
getIdentifiers
in classDefaultInteractor
- Returns:
- a
Collection
object.
-
getAliases
public Collection<Alias> getAliases()
getAliases
- Specified by:
getAliases
in interfaceInteractor
- Specified by:
getAliases
in interfaceNamedInteraction<ModelledParticipant>
- Overrides:
getAliases
in classDefaultInteractor
- Returns:
- a
Collection
object.
-
toString
public String toString()
- Overrides:
toString
in classDefaultInteractor
-
processAddedAnnotationEvent
protected void processAddedAnnotationEvent(Annotation added)
processAddedAnnotationEvent
- Parameters:
added
- aAnnotation
object.
-
processRemovedAnnotationEvent
protected void processRemovedAnnotationEvent(Annotation removed)
processRemovedAnnotationEvent
- Parameters:
removed
- aAnnotation
object.
-
clearPropertiesLinkedToAnnotations
protected void clearPropertiesLinkedToAnnotations()
clearPropertiesLinkedToAnnotations
-
processAddedChecksumEvent
protected void processAddedChecksumEvent(Checksum added)
processAddedChecksumEvent
- Parameters:
added
- aChecksum
object.
-
processRemovedChecksumEvent
protected void processRemovedChecksumEvent(Checksum removed)
processRemovedChecksumEvent
- Parameters:
removed
- aChecksum
object.
-
clearPropertiesLinkedToChecksums
protected void clearPropertiesLinkedToChecksums()
clearPropertiesLinkedToChecksums
-
processAddedAliasEvent
protected void processAddedAliasEvent(Alias added)
processAddedAliasEvent
- Parameters:
added
- aAlias
object.
-
processRemovedAliasEvent
protected void processRemovedAliasEvent(Alias removed)
processRemovedAliasEvent
- Parameters:
removed
- aAlias
object.
-
clearPropertiesLinkedToAliases
protected void clearPropertiesLinkedToAliases()
clearPropertiesLinkedToAliases
-
processAddedXrefEvent
protected void processAddedXrefEvent(Xref added)
processAddedXrefEvent
- Parameters:
added
- aXref
object.
-
processRemovedXrefEvent
protected void processRemovedXrefEvent(Xref removed)
processRemovedXrefEvent
- Parameters:
removed
- aXref
object.
-
clearPropertiesLinkedToXrefs
protected void clearPropertiesLinkedToXrefs()
-
-