package eu.dnetlib.data.utility.download;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.wsaddressing.W3CEndpointReference;

/**
 * The Interface IDownloadService.
 */
@WebService
public interface IDownloadService {

	/**
	 * Identifies service and version.
	 * 
	 * @return the string
	 */
	@WebMethod(operationName="identify", action="identify")
	public String identify();
	
	/**
	 * Download url.
	 * 
	 * @param url the url
	 * 
	 * @return the string
	 * 
	 * @throws DownloadServiceException the download service exception
	 */
	@WebMethod(operationName="downloadURL", action="downloadURL")
	public String downloadURL(
			@WebParam(name="url") String url)
	throws DownloadServiceException;
	
	/**
	 * Download ur ls.
	 * 
	 * @param urls the urls
	 * 
	 * @return the list< string>
	 * 
	 * @throws DownloadServiceException the download service exception
	 */
	@WebMethod(operationName="downloadURLs", action="downloadURLs")
	public W3CEndpointReference downloadURLs(
			@WebParam(name="urls") List<String> urls)
			throws DownloadServiceException;
	
	/**
	 * Download urls from rs.
	 * 
	 * @param epr the ResultSet epr 
	 * 
	 * @return the w3 c endpoint reference
	 * @throws DownloadServiceException 
	 */
	@WebMethod(operationName="downloadURLsFromRS", action="downloadURLsFromRS")
	public W3CEndpointReference downloadURLsFromRS(
			@WebParam(name="epr") W3CEndpointReference epr) throws DownloadServiceException;
}
