Package psidev.psi.mi.jami.enricher.impl
Class AbstractInteractorEnricher<T extends Interactor>
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<T>
-
- psidev.psi.mi.jami.enricher.impl.AbstractInteractorEnricher<T>
-
- All Implemented Interfaces:
InteractorEnricher<T>
,MIEnricher<T>
- Direct Known Subclasses:
AbstractInteractorUpdater
,MinimalBioactiveEntityEnricher
,MinimalGeneEnricher
,MinimalInteractorBaseEnricher
,MinimalProteinEnricher
public abstract class AbstractInteractorEnricher<T extends Interactor> extends AbstractMIEnricher<T> implements InteractorEnricher<T>
Abstract class for enricher of interactors Minimal enrichment: - enrich fullname of an interactor. If the fullname is not null in the interactor to enrich, it will ignore the fullname loaded from the fetched interactor. - enrich identifiers (uniprot, ensembl, etc.) of an interactor. It will use DefaultXrefComparator to compare identifiers and add missing identifiers without removing any existing identifiers. - enrich aliases (gene name, etc.) of an interactor. It will use DefaultAliasComparator to compare aliases and add missing aliases without removing any existing aliases. - enrich interactor type of an interactor if the cv term enricher is not null. If the interactor type is not null in the interactor to enrich, it will ignore the interactor type loaded from the fetched interactor. - enrich organism of an interactor if the organismEnricher is not null. If the organism is not null in the interactor to enrich, it will ignore the organism loaded from the fetched interactor. Full enrichment: - enrich xrefs. It will use DefaultXrefComparator to compare xrefs and add missing xrefs without removing any existing xrefs. - enrich checksums, It will use DefaultChecksumComparator to compare checksums and add missing xrefs without removing any existing checksums. - enrich annotations It will use DefaultAnnotationComparator to compare annotations and add missing xrefs without removing any existing annotations.- Since:
30/09/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractInteractorEnricher()
Constructor for AbstractInteractorEnricher.AbstractInteractorEnricher(InteractorFetcher<T> fetcher)
Constructor for AbstractInteractorEnricher.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
canEnrichInteractor(T objectToEnrich, T fetchedObject)
canEnrichInteractor.void
enrich(T objectToEnrich, T fetchedObject)
enrich.abstract T
find(T objectToEnrich)
find.CvTermEnricher<CvTerm>
getCvTermEnricher()
Getter for the fieldcvTermEnricher
.InteractorFetcher<T>
getInteractorFetcher()
getInteractorFetcher.InteractorEnricherListener<T>
getListener()
Getter for the fieldlistener
.OrganismEnricher
getOrganismEnricher()
Getter for the fieldorganismEnricher
.int
getRetryCount()
Getter for the fieldretryCount
.protected abstract boolean
isFullEnrichment()
isFullEnrichment.protected abstract void
onCompletedEnrichment(T objectToEnrich)
onCompletedEnrichment.protected void
onEnrichedVersionNotFound(T objectToEnrich)
onEnrichedVersionNotFound.protected abstract void
onInteractorCheckFailure(T objectToEnrich, T fetchedObject)
onInteractorCheckFailure.void
processAliases(T bioactiveEntityToEnrich, T fetched)
processAliases.protected void
processAnnotations(T objectToEnrich, T fetchedObject)
processAnnotations.protected void
processChecksums(T bioactiveEntityToEnrich, T fetched)
processChecksums.void
processFullName(T bioactiveEntityToEnrich, T fetched)
processFullName.protected void
processIdentifiers(T bioactiveEntityToEnrich, T fetched)
processIdentifiers.protected void
processInteractorType(T entityToEnrich)
processInteractorType.void
processInteractorType(T entityToEnrich, T fetched)
processInteractorType.protected void
processOrganism(T entityToEnrich)
processOrganism.void
processOrganism(T entityToEnrich, T fetched)
processOrganism.protected void
processOtherProperties(T bioactiveEntityToEnrich, T fetched)
processOtherProperties.protected void
processShortLabel(T bioactiveEntityToEnrich, T fetched)
processShortLabel.protected void
processXrefs(T bioactiveEntityToEnrich, T fetched)
processXrefs.void
setCvTermEnricher(CvTermEnricher<CvTerm> cvTermEnricher)
setCvTermEnricher.void
setListener(InteractorEnricherListener<T> listener)
setListener.void
setOrganismEnricher(OrganismEnricher organismEnricher)
setOrganismEnricher.void
setRetryCount(int retryCount)
Setter for the fieldretryCount
.-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher
enrich, enrich
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface psidev.psi.mi.jami.enricher.MIEnricher
enrich, enrich
-
-
-
-
Constructor Detail
-
AbstractInteractorEnricher
public AbstractInteractorEnricher()
Constructor for AbstractInteractorEnricher.
-
AbstractInteractorEnricher
public AbstractInteractorEnricher(InteractorFetcher<T> fetcher)
Constructor for AbstractInteractorEnricher.
- Parameters:
fetcher
- aInteractorFetcher
object.
-
-
Method Detail
-
getRetryCount
public int getRetryCount()
Getter for the field
retryCount
.- Returns:
- a int.
-
setRetryCount
public void setRetryCount(int retryCount)
Setter for the field
retryCount
.- Parameters:
retryCount
- a int.
-
getOrganismEnricher
public OrganismEnricher getOrganismEnricher()
Getter for the field
organismEnricher
.- Specified by:
getOrganismEnricher
in interfaceInteractorEnricher<T extends Interactor>
- Returns:
- a
OrganismEnricher
object.
-
setOrganismEnricher
public void setOrganismEnricher(OrganismEnricher organismEnricher)
setOrganismEnricher.
- Specified by:
setOrganismEnricher
in interfaceInteractorEnricher<T extends Interactor>
- Parameters:
organismEnricher
- aOrganismEnricher
object.
-
setCvTermEnricher
public void setCvTermEnricher(CvTermEnricher<CvTerm> cvTermEnricher)
setCvTermEnricher.
- Specified by:
setCvTermEnricher
in interfaceInteractorEnricher<T extends Interactor>
- Parameters:
cvTermEnricher
- aCvTermEnricher
object.
-
getCvTermEnricher
public CvTermEnricher<CvTerm> getCvTermEnricher()
Getter for the field
cvTermEnricher
.- Specified by:
getCvTermEnricher
in interfaceInteractorEnricher<T extends Interactor>
- Returns:
- a
CvTermEnricher
object.
-
getListener
public InteractorEnricherListener<T> getListener()
Getter for the field
listener
.- Specified by:
getListener
in interfaceInteractorEnricher<T extends Interactor>
- Returns:
- a
InteractorEnricherListener
object.
-
setListener
public void setListener(InteractorEnricherListener<T> listener)
setListener.
- Specified by:
setListener
in interfaceInteractorEnricher<T extends Interactor>
- Parameters:
listener
- aInteractorEnricherListener
object.
-
find
public abstract T find(T objectToEnrich) throws EnricherException
find.
- Specified by:
find
in classAbstractMIEnricher<T extends Interactor>
- Parameters:
objectToEnrich
- a T object.- Returns:
- a T object.
- Throws:
EnricherException
- if any.
-
onEnrichedVersionNotFound
protected void onEnrichedVersionNotFound(T objectToEnrich) throws EnricherException
onEnrichedVersionNotFound.
- Specified by:
onEnrichedVersionNotFound
in classAbstractMIEnricher<T extends Interactor>
- Parameters:
objectToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
enrich
public void enrich(T objectToEnrich, T fetchedObject) throws EnricherException
enrich.
- Specified by:
enrich
in interfaceMIEnricher<T extends Interactor>
- Specified by:
enrich
in classAbstractMIEnricher<T extends Interactor>
- Parameters:
objectToEnrich
- a T object.fetchedObject
- a T object.- Throws:
EnricherException
- if any.
-
processAnnotations
protected void processAnnotations(T objectToEnrich, T fetchedObject) throws EnricherException
processAnnotations.
- Parameters:
objectToEnrich
- a T object.fetchedObject
- a T object.- Throws:
EnricherException
- if any.
-
getInteractorFetcher
public InteractorFetcher<T> getInteractorFetcher()
getInteractorFetcher.
- Specified by:
getInteractorFetcher
in interfaceInteractorEnricher<T extends Interactor>
- Returns:
- a
InteractorFetcher
object.
-
isFullEnrichment
protected abstract boolean isFullEnrichment()
isFullEnrichment.
- Returns:
- a boolean.
-
onCompletedEnrichment
protected abstract void onCompletedEnrichment(T objectToEnrich)
onCompletedEnrichment.
- Parameters:
objectToEnrich
- a T object.
-
onInteractorCheckFailure
protected abstract void onInteractorCheckFailure(T objectToEnrich, T fetchedObject) throws EnricherException
onInteractorCheckFailure.
- Parameters:
objectToEnrich
- a T object.fetchedObject
- a T object.- Throws:
EnricherException
- if any.
-
canEnrichInteractor
protected boolean canEnrichInteractor(T objectToEnrich, T fetchedObject) throws EnricherException
canEnrichInteractor.
- Parameters:
objectToEnrich
- a T object.fetchedObject
- a T object.- Returns:
- a boolean.
- Throws:
EnricherException
- if any.
-
processOtherProperties
protected void processOtherProperties(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processOtherProperties.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processShortLabel
protected void processShortLabel(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processShortLabel.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processAliases
public void processAliases(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processAliases.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processIdentifiers
protected void processIdentifiers(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processIdentifiers.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processFullName
public void processFullName(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processFullName.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processInteractorType
public void processInteractorType(T entityToEnrich, T fetched) throws EnricherException
processInteractorType.
- Parameters:
entityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processInteractorType
protected void processInteractorType(T entityToEnrich) throws EnricherException
processInteractorType.
- Parameters:
entityToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
processOrganism
public void processOrganism(T entityToEnrich, T fetched) throws EnricherException
processOrganism.
- Parameters:
entityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processOrganism
protected void processOrganism(T entityToEnrich) throws EnricherException
processOrganism.
- Parameters:
entityToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
processChecksums
protected void processChecksums(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processChecksums.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
processXrefs
protected void processXrefs(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processXrefs.
- Parameters:
bioactiveEntityToEnrich
- a T object.fetched
- a T object.- Throws:
EnricherException
- if any.
-
-