<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % cartoweb SYSTEM "../../cartoweb.ent" >
  %cartoweb;
  ]>
<sect1 id="dev.soapcalls.structures">
  <title>Standard Structures</title>
  <sect2 id="dev.soapcalls.structures.simpletypes">
    <title>Simple Types</title>
    <para>These types are used in different other structures.</para>
    <para>
      <programlisting><![CDATA[
<complexType name="ArrayOfString">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:string[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of character strings</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="Dimension">
  <all>
    <element name="width" type="xsd:int"/>
    <element name="height" type="xsd:int"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>width - width in pixels</para>
        </listitem>
        <listitem>
          <para>height - height in pixels</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="GeoDimension">
  <all>
    <element name="dimension" type="types:Dimension"/>
    <element name="bbox" type="types:Bbox"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>dimension - dimensions in pixels</para>
        </listitem>
        <listitem>
          <para>bbox - bounding box (see <xref 
            linkend="dev.soapcalls.structures.shapes" /> for a description of 
            type Bbox)</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
  <sect2 id="dev.soapcalls.structures.shapes">
    <title>Shapes</title>
    <para>These types define a hierarchy of shapes. As heritage and 
      polymorphism cannot be used, type Shape includes all attibutes of its 
      children types.</para>
    <para>
      <programlisting><![CDATA[
<complexType name="Bbox">
  <all>
    <element name="minx" type="xsd:double"/>
    <element name="miny" type="xsd:double"/>
    <element name="maxx" type="xsd:double"/>
    <element name="maxy" type="xsd:double"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>minx - minimum x coordinate</para>
        </listitem>
        <listitem>
          <para>miny - minimum y coordinate</para>
        </listitem>
        <listitem>
          <para>maxx - maximum x coordinate</para>
        </listitem>
        <listitem>
          <para>maxy - maximum y coordinate</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="Point">
  <all>
    <element name="x" type="xsd:double"/>
    <element name="y" type="xsd:double"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>x - x coordinate</para>
        </listitem>
        <listitem>
          <para>y - y coordinate</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfPoint">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:Point[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of points</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="Shape">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="x" type="xsd:double" minOccurs="0"/>
    <element name="y" type="xsd:double" minOccurs="0"/>
    <element name="minx" type="xsd:double" minOccurs="0"/>
    <element name="miny" type="xsd:double" minOccurs="0"/>
    <element name="maxx" type="xsd:double" minOccurs="0"/>
    <element name="maxy" type="xsd:double" minOccurs="0"/>
    <element name="points" type="types:ArrayOfPoint" minOccurs="0"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>className - shape class name: "Point", "Bbox", "Rectangle", 
            "Line" or "Polygon"</para>
        </listitem>
        <listitem>
          <para>x - x coordinate (Point)</para>
        </listitem>
        <listitem>
          <para>y - y coordinate (Point)</para>
        </listitem>
        <listitem>
          <para>minx - minimum x coordinate (Bbox or Rectangle)</para>
        </listitem>
        <listitem>
          <para>miny - minimum y coordinate (Bbox or Rectangle)</para>
        </listitem>
        <listitem>
          <para>maxx - maximum x coordinate (Bbox or Rectangle)</para>
        </listitem>
        <listitem>
          <para>maxy - maximum y coordinate (Bbox or Rectangle)</para>
        </listitem>
        <listitem>
          <para>points - list of points (Line or Polygon)</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfShape">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:Shape[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of shapes</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
  <sect2 id="dev.soapcalls.structures.tables">
    <title>Tables</title>
    <para>These types define a table structure, used in particular in Query 
      plugin (see <xref linkend="dev.soapcalls.getmap.query" />).</para>
    <para>
      <programlisting><![CDATA[
<complexType name="TableRow">
  <all>
    <element name="rowId" type="xsd:string"/>
    <element name="cells" type="types:ArrayOfString"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>rowId - row ID</para>
        </listitem>
        <listitem>
          <para>cells - cell contents (see <xref 
            linkend="dev.soapcalls.structures.simpletypes" /> for a description 
            of type ArrayOfString)</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfTableRow">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:TableRow[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of rows</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="Table">
  <all>
    <element name="tableId" type="xsd:string"/>
    <element name="tableTitle" type="xsd:string"/>
    <element name="numRows" type="xsd:integer"/>
    <element name="totalRows" type="xsd:integer"/>
    <element name="offset" type="xsd:integer"/>
    <element name="columnIds" type="types:ArrayOfString"/>
    <element name="columnTitles" type="types:ArrayOfString"/>
    <element name="noRowId" type="xsd:boolean"/>
    <element name="rows" type="types:ArrayOfTableRow"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>tableId - table ID</para>
        </listitem>
        <listitem>
          <para>tableTitle - table title</para>
        </listitem>
        <listitem>
          <para>numRows - number of rows in table</para>
        </listitem>
        <listitem>
          <para>totalRows - total number of rows in context (for future 
            use)</para>
        </listitem>
        <listitem>
          <para>offset - current position in context rows (for future 
            use)</para>
        </listitem>
        <listitem>
          <para>columnIds - column IDs (see <xref 
            linkend="dev.soapcalls.structures.simpletypes" /> for a description 
            of type ArrayOfString)</para>
        </listitem>
        <listitem>
          <para>columnTitles - column titles (see <xref 
            linkend="dev.soapcalls.structures.simpletypes" /> for a description 
            of type ArrayOfString)</para>
        </listitem>
        <listitem>
          <para>noRowId - if true, table rows contain no row IDs</para>
        </listitem>
        <listitem>
          <para>rows - list of rows</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfTable">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:Table[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of tables</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="TableGroup">
  <all>
    <element name="groupId" type="xsd:string"/>
    <element name="groupTitle" type="xsd:string"/>
    <element name="tables" type="types:ArrayOfTable"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>groupId - ID of table group</para>
        </listitem>
        <listitem>
          <para>groupTitle - title of table group</para>
        </listitem>
        <listitem>
          <para>tables - list of tables</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="ArrayOfTableGroup">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType"
                 wsdl:arrayType="types:TableGroup[]"/>
    </restriction>
  </complexContent>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>array - list of table groups</para>
        </listitem>
      </itemizedlist>
      <programlisting><![CDATA[
<complexType name="TableFlags">
  <all>
    <element name="returnAttributes" type="xsd:boolean"/>
    <element name="returnTable" type="xsd:boolean"/>
  </all>
</complexType>]]></programlisting>
      <itemizedlist>
        <listitem>
          <para>returnAttributes - if true, will return attributes (row cells) 
            in addition to row IDs</para>
        </listitem>
        <listitem>
          <para>returnTable - if false, won't return any table information. 
            This can be useful for instance when hilighting an object on which 
            no information is needed</para>
        </listitem>
      </itemizedlist>
    </para>
  </sect2>
</sect1>