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/07/25 18:04:21 UTC

svn commit: r559502 - in /incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java: com/example/customer/impl/ com/example/extensible/customer/impl/ com/example/noInterfaces/simple/ com/example/open/impl/ com/example/repchoice/impl/ com/exampl...

Author: kelvingoodson
Date: Wed Jul 25 09:04:18 2007
New Revision: 559502

URL: http://svn.apache.org/viewvc?view=rev&rev=559502
Log:
replace generated test classes with those generated against up to date generator

Modified:
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java
    incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java Wed Jul 25 09:04:18 2007
@@ -147,7 +147,7 @@
     boolean oldAccountNum_set_ = accountNum_set_;
     accountNum_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, ACCOUNT_NUM, oldAccountNum, accountNum, !oldAccountNum_set_);
+      notify(ChangeKind.SET, INTERNAL_ACCOUNT_NUM, oldAccountNum, accountNum, !oldAccountNum_set_);
   }
 
   /**
@@ -162,7 +162,7 @@
     accountNum = ACCOUNT_NUM_DEFAULT_;
     accountNum_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, ACCOUNT_NUM, oldAccountNum, ACCOUNT_NUM_DEFAULT_, oldAccountNum_set_);
+      notify(ChangeKind.UNSET, INTERNAL_ACCOUNT_NUM, oldAccountNum, ACCOUNT_NUM_DEFAULT_, oldAccountNum_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -95,11 +89,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -157,29 +157,25 @@
   }
     
 
-  private static boolean isInited = false;
-
+  private static CustomerFactoryImpl instance = null; 
   public static CustomerFactoryImpl init()
   {
-    if (isInited) return (CustomerFactoryImpl)FactoryBase.getStaticFactory(CustomerFactoryImpl.NAMESPACE_URI);
-    CustomerFactoryImpl theCustomerFactoryImpl = new CustomerFactoryImpl();
-    isInited = true;
-
-    // Initialize simple dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new CustomerFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theCustomerFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theCustomerFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theCustomerFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theCustomerFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -190,9 +186,9 @@
     isCreated = true;	
 
     // Create types and their properties
-          accountType = createType(false, ACCOUNT);
+    accountType = createType(false, ACCOUNT);
     createProperty(true, accountType,AccountImpl.INTERNAL_ACCOUNT_NUM); 
-          customerType = createType(false, CUSTOMER);
+    customerType = createType(false, CUSTOMER);
     createProperty(false, customerType,CustomerImpl.INTERNAL_ACCOUNT); 
     createProperty(true, customerType,CustomerImpl.INTERNAL_FIRST_NAME); 
   }
@@ -205,7 +201,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java Wed Jul 25 09:04:18 2007
@@ -182,7 +182,7 @@
     account_set_ = true;
     if (isNotifying())
     {
-      addNotification(this, ChangeKind.SET, ACCOUNT, oldAccount, newAccount, !oldAccount_set_, changeContext);
+      addNotification(this, ChangeKind.SET, INTERNAL_ACCOUNT, oldAccount, newAccount, !oldAccount_set_, changeContext);
     }
     return changeContext;
   }
@@ -198,19 +198,19 @@
     {
       ChangeContext changeContext = null;
       if (account != null)
-        changeContext = inverseRemove(account, this, OPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+        changeContext = inverseRemove(account, this, OPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
       if (newAccount != null)
-        changeContext = inverseAdd(newAccount, this, OPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+        changeContext = inverseAdd(newAccount, this, OPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
       changeContext = basicSetAccount(newAccount, changeContext);
       if (changeContext != null) dispatch(changeContext);
     }
     else
-    	{
+    {
       boolean oldAccount_set_ = account_set_;
       account_set_ = true;
       if (isNotifying())
-        notify(ChangeKind.SET, ACCOUNT, newAccount, newAccount, !oldAccount_set_);
-    	}
+        notify(ChangeKind.SET, INTERNAL_ACCOUNT, newAccount, newAccount, !oldAccount_set_);
+    }
   }
 
   /**
@@ -226,7 +226,7 @@
     account_set_ = false;
     if (isNotifying())
     {
-      addNotification(this, ChangeKind.UNSET, ACCOUNT, oldAccount, null, !oldAccount_set_, changeContext);
+      addNotification(this, ChangeKind.UNSET, INTERNAL_ACCOUNT, oldAccount, null, !oldAccount_set_, changeContext);
     }
     return changeContext;
   }
@@ -241,7 +241,7 @@
     if (account != null)
     {
       ChangeContext changeContext = null;
-      changeContext = inverseRemove(account, this, EOPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+      changeContext = inverseRemove(account, this, EOPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
       changeContext = basicUnsetAccount(changeContext);
       if (changeContext != null) dispatch(changeContext);
     }
@@ -250,7 +250,7 @@
       boolean oldAccount_set_ = account_set_;
       account_set_ = false;
       if (isNotifying())
-        notify(ChangeKind.UNSET, ACCOUNT, null, null, oldAccount_set_);
+        notify(ChangeKind.UNSET, INTERNAL_ACCOUNT, null, null, oldAccount_set_);
     	}
   }
 
@@ -285,7 +285,7 @@
     boolean oldFirstName_set_ = firstName_set_;
     firstName_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, FIRST_NAME, oldFirstName, firstName, !oldFirstName_set_);
+      notify(ChangeKind.SET, INTERNAL_FIRST_NAME, oldFirstName, firstName, !oldFirstName_set_);
   }
 
   /**
@@ -300,7 +300,7 @@
     firstName = FIRST_NAME_DEFAULT_;
     firstName_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, FIRST_NAME, oldFirstName, FIRST_NAME_DEFAULT_, oldFirstName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_FIRST_NAME, oldFirstName, FIRST_NAME_DEFAULT_, oldFirstName_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -97,11 +91,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -215,29 +215,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static CustomerFactoryImpl instance = null; 
   public static CustomerFactoryImpl init()
   {
-    if (isInited) return (CustomerFactoryImpl)FactoryBase.getStaticFactory(CustomerFactoryImpl.NAMESPACE_URI);
-    CustomerFactoryImpl theCustomerFactoryImpl = new CustomerFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new CustomerFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theCustomerFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theCustomerFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theCustomerFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theCustomerFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -248,13 +244,13 @@
     isCreated = true;	
 
     // Create types and their properties
-          customersTypeType = createType(false, CUSTOMERS_TYPE);
+    customersTypeType = createType(false, CUSTOMERS_TYPE);
     createProperty(false, customersTypeType,CustomersTypeImpl.INTERNAL_CUSTOMER); 
-          customerTypeType = createType(false, CUSTOMER_TYPE);
+    customerTypeType = createType(false, CUSTOMER_TYPE);
     createProperty(true, customerTypeType,CustomerTypeImpl.INTERNAL_NAME); 
     createProperty(true, customerTypeType,CustomerTypeImpl.INTERNAL_NUMBER); 
     createProperty(false, customerTypeType,CustomerTypeImpl.INTERNAL_INFO); 
-          infoTypeType = createType(false, INFO_TYPE);
+    infoTypeType = createType(false, INFO_TYPE);
 
     // Create data types
     custNameTypeType = createType(true, CUST_NAME_TYPE );
@@ -268,7 +264,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java Wed Jul 25 09:04:18 2007
@@ -225,7 +225,7 @@
     boolean oldName_set_ = name_set_;
     name_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, NAME, oldName, name, !oldName_set_);
+      notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
   }
 
   /**
@@ -240,7 +240,7 @@
     name = NAME_DEFAULT_;
     name_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, NAME, oldName, NAME_DEFAULT_, oldName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
   }
 
   /**
@@ -274,7 +274,7 @@
     boolean oldNumber_set_ = number_set_;
     number_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, NUMBER, oldNumber, number, !oldNumber_set_);
+      notify(ChangeKind.SET, INTERNAL_NUMBER, oldNumber, number, !oldNumber_set_);
   }
 
   /**
@@ -289,7 +289,7 @@
     number = NUMBER_DEFAULT_;
     number_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
+      notify(ChangeKind.UNSET, INTERNAL_NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
   }
 
   /**
@@ -324,7 +324,7 @@
     info_set_ = true;
     if (isNotifying())
     {
-      addNotification(this, ChangeKind.SET, INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
+      addNotification(this, ChangeKind.SET, INTERNAL_INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
     }
     return changeContext;
   }
@@ -340,19 +340,19 @@
     {
       ChangeContext changeContext = null;
       if (info != null)
-        changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+        changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
       if (newInfo != null)
-        changeContext = inverseAdd(newInfo, this, OPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+        changeContext = inverseAdd(newInfo, this, OPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
       changeContext = basicSetInfo(newInfo, changeContext);
       if (changeContext != null) dispatch(changeContext);
     }
     else
-    	{
+    {
       boolean oldInfo_set_ = info_set_;
       info_set_ = true;
       if (isNotifying())
-        notify(ChangeKind.SET, INFO, newInfo, newInfo, !oldInfo_set_);
-    	}
+        notify(ChangeKind.SET, INTERNAL_INFO, newInfo, newInfo, !oldInfo_set_);
+    }
   }
 
   /**
@@ -368,7 +368,7 @@
     info_set_ = false;
     if (isNotifying())
     {
-      addNotification(this, ChangeKind.UNSET, INFO, oldInfo, null, !oldInfo_set_, changeContext);
+      addNotification(this, ChangeKind.UNSET, INTERNAL_INFO, oldInfo, null, !oldInfo_set_, changeContext);
     }
     return changeContext;
   }
@@ -383,7 +383,7 @@
     if (info != null)
     {
       ChangeContext changeContext = null;
-      changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+      changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
       changeContext = basicUnsetInfo(changeContext);
       if (changeContext != null) dispatch(changeContext);
     }
@@ -392,7 +392,7 @@
       boolean oldInfo_set_ = info_set_;
       info_set_ = false;
       if (isNotifying())
-        notify(ChangeKind.UNSET, INFO, null, null, oldInfo_set_);
+        notify(ChangeKind.UNSET, INTERNAL_INFO, null, null, oldInfo_set_);
     	}
   }
 

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java Wed Jul 25 09:04:18 2007
@@ -485,7 +485,7 @@
     boolean oldSymbol_set_ = symbol_set_;
     symbol_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+      notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
   }
 
   /**
@@ -504,7 +504,7 @@
     symbol = SYMBOL_DEFAULT_;
     symbol_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+      notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
   }
 
   /**
@@ -557,7 +557,7 @@
     boolean oldCompanyName_set_ = companyName_set_;
     companyName_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+      notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
   }
 
   /**
@@ -576,7 +576,7 @@
     companyName = COMPANY_NAME_DEFAULT_;
     companyName_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
   }
 
   /**
@@ -629,7 +629,7 @@
     boolean oldPrice_set_ = price_set_;
     price_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+      notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
   }
 
   /**
@@ -648,7 +648,7 @@
     price = PRICE_DEFAULT_;
     price_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+      notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
   }
 
   /**
@@ -701,7 +701,7 @@
     boolean oldOpen1_set_ = open1_set_;
     open1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+      notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
   }
 
   /**
@@ -720,7 +720,7 @@
     open1 = OPEN1_DEFAULT_;
     open1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
   }
 
   /**
@@ -773,7 +773,7 @@
     boolean oldHigh_set_ = high_set_;
     high_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+      notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
   }
 
   /**
@@ -792,7 +792,7 @@
     high = HIGH_DEFAULT_;
     high_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+      notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
   }
 
   /**
@@ -845,7 +845,7 @@
     boolean oldLow_set_ = low_set_;
     low_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+      notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
   }
 
   /**
@@ -864,7 +864,7 @@
     low = LOW_DEFAULT_;
     low_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+      notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
   }
 
   /**
@@ -917,7 +917,7 @@
     boolean oldVolume_set_ = volume_set_;
     volume_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_);
+      notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
   }
 
   /**
@@ -936,7 +936,7 @@
     volume = VOLUME_DEFAULT_;
     volume_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
+      notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
   }
 
   /**
@@ -989,7 +989,7 @@
     boolean oldChange1_set_ = change1_set_;
     change1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_);
+      notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
   }
 
   /**
@@ -1008,7 +1008,7 @@
     change1 = CHANGE1_DEFAULT_;
     change1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
   }
 
   /**
@@ -1042,7 +1042,7 @@
   {
     if (quotes == null)
     {
-      quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES);
+      quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
     }
     return quotes;
   }

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java Wed Jul 25 09:04:18 2007
@@ -26,22 +26,18 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * The <b>Factory</b> for the model.
  * It provides a create method for each non-abstract class of the model.
  * <!-- end-user-doc -->
- * patternVersion=1.1; -noInterfaces
+ * patternVersion=1.2; -noInterfaces
  * @generated
  */
 public class SimpleFactory extends FactoryBase
