org.exolab.castor.net.util
Class URIResolverImpl
java.lang.Object
org.exolab.castor.net.util.URIResolverImpl
- URIResolver
public final class URIResolverImpl
extends java.lang.Object
The default implementation of URIResolver
$Revision: 1.2 $ $Date: 2003/03/03 09:57:16 $
URIResolverImpl
public URIResolverImpl()
resolve
public URILocation 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:
- When [authority] is not used then '//' must not be used.
- 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
- resolve in interface URIResolver
- the URILocation for the URI
resolveURN
public URILocation resolveURN(String urn)
throws URIException
Resolves the given urn. An implementation of this
method may return null if the URN could not be resolved.
- resolveURN in interface URIResolver
- the URILocation for the URN
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com