Class DefaultGene
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.DefaultInteractor
-
- psidev.psi.mi.jami.model.impl.DefaultMolecule
-
- psidev.psi.mi.jami.model.impl.DefaultGene
-
- All Implemented Interfaces:
Gene
,Interactor
,Molecule
public class DefaultGene extends DefaultMolecule implements Gene
Default implementation for gene Notes: The equals and hashcode methods have NOT been overridden because the Gene object is a complex object. To compare Gene objects, you can use some comparators provided by default: - DefaultGeneComparator - UnambiguousGeneComparator - DefaultExactGeneComparator - UnambiguousExactGeneComparator - GeneComparator- Since:
24/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from interface psidev.psi.mi.jami.model.Interactor
UNKNOWN_INTERACTOR, UNKNOWN_INTERACTOR_MI
-
-
Constructor Summary
Constructors Constructor Description DefaultGene(String name)
Constructor for DefaultGene.DefaultGene(String name, String fullName)
Constructor for DefaultGene.DefaultGene(String name, String fullName, String ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type, Organism organism)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type, Organism organism, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type, Organism organism, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, CvTerm type, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, Organism organism)
Constructor for DefaultGene.DefaultGene(String name, String fullName, Organism organism, String ensembl)
Constructor for DefaultGene.DefaultGene(String name, String fullName, Organism organism, Xref uniqueId)
Constructor for DefaultGene.DefaultGene(String name, String fullName, Xref uniqueId)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type, Organism organism)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type, Organism organism, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type, Organism organism, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, CvTerm type, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.DefaultGene(String name, Organism organism)
Constructor for DefaultGene.DefaultGene(String name, Organism organism, String ensembl)
Constructor for DefaultGene.DefaultGene(String name, Organism organism, Xref uniqueId)
Constructor for DefaultGene.DefaultGene(String name, Xref uniqueId)
Constructor for DefaultGene.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearPropertiesLinkedToIdentifiers()
String
getEnsembl()
Getter for the fieldensembl
.String
getEnsemblGenome()
Getter for the fieldensemblGenome
.String
getEntrezGeneId()
Getter for the fieldentrezGeneId
.Xref
getPreferredIdentifier()
getPreferredIdentifierString
getRefseq()
Getter for the fieldrefseq
.protected void
initialiseIdentifiers()
initialiseIdentifiersprotected void
processAddedIdentifierEvent(Xref added)
processAddedIdentifierEventprotected void
processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEventvoid
setEnsembl(String ac)
Sets the Ensembl accession for this gene.void
setEnsemblGenome(String ac)
Sets the Ensembl genomes identifier It will remove the old ensembl genomes identifier from the collection of identifiers and replace it with the new ensembl genomes identifier.void
setEntrezGeneId(String id)
Sets the Entrez gene id.void
setInteractorType(CvTerm type)
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
setRefseq(String ac)
Sets the refseq accession.String
toString()
-
Methods inherited from class psidev.psi.mi.jami.model.impl.DefaultInteractor
getAliases, getAnnotations, getChecksums, getFullName, getIdentifiers, getInteractorType, getOrganism, getPreferredName, getShortName, getXrefs, initialiseAliases, initialiseAliasesWith, initialiseAnnotations, initialiseAnnotationsWith, initialiseChecksums, initialiseChecksumsWith, initialiseIdentifiersWith, initialiseXrefs, 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.Interactor
getAliases, getAnnotations, getChecksums, getFullName, getIdentifiers, getInteractorType, getOrganism, getPreferredName, getShortName, getXrefs, setFullName, setOrganism, setShortName
-
-
-
-
Constructor Detail
-
DefaultGene
public DefaultGene(String name)
Constructor for DefaultGene.
- Parameters:
name
- aString
object.
-
DefaultGene
public DefaultGene(String name, String fullName, Organism organism)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, Xref uniqueId)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, Organism organism, Xref uniqueId)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, Organism organism, Xref uniqueId)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, String ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, CvTerm type, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, CvTerm type, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, CvTerm type, Organism organism, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, CvTerm type, Organism organism, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, CvTerm type, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, CvTerm type, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, CvTerm type, Organism organism, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, CvTerm type, Organism organism, Xref uniqueId, Xref ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, Organism organism, String ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, Organism organism, String ensembl)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, String fullName, CvTerm type)
Constructor for DefaultGene.
-
DefaultGene
public DefaultGene(String name, CvTerm type, Organism organism)
Constructor for DefaultGene.
-
-
Method Detail
-
initialiseIdentifiers
protected void initialiseIdentifiers()
initialiseIdentifiers
- Overrides:
initialiseIdentifiers
in classDefaultInteractor
-
getPreferredIdentifier
public Xref getPreferredIdentifier()
getPreferredIdentifier
Return the first ensembl identifier if provided, otherwise the first ensemblGenomes if provided, otherwise the first entrez/gene id if provided, otherwise the first refseq id if provided otherwise the first identifier in the list of identifiers- Specified by:
getPreferredIdentifier
in interfaceInteractor
- Overrides:
getPreferredIdentifier
in classDefaultInteractor
- Returns:
- the first identifier in the list of identifiers or null if the list is empty
-
getEnsembl
public String getEnsembl()
Getter for the field
ensembl
.- Specified by:
getEnsembl
in interfaceGene
- Returns:
- a
String
object.
-
setEnsembl
public void setEnsembl(String ac)
Sets the Ensembl accession for this gene. It will remove the old ensembl identifier from the collection of identifiers and replace it with the new ensembl identifier. If the new ensembl identifier is null, all the existing ensembl identifiers will be removed from the collection of identifiers- Specified by:
setEnsembl
in interfaceGene
- Parameters:
ac
- : Ensembl accession
-
getEnsemblGenome
public String getEnsemblGenome()
Getter for the field
ensemblGenome
.- Specified by:
getEnsemblGenome
in interfaceGene
- Returns:
- a
String
object.
-
setEnsemblGenome
public void setEnsemblGenome(String ac)
Sets the Ensembl genomes identifier It will remove the old ensembl genomes identifier from the collection of identifiers and replace it with the new ensembl genomes identifier. If the new ensembl genomes identifier is null, all the existing ensembl genomes identifiers will be removed from the collection of identifiers- Specified by:
setEnsemblGenome
in interfaceGene
- Parameters:
ac
- : the ensembleGenome ac
-
getEntrezGeneId
public String getEntrezGeneId()
Getter for the field
entrezGeneId
.- Specified by:
getEntrezGeneId
in interfaceGene
- Returns:
- a
String
object.
-
setEntrezGeneId
public void setEntrezGeneId(String id)
Sets the Entrez gene id. It will remove the old entrez/gene identifier from the collection of identifiers and replace it with the new entrez/gene identifier. If the new entrez/gene identifier is null, all the existing entrez/gene identifiers will be removed from the collection of identifiers- Specified by:
setEntrezGeneId
in interfaceGene
- Parameters:
id
- : Entrez gene id
-
getRefseq
public String getRefseq()
Getter for the field
refseq
.
-
setRefseq
public void setRefseq(String ac)
Sets the refseq accession. It will remove the old refseq identifier from the collection of identifiers and replace it with the new refseq identifier. If the new refseq identifier is null, all the existing refseq identifiers will be removed from the collection of identifiers
-
processAddedIdentifierEvent
protected void processAddedIdentifierEvent(Xref added)
processAddedIdentifierEvent
- Parameters:
added
- aXref
object.
-
processRemovedIdentifierEvent
protected void processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEvent
- Parameters:
removed
- aXref
object.
-
clearPropertiesLinkedToIdentifiers
protected void clearPropertiesLinkedToIdentifiers()
clearPropertiesLinkedToIdentifiers
-
setInteractorType
public void setInteractorType(CvTerm type)
Description copied from class:DefaultInteractor
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)- Specified by:
setInteractorType
in interfaceInteractor
- Overrides:
setInteractorType
in classDefaultInteractor
- Parameters:
type
- : molecule type
-
toString
public String toString()
- Overrides:
toString
in classDefaultInteractor
-
-