@@ -77,7 +73,7 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public static final String PATTERN_VERSION = "1.1";
+  public static final String PATTERN_VERSION = "1.2";
   
   public static final int QUOTE = 1;
   
@@ -98,11 +94,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -142,28 +144,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static SimpleFactory instance = null; 
   public static SimpleFactory init()
   {
-    if (isInited) return (SimpleFactory)FactoryBase.getStaticFactory(SimpleFactory.NAMESPACE_URI);
-    SimpleFactory theSimpleFactory = new SimpleFactory();
-    isInited = true;
-
-    // Initialize simple dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
+    if (instance != null ) return instance;
+    instance = new SimpleFactory();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theSimpleFactory.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theSimpleFactory.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theSimpleFactory.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theSimpleFactory;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -174,7 +173,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          quoteType = createType(false, QUOTE);
+    quoteType = createType(false, QUOTE);
     createProperty(true, quoteType,Quote.INTERNAL_SYMBOL); 
     createProperty(true, quoteType,Quote.INTERNAL_COMPANY_NAME); 
     createProperty(true, quoteType,Quote.INTERNAL_PRICE); 
@@ -194,38 +193,38 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types
 
     // Initialize types and properties
     initializeType(quoteType, Quote.class, "Quote", false);
-    property = getProperty(quoteType, Quote.INTERNAL_SYMBOL);
+    property = getLocalProperty(quoteType, 0);
     initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_COMPANY_NAME);
