OverviewSingleDeprecated

jsx3.net

interface URIResolver

jsx3.net.URIResolver

All Known Implementing Classes:

jsx3.amp.PlugIn, jsx3.app.AddIn, jsx3.app.Server

abstract interface URIResolver
An interface specifying the methods necessary to define a context against which URIs are resolved.

Since:

3.2

Field Summary
static jsx3.net.URIResolver
DEFAULT
The default URI resolver.
static jsx3.net.URIResolver
JSX
Resolves URIs according to the default resolver except that all relative URIs are resolved relative to the JSX/ directory.
static jsx3.net.URIResolver
USER
Resolves URIs according to the default resolver except that all relative URIs are resolved relative to the user directory (or JSXAPPS/.
Method Summary
static jsx3.net.URIResolver
Returns the resolver explicitly referenced in the scheme, host, and path parts of the URI strURI.
abstract String
Returns the URI prefix that when prepended to relative URIs resolves them.
static boolean
Returns whether the URI strURI is considered absolute in the JSX system.
static void
register(strScheme : String, objResolver : jsx3.net.URIResolver | Function)
abstract jsx3.net.URI
relativizeURI(strURI : String | jsx3.net.URI, bRel : boolean)
Transforms a URI relative to the URL of the HTML page containing the JSX system into an absolute URI defined in relation to this resolver.
abstract jsx3.net.URI
Resolves the URI strURI against the base context of this resolver.
Field Detail

DEFAULT

static jsx3.net.URIResolver DEFAULT
The default URI resolver. This resolver can resolve any of the absolute URI formats supported by the system. Other absolute URIs and all relative URIs are unmodified. The absolute URI formats are:

JSX

static jsx3.net.URIResolver JSX
Resolves URIs according to the default resolver except that all relative URIs are resolved relative to the JSX/ directory. This resolver resolves the following URIs to the same value:

USER

static jsx3.net.URIResolver USER
Resolves URIs according to the default resolver except that all relative URIs are resolved relative to the user directory (or JSXAPPS/../). This resolver resolves the following URIs to the same value:
Method Detail

getResolver

static jsx3.net.URIResolver getResolver(strURI : String | jsx3.net.URI)
Returns the resolver explicitly referenced in the scheme, host, and path parts of the URI strURI. This method returns the the following values depending URI:

Parameters:

strURI

Returns:

 

getUriPrefix

abstract String getUriPrefix()
Returns the URI prefix that when prepended to relative URIs resolves them. This prefix may include "../" path segments.

Returns:

 

isAbsoluteURI

static boolean isAbsoluteURI(strURI : String | jsx3.net.URI)
Returns whether the URI strURI is considered absolute in the JSX system. Implementors of the URIResolver interface should always delegate resolution of absolute URIs to the default resolver. This method is not equivalent to URI.isAbsolute() because, for example, URIs beginning with "JSX/" are considered absolute in the JSX system.

Parameters:

strURI

Returns:

 

register

static void register(strScheme : String, objResolver : jsx3.net.URIResolver | Function)

Parameters:

strScheme
objResolver

relativizeURI

abstract jsx3.net.URI relativizeURI(strURI : String | jsx3.net.URI, bRel : boolean)
Transforms a URI relative to the URL of the HTML page containing the JSX system into an absolute URI defined in relation to this resolver. When resolved against any resolver, the returned URI resolves to strURI.

Parameters:

strURI
bRel

Returns:

 

resolveURI

abstract jsx3.net.URI resolveURI(strURI : String | jsx3.net.URI)
Resolves the URI strURI against the base context of this resolver. Converts a URI relative to this resolver into a URI relative to the URL of the HTML page containing the JSX system. Implementations of this method should delegate to the default resolver any URIs that are judged to be absolute by the method URIResolver.isAbsoluteURI().

Parameters:

strURI

Returns:

 

See Also:

isAbsoluteURI()