Class URIResolverImpl

  • All Implemented Interfaces:
    URIResolver

    public final class URIResolverImpl
    extends java.lang.Object
    implements URIResolver
    The default implementation of URIResolver
    Version:
    $Revision: 5951 $ $Date: 2003-03-03 02:57:21 -0700 (Mon, 03 Mar 2003) $
    Author:
    Keith Visco, Arnaud Blandin
    • Constructor Summary

      Constructors 
      Constructor Description
      URIResolverImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      URILocation resolve​(java.lang.String href, java.lang.String documentBase)
      Resolves the given href and documentBase.
      URILocation resolveURN​(java.lang.String urn)
      Resolves the given urn.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • URIResolverImpl

        public URIResolverImpl()
    • Method Detail

      • resolve

        public URILocation resolve​(java.lang.String href,
                                   java.lang.String documentBase)
                            throws URIException
        Resolves the given href and documentBase. The href can either be an absolute or a relative URI as defined by IETF RFC 2396:
        • Absolute URI: [scheme]:'//'[authority][absolute path]
        • Relative URI: '//'[authority][absolute path] or [relative path] or [absolute path].

        Note:

        1. When [authority] is not used then '//' must not be used.
        2. An [absolute path] begins by a '/' sign.
        For instance the following URIs are valid:
                file:/c:/Program Files/MyApp/myresource.xml
                file://usr/etc/myresource.xml
                http://www.castor.org/index.html
                ../relative/index.html
            
        However, the following won't be valid:
                file://c:/Program Files/MyApp/myresource.xml
            
        Specified by:
        resolve in interface URIResolver
        Returns:
        the URILocation for the URI
        Throws:
        URIException
      • resolveURN

        public URILocation resolveURN​(java.lang.String urn)
                               throws URIException
        Resolves the given urn. An implementation of this method may return null if the URN could not be resolved.
        Specified by:
        resolveURN in interface URIResolver
        Returns:
        the URILocation for the URN
        Throws:
        URIException