+    property = getLocalProperty(quoteType, 1);
     initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_PRICE);
+    property = getLocalProperty(quoteType, 2);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_OPEN1);
+    property = getLocalProperty(quoteType, 3);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_HIGH);
+    property = getLocalProperty(quoteType, 4);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_LOW);
+    property = getLocalProperty(quoteType, 5);
     initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_VOLUME);
+    property = getLocalProperty(quoteType, 6);
     initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_CHANGE1);
+    property = getLocalProperty(quoteType, 7);
     initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
 
-    property = getProperty(quoteType, Quote.INTERNAL_QUOTES);
+    property = getLocalProperty(quoteType, 8);
     initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
 
     createXSDMetaData(theModelPackageImpl);

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java Wed Jul 25 09:04:18 2007
@@ -1,5 +1,4 @@
 /**
-/**
  *
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -173,7 +172,7 @@
     boolean oldName_set_ = name_set_;
     name_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, NAME, oldName, name, !oldName_set_);
+      notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
   }
 
   /**
@@ -188,7 +187,7 @@
     name = NAME_DEFAULT_;
     name_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, NAME, oldName, NAME_DEFAULT_, oldName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -94,11 +88,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -138,29 +138,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static OpenFactoryImpl instance = null; 
   public static OpenFactoryImpl init()
   {
-    if (isInited) return (OpenFactoryImpl)FactoryBase.getStaticFactory(OpenFactoryImpl.NAMESPACE_URI);
-    OpenFactoryImpl theOpenFactoryImpl = new OpenFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new OpenFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theOpenFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theOpenFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theOpenFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theOpenFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -171,7 +167,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          oneElementAndAnyAttrType = createType(false, ONE_ELEMENT_AND_ANY_ATTR);
+    oneElementAndAnyAttrType = createType(false, ONE_ELEMENT_AND_ANY_ATTR);
     createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_NAME); 
     createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_ANY_ATTRIBUTE); 
   }
@@ -184,7 +180,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -94,11 +88,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -138,29 +138,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static RepchoiceFactoryImpl instance = null; 
   public static RepchoiceFactoryImpl init()
   {
-    if (isInited) return (RepchoiceFactoryImpl)FactoryBase.getStaticFactory(RepchoiceFactoryImpl.NAMESPACE_URI);
-    RepchoiceFactoryImpl theRepchoiceFactoryImpl = new RepchoiceFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new RepchoiceFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theRepchoiceFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theRepchoiceFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theRepchoiceFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theRepchoiceFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -171,7 +167,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          rcTypeType = createType(false, RC_TYPE);
+    rcTypeType = createType(false, RC_TYPE);
     createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_GROUP); 
     createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_S); 
     createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_I); 
@@ -186,7 +182,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -98,11 +92,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -214,29 +214,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static SequencesFactoryImpl instance = null; 
   public static SequencesFactoryImpl init()
   {
-    if (isInited) return (SequencesFactoryImpl)FactoryBase.getStaticFactory(SequencesFactoryImpl.NAMESPACE_URI);
-    SequencesFactoryImpl theSequencesFactoryImpl = new SequencesFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new SequencesFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theSequencesFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theSequencesFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theSequencesFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theSequencesFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -247,7 +243,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          mixedQuoteType = createType(false, MIXED_QUOTE);
+    mixedQuoteType = createType(false, MIXED_QUOTE);
     createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_MIXED); 
     createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_SYMBOL); 
     createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_COMPANY_NAME); 
@@ -258,16 +254,16 @@
     createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_VOLUME); 
     createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_CHANGE1); 
     createProperty(false, mixedQuoteType,MixedQuoteImpl.INTERNAL_QUOTES); 
-          mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
+    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); 
-          repeatingChoiceType = createType(false, REPEATING_CHOICE);
+    repeatingChoiceType = createType(false, REPEATING_CHOICE);
     createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_GROUP); 
     createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_A); 
     createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_B); 
-          twoRCsType = createType(false, TWO_RCS);
+    twoRCsType = createType(false, TWO_RCS);
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP); 
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_A); 
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_B); 
@@ -275,7 +271,7 @@
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP1); 
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Y); 
     createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Z); 
-          twoRCsMixedType = createType(false, TWO_RCS_MIXED);
+    twoRCsMixedType = createType(false, TWO_RCS_MIXED);
     createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_MIXED); 
     createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP); 
     createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_A); 
@@ -294,7 +290,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java Wed Jul 25 09:04:18 2007
@@ -282,7 +282,7 @@
     boolean oldSplit_set_ = split_set_;
     split_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, SPLIT, oldSplit, split, !oldSplit_set_);
+      notify(ChangeKind.SET, INTERNAL_SPLIT, oldSplit, split, !oldSplit_set_);
   }
 
   /**
@@ -297,7 +297,7 @@
     split = SPLIT_DEFAULT_;
     split_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
+      notify(ChangeKind.UNSET, INTERNAL_SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -95,11 +89,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -157,29 +157,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static CSFactoryImpl instance = null; 
   public static CSFactoryImpl init()
   {
-    if (isInited) return (CSFactoryImpl)FactoryBase.getStaticFactory(CSFactoryImpl.NAMESPACE_URI);
-    CSFactoryImpl theCSFactoryImpl = new CSFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new CSFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theCSFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theCSFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theCSFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theCSFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -190,7 +186,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          quoteType = createType(false, QUOTE);
+    quoteType = createType(false, QUOTE);
     createProperty(true, quoteType,QuoteImpl.INTERNAL_SYMBOL); 
     createProperty(true, quoteType,QuoteImpl.INTERNAL_COMPANY_NAME); 
     createProperty(true, quoteType,QuoteImpl.INTERNAL_PRICE); 
@@ -200,7 +196,7 @@
     createProperty(true, quoteType,QuoteImpl.INTERNAL_VOLUME); 
     createProperty(true, quoteType,QuoteImpl.INTERNAL_CHANGE1); 
     createProperty(false, quoteType,QuoteImpl.INTERNAL_QUOTES); 
-          quoteBaseType = createType(false, QUOTE_BASE);
+    quoteBaseType = createType(false, QUOTE_BASE);
     createProperty(true, quoteBaseType,QuoteBaseImpl.INTERNAL_CHANGES); 
   }
   
@@ -212,7 +208,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java Wed Jul 25 09:04:18 2007
@@ -237,7 +237,7 @@
     boolean oldChanges_set_ = changes_set_;
     changes_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, CHANGES, oldChanges, changes, !oldChanges_set_);
+      notify(ChangeKind.SET, INTERNAL_CHANGES, oldChanges, changes, !oldChanges_set_);
   }
 
   /**
@@ -252,7 +252,7 @@
     changes = CHANGES_DEFAULT_;
     changes_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, CHANGES, oldChanges, CHANGES_DEFAULT_, oldChanges_set_);
+      notify(ChangeKind.UNSET, INTERNAL_CHANGES, oldChanges, CHANGES_DEFAULT_, oldChanges_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java Wed Jul 25 09:04:18 2007
@@ -470,7 +470,7 @@
     boolean oldSymbol_set_ = symbol_set_;
     symbol_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+      notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
   }
 
   /**
@@ -485,7 +485,7 @@
     symbol = SYMBOL_DEFAULT_;
     symbol_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+      notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
   }
 
   /**
@@ -519,7 +519,7 @@
     boolean oldCompanyName_set_ = companyName_set_;
     companyName_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+      notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
   }
 
   /**
@@ -534,7 +534,7 @@
     companyName = COMPANY_NAME_DEFAULT_;
     companyName_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
   }
 
   /**
@@ -568,7 +568,7 @@
     boolean oldPrice_set_ = price_set_;
     price_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+      notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
   }
 
   /**
@@ -583,7 +583,7 @@
     price = PRICE_DEFAULT_;
     price_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+      notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
   }
 
   /**
@@ -617,7 +617,7 @@
     boolean oldOpen1_set_ = open1_set_;
     open1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+      notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
   }
 
   /**
@@ -632,7 +632,7 @@
     open1 = OPEN1_DEFAULT_;
     open1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
   }
 
   /**
@@ -666,7 +666,7 @@
     boolean oldHigh_set_ = high_set_;
     high_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+      notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
   }
 
   /**
@@ -681,7 +681,7 @@
     high = HIGH_DEFAULT_;
     high_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+      notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
   }
 
   /**
@@ -715,7 +715,7 @@
     boolean oldLow_set_ = low_set_;
     low_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+      notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
   }
 
   /**
@@ -730,7 +730,7 @@
     low = LOW_DEFAULT_;
     low_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+      notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
   }
 
   /**
@@ -764,7 +764,7 @@
     boolean oldVolume_set_ = volume_set_;
     volume_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_);
+      notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
   }
 
   /**
@@ -779,7 +779,7 @@
     volume = VOLUME_DEFAULT_;
     volume_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
+      notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
   }
 
   /**
@@ -813,7 +813,7 @@
     boolean oldChange1_set_ = change1_set_;
     change1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_);
+      notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
   }
 
   /**
@@ -828,7 +828,7 @@
     change1 = CHANGE1_DEFAULT_;
     change1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java Wed Jul 25 09:04:18 2007
@@ -470,7 +470,7 @@
     boolean oldSymbol_set_ = symbol_set_;
     symbol_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+      notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
   }
 
   /**
@@ -485,7 +485,7 @@
     symbol = SYMBOL_DEFAULT_;
     symbol_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+      notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
   }
 
   /**
@@ -519,7 +519,7 @@
     boolean oldCompanyName_set_ = companyName_set_;
     companyName_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+      notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
   }
 
   /**
@@ -534,7 +534,7 @@
     companyName = COMPANY_NAME_DEFAULT_;
     companyName_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+      notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
   }
 
   /**
@@ -568,7 +568,7 @@
     boolean oldPrice_set_ = price_set_;
     price_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+      notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
   }
 
   /**
@@ -583,7 +583,7 @@
     price = PRICE_DEFAULT_;
     price_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+      notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
   }
 
   /**
@@ -617,7 +617,7 @@
     boolean oldOpen1_set_ = open1_set_;
     open1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+      notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
   }
 
   /**
@@ -632,7 +632,7 @@
     open1 = OPEN1_DEFAULT_;
     open1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
   }
 
   /**
@@ -666,7 +666,7 @@
     boolean oldHigh_set_ = high_set_;
     high_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+      notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
   }
 
   /**
@@ -681,7 +681,7 @@
     high = HIGH_DEFAULT_;
     high_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+      notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
   }
 
   /**
@@ -715,7 +715,7 @@
     boolean oldLow_set_ = low_set_;
     low_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+      notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
   }
 
   /**
@@ -730,7 +730,7 @@
     low = LOW_DEFAULT_;
     low_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+      notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
   }
 
   /**
@@ -764,7 +764,7 @@
     boolean oldVolume_set_ = volume_set_;
     volume_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_);
+      notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
   }
 
   /**
@@ -779,7 +779,7 @@
     volume = VOLUME_DEFAULT_;
     volume_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
+      notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
   }
 
   /**
@@ -813,7 +813,7 @@
     boolean oldChange1_set_ = change1_set_;
     change1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_);
+      notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
   }
 
   /**
@@ -828,7 +828,7 @@
     change1 = CHANGE1_DEFAULT_;
     change1_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
+      notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -94,11 +88,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -138,29 +138,25 @@
   }
   
 
-  private static boolean isInited = false;
-
+  private static SimpleFactoryImpl instance = null; 
   public static SimpleFactoryImpl init()
   {
-    if (isInited) return (SimpleFactoryImpl)FactoryBase.getStaticFactory(SimpleFactoryImpl.NAMESPACE_URI);
-    SimpleFactoryImpl theSimpleFactoryImpl = new SimpleFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new SimpleFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theSimpleFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theSimpleFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theSimpleFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theSimpleFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -171,7 +167,7 @@
     isCreated = true;	
 
     // Create types and their properties
-          quoteType = createType(false, QUOTE);
+    quoteType = createType(false, QUOTE);
     createProperty(true, quoteType,QuoteImpl.INTERNAL_SYMBOL); 
     createProperty(true, quoteType,QuoteImpl.INTERNAL_COMPANY_NAME); 
     createProperty(true, quoteType,QuoteImpl.INTERNAL_PRICE); 
@@ -191,7 +187,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java Wed Jul 25 09:04:18 2007
@@ -147,7 +147,7 @@
     boolean oldImInTypeB_set_ = imInTypeB_set_;
     imInTypeB_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, IM_IN_TYPE_B, oldImInTypeB, imInTypeB, !oldImInTypeB_set_);
+      notify(ChangeKind.SET, INTERNAL_IM_IN_TYPE_B, oldImInTypeB, imInTypeB, !oldImInTypeB_set_);
   }
 
   /**
@@ -162,7 +162,7 @@
     imInTypeB = IM_IN_TYPE_B_DEFAULT_;
     imInTypeB_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, IM_IN_TYPE_B, oldImInTypeB, IM_IN_TYPE_B_DEFAULT_, oldImInTypeB_set_);
+      notify(ChangeKind.UNSET, INTERNAL_IM_IN_TYPE_B, oldImInTypeB, IM_IN_TYPE_B_DEFAULT_, oldImInTypeB_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java Wed Jul 25 09:04:18 2007
@@ -155,7 +155,7 @@
     boolean oldImInTypeBprime_set_ = imInTypeBprime_set_;
     imInTypeBprime_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, IM_IN_TYPE_BPRIME, oldImInTypeBprime, imInTypeBprime, !oldImInTypeBprime_set_);
+      notify(ChangeKind.SET, INTERNAL_IM_IN_TYPE_BPRIME, oldImInTypeBprime, imInTypeBprime, !oldImInTypeBprime_set_);
   }
 
   /**
@@ -170,7 +170,7 @@
     imInTypeBprime = IM_IN_TYPE_BPRIME_DEFAULT_;
     imInTypeBprime_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.UNSET, IM_IN_TYPE_BPRIME, oldImInTypeBprime, IM_IN_TYPE_BPRIME_DEFAULT_, oldImInTypeBprime_set_);
+      notify(ChangeKind.UNSET, INTERNAL_IM_IN_TYPE_BPRIME, oldImInTypeBprime, IM_IN_TYPE_BPRIME_DEFAULT_, oldImInTypeBprime_set_);
   }
 
   /**

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java Wed Jul 25 09:04:18 2007
@@ -28,18 +28,12 @@
 import commonj.sdo.Property;
 import commonj.sdo.Type;
 
-import org.apache.tuscany.sdo.SDOFactory;
-
 import org.apache.tuscany.sdo.impl.FactoryBase;
 
 import org.apache.tuscany.sdo.model.ModelFactory;
 
 import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
 
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -96,11 +90,17 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
-   */	
-  public void register(HelperContext scope) {
+   */
+  public void register(HelperContext scope) 
+  {
     if(scope == null) {
-       throw new IllegalArgumentException("Scope can not be null");
-    } 
+      throw new IllegalArgumentException("Scope can not be null");
+    }
+    
+    //Register dependent packages with provided scope
+    ModelFactory.INSTANCE.register(scope);
+    
+    // Initialize this package   
     TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
     th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
   }
