tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelvingood...@apache.org
Subject svn commit: r509526 [1/2] - in /incubator/tuscany/java/sdo: impl/src/test/java/com/example/simple/ impl/src/test/java/com/example/simple/impl/ impl/src/test/java/org/apache/tuscany/sdo/codegen/ impl/src/test/java/org/apache/tuscany/sdo/test/ tools/src/...
Date Tue, 20 Feb 2007 12:06:53 GMT
Author: kelvingoodson
Date: Tue Feb 20 04:06:51 2007
New Revision: 509526

URL: http://svn.apache.org/viewvc?view=rev&rev=509526
Log:
TUSCANY-1123 regenerated code from simple.xsd and sequences.xsd; ensured no remaining references to *Helper.INSTANCE in test cases; fixed copyrights in AllTests; ensured AllTests invokes full suite of test cases; brought SimpleStaticTest into test suite by renaming class

Added:
    incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java
      - copied, changed from r509506, incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java
Removed:
    incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimplePackageImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java
Modified:
    incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java
    incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java
    incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java
    incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
    incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java
    incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
    incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java
    incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
    incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java Tue Feb 20 04:06:51 2007
@@ -19,6 +19,8 @@
  */
 package com.example.simple;
 
+import java.io.Serializable;
+
 import java.math.BigDecimal;
 
 import java.util.List;
@@ -43,9 +45,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface Quote
+public interface Quote extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Symbol</b></em>' attribute.

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java Tue Feb 20 04:06:51 2007
@@ -19,6 +19,8 @@
  */
 package com.example.simple;
 
+import commonj.sdo.helper.HelperContext;
+
 
 /**
  * <!-- begin-user-doc -->
@@ -29,13 +31,14 @@
  */
 public interface SimpleFactory
 {
+
   /**
    * The singleton instance of the factory.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  SimpleFactory INSTANCE = com.example.simple.impl.SimpleFactoryImpl.eINSTANCE;
+  SimpleFactory INSTANCE = com.example.simple.impl.SimpleFactoryImpl.init();
 
   /**
    * Returns a new object of class '<em>Quote</em>'.
@@ -46,4 +49,13 @@
    */
   Quote createQuote();
 
+  /**
+   * Registers the types supported by this Factory within the supplied scope.argument
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param scope an instance of HelperContext used to manage the scoping of types.
+   * @generated
+   */
+  public void register(HelperContext scope);
+   
 } //SimpleFactory

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java Tue Feb 20 04:06:51 2007
@@ -1,69 +1,129 @@
-/**
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
 package com.example.simple.impl;
 
 import com.example.simple.Quote;
+import com.example.simple.SimpleFactory;
+
+import commonj.sdo.Type;
 
 import java.math.BigDecimal;
 
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.tuscany.sdo.impl.DataObjectImpl;
+import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
+/**
+*
+*  Licensed to the Apache Software Foundation (ASF) under one
+*  or more contributor license agreements.  See the NOTICE file
+*  distributed with this work for additional information
+*  regarding copyright ownership.  The ASF licenses this file
+*  to you under the Apache License, Version 2.0 (the
+*  "License"); you may not use this file except in compliance
+*  with the License.  You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing,
+*  software distributed under the License is distributed on an
+*  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*  KIND, either express or implied.  See the License for the
+*  specific language governing permissions and limitations
+*  under the License.
+*/
+public class QuoteImpl extends DataObjectBase implements Quote
+{
+  /**
+   * The feature id for the '<em><b>Symbol</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int SYMBOL = 0;
 
-import org.eclipse.emf.common.util.EList;
+  /**
+   * The feature id for the '<em><b>Company Name</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int COMPANY_NAME = 1;
 
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
+  /**
+   * The feature id for the '<em><b>Price</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int PRICE = 2;
 
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
+  /**
+   * The feature id for the '<em><b>Open1</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int OPEN1 = 3;
 
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
+  /**
+   * The feature id for the '<em><b>High</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int HIGH = 4;
+
+  /**
+   * The feature id for the '<em><b>Low</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int LOW = 5;
+
+  /**
+   * The feature id for the '<em><b>Volume</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int VOLUME = 6;
+
+  /**
+   * The feature id for the '<em><b>Change1</b></em>' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int CHANGE1 = 7;
+
+  /**
+   * The feature id for the '<em><b>Quotes</b></em>' containment reference list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */	 
+  public final static int QUOTES = 8;
+
+  /**
+   * This represents the number of properties for this type.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  
+  public final static int SDO_PROPERTY_COUNT = 9;
 
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Quote</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getSymbol <em>Symbol</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getCompanyName <em>Company Name</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getPrice <em>Price</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getOpen1 <em>Open1</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getHigh <em>High</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getLow <em>Low</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getVolume <em>Volume</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getChange1 <em>Change1</em>}</li>
- *   <li>{@link com.example.simple.impl.QuoteImpl#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class QuoteImpl extends DataObjectImpl implements Quote
-{
   /**
    * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
    * <!-- begin-user-doc -->
@@ -72,7 +132,7 @@
    * @generated
    * @ordered
    */
-  protected static final String SYMBOL_EDEFAULT = null;
+  protected static final String SYMBOL_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
@@ -82,7 +142,7 @@
    * @generated
    * @ordered
    */
-  protected String symbol = SYMBOL_EDEFAULT;
+  protected String symbol = SYMBOL_DEFAULT_;
 
   /**
    * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
@@ -92,7 +152,7 @@
    * @generated
    * @ordered
    */
-  protected static final String COMPANY_NAME_EDEFAULT = null;
+  protected static final String COMPANY_NAME_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
@@ -102,7 +162,7 @@
    * @generated
    * @ordered
    */
-  protected String companyName = COMPANY_NAME_EDEFAULT;
+  protected String companyName = COMPANY_NAME_DEFAULT_;
 
   /**
    * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
@@ -112,7 +172,7 @@
    * @generated
    * @ordered
    */
-  protected static final BigDecimal PRICE_EDEFAULT = null;
+  protected static final BigDecimal PRICE_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute.
@@ -122,7 +182,7 @@
    * @generated
    * @ordered
    */
-  protected BigDecimal price = PRICE_EDEFAULT;
+  protected BigDecimal price = PRICE_DEFAULT_;
 
   /**
    * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
@@ -132,7 +192,7 @@
    * @generated
    * @ordered
    */
-  protected static final BigDecimal OPEN1_EDEFAULT = null;
+  protected static final BigDecimal OPEN1_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
@@ -142,7 +202,7 @@
    * @generated
    * @ordered
    */
-  protected BigDecimal open1 = OPEN1_EDEFAULT;
+  protected BigDecimal open1 = OPEN1_DEFAULT_;
 
   /**
    * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
@@ -152,7 +212,7 @@
    * @generated
    * @ordered
    */
-  protected static final BigDecimal HIGH_EDEFAULT = null;
+  protected static final BigDecimal HIGH_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getHigh() <em>High</em>}' attribute.
@@ -162,7 +222,7 @@
    * @generated
    * @ordered
    */
