org.ow2.easywsdl.schema.util
Class URILocationResolver

java.lang.Object
  extended by org.ow2.easywsdl.schema.util.URILocationResolver

public final class URILocationResolver
extends java.lang.Object

URI resolver used to resolve URI as URL, based on a base URI, to load external document.

Author:
Christophe DENEUX - Capgemini Sud

Constructor Summary
URILocationResolver()
           
 
Method Summary
 java.net.URL resolve(java.net.URI baseURI, java.net.URI uri)
           Resolve the uri according to the baseURI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URILocationResolver

public URILocationResolver()
Method Detail

resolve

public java.net.URL resolve(java.net.URI baseURI,
                            java.net.URI uri)
                     throws java.net.MalformedURLException

Resolve the uri according to the baseURI.

If baseURI is null, the return value is the uri converted into URL using URI.toURL(). Otherwise the return value is the result of URL.URL(URL, String).

Parameters:
baseURI - The base URI.
uri - The URI to resolve.
Returns:
The resolved URI as an URL.
Throws:
java.net.MalformedURLException - The resolved URI is not a well-formed URL.


Copyright © 2008-2010 Petals Link (previously EBM WebSourcing). All Rights Reserved.