OverviewSingleDeprecated

jsx3.net

class URI

Object
->jsx3.lang.Object
  ->jsx3.net.URI

class URI
extends jsx3.lang.Object
Represents a Uniform Resource Identifier (URI) reference. Modeled on the Java class java.net.URI.

Since:

3.1

Constructor Summary
void
init(strURI : String)
Instance initializer.
Method Summary
boolean
equals(obj : ?)
static jsx3.net.URI
fromParts(scheme : String, userInfo : String, host : String, port : int, path : String, query : String, fragment : String)
This method can be called with either 3 or 7 arguments.
String
String
String
String
int
String
String | boolean
getQueryParam(strParam : String)
Searches the query part for the value of a parameter.
Object<String, String>
String
String
String
boolean
boolean
jsx3.net.URI
Normalizes this URI's path.
jsx3.net.URI
Relativizes the given URI against this URI.
jsx3.net.URI
Resolves the given URI against this URI.
String
static jsx3.net.URI
Methods Inherited From jsx3.lang.Object
clone, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Constructor Detail

init

void init(strURI : String)
Instance initializer.

Parameters:

strURIuri
Method Detail

equals

boolean equals(obj : ?)

Parameters:

obj

Returns:

 

Overrides:

equals in jsx3.lang.Object

fromParts

static jsx3.net.URI fromParts(scheme : String, userInfo : String, host : String, port : int, path : String, query : String, fragment : String)
This method can be called with either 3 or 7 arguments. If it is called with 3 arguments, the signature is URI.fromParts(scheme, schemeSpecificPath, fragment).

Parameters:

schemethe URI scheme, may be null
userInfothe URI user-information, may be null; or the scheme-specific part if called with 3 arguments
hostthe URI host, may be null; or the URI fragment if called with 3 arguments, may be null
portthe URI port, may be null
paththe URI path
querythe URI query, may be null
fragmentthe URI fragment, may be null

Returns:

 

getAuthority

String getAuthority()

Returns:

 

getFragment

String getFragment()

Returns:

 

getHost

String getHost()

Returns:

 

getPath

String getPath()

Returns:

 

getPort

int getPort()

Returns:

 

getQuery

String getQuery()

Returns:

 

getQueryParam

String | boolean getQueryParam(strParam : String)
Searches the query part for the value of a parameter. Parameters are specified as name value pairs delimited by '&' like: name1=value1&name2=value2&... If a parameter is specified without a following '=' this method will return boolean true.

Parameters:

strParam

Returns:

 

getQueryParams

Object<String, String> getQueryParams()

Returns:

 

getScheme

String getScheme()

Returns:

 

getSchemeSpecificPart

String getSchemeSpecificPart()

Returns:

 

getUserInfo

String getUserInfo()

Returns:

 

isAbsolute

boolean isAbsolute()

Returns:

 

isOpaque

boolean isOpaque()

Returns:

 

normalize

jsx3.net.URI normalize()
Normalizes this URI's path.

Returns:

 

relativize

jsx3.net.URI relativize(uri : String | jsx3.net.URI)
Relativizes the given URI against this URI.

The returned URI is computed as follows:
  1. If this URI or uri is opaque, or their schemes are not equal or their authorities are not equal, uri is returned.
  2. Otherwise, a new URI is constructed with the query and fragment of uri and a path equal to:
    1. If the common path prefix of this URI and uri is just "" or "/", the path of uri
    2. Otherwise, the last segment of this path is removed and the path is computed by removing any common path prefix between the two paths, prepending a ".." for every segment remaining in this path, and appending the remaining path of uri.

Parameters:

uri

Returns:

 

resolve

jsx3.net.URI resolve(uri : String | jsx3.net.URI)
Resolves the given URI against this URI.

Parameters:

uri

Returns:

 

toString

String toString()

Returns:

 

Overrides:

toString in jsx3.lang.Object

valueOf

static jsx3.net.URI valueOf(strURI : String | jsx3.net.URI)

Parameters:

strURI

Returns: