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.protected
MinimalCuratedPublicationEnricher(MinimalPublicationEnricher delegate)
Constructor for MinimalCuratedPublicationEnricher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enrich(Publication objectToEnrich, Publication fetchedObject)
enrich.Publication
find(Publication objectToEnrich)
find.protected MinimalPublicationEnricher
getDelegate()
Getter for the fielddelegate
.PublicationEnricherListener
getPublicationEnricherListener()
getPublicationEnricherListener.PublicationFetcher
getPublicationFetcher()
getPublicationFetcher.SourceEnricher
getSourceEnricher()
Getter for the fieldsourceEnricher
.protected void
onEnrichedVersionNotFound(Publication objectToEnrich)
onEnrichedVersionNotFound.protected void
processOtherProperties(Publication publicationToEnrich, Publication fetchedPublication)
processOtherProperties.void
processPublication(Publication publicationToEnrich, Publication fetchedPublication)
The strategy for the enrichment of the publication.protected void
processSource(Publication publicationToEnrich, Publication fetchedPublication)
processSource.void
setPublicationEnricherListener(PublicationEnricherListener listener)
setPublicationEnricherListener.void
setSourceEnricher(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
- aMinimalPublicationEnricher
object.
-
-
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
- aPublication
object.- Throws:
EnricherException
- if any.
-
setSourceEnricher
public void setSourceEnricher(SourceEnricher cvTermEnricher)
setSourceEnricher.
- Specified by:
setSourceEnricher
in interfaceCuratedPublicationEnricher
- Parameters:
cvTermEnricher
- aSourceEnricher
object.
-
getSourceEnricher
public SourceEnricher getSourceEnricher()
Getter for the field
sourceEnricher
.- Specified by:
getSourceEnricher
in interfaceCuratedPublicationEnricher
- Returns:
- a
SourceEnricher
object.
-
processOtherProperties
protected void processOtherProperties(Publication publicationToEnrich, Publication fetchedPublication) throws EnricherException
processOtherProperties.
- Parameters:
publicationToEnrich
- aPublication
object.fetchedPublication
- aPublication
object.- Throws:
EnricherException
- if any.
-
processSource
protected void processSource(Publication publicationToEnrich, Publication fetchedPublication) throws EnricherException
processSource.
- Parameters:
publicationToEnrich
- aPublication
object.fetchedPublication
- aPublication
object.- Throws:
EnricherException
- if any.
-
getPublicationFetcher
public PublicationFetcher getPublicationFetcher()
getPublicationFetcher.
- Specified by:
getPublicationFetcher
in interfacePublicationEnricher
- Returns:
- a
PublicationFetcher
object.
-
getPublicationEnricherListener
public PublicationEnricherListener getPublicationEnricherListener()
getPublicationEnricherListener.
- Specified by:
getPublicationEnricherListener
in interfacePublicationEnricher
- Returns:
- a
PublicationEnricherListener
object.
-
setPublicationEnricherListener
public void setPublicationEnricherListener(PublicationEnricherListener listener)
setPublicationEnricherListener.
- Specified by:
setPublicationEnricherListener
in interfacePublicationEnricher
- Parameters:
listener
- aPublicationEnricherListener
object.
-
enrich
public void enrich(Publication objectToEnrich, Publication fetchedObject) throws EnricherException
enrich.
- Specified by:
enrich
in interfaceMIEnricher<Publication>
- Specified by:
enrich
in 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:
find
in 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:
onEnrichedVersionNotFound
in classAbstractMIEnricher<Publication>
- Parameters:
objectToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
getDelegate
protected MinimalPublicationEnricher getDelegate()
Getter for the field
delegate
.- Returns:
- a
MinimalPublicationEnricher
object.
-
-