class NETWORK_RESOURCE_LOCATOR
Summary
Provides meaning to a network URL (Universal Resource Locator) strings, by the use of accessors to different parts of it: protocol, username, password, host, port, path, arguments and anchor are different parts of the URL:
  protocol://username:password@host:port/path?arguments#anchor
See also RFC 1738
Direct parents
Inherit list: RESOURCE_LOCATOR
Insert list: NETWORK_RESOURCE_VALIDITY
Class invariant
Overview
Creation features
{TCP_PROTOCOL}
Features
{TCP_PROTOCOL}
{ANY}
{URL_VALIDITY}
{URL}
{ANY}
{}
{}
{RECYCLING_POOL}
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
{ANY}
  • is_equal (other: NETWORK_RESOURCE_LOCATOR): BOOLEAN
    Is other attached to an object considered equal to current object?
{}
{}
set_uri (a_uri: STRING)
effective procedure
uri: STRING
effective function
{ANY}
valid_uri (a_uri: STRING): BOOLEAN
effective function
absolute_uri (a_uri: STRING): BOOLEAN
effective function
{URL}
require
  • valid_uri(a_uri)
relative_uri (a_uri: STRING): BOOLEAN
effective function
{URL}
require
  • valid_uri(a_uri)
set_relative (a_uri: STRING)
effective procedure
{URL}
require
  • relative_uri(a_uri)
username: STRING
writable attribute
{ANY}
The optional user name.
password: STRING
writable attribute
{ANY}
The optional password.
host: STRING
writable attribute
{ANY}
The host name.
port: INTEGER_32
writable attribute
{ANY}
The port; 0 means use the standard port of the protocol.
path: STRING
writable attribute
{ANY}
The path.
arguments: STRING
writable attribute
{ANY}
The optional arguments.
anchor: STRING
writable attribute
{ANY}
The optional anchor.
set_host (a_host: STRING)
effective procedure
{}
Sets the host name.
require
  • not a_host.is_empty
ensure
  • host.is_equal(a_host)
set_port (a_port: INTEGER_32)
effective procedure
{}
Sets the port number; 0 means use the standard port of the protocol.
require
  • a_port >= 0
ensure
set_username (a_username: STRING)
effective procedure
{}
Sets an optional user name; Void clears it.
ensure
set_password (a_password: STRING)
effective procedure
{}
Sets an optional password; Void clears it.
require
  • a_password /= Void implies username /= Void
ensure
set_path (a_path: STRING)
effective procedure
{}
Sets the path.
require
  • not a_path.is_empty
ensure
  • path.is_equal(a_path)
set_arguments (a_argument_name: STRING, a_argument_value: STRING)
effective procedure
{}
Sets an optional argument.
May be called more than once to add more arguments. A Void name clears all the arguments.
require
  • a_argument_value /= Void implies a_argument_name /= Void
set_anchor (a_anchor: STRING)
effective procedure
{}
Sets an optional anchor.
ensure
  • a_anchor = Void implies anchor = Void
  • a_anchor /= Void implies anchor.is_equal(a_anchor)
uri_string (a_user: STRING, a_pwd: STRING, a_host: STRING, a_port: INTEGER_32, a_path: STRING, a_args: STRING, a_anchor: STRING): STRING
effective function
{}
encode (string: STRING): STRING
effective function
{}
require
  • string /= Void
ensure
  • Result /= Void
decode (string: STRING): STRING
effective function
{}
require
  • string /= Void
string_pool: STRING_RECYCLING_POOL
once function
{}
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
is_equal (other: NETWORK_RESOURCE_LOCATOR): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
require
  • other /= Void
ensure
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
is_relative_uri (a_uri: STRING): BOOLEAN
effective function
{}
is_absolute_uri (a_uri: STRING): BOOLEAN
effective function
{}
True if a_uri contains a correctly formatted network URI (i.e. everything except the protocol scheme)
require
  • not a_uri.is_empty
once function
{}