-  protected BigDecimal high = HIGH_EDEFAULT;
+  protected BigDecimal high = HIGH_DEFAULT_;
 
   /**
    * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
@@ -172,7 +232,7 @@
    * @generated
    * @ordered
    */
-  protected static final BigDecimal LOW_EDEFAULT = null;
+  protected static final BigDecimal LOW_DEFAULT_ = null;
 
   /**
    * The cached value of the '{@link #getLow() <em>Low</em>}' attribute.
@@ -182,7 +242,7 @@
    * @generated
    * @ordered
    */
-  protected BigDecimal low = LOW_EDEFAULT;
+  protected BigDecimal low = LOW_DEFAULT_;
 
   /**
    * The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
@@ -192,7 +252,7 @@
    * @generated
    * @ordered
    */
-  protected static final double VOLUME_EDEFAULT = 0.0;
+  protected static final double VOLUME_DEFAULT_ = 0.0;
 
   /**
    * The cached value of the '{@link #getVolume() <em>Volume</em>}' attribute.
@@ -202,7 +262,7 @@
    * @generated
    * @ordered
    */
-  protected double volume = VOLUME_EDEFAULT;
+  protected double volume = VOLUME_DEFAULT_;
 
   /**
    * This is true if the Volume attribute has been set.
@@ -211,7 +271,7 @@
    * @generated
    * @ordered
    */
-  protected boolean volumeESet = false;
+  protected boolean volume_set_ = false;
 
   /**
    * The default value of the '{@link #getChange1() <em>Change1</em>}' attribute.
@@ -221,7 +281,7 @@
    * @generated
    * @ordered
    */
-  protected static final double CHANGE1_EDEFAULT = 0.0;
+  protected static final double CHANGE1_DEFAULT_ = 0.0;
 
   /**
    * The cached value of the '{@link #getChange1() <em>Change1</em>}' attribute.
@@ -231,7 +291,7 @@
    * @generated
    * @ordered
    */
-  protected double change1 = CHANGE1_EDEFAULT;
+  protected double change1 = CHANGE1_DEFAULT_;
 
   /**
    * This is true if the Change1 attribute has been set.
@@ -240,7 +300,7 @@
    * @generated
    * @ordered
    */
-  protected boolean change1ESet = false;
+  protected boolean change1_set_ = false;
 
   /**
    * The cached value of the '{@link #getQuotes() <em>Quotes</em>}' containment reference list.
@@ -250,14 +310,15 @@
    * @generated
    * @ordered
    */
-  protected EList quotes = null;
-
+  
+  protected List quotes = null;
+  
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  protected QuoteImpl()
+  public QuoteImpl()
   {
     super();
   }
