Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Note:</strong> I'm the <a href="http://www.eclipse.org/eclipselink/moxy.php" rel="nofollow"><strong>EclipseLink JAXB (MOXy)</strong></a> lead and a member of the <a href="http://jcp.org/en/jsr/detail?id=222" rel="nofollow"><strong>JAXB (JSR-222)</strong></a> expert group.</p> <p>In EclipseLink 2.5 (get it here: <a href="http://www.eclipse.org/eclipselink/downloads/milestones.php" rel="nofollow">http://www.eclipse.org/eclipselink/downloads/milestones.php</a>) we added a new feature to MOXy JAXB called Object Graphs. Object Graphs allow to programatically or through metadata select a subset of properties that you want to marshal/unmarshal. Below is an example of creating an object graph to get a subset of data from a <code>Customer</code>, <code>Address</code>, and <code>PhoneNumber</code> model.</p> <pre><code> // Create the Object Graph ObjectGraph contactInfo = JAXBHelper.getJAXBContext(jc).createObjectGraph(Customer.class); contactInfo.addAttributeNodes("name"); Subgraph location = contactInfo.addSubgraph("billingAddress"); location.addAttributeNodes("city", "province"); Subgraph simple = contactInfo.addSubgraph("phoneNumbers"); simple.addAttributeNodes("value"); // Output XML - Based on Object Graph marshaller.setProperty(MarshallerProperties.OBJECT_GRAPH, contactInfo); marshaller.marshal(customer, System.out); </code></pre> <p><strong>For More Information</strong></p> <ul> <li><a href="http://wiki.eclipse.org/EclipseLink/Examples/MOXy/ObjectGraphs/Programmatic" rel="nofollow">http://wiki.eclipse.org/EclipseLink/Examples/MOXy/ObjectGraphs/Programmatic</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload