Class MinimalSourceEnricher
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<Source>
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalSourceEnricher
-
- All Implemented Interfaces:
CvTermEnricher<Source>,MIEnricher<Source>,SourceEnricher
- Direct Known Subclasses:
FullSourceEnricher,MinimalSourceUpdater
public class MinimalSourceEnricher extends AbstractMIEnricher<Source> implements SourceEnricher
Provides minimum enrichment of a Source. - enrich minimal properties of CvTerm (see MinimalCvTermEnricher for more details) - enrich publication using publication enricher. If the publication is not null in the source to enrich, it will ignore the publication loaded from the fetched source- Since:
- 08/05/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description MinimalSourceEnricher(SourceFetcher cvTermFetcher)A constructor matching super.protectedMinimalSourceEnricher(MinimalCvTermEnricher<Source> cvEnricher)Constructor for MinimalSourceEnricher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenrich(Source cvTermToEnrich, Source cvTermFetched)enrich.Sourcefind(Source objectToEnrich)find.CvTermEnricherListener<Source>getCvTermEnricherListener()getCvTermEnricherListener.CvTermFetcher<Source>getCvTermFetcher()getCvTermFetcher.protected MinimalCvTermEnricher<Source>getDelegate()Getter for the fielddelegate.PublicationEnrichergetPublicationEnricher()Getter for the fieldpublicationEnricher.protected voidonEnrichedVersionNotFound(Source objectToEnrich)onEnrichedVersionNotFound.protected voidprocessPublication(Source cvTermToEnrich, Source cvTermFetched)processPublication.protected voidprocessSource(Source cvTermToEnrich, Source cvTermFetched)A method that can be overridden to add to or change the behaviour of enrichment without effecting fetching.voidsetCvTermEnricherListener(CvTermEnricherListener<Source> listener)setCvTermEnricherListener.voidsetPublicationEnricher(PublicationEnricher publicationEnricher)setPublicationEnricher.-
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
-
MinimalSourceEnricher
public MinimalSourceEnricher(SourceFetcher cvTermFetcher)
A constructor matching super.- Parameters:
cvTermFetcher- The fetcher to initiate the enricher with. If null, an illegal state exception will be thrown at the next enrichment.
-
MinimalSourceEnricher
protected MinimalSourceEnricher(MinimalCvTermEnricher<Source> cvEnricher)
Constructor for MinimalSourceEnricher.
- Parameters:
cvEnricher- aMinimalCvTermEnricherobject.
-
-
Method Detail
-
processSource
protected void processSource(Source cvTermToEnrich, Source cvTermFetched) throws EnricherException
A method that can be overridden to add to or change the behaviour of enrichment without effecting fetching.- Parameters:
cvTermToEnrich- the CvTerm to enrichcvTermFetched- aSourceobject.- Throws:
EnricherException- if any.
-
processPublication
protected void processPublication(Source cvTermToEnrich, Source cvTermFetched) throws EnricherException
processPublication.
- Parameters:
cvTermToEnrich- aSourceobject.cvTermFetched- aSourceobject.- Throws:
EnricherException- if any.
-
enrich
public void enrich(Source cvTermToEnrich, Source cvTermFetched) throws EnricherException
enrich.
- Specified by:
enrichin interfaceMIEnricher<Source>- Specified by:
enrichin classAbstractMIEnricher<Source>- Parameters:
cvTermToEnrich- a T object.cvTermFetched- a T object.- Throws:
EnricherException- if any.
-
find
public Source find(Source objectToEnrich) throws EnricherException
find.
- Specified by:
findin classAbstractMIEnricher<Source>- Parameters:
objectToEnrich- a T object.- Returns:
- a T object.
- Throws:
EnricherException- if any.
-
onEnrichedVersionNotFound
protected void onEnrichedVersionNotFound(Source objectToEnrich) throws EnricherException
onEnrichedVersionNotFound.
- Specified by:
onEnrichedVersionNotFoundin classAbstractMIEnricher<Source>- Parameters:
objectToEnrich- a T object.- Throws:
EnricherException- if any.
-
getPublicationEnricher
public PublicationEnricher getPublicationEnricher()
Getter for the field
publicationEnricher.- Specified by:
getPublicationEnricherin interfaceSourceEnricher- Returns:
- a
PublicationEnricherobject.
-
setPublicationEnricher
public void setPublicationEnricher(PublicationEnricher publicationEnricher)
setPublicationEnricher.
- Specified by:
setPublicationEnricherin interfaceSourceEnricher- Parameters:
publicationEnricher- aPublicationEnricherobject.
-
getCvTermFetcher
public CvTermFetcher<Source> getCvTermFetcher()
getCvTermFetcher.
- Specified by:
getCvTermFetcherin interfaceCvTermEnricher<Source>- Returns:
- a
CvTermFetcherobject.
-
setCvTermEnricherListener
public void setCvTermEnricherListener(CvTermEnricherListener<Source> listener)
setCvTermEnricherListener.
- Specified by:
setCvTermEnricherListenerin interfaceCvTermEnricher<Source>- Parameters:
listener- aCvTermEnricherListenerobject.
-
getCvTermEnricherListener
public CvTermEnricherListener<Source> getCvTermEnricherListener()
getCvTermEnricherListener.
- Specified by:
getCvTermEnricherListenerin interfaceCvTermEnricher<Source>- Returns:
- a
CvTermEnricherListenerobject.
-
getDelegate
protected MinimalCvTermEnricher<Source> getDelegate()
Getter for the field
delegate.- Returns:
- a
MinimalCvTermEnricherobject.
-
-