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:49:56 UTC

svn commit: r509986 [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=509986&r1=509985&r2=509986
==============================================================================
--- 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:49:54 2007
@@ -1,8 +1,21 @@
 /**
- * <copyright>
- * </copyright>
  *
- * $Id$
+ *  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.sequences.impl;
 
@@ -17,7 +30,6 @@
 
 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>'.
@@ -36,77 +48,51 @@
  */
 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 internal feature id for the '<em><b>Mixed</b></em>' attribute list.
+   * The feature id for the '<em><b>Mixed</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_MIXED = 0;
+   */	 
+  public final static int MIXED = 0;
 
   /**
-   * The internal feature id for the '<em><b>Group</b></em>' attribute list.
+   * The feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP = 1;
+   */	 
+  public final static int GROUP = 1;
 
   /**
-   * The internal feature id for the '<em><b>A</b></em>' attribute list.
+   * The feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_A = 2;
+   */	 
+  public final static int A = 2;
 
   /**
-   * The internal feature id for the '<em><b>B</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 INTERNAL_B = 3;
+   */	 
+  public final static int B = 3;
 
   /**
-   * The number of properties for this type.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  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);
-  }
-
+  
+  public final static int SDO_PROPERTY_COUNT = 4;
 
   /**
    * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
@@ -148,7 +134,7 @@
   {
     if (mixed == null)
     {
-      mixed = createSequence(INTERNAL_MIXED);
+      mixed = createSequence(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=509986&r1=509985&r2=509986
==============================================================================
--- 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:49:54 2007
@@ -1,8 +1,21 @@
 /**
- * <copyright>
- * </copyright>
  *
- * $Id$
+ *  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.sequences.impl;
 
@@ -17,7 +30,6 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Repeating Choice</b></em>'.
@@ -35,65 +47,42 @@
  */
 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 internal feature id for the '<em><b>Group</b></em>' attribute list.
+   * The feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP = 0;
+   */	 
+  public final static int GROUP = 0;
 
   /**
-   * The internal feature id for the '<em><b>A</b></em>' attribute list.
+   * The feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_A = 1;
+   */	 
+  public final static int A = 1;
 
   /**
-   * The internal feature id for the '<em><b>B</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 INTERNAL_B = 2;
+   */	 
+  public final static int B = 2;
 
   /**
-   * The number of properties for this type.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  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);
-  }
-
+  
+  public final static int SDO_PROPERTY_COUNT = 3;
 
   /**
    * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
@@ -135,7 +124,7 @@
   {
     if (group == null)
     {
-      group = createSequence(INTERNAL_GROUP);
+      group = createSequence(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=509986&r1=509985&r2=509986
==============================================================================
--- 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:49:54 2007
@@ -1,8 +1,21 @@
 /**
- * <copyright>
- * </copyright>
  *
- * $Id$
+ *  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.sequences.impl;
 
@@ -29,7 +42,7 @@
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
  * Generator information:
- * patternVersion=1.1; -prefix Sequences
+ * patternVersion=1.0; -prefix Sequences
  * <!-- end-user-doc -->
  * @generated
  */
@@ -58,7 +71,7 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public static final String PATTERN_VERSION = "1.1";
+  public static final String PATTERN_VERSION = "1.0";
   
   public static final int MIXED_QUOTE = 1;	
   public static final int MIXED_REPEATING_CHOICE = 2;	
@@ -232,42 +245,46 @@
 
     // Create types and their properties
     mixedQuoteType = createType(false, MIXED_QUOTE);
-    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); 
+    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);
+
     mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
-    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_MIXED); 
-    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_GROUP); 
-    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_A); 
-    createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_B); 
+    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.MIXED);
+    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.GROUP);
+    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.A);
+    createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.B);
+
     repeatingChoiceType = createType(false, REPEATING_CHOICE);
-    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_GROUP); 
-    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_A); 
-    createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_B); 
+    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.GROUP);
+    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.A);
+    createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.B);
+
     twoRCsType = createType(false, TWO_RCS);
-    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); 
+    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);
+
     twoRCsMixedType = createType(false, TWO_RCS_MIXED);
-    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); 
+    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);
   }
   
   private boolean isInitialized = false;
