org.apache.tuscany.samples.sdo.specExampleSection
Class CreatingDataObjectTreesFromXMLDocuments

java.lang.Object
  extended by org.apache.tuscany.samples.sdo.specExampleSection.CreatingDataObjectTreesFromXMLDocuments

public class CreatingDataObjectTreesFromXMLDocuments
extends java.lang.Object

Demonstrates creating a DataObject from an XML String.
The following sample is from the Apache Tuscany project. It was written to help users understand and experiement with SDO. It is based upon example code contained within, and is meant for use with, and reference to the SDO Specification. In general this sample attempts to use the code and comments contained within the specification, exceptions to this are noted in comments.

Specifically this sample is based upon the 'Creating DataObject Trees from XML documents' example from the Examples section of the SDO Specification. It is possible to convert to and from XML documents to build DataObject trees, which is useful when assembling DataObjects from serval data sources. This sample uses the XMLHelper to convert xml Strings to DataObjects.

Uses previously defined model SdoSampleConstants.PO_XSD_RESOURCE to define types then generates a purchase order DataObject and persists to SdoSampleConstants.PO_XML_GENERATED

Usage:
This sample can easily be run from within Eclipse as a Java Application if tuscany or the sample-sdo project is imported into Eclipse as an existing project.

If executing as a standalone application please do the following:

Author:
Robbie Minshall
See Also:
org.apache.tuscany.samples.sdo.otherSources.CreatePurchaseOrder}

Constructor Summary
CreatingDataObjectTreesFromXMLDocuments()
           
 
Method Summary
static void main(java.lang.String[] args)
          Drives sample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreatingDataObjectTreesFromXMLDocuments

public CreatingDataObjectTreesFromXMLDocuments()
Method Detail

main

public static void main(java.lang.String[] args)
Drives sample

Parameters:
args. - none required.


Copyright © 2007 Apache Software Foundation. All Rights Reserved.