edu.ucsb.nceas.metacat.doi.ezid

## Class EzidDOIService

- java.lang.Object
- - edu.ucsb.nceas.metacat.doi.DOIService
  - - edu.ucsb.nceas.metacat.doi.ezid.EzidDOIService

-     public class EzidDOIService
      extends DOIService

  Singleton for interacting with the EZID DOI library. Allows DOI minting/initial registration, creating and updating existing DOI registrations.
  Author:
    leinfelder

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DATACITE`

    - ### Fields inherited from class edu.ucsb.nceas.metacat.doi.DOIService

      `autoPublishDOI, doiEnabled, password, PRIMARY_SHOULDER_INDEX, serviceBaseUrl, shoulderMap, uriTemplate, username`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EzidDOIService()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.dataone.service.types.v1.Identifier` | `generateDOI()` Generate a DOI using the EZID service as configured
    `void` | `publishIdentifier(org.dataone.service.types.v1.Session session, org.dataone.service.types.v1.Identifier identifier)` Make the status of the identifier to be public
    `protected void` | `submitDOIMetadata(org.dataone.service.types.v1.Identifier identifier, org.dataone.service.types.v2.SystemMetadata sysMeta)` Submit the metadata to the EZID service for a specific identifier(DOI).

    - ### Methods inherited from class edu.ucsb.nceas.metacat.doi.DOIService

      `getLandingPage, refreshStatus, registerDOI`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DATACITE

          public static final java.lang.String DATACITE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EzidDOIService

          public EzidDOIService()

      Constructor

  - ### Method Detail

    - #### submitDOIMetadata

          protected void submitDOIMetadata(org.dataone.service.types.v1.Identifier identifier,
                                           org.dataone.service.types.v2.SystemMetadata sysMeta)
                                    throws org.dataone.service.exceptions.InvalidRequest,
                                           DOIException,
                                           org.dataone.service.exceptions.NotImplemented,
                                           org.dataone.service.exceptions.ServiceFailure,
                                           java.lang.InterruptedException,
                                           org.dataone.service.exceptions.InvalidToken,
                                           org.dataone.service.exceptions.NotAuthorized,
                                           org.dataone.service.exceptions.NotFound,
                                           java.io.IOException

      Submit the metadata to the EZID service for a specific identifier(DOI). This implementation will be call by the registerMetadata on the super class.
      Specified by:
        `submitDOIMetadata` in class `DOIService`
      Parameters:
        `identifier` - the identifier to identify the metadata which will be updated
        `sysMeta` - the system metadata associated with the identifier
      Throws:
        `org.dataone.service.exceptions.InvalidToken`
        `org.dataone.service.exceptions.ServiceFailure`
        `org.dataone.service.exceptions.NotAuthorized`
        `org.dataone.service.exceptions.NotFound`
        `org.dataone.service.exceptions.NotImplemented`
        `org.dataone.service.exceptions.InvalidRequest`
        `DOIException`
        `java.lang.InterruptedException`
        `java.io.IOException`

    - #### generateDOI

          public org.dataone.service.types.v1.Identifier generateDOI()
                                                              throws DOIException,
                                                                     org.dataone.service.exceptions.InvalidRequest

      Generate a DOI using the EZID service as configured
      Specified by:
        `generateDOI` in class `DOIService`
      Returns:
      Throws:
        `edu.ucsb.nceas.ezid.EZIDException`
        `org.dataone.service.exceptions.InvalidRequest`
        `DOIException`

    - #### publishIdentifier

          public void publishIdentifier(org.dataone.service.types.v1.Session session,
                                        org.dataone.service.types.v1.Identifier identifier)
                                 throws org.dataone.service.exceptions.InvalidToken,
                                        org.dataone.service.exceptions.ServiceFailure,
                                        org.dataone.service.exceptions.NotAuthorized,
                                        org.dataone.service.exceptions.NotImplemented,
                                        org.dataone.service.exceptions.InvalidRequest,
                                        org.dataone.service.exceptions.NotFound,
                                        org.dataone.service.exceptions.IdentifierNotUnique,
                                        org.dataone.service.exceptions.UnsupportedType,
                                        org.dataone.service.exceptions.InsufficientResources,
                                        org.dataone.service.exceptions.InvalidSystemMetadata,
                                        DOIException

      Make the status of the identifier to be public
      Specified by:
        `publishIdentifier` in class `DOIService`
      Parameters:
        `session` - the subjects call the method
        `identifer` - the identifier of the object which will be published.
      Throws:
        `org.dataone.service.exceptions.InvalidRequest`
        `org.dataone.service.exceptions.NotImplemented`
        `org.dataone.service.exceptions.NotAuthorized`
        `org.dataone.service.exceptions.ServiceFailure`
        `org.dataone.service.exceptions.InvalidToken`
        `org.dataone.service.exceptions.NotFound`
        `org.dataone.service.exceptions.InvalidSystemMetadata`
        `org.dataone.service.exceptions.InsufficientResources`
        `org.dataone.service.exceptions.UnsupportedType`
        `org.dataone.service.exceptions.IdentifierNotUnique`
        `java.lang.InterruptedException`
        `DOIException`

Copyright © 2023 Regents of the University of California. All Rights Reserved.