You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/02/21 13:34:21 UTC

svn commit: r509984 [4/4] - in /incubator/tuscany/java/sdo: impl/src/main/java/org/apache/tuscany/sdo/helper/ impl/src/main/java/org/apache/tuscany/sdo/impl/ impl/src/main/java/org/apache/tuscany/sdo/util/ impl/src/test/java/org/apache/tuscany/sdo/test...

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=509984&r1=509983&r2=509984
==============================================================================
--- 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 Wed Feb 21 04:34:19 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  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.
+ * $Id$
  */
 package com.example.sequences.impl;
 
@@ -30,6 +17,7 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
+  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Mixed Repeating Choice</b></em>'.
@@ -48,51 +36,77 @@
  */
 public class MixedRepeatingChoiceImpl extends DataObjectBase implements MixedRepeatingChoice
 {
+
+  public final static int MIXED = -1;
+
+  public final static int GROUP = -2;
+
+  public final static int A = 0;
+
+  public final static int B = 1;
+
+  public final static int SDO_PROPERTY_COUNT = 2;
+
+  public final static int EXTENDED_PROPERTY_COUNT = -2;
+
+
   /**
-   * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Mixed</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int MIXED = 0;
+   */ 
+  public final static int INTERNAL_MIXED = 0;
 
   /**
-   * The feature id for the '<em><b>Group</b></em>' attribute list.
+   * The internal 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;
+   */ 
+  public final static int INTERNAL_GROUP = 1;
 
   /**
-   * The feature id for the '<em><b>A</b></em>' attribute list.
+   * The internal feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int A = 2;
+   */ 
+  public final static int INTERNAL_A = 2;
 
   /**
-   * The feature id for the '<em><b>B</b></em>' attribute list.
+   * The internal feature id for the '<em><b>B</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int B = 3;
+   */ 
+  public final static int INTERNAL_B = 3;
 
   /**
-   * This represents the number of properties for this type.
+   * The number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  
-  public final static int SDO_PROPERTY_COUNT = 4;
+  public final static int INTERNAL_PROPERTY_COUNT = 4;
+
+  protected int internalConvertIndex(int internalIndex)
+  {
+    switch (internalIndex)
+    {
+      case INTERNAL_MIXED: return MIXED;
+      case INTERNAL_GROUP: return GROUP;
+      case INTERNAL_A: return A;
+      case INTERNAL_B: return B;
+    }
+    return super.internalConvertIndex(internalIndex);
+  }
+
 
   /**
    * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
@@ -134,7 +148,7 @@
   {
     if (mixed == null)
     {
-      mixed = createSequence(MIXED);
+      mixed = createSequence(INTERNAL_MIXED);
     }
     return 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=509984&r1=509983&r2=509984
==============================================================================
--- 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 Wed Feb 21 04:34:19 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  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.
+ * $Id$
  */
 package com.example.sequences.impl;
 
@@ -30,6 +17,7 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
+  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Repeating Choice</b></em>'.
@@ -47,42 +35,65 @@
  */
 public class RepeatingChoiceImpl extends DataObjectBase implements RepeatingChoice
 {
+
+  public final static int GROUP = -1;
+
+  public final static int A = 0;
+
+  public final static int B = 1;
+
+  public final static int SDO_PROPERTY_COUNT = 2;
+
+  public final static int EXTENDED_PROPERTY_COUNT = -1;
+
+
   /**
-   * The feature id for the '<em><b>Group</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int GROUP = 0;
+   */ 
+  public final static int INTERNAL_GROUP = 0;
 
   /**
-   * The feature id for the '<em><b>A</b></em>' attribute list.
+   * The internal feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int A = 1;
+   */ 
+  public final static int INTERNAL_A = 1;
 
   /**
-   * The feature id for the '<em><b>B</b></em>' attribute list.
+   * The internal feature id for the '<em><b>B</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int B = 2;
+   */ 
+  public final static int INTERNAL_B = 2;
 
   /**
-   * This represents the number of properties for this type.
+   * The number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  
-  public final static int SDO_PROPERTY_COUNT = 3;
+  public final static int INTERNAL_PROPERTY_COUNT = 3;
+
+  protected int internalConvertIndex(int internalIndex)
+  {
+    switch (internalIndex)
+    {
+      case INTERNAL_GROUP: return GROUP;
+      case INTERNAL_A: return A;
+      case INTERNAL_B: return B;
+    }
+    return super.internalConvertIndex(internalIndex);
+  }
+
 
   /**
    * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
@@ -124,7 +135,7 @@
   {
     if (group == null)
     {
-      group = createSequence(GROUP);
+      group = createSequence(INTERNAL_GROUP);
     }
     return group;
   }

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java?view=diff&rev=509984&r1=509983&r2=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java Wed Feb 21 04:34:19 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  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.
+ * $Id$
  */
 package com.example.sequences.impl;
 
@@ -42,7 +29,7 @@
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
  * Generator information:
- * patternVersion=1.0; -prefix Sequences
+ * patternVersion=1.1; -prefix Sequences
  * <!-- end-user-doc -->
  * @generated
  */
@@ -71,7 +58,7 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public static final String PATTERN_VERSION = "1.0";
+  public static final String PATTERN_VERSION = "1.1";
   
   public static final int MIXED_QUOTE = 1;	
   public static final int MIXED_REPEATING_CHOICE = 2;	
@@ -245,46 +232,42 @@
 
     // Create types and their properties
     mixedQuoteType = createType(false, MIXED_QUOTE);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.MIXED);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.SYMBOL);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.COMPANY_NAME);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.PRICE);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.OPEN1);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.HIGH);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.LOW);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.VOLUME);
