Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by KelvinGoodson:
http://wiki.apache.org/ws/Tuscany/SDOJavaOverview

The comment on the change is:
included diagrams and corrected generator naming etc

------------------------------------------------------------------------------
  
  === sdo.tools ===
  
- This project will contain (command line) tools, such as SDO model importers 
and generators (Java code, XML schema, etc.). Currently however, there is only 
a si== ngle tool, a Java code generator implemented in class 
org.apache.tuscany.sdo.generate.JavaGenerator. This generator can be used to 
generate static SDO data objects and is described in more detail in section 4.
+ This project will contain (command line) tools, such as SDO model importers 
and generators (Java code, XML schema, etc.). Currently however, there is only 
a single tool, a Java code generator implemented in class 
org.apache.tuscany.sdo.generate.XSD2JavaGenerator. This generator can be used 
to generate static SDO data objects and is described in more detail in section 
4.
  
  The sdo.tools project also contains a test program and sample generated model 
located in src/test/java and src/test/resources respectively (see section 5 for 
more details).
  
@@ -176, +176 @@

  
  SDO provides several DataObject implementation classes as shown in the 
following diagram:
  
- <TBD -- add diagram -- this link seems to say how to do it -- 
http://wiki.apache.org/ws/HelpOnLinking >
+ attachment:do_uml.png
  
   Class DataObjectImpl is the most important. It provides a complete base 
implementation of the SDO DataObject interface. It extends from the EMF base 
class BasicEObjectImpl, which provides the “scaffolding” needed to easily 
implement an EObject, but without allocating any storage itself.
  
@@ -199, +199 @@

  
  With this approach, a data object’s Type, returned from 
DataObjectImpl.getType(), and its EClass, returned by DataObjectImpl.eClass(), 
are the same underlying meta object. This allows the SDO implementation to 
leverage any appropriate base functionality without any performance overhead. 
The arrangement is shown in the following diagram:
  
- TBD - add diagram
+ attachment:meta.png
  
  The implementation of the SDO Property interface follows a similar pattern. 
Two implementation classes, subclasses of corresponding Ecore classes, mix in 
the Property interface:
  
@@ -210, +210 @@

  
  The following diagram illustrates the design:
  
- TBD add diagram
+ attachment:meta2.png
  
  As shown, the getProperties() method in ClassImpl (i.e., of the SDO Type 
interface) returns a set of properties whose implementation classes also 
implement EAttribute or EReference, and since ClassImpl, extends EClassImpl (as 
shown in the previous diagram), these are in fact the same objects as those 
returned by the EClass.getEAllStructuralFeatures() method. The two metamodels 
are one and the same, making the implementation of many of the SDO APIs trivial 
calls to the base class. 
  
@@ -220, +220 @@

  
  = Static Code Generator =
  
- The SDO static code generator is a command line tool for generating Java 
source code (static SDOs) for DataObjects defined in an XML Schema. It is 
implemented by the class org.apache.tuscany.sdo.generate.JavaGenerator in the 
sdo.tools project. The generator is used as follows:
+ The SDO static code generator is a command line tool for generating Java 
source code (static SDOs) for DataObjects defined in an XML Schema. It is 
implemented by the class org.apache.tuscany.sdo.generate.XSD2JavaGenerator in 
the sdo.tools project. The generator is used as follows:
  
  Usage arguments:
  {{{
@@ -233, +233 @@

  }}}   
  For example:
  
- java JavaGenerator somedir/somefile.xsd
+ java XSD2JavaGenerator somedir/somefile.xsd
          
  Options:
       
@@ -330, +330 @@

  
  The following is in the sdo.tools project:
  
-  * SimpleStaticTestCase – This test performs the same function as 
SimpleDynamicTestCase, above, only using a generated version of the simple.xsd 
model. The generated model has been pre-generated (with default options) in the 
directory src/test/resources, but it can be regenerated using the 
JavaGenerator, possibly with different generator options (e.g., -noInterfaces 
or –sparsePattern), if desired.
+  * SimpleStaticTestCase – This test performs the same function as 
SimpleDynamicTestCase, above, only using a generated version of the simple.xsd 
model. The generated model has been pre-generated (with default options) in the 
directory src/test/resources, but it can be regenerated using the 
XSD2JavaGenerator, possibly with different generator options (e.g., 
-noInterfaces or –sparsePattern), if desired.
  

Reply via email to