@@ -267,9 +328,9 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  protected EClass eStaticClass()
+  public Type getType()
   {
-    return SimplePackageImpl.Literals.QUOTE;
+    return ((SimpleFactoryImpl)SimpleFactory.INSTANCE).getQuote();
   }
 
   /**
@@ -281,7 +342,6 @@
   {
     return symbol;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -291,8 +351,8 @@
   {
     String oldSymbol = symbol;
     symbol = newSymbol;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__SYMBOL, oldSymbol, symbol));
+    if (isNotifying())
+      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol);
   }
 
   /**
@@ -304,7 +364,6 @@
   {
     return companyName;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -314,8 +373,8 @@
   {
     String oldCompanyName = companyName;
     companyName = newCompanyName;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__COMPANY_NAME, oldCompanyName, companyName));
+    if (isNotifying())
+      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName);
   }
 
   /**
@@ -327,7 +386,6 @@
   {
     return price;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -337,8 +395,8 @@
   {
     BigDecimal oldPrice = price;
     price = newPrice;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__PRICE, oldPrice, price));
+    if (isNotifying())
+      notify(ChangeKind.SET, PRICE, oldPrice, price);
   }
 
   /**
@@ -350,7 +408,6 @@
   {
     return open1;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -360,8 +417,8 @@
   {
     BigDecimal oldOpen1 = open1;
     open1 = newOpen1;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__OPEN1, oldOpen1, open1));
+    if (isNotifying())
+      notify(ChangeKind.SET, OPEN1, oldOpen1, open1);
   }
 
   /**
@@ -373,7 +430,6 @@
   {
     return high;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -383,8 +439,8 @@
   {
     BigDecimal oldHigh = high;
     high = newHigh;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__HIGH, oldHigh, high));
+    if (isNotifying())
+      notify(ChangeKind.SET, HIGH, oldHigh, high);
   }
 
   /**
@@ -396,7 +452,6 @@
   {
     return low;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -406,8 +461,8 @@
   {
     BigDecimal oldLow = low;
     low = newLow;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__LOW, oldLow, low));
+    if (isNotifying())
+      notify(ChangeKind.SET, LOW, oldLow, low);
   }
 
   /**
@@ -419,7 +474,6 @@
   {
     return volume;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -429,10 +483,10 @@
   {
     double oldVolume = volume;
     volume = newVolume;
-    boolean oldVolumeESet = volumeESet;
-    volumeESet = true;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__VOLUME, oldVolume, volume, !oldVolumeESet));
+    boolean oldVolume_set_ = volume_set_;
+    volume_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_);
   }
 
   /**
@@ -443,11 +497,11 @@
   public void unsetVolume()
   {
     double oldVolume = volume;
-    boolean oldVolumeESet = volumeESet;
-    volume = VOLUME_EDEFAULT;
-    volumeESet = false;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.UNSET, SimplePackageImpl.QUOTE__VOLUME, oldVolume, VOLUME_EDEFAULT, oldVolumeESet));
+    boolean oldVolume_set_ = volume_set_;
+    volume = VOLUME_DEFAULT_;
+    volume_set_ = false;
+    if (isNotifying())
+      notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
   }
 
   /**
@@ -457,7 +511,7 @@
    */
   public boolean isSetVolume()
   {
-    return volumeESet;
+    return volume_set_;
   }
 
   /**
@@ -469,7 +523,6 @@
   {
     return change1;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -479,10 +532,10 @@
   {
     double oldChange1 = change1;
     change1 = newChange1;
-    boolean oldChange1ESet = change1ESet;
-    change1ESet = true;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__CHANGE1, oldChange1, change1, !oldChange1ESet));
+    boolean oldChange1_set_ = change1_set_;
+    change1_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_);
   }
 
   /**
@@ -493,11 +546,11 @@
   public void unsetChange1()
   {
     double oldChange1 = change1;
-    boolean oldChange1ESet = change1ESet;
-    change1 = CHANGE1_EDEFAULT;
-    change1ESet = false;
-    if (eNotificationRequired())
-      eNotify(new ENotificationImpl(this, Notification.UNSET, SimplePackageImpl.QUOTE__CHANGE1, oldChange1, CHANGE1_EDEFAULT, oldChange1ESet));
+    boolean oldChange1_set_ = change1_set_;
+    change1 = CHANGE1_DEFAULT_;
+    change1_set_ = false;
+    if (isNotifying())
+      notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
   }
 
   /**
@@ -507,7 +560,7 @@
    */
   public boolean isSetChange1()
   {
-    return change1ESet;
+    return change1_set_;
   }
 
   /**
@@ -519,24 +572,23 @@
   {
     if (quotes == null)
     {
-      quotes = new EObjectContainmentEList(Quote.class, this, SimplePackageImpl.QUOTE__QUOTES);
+      quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES);
     }
     return quotes;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+  public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
   {
-    switch (featureID)
+    switch (propertyIndex)
     {
-      case SimplePackageImpl.QUOTE__QUOTES:
-        return ((InternalEList)getQuotes()).basicRemove(otherEnd, msgs);
+      case QUOTES:
+        return removeFromList(getQuotes(), otherEnd, changeContext);
     }
-    return super.eInverseRemove(otherEnd, featureID, msgs);
+    return super.inverseRemove(otherEnd, propertyIndex, changeContext);
   }
 
   /**
@@ -544,30 +596,30 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public Object eGet(int featureID, boolean resolve, boolean coreType)
+  public Object get(int propertyIndex, boolean resolve)
   {
-    switch (featureID)
+    switch (propertyIndex)
     {
-      case SimplePackageImpl.QUOTE__SYMBOL:
+      case SYMBOL:
         return getSymbol();
-      case SimplePackageImpl.QUOTE__COMPANY_NAME:
+      case COMPANY_NAME:
         return getCompanyName();
-      case SimplePackageImpl.QUOTE__PRICE:
+      case PRICE:
         return getPrice();
-      case SimplePackageImpl.QUOTE__OPEN1:
+      case OPEN1:
         return getOpen1();
-      case SimplePackageImpl.QUOTE__HIGH:
+      case HIGH:
         return getHigh();
-      case SimplePackageImpl.QUOTE__LOW:
+      case LOW:
         return getLow();
-      case SimplePackageImpl.QUOTE__VOLUME:
+      case VOLUME:
         return new Double(getVolume());
-      case SimplePackageImpl.QUOTE__CHANGE1:
+      case CHANGE1:
         return new Double(getChange1());
-      case SimplePackageImpl.QUOTE__QUOTES:
+      case QUOTES:
         return getQuotes();
     }
-    return super.eGet(featureID, resolve, coreType);
+    return super.get(propertyIndex, resolve);
   }
 
   /**
@@ -575,40 +627,40 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public void eSet(int featureID, Object newValue)
+  public void set(int propertyIndex, Object newValue)
   {
-    switch (featureID)
+    switch (propertyIndex)
     {
-      case SimplePackageImpl.QUOTE__SYMBOL:
+      case SYMBOL:
         setSymbol((String)newValue);
         return;
-      case SimplePackageImpl.QUOTE__COMPANY_NAME:
+      case COMPANY_NAME:
         setCompanyName((String)newValue);
         return;
-      case SimplePackageImpl.QUOTE__PRICE:
+      case PRICE:
         setPrice((BigDecimal)newValue);
         return;
-      case SimplePackageImpl.QUOTE__OPEN1:
+      case OPEN1:
         setOpen1((BigDecimal)newValue);
         return;
-      case SimplePackageImpl.QUOTE__HIGH:
+      case HIGH:
         setHigh((BigDecimal)newValue);
         return;
-      case SimplePackageImpl.QUOTE__LOW:
+      case LOW:
         setLow((BigDecimal)newValue);
         return;
-      case SimplePackageImpl.QUOTE__VOLUME:
+      case VOLUME:
         setVolume(((Double)newValue).doubleValue());
         return;
-      case SimplePackageImpl.QUOTE__CHANGE1:
+      case CHANGE1:
         setChange1(((Double)newValue).doubleValue());
         return;
-      case SimplePackageImpl.QUOTE__QUOTES:
+      case QUOTES:
         getQuotes().clear();
         getQuotes().addAll((Collection)newValue);
         return;
     }
-    super.eSet(featureID, newValue);
+    super.set(propertyIndex, newValue);
   }
 
   /**
@@ -616,39 +668,39 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public void eUnset(int featureID)
+  public void unset(int propertyIndex)
   {
-    switch (featureID)
+    switch (propertyIndex)
     {
-      case SimplePackageImpl.QUOTE__SYMBOL:
-        setSymbol(SYMBOL_EDEFAULT);
+      case SYMBOL:
+        setSymbol(SYMBOL_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__COMPANY_NAME:
-        setCompanyName(COMPANY_NAME_EDEFAULT);
+      case COMPANY_NAME:
+        setCompanyName(COMPANY_NAME_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__PRICE:
-        setPrice(PRICE_EDEFAULT);
+      case PRICE:
+        setPrice(PRICE_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__OPEN1:
-        setOpen1(OPEN1_EDEFAULT);
+      case OPEN1:
+        setOpen1(OPEN1_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__HIGH:
-        setHigh(HIGH_EDEFAULT);
+      case HIGH:
+        setHigh(HIGH_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__LOW:
-        setLow(LOW_EDEFAULT);
+      case LOW:
+        setLow(LOW_DEFAULT_);
         return;
-      case SimplePackageImpl.QUOTE__VOLUME:
+      case VOLUME:
         unsetVolume();
         return;
-      case SimplePackageImpl.QUOTE__CHANGE1:
+      case CHANGE1:
         unsetChange1();
         return;
-      case SimplePackageImpl.QUOTE__QUOTES:
+      case QUOTES:
         getQuotes().clear();
         return;
     }
-    super.eUnset(featureID);
+    super.unset(propertyIndex);
   }
 
   /**
@@ -656,30 +708,30 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public boolean eIsSet(int featureID)
+  public boolean isSet(int propertyIndex)
   {
-    switch (featureID)
+    switch (propertyIndex)
     {
-      case SimplePackageImpl.QUOTE__SYMBOL:
-        return SYMBOL_EDEFAULT == null ? symbol != null : !SYMBOL_EDEFAULT.equals(symbol);
-      case SimplePackageImpl.QUOTE__COMPANY_NAME:
-        return COMPANY_NAME_EDEFAULT == null ? companyName != null : !COMPANY_NAME_EDEFAULT.equals(companyName);
-      case SimplePackageImpl.QUOTE__PRICE:
-        return PRICE_EDEFAULT == null ? price != null : !PRICE_EDEFAULT.equals(price);
-      case SimplePackageImpl.QUOTE__OPEN1:
-        return OPEN1_EDEFAULT == null ? open1 != null : !OPEN1_EDEFAULT.equals(open1);
-      case SimplePackageImpl.QUOTE__HIGH:
-        return HIGH_EDEFAULT == null ? high != null : !HIGH_EDEFAULT.equals(high);
-      case SimplePackageImpl.QUOTE__LOW:
-        return LOW_EDEFAULT == null ? low != null : !LOW_EDEFAULT.equals(low);
-      case SimplePackageImpl.QUOTE__VOLUME:
+      case SYMBOL:
+        return SYMBOL_DEFAULT_ == null ? symbol != null : !SYMBOL_DEFAULT_.equals(symbol);
+      case COMPANY_NAME:
+        return COMPANY_NAME_DEFAULT_ == null ? companyName != null : !COMPANY_NAME_DEFAULT_.equals(companyName);
+      case PRICE:
+        return PRICE_DEFAULT_ == null ? price != null : !PRICE_DEFAULT_.equals(price);
+      case OPEN1:
+        return OPEN1_DEFAULT_ == null ? open1 != null : !OPEN1_DEFAULT_.equals(open1);
+      case HIGH:
+        return HIGH_DEFAULT_ == null ? high != null : !HIGH_DEFAULT_.equals(high);
+      case LOW:
+        return LOW_DEFAULT_ == null ? low != null : !LOW_DEFAULT_.equals(low);
+      case VOLUME:
         return isSetVolume();
-      case SimplePackageImpl.QUOTE__CHANGE1:
+      case CHANGE1:
         return isSetChange1();
-      case SimplePackageImpl.QUOTE__QUOTES:
+      case QUOTES:
         return quotes != null && !quotes.isEmpty();
     }
-    return super.eIsSet(featureID);
+    return super.isSet(propertyIndex);
   }
 
   /**
@@ -689,7 +741,7 @@
    */
   public String toString()
   {
-    if (eIsProxy()) return super.toString();
+    if (isProxy(this)) return super.toString();
 
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (symbol: ");
@@ -705,9 +757,9 @@
     result.append(", low: ");
     result.append(low);
     result.append(", volume: ");
-    if (volumeESet) result.append(volume); else result.append("<unset>");
+    if (volume_set_) result.append(volume); else result.append("<unset>");
     result.append(", change1: ");
-    if (change1ESet) result.append(change1); else result.append("<unset>");
+    if (change1_set_) result.append(change1); else result.append("<unset>");
     result.append(')');
     return result.toString();
   }

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java Tue Feb 20 04:06:51 2007
@@ -19,56 +19,63 @@
  */
 package com.example.simple.impl;
 
+import commonj.sdo.helper.HelperContext;
+import org.apache.tuscany.sdo.helper.TypeHelperImpl;
+
 import com.example.simple.*;
 
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.SDOFactory;
+
+import org.apache.tuscany.sdo.impl.FactoryBase;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
 
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.apache.tuscany.sdo.util.SDOUtil;
 
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
+ * Generator information:
+ * patternVersion=1.0;
  * <!-- end-user-doc -->
  * @generated
  */
-public class SimpleFactoryImpl extends EFactoryImpl implements SimpleFactory
+public class SimpleFactoryImpl extends FactoryBase implements SimpleFactory
 {
+
   /**
-   * The singleton instance of the factory.
+   * The package namespace URI.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  public static final SimpleFactoryImpl eINSTANCE = init();
+  public static final String NAMESPACE_URI = "http://www.example.com/simple";
 
   /**
-   * Creates the default factory implementation.
+   * The package namespace name.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  public static SimpleFactoryImpl init()
-  {
-    try
-    {
-      SimpleFactoryImpl theSimpleFactory = (SimpleFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("http://www.example.com/simple"); 
-      if (theSimpleFactory != null)
-      {
-        return theSimpleFactory;
-      }
-    }
-    catch (Exception exception)
-    {
-      EcorePlugin.INSTANCE.log(exception);
-    }
-    return new SimpleFactoryImpl();
-  }
+  public static final String NAMESPACE_PREFIX = "simple";
 
   /**
+   * The version of the generator pattern used to generate this class.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public static final String PATTERN_VERSION = "1.0";
+  
+  public static final int QUOTE = 1;
+  
+  /**
    * Creates an instance of the factory.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -76,34 +83,37 @@
    */
   public SimpleFactoryImpl()
   {
-    super();
+    super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.simple");
   }
 
   /**
+   * Registers the Factory instance so that it is available within the supplied scope.
+   * @argument scope a HelperContext instance that will make the types supported by this Factory available.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */
-  public EObject create(EClass eClass)
-  {
-    switch (eClass.getClassifierID())
-    {
-      case SimplePackageImpl.DOCUMENT_ROOT: return (EObject)createDocumentRoot();
-      case SimplePackageImpl.QUOTE: return (EObject)createQuote();
-      default:
-        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
-    }
+   */	
+  public void register(HelperContext scope) {
+    if(scope == null) {
+       throw new IllegalArgumentException("Scope can not be null");
+    } 
+    TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
+    th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
-
+  
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  public EObject createDocumentRoot()
+  public DataObject create(int typeNumber)
   {
-    EObject documentRoot = super.create(SimplePackageImpl.Literals.DOCUMENT_ROOT);
-    return documentRoot;
+    switch (typeNumber)
+    {
+      case QUOTE: return (DataObject)createQuote();
+      default:
+        return super.create(typeNumber);
+    }
   }
 
   /**
@@ -116,26 +126,193 @@
     QuoteImpl quote = new QuoteImpl();
     return quote;
   }
+  
+  // Following creates and initializes SDO metadata for the supported types.			
+  protected Type quoteType = null;
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  public SimplePackageImpl getSimplePackageImpl()
+  public Type getQuote()
   {
-    return (SimplePackageImpl)getEPackage();
+    return quoteType;
   }
+  
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @deprecated
-   * @generated
-   */
-  public static SimplePackageImpl getPackage()
+  private static boolean isInited = false;
+
+  public static SimpleFactoryImpl init()
   {
-    return SimplePackageImpl.eINSTANCE;
+    if (isInited) return (SimpleFactoryImpl)FactoryBase.getStaticFactory(SimpleFactoryImpl.NAMESPACE_URI);
+    SimpleFactoryImpl theSimpleFactoryImpl = new SimpleFactoryImpl();
+    isInited = true;
+
+    // Initialize simple dependencies
+    SDOUtil.registerStaticTypes(SDOFactory.class);
+    SDOUtil.registerStaticTypes(ModelFactory.class);
+
+    // Create package meta-data objects
+    theSimpleFactoryImpl.createMetaData();
+
+    // Initialize created meta-data
+    theSimpleFactoryImpl.initializeMetaData();
+
+    // Mark meta-data to indicate it can't be changed
+    //theSimpleFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
+
+    return theSimpleFactoryImpl;
   }
+  
+  private boolean isCreated = false;
+
+  public void createMetaData()
+  {
+    if (isCreated) return;
+    isCreated = true;	
 
+    // Create types and their properties
+    quoteType = createType(false, QUOTE);
+    createProperty(true, quoteType, QuoteImpl.SYMBOL);
+    createProperty(true, quoteType, QuoteImpl.COMPANY_NAME);
+    createProperty(true, quoteType, QuoteImpl.PRICE);
+    createProperty(true, quoteType, QuoteImpl.OPEN1);
+    createProperty(true, quoteType, QuoteImpl.HIGH);
+    createProperty(true, quoteType, QuoteImpl.LOW);
+    createProperty(true, quoteType, QuoteImpl.VOLUME);
+    createProperty(true, quoteType, QuoteImpl.CHANGE1);
+    createProperty(false, quoteType, QuoteImpl.QUOTES);
+  }
+  
+  private boolean isInitialized = false;
+
+  public void initializeMetaData()
+  {
+    if (isInitialized) return;
+    isInitialized = true;
+
+    // Obtain other dependent packages
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    Property property = null;
+
+    // Add supertypes to types
+
+    // Initialize types and properties
+    initializeType(quoteType, Quote.class, "Quote", false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.SYMBOL);
+    initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.COMPANY_NAME);
+    initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.PRICE);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.OPEN1);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.HIGH);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.LOW);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, false, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.VOLUME);
+    initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.CHANGE1);
+    initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
+    property = (Property)quoteType.getProperties().get(QuoteImpl.QUOTES);
+    initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true, null);
+
+    createXSDMetaData(theModelPackageImpl);
+  }
+    
+  protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
+  {
+    super.initXSD();
+    
+    Property property = null;
+    
+    property = createGlobalProperty
+      ("stockQuote",
+      this.getQuote(),
+       new String[]
+       {
+       "kind", "element",
+       "name", "stockQuote",
+       "namespace", "##targetNamespace"
+       });
+                
+    addXSDMapping
+      (quoteType,
+       new String[] 
+       {
+       "name", "Quote",
+       "kind", "elementOnly"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.SYMBOL),
+       new String[]
+       {
+       "kind", "element",
+       "name", "symbol"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.COMPANY_NAME),
+       new String[]
+       {
+       "kind", "element",
+       "name", "companyName"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.PRICE),
+       new String[]
+       {
+       "kind", "element",
+       "name", "price"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.OPEN1),
+       new String[]
+       {
+       "kind", "element",
+       "name", "open1"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.HIGH),
+       new String[]
+       {
+       "kind", "element",
+       "name", "high"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.LOW),
+       new String[]
+       {
+       "kind", "element",
+       "name", "low"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.VOLUME),
+       new String[]
+       {
+       "kind", "element",
+       "name", "volume"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.CHANGE1),
+       new String[]
+       {
+       "kind", "element",
+       "name", "change1"
+       });
+
+    addXSDMapping
+      ((Property)quoteType.getProperties().get(QuoteImpl.QUOTES),
+       new String[]
+       {
+       "kind", "element",
+       "name", "quotes"
+       });
+
+  }
+  
 } //SimpleFactoryImpl

Modified: incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java Tue Feb 20 04:06:51 2007
@@ -1,3 +1,23 @@
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
 package org.apache.tuscany.sdo.codegen;
 import junit.framework.Test;
 import junit.framework.TestSuite;

Modified: incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java Tue Feb 20 04:06:51 2007
@@ -1,3 +1,24 @@
+
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
 package org.apache.tuscany.sdo.test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
@@ -9,17 +30,23 @@
 
         TestSuite suite = new TestSuite();
       
-        // suite.addTestSuite(ChangeSummaryOnDataObjectTestCase.class);
-        suite.addTestSuite(ChangeSummaryTestCase.class);
+        suite.addTestSuite(ChangeSummaryOnDataObjectTestCase.class);
         suite.addTestSuite(ChangeSummaryPropertyTestCase.class);
+        suite.addTestSuite(ChangeSummaryTestCase.class);
         suite.addTestSuite(CrossScopeCopyTestCase.class);
+        suite.addTestSuite(DataGraphTestCase.class);
         suite.addTestSuite(DataTypeBaseTypeTestCase.class);
         suite.addTestSuite(DateConversionTestCase.class);
         suite.addTestSuite(DefineOpenContentPropertyTestCase.class);
         suite.addTestSuite(DefineTypeTestCase.class);
         suite.addTestSuite(FormTestCase.class);
