Package org.dspace.identifier.doi
Interface DOIConnector
- All Known Implementing Classes:
DataCiteConnector
public interface DOIConnector
A DOIConnector handles all calls to the API of your DOI registry.
A DOIConnector should care about rules of the registration agency. For
example, if the registration agency wants us to reserve a DOI before we can
register it, the DOIConnector should check if a DOI is reserved. Use a
DOIIdentifierException.
and set its error code in case of any errors.
For the given example you should use
DOIIdentifierException.RESERVE_FIRST as error code.- Author:
- Pascal-Nicolas Becker
-
Method Summary
Modifier and TypeMethodDescriptionvoidSends the DELETE-Request to the DOI registry.booleanisDOIRegistered(Context context, String doi) booleanisDOIReserved(Context context, String doi) voidregisterDOI(Context context, DSpaceObject dso, String doi) Sends a request to the DOI registry to register a DOI.voidreserveDOI(Context context, DSpaceObject dso, String doi) Sends a request to the DOI registry to reserve a DOI.voidupdateMetadata(Context context, DSpaceObject dso, String doi) Sends a request to the DOI registry to update metadata for a DOI.
-
Method Details
-
isDOIReserved
- Throws:
DOIIdentifierException
-
isDOIRegistered
- Throws:
DOIIdentifierException
-
deleteDOI
Sends the DELETE-Request to the DOI registry.This method sends a request to "delete" a DOI. As DOIs are persistent identifiers they should never be deleted. For example, if you send a HTTP DELETE request to the DataCite Metadata API directly, it will set the DOI to inactive.
- Parameters:
context- The relevant DSpace Context.doi- DOI string to "delete"- Throws:
DOIIdentifierException- if DOI error
-
reserveDOI
Sends a request to the DOI registry to reserve a DOI. The DOIConnector should check weather this DOI is reserved for another object already. In this case it should throw anDOIIdentifierException. DOIIdentifierException} and set the error code toDOIIdentifierException.DOI_ALREADY_EXISTS.- Parameters:
context- The relevant DSpace Context.dso- DSpace object to associate to the DOIdoi- DOI string to reserve- Throws:
DOIIdentifierException- if DOI error
-
registerDOI
Sends a request to the DOI registry to register a DOI. The DOIConnector ensures compliance with the workflow of the registration agency. For example, if a DOI has to be reserved before it can be registered the DOIConnector has to check if it is reserved. In this case you can throw anDOIIdentifierException. and set the error code toDOIIdentifierException.RESERVE_FIRST.- Parameters:
context- The relevant DSpace Context.dso- DSpace object to associate to the DOIdoi- DOI string to register- Throws:
DOIIdentifierException- if DOI error
-
updateMetadata
Sends a request to the DOI registry to update metadata for a DOI. The DOIConnector should check weather the DOI is reserved or registered for the specified DSpace Object before it sends the metadata update.- Parameters:
context- The relevant DSpace Context.dso- DSpace object associated to the DOIdoi- DOI string to update (metadata)- Throws:
DOIIdentifierException- if DOI error
-