*/
@javax.jws.WebMethod()
public URI listDownladURI(URI pdURI) throws SOAPException {
log.fine("DataManager::listDownloadURI(URI pdURI)");
URI _retVal = null;
PDURI _parsedURI = null;
try {
_parsedURI = new PDURI(pdURI);
// Check that the item exists, if not throw a SOAP Exception
if (!this.jcrManager.nodeExists(_parsedURI.getDataRegistryPath())) {
String _message = "DataManager.listDownloadURI() Cannot locate item " + pdURI.toASCIIString();
log.fine(_message);;
throw new SOAPException(_message);
}
} catch (URISyntaxException _exp) {
String _message = "DataManager.listDownloadURI() " + pdURI.toASCIIString() + " is not a PLANETS Data Registry URI.";
log.fine(_message+": "+_exp.getMessage());
throw new SOAPException(_message, _exp);
} catch (RepositoryException _exp) {
String _message = "DataManager.listDownloadURI() Repository call failed.";
log.fine(_message+": "+_exp.getMessage());
throw new SOAPException(_message, _exp);
}
// Now get the JBOSS Server and port
String _serverName = properties.getProperty("planets.server.hostname");
String _port = properties.getProperty("planets.server.port");
String _webdavRoot = properties.getProperty("jcr.local.webdav.root");
try {
// Return a download WEB_DAV URL
_retVal = new URI("http://" + _serverName + ":" + _port + _webdavRoot + _parsedURI.getDataRegistryPath());
} catch (URISyntaxException _exp) {
String _message = "DataManager.listDownloadURI() Cannot get server URI.";
log.fine(_message+": "+_exp.getMessage());;
throw new SOAPException(_message, _exp);
}