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.protected
FullPublicationUpdater(MinimalPublicationUpdater minimalPublicationUpdater)
Constructor for FullPublicationUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Publication
find(Publication publicationToEnrich)
find.protected MinimalPublicationUpdater
getMinimalPublicationUpdater()
Getter for the fieldminimalPublicationUpdater
.PublicationEnricherListener
getPublicationEnricherListener()
Gets the current publication listenerPublicationFetcher
getPublicationFetcher()
Gets the publication fetcher which is currently being used to retrieve entriesprotected void
processAnnotations(Publication publicationToEnrich, Publication fetched)
processAnnotations.protected void
processJournal(Publication publicationToEnrich, Publication fetched)
processJournal.void
processPublication(Publication publicationToEnrich, Publication fetchedPublication)
The strategy for the enrichment of the publication.protected void
processPublicationTitle(Publication publicationToEnrich, Publication fetched)
processPublicationTitle.protected void
processXrefs(Publication publicationToEnrich, Publication fetched)
processXrefs.void
setPublicationEnricherListener(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
- aPublicationFetcher
object.
-
FullPublicationUpdater
protected FullPublicationUpdater(MinimalPublicationUpdater minimalPublicationUpdater)
Constructor for FullPublicationUpdater.
- Parameters:
minimalPublicationUpdater
- aMinimalPublicationUpdater
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.- Overrides:
processPublication
in classMinimalPublicationEnricher
- Parameters:
publicationToEnrich
- The publication which is being enriched.fetchedPublication
- aPublication
object.- Throws:
EnricherException
- if any.
-
processXrefs
protected void processXrefs(Publication publicationToEnrich, Publication fetched) throws EnricherException
processXrefs.
- Overrides:
processXrefs
in classFullPublicationEnricher
- Parameters:
publicationToEnrich
- aPublication
object.fetched
- aPublication
object.- Throws:
EnricherException
- if any.
-
processAnnotations
protected void processAnnotations(Publication publicationToEnrich, Publication fetched) throws EnricherException
processAnnotations.
- Overrides:
processAnnotations
in classFullPublicationEnricher
- Parameters:
publicationToEnrich
- aPublication
object.fetched
- aPublication
object.- Throws:
EnricherException
- if any.
-
processJournal
protected void processJournal(Publication publicationToEnrich, Publication fetched) throws EnricherException
processJournal.
- Overrides:
processJournal
in classFullPublicationEnricher
- Parameters:
publicationToEnrich
- aPublication
object.fetched
- aPublication
object.- Throws:
EnricherException
- if any.
-
processPublicationTitle
protected void processPublicationTitle(Publication publicationToEnrich, Publication fetched) throws EnricherException
processPublicationTitle.
- Overrides:
processPublicationTitle
in classFullPublicationEnricher
- Parameters:
publicationToEnrich
- aPublication
object.fetched
- aPublication
object.- Throws:
EnricherException
- if any.
-
setPublicationEnricherListener
public void setPublicationEnricherListener(PublicationEnricherListener listener)
setPublicationEnricherListener.
Sets the listener to report publication changes to. Can be null.- Specified by:
setPublicationEnricherListener
in interfacePublicationEnricher
- Overrides:
setPublicationEnricherListener
in classMinimalPublicationEnricher
- Parameters:
listener
- aPublicationEnricherListener
object.
-
getPublicationFetcher
public PublicationFetcher getPublicationFetcher()
Gets the publication fetcher which is currently being used to retrieve entries- Specified by:
getPublicationFetcher
in interfacePublicationEnricher
- Overrides:
getPublicationFetcher
in classMinimalPublicationEnricher
- Returns:
- the current publication fetcher.
-
getPublicationEnricherListener
public PublicationEnricherListener getPublicationEnricherListener()
Gets the current publication listener- Specified by:
getPublicationEnricherListener
in interfacePublicationEnricher
- Overrides:
getPublicationEnricherListener
in classMinimalPublicationEnricher
- Returns:
- the current publication listener
-
find
public Publication find(Publication publicationToEnrich) throws EnricherException
find.
- Overrides:
find
in 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
MinimalPublicationUpdater
object.
-
-