10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

JAXB Examples<br />

506<br />

TABLE 17–13 Schema-to-<strong>Java</strong> Bindings for the Basic Examples (Continued)<br />

XML Schema JAXB Binding<br />

<br />

<br />

<br />

<br />

<br />

<br />

Schema-Derived JAXB Classes<br />

<strong>The</strong> sections that follow briefly explain the functions of the following individual classes<br />

generated by the JAXB binding compiler for the Basic examples:<br />

■ “Comment Class” on page 506<br />

■ “Items Class” on page 506<br />

■ “ObjectFactory Class” on page 507<br />

■ “PurchaseOrder Class” on page 507<br />

■ “PurchaseOrderType Class” on page 508<br />

■ “USAddress Class” on page 508<br />

Comment Class<br />

In Comment.java:<br />

■ <strong>The</strong> Comment class is part of the primer.po package.<br />

■ Comment is a public interface that extends javax.xml.bind.Element.<br />

■ Content in instantiations of this class binds to the XML schema element named comment.<br />

■ <strong>The</strong> getValue() and setValue() methods are used to get and set strings representing XML<br />

comment elements in the <strong>Java</strong> content tree.<br />

Items Class<br />

In Items.java:<br />

■ <strong>The</strong> Items class is part of the primer.po package.<br />

■ <strong>The</strong> class provides public interfaces for Items and ItemType.<br />

■ Content in instantiations of this class binds to the XML ComplexTypes Items and its child<br />

element ItemType.<br />

■ Item provides the getItem() method.<br />

■ ItemType provides methods for:<br />

■ getPartNum();<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!