org.apache.tuscany.samples.sdo.specCodeSnippets
Class ObtainingDataGraphFromXml

java.lang.Object
  extended by org.apache.tuscany.samples.sdo.specCodeSnippets.ObtainingDataGraphFromXml

public class ObtainingDataGraphFromXml
extends java.lang.Object

Demonstrates a variety of methods available to obtain the root DataObject contained within an xml representation of a DataGraph. This is currently a grey area of the specification and this samples demonstrates spec compliant means, as well as utility methods that have been added to Tuscany to address issues within the specification. The following sample is from the Apache Tuscany project. It was written to help users understand and experiment with SDO. It is based upon example code contained within, and is meant for use with, and reference to the SDO Specification. This sample attempts to clarify aspects of the the AccessDataObjectsUsingXPath example from the Examples section of the SDO specification.

To define the correct Types for each DataObject ( CompanyType, DepartmentType etc ) this sample relies upon SdoSampleConstants.COMPANY_XSD which is provided in the resources directory of these samples. The xml file SdoSampleConstants.COMPANY_DATAGRAPH_XML is used to load the DataGraph and is also located in this resources directory.

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:

See Also:
AccessDataObjectsUsingXPath

Constructor Summary
ObtainingDataGraphFromXml()
           
 
Method Summary
static void main(java.lang.String[] args)
          Execute this method in order to run the sample.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObtainingDataGraphFromXml

public ObtainingDataGraphFromXml()
Method Detail

main

public static void main(java.lang.String[] args)
Execute this method in order to run the sample.

Parameters:
args -


Copyright © 2007 Apache Software Foundation. All Rights Reserved.