-    createProperty(true, mixedQuoteType, MixedQuoteImpl.CHANGE1);
-    createProperty(false, mixedQuoteType, MixedQuoteImpl.QUOTES);
-
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_MIXED); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_SYMBOL); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_COMPANY_NAME); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_PRICE); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_OPEN1); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_HIGH); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_LOW); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_VOLUME); 
+    createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_CHANGE1); 
+    createProperty(false, mixedQuoteType,MixedQuoteImpl.INTERNAL_QUOTES); 
     mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
-    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.MIXED);
-    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.GROUP);
-    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.A);
-    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.B);
-
+    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_MIXED); 
+    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_GROUP); 
+    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_A); 
+    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_B); 
     repeatingChoiceType = createType(false, REPEATING_CHOICE);
-    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.GROUP);
-    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.A);
-    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.B);
-
+    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_GROUP); 
+    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_A); 
+    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_B); 
     twoRCsType = createType(false, TWO_RCS);
-    createProperty(true, twoRCsType, TwoRCsImpl.GROUP);
-    createProperty(true, twoRCsType, TwoRCsImpl.A);
-    createProperty(true, twoRCsType, TwoRCsImpl.B);
-    createProperty(true, twoRCsType, TwoRCsImpl.SPLIT);
-    createProperty(true, twoRCsType, TwoRCsImpl.GROUP1);
-    createProperty(true, twoRCsType, TwoRCsImpl.Y);
-    createProperty(true, twoRCsType, TwoRCsImpl.Z);
-
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_A); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_B); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_SPLIT); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP1); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Y); 
+    createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Z); 
     twoRCsMixedType = createType(false, TWO_RCS_MIXED);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.MIXED);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.A);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.B);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.SPLIT);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP1);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Y);
-    createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Z);
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_MIXED); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_A); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_B); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_SPLIT); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP1); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_Y); 
+    createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_Z); 
   }
   
   private boolean isInitialized = false;
@@ -302,446 +285,107 @@
 
     // Initialize types and properties
     initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote", false);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED);
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL);
     initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME);
     initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, false, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME);
     initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1);
     initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true);
-    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES);
-    initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true, null);
+
+    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES);
+    initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true , null);
 
     initializeType(mixedRepeatingChoiceType, MixedRepeatingChoice.class, "MixedRepeatingChoice", false);
-    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED);
+    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false);
-    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP);
+
+    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
-    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A);
+
+    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
-    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B);
+
+    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
 
     initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice", false);
-    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP);
+    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false);
-    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A);
+
+    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true);
-    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B);
+
+    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true);
 
     initializeType(twoRCsType, TwoRCs.class, "TwoRCs", false);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP);
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.A);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.B);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT);
     initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, false, false);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1);
     initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Y);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y);
     initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true);
-    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Z);
+
+    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z);
     initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true);
 
     initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed", false);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED);
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT);
     initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1);
     initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y);
     initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true);
-    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z);
+
+    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z);
     initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCsMixed.class, false, false, true);
 
-    createXSDMetaData(theModelPackageImpl);
   }
