Package org.dspace.identifier.ezid

Examples of org.dspace.identifier.ezid.EZIDRequest


    {
        log.debug("register {} as {}", object, identifier);

        EZIDResponse response;
        try {
            EZIDRequest request = requestFactory.getInstance(loadAuthority(),
                    loadUser(), loadPassword());
            response = request.create(identifier, crosswalkMetadata(object));
        } catch (IdentifierException | IOException | URISyntaxException e) {
            log.error("Identifier '{}' not registered:  {}", identifier, e.getMessage());
            return;
        }
View Full Code Here


    {
        log.debug("reserve {}", identifier);

        EZIDResponse response;
        try {
            EZIDRequest request = requestFactory.getInstance(loadAuthority(),
                    loadUser(), loadPassword());
            Map<String, String> metadata = crosswalkMetadata(dso);
            metadata.put("_status", "reserved");
            response = request.create(identifier, metadata);
        } catch (IOException | URISyntaxException e) {
            log.error("Identifier '{}' not registered:  {}", identifier, e.getMessage());
            return;
        }
View Full Code Here

            throws IdentifierException
    {
        log.debug("mint for {}", dso);

        // Compose the request
        EZIDRequest request;
        try {
            request = requestFactory.getInstance(loadAuthority(), loadUser(), loadPassword());
        } catch (URISyntaxException ex) {
            log.error(ex.getMessage());
            throw new IdentifierException("DOI request not sent:  " + ex.getMessage());
        }

        // Send the request
        EZIDResponse response;
        try
        {
            response = request.mint(crosswalkMetadata(dso));
        } catch (IOException | URISyntaxException ex) {
            log.error("Failed to send EZID request:  {}", ex.getMessage());
            throw new IdentifierException("DOI request not sent:  " + ex.getMessage());
        }
View Full Code Here

                continue;
            }

            EZIDResponse response;
            try {
                EZIDRequest request = requestFactory.getInstance(loadAuthority(),
                        loadUser(), loadPassword());
                response = request.delete(DOIToId(id.value));
            } catch (URISyntaxException e) {
                log.error("Bad URI in metadata value:  {}", e.getMessage());
                remainder.add(id.value);
                skipped++;
                continue;
View Full Code Here

                continue;
            }

            EZIDResponse response;
            try {
                EZIDRequest request = requestFactory.getInstance(loadAuthority(),
                        loadUser(), loadPassword());
                response = request.delete(DOIToId(id.value));
            } catch (URISyntaxException e) {
                log.error("Bad URI in metadata value {}:  {}", id.value, e.getMessage());
                remainder.add(id.value);
                skipped++;
                continue;
View Full Code Here

TOP

Related Classes of org.dspace.identifier.ezid.EZIDRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.