Class FullPublicationUpdater
- java.lang.Object
-
- psidev.psi.mi.jami.enricher.impl.AbstractMIEnricher<Publication>
-
- psidev.psi.mi.jami.enricher.impl.minimal.MinimalPublicationEnricher
-
- psidev.psi.mi.jami.enricher.impl.full.FullPublicationEnricher
-
- psidev.psi.mi.jami.enricher.impl.full.FullPublicationUpdater
-
- All Implemented Interfaces:
MIEnricher<Publication>,PublicationEnricher
public class FullPublicationUpdater extends FullPublicationEnricher
Provides full update of Publication. - update minimal properties as described in MinimalPublicationUpdater - update publication title. If the title of the publication to enrich is different from the title of the fetched publication, it will override the title with the title of the fetched publication - update publication journal. If the journal of the publication to enrich is different from the journal of the fetched publication, it will override the journal with the journal of the fetched publication - update xrefs (imex, etc.) of a publication. It will use DefaultXrefComparator to compare xrefs and add missing xrefs. It will also remove xrefs that are not in the fetched publication - update annotations of a publication. It will use DefaultAnnotationComparator to compare annotations and add missing annotations. It will also remove annotations that are not in the fetched publication- Since:
- 01/08/13
- Author:
- Gabriel Aldam (galdam@ebi.ac.uk)
-
-
Constructor Summary
Constructors Modifier Constructor Description FullPublicationUpdater(PublicationFetcher fetcher)Constructor for FullPublicationUpdater.protectedFullPublicationUpdater(MinimalPublicationUpdater minimalPublicationUpdater)Constructor for FullPublicationUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Publicationfind(Publication publicationToEnrich)find.protected MinimalPublicationUpdatergetMinimalPublicationUpdater()Getter for the fieldminimalPublicationUpdater.PublicationEnricherListenergetPublicationEnricherListener()Gets the current publication listenerPublicationFetchergetPublicationFetcher()Gets the publication fetcher which is currently being used to retrieve entriesprotected voidprocessAnnotations(Publication publicationToEnrich, Publication fetched)processAnnotations.protected voidprocessJournal(Publication publicationToEnrich, Publication fetched)processJournal.voidprocessPublication(Publication publicationToEnrich, Publication fetchedPublication)The strategy for the enrichment of the publication.protected voidprocessPublicationTitle(Publication publicationToEnrich, Publication fetched)processPublicationTitle.protected voidprocessXrefs(Publication publicationToEnrich, Publication fetched)processXrefs.voidsetPublicationEnricherListener(PublicationEnricherListener listener)setPublicationEnricherListener.-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.full.FullPublicationEnricher
processCurationDepth, processOtherProperties, processReleasedDate
-
Methods inherited from class psidev.psi.mi.jami.enricher.impl.minimal.MinimalPublicationEnricher
enrich, getRetryCount, onEnrichedVersionNotFound, processAuthors, processIdentifiers, processPublicationDate, 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
-
FullPublicationUpdater
public FullPublicationUpdater(PublicationFetcher fetcher)
Constructor for FullPublicationUpdater.
- Parameters:
fetcher- aPublicationFetcherobject.
-
FullPublicationUpdater
protected FullPublicationUpdater(MinimalPublicationUpdater minimalPublicationUpdater)
Constructor for FullPublicationUpdater.
- Parameters:
minimalPublicationUpdater- aMinimalPublicationUpdaterobject.
-
-
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.- Overrides:
processPublicationin classMinimalPublicationEnricher- Parameters:
publicationToEnrich- The publication which is being enriched.fetchedPublication- aPublicationobject.- Throws:
EnricherException- if any.
-
processXrefs
protected void processXrefs(Publication publicationToEnrich, Publication fetched) throws EnricherException
processXrefs.
- Overrides:
processXrefsin classFullPublicationEnricher- Parameters:
publicationToEnrich- aPublicationobject.fetched- aPublicationobject.- Throws:
EnricherException- if any.
-
processAnnotations
protected void processAnnotations(Publication publicationToEnrich, Publication fetched) throws EnricherException
processAnnotations.
- Overrides:
processAnnotationsin classFullPublicationEnricher- Parameters:
publicationToEnrich- aPublicationobject.fetched- aPublicationobject.- Throws:
EnricherException- if any.
-
processJournal
protected void processJournal(Publication publicationToEnrich, Publication fetched) throws EnricherException
processJournal.
- Overrides:
processJournalin classFullPublicationEnricher- Parameters:
publicationToEnrich- aPublicationobject.fetched- aPublicationobject.- Throws:
EnricherException- if any.
-
processPublicationTitle
protected void processPublicationTitle(Publication publicationToEnrich, Publication fetched) throws EnricherException
processPublicationTitle.
- Overrides:
processPublicationTitlein classFullPublicationEnricher- Parameters:
publicationToEnrich- aPublicationobject.fetched- aPublicationobject.- Throws:
EnricherException- if any.
-
setPublicationEnricherListener
public void setPublicationEnricherListener(PublicationEnricherListener listener)
setPublicationEnricherListener.
Sets the listener to report publication changes to. Can be null.- Specified by:
setPublicationEnricherListenerin interfacePublicationEnricher- Overrides:
setPublicationEnricherListenerin classMinimalPublicationEnricher- Parameters:
listener- aPublicationEnricherListenerobject.
-
getPublicationFetcher
public PublicationFetcher getPublicationFetcher()
Gets the publication fetcher which is currently being used to retrieve entries- Specified by:
getPublicationFetcherin interfacePublicationEnricher- Overrides:
getPublicationFetcherin classMinimalPublicationEnricher- Returns:
- the current publication fetcher.
-
getPublicationEnricherListener
public PublicationEnricherListener getPublicationEnricherListener()
Gets the current publication listener- Specified by:
getPublicationEnricherListenerin interfacePublicationEnricher- Overrides:
getPublicationEnricherListenerin classMinimalPublicationEnricher- Returns:
- the current publication listener
-
find
public Publication find(Publication publicationToEnrich) throws EnricherException
find.
- Overrides:
findin classMinimalPublicationEnricher- Parameters:
publicationToEnrich- a T object.- Returns:
- a T object.
- Throws:
EnricherException- if any.
-
getMinimalPublicationUpdater
protected MinimalPublicationUpdater getMinimalPublicationUpdater()
Getter for the field
minimalPublicationUpdater.- Returns:
- a
MinimalPublicationUpdaterobject.
-
-