org.apache.tuscany.samples.sdo.otherSources
Class CreateCompany
java.lang.Object
org.apache.tuscany.samples.sdo.otherSources.CreateCompany
public class CreateCompany
- extends java.lang.Object
Demonstrates creating a DataObject using the Types defined in a previously generated XML Schema (SdoSampleConstants.COMPANY_XSD
) then persisting to an XML file
This example is useful as a reference for creating valid xml documents that conform to an existing XSD and has been used to create valid XML files for use
with specification code samples.
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:
- Include the following jar files on your classpath :
- SDO API and Tuscany Implementation
- sdo-api-{version}.jar - SDO API
- tuscany-sdo-impl-{version}.jar - Tuscany SDO implementation
- EMF dependencies.
- emf-common-{version}.jar - some common framework utility and base classes
- emf-ecore-{version}.jar - the EMF core runtime implementation classes (the Ecore metamodel)
- emf-ecore-change-{version}.jar - the EMF change recorder and framework
- emf-ecore-xmi-{version}.jar - EMF's default XML (and XMI) serializer and loader
- xsd-{version}.jar - the XML Schema model
These jar files can be obtained by downloading a binary distribution of Tuscany SDO Java
- Execute:
java org.apache.tuscany.samples.sdo.otherSources.CreateCompany
Method Summary |
static void |
main(java.lang.String[] args)
Main method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPANY_GENERATED_XML
public static final java.lang.String COMPANY_GENERATED_XML
- XML file generated for the company DataObject
- See Also:
- Constant Field Values
COMPANY_DATAGRAPH_GENERATED_XML
public static final java.lang.String COMPANY_DATAGRAPH_GENERATED_XML
- XML file generated for the company DataGraph
- See Also:
- Constant Field Values
CreateCompany
public CreateCompany()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Main method. Execute this method in order to run sample
- Parameters:
args
-
- Throws:
java.lang.Exception
Copyright © 2007 Apache Software Foundation. All Rights Reserved.