@@ -285,107 +302,446 @@
 
     // Initialize types and properties
     initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote", false);
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL);
     initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME);
     initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, false, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME);
     initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1);
     initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true);
-
-    property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES);
-    initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true , null);
+    property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES);
+    initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true, null);
 
     initializeType(mixedRepeatingChoiceType, MixedRepeatingChoice.class, "MixedRepeatingChoice", false);
-    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED);
+    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false);
-
-    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP);
+    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
-
-    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A);
+    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
-
-    property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B);
+    property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
 
     initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice", false);
-    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP);
+    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false);
-
-    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A);
+    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true);
-
-    property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B);
+    property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true);
 
     initializeType(twoRCsType, TwoRCs.class, "TwoRCs", false);
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT);
     initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, false, false);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1);
     initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Y);
     initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true);
-
-    property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z);
+    property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Z);
     initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true);
 
     initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed", false);
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED);
     initializeProperty(property, getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP);
     initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A);
     initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B);
     initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT);
     initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1);
     initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y);
     initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true);
-
-    property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z);
+    property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.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=509986&r1=509985&r2=509986
==============================================================================
--- 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:49:54 2007
@@ -1,8 +1,21 @@
 /**
- * <copyright>
- * </copyright>
  *
- * $Id$
+ *  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.sequences.impl;
 
@@ -17,7 +30,6 @@
 
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
-  // EYECATCHER 1
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Two RCs</b></em>'.
@@ -39,113 +51,78 @@
  */
 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 internal feature id for the '<em><b>Group</b></em>' attribute list.
+   * The feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP = 0;
+   */	 
+  public final static int GROUP = 0;
 
   /**
-   * The internal feature id for the '<em><b>A</b></em>' attribute list.
+   * The feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_A = 1;
+   */	 
+  public final static int A = 1;
 
   /**
-   * The internal feature id for the '<em><b>B</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 INTERNAL_B = 2;
+   */	 
+  public final static int B = 2;
 
   /**
-   * The internal feature id for the '<em><b>Split</b></em>' attribute.
+   * The feature id for the '<em><b>Split</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_SPLIT = 3;
+   */	 
+  public final static int SPLIT = 3;
 
   /**
-   * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
+   * The feature id for the '<em><b>Group1</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP1 = 4;
+   */	 
+  public final static int GROUP1 = 4;
 
   /**
-   * The internal feature id for the '<em><b>Y</b></em>' attribute list.
+   * The feature id for the '<em><b>Y</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_Y = 5;
+   */	 
+  public final static int Y = 5;
 
   /**
-   * The internal feature id for the '<em><b>Z</b></em>' attribute list.
+   * The feature id for the '<em><b>Z</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_Z = 6;
+   */	 
+  public final static int Z = 6;
 
   /**
-   * The number of properties for this type.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  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);
-  }
-
+  
+  public final static int SDO_PROPERTY_COUNT = 7;
 
   /**
    * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
@@ -218,7 +195,7 @@
   {
     if (group == null)
     {
-      group = createSequence(INTERNAL_GROUP);
+      group = createSequence(GROUP);
     }
     return group;
   }
@@ -273,7 +250,7 @@
   {
     if (group1 == null)
     {
-      group1 = createSequence(INTERNAL_GROUP1);
+      group1 = createSequence(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=509986&r1=509985&r2=509986
==============================================================================
--- 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:49:54 2007
@@ -1,8 +1,21 @@
 /**
- * <copyright>
- * </copyright>
  *
- * $Id$
+ *  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.sequences.impl;
 
@@ -17,7 +30,6 @@
 
 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>'.
@@ -40,125 +52,87 @@
  */
 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 internal feature id for the '<em><b>Mixed</b></em>' attribute list.
