Public Member Functions

org.exolab.castor.net.util.URIResolverImpl Class Reference

Inheritance diagram for org.exolab.castor.net.util.URIResolverImpl:
org.exolab.castor.net.URIResolver

List of all members.

Public Member Functions

 URIResolverImpl ()
URILocation resolve (String href, String documentBase) throws URIException
URILocation resolveURN (String urn) throws URIException

Detailed Description

The default implementation of URIResolver

Author:
Keith Visco
Arnaud Blandin
Version:
Revision:
1.2
Date:
2003/03/03 09:57:16

Constructor & Destructor Documentation

org.exolab.castor.net.util.URIResolverImpl.URIResolverImpl (  ) 

Member Function Documentation

URILocation org.exolab.castor.net.util.URIResolverImpl.resolve ( String  href,
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: <blockquote>

        file:/c:/Program Files/MyApp/myresource.xml
        file://usr/etc/myresource.xml
        http://www.castor.org/index.html
        ../relative/index.html
    

</blockquote> However, the following won't be valid: <blockquote>

        file://c:/Program Files/MyApp/myresource.xml
    

</blockquote>

Returns:
the URILocation for the URI

Implements org.exolab.castor.net.URIResolver.

URILocation org.exolab.castor.net.util.URIResolverImpl.resolveURN ( String  urn  )  throws URIException

Resolves the given urn. An implementation of this method may return null if the URN could not be resolved.

Returns:
the URILocation for the URN

Implements org.exolab.castor.net.URIResolver.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties