rdonkin     2002/10/28 13:13:34

  Modified:    betwixt  project.properties project.xml
               betwixt/src/test/org/apache/commons/betwixt/dotbetwixt
                        TestBeanToXml.java
               betwixt/xdocs overview.xml
  Log:
  Updated by email address and changed examples in overview document so that they are 
correctly rendered by maven.
  
  Revision  Changes    Path
  1.4       +1 -0      jakarta-commons/betwixt/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/project.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.properties        27 Oct 2002 01:28:18 -0000      1.3
  +++ project.properties        28 Oct 2002 21:13:34 -0000      1.4
  @@ -15,3 +15,4 @@
   # documentation properties
   maven.xdoc.date=left
   maven.xdoc.version=${pom.currentVersion}
  +maven.junit.fork=true
  
  
  
  1.16      +1 -1      jakarta-commons/betwixt/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/project.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- project.xml       27 Oct 2002 01:34:00 -0000      1.15
  +++ project.xml       28 Oct 2002 21:13:34 -0000      1.16
  @@ -28,7 +28,7 @@
       <developer>
         <name>Robert Burrell Donkin</name>
         <id>rdonkin</id>
  -      <email>[EMAIL PROTECTED]</email>
  +      <email>[EMAIL PROTECTED]</email>
         <organization></organization>
       </developer>
       <developer>
  
  
  
  1.2       +4 -6      
jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/dotbetwixt/TestBeanToXml.java
  
  Index: TestBeanToXml.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/dotbetwixt/TestBeanToXml.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestBeanToXml.java        7 Aug 2002 16:37:47 -0000       1.1
  +++ TestBeanToXml.java        28 Oct 2002 21:13:34 -0000      1.2
  @@ -97,12 +97,10 @@
   //---------------------------------- Tests
       
       public void testOne() throws Exception {
  -        /* 
           // THIS TEST FAILS IN MAVEN
           xmlAssertIsomorphicContent(  
               
parseFile("src/test/org/apache/commons/betwixt/dotbetwixt/rbean-result.xml"), 
               
parseFile("src/test/org/apache/commons/betwixt/dotbetwixt/rbean-result.xml"));
  -        */
       }
       
       
  
  
  
  1.3       +50 -50    jakarta-commons/betwixt/xdocs/overview.xml
  
  Index: overview.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/xdocs/overview.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- overview.xml      7 Aug 2002 21:29:21 -0000       1.2
  +++ overview.xml      28 Oct 2002 21:13:34 -0000      1.3
  @@ -12,7 +12,7 @@
   <section name="Getting Started">
   
   <p>Probably the best way to get started is to look at some examples. The best 
  -example to start with is the Ant target &quot;demo.rss&quot; which runs the 
RSSBeanWriter 
  +example to start with is the Ant target &amp;quot;demo.rss&amp;quot; which runs the 
RSSBeanWriter 
   sample program in the src/test directory. Once you've got the Jakarta Commons 
   build system working, by installing Ant and creating your own build.properties 
   to point to the required JARs type the following at a command line</p>
  @@ -52,11 +52,11 @@
   
   <p>This example uses attributes for primitive types.</p>
   
  -<pre>&lt;CustomerBean name=&quot;James&quot;&gt;
  -    &lt;order id=&quot;1&quot;&gt;...&lt;/order&gt;
  -    &lt;order id=&quot;2&quot;&gt;...&lt;/order&gt;
  -    &lt;emailAddress&gt;[EMAIL PROTECTED]&lt;/emailAddress&gt;
  -&lt;/CustomerBean&gt;</pre>
  +<pre>&amp;lt;CustomerBean name=&amp;quot;James&amp;quot;&amp;gt;
  +    &amp;lt;order id=&amp;quot;1&amp;quot;&amp;gt;...&amp;lt;/order&amp;gt;
  +    &amp;lt;order id=&amp;quot;2&amp;quot;&amp;gt;...&amp;lt;/order&amp;gt;
  +    &amp;lt;emailAddress&amp;gt;[EMAIL PROTECTED]&amp;lt;/emailAddress&amp;gt;
  +&amp;lt;/CustomerBean&amp;gt;</pre>
   </section>
   
   
  @@ -66,16 +66,16 @@
   extra element (which can be quite common in XML schemas). Also note that some 
   element names have been changed.</p>
   
  -<pre>&lt;customer&gt;
  -    &lt;name&gt;James&lt;/name&gt;
  -    &lt;orders&gt;
  -        &lt;order id=&quot;1&quot;&gt;...&lt;/order&gt;
  -        &lt;order id=&quot;2&quot;&gt;...&lt;/order&gt;
  -    &lt;/orders&gt;
  -    &lt;email-addresses&gt;
  -        &lt;email-address&gt;[EMAIL PROTECTED]&lt;/email-address&gt;
  -    &lt;/email-addresses&gt;
  -&lt;/customer&gt;    </pre>
  +<pre>&amp;lt;customer&amp;gt;
  +    &amp;lt;name&amp;gt;James&amp;lt;/name&amp;gt;
  +    &amp;lt;orders&amp;gt;
  +        &amp;lt;order id=&amp;quot;1&amp;quot;&amp;gt;...&amp;lt;/order&amp;gt;
  +        &amp;lt;order id=&amp;quot;2&amp;quot;&amp;gt;...&amp;lt;/order&amp;gt;
  +    &amp;lt;/orders&amp;gt;
  +    &amp;lt;email-addresses&amp;gt;
  +        