+   * The feature id for the '<em><b>Mixed</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_MIXED = 0;
+   */	 
+  public final static int MIXED = 0;
 
   /**
-   * The internal feature id for the '<em><b>Group</b></em>' attribute list.
+   * The feature id for the '<em><b>Group</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP = 1;
+   */	 
+  public final static int GROUP = 1;
 
   /**
-   * The internal feature id for the '<em><b>A</b></em>' attribute list.
+   * The feature id for the '<em><b>A</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_A = 2;
+   */	 
+  public final static int A = 2;
 
   /**
-   * The internal feature id for the '<em><b>B</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 INTERNAL_B = 3;
+   */	 
+  public final static int B = 3;
 
   /**
-   * The internal feature id for the '<em><b>Split</b></em>' attribute.
+   * The feature id for the '<em><b>Split</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_SPLIT = 4;
+   */	 
+  public final static int SPLIT = 4;
 
   /**
-   * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
+   * The feature id for the '<em><b>Group1</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_GROUP1 = 5;
+   */	 
+  public final static int GROUP1 = 5;
 
   /**
-   * The internal feature id for the '<em><b>Y</b></em>' attribute list.
+   * The feature id for the '<em><b>Y</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_Y = 6;
+   */	 
+  public final static int Y = 6;
 
   /**
-   * The internal feature id for the '<em><b>Z</b></em>' attribute list.
+   * The feature id for the '<em><b>Z</b></em>' attribute list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */ 
-  public final static int INTERNAL_Z = 7;
+   */	 
+  public final static int Z = 7;
 
   /**
-   * The number of properties for this type.
+   * This represents the number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  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);
-  }
-
+  
+  public final static int SDO_PROPERTY_COUNT = 8;
 
   /**
    * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
@@ -210,7 +184,7 @@
   {
     if (mixed == null)
     {
-      mixed = createSequence(INTERNAL_MIXED);
+      mixed = createSequence(MIXED);
     }
     return mixed;
   }
@@ -250,7 +224,7 @@
    */
   public String getSplit()
   {
-    return (String)get(getMixed(), getType(), INTERNAL_SPLIT);
+    return (String)get(getMixed(), getType(), SPLIT);
   }
   /**
    * <!-- begin-user-doc -->
@@ -259,7 +233,7 @@
    */
   public void setSplit(String newSplit)
   {
-    set(getMixed(), getType(), INTERNAL_SPLIT, newSplit);
+    set(getMixed(), getType(), SPLIT, newSplit);
   }
 
   /**

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=509986&r1=509985&r2=509986
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet Wed Feb 21 04:49:54 2007
@@ -1,4 +1,4 @@
-<%@ 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 $" %>
+<%@ 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 $" %>
 <%
 /**
  *
@@ -22,11 +22,7 @@
 %>
 <%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()%>;
@@ -36,9 +32,6 @@
 
 <%genModel.markImportLocation(stringBuffer, genPackage);%>
 
-<%if (isDebug) { // EYECATCHER 1 %>
-  // EYECATCHER 1
-<%}%>
 <%if (isInterface) {%>
 /**
  * <!-- begin-user-doc -->
@@ -56,9 +49,6 @@
  * 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>
   <%}%>
@@ -77,7 +67,7 @@
 <%}} if (first) {%>
  * @model
 <%}}%>
-<%if (genClass.needsRootExtendsInterfaceExtendsTag()) { // does it need an @extends tag %>
+<%if (genClass.needsRootExtendsInterfaceExtendsTag()) {%>
  * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%>
 <%}%>
  * @generated
@@ -172,140 +162,52 @@
 
 <%}%>
 <%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 internal feature id for the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
+	 * The 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);%>
-    <%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%>;
+    <%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%>;
 
   <%}%>
 	/**
-	 * The number of properties for this type.
+	 * This represents the number of properties for this type.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-   <%featureCount = "";
-    base = genClass.getBaseGenClass();
+	<%String featureCount = "";
+	GenClass base = genClass.getBaseGenClass();
     if (base == null)
     {
       featureCount = Integer.toString(genClass.getFeatureCount());
     } 
     else {
-      String baseCountID = base.getClassName() + "." + "INTERNAL_PROPERTY_COUNT";
+      String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
       featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
     }%>
-	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);
-	}
-
+	public final static int SDO_PROPERTY_COUNT = <%=featureCount%>;
 
   <%for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
 <%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %>
@@ -424,7 +326,7 @@
 <%@ include file="Class/declaredFieldGenFeature.insert.javajetinc" fail="silent" %>
 <%@ end %><%//Class/declaredFieldGenFeature.override.javajetinc%>
 <%}%>
-<%if (isImplementation) { // create constructor %>
+<%if (isImplementation) {%>
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -452,10 +354,6 @@
 	}
 
 <%}%>
-<%/*%>
-<% * 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 %>
@@ -641,8 +539,8 @@
         <%if (genModel.isVirtualDelegation()) {%>
 			eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>);
         <%} else {
-                if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
-		  <%=genFeature.getSafeName()%> = createSequence(INTERNAL_<%=genFeature.getUpperName()%>);<%} else {%>
+				if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
+		  <%=genFeature.getSafeName()%> = createSequence(<%=genFeature.getUpperName()%>);<%} else {%>
 		  <%=genFeature.getSafeName()%> = createPropertyList(ListKind.CONTAINMENT, <%=genFeature.getListItemType()%>.class, <%=genFeature.getUpperName()%>);<%}}%>
 		}
 		return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>;
@@ -698,7 +596,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(); // AAAA%>
+      <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
         <%if (genFeature.isFeatureMapType()) {%>
           <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
@@ -714,9 +612,9 @@
           <%}%>
         <%} else {%>
           <%if (delegateFeature.isWrappedFeatureMapType()) {%>
-		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
+		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
           <%} else {%>
-		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
+		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
           <%}%>
         <%}%>
       <%} else {%>
@@ -752,7 +650,7 @@
       <%} else {%>
 		return <%=genFeature.getSafeName()%>;
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //BBBB%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -812,7 +710,7 @@
       <%}%>
 <%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
 		return changeContext;
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //CCCC%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
 		return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
       <%} else {%>
@@ -992,9 +890,9 @@
         <%}%>
       <%}%>
 <%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // DDDD%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
-		set(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
+		set(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=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()){%>)<%}%>);
       <%}%>
@@ -1186,7 +1084,7 @@
           <%}%>
         <%}%>
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //EEEE%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
         unset(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -1253,7 +1151,7 @@
 		return <%=genFeature.getUncapName()%>_set_;
         <%}%>
       <%}%>
-    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //FFFF%>
+    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
       <%if (delegateFeature.isWrappedFeatureMapType()) {%>
         return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
       <%} else {%>
@@ -1274,7 +1172,7 @@
   <%}%>
 <%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %>
 <%@ end %><%//Class/genFeature.override.javajetinc%>
-<%}// end output getter and setter interfaces or impls%>
+<%}//for%>
 <%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=509986&r1=509985&r2=509986
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOFactoryClass.javajet Wed Feb 21 04:49:54 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.1";%>
+<%String factoryPatternVersion = "1.0";%>
 <%String publicStaticFinalFlag = isImplementation ? "public static final " : "";%>
 <%@ include file="../Header.javajetinc"%>
 <%if (isInterface || genModel.isSuppressInterfaces()) {%>
@@ -288,7 +288,10 @@
         <%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()%>.INTERNAL_<%=genFeature.getUpperName()%>); 
+		createProperty(<%=!genFeature.isReferenceType()%>, <%=genClass.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>);
+          <%}%>
+          <%if (c.hasNext()) {%>
+
           <%}%>
         <%}%>
       <%}%>
@@ -340,12 +343,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 = getProperty(<%=genClass.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>);
+		property = (<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClass.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=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.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%>);
+		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%>);
             <%}else{%>
-		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"%>);
+		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"%>);
             <%}%>
             <%for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();%>
               <%EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);%>
@@ -355,8 +358,8 @@
                 <%}%>
               <%}%>
             <%}%>
-
           <%}%>
+
         <%}%>
       <%}%>
       <%if (!genPackage.getGenDataTypes().isEmpty()) {%>
@@ -374,12 +377,8 @@
 
         <%}%>
       <%}%>
-      <% 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)%>)
 	{
@@ -399,7 +398,6 @@
 			 });
 
       <%}%>
-
       <%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
@@ -449,7 +447,7 @@
             <%}%>
           <%} else {%>
 		addXSDMapping
-		  (getProperty(<%=genClassifier.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>),
+		  ((<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClassifier.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=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);%>
@@ -462,8 +460,7 @@
         <%}%>
       <%}%>
   }
-   <% } // 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