@@ -176,29 +176,25 @@
   }
     
 
-  private static boolean isInited = false;
-
+  private static SubgroupFactoryImpl instance = null; 
   public static SubgroupFactoryImpl init()
   {
-    if (isInited) return (SubgroupFactoryImpl)FactoryBase.getStaticFactory(SubgroupFactoryImpl.NAMESPACE_URI);
-    SubgroupFactoryImpl theSubgroupFactoryImpl = new SubgroupFactoryImpl();
-    isInited = true;
-
-    // Initialize dependencies
-    SDOUtil.registerStaticTypes(SDOFactory.class);
-    SDOUtil.registerStaticTypes(ModelFactory.class);
-    SDOUtil.registerStaticTypes(InternalFactory.class);
+    if (instance != null ) return instance;
+    instance = new SubgroupFactoryImpl();
 
+    // Initialize dependent packages
+    ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+    
     // Create package meta-data objects
-    theSubgroupFactoryImpl.createMetaData();
+    instance.createMetaData();
 
     // Initialize created meta-data
-    theSubgroupFactoryImpl.initializeMetaData();
-
+    instance.initializeMetaData();
+    
     // Mark meta-data to indicate it can't be changed
     //theSubgroupFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
 
-    return theSubgroupFactoryImpl;
+    return instance;
   }
   
   private boolean isCreated = false;
