<?xml version="1.0" encoding="UTF-8"?>

<!-- ====================================================================== -->
<!-- = appendix-i.xml                                                     = -->
<!-- = standard nwg services module guide - appendix i                    = -->
<!-- ====================================================================== -->
<!-- = This  program  is  free  software; you  can redistribute it and/or = -->
<!-- = modify it provided that this copyright notice is kept intact.      = -->
<!-- = This program is distributed in the hope that it will be useful but = -->
<!-- = without  any  warranty;  without  even  the  implied  warranty  of = -->
<!-- = merchantability or fitness for  a  particular purpose. In no event = -->
<!-- = shall  the  copyright  holder be liable for any  direct, indirect, = -->
<!-- = incidental  or special  damages arising  in any way out of the use = -->
<!-- = of this software.                                                  = -->
<!-- ====================================================================== -->
<!-- = copyright (c) 2005-2006 - amaury darsch                            = -->
<!-- ====================================================================== -->

<appendix module="nwg" number="i">
  <title>Standard nwg services reference</title>

  <p>
  This appendix is a reference of the <afnix/> standard nwg services
  module.
  </p>

  <table>
    <title>Standard nwg services module</title>
    <thead>
      <tr><td>Symbol</td> <td>Description</td></tr>
    </thead>
    <tbody>
      <tr><td>afnix-nwg</td><td>module</td></tr>
      <tr><td>afnix:nwg</td><td>nameset</td></tr>
    </tbody>
  </table>

  <!-- =================================================================== -->
  <!-- = uri object                                                      = -->
  <!-- =================================================================== -->

  <object nameset="afnix:nwg">
    <name>Uri</name>

    <!-- synopsis -->
    <p>
    The <code>Uri</code> class is a base object used to parse or build
    a uniform resource identifier as defined by RFC 3986. The URI can
    be built by specifying each component or by parsing a
    string. When a string is given in the constructor, the class
    parses the string and extract all components. The uri components
    are the scheme, the authority, the path, the query and the
    fragment. The class also takes care of the character escaping.
    </p>

    <!-- predicate -->
    <pred>uri-p</pred>

    <!-- inheritance -->
    <inherit>
      <name>Object</name>
    </inherit>

    <!-- constructors -->
    <ctor>
      <name>Uri</name>
      <args>none</args>
      <p>
      The <code>Uri</code> constructor creates an empty uri object.
      </p>
    </ctor>

    <ctor>
      <name>Uri</name>
      <args>String</args>
      <p>
      The <code>Uri</code> constructor create a uri object by value.
      The string argument is the uri to parse at the object construction.
      </p>
    </ctor>

    <!-- methods -->
    <method>
      <name>parse</name>
      <retn>none</retn>
      <args>String</args>
      <p>
      The <code>parse</code> method reset the uri object, parse the
      string argument and fill the uri object with the result.
      </p>
    </method>

    <method>
      <name>get-scheme</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-scheme</code> method returns the scheme of the
      parsed uri object.
      </p>
    </method>

    <method>
      <name>get-authority</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-authority</code> method returns the authority part
      of the parsed uri.
      </p>
    </method>

    <method>
      <name>get-path</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-path</code> method returns the path of the parsed
      uri.
      </p>
    </method>

    <method>
      <name>get-query</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-query</code> method returns the complete query
      string of the parsed uri. Note that characters are not escaped
      when getting the string.
      </p>
    </method>

    <method>
      <name>get-fragment</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-fragment</code> method returns the complete query
      string of the parsed uri.
      </p>
    </method>
  </object>

  <!-- =================================================================== -->
  <!-- = uri object                                                      = -->
  <!-- =================================================================== -->

  <object nameset="afnix:nwg">
    <name>UriQuery</name>

    <!-- synopsis -->
    <p>
    The <code>UriQuery</code> class is a simple class that parses a
    uri query string and build property list. during the parsing
    process, a special transliteration process is done as specified by
    RFC 3986. This class is primarily used with <em>cgi</em>
    scripts. Note that the string to parse is exactly the one produced
    by the <code>get-query</code> method of the <code>Uri</code> class. 
    </p>

    <!-- predicate -->
    <pred>uri-query-p</pred>

    <!-- inheritance -->
    <inherit>
      <name>Plist</name>
    </inherit>

    <!-- constructors -->
    <ctor>
      <name>UriQuery</name>
      <args>none</args>
      <p>
      The <code>UriQuery</code> constructor creates an empty uri query
      object.
      </p>
    </ctor>

    <ctor>
      <name>UriQuery</name>
      <args>String</args>
      <p>
      The <code>UriQuery</code> constructor create a uri object by value.
      The string argument is the uri query string to parse at the
      object construction. The query string is the one obtained from
      the <code>get-query</code> method of the <code>Uri</code> class.
      </p>
    </ctor>

    <!-- methods -->
    <method>
      <name>parse</name>
      <retn>none</retn>
      <args>String</args>
      <p>
      The <code>parse</code> method reset the uri query object, parses the
      string argument and fill the property list object with the result.
      </p>
    </method>

    <method>
      <name>get-query</name>
      <retn>String</retn>
      <args>none</args>
      <p>
      The <code>get-query</code> method returns the original query string.
      </p>
    </method>
  </object>
</appendix>
