Class MinimalCuratedPublicationEnricher
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<Publication>
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalCuratedPublicationEnricher
-
- All Implemented Interfaces:
CuratedPublicationEnricher,MIEnricher<Publication>,PublicationEnricher
- Direct Known Subclasses:
FullCuratedPublicationEnricher,MinimalCuratedPublicationUpdater
public class MinimalCuratedPublicationEnricher extends AbstractMIEnricher<Publication> implements CuratedPublicationEnricher
Provides minimal enrichment of curatedPublication. - enrich minimal properties of publication. See description in MinimalPublicationEnricher - enrich source of a publication if the sourceEnricher is not null. If the source is not null in the publication to enrich, it will ignore the source loaded from the fetched publication It will ignore all other properties of a publication- Since:
- 31/07/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description MinimalCuratedPublicationEnricher(PublicationFetcher fetcher)The only constructor.protectedMinimalCuratedPublicationEnricher(MinimalPublicationEnricher delegate)Constructor for MinimalCuratedPublicationEnricher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenrich(Publication objectToEnrich, Publication fetchedObject)enrich.Publicationfind(Publication objectToEnrich)find.protected MinimalPublicationEnrichergetDelegate()Getter for the fielddelegate.PublicationEnricherListenergetPublicationEnricherListener()getPublicationEnricherListener.PublicationFetchergetPublicationFetcher()getPublicationFetcher.SourceEnrichergetSourceEnricher()Getter for the fieldsourceEnricher.protected voidonEnrichedVersionNotFound(Publication objectToEnrich)onEnrichedVersionNotFound.protected voidprocessOtherProperties(Publication publicationToEnrich, Publication fetchedPublication)processOtherProperties.voidprocessPublication(Publication publicationToEnrich, Publication fetchedPublication)The strategy for the enrichment of the publication.protected voidprocessSource(Publication publicationToEnrich, Publication fetchedPublication)processSource.voidsetPublicationEnricherListener(PublicationEnricherListener listener)setPublicationEnricherListener.voidsetSourceEnricher(SourceEnricher cvTermEnricher)setSourceEnricher.-
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
-
MinimalCuratedPublicationEnricher
public MinimalCuratedPublicationEnricher(PublicationFetcher fetcher)
The only constructor. It requires a publication fetcher. If the publication fetcher is null, an illegal state exception will be thrown at the next enrichment.- Parameters:
fetcher- The PublicationFetcher to use.
-
MinimalCuratedPublicationEnricher
protected MinimalCuratedPublicationEnricher(MinimalPublicationEnricher delegate)
Constructor for MinimalCuratedPublicationEnricher.
- Parameters:
delegate- aMinimalPublicationEnricherobject.
-
-
Method Detail
-
processPublication
public void processPublication(Publication publicationToEnrich, Publication fetchedPublication) throws EnricherException
The strategy for the enrichment of the publication. This methods can be overwritten to change the behaviour of the enrichment.- Parameters:
publicationToEnrich- The publication which is being enriched.fetchedPublication- aPublicationobject.- Throws:
EnricherException- if any.
-
setSourceEnricher
public void setSourceEnricher(SourceEnricher cvTermEnricher)
setSourceEnricher.
- Specified by:
setSourceEnricherin interfaceCuratedPublicationEnricher- Parameters:
cvTermEnricher- aSourceEnricherobject.
-
getSourceEnricher
public SourceEnricher getSourceEnricher()
Getter for the field
sourceEnricher.- Specified by:
getSourceEnricherin interfaceCuratedPublicationEnricher- Returns:
- a
SourceEnricherobject.
-
processOtherProperties
protected void processOtherProperties(Publication publicationToEnrich, Publication fetchedPublication) throws EnricherException
processOtherProperties.
- Parameters:
publicationToEnrich- aPublicationobject.fetchedPublication- aPublicationobject.- Throws:
EnricherException- if any.
-
processSource
protected void processSource(Publication publicationToEnrich, Publication fetchedPublication) throws EnricherException
processSource.
- Parameters:
publicationToEnrich- aPublicationobject.fetchedPublication- aPublicationobject.- Throws:
EnricherException- if any.
-
getPublicationFetcher
public PublicationFetcher getPublicationFetcher()
getPublicationFetcher.
- Specified by:
getPublicationFetcherin interfacePublicationEnricher- Returns:
- a
PublicationFetcherobject.
-
getPublicationEnricherListener
public PublicationEnricherListener getPublicationEnricherListener()
getPublicationEnricherListener.
- Specified by:
getPublicationEnricherListenerin interfacePublicationEnricher- Returns:
- a
PublicationEnricherListenerobject.
-
setPublicationEnricherListener
public void setPublicationEnricherListener(PublicationEnricherListener listener)
setPublicationEnricherListener.
- Specified by:
setPublicationEnricherListenerin interfacePublicationEnricher- Parameters:
listener- aPublicationEnricherListenerobject.
-
enrich
public void enrich(Publication objectToEnrich, Publication fetchedObject) throws EnricherException
enrich.
- Specified by:
enrichin interfaceMIEnricher<Publication>- Specified by:
enrichin classAbstractMIEnricher<Publication>- Parameters:
objectToEnrich- a T object.fetchedObject- a T object.- Throws:
EnricherException- if any.
-
find
public Publication find(Publication objectToEnrich) throws EnricherException
find.
- Specified by:
findin classAbstractMIEnricher<Publication>- Parameters:
objectToEnrich- a T object.- Returns:
- a T object.
- Throws:
EnricherException- if any.
-
onEnrichedVersionNotFound
protected void onEnrichedVersionNotFound(Publication objectToEnrich) throws EnricherException
onEnrichedVersionNotFound.
- Specified by:
onEnrichedVersionNotFoundin classAbstractMIEnricher<Publication>- Parameters:
objectToEnrich- a T object.- Throws:
EnricherException- if any.
-
getDelegate
protected MinimalPublicationEnricher getDelegate()
Getter for the field
delegate.- Returns:
- a
MinimalPublicationEnricherobject.
-
-