Package psidev.psi.mi.jami.bridges.imex
Interface ImexCentralClient
-
- All Superinterfaces:
PublicationFetcher
- All Known Implementing Classes:
DefaultImexCentralClient
,MockImexCentralClient
public interface ImexCentralClient extends PublicationFetcher
IMEx Central publication fetcher.
-
-
Field Summary
Fields Modifier and Type Field Description static String
IC_BETA
ConstantIC_BETA="https://imexcentral.org/icentralbeta/ws"{trunked}
static String
IC_PROD
ConstantIC_PROD="https://imexcentral.org/icentral/ws-v20"
static String
IC_TEST
ConstantIC_TEST="https://imexcentral.org/icentraltest/ws"{trunked}
static int
IDENTIFIER_MISSING
ConstantIDENTIFIER_MISSING=4
static int
IDENTIFIER_UNKNOWN
ConstantIDENTIFIER_UNKNOWN=5
static int
INTERNAL_SERVER_ERROR
ConstantINTERNAL_SERVER_ERROR=99
static int
NO_IMEX_ID
ConstantNO_IMEX_ID=9
static int
NO_RECORD
ConstantNO_RECORD=6
static int
NO_RECORD_CREATED
ConstantNO_RECORD_CREATED=7
static int
OPERATION_NOT_SUPPORTED
ConstantOPERATION_NOT_SUPPORTED=98
static int
OPERATION_NOT_VALID
ConstantOPERATION_NOT_VALID=3
static Pattern
pubmed_regexp
Constantpubmed_regexp
static int
STATUS_UNKNOWN
ConstantSTATUS_UNKNOWN=8
static int
UNKNOWN_GROUP
ConstantUNKNOWN_GROUP=11
static int
UNKNOWN_USER
ConstantUNKNOWN_USER=10
static int
USER_NOT_AUTHORIZED
ConstantUSER_NOT_AUTHORIZED=2
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createPublication(Publication publication)
Create a new publication record in IMEx central (not implemented yet in production but can be used in test with the MockImexCentralClient)Publication
createPublicationById(String identifier, String source)
Creates a publication given a valid pubmed id.Publication
fetchPublicationImexAccession(String identifier, String source, boolean assign)
Create a new IMEx id if requested for a given pubmed idCollection<Publication>
fetchPublicationsByOwner(String owner, int first, int max)
Collect a list of publications associated with a specific owner.Collection<Publication>
fetchPublicationsByStatus(String status, int first, int max)
Collect a list of publications having a specific status.String
getEndpoint()
getEndpoint.Publication
updatePublicationAdminGroup(String identifier, String source, Operation operation, String group)
Update the publication admin group given a valid pubmed identifier and a valid operator.Publication
updatePublicationAdminUser(String identifier, String source, Operation operation, String user)
Update the publication admin user given a valid pubmed identifier and a valid operator.Publication
updatePublicationIdentifier(String oldIdentifier, String oldSource, String newIdentifier, String source)
Update publication pubmed identifier, DOI number or internal identifier of an existing record in IMEx central.Publication
updatePublicationStatus(String identifier, String source, PublicationStatus status)
Update the status of a publication associated with a valid pubmed identifier already registered in IMEx central-
Methods inherited from interface psidev.psi.mi.jami.bridges.fetcher.PublicationFetcher
fetchByIdentifier, fetchByIdentifiers
-
-
-
-
Field Detail
-
IC_TEST
static final String IC_TEST
ConstantIC_TEST="https://imexcentral.org/icentraltest/ws"{trunked}
- See Also:
- Constant Field Values
-
IC_BETA
static final String IC_BETA
ConstantIC_BETA="https://imexcentral.org/icentralbeta/ws"{trunked}
- See Also:
- Constant Field Values
-
IC_PROD
static final String IC_PROD
ConstantIC_PROD="https://imexcentral.org/icentral/ws-v20"
- See Also:
- Constant Field Values
-
pubmed_regexp
static final Pattern pubmed_regexp
Constantpubmed_regexp
-
USER_NOT_AUTHORIZED
static final int USER_NOT_AUTHORIZED
ConstantUSER_NOT_AUTHORIZED=2
- See Also:
- Constant Field Values
-
OPERATION_NOT_VALID
static final int OPERATION_NOT_VALID
ConstantOPERATION_NOT_VALID=3
- See Also:
- Constant Field Values
-
IDENTIFIER_MISSING
static final int IDENTIFIER_MISSING
ConstantIDENTIFIER_MISSING=4
- See Also:
- Constant Field Values
-
IDENTIFIER_UNKNOWN
static final int IDENTIFIER_UNKNOWN
ConstantIDENTIFIER_UNKNOWN=5
- See Also:
- Constant Field Values
-
NO_RECORD
static final int NO_RECORD
ConstantNO_RECORD=6
- See Also:
- Constant Field Values
-
NO_RECORD_CREATED
static final int NO_RECORD_CREATED
ConstantNO_RECORD_CREATED=7
- See Also:
- Constant Field Values
-
STATUS_UNKNOWN
static final int STATUS_UNKNOWN
ConstantSTATUS_UNKNOWN=8
- See Also:
- Constant Field Values
-
NO_IMEX_ID
static final int NO_IMEX_ID
ConstantNO_IMEX_ID=9
- See Also:
- Constant Field Values
-
UNKNOWN_USER
static final int UNKNOWN_USER
ConstantUNKNOWN_USER=10
- See Also:
- Constant Field Values
-
UNKNOWN_GROUP
static final int UNKNOWN_GROUP
ConstantUNKNOWN_GROUP=11
- See Also:
- Constant Field Values
-
OPERATION_NOT_SUPPORTED
static final int OPERATION_NOT_SUPPORTED
ConstantOPERATION_NOT_SUPPORTED=98
- See Also:
- Constant Field Values
-
INTERNAL_SERVER_ERROR
static final int INTERNAL_SERVER_ERROR
ConstantINTERNAL_SERVER_ERROR=99
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEndpoint
String getEndpoint()
getEndpoint.
- Returns:
- the endpoint of the IMEx central webservice
-
fetchPublicationsByOwner
Collection<Publication> fetchPublicationsByOwner(String owner, int first, int max) throws BridgeFailedException
Collect a list of publications associated with a specific owner. Selects first and last results- Parameters:
owner
- : login of ownerfirst
- : first resultmax
- : last result- Returns:
- list of publications associated with this owner, empty list if no results
- Throws:
BridgeFailedException
- if any.
-
fetchPublicationsByStatus
Collection<Publication> fetchPublicationsByStatus(String status, int first, int max) throws BridgeFailedException
Collect a list of publications having a specific status. Selects first and last results- Parameters:
status
- : the status of publication in IMEx centralfirst
- : first resultmax
- : last result- Returns:
- list of publications associated with this status, empty list if no results
- Throws:
BridgeFailedException
- if any.
-
updatePublicationStatus
Publication updatePublicationStatus(String identifier, String source, PublicationStatus status) throws BridgeFailedException
Update the status of a publication associated with a valid pubmed identifier already registered in IMEx central- Parameters:
identifier
- : a valid pubmed identifiersource
- : the source pubmed, doi or imexstatus
- : new status- Returns:
- the updated record in IMEx central
- Throws:
BridgeFailedException
- if no record found in IMEx central, no pubmed identifier or invalid status
-
updatePublicationAdminGroup
Publication updatePublicationAdminGroup(String identifier, String source, Operation operation, String group) throws BridgeFailedException
Update the publication admin group given a valid pubmed identifier and a valid operator. The publication must be registered in IMEx central- Parameters:
identifier
- : valid pubmed idsource
- : the source pubmed, doi or imexoperation
- : DROP or ADDgroup
- : the name of the admin group- Returns:
- the updated record in IMEx central
- Throws:
BridgeFailedException
- if no record found in IMEX central, no pubmed identifiier or unknown group
-
updatePublicationAdminUser
Publication updatePublicationAdminUser(String identifier, String source, Operation operation, String user) throws BridgeFailedException
Update the publication admin user given a valid pubmed identifier and a valid operator. The publication must be registered in IMEx central- Parameters:
identifier
- aString
object.source
- pubmed, doi or imexoperation
- aOperation
object.user
- aString
object.- Returns:
- the updated record in IMEx central
- Throws:
BridgeFailedException
- if no record found in IMEX central, no pubmed identifiier or unknown user
-
updatePublicationIdentifier
Publication updatePublicationIdentifier(String oldIdentifier, String oldSource, String newIdentifier, String source) throws BridgeFailedException
Update publication pubmed identifier, DOI number or internal identifier of an existing record in IMEx central. The new publication identifier should not be already registered in IMEx central- Parameters:
oldIdentifier
- : can be pubmed, imex, doi or internal identifieroldSource
- : the source of old identifiernewIdentifier
- : can be pubmed, doi or internal identifiersource
- : the source pubmed, doi or imex- Returns:
- a
Publication
object. - Throws:
BridgeFailedException
- if no record found in IMEX central, identifier not recognized or new identifier is associated with another publication in IMEx central
-
createPublication
void createPublication(Publication publication) throws BridgeFailedException
Create a new publication record in IMEx central (not implemented yet in production but can be used in test with the MockImexCentralClient)- Parameters:
publication
- : the publication to create in IMEx central- Throws:
BridgeFailedException
- if any.
-
createPublicationById
Publication createPublicationById(String identifier, String source) throws BridgeFailedException
Creates a publication given a valid pubmed id.- Parameters:
identifier
- : valid pubmed idsource
- aString
object.- Returns:
- the newly created record
- Throws:
BridgeFailedException
- if identifier is not valid pubmed or if the pubmed id is already registered in IMEx central
-
fetchPublicationImexAccession
Publication fetchPublicationImexAccession(String identifier, String source, boolean assign) throws BridgeFailedException
Create a new IMEx id if requested for a given pubmed id- Parameters:
identifier
- : a valid pubmed identifiersource
- : a valid source (imex, pubmed or doi)assign
- : true if we want to assign a new IMEx id, false otherwise- Returns:
- the updated record in IMEx central
- Throws:
BridgeFailedException
- if not a valid pubmed id, not existing record and cannot generate a new IMEx id
-
-