+        suite.addTestSuite(HelperContextTestCase.class);
+        suite.addTestSuite(IsManyTestCase.class);
+        suite.addTestSuite(JavaSerializeDeserializeTestCase.class);
         suite.addTestSuite(MixedTypeTestCase.class);
+        suite.addTestSuite(NeverStaleChangeSummaryTestCase.class);
         suite.addTestSuite(OpenTypeTestCase.class);
+        suite.addTestSuite(SchemaLocationTestCase.class);
         suite.addTestSuite(SerializeTypesTestCase.class);
         suite.addTestSuite(SimpleCopyTestCase.class);
         suite.addTestSuite(SimpleDynamicTestCase.class);
@@ -32,7 +59,6 @@
         suite.addTestSuite(XMLStreamHelperTestCase.class);
         suite.addTestSuite(XPathTestCase.class);
         suite.addTestSuite(XSDHelperTestCase.class);
-        suite.addTestSuite(DotNameTest.class);
 
         return suite;
     }

Modified: incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java Tue Feb 20 04:06:51 2007
@@ -53,7 +53,7 @@
         XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
         streamHelper.saveObject(rootObject, streamWriter);
         streamWriter.flush();
-        System.out.println(writer.toString());
+        // System.out.println(writer.toString());
 
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();
         StringReader reader = new StringReader(writer.toString());
@@ -61,9 +61,9 @@
         XMLDocument doc = streamHelper.load(streamReader);
         rootObject = doc.getRootObject();
         DataObject testObject = rootObject.getDataObject("anyTypeElement");
-        System.out.println("anyTypeElement dataobject: " + testObject);
+        // System.out.println("anyTypeElement dataobject: " + testObject);
         testObject = rootObject.getDataObject("personElement");