-    
-  protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
-  {
-    super.initXSD();
-    
-    Property property = null;
-    
-    property = createGlobalProperty
-      ("mixedStockQuote",
-      this.getMixedQuote(),
-       new String[]
-       {
-       "kind", "element",
-       "name", "mixedStockQuote",
-       "namespace", "##targetNamespace"
-       });
-                
-    property = createGlobalProperty
-      ("mrc",
-      this.getMixedRepeatingChoice(),
-       new String[]
-       {
-       "kind", "element",
-       "name", "mrc",
-       "namespace", "##targetNamespace"
-       });
-                
-    property = createGlobalProperty
-      ("mrc2",
-      this.getTwoRCsMixed(),
-       new String[]
-       {
-       "kind", "element",
-       "name", "mrc2",
-       "namespace", "##targetNamespace"
-       });
-                
-    property = createGlobalProperty
-      ("rc",
-      this.getRepeatingChoice(),
-       new String[]
-       {
-       "kind", "element",
-       "name", "rc",
-       "namespace", "##targetNamespace"
-       });
-                
-    property = createGlobalProperty
-      ("rc2",
-      this.getTwoRCs(),
-       new String[]
-       {
-       "kind", "element",
-       "name", "rc2",
-       "namespace", "##targetNamespace"
-       });
-                
-    addXSDMapping
-      (mixedQuoteType,
-       new String[] 
-       {
-       "name", "MixedQuote",
-       "kind", "mixed"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED),
-       new String[]
-       {
-       "kind", "elementWildcard",
-       "name", ":mixed"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL),
-       new String[]
-       {
-       "kind", "element",
-       "name", "symbol"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME),
-       new String[]
-       {
-       "kind", "element",
-       "name", "companyName"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE),
-       new String[]
-       {
-       "kind", "element",
-       "name", "price"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1),
-       new String[]
-       {
-       "kind", "element",
-       "name", "open1"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH),
-       new String[]
-       {
-       "kind", "element",
-       "name", "high"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW),
-       new String[]
-       {
-       "kind", "element",
-       "name", "low"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME),
-       new String[]
-       {
-       "kind", "element",
-       "name", "volume"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1),
-       new String[]
-       {
-       "kind", "element",
-       "name", "change1"
-       });
-
-    addXSDMapping
-      ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES),
-       new String[]
-       {
-       "kind", "element",
-       "name", "quotes"
-       });
-
-    addXSDMapping
-      (mixedRepeatingChoiceType,
-       new String[] 
-       {
-       "name", "MixedRepeatingChoice",
-       "kind", "mixed"
-       });
-
-    addXSDMapping
-      ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED),
-       new String[]
-       {
-       "kind", "elementWildcard",
-       "name", ":mixed"
-       });
-
-    addXSDMapping
-      ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:1"
-       });
-
-    addXSDMapping
-      ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A),
-       new String[]
-       {
-       "kind", "element",
-       "name", "a",
-       "group", "#group:1"
-       });
-
-    addXSDMapping
-      ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B),
-       new String[]
-       {
-       "kind", "element",
-       "name", "b",
-       "group", "#group:1"
-       });
-
-    addXSDMapping
-      (repeatingChoiceType,
-       new String[] 
-       {
-       "name", "RepeatingChoice",
-       "kind", "elementOnly"
-       });
-
-    addXSDMapping
-      ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:0"
-       });
-
-    addXSDMapping
-      ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A),
-       new String[]
-       {
-       "kind", "element",
-       "name", "a",
-       "group", "#group:0"
-       });
-
-    addXSDMapping
-      ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B),
-       new String[]
-       {
-       "kind", "element",
-       "name", "b",
-       "group", "#group:0"
-       });
-
-    addXSDMapping
-      (twoRCsType,
-       new String[] 
-       {
-       "name", "TwoRCs",
-       "kind", "elementOnly"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:0"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.A),
-       new String[]
-       {
-       "kind", "element",
-       "name", "a",
-       "group", "#group:0"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.B),
-       new String[]
-       {
-       "kind", "element",
-       "name", "b",
-       "group", "#group:0"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT),
-       new String[]
-       {
-       "kind", "element",
-       "name", "split"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:4"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Y),
-       new String[]
-       {
-       "kind", "element",
-       "name", "y",
-       "group", "#group:4"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Z),
-       new String[]
-       {
-       "kind", "element",
-       "name", "z",
-       "group", "#group:4"
-       });
-
-    addXSDMapping
-      (twoRCsMixedType,
-       new String[] 
-       {
-       "name", "TwoRCsMixed",
-       "kind", "mixed"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED),
-       new String[]
-       {
-       "kind", "elementWildcard",
-       "name", ":mixed"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:1"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A),
-       new String[]
-       {
-       "kind", "element",
-       "name", "a",
-       "group", "#group:1"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B),
-       new String[]
-       {
-       "kind", "element",
-       "name", "b",
-       "group", "#group:1"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT),
-       new String[]
-       {
-       "kind", "element",
-       "name", "split"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1),
-       new String[]
-       {
-       "kind", "group",
-       "name", "group:5"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y),
-       new String[]
-       {
-       "kind", "element",
-       "name", "y",
-       "group", "#group:5"
-       });
-
-    addXSDMapping
-      ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z),
-       new String[]
-       {
-       "kind", "element",
-       "name", "z",
-       "group", "#group:5"
-       });
 
-  }
-  
+    
 } //SequencesFactoryImpl

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java?view=diff&rev=509984&r1=509983&r2=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java Wed Feb 21 04:34:19 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  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.
+ * $Id$
  */
 package com.example.sequences.impl;
 
