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.protected
MinimalSourceEnricher(MinimalCvTermEnricher<Source> cvEnricher)
Constructor for MinimalSourceEnricher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enrich(Source cvTermToEnrich, Source cvTermFetched)
enrich.Source
find(Source objectToEnrich)
find.CvTermEnricherListener<Source>
getCvTermEnricherListener()
getCvTermEnricherListener.CvTermFetcher<Source>
getCvTermFetcher()
getCvTermFetcher.protected MinimalCvTermEnricher<Source>
getDelegate()
Getter for the fielddelegate
.PublicationEnricher
getPublicationEnricher()
Getter for the fieldpublicationEnricher
.protected void
onEnrichedVersionNotFound(Source objectToEnrich)
onEnrichedVersionNotFound.protected void
processPublication(Source cvTermToEnrich, Source cvTermFetched)
processPublication.protected void
processSource(Source cvTermToEnrich, Source cvTermFetched)
A method that can be overridden to add to or change the behaviour of enrichment without effecting fetching.void
setCvTermEnricherListener(CvTermEnricherListener<Source> listener)
setCvTermEnricherListener.void
setPublicationEnricher(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
- aMinimalCvTermEnricher
object.
-
-
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
- aSource
object.- Throws:
EnricherException
- if any.
-
processPublication
protected void processPublication(Source cvTermToEnrich, Source cvTermFetched) throws EnricherException
processPublication.
- Parameters:
cvTermToEnrich
- aSource
object.cvTermFetched
- aSource
object.- Throws:
EnricherException
- if any.
-
enrich
public void enrich(Source cvTermToEnrich, Source cvTermFetched) throws EnricherException
enrich.
- Specified by:
enrich
in interfaceMIEnricher<Source>
- Specified by:
enrich
in 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:
find
in 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:
onEnrichedVersionNotFound
in classAbstractMIEnricher<Source>
- Parameters:
objectToEnrich
- a T object.- Throws:
EnricherException
- if any.
-
getPublicationEnricher
public PublicationEnricher getPublicationEnricher()
Getter for the field
publicationEnricher
.- Specified by:
getPublicationEnricher
in interfaceSourceEnricher
- Returns:
- a
PublicationEnricher
object.
-
setPublicationEnricher
public void setPublicationEnricher(PublicationEnricher publicationEnricher)
setPublicationEnricher.
- Specified by:
setPublicationEnricher
in interfaceSourceEnricher
- Parameters:
publicationEnricher
- aPublicationEnricher
object.
-
getCvTermFetcher
public CvTermFetcher<Source> getCvTermFetcher()
getCvTermFetcher.
- Specified by:
getCvTermFetcher
in interfaceCvTermEnricher<Source>
- Returns:
- a
CvTermFetcher
object.
-
setCvTermEnricherListener
public void setCvTermEnricherListener(CvTermEnricherListener<Source> listener)
setCvTermEnricherListener.
- Specified by:
setCvTermEnricherListener
in interfaceCvTermEnricher<Source>
- Parameters:
listener
- aCvTermEnricherListener
object.
-
getCvTermEnricherListener
public CvTermEnricherListener<Source> getCvTermEnricherListener()
getCvTermEnricherListener.
- Specified by:
getCvTermEnricherListener
in interfaceCvTermEnricher<Source>
- Returns:
- a
CvTermEnricherListener
object.
-
getDelegate
protected MinimalCvTermEnricher<Source> getDelegate()
Getter for the field
delegate
.- Returns:
- a
MinimalCvTermEnricher
object.
-
-