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 voidclearPropertiesLinkedToIdentifiers()StringgetEnsembl()Getter for the fieldensembl.StringgetEnsemblGenome()Getter for the fieldensemblGenome.StringgetEntrezGeneId()Getter for the fieldentrezGeneId.XrefgetPreferredIdentifier()getPreferredIdentifierStringgetRefseq()Getter for the fieldrefseq.protected voidinitialiseIdentifiers()initialiseIdentifiersprotected voidprocessAddedIdentifierEvent(Xref added)processAddedIdentifierEventprotected voidprocessRemovedIdentifierEvent(Xref removed)processRemovedIdentifierEventvoidsetEnsembl(String ac)Sets the Ensembl accession for this gene.voidsetEnsemblGenome(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.voidsetEntrezGeneId(String id)Sets the Entrez gene id.voidsetInteractorType(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)voidsetRefseq(String ac)Sets the refseq accession.StringtoString()-
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- aStringobject.
-
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:
initialiseIdentifiersin 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:
getPreferredIdentifierin interfaceInteractor- Overrides:
getPreferredIdentifierin 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:
getEnsemblin interfaceGene- Returns:
- a
Stringobject.
-
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:
setEnsemblin interfaceGene- Parameters:
ac- : Ensembl accession
-
getEnsemblGenome
public String getEnsemblGenome()
Getter for the field
ensemblGenome.- Specified by:
getEnsemblGenomein interfaceGene- Returns:
- a
Stringobject.
-
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:
setEnsemblGenomein interfaceGene- Parameters:
ac- : the ensembleGenome ac
-
getEntrezGeneId
public String getEntrezGeneId()
Getter for the field
entrezGeneId.- Specified by:
getEntrezGeneIdin interfaceGene- Returns:
- a
Stringobject.
-
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:
setEntrezGeneIdin 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- aXrefobject.
-
processRemovedIdentifierEvent
protected void processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEvent
- Parameters:
removed- aXrefobject.
-
clearPropertiesLinkedToIdentifiers
protected void clearPropertiesLinkedToIdentifiers()
clearPropertiesLinkedToIdentifiers
-
setInteractorType
public void setInteractorType(CvTerm type)
Description copied from class:DefaultInteractorSets 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:
setInteractorTypein interfaceInteractor- Overrides:
setInteractorTypein classDefaultInteractor- Parameters:
type- : molecule type
-
toString
public String toString()
- Overrides:
toStringin classDefaultInteractor
-
-