@@ -30,6 +17,7 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
+  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Two RCs</b></em>'.
@@ -51,78 +39,113 @@
  */
 public class TwoRCsImpl extends DataObjectBase implements TwoRCs
 {
+
+  public final static int GROUP = -1;
+
+  public final static int A = 0;
+
+  public final static int B = 1;
+
+  public final static int SPLIT = 2;
+
+  public final static int GROUP1 = -2;
+
+  public final static int Y = 3;
+
+  public final static int Z = 4;
+
+  public final static int SDO_PROPERTY_COUNT = 5;
+
+  public final static int EXTENDED_PROPERTY_COUNT = -2;
+
+
   /**
-   * The feature id for the '<em><b>Group</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int GROUP = 0;
+   */ 
+  public final static int INTERNAL_GROUP = 0;
 
   /**
-   * The feature id for the '<em><b>A</b></em>' attribute list.
+   * The internal feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int A = 1;
+   */ 
+  public final static int INTERNAL_A = 1;
 
   /**
-   * The feature id for the '<em><b>B</b></em>' attribute list.
+   * The internal feature id for the '<em><b>B</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int B = 2;
+   */ 
+  public final static int INTERNAL_B = 2;
 
   /**
-   * The feature id for the '<em><b>Split</b></em>' attribute.
+   * The internal feature id for the '<em><b>Split</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int SPLIT = 3;
+   */ 
+  public final static int INTERNAL_SPLIT = 3;
 
   /**
-   * The feature id for the '<em><b>Group1</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int GROUP1 = 4;
+   */ 
+  public final static int INTERNAL_GROUP1 = 4;
 
   /**
-   * The feature id for the '<em><b>Y</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Y</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int Y = 5;
+   */ 
+  public final static int INTERNAL_Y = 5;
 
   /**
-   * The feature id for the '<em><b>Z</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Z</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int Z = 6;
+   */ 
+  public final static int INTERNAL_Z = 6;
 
   /**
-   * This represents the number of properties for this type.
+   * The number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  
-  public final static int SDO_PROPERTY_COUNT = 7;
+  public final static int INTERNAL_PROPERTY_COUNT = 7;
+
+  protected int internalConvertIndex(int internalIndex)
+  {
+    switch (internalIndex)
+    {
+      case INTERNAL_GROUP: return GROUP;
+      case INTERNAL_A: return A;
+      case INTERNAL_B: return B;
+      case INTERNAL_SPLIT: return SPLIT;
+      case INTERNAL_GROUP1: return GROUP1;
+      case INTERNAL_Y: return Y;
+      case INTERNAL_Z: return Z;
+    }
+    return super.internalConvertIndex(internalIndex);
+  }
+
 
   /**
    * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
@@ -195,7 +218,7 @@
   {
     if (group == null)
     {
-      group = createSequence(GROUP);
+      group = createSequence(INTERNAL_GROUP);
     }
     return group;
   }
@@ -250,7 +273,7 @@
   {
     if (group1 == null)
     {
-      group1 = createSequence(GROUP1);
+      group1 = createSequence(INTERNAL_GROUP1);
     }
     return group1;
   }

Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java?view=diff&rev=509984&r1=509983&r2=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java Wed Feb 21 04:34:19 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  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.
+ * $Id$
  */
 package com.example.sequences.impl;
 
@@ -30,6 +17,7 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
+  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Two RCs Mixed</b></em>'.
@@ -52,87 +40,125 @@
  */
 public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed
 {
+
+  public final static int MIXED = -1;
+
+  public final static int GROUP = -2;
+
+  public final static int A = 0;
+
+  public final static int B = 1;
+
+  public final static int SPLIT = 2;
+
+  public final static int GROUP1 = -3;
+
+  public final static int Y = 3;
+
+  public final static int Z = 4;
+
+  public final static int SDO_PROPERTY_COUNT = 5;
+
+  public final static int EXTENDED_PROPERTY_COUNT = -3;
+
+
   /**
-   * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Mixed</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int MIXED = 0;
+   */ 
+  public final static int INTERNAL_MIXED = 0;
 
   /**
-   * The feature id for the '<em><b>Group</b></em>' attribute list.
+   * The internal 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;
+   */ 
+  public final static int INTERNAL_GROUP = 1;
 
   /**
-   * The feature id for the '<em><b>A</b></em>' attribute list.
+   * The internal feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int A = 2;
+   */ 
+  public final static int INTERNAL_A = 2;
 
   /**
-   * The feature id for the '<em><b>B</b></em>' attribute list.
+   * The internal feature id for the '<em><b>B</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int B = 3;
+   */ 
+  public final static int INTERNAL_B = 3;
 
   /**
-   * The feature id for the '<em><b>Split</b></em>' attribute.
+   * The internal feature id for the '<em><b>Split</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int SPLIT = 4;
+   */ 
+  public final static int INTERNAL_SPLIT = 4;
 
   /**
-   * The feature id for the '<em><b>Group1</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int GROUP1 = 5;
+   */ 
+  public final static int INTERNAL_GROUP1 = 5;
 
   /**
-   * The feature id for the '<em><b>Y</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Y</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int Y = 6;
+   */ 
+  public final static int INTERNAL_Y = 6;
 
   /**
-   * The feature id for the '<em><b>Z</b></em>' attribute list.
+   * The internal feature id for the '<em><b>Z</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int Z = 7;
+   */ 
+  public final static int INTERNAL_Z = 7;
 
   /**
-   * This represents the number of properties for this type.
+   * The number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  
-  public final static int SDO_PROPERTY_COUNT = 8;
+  public final static int INTERNAL_PROPERTY_COUNT = 8;
+
+  protected int internalConvertIndex(int internalIndex)
+  {
+    switch (internalIndex)
+    {
+      case INTERNAL_MIXED: return MIXED;
+      case INTERNAL_GROUP: return GROUP;
+      case INTERNAL_A: return A;
+      case INTERNAL_B: return B;
+      case INTERNAL_SPLIT: return SPLIT;
+      case INTERNAL_GROUP1: return GROUP1;
+      case INTERNAL_Y: return Y;
+      case INTERNAL_Z: return Z;
+    }
+    return super.internalConvertIndex(internalIndex);
+  }
+
 
   /**
    * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
@@ -184,7 +210,7 @@
   {
     if (mixed == null)
     {
-      mixed = createSequence(MIXED);
+      mixed = createSequence(INTERNAL_MIXED);
     }
     return mixed;
   }
@@ -224,7 +250,7 @@
    */
   public String getSplit()
   {
-    return (String)get(getMixed(), getType(), SPLIT);
+    return (String)get(getMixed(), getType(), INTERNAL_SPLIT);
   }
   /**
    * <!-- begin-user-doc -->
@@ -233,7 +259,7 @@
    */
   public void setSplit(String newSplit)
   {
-    set(getMixed(), getType(), SPLIT, newSplit);
+    set(getMixed(), getType(), INTERNAL_SPLIT, newSplit);
   }
 
   /**

Added: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java?view=auto&rev=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java (added)
+++ incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java Wed Feb 21 04:34:19 2007
@@ -0,0 +1,83 @@
+package org.apache.tuscany.sdo.test;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sdo.util.SDOUtil;
+
+import com.example.subgroup.A;
+import com.example.subgroup.B;
+import com.example.subgroup.Bprime;
+import com.example.subgroup.SubgroupFactory;
+import com.example.subgroup.impl.AImpl;
+import commonj.sdo.DataObject;
+import commonj.sdo.helper.HelperContext;
+import commonj.sdo.helper.XMLDocument;
+
+public class InheritanceTestCase extends TestCase {
+
+	private HelperContext scope;
+
+	public void testSubGroupLoad() throws IOException {
+		XMLDocument doc = scope.getXMLHelper().load(
+		    getClass().getResourceAsStream("/subgroup1.xml"));
+		assertEquals("a", doc.getRootElementName());
+		String strdoc = scope.getXMLHelper().save(
+				doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
+		assertTrue(strdoc.indexOf("<subgroup:imInTypeB>thisIsElB</subgroup:imInTypeB>") != -1);
+	}
+
+	public void testSubGroup_AcontainsB() {
+		A a = (A) scope.getDataFactory().create(A.class);
+		B b = (B) scope.getDataFactory().create(B.class);
+		b.setImInTypeB("thisIsElB");
+		a.setGe1(b);
+
+		assertSame(b, a.getGe1());
+		assertSame(b, ((AImpl) a).get(AImpl.GE1));
+
+		String doc = scope.getXMLHelper().save((DataObject) a,
+		    "http://example.com/subgroup", "a");
+		assertTrue(doc.indexOf("<subgroup:imInTypeB>thisIsElB</subgroup:imInTypeB>") != -1);
+
+	}
+
+	public void testSubGroup_AcontainsBprime() {
+		A a = (A) scope.getDataFactory().create(A.class);
+		Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
+		bp.setImInTypeBprime("thisIsElBprime");
+		a.setGe1(bp);
+
+		assertSame(bp, a.getGe1());
+		assertSame(bp, ((AImpl) a).get(AImpl.GE1));
+
+		String doc = scope.getXMLHelper().save((DataObject) a,
+		    "http://example.com/subgroup", "a");
+		
+		assertTrue(doc.indexOf("<subgroup:imInTypeBprime>thisIsElBprime</subgroup:imInTypeBprime>") != -1);
+
+	}
+
+	public void testSubGroup_Bprime() {
+		Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
+		bp.setImInTypeB("bValue");
+		bp.setImInTypeBprime("bpvalue");
+		String doc = scope.getXMLHelper().save((DataObject) bp,
+		    "http://example.com/subgroup", "bp");
+		assertTrue(doc.indexOf("<subgroup:imInTypeB>bValue</subgroup:imInTypeB>") != -1);
+		assertTrue(doc.indexOf("<subgroup:imInTypeBprime>bpvalue</subgroup:imInTypeBprime>") != -1);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		scope = SDOUtil.createHelperContext();
+
+		SubgroupFactory.INSTANCE.register(scope);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+}

Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd?view=auto&rev=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd (added)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd Wed Feb 21 04:34:19 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  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.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sg="http://example.com/subgroup" elementFormDefault="qualified" targetNamespace="http://example.com/subgroup">
+
+  <element name="a" type="sg:A"/>
+  
+  <complexType name="A">
+    <sequence>
+      <element maxOccurs="1" minOccurs="1" ref="sg:ge1"/> 
+    </sequence>
+  </complexType>
+
+  <element name="ge1" type="sg:B"/>
+  <element name="se1" substitutionGroup="sg:ge1" type="sg:Bprime"/>
+
+  <complexType name="B">
+    <sequence>
+        <element maxOccurs="1" name="imInTypeB" type="string"/>
+    </sequence>
+  </complexType>
+
+  <complexType name="Bprime">
+      <complexContent>
+          <extension base="sg:B">
+              <sequence>
+                  <element name="imInTypeBprime" type="string"/>
+              </sequence>
+          </extension>
+      </complexContent>
+  </complexType>
+</schema>

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml?view=auto&rev=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml (added)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml Wed Feb 21 04:34:19 2007
@@ -0,0 +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.
+ -->
+<subgroup:a xmlns:subgroup="http://example.com/subgroup">
+  <subgroup:ge1>
+    <subgroup:imInTypeB>thisIsElB</subgroup:imInTypeB>
+  </subgroup:ge1>
+</subgroup:a>

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/subgroup1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet?view=diff&rev=509984&r1=509983&r2=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet Wed Feb 21 04:34:19 2007
@@ -1,4 +1,4 @@
-<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" skeleton="generator.skeleton" imports="org.apache.tuscany.sdo.generate.util.* java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="SDOClass" version="$Id: Class.javajet,v 1.41 2006/02/15 19:58:39 emerks Exp $" %>
+<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" imports="org.eclipse.emf.codegen.util.* org.apache.tuscany.sdo.impl.* java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.apache.tuscany.sdo.generate.util.*" class="SDOClass" version="$Id: Class.javajet,v 1.41 2006/02/15 19:58:39 emerks Exp $" %>
 <%
 /**
  *
@@ -22,7 +22,11 @@
 %>
 <%GenClass genClass = (GenClass)((Object[])argument)[0]; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel();%>
 <%boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);%>
+<%boolean isDebug = false;%>
 <%String publicStaticFinalFlag = isImplementation ? "public static final " : "";%>
+<%/*%>
+<% * Output preamble and javadoc header%>
+<% */%>
 <%@ include file="../Header.javajetinc"%>
 <%if (isInterface) {%>
 package <%=genPackage.getInterfacePackageName()%>;
@@ -32,6 +36,9 @@
 
 <%genModel.markImportLocation(stringBuffer, genPackage);%>
 
+<%if (isDebug) { // EYECATCHER 1 %>
+  // EYECATCHER 1
+<%}%>
 <%if (isInterface) {%>
 /**
  * <!-- begin-user-doc -->
@@ -49,6 +56,9 @@
  * The following features are supported:
  * <ul>
 <%for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
+  <%if (isDebug) { // EYECATCHER 2%>
+// debug EYECATCHER 2
+  <% } %>
   <%if (!genFeature.isSuppressedGetVisibility()) {%>
  *   <li>{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
   <%}%>
@@ -67,7 +77,7 @@
 <%}} if (first) {%>
  * @model
 <%}}%>
-<%if (genClass.needsRootExtendsInterfaceExtendsTag()) {%>
+<%if (genClass.needsRootExtendsInterfaceExtendsTag()) { // does it need an @extends tag %>
  * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%>
 <%}%>
  * @generated
@@ -162,52 +172,140 @@
 
 <%}%>
 <%if (isImplementation && !genModel.isReflectiveDelegation()) {%>
+
+   <%ClassImpl classImpl = (ClassImpl) genClass.getEcoreClass();%>
+   <%List declaredProperties = classImpl.getDeclaredProperties();%>
+   <%List extendedProperties = classImpl.getExtendedProperties();%>
+   <%int declaredPropertiesCount = 0;%>
+   <%int extendedPropertiesCount = 0;%>
+   <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
+     <%if (declaredProperties.contains(genFeature.getEcoreFeature())){%>
+       <%declaredPropertiesCount++;%>
+       <%String featureValue = "";
+       List allFeatures = genClass.getAllGenFeatures();
+       int g = allFeatures.indexOf(genFeature);
+       GenClass base = genClass.getBaseGenClass();
+       if (base == null)
+       {
+         featureValue = Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
+       } else {
+         int baseCount = base.getFeatureCount();    
+         if (g < baseCount)
+         {
+           featureValue = base.getClassName() + "." + genFeature.getUpperName();
+         } else {
+           String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
+           featureValue =  baseCountID + " + " + Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
+          }
+       }%>
+	public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;
+
+     <%} else if (extendedProperties.contains(genFeature.getEcoreFeature())){%>
+       <%extendedPropertiesCount++;%>
+       <%String featureValue = "";
+       List allFeatures = genClass.getAllGenFeatures();
+       int g = allFeatures.indexOf(genFeature);
+       GenClass base = genClass.getBaseGenClass();
+       if (base == null)
+       {
+         featureValue = Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
+       } else {
+         int baseCount = base.getFeatureCount();    
+         if (g < baseCount)
+         {
+           featureValue = base.getClassName() + "." + genFeature.getUpperName();
+         } else {
+           String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
+           featureValue =  baseCountID + " + " + Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
+          }
+       }%>
+	public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;
+
+     <%}%>
+   <%}%>
+   <%String featureCount = "";%>
+   <%GenClass base = genClass.getBaseGenClass();%>
+   <%if (base == null)%>
+     <%{%>
+       <%featureCount = Integer.toString(declaredPropertiesCount);%>
+     <%}%>
+     <%else {%>
+       <%String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";%>
+       <%featureCount = baseCountID + " + " + Integer.toString(declaredPropertiesCount);%>
+     <%}%>
+	public final static int SDO_PROPERTY_COUNT = <%=featureCount%>;
+
+   <%featureCount = "";%>
+   <%base = genClass.getBaseGenClass();%>
+   <%if (base == null)%>
+     <%{%>
+       <%featureCount = Integer.toString(extendedPropertiesCount*-1);%>
+     <%}%>
+     <%else {%>
+       <%String baseCountID = base.getClassName() + "." + "EXTENDED_PROPERTY_COUNT";%>
+       <%featureCount = baseCountID + " - " + Integer.toString(extendedPropertiesCount);%>
+     <%}%>
+	public final static int EXTENDED_PROPERTY_COUNT = <%=featureCount%>;
+
+
   <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
 	/**
-	 * The feature id for the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
+	 * The internal feature id for the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-    <%String featureValue = "";
-    List allFeatures = genClass.getAllGenFeatures();
-    int g = allFeatures.indexOf(genFeature);
-    GenClass base = genClass.getBaseGenClass();
-    if (base == null)
-    {
-      featureValue = Integer.toString(g);
-    } else {
-      int baseCount = base.getFeatureCount();    
-      if (g < baseCount)
-      {
-        featureValue = base.getClassName() + "." + genFeature.getUpperName();
-      } else {
-        String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
-        featureValue =  baseCountID + " + " + Integer.toString(g - baseCount);
-       }
-     }%>	 
-	public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;
+    <%String featureValue = "";%>
+    <%List allFeatures = genClass.getAllGenFeatures();%>
+    <%int g = allFeatures.indexOf(genFeature);%>
+    <%base = genClass.getBaseGenClass();%>
+    <%if (base == null)%>
+    <%{%>
+      <%featureValue = Integer.toString(g);%>
+    <%} else {%>
+      <%int baseCount = base.getFeatureCount();%>
+      <%if (g < baseCount)%>
+      <%{%>
+        <%featureValue = base.getClassName() + "." + genFeature.getUpperName();%>
+      <%} else {%>
+        <%String baseCountID = base.getClassName() + "." + "INTERNAL_PROPERTY_COUNT";%>
+        <%featureValue =  baseCountID + " + " + Integer.toString(g - baseCount);%>
+       <%}%>
+     <%}%> 
+	public final static int INTERNAL_<%=genFeature.getUpperName()%> = <%=featureValue%>;
 
   <%}%>
 	/**
-	 * This represents the number of properties for this type.
+	 * The number of properties for this type.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	<%String featureCount = "";
-	GenClass base = genClass.getBaseGenClass();
+   <%featureCount = "";
+    base = genClass.getBaseGenClass();
     if (base == null)
     {
       featureCount = Integer.toString(genClass.getFeatureCount());
     } 
     else {
-      String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
+      String baseCountID = base.getClassName() + "." + "INTERNAL_PROPERTY_COUNT";
       featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
     }%>
-	public final static int SDO_PROPERTY_COUNT = <%=featureCount%>;
+	public final static int INTERNAL_PROPERTY_COUNT = <%=featureCount%>;
+
+	protected int internalConvertIndex(int internalIndex)
+	{
+		switch (internalIndex)
+		{
+  <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
+			case INTERNAL_<%=genFeature.getUpperName()%>: return <%=genFeature.getUpperName()%>;
+  <%}%>
+		}
+		return super.internalConvertIndex(internalIndex);
+	}
+
 
   <%for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
 <%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %>
@@ -326,7 +424,7 @@
 <%@ include file="Class/declaredFieldGenFeature.insert.javajetinc" fail="silent" %>
 <%@ end %><%//Class/declaredFieldGenFeature.override.javajetinc%>
 <%}%>
-<%if (isImplementation) {%>
+<%if (isImplementation) { // create constructor %>
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -354,6 +452,10 @@
 	}
 
 <%}%>
+<%/*%>
+<% * Output getter and setter interfaces / impls%>
+<% */%>
+<%%>
 <%for (Iterator i=(isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures()).iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
 <%@ include file="Class/genFeature.override.javajetinc" fail="alternative" %>
 <%@ start %>
@@ -539,8 +641,8 @@
         <%if (genModel.isVirtualDelegation()) {%>
 			eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>);
         <%} else {
-				if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
-		  <%=genFeature.getSafeName()%> = createSequence(<%=genFeature.getUpperName()%>);<%} else {%>
+                if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
+		  <%=genFeature.getSafeName()%> = createSequence(INTERNAL_<%=genFeature.getUpperName()%>);<%} else {%>
 		  <%=genFeature.getSafeName()%> = createPropertyList(ListKind.CONTAINMENT, <%=genFeature.getListItemType()%>.class, <%=genFeature.getUpperName()%>);<%}}%>
 		}
 		return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>;
@@ -596,7 +698,7 @@
       <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
 		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>();
 		return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeName()%>.isProxy() ? <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>;
-      <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+      <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // AAAA%>
         <%if (genFeature.isFeatureMapType()) {%>
           <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
@@ -612,9 +714,9 @@
           <%}%>
         <%} else {%>
           <%if (delegateFeature.isWrappedFeatureMapType()) {%>
-		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
+		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
           <%} else {%>
-		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
+		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
           <%}%>
         <%}%>
       <%} else {%>
@@ -650,7 +752,7 @@
       <%} else {%>
 		return <%=genFeature.getSafeName()%>;
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //BBBB%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -710,7 +812,7 @@
       <%}%>
 <%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
 		return changeContext;
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //CCCC%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
       <%} else {%>
@@ -890,9 +992,9 @@
         <%}%>
       <%}%>
 <%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // DDDD%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
-		set(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
+		set(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
       <%} else {%>
 		((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
       <%}%>
@@ -1084,7 +1186,7 @@
           <%}%>
         <%}%>
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //EEEE%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
         unset(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -1151,7 +1253,7 @@
 		return <%=genFeature.getUncapName()%>_set_;
         <%}%>
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //FFFF%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
         return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -1172,7 +1274,7 @@
   <%}%>
 <%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %>
 <%@ end %><%//Class/genFeature.override.javajetinc%>
-<%}//for%>
+<%}// end output getter and setter interfaces or impls%>
 <%for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();%>
 <%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
 <%@ start %>

Modified: incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet?view=diff&rev=509984&r1=509983&r2=509984
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet Wed Feb 21 04:34:19 2007
@@ -22,7 +22,7 @@
 %>
 <%GenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel();%>
 <%boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);%>
-<%String factoryPatternVersion = "1.0";%>
+<%String factoryPatternVersion = "1.1";%>
 <%String publicStaticFinalFlag = isImplementation ? "public static final " : "";%>
 <%@ include file="../Header.javajetinc"%>
 <%if (isInterface || genModel.isSuppressInterfaces()) {%>
@@ -288,10 +288,7 @@
         <%if (!genClass.isDynamic()) {%>
 		<%=genClass.getSafeUncapName()%>Type = createType(false, <%=genPackage.getClassifierID(genClass)%>);
           <%for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();%>
-		createProperty(<%=!genFeature.isReferenceType()%>, <%=genClass.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>);
-          <%}%>
-          <%if (c.hasNext()) {%>
-
+		createProperty(<%=!genFeature.isReferenceType()%>, <%=genClass.getSafeUncapName()%>Type,<%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>); 
           <%}%>
         <%}%>
       <%}%>
