org.apache.tuscany.samples.sdo.advanced
Class ObtainingDataGraphFromXml
java.lang.Object
org.apache.tuscany.samples.sdo.internal.SampleInfrastructure
org.apache.tuscany.samples.sdo.SampleBase
org.apache.tuscany.samples.sdo.advanced.ObtainingDataGraphFromXml
public class ObtainingDataGraphFromXml
- extends SampleBase
This sample program 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 sample demonstrates spec compliant methods, 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
SampleInfrastructure.COMPANY_XSD
which is
provided in the resources directory of these samples. The xml file
SampleInfrastructure.COMPANY_DATAGRAPH_XML
is
used to load the DataGraph and is also located in this resources directory.
Running this Sample
See the main overview for instructions on how to run this
sample.
Fields inherited from class org.apache.tuscany.samples.sdo.internal.SampleInfrastructure |
COMMENTARY_ALWAYS, COMMENTARY_FOR_ADVANCED, COMMENTARY_FOR_INTERMEDIATE, COMMENTARY_FOR_NOVICE, commentaryLevel, COMPANY_DATAGRAPH_XML, COMPANY_DATAOBJECT_XML, COMPANY_NAMESPACE, COMPANY_XSD, PO_NAMESPACE, PO_XML_GENERATED, PO_XML_RESOURCE, PO_XSD_RESOURCE, SAMPLE_LEVEL_ADVANCED, SAMPLE_LEVEL_BASIC, SAMPLE_LEVEL_INTERMEDIATE, sampleClasses, sampleComplexityLevel, userLevels |
Methods inherited from class org.apache.tuscany.samples.sdo.internal.SampleInfrastructure |
banner, banner, commentary, commentary, commentary, commentary, getSampleComplexityLevel, run, setSampleComplexityLevel, somethingUnexpectedHasHappened, yesOrNoFromUser |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CORE_FUNCTION
public static int[] CORE_FUNCTION
SIGNIFICANT_FUNCTION
public static int[] SIGNIFICANT_FUNCTION
ObtainingDataGraphFromXml
public ObtainingDataGraphFromXml(Integer userLevel)
main
public static void main(String[] args)
runSample
public void runSample()
- Specified by:
runSample
in class SampleInfrastructure
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.