Package psidev.psi.mi.jami.enricher.impl
Class AbstractInteractorUpdater<T extends Interactor>
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<T>
-
- psidev.psi.mi.jami.enricher.impl.AbstractInteractorEnricher<T>
-
- psidev.psi.mi.jami.enricher.impl.AbstractInteractorUpdater<T>
-
- All Implemented Interfaces:
InteractorEnricher<T>,MIEnricher<T>
- Direct Known Subclasses:
FullInteractorBaseUpdater,MinimalBioactiveEntityUpdater,MinimalGeneUpdater,MinimalInteractorBaseUpdater,MinimalProteinUpdater
public abstract class AbstractInteractorUpdater<T extends Interactor> extends AbstractInteractorEnricher<T>
Abstract class for updater of interactors Minimal update: - enrich shortname of an interactor. If the shortname in the interactor to enrich id different from the shortname loaded from the fetched interactor, it will override the shortname of the interactor to enrich with the shortname of the fetched interactor - enrich fullname of an interactor. If the fullname in the interactor to enrich id different from the fullName loaded from the fetched interactor, it will override the fullname of the interactor to enrich with the fullname of the fetched interactor 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. It will remove identifiers that are not in the fectched interactor - 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 in the interactor to enrich id different from the interactor type loaded from the fetched interactor (see DefaultCvTermComparator), it will override the interactor type of the interactor to enrich with the interactor type of the fetched interactor - enrich organism of an interactor if the organismEnricher is not null. If the organism in the interactor to enrich id different from the organism loaded from the fetched interactor (see DefaultOrganismComparator), it will override the organism of the interactor to enrich with the organism of the fetched interactor Full update: - enrich xrefs. It will use DefaultXrefComparator to compare xrefs and add missing xrefs without removing any existing xrefs. It will use DefaultXrefComparator to compare identifiers and add missing identifiers. It will remove xrefs that are not in the fectched interactor - enrich checksums, It will use DefaultChecksumComparator to compare checksums and add missing xrefs without removing any existing checksums. It will use DefaultXrefComparator to compare identifiers and add missing identifiers. It will remove checksum that are not in the fectched interactor - enrich annotations It will use DefaultAnnotationComparator to compare annotations and add missing xrefs without removing any existing annotations. It will use DefaultXrefComparator to compare identifiers and add missing identifiers. It will remove annotations that are not in the fectched interactor- Since:
01/10/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AbstractInteractorUpdater(AbstractInteractorEnricher<T> interactorEnricher)Constructor for AbstractInteractorUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEnrichInteractor(T entityToEnrich, T fetchedEntity)canEnrichInteractor.Tfind(T objectToEnrich)find.protected AbstractInteractorEnricher<T>getInteractorEnricher()Getter for the fieldinteractorEnricher.InteractorEnricherListener<T>getListener()Getter for the fieldlistener.protected booleanisFullEnrichment()isFullEnrichment.protected voidonCompletedEnrichment(T objectToEnrich)onCompletedEnrichment.protected voidonEnrichedVersionNotFound(T objectToEnrich)onEnrichedVersionNotFound.protected 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.voidprocessInteractorType(T entityToEnrich, T fetched)processInteractorType.voidprocessOrganism(T entityToEnrich, T fetched)processOrganism.protected voidprocessShortLabel(T bioactiveEntityToEnrich, T fetched)processShortLabel.protected voidprocessXrefs(T bioactiveEntityToEnrich, T fetched)processXrefs.voidsetListener(InteractorEnricherListener<T> listener)setListener.-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.AbstractInteractorEnricher
enrich, getCvTermEnricher, getInteractorFetcher, getOrganismEnricher, getRetryCount, processInteractorType, processOrganism, processOtherProperties, setCvTermEnricher, setOrganismEnricher, setRetryCount
-
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
-
AbstractInteractorUpdater
public AbstractInteractorUpdater(AbstractInteractorEnricher<T> interactorEnricher)
Constructor for AbstractInteractorUpdater.
- Parameters:
interactorEnricher- aAbstractInteractorEnricherobject.
-
-
Method Detail
-
processShortLabel
protected void processShortLabel(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processShortLabel.
- Overrides:
processShortLabelin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processAliases
public void processAliases(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processAliases.
- Overrides:
processAliasesin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processIdentifiers
protected void processIdentifiers(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processIdentifiers.
- Overrides:
processIdentifiersin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processFullName
public void processFullName(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processFullName.
- Overrides:
processFullNamein classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processInteractorType
public void processInteractorType(T entityToEnrich, T fetched) throws EnricherException
processInteractorType.
- Overrides:
processInteractorTypein classAbstractInteractorEnricher<T extends Interactor>- Parameters:
entityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processOrganism
public void processOrganism(T entityToEnrich, T fetched) throws EnricherException
processOrganism.
- Overrides:
processOrganismin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
entityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processChecksums
protected void processChecksums(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processChecksums.
- Overrides:
processChecksumsin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
processAnnotations
protected void processAnnotations(T objectToEnrich, T fetchedObject) throws EnricherException
processAnnotations.
- Overrides:
processAnnotationsin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
objectToEnrich- a T object.fetchedObject- a T object.- Throws:
EnricherException- if any.
-
processXrefs
protected void processXrefs(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processXrefs.
- Overrides:
processXrefsin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
bioactiveEntityToEnrich- a T object.fetched- a T object.- Throws:
EnricherException- if any.
-
getListener
public InteractorEnricherListener<T> getListener()
Getter for the field
listener.- Specified by:
getListenerin interfaceInteractorEnricher<T extends Interactor>- Overrides:
getListenerin classAbstractInteractorEnricher<T extends Interactor>- Returns:
- a
InteractorEnricherListenerobject.
-
setListener
public void setListener(InteractorEnricherListener<T> listener)
setListener.
- Specified by:
setListenerin interfaceInteractorEnricher<T extends Interactor>- Overrides:
setListenerin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
listener- aInteractorEnricherListenerobject.
-
find
public T find(T objectToEnrich) throws EnricherException
find.
- Specified by:
findin classAbstractInteractorEnricher<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.
- Overrides:
onEnrichedVersionNotFoundin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
objectToEnrich- a T object.- Throws:
EnricherException- if any.
-
isFullEnrichment
protected boolean isFullEnrichment()
isFullEnrichment.
- Specified by:
isFullEnrichmentin classAbstractInteractorEnricher<T extends Interactor>- Returns:
- a boolean.
-
onCompletedEnrichment
protected void onCompletedEnrichment(T objectToEnrich)
onCompletedEnrichment.
- Specified by:
onCompletedEnrichmentin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
objectToEnrich- a T object.
-
onInteractorCheckFailure
protected void onInteractorCheckFailure(T objectToEnrich, T fetchedObject) throws EnricherException
onInteractorCheckFailure.
- Specified by:
onInteractorCheckFailurein classAbstractInteractorEnricher<T extends Interactor>- Parameters:
objectToEnrich- a T object.fetchedObject- a T object.- Throws:
EnricherException- if any.
-
canEnrichInteractor
protected boolean canEnrichInteractor(T entityToEnrich, T fetchedEntity) throws EnricherException
canEnrichInteractor.
- Overrides:
canEnrichInteractorin classAbstractInteractorEnricher<T extends Interactor>- Parameters:
entityToEnrich- a T object.fetchedEntity- a T object.- Returns:
- a boolean.
- Throws:
EnricherException- if any.
-
getInteractorEnricher
protected AbstractInteractorEnricher<T> getInteractorEnricher()
Getter for the field
interactorEnricher.- Returns:
- a
AbstractInteractorEnricherobject.
-
-