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 Detail

      • deleteDOI

        void deleteDOI​(Context context,
                       String doi)
                throws DOIIdentifierException
        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

        void reserveDOI​(Context context,
                        DSpaceObject dso,
                        String doi)
                 throws DOIIdentifierException
        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 an DOIIdentifierException. DOIIdentifierException} and set the error code to DOIIdentifierException.DOI_ALREADY_EXISTS.
        Parameters:
        context - The relevant DSpace Context.
        dso - DSpace object to associate to the DOI
        doi - DOI string to reserve
        Throws:
        DOIIdentifierException - if DOI error
      • registerDOI

        void registerDOI​(Context context,
                         DSpaceObject dso,
                         String doi)
                  throws DOIIdentifierException
        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 an DOIIdentifierException. and set the error code to DOIIdentifierException.RESERVE_FIRST.
        Parameters:
        context - The relevant DSpace Context.
        dso - DSpace object to associate to the DOI
        doi - DOI string to register
        Throws:
        DOIIdentifierException - if DOI error
      • updateMetadata

        void updateMetadata​(Context context,
                            DSpaceObject dso,
                            String doi)
                     throws DOIIdentifierException
        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 DOI
        doi - DOI string to update (metadata)
        Throws:
        DOIIdentifierException - if DOI error