@@ -209,12 +205,12 @@
     isCreated = true;	
 
     // Create types and their properties
-          aType = createType(false, A);
+    aType = createType(false, A);
     createProperty(true, aType,AImpl.INTERNAL_GE1_GROUP); 
     createProperty(false, aType,AImpl.INTERNAL_GE1); 
-          bType = createType(false, B);
+    bType = createType(false, B);
     createProperty(true, bType,BImpl.INTERNAL_IM_IN_TYPE_B); 
-          bprimeType = createType(false, BPRIME);
+    bprimeType = createType(false, BPRIME);
     createProperty(true, bprimeType,BprimeImpl.INTERNAL_IM_IN_TYPE_BPRIME); 
   }
   
@@ -226,7 +222,7 @@
     isInitialized = true;
 
     // Obtain other dependent packages
-    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+    ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
     Property property = null;
 
     // Add supertypes to types

Modified: incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java?view=diff&rev=559502&r1=559501&r2=559502
==============================================================================
--- incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java (original)
+++ incubator/tuscany/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java Wed Jul 25 09:04:18 2007
@@ -19,6 +19,7 @@
  */
 package org.apache.tuscany.sdo.test;
 
+import org.apache.tuscany.sdo.generate.JavaGenerator;
 import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
 
 /**
@@ -38,8 +39,16 @@
   }
 
   private void run() {
-
-    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simpleWithChangeSummary.xsd").getFile(), "http://www.example.com/simpleCS", "src/test/java/", "org.example.simple.cs", "CS", 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/CustomerAccount.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/extensible/customer.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/open.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simpleWithChangeSummary.xsd").getFile(), "http://www.example.com/simpleCS", "src/test/java/", "com.example.simple.cs", "CS", 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simple.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simple.xsd").getFile(), null, "src/test/java/", "com.example.noInterfaces.simple", null, JavaGenerator.OPTION_NO_INTERFACES);
+    
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/repeatingChoice.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/sequences.xsd").getFile(), null, "src/test/java/", null, null, 0);
+    XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/subgroup.xsd").getFile(), null, "src/test/java/", null, null, 0);
             
   }
 



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