All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dspace.identifier.ezid.EZIDRequestFactory Maven / Gradle / Ivy

There is a newer version: 8.0
Show newest version
/**
 * The contents of this file are subject to the license and copyright
 * detailed in the LICENSE and NOTICE files at the root of the source
 * tree and available online at
 *
 * http://www.dspace.org/license/
 */

package org.dspace.identifier.ezid;

import java.net.URISyntaxException;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Create configured EZID requests.
 *
 * 

Common EZID constant properties are:

* *
*
EZID_SCHEME
*
URL scheme (e.g. "https")
*
EZID_HOST
*
Name of the EZID API host
*
EZID_PATH
*
Path to the API endpoints
*
* * @author mwood */ public class EZIDRequestFactory { private String EZID_SCHEME; private String EZID_HOST; private String EZID_PATH; /** * Configure an EZID request. * * @param authority our DOI authority number. * @param username EZID user name. * @param password {@code username}'s password. * @return a new EZID request with the given parameters * @throws URISyntaxException if host or authority is bad. */ public EZIDRequest getInstance(String authority, String username, String password) throws URISyntaxException { return new EZIDRequest(EZID_SCHEME, EZID_HOST, EZID_PATH, authority, username, password); } /** * @param aEZID_SCHEME the EZID URL scheme to set. */ @Autowired(required = true) public void setEZID_SCHEME(String aEZID_SCHEME) { EZID_SCHEME = aEZID_SCHEME; } /** * @param aEZID_HOST the EZID host to set. */ @Autowired(required = true) public void setEZID_HOST(String aEZID_HOST) { EZID_HOST = aEZID_HOST; } /** * @param aEZID_PATH the local path to the EZID API. */ @Autowired(required = true) public void setEZID_PATH(String aEZID_PATH) { EZID_PATH = aEZID_PATH; } public String getEzidScheme() { return EZID_SCHEME; } public String getEzidHost() { return EZID_HOST; } public String getEzidPath() { return EZID_PATH; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy