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 boolean
canEnrichInteractor(T entityToEnrich, T fetchedEntity)
canEnrichInteractor.T
find(T objectToEnrich)
find.protected AbstractInteractorEnricher<T>
getInteractorEnricher()
Getter for the fieldinteractorEnricher
.InteractorEnricherListener<T>
getListener()
Getter for the fieldlistener
.protected boolean
isFullEnrichment()
isFullEnrichment.protected void
onCompletedEnrichment(T objectToEnrich)
onCompletedEnrichment.protected void
onEnrichedVersionNotFound(T objectToEnrich)
onEnrichedVersionNotFound.protected 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.void
processInteractorType(T entityToEnrich, T fetched)
processInteractorType.void
processOrganism(T entityToEnrich, T fetched)
processOrganism.protected void
processShortLabel(T bioactiveEntityToEnrich, T fetched)
processShortLabel.protected void
processXrefs(T bioactiveEntityToEnrich, T fetched)
processXrefs.void
setListener(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
- aAbstractInteractorEnricher
object.
-
-
Method Detail
-
processShortLabel
protected void processShortLabel(T bioactiveEntityToEnrich, T fetched) throws EnricherException
processShortLabel.
- Overrides:
processShortLabel
in 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:
processAliases
in 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:
processIdentifiers
in 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:
processFullName
in 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:
processInteractorType
in 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:
processOrganism
in 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:
processChecksums
in 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:
processAnnotations
in 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:
processXrefs
in 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:
getListener
in interfaceInteractorEnricher<T extends Interactor>
- Overrides:
getListener
in classAbstractInteractorEnricher<T extends Interactor>
- Returns:
- a
InteractorEnricherListener
object.
-
setListener
public void setListener(InteractorEnricherListener<T> listener)
setListener.
- Specified by:
setListener
in interfaceInteractorEnricher<T extends Interactor>
- Overrides:
setListener
in classAbstractInteractorEnricher<T extends Interactor>
- Parameters:
listener
- aInteractorEnricherListener
object.
-
find
public T find(T objectToEnrich) throws EnricherException
find.
- Specified by:
find
in 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:
onEnrichedVersionNotFound
in classAbstractInteractorEnricher<T extends Interactor>
- Parameters:
objectToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
isFullEnrichment
protected boolean isFullEnrichment()
isFullEnrichment.
- Specified by:
isFullEnrichment
in classAbstractInteractorEnricher<T extends Interactor>
- Returns:
- a boolean.
-
onCompletedEnrichment
protected void onCompletedEnrichment(T objectToEnrich)
onCompletedEnrichment.
- Specified by:
onCompletedEnrichment
in classAbstractInteractorEnricher<T extends Interactor>
- Parameters:
objectToEnrich
- a T object.
-
onInteractorCheckFailure
protected void onInteractorCheckFailure(T objectToEnrich, T fetchedObject) throws EnricherException
onInteractorCheckFailure.
- Specified by:
onInteractorCheckFailure
in 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:
canEnrichInteractor
in 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
AbstractInteractorEnricher
object.
-
-