@@ -343,12 +340,12 @@
           <%}%>
           <%for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next();%>
             <%String type = genFeature.getType().equals("commonj.sdo.Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()";%>
-		property = (<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClass.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>);
+		property = getProperty(<%=genClass.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>);
             <%if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();%>
               <%String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";%>
-		initializeProperty(property, <%=type%>, "<%=genFeature.getName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>, <%=genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false"%>, <%=reverse%>);
+		initializeProperty(property, <%=type%>, "<%=genFeature.getSafeName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>, <%=genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false"%> , <%=reverse%>);
             <%}else{%>
-		initializeProperty(property, <%=type%>, "<%=genFeature.getName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>);
+		initializeProperty(property, <%=type%>, "<%=genFeature.getSafeName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>);
             <%}%>
             <%for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();%>
               <%EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);%>
@@ -358,8 +355,8 @@
                 <%}%>
               <%}%>
             <%}%>
-          <%}%>
 
+          <%}%>
         <%}%>
       <%}%>
       <%if (!genPackage.getGenDataTypes().isEmpty()) {%>
@@ -377,8 +374,12 @@
 
         <%}%>
       <%}%>
+      <% if(genPackage.getEcorePackage().getEAnnotation(ExtendedMetaData.ANNOTATION_URI) != null) { // if there are XSD annotations%>
 		createXSDMetaData(<%=SDOGenUtil.getDependentFactoryArgumentList(genPackage, false)%>);
+      <% } %>
 	}
+
+      <% if(genPackage.getEcorePackage().getEAnnotation(ExtendedMetaData.ANNOTATION_URI) != null) { // if there are XSD annotations %>
 	  
 	protected void createXSDMetaData(<%=SDOGenUtil.getDependentFactoryArgumentList(genPackage, true)%>)
 	{
@@ -398,6 +399,7 @@
 			 });
 
       <%}%>
+
       <%for (Iterator i=genPackage.getGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next(); EAnnotation classAnnotation = genClassifier.getEcoreClassifier().getEAnnotation(extendedMetaDataSource);%>
         <%if (classAnnotation != null && !genClassifier.getName().equals("DocumentRoot")) {%>
 		addXSDMapping
@@ -447,7 +449,7 @@
             <%}%>
           <%} else {%>
 		addXSDMapping
-		  ((<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClassifier.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>),
+		  (getProperty(<%=genClassifier.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>),
 			 new String[]
 			 {
             <%for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);%>
@@ -460,7 +462,8 @@
         <%}%>
       <%}%>
   }
-  
+   <% } // TODO check this is in the right place -- end if there are XSD annotations %>
+    
 <%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%>
   <%if (genDataType.isSerializable()) {%>
 	/**



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