public class OstiDOIService extends DOIService
autoPublishDOI, doiEnabled, password, PRIMARY_SHOULDER_INDEX, serviceBaseUrl, shoulderMap, uriTemplate, username
Constructor and Description |
---|
OstiDOIService()
Constructor
|
Modifier and Type | Method and Description |
---|---|
org.dataone.service.types.v1.Identifier |
generateDOI()
Generate a DOI using the DOI service as configured
|
protected java.lang.String |
generateOstiMetadata(java.io.InputStream eml,
java.lang.String siteUrl)
Generate the OSTI document for the given eml
|
protected java.lang.String |
generateXMLWithSiteURL(java.lang.String siteURL)
Create a xml file with the site_url element
|
java.lang.String |
getMetadata(org.dataone.service.types.v1.Identifier doi)
Get the metadata for the given identifier
|
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 in the osti service for a specific identifier(DOI).
|
getLandingPage, refreshStatus, registerDOI
public org.dataone.service.types.v1.Identifier generateDOI() throws DOIException, org.dataone.service.exceptions.InvalidRequest
generateDOI
in class DOIService
EZIDException
org.dataone.service.exceptions.InvalidRequest
DOIException
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.NotFound, java.io.IOException, org.dataone.service.exceptions.NotAuthorized
submitDOIMetadata
in class DOIService
identifier
- the identifier to identify the metadata which will be updatedsysMeta
- the system metadata associated with the identifierorg.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.NotFound
java.io.IOException
org.dataone.service.exceptions.NotAuthorized
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
publishIdentifier
in class DOIService
session
- the subjects call the methodidentifer
- the identifier of the object which will be published.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
protected java.lang.String generateXMLWithSiteURL(java.lang.String siteURL)
siteURL
- the value of the site_url elementprotected java.lang.String generateOstiMetadata(java.io.InputStream eml, java.lang.String siteUrl) throws javax.xml.transform.TransformerException
eml
- the source emlsiteUrl
- the site url will be used in the metadata. .
If it is null or blank, the xml metadata will have "set_reserved".javax.xml.transform.TransformerException
public java.lang.String getMetadata(org.dataone.service.types.v1.Identifier doi) throws edu.ucsb.nceas.osti_elink.OSTIElinkException, org.dataone.service.exceptions.InvalidRequest
doi
- the identifier to identify the OSTI metadataedu.ucsb.nceas.osti_elink.OSTIElinkException
org.dataone.service.exceptions.InvalidRequest
Copyright © 2023 Regents of the University of California. All Rights Reserved.