package eu.dnetlib.contract.download;

import java.util.List;

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

import eu.dnetlib.data.utility.download.DownloadServiceException;
import eu.dnetlib.data.utility.download.DownloadServiceFacade;
import eu.dnetlib.data.utility.download.IDownloadService;
import eu.dnetlib.enabling.resultset.rmi.ResultSetService;

/**
 * ResultSet facade web service aware. Introduced for annotation adjustments.
 * Target namespace need to be compliant with {@link ResultSetService}.
 * @author mhorst
 *
 */
@WebService(serviceName="DownloadService",
		endpointInterface="eu.dnetlib.data.utility.download.IDownloadService",
		targetNamespace="http://download.utility.data.dnetlib.eu/")
public class DownloadWebServiceFacade extends DownloadServiceFacade implements IDownloadService {

	private IDownloadService downloadService;
	public IDownloadService getDownloadService() {
		return downloadService;
	}

	public void setDownloadService(IDownloadService downloadService) {
		this.downloadService = downloadService;
	}

	@Override
	public String downloadURL(String url) throws DownloadServiceException {
		return downloadService.downloadURL(url);
	}

	@Override
	public W3CEndpointReference downloadURLs(List<String> urls)
			throws DownloadServiceException {
		return downloadService.downloadURLs(urls);
	}

	@Override
	public W3CEndpointReference downloadURLsFromRS(W3CEndpointReference epr)
			throws DownloadServiceException {
		return downloadService.downloadURLsFromRS(epr);
	}

	@Override
	public String identify() {
		return downloadService.identify();
	}

}
