Class OstiDOIService

java.lang.Object
edu.ucsb.nceas.metacat.doi.DOIService
edu.ucsb.nceas.metacat.doi.osti.OstiDOIService

public class OstiDOIService extends DOIService
The implementation class for the OSTI (DOE Office of Scientific and Technical Information) DOI service Details of OSTI eink: https://www.osti.gov/elink/241-6api.jsp
Author:
tao
  • Constructor Details

    • OstiDOIService

      public OstiDOIService()
      Constructor
  • Method Details

    • generateDOI

      public org.dataone.service.types.v1.Identifier generateDOI() throws DOIException, org.dataone.service.exceptions.InvalidRequest
      Generate a DOI using the DOI service as configured
      Specified by:
      generateDOI in class DOIService
      Returns:
      the identifier which was minted by the DOI service
      Throws:
      EZIDException
      org.dataone.service.exceptions.InvalidRequest
      DOIException
    • 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, InterruptedException, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotFound, IOException, org.dataone.service.exceptions.NotAuthorized
      Submit the metadata in the osti service for a specific identifier(DOI). The identifier can be a SID or PID 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.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
    • 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
      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
    • generateXMLWithSiteURL

      protected String generateXMLWithSiteURL(String siteURL)
      Create a xml file with the site_url element
      Parameters:
      siteURL - the value of the site_url element
      Returns:
      the complete xml string
    • generateOstiMetadata

      protected String generateOstiMetadata(InputStream eml, String siteUrl) throws TransformerException
      Generate the OSTI document for the given eml
      Parameters:
      eml - the source eml
      siteUrl - the site url will be used in the metadata. . If it is null or blank, the xml metadata will have "set_reserved".
      Returns:
      the OSTI document for the eml
      Throws:
      TransformerException
    • getMetadata

      public String getMetadata(org.dataone.service.types.v1.Identifier doi) throws edu.ucsb.nceas.osti_elink.OSTIElinkException, org.dataone.service.exceptions.InvalidRequest
      Get the metadata for the given identifier
      Parameters:
      doi - the identifier to identify the OSTI metadata
      Returns:
      the OSTI metadata associated with the identifier
      Throws:
      edu.ucsb.nceas.osti_elink.OSTIElinkException
      org.dataone.service.exceptions.InvalidRequest