Class MCRDataciteClient
java.lang.Object
org.mycore.pi.doi.client.datacite.MCRDataciteClient
Used for DOI registration.
- use
storeMetadata(Document)
to store a datacite document (should include aMCRDigitalObjectIdentifier
) - use
mintDOI(MCRDigitalObjectIdentifier, URI)
to "register" theMCRDigitalObjectIdentifier
with a URI - use
setMediaList(MCRDigitalObjectIdentifier, List)
to add a list of mime-type URI pairs to a DOI
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
mintDOI
(MCRDigitalObjectIdentifier doi, URI url) resolveDOI
(MCRDigitalObjectIdentifier doiParam) void
setMediaList
(MCRDigitalObjectIdentifier doi, List<Map.Entry<String, URI>> mediaList) storeMetadata
(Document metadata)
-
Field Details
-
DOI_REGISTER_REQUEST_TEMPLATE
- See Also:
-
-
Constructor Details
-
MCRDataciteClient
- Parameters:
host
- the host (in most cases mds.datacite.org)userName
- the login username will be used in every method or null if no login should be usedpassword
- the password
-
-
Method Details
-
getMediaList
public List<Map.Entry<String,URI>> getMediaList(MCRDigitalObjectIdentifier doi) throws MCRPersistentIdentifierException - Throws:
MCRPersistentIdentifierException
-
setMediaList
public void setMediaList(MCRDigitalObjectIdentifier doi, List<Map.Entry<String, URI>> mediaList) throws MCRPersistentIdentifierException- Throws:
MCRPersistentIdentifierException
-
mintDOI
public void mintDOI(MCRDigitalObjectIdentifier doi, URI url) throws MCRPersistentIdentifierException - Throws:
MCRPersistentIdentifierException
-
getDOIList
- Throws:
MCRPersistentIdentifierException
-
resolveDOI
- Throws:
MCRPersistentIdentifierException
-
resolveMetadata
public Document resolveMetadata(MCRDigitalObjectIdentifier doi) throws MCRDatacenterAuthenticationException, MCRIdentifierUnresolvableException, JDOMException, MCRDatacenterException - Parameters:
doi
- the doi- Returns:
- the resolved metadata of the doi
- Throws:
MCRDatacenterAuthenticationException
- if the authentication is wrongMCRIdentifierUnresolvableException
- if the doi is not valid or can not be resolvedJDOMException
- if the metadata is empty or not a valid xml documentMCRDatacenterException
- if there is something wrong with the communication with the datacenter
-
storeMetadata
- Throws:
MCRPersistentIdentifierException
-
deleteMetadata
- Throws:
MCRPersistentIdentifierException
-