&amp;lt;email-address&amp;gt;[EMAIL PROTECTED]&amp;lt;/email-address&amp;gt;
  +    &amp;lt;/email-addresses&amp;gt;
  +&amp;lt;/customer&amp;gt;    </pre>
   
   <p>Betwixt aims to provide a diversity of possible mappings such that the 
   developer can choose, if they wish, how their beans appear as XML to support 
  @@ -97,57 +97,57 @@
   then the default introspection rules are used.</p>
   <p>The simplest possible file may just set the name of the element. e.g.</p>
   
  -<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  -&lt;info&gt;
  -  &lt;element name=&quot;channel&quot;/&gt;
  -  &lt;addDefaults/&gt;
  -&lt;/info&gt;</pre>
  +<pre>&amp;lt;?xml version=&amp;quot;1.0&amp;quot; 
encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;
  +&amp;lt;info&amp;gt;
  +  &amp;lt;element name=&amp;quot;channel&amp;quot;/&amp;gt;
  +  &amp;lt;addDefaults/&amp;gt;
  +&amp;lt;/info&amp;gt;</pre>
   
   <p>The above means to use the name 'channel' for the outer most element for the 
  -given type. The &lt;addDefaults&gt; means to add the defaults from the 
introspector. 
  +given type. The &amp;lt;addDefaults&amp;gt; means to add the defaults from the 
introspector. 
   This allows you to just rename a few properties then let the introspector do the 
  -rest. There is also a &lt;hide&gt; element which allows one or more properties to 
be 
  -hidden. Also note that the &lt;element&gt; and &lt;attribute&gt; tags can be 
  +rest. There is also a &amp;lt;hide&amp;gt; element which allows one or more 
properties to be 
  +hidden. Also note that the &amp;lt;element&amp;gt; and &amp;lt;attribute&amp;gt; 
tags can be 
   nested to any 
   kind of depth allowing whatever XML structure you wish. This can be useful if 
   you wish to wrap collections in some arbitrary collection tags or to group 
   properties of a bean together in some XML structure. e.g.</p>
   
  -<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  -&lt;info primitiveTypes=&quot;attribute&quot;&gt;
  -  &lt;element name=&quot;channel&quot;/&gt;
  -    &lt;element name=&quot;customerList&quot;&gt;
  -      &lt;element name=&quot;customer&quot; property=&quot;customers&quot;/&gt;
  -    &lt;/element&gt;
  -    &lt;element name=&quot;foo&quot;&gt;
  -      &lt;attribute name=&quot;qqq&quot; property=&quot;ppp&quot;/&gt;
  -      &lt;element name=&quot;bar&quot; property=&quot;xyz&quot;/&gt;
  -    &lt;hide property=&quot;something&quot;/&gt;
  -    &lt;addDefaults/&gt;
  -  &lt;/element&gt;
  -&lt;/info&gt;
  +<pre>&amp;lt;?xml version=&amp;quot;1.0&amp;quot; 
encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;
  +&amp;lt;info primitiveTypes=&amp;quot;attribute&amp;quot;&amp;gt;
  +  &amp;lt;element name=&amp;quot;channel&amp;quot;/&amp;gt;
  +    &amp;lt;element name=&amp;quot;customerList&amp;quot;&amp;gt;
  +      &amp;lt;element name=&amp;quot;customer&amp;quot; 
property=&amp;quot;customers&amp;quot;/&amp;gt;
  +    &amp;lt;/element&amp;gt;
  +    &amp;lt;element name=&amp;quot;foo&amp;quot;&amp;gt;
  +      &amp;lt;attribute name=&amp;quot;qqq&amp;quot; 
property=&amp;quot;ppp&amp;quot;/&amp;gt;
  +      &amp;lt;element name=&amp;quot;bar&amp;quot; 
property=&amp;quot;xyz&amp;quot;/&amp;gt;
  +    &amp;lt;hide property=&amp;quot;something&amp;quot;/&amp;gt;
  +    &amp;lt;addDefaults/&amp;gt;
  +  &amp;lt;/element&amp;gt;
  +&amp;lt;/info&amp;gt;
   </pre>
   
   <p>Note that the <code>.betwixt</code> file specifies the mapping for a single bean.
   So, whilst you can add extra elements (as above), it can't be used to specify 
   to names for child beans through nesting <code>element</code> elements.</p>
   
  -<p>The primitiveTypes attribute in the &lt;info&gt; element is optional and can be 
  +<p>The primitiveTypes attribute in the &amp;lt;info&amp;gt; element is optional and 
can be 
   used to specify whether primitive java types (strings, numbers, dates etc) are 
   specified as attributes or elements by default.</p>
   <p>Finally static text can be specified using a value attribute inside an 
  -&lt;element&gt; or &lt;attribute&gt; tag. e.g. to add constant attributes such 
  +&amp;lt;element&amp;gt; or &amp;lt;attribute&amp;gt; tag. e.g. to add constant 
attributes such 
   as a version label to the 
   generated XML...</p>
   
  -<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  -&lt;info primitiveTypes=&quot;element&quot;&gt;
  -  &lt;element name=&quot;rss&quot;/&gt;
  -    &lt;attribute name=&quot;version&quot; value=&quot;0.91&quot;/&gt;
  -    &lt;element name=&quot;channel&quot;/&gt;
  -    &lt;addDefaults/&gt;
  -  &lt;/element&gt;
  -&lt;/info&gt;
  +<pre>&amp;lt;?xml version=&amp;quot;1.0&amp;quot; 
encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;
  +&amp;lt;info primitiveTypes=&amp;quot;element&amp;quot;&amp;gt;
  +  &amp;lt;element name=&amp;quot;rss&amp;quot;/&amp;gt;
  +    &amp;lt;attribute name=&amp;quot;version&amp;quot; 
value=&amp;quot;0.91&amp;quot;/&amp;gt;
  +    &amp;lt;element name=&amp;quot;channel&amp;quot;/&amp;gt;
  +    &amp;lt;addDefaults/&amp;gt;
  +  &amp;lt;/element&amp;gt;
  +&amp;lt;/info&amp;gt;
   </pre>
   </section>
   
  @@ -155,7 +155,7 @@
   
   <p>The Java Beans specification contains various naming conventions that should 
   be used when writing beans that will allow the beans introspector to 
  -automatically guess the properties in a bean and their getters &amp; setter methods 
  +automatically guess the properties in a bean and their getters &amp;amp; setter 
methods 
   etc. Betwixt will use these same naming conventions to deduce how to make the 
   beans appear as XML. There are some other naming conventions that you can use to 
   make your beans easier to output as XML or parse.</p>
  @@ -169,8 +169,8 @@
   properties'.</p>
   
   <pre>public class SomeBean {
  -    public &lt;CollectionType&gt; getFoo*();
  -    public void addFoo(&lt;SingularType&gt; foo);
  +    public &amp;lt;CollectionType&amp;gt; getFoo*();
  +    public void addFoo(&amp;lt;SingularType&amp;gt; foo);
   }</pre>
   
   <p>Where CollectionType can be an array, a Collection, Enumeration, Iterator, 
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to