Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.io
Interface NameResolver

All Known Implementing Classes:
DefaultNameResolver, CachingNameResolver

public interface NameResolver

NameResolvers are responsible for converting string names into InputStreamProviders, which encapsulate a remote file. Implementations exist that support using URLs, Files, Class resources, and the Servlet API to locate files, but other APIs may be substituted.

In some cases, the resolved target file may have need to locate support files of its own. Since those support files should be looked for relative to the target file, NameResolver supports creating new relative NameResolvers.

Developers writing their own NameResolver should strongly consider subclassing BaseNameResolver.

See Also:
XMLUtils.getResolver(oracle.cabo.share.xml.ParseContext),


Method Summary
 InputStreamProvider getProvider(java.lang.String name)
          Given a name, returns an InputStreamProvider.
 NameResolver getResolver(java.lang.String name)
          Return the new NameResolver that should be used to resolve names relative to a given name.
 

Method Detail

getProvider

public InputStreamProvider getProvider(java.lang.String name)
                                throws java.io.IOException
Given a name, returns an InputStreamProvider. This function should never return null - if the target cannot be resolved, throw an IOException.
Parameters:
name - the name of the target

getResolver

public NameResolver getResolver(java.lang.String name)
Return the new NameResolver that should be used to resolve names relative to a given name. This function should never return null - if the target cannot be resolved, return a resolver that can only support absolute names.
Parameters:
name - the name of the target

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.