Class DOIService

java.lang.Object
edu.ucsb.nceas.metacat.doi.DOIService
Direct Known Subclasses:
EzidDOIService, OstiDOIService

public abstract class DOIService extends Object
An abstract class for the DOI service
Author:
tao
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static boolean
     
    protected static boolean
     
    protected static String
     
    protected static final int
     
    protected static String
     
    protected static HashMap<Integer,String>
     
    protected static String
     
    protected static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.dataone.service.types.v1.Identifier
    Generate a DOI using the DOI service as configured
    protected String
    getLandingPage(org.dataone.service.types.v1.Identifier identifier)
    Get the landing page url string for the given identifier
    abstract 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
    void
    Refresh the status (enable or disable) of the DOI service from property file
    boolean
    registerDOI(org.dataone.service.types.v2.SystemMetadata sysmeta)
    Submits DOI metadata information about the object to DOI services
    protected abstract void
    submitDOIMetadata(org.dataone.service.types.v1.Identifier identifier, org.dataone.service.types.v2.SystemMetadata sysMeta)
    Submit the doi metadata for the given id.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PRIMARY_SHOULDER_INDEX

      protected static final int PRIMARY_SHOULDER_INDEX
      See Also:
    • doiEnabled

      protected static boolean doiEnabled
    • serviceBaseUrl

      protected static String serviceBaseUrl
    • username

      protected static String username
    • password

      protected static String password
    • uriTemplate

      protected static String uriTemplate
    • autoPublishDOI

      protected static boolean autoPublishDOI
    • shoulderMap

      protected static HashMap<Integer,String> shoulderMap
  • Constructor Details

    • DOIService

      public DOIService()
      Constructor
  • Method Details

    • refreshStatus

      public void refreshStatus() throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Refresh the status (enable or disable) of the DOI service from property file
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException
    • getLandingPage

      protected String getLandingPage(org.dataone.service.types.v1.Identifier identifier)
      Get the landing page url string for the given identifier
      Parameters:
      identifier - the identifier which associates the landing page
      Returns:
      the url of the landing page
    • registerDOI

      public boolean registerDOI(org.dataone.service.types.v2.SystemMetadata sysmeta) throws org.dataone.service.exceptions.InvalidRequest, DOIException, org.dataone.service.exceptions.NotImplemented, org.dataone.service.exceptions.ServiceFailure, InterruptedException, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotFound
      Submits DOI metadata information about the object to DOI services
      Parameters:
      sysMeta -
      Returns:
      true if succeeded; false otherwise.
      Throws:
      org.dataone.service.exceptions.InvalidRequest
      DOIException
      org.dataone.service.exceptions.NotImplemented
      org.dataone.service.exceptions.ServiceFailure
      InterruptedException
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.NotAuthorized
      org.dataone.service.exceptions.NotFound
    • submitDOIMetadata

      protected abstract 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, InterruptedException, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.NotFound, IOException
      Submit the doi metadata for the given id. This method is called by the method of registerDOI. Every subclass must have the implementation.
      Parameters:
      identifier - id can be either an identifier or a sid
      sysMeta - the system metadata associated with the identifier
      Throws:
      org.dataone.service.exceptions.InvalidRequest
      DOIException
      org.dataone.service.exceptions.NotImplemented
      org.dataone.service.exceptions.ServiceFailure
      InterruptedException
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.NotFound
      IOException
      org.dataone.service.exceptions.NotAuthorized
    • generateDOI

      public abstract org.dataone.service.types.v1.Identifier generateDOI() throws DOIException, org.dataone.service.exceptions.InvalidRequest
      Generate a DOI using the DOI service as configured
      Returns:
      the identifier which was minted by the DOI service
      Throws:
      DOIException
      org.dataone.service.exceptions.InvalidRequest
    • publishIdentifier

      public abstract 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
      Parameters:
      session - the subjects call the method
      identifer - the identifier of the object which will be published.
      session -
      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