Engine for Web Applications

org.cote.js.util.url

Class Index

static org.cote.js.util.url

version 1.9.18

Utility for parsing URLs.

This class participates in the engine library.

Index

Method Index

Methods

newInstance

Creates a new Url object.

Syntax

u = newInstance( v, b )

Parameters

Returns

u as UrlInstance: Instance of a Url.

qualifyToHost

Merges the specified URL with the current window URL (document.URL).

Syntax

v = qualifyToHost( u )

Parameters

Returns

v as String: Full url derived from the specified partial URL, and the window URL.

org.cote.js.util.UrlInstance

version 1.9.18

On object representation of a specified URL.

This class participates in the engine library.

Index

Example Index

Property Index

Method Index

Examples

Url Utility #1

Demonstrate how to obtain a full URL from a specified partial URL.

Example Code

var sFullUrl = org.cote.js.util.url.qualifyToHost("someFile.html");

Url Utility #2

Demonstrate how to obtain a UrlInstance and access its members.

Example Code

var oUrl = org.cote.js.util.url.newInstance("/path/someFile.html?somequery=1");
var sQuery = oUrl.getQuery();

Properties

object_config

Object API structure for storing sub structures: object_config.pointers and object_config.status.

Syntax

object = object.object_config

object_id

Unique instance identifier.

Syntax

String = object.object_id

object_type

The type of this object.

Syntax

String = object.object_type

object_version

Version of the object class.

Syntax

String = object.object_version

ready_state

Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.

Syntax

int = object.ready_state

Methods

_init

Initializes the UrlInstance.

Syntax

void _init( o )

Parameters

getDomain

Returns the domain name.

Syntax

d = getDomain( )

Returns

d as String: The domain name.

getFile

Returns any file reference.

Syntax

f = getFile( )

Returns

f as String: The file portion of the URL.

getObjectId

Returns the unique id of the object.

Syntax

i = getObjectId( )

Returns

i as String: The unique object instance id.

getObjectType

Returns the type of the object.

Syntax

t = getObjectType( )

Returns

t as String: The type of the object instance.

getObjectVersion

Returns the version of the object.

Syntax

v = getObjectVersion( )

Returns

v as String: The version of the object instance.

getPath

Returns the URL path.

Syntax

p = getPath( )

Returns

p as String: The URL path.

getPointers

Returns the object_config.pointers sub structure.

Syntax

o = getPointers( )

Returns

o as object: The object_config.pointers substructure.

getProtocol

Returns the URL protocol.

Syntax

p = getProtocol( )

Returns

p as String: The URL protocol.

getQuery

Returns any query string.

Syntax

q = getQuery( )

Returns

q as String: The query string.

getReadyState

Returns the state of the object.

Syntax

s = getReadyState( )

Returns

s as int: The object ready state.

getStatus

Returns the object_config.status sub structure.

Syntax

o = getStatus( )

Returns

o as object: The object_config.status substructure.

qualify

Merges the specified partial URL with the current context URL of the UrlInstance.

Syntax

v = qualify( u )

Parameters

Returns

v as String: Full url derived from the specified partial URL, and the context URL.