tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelvingood...@apache.org
Subject svn commit: r553191 - in /incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo: ./ advanced/ basic/ intermediate/ otherSources/ specCodeSnippets/ specExampleSection/ tuscanyapi/
Date Wed, 04 Jul 2007 12:31:19 GMT
Author: kelvingoodson
Date: Wed Jul  4 05:31:15 2007
New Revision: 553191

URL: http://svn.apache.org/viewvc?view=rev&rev=553191
Log:
Sample rearrangement 

Added:
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/MedicalScenario.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/ObtainingDataGraphFromXml.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/PrintDataGraph.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectPropertiesByName.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreateCompany.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreatePurchaseOrder.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/ReadPurchaseOrder.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectUsingValidXPath.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/CreateDataObjectFromXmlString.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/DynamicCustomerTypeSample.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompanyTuscanyAPI.java
      - copied, changed from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompany.java
Removed:
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/MedicalScenario.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/PrintDataGraph.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreateCompany.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreatePurchaseOrder.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/ReadPurchaseOrder.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectPropertiesByName.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectUsingValidXPath.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/CreateDataObjectFromXmlString.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/DynamicCustomerTypeSample.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/ObtainingDataGraphFromXml.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompany.java
Modified:
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples2.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleInfrastructure.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SdoSampleConstants.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessDataObjectsUsingXPath.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingDataObjectsViaPropertyIndex.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingTheContentsOfASequence.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingDataObjectTreesFromXMLDocuments.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingXmlFromDataObjects.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/SerializingDeserializingADataObject.java
    incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/UsingTypeAndPropertyWithDataObjects.java

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java Wed Jul  4 05:31:15 2007
@@ -23,6 +23,12 @@
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 
+import org.apache.tuscany.samples.sdo.advanced.ObtainingDataGraphFromXml;
+import org.apache.tuscany.samples.sdo.basic.AccessDataObjectPropertiesByName;
+import org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder;
+import org.apache.tuscany.samples.sdo.basic.ReadPurchaseOrder;
+import org.apache.tuscany.samples.sdo.intermediate.CreateDataObjectFromXmlString;
+import org.apache.tuscany.samples.sdo.intermediate.DynamicCustomerTypeSample;
 import org.apache.tuscany.samples.sdo.otherSources.*;
 import org.apache.tuscany.samples.sdo.specCodeSnippets.*;
 import org.apache.tuscany.samples.sdo.specExampleSection.*;

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples2.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples2.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples2.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples2.java Wed Jul  4 05:31:15 2007
@@ -25,13 +25,15 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
-import org.apache.tuscany.samples.sdo.otherSources.CreatePurchaseOrder;
-import org.apache.tuscany.samples.sdo.otherSources.ReadPurchaseOrder;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectUsingValidXPath;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.CreateDataObjectFromXmlString;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.DynamicCustomerTypeSample;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.ObtainingDataGraphFromXml;
+import org.apache.tuscany.samples.sdo.advanced.MedicalScenario;
+import org.apache.tuscany.samples.sdo.advanced.ObtainingDataGraphFromXml;
+import org.apache.tuscany.samples.sdo.advanced.PrintDataGraph;
+import org.apache.tuscany.samples.sdo.basic.AccessDataObjectPropertiesByName;
+import org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder;
+import org.apache.tuscany.samples.sdo.basic.ReadPurchaseOrder;
+import org.apache.tuscany.samples.sdo.intermediate.AccessDataObjectUsingValidXPath;
+import org.apache.tuscany.samples.sdo.intermediate.CreateDataObjectFromXmlString;
+import org.apache.tuscany.samples.sdo.intermediate.DynamicCustomerTypeSample;
 
 /**
  * A Program to execute a sequence of SDO sample programs.
@@ -44,14 +46,14 @@
      * Here's the list of sample programs that we are going to execute,  in this sequence.
      */
     Class[] sampleClasses = {
-      org.apache.tuscany.samples.sdo.otherSources.CreateCompany.class,
+      org.apache.tuscany.samples.sdo.basic.CreateCompany.class,
       ReadPurchaseOrder.class,
       CreatePurchaseOrder.class,
       AccessDataObjectPropertiesByName.class,
       AccessDataObjectUsingValidXPath.class,
       DynamicCustomerTypeSample.class,
       ObtainingDataGraphFromXml.class,
-      org.apache.tuscany.samples.sdo.tuscanyapi.CreateCompany.class,
+      org.apache.tuscany.samples.sdo.tuscanyapi.CreateCompanyTuscanyAPI.class,
       CreateDataObjectFromXmlString.class,
       PrintDataGraph.class,
       MedicalScenario.class

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleInfrastructure.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleInfrastructure.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleInfrastructure.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleInfrastructure.java Wed Jul  4 05:31:15 2007
@@ -32,7 +32,7 @@
 public abstract class SampleInfrastructure {
 
 
-  protected int sampleComplexityLevel = SAMPLE_LEVEL_NOVICE.intValue();
+  protected int sampleComplexityLevel = SAMPLE_LEVEL_BASIC.intValue();
   protected int commentaryLevel = COMMENTARY_FOR_NOVICE.intValue();
   
   /*
@@ -51,11 +51,20 @@
   }
 
   private static String hrule = "********************************************";
-  protected static final Integer SAMPLE_LEVEL_NOVICE = new Integer(0);
+  
+  /*
+   * Constants which allow the sample program infrastructure to understand
+   * the complexity of a sample program.
+   */
+  protected static final Integer SAMPLE_LEVEL_BASIC = new Integer(0);
   protected static final Integer SAMPLE_LEVEL_INTERMEDIATE = new Integer(1);
   protected static final Integer SAMPLE_LEVEL_ADVANCED = new Integer(2);
   
   
+  /*
+   * Constants which can be used to reduce the amount of information output
+   * by an executing sample program.
+   */
   protected static final Integer COMMENTARY_FOR_NOVICE = new Integer(0);
   protected static final Integer COMMENTARY_FOR_INTERMEDIATE = new Integer(1);
   protected static final Integer COMMENTARY_FOR_ADVANCED = new Integer(2);
@@ -123,7 +132,7 @@
   
   /*
    * convenience method to allow commentary level to default to that of
-   * the sample's compexity
+   * the sample's complexity
    */
   protected void commentary(String text) {
     commentary(new Integer(getSampleComplexityLevel()), text);

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SdoSampleConstants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SdoSampleConstants.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SdoSampleConstants.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/SdoSampleConstants.java Wed Jul  4 05:31:15 2007
@@ -37,7 +37,7 @@
 
     /**
      * Default file name to use when generated xml file for purchase order
-     * @see org.apache.tuscany.samples.sdo.CreatePurchaseOrder
+     * @see org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder
      */
     public static final String PO_XML_GENERATED = "temporaryPoGenerated.xml";
 
@@ -63,7 +63,7 @@
     public static final String COMPANY_DATAGRAPH_XML = "companyDataGraphGenerated.xml";
         
     /**
-     * Generated DataGraph {@link org.apache.tuscany.samples.sdo.otherSources.CreateCompany}
+     * Generated DataGraph {@link org.apache.tuscany.samples.sdo.basic.CreateCompany}
      */
     public static final String COMPANY_DATAOBJECT_XML = "companyGenerated.xml";
         

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/MedicalScenario.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/MedicalScenario.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/MedicalScenario.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java Wed Jul  4 05:31:15 2007
@@ -16,12 +16,13 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.tuscany.samples.sdo;
+package org.apache.tuscany.samples.sdo.advanced;
 
 import java.io.FileNotFoundException;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.sdo.api.SDOUtil;
 
 
@@ -54,7 +55,7 @@
 
   public MedicalScenario(String[] args, Integer userLevel) {
 
-    super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
+    super(userLevel, SAMPLE_LEVEL_ADVANCED);
 
     if (args.length > 1) {
       printUsage(args);
@@ -73,7 +74,7 @@
   }
   
   public MedicalScenario(Integer userLevel) {
-    super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
+    super(userLevel, SAMPLE_LEVEL_ADVANCED);
   }
   
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/ObtainingDataGraphFromXml.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/ObtainingDataGraphFromXml.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/ObtainingDataGraphFromXml.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java Wed Jul  4 05:31:15 2007
@@ -18,7 +18,7 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.specCodeSnippets;
+package org.apache.tuscany.samples.sdo.advanced;
 
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -101,7 +101,7 @@
 
    
     public ObtainingDataGraphFromXml(Integer userLevel) {
-      super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
+      super(userLevel, SAMPLE_LEVEL_ADVANCED);
     }
     
     public static void main(String[] args) {
@@ -110,7 +110,8 @@
        * Create an instance of the sample program.  Edit the "commentaryLevel" argument to suit
        * your experience, COMMENTARY_FOR_NOVICE, COMMENTARY_FOR_INTERMEDIATE or COMMENTARY_FOR_ADVANCED
        */
-      ObtainingDataGraphFromXml sample = new ObtainingDataGraphFromXml(COMMENTARY_FOR_NOVICE);
+      ObtainingDataGraphFromXml sample =
+    	  new ObtainingDataGraphFromXml(COMMENTARY_FOR_ADVANCED);
       sample.run();
       
     }

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/PrintDataGraph.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/PrintDataGraph.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/PrintDataGraph.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java Wed Jul  4 05:31:15 2007
@@ -17,13 +17,17 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.tuscany.samples.sdo;
+package org.apache.tuscany.samples.sdo.advanced;
 
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
 
+import org.apache.tuscany.samples.sdo.SampleBase;
+import org.apache.tuscany.samples.sdo.SdoSampleConstants;
+
+
 import commonj.sdo.DataObject;
 import commonj.sdo.Property;
 import commonj.sdo.Sequence;
@@ -35,7 +39,7 @@
  * 
  * This sample traverses data graphs and builds up a text representation of the
  * data graph. As it traverses a graph it outputs commentary to the console
- * about what it has encounteed and how it intends to process what it finds. At
+ * about what it has encountered and how it intends to process what it finds. At
  * the end of each traversal the text representation of the graph is printed to
  * the console.
  */
@@ -48,7 +52,7 @@
   private int indentIncrement = 2;
 
   public PrintDataGraph(Integer userLevel) {
-    super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
+    super(userLevel, SAMPLE_LEVEL_ADVANCED);
     buf = new StringBuffer();
   }
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectPropertiesByName.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectPropertiesByName.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectPropertiesByName.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java Wed Jul  4 05:31:15 2007
@@ -18,18 +18,19 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.specCodeSnippets;
+package org.apache.tuscany.samples.sdo.basic;
 
 import java.util.List;
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
 
+
 import commonj.sdo.DataObject;
 import commonj.sdo.helper.HelperContext;
 
 /**
- * Demonstrates accessing a created DataObject's properties by name.
+ * Demonstrates accessing a DataObject's Property values by name.
  * 
  * This sample is from the <a href="http://incubator.apache.org/tuscany"
  * target="_blank"> Apache Tuscany</a> project. It was written to help users
@@ -37,51 +38,17 @@
  * within, and is meant for use with, and reference to the <a
  * href="http://osoa.org/download/attachments/36/Java-SDO-Spec-v2.1.0-FINAL.pdf?version=1"
  * target="_bank">SDO Specification</a>.
- * 
- * <br>
- * <br>
- * <b>Usage:</b> <br>
- * 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.
- * <br><br>
- * If executing as a standalone application please do the following: 
- * <br>
- * <UL>
- * <LI>Include the following jar files on your classpath :
- * <UL>
- * <LI>SDO API and Tuscany Implementation
- * <UL>
- * <LI>sdo-api-{version}.jar - SDO API
- * <LI>tuscany-sdo-impl-{version}.jar - Tuscany SDO implementation
- * </UL>
- * </LI>
- * <LI>EMF dependencies. 
- * <UL>
- * <LI>emf-common-{version}.jar - some common framework utility and base classes
- * <LI>emf-ecore-{version}.jar - the EMF core runtime implementation classes (the Ecore metamodel)
- * <LI>emf-ecore-change-{version}.jar - the EMF change recorder and framework
- * <LI>emf-ecore-xmi-{version}.jar - EMF's default XML (and XMI) serializer and loader
- * <LI>xsd-{version}.jar - the XML Schema model
- * </UL>
- * </LI>
- * </UL>
- * 
- * These jar files can be obtained by downloading and unpacking a <a href="http://cwiki.apache.org/TUSCANY/sdo-downloads.html" target="_blank">Tuscany binary distribution</a> </LI>
- * <LI>Execute: <br>
- * java org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName</LI>
- * </UL>
+ * <P>
+ * <A HREF="overview.html">See here</A> for instructions on how to download
  */
 public class AccessDataObjectPropertiesByName extends SampleBase {
 
     public AccessDataObjectPropertiesByName(Integer commentaryLevel) {
-      super(commentaryLevel, SAMPLE_LEVEL_NOVICE);
+      super(commentaryLevel, SAMPLE_LEVEL_BASIC);
     }
 
 
     public static void main(String[] args) {
-      /*
-       * This sample is well suited to exploration by a novice user
-       */
       AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_NOVICE);
       sample.run();
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreateCompany.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreateCompany.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreateCompany.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java Wed Jul  4 05:31:15 2007
@@ -18,52 +18,27 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.otherSources;
+package org.apache.tuscany.samples.sdo.basic;
 
 import java.io.FileOutputStream;
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
 
+
 import commonj.sdo.DataObject;
 import commonj.sdo.helper.HelperContext;
 
 /**
- * <b>Usage:</b> <br>
- * 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.
- * <br><br>
- * If executing as a standalone application please do the following: 
- * <br>
- * <UL>
- * <LI>Include the following jar files on your classpath :
- * <UL>
- * <LI>SDO API and Tuscany Implementation
- * <UL>
- * <LI>sdo-api-{version}.jar - SDO API
- * <LI>tuscany-sdo-impl-{version}.jar - Tuscany SDO implementation
- * </UL>
- * </LI>
- * <LI>EMF dependencies. 
- * <UL>
- * <LI>emf-common-{version}.jar - some common framework utility and base classes
- * <LI>emf-ecore-{version}.jar - the EMF core runtime implementation classes (the Ecore metamodel)
- * <LI>emf-ecore-change-{version}.jar - the EMF change recorder and framework
- * <LI>emf-ecore-xmi-{version}.jar - EMF's default XML (and XMI) serializer and loader
- * <LI>xsd-{version}.jar - the XML Schema model
- * </UL>
- * </LI>
- * </UL>
  * 
- * These jar files can be obtained by downloading a binary distribution of Tuscany SDO Java</LI>
- * <LI>Execute: <br>
- * java org.apache.tuscany.samples.sdo.otherSources.CreateCompany</LI>
- * </UL>
+ * <b>Usage:</b> <br>
+ * <P>
+ * <A HREF="overview.html">See here</A> for instructions on how to download 
  */
 public class CreateCompany extends SampleBase {
 
     public CreateCompany(Integer commentaryLevel) {
-      this(commentaryLevel, SAMPLE_LEVEL_NOVICE);
+      this(commentaryLevel, SAMPLE_LEVEL_BASIC);
     }
 
     public CreateCompany(Integer commentaryLevel, Integer sampleLevel) {

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreatePurchaseOrder.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreatePurchaseOrder.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/CreatePurchaseOrder.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java Wed Jul  4 05:31:15 2007
@@ -18,7 +18,7 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.otherSources;
+package org.apache.tuscany.samples.sdo.basic;
 
 import java.io.FileOutputStream;
 import java.io.OutputStream;
@@ -26,6 +26,7 @@
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
 
+
 import commonj.sdo.DataObject;
 import commonj.sdo.helper.DataFactory;
 import commonj.sdo.helper.HelperContext;
@@ -79,17 +80,11 @@
 public class CreatePurchaseOrder extends SampleBase {
 
     public CreatePurchaseOrder(Integer commentaryLevel) {
-      super(commentaryLevel, SAMPLE_LEVEL_NOVICE);
+      super(commentaryLevel, SAMPLE_LEVEL_BASIC);
     }
 
-    /**
-     * Drives sample
-     * 
-     * @param args.
-     *            none required.
-     */
-    public static void main(String[] args) {
 
+    public static void main(String[] args) {
 
       CreatePurchaseOrder sample = new CreatePurchaseOrder(COMMENTARY_FOR_NOVICE);
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/ReadPurchaseOrder.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/ReadPurchaseOrder.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/otherSources/ReadPurchaseOrder.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java Wed Jul  4 05:31:15 2007
@@ -18,7 +18,7 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.otherSources;
+package org.apache.tuscany.samples.sdo.basic;
 
 import java.util.List;
 
@@ -26,6 +26,7 @@
 import org.apache.tuscany.samples.sdo.SampleInfrastructure;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
 
+
 import commonj.sdo.DataObject;
 import commonj.sdo.helper.HelperContext;
 import commonj.sdo.helper.XMLDocument;
@@ -109,7 +110,7 @@
     "    </po:purchaseOrder>\n";
 
     public ReadPurchaseOrder(Integer commentaryLevel) {
-      super(commentaryLevel, SampleInfrastructure.SAMPLE_LEVEL_NOVICE);
+      super(commentaryLevel, SampleInfrastructure.SAMPLE_LEVEL_BASIC);
     }
 
     public static void main(String[] args) {
@@ -138,7 +139,7 @@
             "then print out some of the details\n\n"+
             "DataObject purchaseOrder = xmlDoc.getRootObject();");
         
-            DataObject purchaseOrder = xmlDoc.getRootObject();
+        DataObject purchaseOrder = xmlDoc.getRootObject();
 
         System.out.println("Order date: " + purchaseOrder.get("orderDate"));
         System.out.println("Comment: " + purchaseOrder.get("comment"));

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectUsingValidXPath.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectUsingValidXPath.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/AccessDataObjectUsingValidXPath.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java Wed Jul  4 05:31:15 2007
@@ -18,7 +18,7 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.specCodeSnippets;
+package org.apache.tuscany.samples.sdo.intermediate;
 
 import java.util.List;
 
@@ -73,7 +73,7 @@
     HelperContext scope;
   
     public AccessDataObjectUsingValidXPath(Integer userLevel) {
-      super(userLevel, SampleInfrastructure.SAMPLE_LEVEL_NOVICE);
+      super(userLevel, SampleInfrastructure.SAMPLE_LEVEL_INTERMEDIATE);
     }
 
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/CreateDataObjectFromXmlString.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/CreateDataObjectFromXmlString.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/CreateDataObjectFromXmlString.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java Wed Jul  4 05:31:15 2007
@@ -17,7 +17,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.tuscany.samples.sdo.specCodeSnippets;
+package org.apache.tuscany.samples.sdo.intermediate;
 
 import java.util.List;
 

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/DynamicCustomerTypeSample.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/DynamicCustomerTypeSample.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specCodeSnippets/DynamicCustomerTypeSample.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java Wed Jul  4 05:31:15 2007
@@ -18,7 +18,7 @@
  *  under the License.
  */
 
-package org.apache.tuscany.samples.sdo.specCodeSnippets;
+package org.apache.tuscany.samples.sdo.intermediate;
 
 import commonj.sdo.DataObject;
 import commonj.sdo.Type;

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessDataObjectsUsingXPath.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessDataObjectsUsingXPath.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessDataObjectsUsingXPath.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessDataObjectsUsingXPath.java Wed Jul  4 05:31:15 2007
@@ -24,7 +24,7 @@
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
+import org.apache.tuscany.samples.sdo.basic.AccessDataObjectPropertiesByName;
 
 import commonj.sdo.helper.HelperContext;
 import commonj.sdo.helper.XMLHelper;
@@ -64,7 +64,7 @@
  * {@link org.apache.tuscany.samples.sdo.SdoSampleConstants#COMPANY_DATAOBJECT_XML}
  * used to load the DataObject is also located in this resources directory. The xsd
  * the xml was generated by
- * {@link org.apache.tuscany.samples.sdo.otherSources.CreateCompany} which is a good
+ * {@link org.apache.tuscany.samples.sdo.basic.CreateCompany} which is a good
  * resource for how to populate or create DataObjects or DataGraphs dynamically. <br>
  * <br>
  * The following example has the same effect as
@@ -102,7 +102,7 @@
  * </UL>
  * 
  * @author Robbie Minshall
- * @see org.apache.tuscany.samples.sdo.specCodeSnippets.ObtainingDataGraphFromXml
+ * @see org.apache.tuscany.samples.sdo.advanced.ObtainingDataGraphFromXml
  */
 
 public class AccessDataObjectsUsingXPath  extends SampleBase {

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingDataObjectsViaPropertyIndex.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingDataObjectsViaPropertyIndex.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingDataObjectsViaPropertyIndex.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingDataObjectsViaPropertyIndex.java Wed Jul  4 05:31:15 2007
@@ -25,12 +25,9 @@
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
 
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
 import commonj.sdo.DataObject;
+import commonj.sdo.helper.HelperContext;
 
 /**
  * Demonstrates accessing the properties of a DataObject using property indices.
@@ -66,7 +63,7 @@
  * {@link org.apache.tuscany.samples.sdo.SdoSampleConstants#COMPANY_DATAOBJECT_XML}
  * used to load the DataObject is also located in this resources directory. To help
  * ensure consistancy with the xsd the xml was generated by
- * {@link org.apache.tuscany.samples.sdo.otherSources.CreateCompany} which is a good
+ * {@link org.apache.tuscany.samples.sdo.basic.CreateCompany} which is a good
  * resource for populating DataObjects, or creating DataGraphs dynamically.
  * <br><br>
  * <b>Usage:</b> <br>
@@ -120,7 +117,7 @@
     HelperContext scope;
 
     public AccessingDataObjectsViaPropertyIndex(Integer userLevel) {
-      super(userLevel);
+      super(userLevel, SAMPLE_LEVEL_BASIC);
     }
 
 
@@ -151,7 +148,7 @@
     public static void main(String[] args) {
       // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
       // converted to using commentary()
-      AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+      AccessingDataObjectsViaPropertyIndex sample = new AccessingDataObjectsViaPropertyIndex(COMMENTARY_FOR_INTERMEDIATE);
 
       try {
         sample.run();

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingTheContentsOfASequence.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingTheContentsOfASequence.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingTheContentsOfASequence.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/AccessingTheContentsOfASequence.java Wed Jul  4 05:31:15 2007
@@ -22,14 +22,11 @@
 
 
 import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
 
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
 import commonj.sdo.DataObject;
-import commonj.sdo.Sequence;
 import commonj.sdo.Property;
+import commonj.sdo.Sequence;
+import commonj.sdo.helper.HelperContext;
 
 /**
  * Demonstrates accessing the sequence from a DataObject containing mixed content.
@@ -95,7 +92,7 @@
     HelperContext scope;
 
     public AccessingTheContentsOfASequence(Integer userLevel) {
-      super(userLevel);
+      super(userLevel, SAMPLE_LEVEL_BASIC);
     }
 
 
@@ -117,7 +114,7 @@
     public static void main(String[] args) {
       // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
       // converted to using commentary()
-      AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+      AccessingTheContentsOfASequence sample = new AccessingTheContentsOfASequence(COMMENTARY_FOR_INTERMEDIATE);
 
       sample.run();
 

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingDataObjectTreesFromXMLDocuments.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingDataObjectTreesFromXMLDocuments.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingDataObjectTreesFromXMLDocuments.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingDataObjectTreesFromXMLDocuments.java Wed Jul  4 05:31:15 2007
@@ -20,14 +20,11 @@
 
 package org.apache.tuscany.samples.sdo.specExampleSection;
 
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.helper.HelperContext;
 
 /**
  * Demonstrates creating a DataObject from an XML String.
@@ -84,7 +81,7 @@
  * </UL>
  * 
  * @author Robbie Minshall
- * @see {@link org.apache.tuscany.samples.sdo.otherSources.CreatePurchaseOrder}
+ * @see {@link org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder}
  */
 
 public class CreatingDataObjectTreesFromXMLDocuments  extends SampleBase {
@@ -105,7 +102,7 @@
   public static void main(String[] args) {
     // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
     // converted to using commentary()
-    AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+    CreatingDataObjectTreesFromXMLDocuments sample = new CreatingDataObjectTreesFromXMLDocuments(COMMENTARY_FOR_INTERMEDIATE);
 
     try {
       sample.run();

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingXmlFromDataObjects.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingXmlFromDataObjects.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingXmlFromDataObjects.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/CreatingXmlFromDataObjects.java Wed Jul  4 05:31:15 2007
@@ -23,15 +23,11 @@
 import java.io.FileOutputStream;
 import java.io.OutputStream;
 
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.helper.HelperContext;
 
 /**
  * Demonstrates programmatically creating a DataObject and generating an XML String.
@@ -85,7 +81,7 @@
  * </UL>
  * 
  * @author Robbie Minshall
- * @see {@link org.apache.tuscany.samples.sdo.otherSources.CreatePurchaseOrder}
+ * @see {@link org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder}
  */
 
 public class CreatingXmlFromDataObjects  extends SampleBase {
@@ -93,14 +89,14 @@
     HelperContext scope;
 
     public CreatingXmlFromDataObjects(Integer userLevel) {
-      super(userLevel);
+      super(userLevel, SAMPLE_LEVEL_BASIC);
     }
 
 
   public static void main(String[] args) {
     // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
     // converted to using commentary()
-    AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+    CreatingXmlFromDataObjects sample = new CreatingXmlFromDataObjects(COMMENTARY_FOR_INTERMEDIATE);
 
     try {
       sample.run();

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/SerializingDeserializingADataObject.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/SerializingDeserializingADataObject.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/SerializingDeserializingADataObject.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/SerializingDeserializingADataObject.java Wed Jul  4 05:31:15 2007
@@ -37,7 +37,7 @@
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
+import org.apache.tuscany.samples.sdo.basic.AccessDataObjectPropertiesByName;
 
 /**
  * Demonstrates serializing and deserializing a DataObject to disk.
@@ -123,7 +123,7 @@
     public static void main(String[] args) {
       // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
       // converted to using commentary()
-      AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+      SerializingDeserializingADataObject sample = new SerializingDeserializingADataObject(COMMENTARY_FOR_INTERMEDIATE);
 
       try {
         sample.run();

Modified: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/UsingTypeAndPropertyWithDataObjects.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/UsingTypeAndPropertyWithDataObjects.java?view=diff&rev=553191&r1=553190&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/UsingTypeAndPropertyWithDataObjects.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/specExampleSection/UsingTypeAndPropertyWithDataObjects.java Wed Jul  4 05:31:15 2007
@@ -20,18 +20,15 @@
 
 package org.apache.tuscany.samples.sdo.specExampleSection;
 
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.Property;
-
 import java.util.List;
 
 import org.apache.tuscany.samples.sdo.SampleBase;
 import org.apache.tuscany.samples.sdo.SdoSampleConstants;
-import org.apache.tuscany.samples.sdo.specCodeSnippets.AccessDataObjectPropertiesByName;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+import commonj.sdo.helper.HelperContext;
 
 /**
  * Demonstrates the use of Type and Property to display and the META-DATA for and access Properties of a DataObject.
@@ -93,7 +90,7 @@
 
 
     public UsingTypeAndPropertyWithDataObjects(Integer userLevel) {
-      super(userLevel);
+      super(userLevel, SAMPLE_LEVEL_BASIC);
     }
 
 
@@ -105,7 +102,7 @@
   public static void main(String[] args) {
     // TODO make the default level COMMENTARY_FOR_NOVICE, once the rest of the sample has been
     // converted to using commentary()
-    AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_INTERMEDIATE);
+    UsingTypeAndPropertyWithDataObjects sample = new UsingTypeAndPropertyWithDataObjects(COMMENTARY_FOR_INTERMEDIATE);
 
     try {
       sample.run();

Copied: incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompanyTuscanyAPI.java (from r552871, incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompany.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompanyTuscanyAPI.java?view=diff&rev=553191&p1=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompany.java&r1=552871&p2=incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompanyTuscanyAPI.java&r2=553191
==============================================================================
--- incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompany.java (original)
+++ incubator/tuscany/java/sdo/sample/src/main/java/org/apache/tuscany/samples/sdo/tuscanyapi/CreateCompanyTuscanyAPI.java Wed Jul  4 05:31:15 2007
@@ -62,9 +62,9 @@
  * java org.apache.tuscany.samples.sdo.tuscanyApi.CreateCompany</LI>
  * </UL>
  */
-public class CreateCompany extends org.apache.tuscany.samples.sdo.otherSources.CreateCompany {
+public class CreateCompanyTuscanyAPI extends org.apache.tuscany.samples.sdo.basic.CreateCompany {
 
-    public CreateCompany(Integer commentaryLevel) {
+    public CreateCompanyTuscanyAPI(Integer commentaryLevel) {
       super(commentaryLevel, SAMPLE_LEVEL_INTERMEDIATE);
     }
 
@@ -85,7 +85,7 @@
        * of understanding of SDO.  Change the experience level argument to get more
        * or less commentary.
        */
-      CreateCompany sample = new CreateCompany(COMMENTARY_FOR_INTERMEDIATE);
+      CreateCompanyTuscanyAPI sample = new CreateCompanyTuscanyAPI(COMMENTARY_FOR_INTERMEDIATE);
       sample.run();
 
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message