[jboss-cvs] JBossAS SVN: r97669 - projects/docs/enterprise/5.0/RESTEasy/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 10 01:11:32 EST 2009


Author: laubai
Date: 2009-12-10 01:11:32 -0500 (Thu, 10 Dec 2009)
New Revision: 97669

Modified:
   projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml
Log:
Added changes for JBPAPP-2963.

Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml	2009-12-10 05:41:45 UTC (rev 97668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml	2009-12-10 06:11:32 UTC (rev 97669)
@@ -277,58 +277,51 @@
       <para>
 	For example, consider this JAXB class:
       </para>
- <programlisting>
- @XmlRootElement(name = "book")
- public class Book
- {
-private String author;
-private String ISBN;
-private String title;
+ <programlisting>@XmlRootElement(name = "book")
+public class Book {
 
-public Book()
-{
-}
+   private String author;
+   private String ISBN;
+   private String title;
 
-public Book(String author, String ISBN, String title)
-{
-   this.author = author;
-   this.ISBN = ISBN;
-   this.title = title;
-}
+   public Book() {
+   }
 
- at XmlElement
-public String getAuthor()
-{
-   return author;
-}
+   public Book(String author, String ISBN, String title) {
+      this.author = author;
+      this.ISBN = ISBN;
+      this.title = title;
+   }
 
-public void setAuthor(String author)
-{
-   this.author = author;
-}
+   @XmlElement
+   public String getAuthor() {
+      return author;
+   }
 
- at XmlElement
-public String getISBN()
-{
-   return ISBN;
-}
+   public void setAuthor(String author) {
+      this.author = author;
+   }
 
-public void setISBN(String ISBN)
-{
-   this.ISBN = ISBN;
-}
+   @XmlElement
+   public String getISBN() {
+      return ISBN;
+   }
 
- at XmlAttribute
-public String getTitle()
-{
-   return title;
-}
+   public void setISBN(String ISBN) {
+      this.ISBN = ISBN;
+   }
 
-public void setTitle(String title)
-{
-   this.title = title;
+   @XmlAttribute
+   public String getTitle() {
+      return title;
+   }
+
+   public void setTitle(String title) {
+      this.title = title;
+   }
 }
- }
+
+
          </programlisting>
       <para>
          The JAXB <literal>Book</literal> class would be marshalled to JSON using the BadgerFish Convention:




More information about the jboss-cvs-commits mailing list