Class PublicationIdentifierSynchronizerImpl
- java.lang.Object
-
- psidev.psi.mi.jami.imex.actions.impl.PublicationIdentifierSynchronizerImpl
-
- All Implemented Interfaces:
PublicationIdentifierSynchronizer
public class PublicationIdentifierSynchronizerImpl extends Object implements PublicationIdentifierSynchronizer
Class which update identifiers in IMEx central if a submitted publication has been published in PubMed- Since:
29/03/12
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
-
Fields inherited from interface psidev.psi.mi.jami.imex.actions.PublicationIdentifierSynchronizer
INTERNAL
-
-
Constructor Summary
Constructors Constructor Description PublicationIdentifierSynchronizerImpl(ImexCentralClient client)
Constructor for PublicationIdentifierSynchronizerImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areIdenticalPublications(ImexPublication p1, ImexPublication p2)
areIdenticalPublications.ImexCentralClient
getImexCentralClient()
getImexCentralClient.boolean
isPublicationIdentifierInSyncWithImexCentral(String pubId, String source, ImexPublication imexPublication)
It will look at all identifiers attached to the record in IMEx central and see if the publication identifier is also attached to the IMEx recordvoid
synchronizePublicationIdentifier(Publication publication, Publication imexPublication)
Update the IMEx record in case intact publication has a valid pubmed, unassigned or doi identifier that is not in IMEx central.
-
-
-
Constructor Detail
-
PublicationIdentifierSynchronizerImpl
public PublicationIdentifierSynchronizerImpl(ImexCentralClient client)
Constructor for PublicationIdentifierSynchronizerImpl.
- Parameters:
client
- aImexCentralClient
object.
-
-
Method Detail
-
isPublicationIdentifierInSyncWithImexCentral
public boolean isPublicationIdentifierInSyncWithImexCentral(String pubId, String source, ImexPublication imexPublication) throws BridgeFailedException
It will look at all identifiers attached to the record in IMEx central and see if the publication identifier is also attached to the IMEx record- Specified by:
isPublicationIdentifierInSyncWithImexCentral
in interfacePublicationIdentifierSynchronizer
- Parameters:
pubId
- aString
object.source
- aString
object.imexPublication
- aImexPublication
object.- Returns:
- true if the publication identifier is in IMEx central, false otherwise
- Throws:
BridgeFailedException
- if any.
-
synchronizePublicationIdentifier
public void synchronizePublicationIdentifier(Publication publication, Publication imexPublication) throws EnricherException, BridgeFailedException
Update the IMEx record in case intact publication has a valid pubmed, unassigned or doi identifier that is not in IMEx central. It will not update the publication and it is possible that it will not update the IMEx record if the pubmed or doi identifier is different in IMEx central. The publication record in IMEx central should have a valid IMEx id.- Specified by:
synchronizePublicationIdentifier
in interfacePublicationIdentifierSynchronizer
- Parameters:
publication
- aPublication
object.imexPublication
- aPublication
object.- Throws:
EnricherException
- : if the pubmed/doi identifier is different from the one in IMEx centralBridgeFailedException
- : if record not found, idnetifier s not recognized or IMEx central is not responding
-
areIdenticalPublications
public boolean areIdenticalPublications(ImexPublication p1, ImexPublication p2)
areIdenticalPublications.
- Parameters:
p1
- aImexPublication
object.p2
- aImexPublication
object.- Returns:
- a boolean.
-
getImexCentralClient
public ImexCentralClient getImexCentralClient()
getImexCentralClient.
- Specified by:
getImexCentralClient
in interfacePublicationIdentifierSynchronizer
- Returns:
- a
ImexCentralClient
object.
-
-