Class ImexAssignerImpl
- java.lang.Object
-
- psidev.psi.mi.jami.imex.actions.impl.ImexAssignerImpl
-
- All Implemented Interfaces:
ImexAssigner
public class ImexAssignerImpl extends Object implements ImexAssigner
This class will assign an IMEx id to a publication using imex central webservice and update experiments and interactions- Since:
02/03/12
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ImexAssignerImpl(ImexCentralClient client)
Constructor for ImexAssignerImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Publication
assignImexIdentifier(Publication publication, Publication imexPublication)
Assign a new IMEx id to a publication that has not been assigned yet and update/clean up the annotations of the publication (full coverage and imex curation).void
clearInteractionImexContext()
clearInteractionImexContext.protected int
getCurrentIndex()
Getter for the fieldcurrentIndex
.ImexCentralClient
getImexCentralClient()
getImexCentralClient.protected Pattern
getInteraction_imex_regexp()
Getter for the fieldinteraction_imex_regexp
.int
getNextImexChunkNumberAndFilterValidImexIdsFrom(Publication publication)
getNextImexChunkNumberAndFilterValidImexIdsFrom.boolean
isEntitledToImex(InteractionEvidence interaction)
isEntitledToImex.protected void
setCurrentIndex(int currentIndex)
Setter for the fieldcurrentIndex
.boolean
updateImexIdentifierForExperiment(Experiment experiment, String imexId)
Add a IMEx primary reference to the experimentboolean
updateImexIdentifierForInteraction(InteractionEvidence interaction, String imexId)
Add a IMEx primary reference to the interaction
-
-
-
Constructor Detail
-
ImexAssignerImpl
public ImexAssignerImpl(ImexCentralClient client)
Constructor for ImexAssignerImpl.
- Parameters:
client
- aImexCentralClient
object.
-
-
Method Detail
-
assignImexIdentifier
public Publication assignImexIdentifier(Publication publication, Publication imexPublication) throws BridgeFailedException
Assign a new IMEx id to a publication that has not been assigned yet and update/clean up the annotations of the publication (full coverage and imex curation). It adds an IMEx primary reference to the intact publication. It is only possible to assign a new IMEx id to publications having valid pubmed ids (no unassigned and no DOI number)- Specified by:
assignImexIdentifier
in interfaceImexAssigner
- Parameters:
publication
- : the publication in IntActimexPublication
- : the publication in IMEx- Returns:
- the imex id if the IMEx assigner was successful, null otherwise
- Throws:
BridgeFailedException
- if no record found or no IMEx id
-
updateImexIdentifierForExperiment
public boolean updateImexIdentifierForExperiment(Experiment experiment, String imexId) throws EnricherException
Add a IMEx primary reference to the experiment- Specified by:
updateImexIdentifierForExperiment
in interfaceImexAssigner
- Parameters:
experiment
- aExperiment
object.imexId
- aString
object.- Returns:
- true if the IMEx assigner did an update of the experiment, false otherwise
- Throws:
EnricherException
- if any.
-
updateImexIdentifierForInteraction
public boolean updateImexIdentifierForInteraction(InteractionEvidence interaction, String imexId) throws EnricherException
Add a IMEx primary reference to the interaction- Specified by:
updateImexIdentifierForInteraction
in interfaceImexAssigner
- Parameters:
interaction
- aInteractionEvidence
object.imexId
- aString
object.- Returns:
- true if the IMEx assigner did an update of the interaction, false otherwise
- Throws:
EnricherException
- if any.
-
getImexCentralClient
public ImexCentralClient getImexCentralClient()
getImexCentralClient.
- Specified by:
getImexCentralClient
in interfaceImexAssigner
- Returns:
- a
ImexCentralClient
object.
-
isEntitledToImex
public boolean isEntitledToImex(InteractionEvidence interaction)
isEntitledToImex.
- Specified by:
isEntitledToImex
in interfaceImexAssigner
- Parameters:
interaction
- aInteractionEvidence
object.- Returns:
- true if the interaction can have an IMEx id, false otherwise
-
clearInteractionImexContext
public void clearInteractionImexContext()
clearInteractionImexContext.
- Specified by:
clearInteractionImexContext
in interfaceImexAssigner
-
getNextImexChunkNumberAndFilterValidImexIdsFrom
public int getNextImexChunkNumberAndFilterValidImexIdsFrom(Publication publication)
getNextImexChunkNumberAndFilterValidImexIdsFrom.
- Specified by:
getNextImexChunkNumberAndFilterValidImexIdsFrom
in interfaceImexAssigner
- Parameters:
publication
- aPublication
object.- Returns:
- a int.
-
getCurrentIndex
protected int getCurrentIndex()
Getter for the field
currentIndex
.- Returns:
- a int.
-
getInteraction_imex_regexp
protected Pattern getInteraction_imex_regexp()
Getter for the field
interaction_imex_regexp
.- Returns:
- a
Pattern
object.
-
setCurrentIndex
protected void setCurrentIndex(int currentIndex)
Setter for the field
currentIndex
.- Parameters:
currentIndex
- a int.
-
-