jd.xml.util
Class DefaultUriResolver

java.lang.Object
  extended byjd.xml.util.DefaultUriResolver
All Implemented Interfaces:
UriResolver
Direct Known Subclasses:
ConvertingResolver

public class DefaultUriResolver
extends Object
implements UriResolver

A default UriResolver.


Field Summary
static DefaultUriResolver INSTANCE
          The instance.
 
Constructor Summary
protected DefaultUriResolver()
           
 
Method Summary
 XmlSource resolveUri(String href, String baseUri)
          Try to build a new uri from the href and baseUri parameter and open a InputStream from a file or an url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DefaultUriResolver INSTANCE
The instance.

Constructor Detail

DefaultUriResolver

protected DefaultUriResolver()
Method Detail

resolveUri

public XmlSource resolveUri(String href,
                            String baseUri)
                     throws IOException
Try to build a new uri from the href and baseUri parameter and open a InputStream from a file or an url.

Specified by:
resolveUri in interface UriResolver
Parameters:
href - a href attribute, which may be relative or absolute.
baseUri - the base uri in effect when the href attribute was encountered
Returns:
a XmlSource object, or null if the href cannot be resolved, and the caller should try to resolve the URI in some other way.
Throws:
IOException - if an error occurs when trying to resolve the URI.