activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r898181 [4/5] - in /activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator: ./ specification/ specification/1.0-PR2/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/activemq/ src/m...
Date Tue, 12 Jan 2010 04:23:34 GMT
Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/specification/1.0-PR2/types.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/specification/1.0-PR2/types.xml?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/specification/1.0-PR2/types.xml (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/specification/1.0-PR2/types.xml Tue Jan 12 04:23:30 2010
@@ -0,0 +1,813 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright Notice
+  ================
+  (c) Copyright Cisco Systems, Credit Suisse, Deutsche Borse Systems, Envoy Technologies, Inc.,
+  Goldman Sachs, IONA Technologies PLC, iMatix Corporation sprl.,JPMorgan Chase Bank Inc. N.A,
+  Novell, Rabbit Technologies Ltd., Red Hat, Inc., TWIST Process Innovations ltd, and 29West Inc.
+  2006, 2007. All rights reserved.
+
+  License
+  =======
+
+  Cisco Systems, Credit Suisse, Deutsche Borse Systems, Envoy Technologies, Inc.,Goldman Sachs,
+  IONA Technologies PLC, iMatix Corporation sprl.,JPMorgan Chase Bank Inc. N.A, Novell, Rabbit
+  Technologies Ltd., Red Hat, Inc., TWIST Process Innovations ltd, and 29West Inc. (collectively,
+  the "Authors") each hereby grants to you a worldwide, perpetual, royalty-free, nontransferable,
+  nonexclusive license to (i) copy, display, distribute and implement the Advanced Messaging Queue
+  Protocol ("AMQP") Specification and (ii) the Licensed Claims that are held by the Authors, all for
+  the purpose of implementing the Advanced Messaging Queue Protocol Specification. Your license and
+  any rights under this Agreement will terminate immediately without notice from any Author if you
+  bring any claim, suit, demand, or action related to the Advanced Messaging Queue Protocol
+  Specification against any Author. Upon termination, you shall destroy all copies of the Advanced
+  Messaging Queue Protocol Specification in your possession or control.
+
+  As used hereunder, "Licensed Claims" means those claims of a patent or patent application,
+  throughout the world, excluding design patents and design registrations, owned or controlled, or
+  that can be sublicensed without fee and in compliance with the requirements of this Agreement, by
+  an Author or its affiliates now or at any future time and which would necessarily be infringed by
+  implementation of the Advanced Messaging Queue Protocol Specification. A claim is necessarily
+  infringed hereunder only when it is not possible to avoid infringing it because there is no
+  plausible non-infringing alternative for implementing the required portions of the Advanced
+  Messaging Queue Protocol Specification. Notwithstanding the foregoing, Licensed Claims shall not
+  include any claims other than as set forth above even if contained in the same patent as Licensed
+  Claims; or that read solely on any implementations of any portion of the Advanced Messaging Queue
+  Protocol Specification that are not required by the Advanced Messaging Queue Protocol
+  Specification, or that, if licensed, would require a payment of royalties by the licensor to
+  unaffiliated third parties. Moreover, Licensed Claims shall not include (i) any enabling
+  technologies that may be necessary to make or use any Licensed Product but are not themselves
+  expressly set forth in the Advanced Messaging Queue Protocol Specification (e.g., semiconductor
+  manufacturing technology, compiler technology, object oriented technology, networking technology,
+  operating system technology, and the like); or (ii) the implementation of other published
+  standards developed elsewhere and merely referred to in the body of the Advanced Messaging Queue
+  Protocol Specification, or (iii) any Licensed Product and any combinations thereof the purpose or
+  function of which is not required for compliance with the Advanced Messaging Queue Protocol
+  Specification. For purposes of this definition, the Advanced Messaging Queue Protocol
+  Specification shall be deemed to include both architectural and interconnection requirements
+  essential for interoperability and may also include supporting source code artifacts where such
+  architectural, interconnection requirements and source code artifacts are expressly identified as
+  being required or documentation to achieve compliance with the Advanced Messaging Queue Protocol
+  Specification.
+
+  As used hereunder, "Licensed Products" means only those specific portions of products (hardware,
+  software or combinations thereof) that implement and are compliant with all relevant portions of
+  the Advanced Messaging Queue Protocol Specification.
+
+  The following disclaimers, which you hereby also acknowledge as to any use you may make of the
+  Advanced Messaging Queue Protocol Specification:
+
+  THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
+  REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS
+  OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
+  IMPLEMENTATION OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD
+  PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+  THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+  DAMAGES ARISING OUT OF OR RELATING TO ANY USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED
+  MESSAGING QUEUE PROTOCOL SPECIFICATION.
+
+  The name and trademarks of the Authors may NOT be used in any manner, including advertising or
+  publicity pertaining to the Advanced Messaging Queue Protocol Specification or its contents
+  without specific, written prior permission. Title to copyright in the Advanced Messaging Queue
+  Protocol Specification will at all times remain with the Authors.
+
+  No other rights are granted by implication, estoppel or otherwise.
+
+  Upon termination of your license or rights under this Agreement, you shall destroy all copies of
+  the Advanced Messaging Queue Protocol Specification in your possession or control.
+
+  Trademarks
+  ==========
+  "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the Octagon Symbol are
+  trademarks of JPMorgan Chase & Co.
+
+  IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
+
+  IONA, IONA Technologies, and the IONA logos are trademarks of IONA Technologies PLC and/or its
+  subsidiaries.
+
+  LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered trademarks of Red Hat,
+  Inc. in the US and other countries.
+
+  Java, all Java-based trademarks and OpenOffice.org are trademarks of Sun Microsystems, Inc. in the
+  United States, other countries, or both.
+
+  Other company, product, or service names may be trademarks or service marks of others.
+
+  Links to full AMQP specification:
+  =================================
+  http://www.envoytech.org/spec/amq/
+  http://www.iona.com/opensource/amqp/
+  http://www.redhat.com/solutions/specifications/amqp/
+  http://www.twiststandards.org/tiki-index.php?page=AMQ
+  http://www.imatix.com/amqp
+-->
+
+<!DOCTYPE amqp SYSTEM "amqp.dtd">
+<!--  -->
+<amqp  xmlns="http://www.amqp.org/schema/amqp.xsd" name="types" label="working version">
+
+  <!-- == Section: types ======================================================================= -->
+
+  <section name="types" title="Type System" label="AMQP Type System">
+    <doc>
+      <p>
+        The AMQP type system defines a set of commonly used primitive types used for interoperable
+        data representation. AMQP values may be annotated with additional semantic information
+        beyond that associated with the primitive type. This allows for the association of an AMQP
+        value with an external type that is not present as an AMQP primitive. For example, a URL is
+        commonly represented as a string, however not all strings are valid URLs, and many
+        programming languages and/or applications define a specific type to represent URLs. The AMQP
+        type system would allow for the definition of a code with which to annotate strings when the
+        value is intended to represent a URL.
+      </p>
+    </doc>
+
+    <doc title="Primitive Types">
+      <p>
+        The following primitive types are defined:
+      </p>
+
+      <!--TypeListTable-->
+    </doc>
+
+    <doc title="Decoding Primitive Types">
+      <p>
+        For any given programming language there may not be a direct equivalence between the
+        available native language types and the AMQP types. The following table provides
+        recommendations as to how to decode AMQP typed values in a selection of popular languages.
+      </p>
+
+      <!-- <p>TODO: think about null handling for C++</p> -->
+
+      <picture title="Special Values"><![CDATA[
+AMQP      Python   Java       C99      C++          Ruby                 C#
+-------------------------------------------------------------------------------
+null      None     null       NULL     0            nil                  null
+true      True     true       true     true         true                 true
+false     False    false      false    false        false                false
+]]>
+      </picture>
+
+      <picture title="Suggested Mappings"><![CDATA[
+AMQP      Python   Java       C99      C++          Ruby                 C#
+-------------------------------------------------------------------------------
+null      NoneType --         --       --           NilClass             --
+boolean   bool     Boolean    bool     bool         TrueClass|FalseClass bool
+ubyte     int      Short      uint8_t  uint8_t
+ushort    int      Integer    uint16_t uint16_t
+uint      int|long Long       uint32_t uint32_t
+ulong     long     BigInteger uint64_t uint64_t
+byte      int      Byte       int8_t   int8_t
+short     int      Short      int16_t  int16_t
+int       int      Integer    int32_t  int32_t
+long      long     Long       int64_t  int64_t
+float     float    Float      float    float
+double    float    Double     double   double
+char      str      Character  wchar    wchar
+timestamp datetime Date       int64_t  int64_t
+uuid      UUID     UUID       char[16] char[16]
+binary    str      byte[]     char[]   char[]
+string    unicode  String     wchar[]  std::wstring
+symbol    str
+list      list     List
+map       dict     Map
+]]>
+      </picture>
+    </doc>
+
+    <doc title="Described Types">
+      <p>
+        The primitive types defined by AMQP can directly represent many of the basic types present
+        in most popular programming languages, and therefore may be trivially used to exchange basic
+        data. In practice, however, even the simplest applications have their own set of custom
+        types used to model concepts within the application's domain, and, for messaging
+        applications, these custom types need to be externalized for transmission.
+      </p>
+
+      <p>
+        AMQP provides a means to do this by allowing any AMQP type to be annotated with
+        a <i>descriptor</i>. A <i>descriptor</i> forms an association between a custom type, and an
+        AMQP type. This association indicates that the AMQP type is actually a <i>representation</i>
+        of the custom type. The resulting combination of the AMQP type and its descriptor is
+        referred to as a <i>described type</i>.
+      </p>
+
+      <p>
+        A described type contains two distinct kinds of type information. It identifies both an AMQP
+        type and a custom type (as well as the relationship between them), and so can be understood
+        at two different levels. An application with intimate knowledge of a given domain can
+        understand described types as the custom types they represent, thereby decoding and
+        processing them according to the complete semantics of the domain. An application with no
+        intimate knowledge can still understand the described types as AMQP types, decoding and
+        processing them as such.
+      </p>
+    </doc>
+
+    <doc title="Descriptor Values">
+      <p>
+        Descriptor values other than symbolic (<xref name="symbol"/>) or numeric
+        (<xref name="ulong"/>) are reserved, including numeric types other than
+        <xref name="ulong"/>. The namespace for both symbolic and numeric descriptors is divided
+        into distinct domains. Each domain has a defined symbol and/or 4 byte numeric id assigned by
+        the AMQP working group. Descriptors are then assigned within each domain according to the
+        following rules:
+      </p>
+
+      <dl>
+        <dt>symbolic descriptors</dt>
+        <dd>
+          <p><i>&lt;domain&gt;</i><b>:</b><i>&lt;name&gt;</i></p>
+        </dd>
+
+        <dt>numeric descriptors</dt>
+        <dd>
+          <p>
+            (<i>domain-id</i> &lt;&lt; 32) | <i>descriptor-id</i>
+          </p>
+        </dd>
+      </dl>
+    </doc>
+  </section>
+
+  <section name="encodings" title="Type Encodings" label="standard type encodings">
+    <doc>
+      <p>
+        An AMQP encoded data stream consists of untyped bytes with embedded constructors. The
+        embedded constructor indicates how to interpret the untyped bytes that follow. Constructors
+        can be thought of as functions that consume untyped bytes from an open ended byte stream and
+        construct a typed value. An AMQP encoded data stream always begins with a constructor.
+      </p>
+
+      <picture title="Primitive Format Code (String)"><![CDATA[
+       constructor            untyped bytes
+            |                      |
+          +--+   +-----------------+-----------------+
+          |  |   |                                   |
+     ...  0xA1   0x1E "Hello Glorious Messaging World"  ...
+           |     |  |              |                 |
+           |     |  |         utf8 bytes             |
+           |     |  |                                |
+           |     | # of data octets                  |
+           |     |                                   |
+           |     +-----------------+-----------------+
+           |                       |
+           |        string value encoded according
+           |          to the str8-utf8 encoding
+           |
+  primitive format code
+for the str8-utf8 encoding
+]]>
+      </picture>
+
+      <p>
+        An AMQP constructor consists of either a primitive format code, or a described format code.
+        A primitive format code is a constructor for an AMQP primitive type. A described format code
+        consists of a descriptor and a primitive format-code. A descriptor defines how to produce a
+        domain specific type from an AMQP primitive value.
+      </p>
+
+      <picture title="Described Format Code (URL)"><![CDATA[
+            constructor                       untyped bytes
+                 |                                 |
+     +-----------+-----------+   +-----------------+-----------------+
+     |                       |   |                                   |
+...  0x00 0xA1 0x03 "URL" 0xA1   0x1E "http://example.org/hello-world"  ...
+          |             |  |     |                                   |
+          +------+------+  |     |                                   |
+                 |         |     |                                   |
+            descriptor     |     +------------------+----------------+
+                           |                        |
+                           |         string value encoded according
+                           |           to the str8-utf8 encoding
+                           |
+                  primitive format code
+                for the str8-utf8 encoding
+]]>
+      </picture>
+
+      <p>
+        The descriptor portion of a described format code is itself any valid AMQP encoded value,
+        including other described values. The formal BNF for constructors is given below.
+      </p>
+
+      <picture title="Constructor BNF"><![CDATA[
+  constructor = format-code
+              / %x00 descriptor format-code
+
+  format-code = fixed / variable / compound / array
+        fixed = empty / fixed-one / fixed-two / fixed-four
+              / fixed-eight / fixed-sixteen
+     variable = variable-one / variable-four
+     compound = compound-one / compound-four
+        array = array-one / array-four
+
+   descriptor = value
+        value = constructor untyped-bytes
+untyped-bytes = *OCTET ; this is not actually *OCTET, the
+                       ; valid byte sequences are restricted
+                       ; by the constructor
+
+; fixed width format codes
+        empty = %x40-4E / %x4F %x00-FF
+    fixed-one = %x50-5E / %x5F %x00-FF
+    fixed-two = %x60-6E / %x6F %x00-FF
+   fixed-four = %x70-7E / %x7F %x00-FF
+  fixed-eight = %x80-8E / %x8F %x00-FF
+fixed-sixteen = %x90-9E / %x9F %x00-FF
+
+; variable width format codes
+ variable-one = %xA0-AE / %xAF %x00-FF
+variable-four = %xB0-BE / %xBF %x00-FF
+
+; compound format codes
+ compound-one = %xC0-CE / %xCF %x00-FF
+compound-four = %xD0-DE / %xDF %x00-FF
+
+; array format codes
+    array-one = %xE0-EE / %xEF %x00-FF
+   array-four = %xF0-FE / %xFF %x00-FF
+]]>
+      </picture>
+
+      <p>
+        Format codes map to one of four different categories: fixed width, variable width, compound
+        and array. Values encoded within each category share the same basic structure parameterized
+        by width. The subcategory within a format-code identifies both the category and width.
+      </p>
+
+      <dl>
+        <dt>Fixed Width</dt>
+        <dd>
+          <p>
+            The size of fixed-width data is determined based solely on the subcategory of the format
+            code for the fixed width value.
+          </p>
+        </dd>
+      </dl>
+
+      <dl>
+        <dt>Variable Width</dt>
+        <dd>
+          <p>
+            The size of variable-width data is determined based on an encoded size that prefixes the
+            data. The width of the encoded size is determined by the subcategory of the format code
+            for the variable width value.
+          </p>
+        </dd>
+
+        <dt>Compound</dt>
+        <dd>
+          <p>
+            Compound data is encoded as a size and a count followed by a polymorphic sequence
+            of <i>count</i> constituent values. Each constituent value is preceded by a constructor
+            that indicates the semantics and encoding of the data that follows. The width of the
+            size and count is determined by the subcategory of the format code for the compound
+            value.
+          </p>
+        </dd>
+
+        <dt>Array</dt>
+        <dd>
+          <p>
+            Array data is encoded as a size and count followed by an array element constructor
+            followed by a monomorphic sequence of values encoded according to the supplied array
+            element constructor. The width of the size and count is determined by the subcategory of
+            the format code for the array.
+          </p>
+        </dd>
+      </dl>
+
+      <p>
+        The bits within a format code may be interpreted according to the following layout:
+      </p>
+
+      <picture><![CDATA[
+Bit:  7    6    5    4    3    2    1    0
+     +------------------------------------+ +----------+
+     |   subcategory   |     subtype      | | ext-type |
+     +------------------------------------+ +----------+
+                   1 octet                    1 octet
+     |                                                 |
+     +-------------------------------------------------+
+                             |
+                        format-code
+
+         ext-type: only present if subtype is 0xF
+]]>
+      </picture>
+
+      <p>
+        The following table describes the subcategories of format-codes:
+      </p>
+
+      <picture>
+Subcategory  Category        Format
+==============================================================================
+0x4          Fixed Width     Zero octets of data.
+0x5          Fixed Width     One octet of data.
+0x6          Fixed Width     Two octets of data.
+0x7          Fixed Width     Four octets of data.
+0x8          Fixed Width     Eight octets of data.
+0x9          Fixed Width     Sixteen octets of data.
+
+0xA          Variable Width  One octet of size, 0-255 octets of data.
+0xB          Variable Width  Four octets of size, 0-4294967295 octets of data.
+
+0xC          Compound        One octet each of size and count, 0-255 distinctly
+                             typed values.
+0xD          Compound        Four octets each of size and count, 0-4294967295
+                             distinctly typed values.
+
+0xE          Array           One octet each of size and count, 0-255 uniformly
+                             typed values.
+0xF          Array           Four octets each of size and count, 0-4294967295
+                             uniformly typed values.
+      </picture>
+
+      <p>
+        Please note, unless otherwise specified, AMQP uses network byte order for all numeric
+        values.
+      </p>
+    </doc>
+
+    <doc title="Fixed Width">
+      <p>
+        The width of a specific fixed width encoding may be computed from the subcategory of the
+        format code for the fixed width value:
+      </p>
+
+      <picture><![CDATA[
+    n OCTETs
+  +----------+
+  |   data   |
+  +----------+
+
+Subcategory     n
+=================
+0x4             0
+0x5             1
+0x6             2
+0x7             4
+0x8             8
+0x9             16
+]]>
+      </picture>
+    </doc>
+
+    <type class="primitive" name="null" label="indicates an empty value">
+      <encoding code="0x40" category="fixed" width="0" label="the null value"/>
+    </type>
+
+    <type class="primitive" name="boolean" label="represents a true or false value">
+      <encoding name="true" code="0x41" category="fixed" width="0" label="the boolean value true"/>
+      <encoding name="false" code="0x42" category="fixed" width="0"
+                label="the boolean value false"/>
+    </type>
+
+    <type class="primitive" name="ubyte" label="integer in the range 0 to 2^8 - 1">
+      <encoding code="0x50" category="fixed" width="1" label="8-bit unsigned integer"/>
+    </type>
+
+    <type class="primitive" name="ushort" label="integer in the range 0 to 2^16 - 1">
+      <encoding code="0x60" category="fixed" width="2"
+                label="16-bit unsigned integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="uint" label="integer in the range 0 to 2^32 - 1">
+      <encoding code="0x70" category="fixed" width="4"
+                label="32-bit unsigned integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="ulong" label="integer in the range 0 to 2^64 - 1">
+      <encoding code="0x80" category="fixed" width="8"
+                label="64-bit unsigned integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="byte" label="integer in the range -(2^7) to 2^7 - 1">
+      <encoding code="0x51" category="fixed" width="1" label="8-bit two's-complement integer"/>
+    </type>
+
+    <type class="primitive" name="short" label="integer in the range -(2^15) to 2^15 - 1">
+      <encoding code="0x61" category="fixed" width="2"
+                label="16-bit two's-complement integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="int" label="integer in the range -(2^31) to 2^31 - 1">
+      <encoding code="0x71" category="fixed" width="4"
+                label="32-bit two's-complement integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="long" label="integer in the range -(2^63) to 2^63 - 1">
+      <encoding code="0x81" category="fixed" width="8"
+                label="64-bit two's-complement integer in network byte order"/>
+    </type>
+
+    <type class="primitive" name="float"
+          label="32-bit floating point number (IEEE 754-2008 binary32)">
+      <encoding name="ieee-754" code="0x72" category="fixed" width="4"
+                label="IEEE 754-2008 binary32"/>
+    </type>
+
+    <type class="primitive" name="double"
+          label="64-bit floating point number (IEEE 754-2008 binary64)">
+      <encoding name="ieee-754" code="0x82" category="fixed" width="8"
+                label="IEEE 754-2008 binary64"/>
+    </type>
+
+    <type class="primitive" name="char" label="a single unicode character">
+      <encoding name="utf32" code="0x73" category="fixed" width="4"
+                label="a UTF-32 encoded unicode character"/>
+    </type>
+
+    <type class="primitive" name="timestamp" label="an absolute point in time">
+      <encoding name="ms64" code="0x83" category="fixed" width="8"
+                label="64-bit signed integer representing milliseconds since the unix epoch">
+        <doc>
+          <p>
+            Encodes a point in time using a 64 bit signed integer representing milliseconds since
+            Midnight Jan 1, 1970 UTC. For the purpose of this representation, milliseconds are taken
+            to be (1/(24*60*60*1000))th of a day.
+          </p>
+        </doc>
+      </encoding>
+    </type>
+
+    <type class="primitive" name="uuid"
+          label="a universally unique id as defined by RFC-4122 section 4.1.2">
+      <encoding code="0x98" category="fixed" width="16"
+                label="UUID as defined in section 4.1.2 of RFC-4122"/>
+    </type>
+
+    <doc title="Variable Width">
+      <p>
+        All variable width encodings consist of a size in octets followed by <i>size</i> octets of
+        encoded data. The width of the size for a specific variable width encoding may be computed
+        from the subcategory of the format code:
+      </p>
+
+      <picture><![CDATA[
+  n OCTETs   size OCTETs
++----------+-------------+
+|   size   |    value    |
++----------+-------------+
+
+    Subcategory     n
+    =================
+    0xA             1
+    0xB             4
+]]>
+      </picture>
+    </doc>
+
+    <type class="primitive" name="binary" label="a sequence of octets">
+      <encoding name="vbin8" code="0xa0" category="variable" width="1"
+                label="up to 2^8 - 1 octets of binary data"/>
+
+      <encoding name="vbin32" code="0xb0" category="variable" width="4"
+                label="up to 2^32 - 1 octets of binary data"/>
+    </type>
+
+    <type class="primitive" name="string" label="a sequence of unicode characters">
+      <encoding name="str8-utf8" code="0xa1" category="variable" width="1"
+                label="up to 2^8 - 1 octets worth of UTF-8 unicode"/>
+
+      <encoding name="str8-utf16" code="0xa2" category="variable" width="1"
+                label="up to 2^8 - 1 octets worth of UTF-16 unicode"/>
+
+      <encoding name="str32-utf8" code="0xb1" category="variable" width="4"
+                label="up to 2^32 - 1 octets worth of UTF-8 unicode"/>
+
+      <encoding name="str32-utf16" code="0xb2" category="variable" width="4"
+                label="up to 2^32 - 1 octets worth of UTF-16 unicode"/>
+    </type>
+
+    <type class="primitive" name="symbol" label="symbolic values from a constrained domain">
+      <doc>
+        <p>
+          Symbols are values from a constrained domain. Although the set of possible domains is
+          open-ended, typically the both number and size of symbols in use for any given application
+          will be small, e.g. small enough that it is reasonable to cache all the distinct values.
+        </p>
+      </doc>
+
+      <encoding name="sym8" code="0xa3" category="variable" width="1"
+                label="up to 2^8 - 1 seven bit ASCII characters representing a symbolic value"/>
+
+      <encoding name="sym32" code="0xb3" category="variable" width="2"
+                label="up to 2^32 - 1 seven bit ASCII characters representing a symbolic value"/>
+    </type>
+
+    <doc title="Compound">
+      <p>
+        All compound encodings consist of a size and a count followed by <i>count</i> encoded items.
+        The width of the size and count for a specific compound encoding may be computed from the
+        category of the format code:
+      </p>
+
+      <picture><![CDATA[
+                      +----------= count items =----------+
+                      |                                   |
+  n OCTETs   n OCTETs |                                   |
++----------+----------+--------------+------------+-------+
+|   size   |  count   |      ...    /|    item    |\ ...  |
++----------+----------+------------/ +------------+ \-----+
+                                  / /              \ \
+                                 / /                \ \
+                                / /                  \ \
+                               +-------------+----------+
+                               | constructor |   data   |
+                               +-------------+----------+
+
+                   Subcategory     n
+                   =================
+                   0xC             1
+                   0xD             4
+]]>
+      </picture>
+    </doc>
+
+    <type class="primitive" name="list" label="a sequence of polymorphic values">
+      <encoding name="list8" code="0xc0" category="compound" width="1"
+                label="up to 2^8 - 1 list elements with total size less than 2^8 octets"/>
+      <encoding name="list32" code="0xd0" category="compound" width="4"
+                label="up to 2^32 - 1 list elements with total size less than 2^32 octets"/>
+      <encoding name="array8" code="0xe0" category="array" width="1"
+                label="up to 2^8 - 1 array elements with total size less than 2^8 octets"/>
+      <encoding name="array32" code="0xf0" category="array" width="4"
+                label="up to 2^32 - 1 array elements with total size less than 2^32 octets"/>
+    </type>
+
+    <type class="primitive" name="map"
+          label="a polymorphic mapping from distinct keys to values">
+      <encoding name="map8" code="0xc1" category="compound" width="1"
+                label="up to 2^8 - 1 octets of encoded map data">
+        <doc>
+          <p>Up to 2^8 - 1 octets of encoded map data.</p>
+
+          <p>
+            A map is encoded as a compound value where the constituent elements form alternating key
+            value pairs.
+          </p>
+
+          <picture><![CDATA[
+ item 0   item 1      item n-1    item n
++-------+-------+----+---------+---------+
+| key 1 | val 1 | .. | key n/2 | val n/2 |
++-------+-------+----+---------+---------+
+]]>
+          </picture>
+        </doc>
+      </encoding>
+      <encoding name="map32" code="0xd1" category="compound" width="4"
+                label="up to 2^32 - 1 octets of encoded map data">
+        <doc>
+          <p>
+            Up to 2^32 - 1 octets of encoded map data. See map8 above for a definition of encoded
+            map data.
+          </p>
+        </doc>
+      </encoding>
+    </type>
+
+    <doc title="Array">
+      <p>
+        All array encodings consist of a size followed by a count followed by an element constructor
+        followed by <i>count</i> elements of encoded data formated as required by the element
+        constructor:
+      </p>
+
+      <picture><![CDATA[
+                                            +--= count elements =--+
+                                            |                      |
+  n OCTETs   n OCTETs                       |                      |
++----------+----------+---------------------+-------+------+-------+
+|   size   |  count   | element-constructor |  ...  | data |  ...  |
++----------+----------+---------------------+-------+------+-------+
+
+                        Subcategory     n
+                        =================
+                        0xE             1
+                        0xF             4
+]]>
+      </picture>
+    </doc>
+
+    <doc title="List of Encodings">
+      <!--EncodingListTable-->
+    </doc>
+
+  </section>
+
+  <!-- == Section: compound-types ============================================================== -->
+
+  <section name="compound-types" title="Compound Types" label="compound type notation and encoding">
+    <doc>
+      <p>
+        AMQP defines a number of <i>compound types</i> used for encoding structured data such as
+        commands, and controls. A compound type describes a composite value where each constituent
+        value is identified by a well known named <i>field</i>. Each compound type definition
+        includes an ordered sequence of fields, each with a specified name, type, and multiplicity.
+        Compound type definitions also include one or more descriptors (symbolic and/or numeric) for
+        identifying their defined representations.
+      </p>
+
+      <p>
+        Compound types are formally defined in the XML documents included with the specification.
+        The following notation is used to define them:
+      </p>
+
+      <picture title="Example Compound Type"><![CDATA[
+<type class="compound" name="book" label="example compound type">
+  <doc>
+    <p>An example compound type.</p>
+  </doc>
+
+  <descriptor name="example:book:list" code="0x00000003:0x00000002"/>
+
+  <field name="title" type="string" required="true" label="title of the book"/>
+
+  <field name="authors" type="string" multiple="true"/>
+
+  <field name="isbn" type="string" label="the isbn code for the book"/>
+</type>
+]]>
+      </picture>
+
+      <p>
+        The <i>required</i> attribute of a field description controls whether a null element value
+        is permitted in the representation. The <i>multiple</i> attribute of a field description
+        controls whether a list of values is permitted in the representation. A single element of
+        the type specified in the field description is always permitted, and lists if used MUST use
+        an element type that matches the field description.
+      </p>
+
+      <p>
+        AMQP compound types may be encoded either as a described list or a described map. In general
+        a specific compound type definition will allow for only one encoding option. This is
+        currently indicated by the naming convention of the symbolic descriptor. Map encodings have
+        symbolic descriptors ending in ":map", and list encodings in ":list". (Note that there may
+        be a more formal way of distinguishing in a future revision.)
+      </p>
+      <!-- TODO: see above note -->
+    </doc>
+
+    <doc title="List Encoding">
+      <p>
+        When encoding AMQP compound values as a described list, each element in the list is
+        positionally correlated with the fields listed in the compound type definition. The
+        permitted element values are determined by the type specification and multiplicity of the
+        corresponding field definitions. When the trailing elements of the list representation are
+        null, they MAY be omitted. The compound-value descriptor of the list indicates the specific
+        compound type being represented.
+      </p>
+
+      <p>
+        The described list shown below is an example compound value of the <i>book</i> type defined
+        above. A trailing null element corresponding to the absence of an isbn value is depicted in
+        the example, but may optionally be omitted according to the encoding rules.
+      </p>
+
+      <picture title="Example Compound Value"><![CDATA[
+             constructor                  list representation of a book
+                  |                                   |
++-----------------+-------------------+ +-------------+---------------+
+|                                     | |                             |
+0x00 0xA3 0x11 "example:book:list" 0xC0 0x40 0x03  title  authors  isbn
+      |                 |                            |       |       |
+      |      identifies compound type                |       |       |
+      |                                              |       |     0x40
+    sym8                      +----------------------+       |       |
+  (symbol)                    |                              |  null value
+               +--------------+----------------+             |
+               |                               |             |
+               0xA1 0x15 "AMQP for & by Dummies"             |
+                                                             |
++------------------------------------------------------------+-----+
+|                                                                  |
+0xE0 0x25 0x02 0xA1 0x0E "Rob J. Godfrey" 0x13 "Rafael H. Schloming"
+      |    |    |   |                   | |                        |
+    size   |    |   +---------+---------+ +-----------+------------+
+           |    |             |                       |
+         count  |        first element          second element
+                |
+        element constructor
+]]>
+      </picture>
+    </doc>
+
+    <doc title="Map Encoding">
+      <p>
+        When encoding AMQP compound values as a described map, the set of valid keys is restricted
+        to symbols identifying the field names in the compound type definition. The value associated
+        with a given key MUST match the type specification and multiplicity from the field
+        definition. If there is no value associated with a given field, the key MAY be omitted from
+        the map. This is the same as supplying a null value for the given key. The compound-value
+        descriptor of the map indicates the specific compound type being represented.
+      </p>
+    </doc>
+  </section>
+
+</amqp>

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpChoice.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpChoice.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpChoice.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpChoice.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,17 @@
+package org.apache.activemq.amqp.generator;
+
+import java.util.LinkedHashMap;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Choice;
+
+public class AmqpChoice {
+
+    private AmqpDoc doc;
+    private String name;
+    
+    LinkedHashMap<String, String> choices = new LinkedHashMap<String, String>();
+    public void parseFromChoice(Choice choice) {
+        choices.put(choice.getName(), choice.getValue());
+        //TODO choice.getDoc();
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpClass.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpClass.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpClass.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpClass.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,283 @@
+package org.apache.activemq.amqp.generator;
+
+import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+import static org.apache.activemq.amqp.generator.Utils.*;
+import org.apache.activemq.amqp.generator.jaxb.schema.*;
+
+public class AmqpClass {
+
+    protected String name;
+    protected AmqpDoc doc;
+    protected AmqpChoice choice;
+    protected AmqpException exception;
+    protected AmqpDescriptor descriptor;
+    protected AmqpEncoding encoding;
+    protected String restrictedType;
+
+    protected boolean restricted;
+    protected boolean primitive;
+
+    LinkedHashMap<String, AmqpField> fields = new LinkedHashMap<String, AmqpField>();
+    protected String javaPackage = "";
+    protected String javaType = "";
+
+    public void parseFromType(Generator generator, String source, Type type) {
+        this.name = type.getName();
+        this.restrictedType = type.getSource();
+
+        // See if this is a restricting type (used to restrict the type of a
+        // field):
+        if (type.getClazz().equalsIgnoreCase("restricted")) {
+            this.restricted = true;
+        }
+
+        for (Object typeAttribute : type.getEncodingOrDescriptorOrFieldOrChoiceOrExceptionOrDoc()) {
+            if (typeAttribute instanceof Field) {
+                AmqpField field = new AmqpField();
+                field.parseFromField((Field) typeAttribute);
+                fields.put(field.getName(), field);
+            } else if (typeAttribute instanceof Descriptor) {
+                descriptor = new AmqpDescriptor();
+                descriptor.parseFromDescriptor((Descriptor) typeAttribute);
+            } else if (typeAttribute instanceof Choice) {
+                if (choice == null) {
+                    choice = new AmqpChoice();
+                }
+                choice.parseFromChoice((Choice) typeAttribute);
+            } else if (typeAttribute instanceof Doc) {
+                doc = new AmqpDoc();
+                doc.parseFromDoc((Doc) typeAttribute);
+            } else if (typeAttribute instanceof Encoding) {
+                encoding = new AmqpEncoding();
+                encoding.parseFromEncoding((Encoding) typeAttribute);
+            } else if (typeAttribute instanceof org.apache.activemq.amqp.generator.jaxb.schema.Exception) {
+                exception = new AmqpException();
+                exception.parseFromException((org.apache.activemq.amqp.generator.jaxb.schema.Exception) typeAttribute);
+            }
+        }
+
+        if (type.getClazz().equalsIgnoreCase("primitive")) {
+            javaType = "Amqp" + capFirst(toJavaName(name));
+            setPrimitive(true);
+        } else {
+            javaType = capFirst(toJavaName(name));
+        }
+        javaPackage = generator.getPackagePrefix() + "." + source;
+    }
+
+    public void generate(Generator generator) throws IOException, UnknownTypeException {
+        String className = getJavaType();
+
+        File file = new File(generator.getOutputDirectory() + File.separator + new String(javaPackage + "." + className).replace(".", File.separator) + ".java");
+        file.getParentFile().mkdirs();
+        if (file.exists()) {
+            file.delete();
+        }
+        BufferedWriter writer = new BufferedWriter(new FileWriter(file));
+
+        writeCopyWrite(writer);
+        writer.write("package " + javaPackage + ";\n");
+        writer.newLine();
+        if (writeImports(writer)) {
+            writer.newLine();
+        }
+
+        writer.write("public class " + className + " {");
+        writer.newLine();
+        writer.newLine();
+
+        if (writeConstants(writer)) {
+            writer.newLine();
+            writer.newLine();
+        }
+
+        if (writeFields(writer)) {
+            writer.newLine();
+        }
+
+        if (writeFieldAccesors(writer)) {
+            writer.newLine();
+        }
+        writer.write("}");
+        writer.flush();
+        writer.close();
+
+    }
+
+    private static void writeCopyWrite(BufferedWriter writer) throws IOException {
+        writer.write("/**");
+        writer.newLine();
+        writer.write(" * Licensed to the Apache Software Foundation (ASF) under one or more");
+        writer.newLine();
+        writer.write(" * contributor license agreements.  See the NOTICE file distributed with");
+        writer.newLine();
+        writer.write(" * this work for additional information regarding copyright ownership.");
+        writer.newLine();
+        writer.write(" * The ASF licenses this file to You under the Apache License, Version 2.0");
+        writer.newLine();
+        writer.write(" * (the \"License\"); you may not use this file except in compliance with");
+        writer.newLine();
+        writer.write(" * the License.  You may obtain a copy of the License at");
+        writer.newLine();
+        writer.write(" *");
+        writer.newLine();
+        writer.write(" *      http://www.apache.org/licenses/LICENSE-2.0");
+        writer.newLine();
+        writer.write(" *");
+        writer.newLine();
+        writer.write(" * Unless required by applicable law or agreed to in writing, software");
+        writer.newLine();
+        writer.write(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
+        writer.newLine();
+        writer.write(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
+        writer.newLine();
+        writer.write(" * See the License for the specific language governing permissions and");
+        writer.newLine();
+        writer.write(" * limitations under the License.");
+        writer.newLine();
+        writer.write(" */");
+        writer.newLine();
+        writer.newLine();
+    }
+
+    private boolean writeImports(BufferedWriter writer) throws IOException, UnknownTypeException {
+
+        HashSet<String> imports = new HashSet<String>();
+
+        for (AmqpField field : fields.values()) {
+            imports.add(field.getJavaPackage());
+        }
+
+        imports.remove(getJavaPackage());
+        imports.remove("java.lang");
+
+        boolean ret = false;
+
+        for (String toImport : imports) {
+            ret = true;
+            writer.write("import " + toImport + ".*;");
+            writer.newLine();
+        }
+        return ret;
+    }
+
+    private boolean writeConstants(BufferedWriter writer) throws IOException, UnknownTypeException {
+        boolean ret = false;
+        if (choice != null) {
+            ret = true;
+            for (Map.Entry<String, String> constant : choice.choices.entrySet()) {
+                writer.write(tab(1) + "public static final " + TypeRegistry.getJavaType(restrictedType) + " " + Utils.toJavaConstant(constant.getKey() + " = " + constant.getValue() + ";"));
+                writer.newLine();
+            }
+        }
+        return ret;
+    }
+
+    private boolean writeFields(BufferedWriter writer) throws IOException, UnknownTypeException {
+        boolean ret = false;
+        for (AmqpField field : fields.values()) {
+            ret = true;
+            if (field.getDoc() != null) {
+                // TODO
+            }
+
+            String array = field.isMultiple() ? " []" : "";
+            writer.write(tab(1) + "private " + field.getJavaType() + array + " " + field.getJavaName());
+
+            if (field.getDefaultValue() != null) {
+                writer.write(" = " + field.getDefaultValue());
+            }
+
+            writer.write(";");
+            writer.newLine();
+        }
+        return ret;
+    }
+
+    private boolean writeFieldAccesors(BufferedWriter writer) throws IOException, UnknownTypeException {
+        boolean ret = false;
+        for (AmqpField field : fields.values()) {
+            ret = true;
+            if (field.getDoc() != null) {
+                // TODO
+            }
+
+            String array = field.isMultiple() ? " []" : "";
+
+            // Setter:
+            writer.write(tab(1) + "public final void set" + capFirst(field.getJavaName()) + "(" + field.getJavaType() + array + " " + toJavaName(field.getName()) + ") {");
+            writer.newLine();
+            writer.write(tab(2) + "this." + field.getJavaName() + " = " + field.getJavaName() + ";");
+            writer.newLine();
+            writer.write(tab(1) + "}");
+            writer.newLine();
+            writer.newLine();
+            // Getter:
+
+            // Setter:
+            writer.write(tab(1) + "public final " + field.getJavaType() + array + " get" + capFirst(field.getJavaName()) + "() {");
+            writer.newLine();
+            writer.write(tab(2) + "return " + field.getJavaName() + ";");
+            writer.newLine();
+            writer.write(tab(1) + "}");
+            writer.newLine();
+            writer.newLine();
+        }
+        return ret;
+    }
+
+    public String getJavaType() {
+        return javaType;
+    }
+
+    public String getJavaPackage() {
+        return javaPackage;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isPrimitive() {
+        return primitive;
+    }
+
+    public boolean isRestricted() {
+        return restricted;
+    }
+
+    public String getRestrictedType() {
+        return restrictedType;
+    }
+
+    public void setPrimitive(boolean primitive) {
+        this.primitive = primitive;
+    }
+
+    public String toString() {
+        String ret = "Class: " + name + " [Encoding=" + encoding + ", Descriptor=" + descriptor + "]\n";
+        ret += " Fields:\n";
+        for (AmqpField f : fields.values()) {
+            ret += " " + f.toString();
+        }
+
+        return ret;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDescriptor.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDescriptor.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDescriptor.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDescriptor.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,21 @@
+package org.apache.activemq.amqp.generator;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Descriptor;
+
+public class AmqpDescriptor {
+
+    String code;
+    String name;
+
+    public void parseFromDescriptor(Descriptor descriptor) {
+
+        code = descriptor.getCode();
+        name = descriptor.getName();
+        // TODO descriptor.getDoc();
+    }
+
+    public String toString() {
+        return "{" + name + ", code=" + code + "}";
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDoc.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDoc.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDoc.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpDoc.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,12 @@
+package org.apache.activemq.amqp.generator;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Doc;
+
+public class AmqpDoc {
+
+    
+    public void parseFromDoc(Doc doc)
+    {
+        //TODO
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpEncoding.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpEncoding.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpEncoding.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpEncoding.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,23 @@
+package org.apache.activemq.amqp.generator;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Encoding;
+
+public class AmqpEncoding {
+
+    private String name;
+    private String category;
+    private String code;
+    private String width;
+
+    public void parseFromEncoding(Encoding encoding) {
+        name = encoding.getName();
+        category = encoding.getCategory();
+        code = encoding.getCode();
+        width = encoding.getWidth();
+        //TODO: encoding.getDoc();
+    }
+
+    public String toString() {
+        return "{" + name + ", cat=" + category + ", code=" + code + ", width=" + width +"}";
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpException.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpException.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpException.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpException.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,16 @@
+package org.apache.activemq.amqp.generator;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Exception;
+
+public class AmqpException {
+
+    String errorCode; 
+    String name;
+    
+    public void parseFromException(Exception exception)
+    {
+        errorCode = exception.getErrorCode();
+        name = exception.getName();
+        //TODO exception.getDoc()
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpField.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpField.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpField.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/AmqpField.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,100 @@
+package org.apache.activemq.amqp.generator;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.*;
+import static org.apache.activemq.amqp.generator.Utils.*;
+
+public class AmqpField {
+
+    String doc;
+    String name;
+    String defaultValue;
+    String label;
+    String type;
+    boolean multiple;
+    boolean required;
+
+    public void parseFromField(Field field) {
+        defaultValue = field.getDefault();
+        label = field.getLabel();
+        name = field.getName();
+        multiple = new Boolean(field.getMultiple()).booleanValue();
+        required = new Boolean(field.getRequired()).booleanValue();
+        type = field.getType();
+
+        for (Object object : field.getDocOrException()) {
+            // TODO;
+        }
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDoc() {
+        return doc;
+    }
+
+    public void setDoc(String doc) {
+        this.doc = doc;
+    }
+
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    public void setDefaultValue(String defaultValue) {
+        this.defaultValue = defaultValue;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public boolean isMultiple() {
+        return multiple;
+    }
+
+    public void setMultiple(boolean multiple) {
+        this.multiple = multiple;
+    }
+
+    public boolean isRequired() {
+        return required;
+    }
+
+    public void setRequired(boolean required) {
+        this.required = required;
+    }
+
+    public String getJavaType() throws UnknownTypeException {
+        return TypeRegistry.getJavaType(this);
+    }
+    
+    public String getJavaPackage() throws UnknownTypeException {
+        return TypeRegistry.getJavaPackage(this);
+    }
+    
+    public String getJavaName() {
+        return toJavaName(name);
+    }
+
+    public String toString() {
+        return name + "[type:" + type + ", req:" + required + " multiple: " + multiple + ", def:" + defaultValue + "]";
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Generator.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Generator.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Generator.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Generator.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,98 @@
+package org.apache.activemq.amqp.generator;
+
+import java.util.HashMap;
+import java.util.List;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Source;
+import javax.xml.transform.sax.SAXSource;
+
+import org.apache.activemq.amqp.generator.jaxb.schema.Amqp;
+import org.apache.activemq.amqp.generator.jaxb.schema.Section;
+import org.apache.activemq.amqp.generator.jaxb.schema.Type;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+public class Generator {
+
+    private Log LOG = LogFactory.getLog(Generator.class);
+
+    private String [] inputFiles;
+    private String outputDirectory;
+    private String packagePrefix;
+
+    private TypeRegistry typeRegistry = new TypeRegistry();
+
+    public String [] getInputFile() {
+        return inputFiles;
+    }
+
+    public void setInputFiles(String ... inputFiles) {
+        this.inputFiles = inputFiles;
+    }
+
+    public String getOutputDirectory() {
+        return outputDirectory;
+    }
+
+    public void setOutputDirectory(String outputDirectory) {
+        this.outputDirectory = outputDirectory;
+    }
+
+    public String getPackagePrefix() {
+        return packagePrefix;
+    }
+
+    public void setPackagePrefix(String packagePrefix) {
+        this.packagePrefix = packagePrefix;
+    }
+
+    public void generate() throws Exception {
+        TypeRegistry.init(this);
+        JAXBContext jc = JAXBContext.newInstance(Amqp.class.getPackage().getName());
+
+        for(String inputFile : inputFiles)
+        {
+            // JAXB has some namespace handling problems:
+            Unmarshaller unmarshaller = jc.createUnmarshaller();
+            SAXParserFactory parserFactory;
+            parserFactory = SAXParserFactory.newInstance();
+            parserFactory.setNamespaceAware(false);
+            XMLReader reader = parserFactory.newSAXParser().getXMLReader();
+            Source er = new SAXSource(reader, new InputSource(inputFile));
+            // Amqp amqp = (Amqp) unmarshaller.unmarshal(new StreamSource(new
+            // File(inputFile)), Amqp.class).getValue();
+            Amqp amqp = (Amqp) unmarshaller.unmarshal(er);
+            List<Object> list = amqp.getDocOrSection();
+    
+            // Scan document:
+            for (Object docOrSection : amqp.getDocOrSection()) {
+                if (docOrSection instanceof Section) {
+                    Section section = (Section) docOrSection;
+                    System.out.println("Scanning: " + section.getName());
+                    for (Object docOrDefinitionOrType : section.getDocOrDefinitionOrType()) {
+                        if (docOrDefinitionOrType instanceof Type) {
+                            generateClassFromType(amqp.getName(), (Type) docOrDefinitionOrType);
+                        }
+                    }
+                }
+            }
+        }
+
+        // Generate Types:
+        for (AmqpClass amqpClass : TypeRegistry.getGeneratedTypes()) {
+            amqpClass.generate(this);
+        }
+
+    }
+
+    private void generateClassFromType(String source, Type type) throws Exception {
+        AmqpClass amqpClass = new AmqpClass();
+        amqpClass.parseFromType(this, source, type);
+        TypeRegistry.addType(amqpClass);
+        System.out.println("Found: " + amqpClass);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/JAXBGen.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/JAXBGen.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/JAXBGen.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/JAXBGen.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,10 @@
+package org.apache.activemq.amqp.generator;
+
+public class JAXBGen {
+
+	public static final void main(String [] args)			
+	{
+		//TODO perhaps add make this a util for generating jaxb.schema?
+	    //xjc -dtd amqp.dtd -verbose -d generated -p org.apache.activemq.amqp.generator.jaxb.schema -target 2.0
+	}
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Main.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Main.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Main.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Main.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,21 @@
+package org.apache.activemq.amqp.generator;
+
+import javax.xml.bind.JAXBException;
+
+public class Main {
+
+    public static final void main(String[] args) {
+        Generator gen = new Generator();
+        gen.setInputFiles("C:/dev/fuse/amq6.0/activemq-amqp-generator/specification/1.0-PR2/transport.xml", "C:/dev/fuse/amq6.0/activemq-amqp-generator/specification/1.0-PR2/messaging.xml",
+                "C:/dev/fuse/amq6.0/activemq-amqp-generator/specification/1.0-PR2/types.xml", "C:/dev/fuse/amq6.0/activemq-amqp-generator/specification/1.0-PR2/security.xml");
+        gen.setPackagePrefix("org.apache.activemq.amqp.v1pr2");
+        gen.setOutputDirectory("C:/dev/fuse/amq6.0/activemq-amqp-generator/src/main/java");
+        try {
+            gen.generate();
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Marshalable.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Marshalable.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Marshalable.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Marshalable.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,9 @@
+package org.apache.activemq.amqp.generator;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface Marshalable {
+
+	public void marshal(OutputStream stream) throws IOException;
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/TypeRegistry.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/TypeRegistry.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/TypeRegistry.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/TypeRegistry.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,122 @@
+package org.apache.activemq.amqp.generator;
+
+import java.util.Collection;
+import java.util.HashMap;
+
+public class TypeRegistry {
+
+    private static final HashMap<String, JavaTypeMapping> JAVA_TYPE_MAP = new HashMap<String, JavaTypeMapping>();
+    private static final HashMap<String, AmqpClass> GENERATED_TYPE_MAP = new HashMap<String, AmqpClass>();
+
+    static {
+        JAVA_TYPE_MAP.put("boolean", new JavaTypeMapping("boolean", "boolean", "java.lang"));
+        JAVA_TYPE_MAP.put("ubyte", new JavaTypeMapping("ubyte", "short", "java.lang"));
+        JAVA_TYPE_MAP.put("ushort", new JavaTypeMapping("ushort", "int", "java.lang"));
+        JAVA_TYPE_MAP.put("uint", new JavaTypeMapping("uint", "long", "java.lang"));
+        JAVA_TYPE_MAP.put("ulong", new JavaTypeMapping("ulong", "BigInteger", "java.math"));
+        JAVA_TYPE_MAP.put("byte", new JavaTypeMapping("byte", "byte", "java.lang"));
+        JAVA_TYPE_MAP.put("short", new JavaTypeMapping("short", "short", "java.lang"));
+        JAVA_TYPE_MAP.put("int", new JavaTypeMapping("int", "int", "java.lang"));
+        JAVA_TYPE_MAP.put("long", new JavaTypeMapping("long", "long", "java.lang"));
+        JAVA_TYPE_MAP.put("float", new JavaTypeMapping("float", "float", "java.lang"));
+        JAVA_TYPE_MAP.put("double", new JavaTypeMapping("double", "double", "java.lang"));
+        JAVA_TYPE_MAP.put("char", new JavaTypeMapping("char", "char", "java.lang"));
+        JAVA_TYPE_MAP.put("timestamp", new JavaTypeMapping("timestamp", "Date", "java.util"));
+        JAVA_TYPE_MAP.put("uuid", new JavaTypeMapping("uuid", "UUID", "java.util"));
+        JAVA_TYPE_MAP.put("byte", new JavaTypeMapping("byte", "byte", "java.lang"));
+        JAVA_TYPE_MAP.put("binary", new JavaTypeMapping("binary", "byte []", "java.lang"));
+        JAVA_TYPE_MAP.put("string", new JavaTypeMapping("string", "String", "java.lang"));
+        JAVA_TYPE_MAP.put("symbol", new JavaTypeMapping("symbol", "String", "java.lang"));
+        JAVA_TYPE_MAP.put("list", new JavaTypeMapping("list", "List", "java.util"));
+        JAVA_TYPE_MAP.put("map", new JavaTypeMapping("map", "HashMap", "java.util"));
+
+    }
+
+    static final void init(Generator generator) {
+        // Add in the wildcard type:
+        GENERATED_TYPE_MAP.put("*", new AnyClass("*", "AmqpAny", generator.getPackagePrefix() + ".types"));
+        JAVA_TYPE_MAP.put("*", new JavaTypeMapping("*", "byte []", "java.lang"));
+    }
+
+    public static String getJavaType(AmqpField field) throws UnknownTypeException {
+        return getJavaType(field.getType());
+    }
+
+    public static String getJavaType(String type) throws UnknownTypeException {
+        AmqpClass amqpClass = GENERATED_TYPE_MAP.get(type);
+        if (amqpClass == null) {
+            throw new UnknownTypeException("Type " + type + " not found");
+        }
+
+        // Replace with restricted type:
+        if (amqpClass.isRestricted()) {
+            return getJavaType(amqpClass.getRestrictedType());
+        }
+
+        if (amqpClass.isPrimitive()) {
+            JavaTypeMapping mapping = JAVA_TYPE_MAP.get(amqpClass.getName());
+            if (mapping == null) {
+                throw new UnknownTypeException("Primitive Type " + type + " not found");
+            }
+            return mapping.javaType;
+        }
+
+        return amqpClass.getJavaType();
+    }
+
+    public static String getJavaPackage(AmqpField field) throws UnknownTypeException {
+        return getJavaPackage(field.getType());
+    }
+
+    public static String getJavaPackage(String type) throws UnknownTypeException {
+        AmqpClass amqpClass = GENERATED_TYPE_MAP.get(type);
+        if (amqpClass == null) {
+            throw new UnknownTypeException("Type " + type + " not found");
+        }
+
+        // Replace with restricted type:
+        if (amqpClass.isRestricted()) {
+            return getJavaPackage(amqpClass.getRestrictedType());
+        }
+
+        if (amqpClass.isPrimitive()) {
+            JavaTypeMapping mapping = JAVA_TYPE_MAP.get(amqpClass.getName());
+            if (mapping == null) {
+                throw new UnknownTypeException("Primitive Type " + type + " not found");
+            }
+            return mapping.javaPackage;
+        }
+        return amqpClass.getJavaPackage();
+    }
+
+    public static Collection<AmqpClass> getGeneratedTypes() {
+        return GENERATED_TYPE_MAP.values();
+    }
+
+    public static void addType(AmqpClass amqpClass) {
+        GENERATED_TYPE_MAP.put(amqpClass.getName(), amqpClass);
+    }
+
+    public static class JavaTypeMapping {
+
+        String name;
+        String javaType;
+        String javaPackage;
+
+        JavaTypeMapping(String name, String javaType, String javaPackage) {
+            this.name = name;
+            this.javaType = javaType;
+            this.javaPackage = javaPackage;
+        }
+    }
+
+    public static class AnyClass extends AmqpClass {
+
+        AnyClass(String name, String javaType, String javaPackage) {
+            super.name = name;
+            super.javaType = javaType;
+            super.setPrimitive(true);
+            super.javaPackage = javaPackage;
+        }
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/UnknownTypeException.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/UnknownTypeException.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/UnknownTypeException.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/UnknownTypeException.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,8 @@
+package org.apache.activemq.amqp.generator;
+
+public class UnknownTypeException extends Exception {
+
+    public UnknownTypeException(String message) {
+        super(message);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Utils.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Utils.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Utils.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/Utils.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,57 @@
+package org.apache.activemq.amqp.generator;
+
+import java.util.StringTokenizer;
+
+public class Utils {
+
+    public static final String JAVA_TAB = "    ";
+    public static final String NL = "\n";
+
+    public static final String toJavaName(String name) {
+        StringTokenizer tok = new StringTokenizer(name, "-");
+        String javaName = "";
+        int i = 0;
+        while (tok.hasMoreElements()) {
+            String token = tok.nextToken();
+            if (i > 0) {
+                javaName += token.substring(0, 1).toUpperCase();
+                javaName += token.substring(1);
+            } else {
+                javaName += token;
+            }
+            i++;
+        }
+        return javaName;
+    }
+    
+    public static final String toJavaConstant(String name) {
+        StringTokenizer tok = new StringTokenizer(name, "-");
+        String javaName = "";
+        int i = 0;
+        while (tok.hasMoreElements()) {
+            String token = tok.nextToken().toUpperCase();
+            if (i > 0) {
+                javaName += "_";
+            }
+            javaName += token;
+            i++;
+        }
+        return javaName;
+    }
+
+    public static final String capFirst(String toCap) {
+        String ret = "";
+        ret += toCap.substring(0, 1).toUpperCase();
+        ret += toCap.substring(1);
+        return ret;
+    }
+
+    public static final String tab(int num) {
+        String ret = "";
+        for (int i = 0; i < num; i++) {
+            ret += JAVA_TAB;
+        }
+        return ret;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Amqp.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Amqp.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Amqp.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Amqp.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,151 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.01.08 at 12:32:38 PM PST 
+//
+
+
+package org.apache.activemq.amqp.generator.jaxb.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "docOrSection"
+})
+@XmlRootElement(name = "amqp")
+public class Amqp {
+
+    @XmlAttribute(name = "xmlns")
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String xmlns;
+    @XmlAttribute(name = "name", required = true)
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String name;
+    @XmlAttribute(name = "label")
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String label;
+    @XmlElements({
+        @XmlElement(name = "doc", type = Doc.class),
+        @XmlElement(name = "section", type = Section.class)
+    })
+    protected List<Object> docOrSection;
+
+    /**
+     * Gets the value of the xmlns property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getXmlns() {
+        return xmlns;
+    }
+
+    /**
+     * Sets the value of the xmlns property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setXmlns(String value) {
+        this.xmlns = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the label property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Sets the value of the label property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLabel(String value) {
+        this.label = value;
+    }
+
+    /**
+     * Gets the value of the docOrSection property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the docOrSection property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDocOrSection().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Doc }
+     * {@link Section }
+     * 
+     * 
+     */
+    public List<Object> getDocOrSection() {
+        if (docOrSection == null) {
+            docOrSection = new ArrayList<Object>();
+        }
+        return this.docOrSection;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/B.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/B.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/B.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/B.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,55 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.01.08 at 12:32:38 PM PST 
+//
+
+
+package org.apache.activemq.amqp.generator.jaxb.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "value"
+})
+@XmlRootElement(name = "b")
+public class B {
+
+    @XmlValue
+    protected String value;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getvalue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setvalue(String value) {
+        this.value = value;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Choice.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Choice.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Choice.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Choice.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,117 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.01.08 at 12:32:38 PM PST 
+//
+
+
+package org.apache.activemq.amqp.generator.jaxb.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "doc"
+})
+@XmlRootElement(name = "choice")
+public class Choice {
+
+    @XmlAttribute(name = "name", required = true)
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String name;
+    @XmlAttribute(name = "value", required = true)
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    protected String value;
+    protected List<Doc> doc;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the doc property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the doc property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDoc().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Doc }
+     * 
+     * 
+     */
+    public List<Doc> getDoc() {
+        if (doc == null) {
+            doc = new ArrayList<Doc>();
+        }
+        return this.doc;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Dd.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Dd.java?rev=898181&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Dd.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp-generator/src/main/java/org/apache/activemq/amqp/generator/jaxb/schema/Dd.java Tue Jan 12 04:23:30 2010
@@ -0,0 +1,60 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2010.01.08 at 12:32:38 PM PST 
+//
+
+
+package org.apache.activemq.amqp.generator.jaxb.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "p"
+})
+@XmlRootElement(name = "dd")
+public class Dd {
+
+    protected List<P> p;
+
+    /**
+     * Gets the value of the p property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the p property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getP().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link P }
+     * 
+     * 
+     */
+    public List<P> getP() {
+        if (p == null) {
+            p = new ArrayList<P>();
+        }
+        return this.p;
+    }
+
+}



Mime
View raw message