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 booleancanEnrichInteractor(T objectToEnrich, T fetchedObject)canEnrichInteractor.voidenrich(T objectToEnrich, T fetchedObject)enrich.abstract Tfind(T objectToEnrich)find.CvTermEnricher<CvTerm>getCvTermEnricher()Getter for the fieldcvTermEnricher.InteractorFetcher<T>getInteractorFetcher()getInteractorFetcher.InteractorEnricherListener<T>getListener()Getter for the fieldlistener.OrganismEnrichergetOrganismEnricher()Getter for the fieldorganismEnricher.intgetRetryCount()Getter for the fieldretryCount.protected abstract booleanisFullEnrichment()isFullEnrichment.protected abstract voidonCompletedEnrichment(T objectToEnrich)onCompletedEnrichment.protected voidonEnrichedVersionNotFound(T objectToEnrich)onEnrichedVersionNotFound.protected abstract voidonInteractorCheckFailure(T objectToEnrich, T fetchedObject)onInteractorCheckFailure.voidprocessAliases(T bioactiveEntityToEnrich, T fetched)processAliases.protected voidprocessAnnotations(T objectToEnrich, T fetchedObject)processAnnotations.protected voidprocessChecksums(T bioactiveEntityToEnrich, T fetched)processChecksums.voidprocessFullName(T bioactiveEntityToEnrich, T fetched)processFullName.protected voidprocessIdentifiers(T bioactiveEntityToEnrich, T fetched)processIdentifiers.protected voidprocessInteractorType(T entityToEnrich)processInteractorType.voidprocessInteractorType(T entityToEnrich, T fetched)processInteractorType.protected voidprocessOrganism(T entityToEnrich)processOrganism.voidprocessOrganism(T entityToEnrich, T fetched)processOrganism.protected voidprocessOtherProperties(T bioactiveEntityToEnrich, T fetched)processOtherProperties.protected voidprocessShortLabel(T bioactiveEntityToEnrich, T fetched)processShortLabel.protected voidprocessXrefs(T bioactiveEntityToEnrich, T fetched)processXrefs.voidsetCvTermEnricher(CvTermEnricher<CvTerm> cvTermEnricher)setCvTermEnricher.voidsetListener(InteractorEnricherListener<T> listener)setListener.voidsetOrganismEnricher(OrganismEnricher organismEnricher)setOrganismEnricher.voidsetRetryCount(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- aInteractorFetcherobject.
-
-
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:
getOrganismEnricherin interfaceInteractorEnricher<T extends Interactor>- Returns:
- a
OrganismEnricherobject.
-
setOrganismEnricher
public void setOrganismEnricher(OrganismEnricher organismEnricher)
setOrganismEnricher.
- Specified by:
setOrganismEnricherin interfaceInteractorEnricher<T extends Interactor>- Parameters:
organismEnricher- aOrganismEnricherobject.
-
setCvTermEnricher
public void setCvTermEnricher(CvTermEnricher<CvTerm> cvTermEnricher)
setCvTermEnricher.
- Specified by:
setCvTermEnricherin interfaceInteractorEnricher<T extends Interactor>- Parameters:
cvTermEnricher- aCvTermEnricherobject.
-
getCvTermEnricher
public CvTermEnricher<CvTerm> getCvTermEnricher()
Getter for the field
cvTermEnricher.- Specified by:
getCvTermEnricherin interfaceInteractorEnricher<T extends Interactor>- Returns:
- a
CvTermEnricherobject.
-
getListener
public InteractorEnricherListener<T> getListener()
Getter for the field
listener.- Specified by:
getListenerin interfaceInteractorEnricher<T extends Interactor>- Returns:
- a
InteractorEnricherListenerobject.
-
setListener
public void setListener(InteractorEnricherListener<T> listener)
setListener.
- Specified by:
setListenerin interfaceInteractorEnricher<T extends Interactor>- Parameters:
listener- aInteractorEnricherListenerobject.
-
find
public abstract T find(T objectToEnrich) throws EnricherException
find.
- Specified by:
findin 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:
onEnrichedVersionNotFoundin 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:
enrichin interfaceMIEnricher<T extends Interactor>- Specified by:
enrichin 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:
getInteractorFetcherin interfaceInteractorEnricher<T extends Interactor>- Returns:
- a
InteractorFetcherobject.
-
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.
-
-