-        System.out.println("personElement dataobject: " + testObject);
+        // System.out.println("personElement dataobject: " + testObject);
     }
     
     public void testAbstractTypeFails() {

Modified: incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java Tue Feb 20 04:06:51 2007
@@ -30,6 +30,7 @@
 import org.apache.tuscany.sdo.impl.ClassImpl;
 import org.apache.tuscany.sdo.util.SDOUtil;
 
+import com.example.simple.SimpleFactory;
 import com.example.simple.impl.SimpleFactoryImpl;
 import commonj.sdo.DataObject;
 import commonj.sdo.Type;
@@ -82,6 +83,8 @@
     {
         //test for static sdo type.  The test succeeds if the IllegalArgumentException is thrown
         //by XSDHelper.generate method in which case the string xsd must be null;
+
+        SimpleFactory.INSTANCE.register(hc);
         XSDHelper xsdHelper = hc.getXSDHelper();
         DataObject quoteSDO = (DataObject)SimpleFactoryImpl.INSTANCE.createQuote();
         List typeList = new Vector();
@@ -148,7 +151,8 @@
         //sdo types.
         TypeHelper typeHelper = hc.getTypeHelper();
         XSDHelper xsdHelper = hc.getXSDHelper();
-        
+
+        SimpleFactory.INSTANCE.register(hc);
         DataObject quoteSDO = (DataObject)SimpleFactoryImpl.INSTANCE.createQuote();
         
         

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java Tue Feb 20 04:06:51 2007
@@ -21,6 +21,8 @@
 
 import commonj.sdo.Sequence;
 
+import java.io.Serializable;
+
 import java.math.BigDecimal;
 
 import java.util.List;
@@ -46,9 +48,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface MixedQuote
+public interface MixedQuote extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Mixed</b></em>' attribute list.

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java Tue Feb 20 04:06:51 2007
@@ -21,6 +21,8 @@
 
 import commonj.sdo.Sequence;
 
+import java.io.Serializable;
+
 import java.util.List;
 
 /**
@@ -38,9 +40,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface MixedRepeatingChoice
+public interface MixedRepeatingChoice extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Mixed</b></em>' attribute list.

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java Tue Feb 20 04:06:51 2007
@@ -21,6 +21,8 @@
 
 import commonj.sdo.Sequence;
 
+import java.io.Serializable;
+
 import java.util.List;
 
 /**
@@ -37,9 +39,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface RepeatingChoice
+public interface RepeatingChoice extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Group</b></em>' attribute list.

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java Tue Feb 20 04:06:51 2007
@@ -19,6 +19,8 @@
  */
 package com.example.sequences;
 
+import commonj.sdo.helper.HelperContext;
+
 
 /**
  * <!-- begin-user-doc -->
@@ -83,4 +85,13 @@
    */
   TwoRCsMixed createTwoRCsMixed();
 
+  /**
+   * Registers the types supported by this Factory within the supplied scope.argument
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @param scope an instance of HelperContext used to manage the scoping of types.
+   * @generated
+   */
+  public void register(HelperContext scope);
+   
 } //SequencesFactory

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java Tue Feb 20 04:06:51 2007
@@ -21,6 +21,8 @@
 
 import commonj.sdo.Sequence;
 
+import java.io.Serializable;
+
 import java.util.List;
 
 /**
@@ -41,9 +43,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface TwoRCs
+public interface TwoRCs extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Group</b></em>' attribute list.

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java Tue Feb 20 04:06:51 2007
@@ -21,6 +21,8 @@
 
 import commonj.sdo.Sequence;
 
+import java.io.Serializable;
+
 import java.util.List;
 
 /**
@@ -42,9 +44,10 @@
  * </ul>
  * </p>
  *
+ * @extends Serializable
  * @generated
  */
-public interface TwoRCsMixed
+public interface TwoRCsMixed extends Serializable
 {
   /**
    * Returns the value of the '<em><b>Mixed</b></em>' attribute list.

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java Tue Feb 20 04:06:51 2007
@@ -20,12 +20,11 @@
 package com.example.sequences.impl;
 
 import com.example.sequences.MixedQuote;
+import com.example.sequences.SequencesFactory;
 
 import commonj.sdo.Sequence;
 import commonj.sdo.Type;
 
-import commonj.sdo.helper.TypeHelper;
-
 import java.math.BigDecimal;
 
 import java.util.Collection;
@@ -33,8 +32,6 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-import org.apache.tuscany.sdo.util.BasicSequence;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Mixed Quote</b></em>'.
@@ -65,169 +62,177 @@
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int MIXED = 0;
 
   /**
-   * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+   * The feature id for the '<em><b>Symbol</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getMixed()
    * @generated
    * @ordered
-   */
-  
-  // How to get BasicSequence from Sequence?
-  
-  protected BasicSequence mixed = null;
-  
+   */	 
+  public final static int SYMBOL = 1;
+
   /**
-   * The feature id for the '<em><b>Symbol</b></em>' attribute.
+   * The feature id for the '<em><b>Company Name</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
-  public final static int SYMBOL = 1;
+   */	 
+  public final static int COMPANY_NAME = 2;
 
   /**
-   * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
+   * The feature id for the '<em><b>Price</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getSymbol()
    * @generated
    * @ordered
-   */
-  protected static final String SYMBOL_DEFAULT_ = null;
+   */	 
+  public final static int PRICE = 3;
 
   /**
-   * The feature id for the '<em><b>Company Name</b></em>' attribute.
+   * The feature id for the '<em><b>Open1</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
-  public final static int COMPANY_NAME = 2;
+   */	 
+  public final static int OPEN1 = 4;
 
   /**
-   * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
+   * The feature id for the '<em><b>High</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getCompanyName()
    * @generated
    * @ordered
-   */
-  protected static final String COMPANY_NAME_DEFAULT_ = null;
+   */	 
+  public final static int HIGH = 5;
 
   /**
-   * The feature id for the '<em><b>Price</b></em>' attribute.
+   * The feature id for the '<em><b>Low</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
-  public final static int PRICE = 3;
+   */	 
+  public final static int LOW = 6;
 
   /**
-   * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
+   * The feature id for the '<em><b>Volume</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getPrice()
    * @generated
    * @ordered
-   */
-  protected static final BigDecimal PRICE_DEFAULT_ = null;
+   */	 
+  public final static int VOLUME = 7;
 
   /**
-   * The feature id for the '<em><b>Open1</b></em>' attribute.
+   * The feature id for the '<em><b>Change1</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
-  public final static int OPEN1 = 4;
+   */	 
+  public final static int CHANGE1 = 8;
 
   /**
-   * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
+   * The feature id for the '<em><b>Quotes</b></em>' containment reference list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getOpen1()
    * @generated
    * @ordered
-   */
-  protected static final BigDecimal OPEN1_DEFAULT_ = null;
+   */	 
+  public final static int QUOTES = 9;
 
   /**
-   * The feature id for the '<em><b>High</b></em>' attribute.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  public final static int HIGH = 5;
+  
+  public final static int SDO_PROPERTY_COUNT = 10;
 
   /**
-   * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
+   * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getHigh()
+   * @see #getMixed()
    * @generated
    * @ordered
    */
-  protected static final BigDecimal HIGH_DEFAULT_ = null;
+  
+  protected Sequence mixed = null;
+  
+  /**
+   * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getSymbol()
+   * @generated
+   * @ordered
+   */
+  protected static final String SYMBOL_DEFAULT_ = null;
 
   /**
-   * The feature id for the '<em><b>Low</b></em>' attribute.
+   * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
+   * @see #getCompanyName()
    * @generated
    * @ordered
    */
-  public final static int LOW = 6;
+  protected static final String COMPANY_NAME_DEFAULT_ = null;
 
   /**
-   * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
+   * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getLow()
+   * @see #getPrice()
    * @generated
    * @ordered
    */
-  protected static final BigDecimal LOW_DEFAULT_ = null;
+  protected static final BigDecimal PRICE_DEFAULT_ = null;
 
   /**
-   * The feature id for the '<em><b>Volume</b></em>' attribute.
+   * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
+   * @see #getOpen1()
    * @generated
    * @ordered
    */
-  public final static int VOLUME = 7;
+  protected static final BigDecimal OPEN1_DEFAULT_ = null;
 
   /**
-   * The feature id for the '<em><b>Change1</b></em>' attribute.
+   * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
+   * @see #getHigh()
    * @generated
    * @ordered
    */
-  public final static int CHANGE1 = 8;
+  protected static final BigDecimal HIGH_DEFAULT_ = null;
 
   /**
-   * The feature id for the '<em><b>Quotes</b></em>' containment reference list.
+   * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
+   * @see #getLow()
    * @generated
    * @ordered
    */
-  public final static int QUOTES = 9;
+  protected static final BigDecimal LOW_DEFAULT_ = null;
 
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  protected MixedQuoteImpl()
+  public MixedQuoteImpl()
   {
     super();
   }
@@ -239,7 +244,7 @@
    */
   public Type getType()
   {
-    return TypeHelper.INSTANCE.getType(MixedQuote.class); //TBD Generate a more efficient implementation
+    return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedQuote();
   }
 
   /**
@@ -251,12 +256,10 @@
   {
     if (mixed == null)
     {
-        		mixed = createSequence(MIXED);
-        	
+      mixed = createSequence(MIXED);
     }
     return mixed;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -266,7 +269,6 @@
   {
     return (String)get(getMixed(), getType(), SYMBOL);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -274,7 +276,7 @@
    */
   public void setSymbol(String newSymbol)
   {
-        set(getMixed(), getType(), SYMBOL, newSymbol);
+    set(getMixed(), getType(), SYMBOL, newSymbol);
   }
 
   /**
@@ -286,7 +288,6 @@
   {
     return (String)get(getMixed(), getType(), COMPANY_NAME);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -294,7 +295,7 @@
    */
   public void setCompanyName(String newCompanyName)
   {
-        set(getMixed(), getType(), COMPANY_NAME, newCompanyName);
+    set(getMixed(), getType(), COMPANY_NAME, newCompanyName);
   }
 
   /**
@@ -306,7 +307,6 @@
   {
     return (BigDecimal)get(getMixed(), getType(), PRICE);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -314,7 +314,7 @@
    */
   public void setPrice(BigDecimal newPrice)
   {
-        set(getMixed(), getType(), PRICE, newPrice);
+    set(getMixed(), getType(), PRICE, newPrice);
   }
 
   /**
@@ -326,7 +326,6 @@
   {
     return (BigDecimal)get(getMixed(), getType(), OPEN1);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -334,7 +333,7 @@
    */
   public void setOpen1(BigDecimal newOpen1)
   {
-        set(getMixed(), getType(), OPEN1, newOpen1);
+    set(getMixed(), getType(), OPEN1, newOpen1);
   }
 
   /**
@@ -346,7 +345,6 @@
   {
     return (BigDecimal)get(getMixed(), getType(), HIGH);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -354,7 +352,7 @@
    */
   public void setHigh(BigDecimal newHigh)
   {
-        set(getMixed(), getType(), HIGH, newHigh);
+    set(getMixed(), getType(), HIGH, newHigh);
   }
 
   /**
@@ -366,7 +364,6 @@
   {
     return (BigDecimal)get(getMixed(), getType(), LOW);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -374,7 +371,7 @@
    */
   public void setLow(BigDecimal newLow)
   {
-        set(getMixed(), getType(), LOW, newLow);
+    set(getMixed(), getType(), LOW, newLow);
   }
 
   /**
@@ -386,7 +383,6 @@
   {
     return ((Double)get(getMixed(), getType(), VOLUME)).doubleValue();
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -394,7 +390,7 @@
    */
   public void setVolume(double newVolume)
   {
-        set(getMixed(), getType(), VOLUME,  new Double(newVolume));
+    set(getMixed(), getType(), VOLUME,  new Double(newVolume));
   }
 
   /**
@@ -426,7 +422,6 @@
   {
     return ((Double)get(getMixed(), getType(), CHANGE1)).doubleValue();
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -434,7 +429,7 @@
    */
   public void setChange1(double newChange1)
   {
-        set(getMixed(), getType(), CHANGE1,  new Double(newChange1));
+    set(getMixed(), getType(), CHANGE1,  new Double(newChange1));
   }
 
   /**
@@ -467,7 +462,6 @@
           return getList(getMixed(), getType(), QUOTES);
 
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -478,7 +472,7 @@
     switch (propertyIndex)
     {
       case MIXED:
-      			return removeFromSequence(getMixed(), otherEnd, changeContext);
+        return removeFromSequence(getMixed(), otherEnd, changeContext);
       case QUOTES:
         return removeFromList(getQuotes(), otherEnd, changeContext);
     }
@@ -496,7 +490,7 @@
     {
       case MIXED:
         // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
-        		//if (coreType) 
+        //if (coreType) 
         return getMixed();
       case SYMBOL:
         return getSymbol();
@@ -574,7 +568,7 @@
     switch (propertyIndex)
     {
       case MIXED:
-      			unsetSequence(getMixed());
+        unsetSequence(getMixed());
         return;
       case SYMBOL:
         setSymbol(SYMBOL_DEFAULT_);
@@ -617,7 +611,6 @@
     switch (propertyIndex)
     {
       case MIXED:
-        		// KDK - should this be !isSequenceEmpty?
         return mixed != null && !isSequenceEmpty(getMixed());
       case SYMBOL:
         return SYMBOL_DEFAULT_ == null ? getSymbol() != null : !SYMBOL_DEFAULT_.equals(getSymbol());
@@ -648,7 +641,7 @@
    */
   public String toString()
   {
-    if (isProxy()) return super.toString();
+    if (isProxy(this)) return super.toString();
 
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (mixed: ");

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java Tue Feb 20 04:06:51 2007
@@ -20,19 +20,16 @@
 package com.example.sequences.impl;
 
 import com.example.sequences.MixedRepeatingChoice;
+import com.example.sequences.SequencesFactory;
 
 import commonj.sdo.Sequence;
 import commonj.sdo.Type;
 
-import commonj.sdo.helper.TypeHelper;
-
 import java.util.Collection;
 import java.util.List;
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-import org.apache.tuscany.sdo.util.BasicSequence;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Mixed Repeating Choice</b></em>'.
@@ -57,29 +54,16 @@
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int MIXED = 0;
 
   /**
-   * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @see #getMixed()
-   * @generated
-   * @ordered
-   */
-  
-  // How to get BasicSequence from Sequence?
-  
-  protected BasicSequence mixed = null;
-  
-  /**
    * The feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int GROUP = 1;
 
   /**
@@ -88,7 +72,7 @@
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int A = 2;
 
   /**
@@ -97,15 +81,36 @@
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int B = 3;
 
   /**
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
+   * @ordered
    */
-  protected MixedRepeatingChoiceImpl()
+  
+  public final static int SDO_PROPERTY_COUNT = 4;
+
+  /**
+   * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getMixed()
+   * @generated
+   * @ordered
+   */
+  
+  protected Sequence mixed = null;
+  
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public MixedRepeatingChoiceImpl()
   {
     super();
   }
@@ -117,7 +122,7 @@
    */
   public Type getType()
   {
-    return TypeHelper.INSTANCE.getType(MixedRepeatingChoice.class); //TBD Generate a more efficient implementation
+    return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedRepeatingChoice();
   }
 
   /**
@@ -129,12 +134,10 @@
   {
     if (mixed == null)
     {
-        		mixed = createSequence(MIXED);
-        	
+      mixed = createSequence(MIXED);
     }
     return mixed;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -144,7 +147,6 @@
   {
     return createSequence(getMixed(), getType(), GROUP);
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -155,7 +157,6 @@
           return getList(getGroup(), getType(), A);
 
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -166,7 +167,6 @@
           return getList(getGroup(), getType(), B);
 
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -177,9 +177,9 @@
     switch (propertyIndex)
     {
       case MIXED:
-      			return removeFromSequence(getMixed(), otherEnd, changeContext);
+        return removeFromSequence(getMixed(), otherEnd, changeContext);
       case GROUP:
-      			return removeFromSequence(getGroup(), otherEnd, changeContext);
+        return removeFromSequence(getGroup(), otherEnd, changeContext);
     }
     return super.inverseRemove(otherEnd, propertyIndex, changeContext);
   }
@@ -195,11 +195,11 @@
     {
       case MIXED:
         // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
-        		//if (coreType) 
+        //if (coreType) 
         return getMixed();
       case GROUP:
         // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
-        		//if (coreType) 
+        //if (coreType) 
         return getGroup();
       case A:
         return getA();
@@ -246,10 +246,10 @@
     switch (propertyIndex)
     {
       case MIXED:
-      			unsetSequence(getMixed());
+        unsetSequence(getMixed());
         return;
       case GROUP:
-      			unsetSequence(getGroup());
+        unsetSequence(getGroup());
         return;
       case A:
         getA().clear();
@@ -271,10 +271,9 @@
     switch (propertyIndex)
     {
       case MIXED:
-        		// KDK - should this be !isSequenceEmpty?
         return mixed != null && !isSequenceEmpty(getMixed());
       case GROUP:
-        		return !isSequenceEmpty(getGroup());
+        return !isSequenceEmpty(getGroup());
       case A:
         return !getA().isEmpty();
       case B:
@@ -290,7 +289,7 @@
    */
   public String toString()
   {
-    if (isProxy()) return super.toString();
+    if (isProxy(this)) return super.toString();
 
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (mixed: ");

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java?view=diff&rev=509526&r1=509525&r2=509526
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java Tue Feb 20 04:06:51 2007
@@ -20,19 +20,16 @@
 package com.example.sequences.impl;
 
 import com.example.sequences.RepeatingChoice;
+import com.example.sequences.SequencesFactory;
 
 import commonj.sdo.Sequence;
 import commonj.sdo.Type;
 
-import commonj.sdo.helper.TypeHelper;
-
 import java.util.Collection;
 import java.util.List;
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-import org.apache.tuscany.sdo.util.BasicSequence;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Repeating Choice</b></em>'.
@@ -56,46 +53,54 @@
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
+   */	 
   public final static int GROUP = 0;
 
   /**
-   * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
+   * The feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @see #getGroup()
    * @generated
    * @ordered
-   */
-  
-  // How to get BasicSequence from Sequence?
-  
-  protected BasicSequence group = null;
-  
+   */	 
+  public final static int A = 1;
+
   /**
-   * The feature id for the '<em><b>A</b></em>' attribute list.
+   * The feature id for the '<em><b>B</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */
-  public final static int A = 1;
+   */	 
+  public final static int B = 2;
 
   /**
-   * The feature id for the '<em><b>B</b></em>' attribute list.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  public final static int B = 2;
+  
+  public final static int SDO_PROPERTY_COUNT = 3;
 
   /**
+   * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #getGroup()
+   * @generated
+   * @ordered
+   */
+  
+  protected Sequence group = null;
+  
+  /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    */
-  protected RepeatingChoiceImpl()
+  public RepeatingChoiceImpl()
   {
     super();
   }
@@ -107,7 +112,7 @@
    */
   public Type getType()
   {
-    return TypeHelper.INSTANCE.getType(RepeatingChoice.class); //TBD Generate a more efficient implementation
+    return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getRepeatingChoice();
   }
 
   /**
@@ -119,12 +124,10 @@
   {
     if (group == null)
     {
-        		group = createSequence(GROUP);
-        	
+      group = createSequence(GROUP);
     }
     return group;
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -135,7 +138,6 @@
           return getList(getGroup(), getType(), A);
 
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -146,7 +148,6 @@
           return getList(getGroup(), getType(), B);
 
   }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -157,7 +158,7 @@
     switch (propertyIndex)
     {
       case GROUP:
-      			return removeFromSequence(getGroup(), otherEnd, changeContext);
+        return removeFromSequence(getGroup(), otherEnd, changeContext);
     }
     return super.inverseRemove(otherEnd, propertyIndex, changeContext);
   }
@@ -173,7 +174,7 @@
     {
       case GROUP:
         // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
-        		//if (coreType) 
+        //if (coreType) 
         return getGroup();
       case A:
         return getA();
@@ -217,7 +218,7 @@
     switch (propertyIndex)
     {
       case GROUP:
-      			unsetSequence(getGroup());
+        unsetSequence(getGroup());
         return;
       case A:
         getA().clear();
@@ -239,7 +240,6 @@
     switch (propertyIndex)
     {
       case GROUP:
-        		// KDK - should this be !isSequenceEmpty?
         return group != null && !isSequenceEmpty(getGroup());
       case A:
         return !getA().isEmpty();
@@ -256,7 +256,7 @@
    */
   public String toString()
   {
-    if (isProxy()) return super.toString();
+    if (isProxy(this)) return super.toString();
 
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (group: ");



---------------------------------------------------------------------
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