tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fra...@apache.org
Subject svn commit: r513560 [2/2] - in /incubator/tuscany/java/sdo/impl/src: main/java/org/apache/tuscany/sdo/helper/ main/java/org/apache/tuscany/sdo/impl/ main/java/org/apache/tuscany/sdo/util/ test/java/com/example/simple/ test/java/com/example/simple/impl/
Date Fri, 02 Mar 2007 00:14:07 GMT
Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
Thu Mar  1 16:14:06 2007
@@ -21,9 +21,9 @@
 
 import java.util.List;
 
+import org.apache.tuscany.sdo.SDOPackage;
 import org.apache.tuscany.sdo.util.DataObjectUtil;
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EcorePackage;
 import org.eclipse.emf.ecore.impl.EReferenceImpl;
 
 import commonj.sdo.Property;
@@ -58,7 +58,7 @@
    */
   protected EClass eStaticClass()
   {
-    return EcorePackage.eINSTANCE.getEReference();
+    return SDOPackage.eINSTANCE.getReference();
   }
 
   /**
@@ -113,11 +113,12 @@
    */
   public Type getType()
   {
-    // Note that Property.getType() conflicts with DataObject.getType(), so we can only implement
-    // it one way or the other here. We're implementing it to return the property type so
it will
-    // return the wrong type when the caller is using the DataObject interface.  Not much
we can 
-    // do about it tho. -- James Snell
     return (Type)getEType();
+    /*
+    EClassifier eType = getEType();
+    //FB More temporary hacks
+    return eType instanceof Type ? (Type)getEType() : null;
+    */
   }
 
   /**

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
Thu Mar  1 16:14:06 2007
@@ -19,7 +19,6 @@
  */
 package org.apache.tuscany.sdo.impl;
 
-
 import org.apache.tuscany.sdo.AnyTypeDataObject;
 import org.apache.tuscany.sdo.SDOFactory;
 import org.apache.tuscany.sdo.SDOPackage;
@@ -27,22 +26,20 @@
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
-
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
 import org.eclipse.emf.ecore.impl.EcoreFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
 
 import commonj.sdo.ChangeSummary;
 import commonj.sdo.DataGraph;
 import commonj.sdo.DataObject;
 import commonj.sdo.Property;
 import commonj.sdo.Type;
+
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
@@ -78,7 +75,7 @@
   {
     public EClass createEClass() { return new ClassImpl(); }
     public EDataType createEDataType() { return new DataTypeImpl(); }
-    public EEnum createEEnum() { return new EnumImpl(); }
+    //public EEnum createEEnum() { return new EnumImpl(); }
     public EAttribute createEAttribute() { return new AttributeImpl(); }
     public EReference createEReference() { return new ReferenceImpl(); }
     

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
Thu Mar  1 16:14:06 2007
@@ -33,10 +33,10 @@
 import java.util.TimeZone;
 
 import org.apache.tuscany.sdo.SDOExtendedMetaData;
+import org.apache.tuscany.sdo.SDOFactory;
 import org.apache.tuscany.sdo.SDOPackage;
 import org.apache.tuscany.sdo.impl.ClassImpl;
 import org.apache.tuscany.sdo.impl.DataGraphImpl;
-import org.apache.tuscany.sdo.impl.SDOFactoryImpl;
 import org.apache.tuscany.sdo.util.resource.SDOXMLResourceFactoryImpl;
 import org.eclipse.emf.common.util.BasicEList;
 import org.eclipse.emf.common.util.URI;
@@ -45,12 +45,9 @@
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EClassifier;
 import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EFactory;
 import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcoreFactory;
 import org.eclipse.emf.ecore.EcorePackage;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.ResourceSet;
@@ -378,7 +375,20 @@
   
   public static boolean isInternalProperty(EStructuralFeature eStructuralFeature)
   {
-    return FeatureMapUtil.isFeatureMap(eStructuralFeature);
+    return !(eStructuralFeature.getEType() instanceof Type);
+    /*
+    if (FeatureMapUtil.isFeatureMap(eStructuralFeature)) return true;
+    EClassifier eType = eStructuralFeature.getEType();
+    if (!(eType instanceof Type))
+    {
+      System.out.println("Non Type property: " + eStructuralFeature.getName());
+      if (eType != null)
+      {
+        System.out.println("  type: " + eType.getName());
+      }
+    }
+    return false;
+    */
   }
 
   public static List getInstanceProperties(DataObject dataObject)
@@ -2503,12 +2513,12 @@
   
   public static EClass createDocumentRoot()
   {
-    EClass documentRootEClass = EcoreFactory.eINSTANCE.createEClass();
+    EClass documentRootEClass = (EClass)SDOFactory.eINSTANCE.createClass();
     documentRootEClass.setName("DocumentRoot");
     ExtendedMetaData.INSTANCE.setName(documentRootEClass, "");
     ExtendedMetaData.INSTANCE.setContentKind(documentRootEClass, ExtendedMetaData.MIXED_CONTENT);
     
-    EAttribute mixed = EcoreFactory.eINSTANCE.createEAttribute();
+    EAttribute mixed = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
     mixed.setName("mixed");
     mixed.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
     mixed.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
@@ -2516,7 +2526,7 @@
     ExtendedMetaData.INSTANCE.setFeatureKind(mixed, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
     documentRootEClass.getEStructuralFeatures().add(mixed);
     
-    EReference xmlnsPrefixMap = EcoreFactory.eINSTANCE.createEReference();
+    EReference xmlnsPrefixMap = (EReference)SDOFactory.eINSTANCE.createReference();
     xmlnsPrefixMap.setName("xMLNSPrefixMap");
     xmlnsPrefixMap.setEType(EcorePackage.eINSTANCE.getEStringToStringMapEntry());
     xmlnsPrefixMap.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
@@ -2526,7 +2536,7 @@
     ExtendedMetaData.INSTANCE.setFeatureKind(xmlnsPrefixMap, ExtendedMetaData.ATTRIBUTE_FEATURE);
     documentRootEClass.getEStructuralFeatures().add(xmlnsPrefixMap);
     
-    EReference xsiSchemaLocation = EcoreFactory.eINSTANCE.createEReference();
+    EReference xsiSchemaLocation = (EReference)SDOFactory.eINSTANCE.createReference();
     xsiSchemaLocation.setName("xSISchemaLocation");
     xsiSchemaLocation.setEType(EcorePackage.eINSTANCE.getEStringToStringMapEntry());
     xsiSchemaLocation.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
@@ -2546,6 +2556,7 @@
    *  corresponding INSTANCE fields (e.g., TypeHelper.INSTANCE), or using the SDOUtil methods
(e.g.,
    *  SDOUtil.createTypeHelper(), this will always be the case.
    */
+  /*
   static
   {
     EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, new EPackage.Descriptor()
@@ -2561,6 +2572,7 @@
         }
       });
   }
+  */
   
   protected static StringBuffer getXPath(DataObject dataObject, StringBuffer path)
   {

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
Thu Mar  1 16:14:06 2007
@@ -568,7 +568,7 @@
 
     if (isOpen)
     {
-      EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute();
+      EAttribute eAttribute = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
       ((EClass)type).getEStructuralFeatures().add(eAttribute);
 
       eAttribute.setName("any");
@@ -609,7 +609,7 @@
     if (isSequenced) {
       EClass eClass = (EClass)type;
       ExtendedMetaData.INSTANCE.setContentKind(eClass, ExtendedMetaData.MIXED_CONTENT);
-      EAttribute mixedFeature = EcoreFactory.eINSTANCE.createEAttribute();
+      EAttribute mixedFeature = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
       mixedFeature.setName("mixed");
       mixedFeature.setUnique(false);
       mixedFeature.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/Quote.java Thu Mar  1
16:14:06 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * $Id$
  */
 package com.example.simple;
 
@@ -59,6 +46,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Symbol</em>' attribute.
+   * @see #isSetSymbol()
+   * @see #unsetSymbol()
    * @see #setSymbol(String)
    * @generated
    */
@@ -69,12 +58,37 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>Symbol</em>' attribute.
+   * @see #isSetSymbol()
+   * @see #unsetSymbol()
    * @see #getSymbol()
    * @generated
    */
   void setSymbol(String value);
 
   /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getSymbol <em>Symbol</em>}'
attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetSymbol()
+   * @see #getSymbol()
+   * @see #setSymbol(String)
+   * @generated
+   */
+  void unsetSymbol();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getSymbol <em>Symbol</em>}'
attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>Symbol</em>' attribute is set.
+   * @see #unsetSymbol()
+   * @see #getSymbol()
+   * @see #setSymbol(String)
+   * @generated
+   */
+  boolean isSetSymbol();
+
+  /**
    * Returns the value of the '<em><b>Company Name</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <p>
@@ -83,6 +97,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Company Name</em>' attribute.
+   * @see #isSetCompanyName()
+   * @see #unsetCompanyName()
    * @see #setCompanyName(String)
    * @generated
    */
@@ -93,12 +109,37 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>Company Name</em>' attribute.
+   * @see #isSetCompanyName()
+   * @see #unsetCompanyName()
    * @see #getCompanyName()
    * @generated
    */
   void setCompanyName(String value);
 
   /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getCompanyName <em>Company
Name</em>}' attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetCompanyName()
+   * @see #getCompanyName()
+   * @see #setCompanyName(String)
+   * @generated
+   */
+  void unsetCompanyName();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getCompanyName <em>Company
Name</em>}' attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>Company Name</em>' attribute is set.
+   * @see #unsetCompanyName()
+   * @see #getCompanyName()
+   * @see #setCompanyName(String)
+   * @generated
+   */
+  boolean isSetCompanyName();
+
+  /**
    * Returns the value of the '<em><b>Price</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <p>
@@ -107,6 +148,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Price</em>' attribute.
+   * @see #isSetPrice()
+   * @see #unsetPrice()
    * @see #setPrice(BigDecimal)
    * @generated
    */
@@ -117,12 +160,37 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>Price</em>' attribute.
+   * @see #isSetPrice()
+   * @see #unsetPrice()
    * @see #getPrice()
    * @generated
    */
   void setPrice(BigDecimal value);
 
   /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getPrice <em>Price</em>}'
attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetPrice()
+   * @see #getPrice()
+   * @see #setPrice(BigDecimal)
+   * @generated
+   */
+  void unsetPrice();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getPrice <em>Price</em>}'
attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>Price</em>' attribute is set.
+   * @see #unsetPrice()
+   * @see #getPrice()
+   * @see #setPrice(BigDecimal)
+   * @generated
+   */
+  boolean isSetPrice();
+
+  /**
    * Returns the value of the '<em><b>Open1</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <p>
@@ -131,6 +199,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Open1</em>' attribute.
+   * @see #isSetOpen1()
+   * @see #unsetOpen1()
    * @see #setOpen1(BigDecimal)
    * @generated
    */
@@ -141,12 +211,37 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>Open1</em>' attribute.
+   * @see #isSetOpen1()
+   * @see #unsetOpen1()
    * @see #getOpen1()
    * @generated
    */
   void setOpen1(BigDecimal value);
 
   /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getOpen1 <em>Open1</em>}'
attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetOpen1()
+   * @see #getOpen1()
+   * @see #setOpen1(BigDecimal)
+   * @generated
+   */
+  void unsetOpen1();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getOpen1 <em>Open1</em>}'
attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>Open1</em>' attribute is set.
+   * @see #unsetOpen1()
+   * @see #getOpen1()
+   * @see #setOpen1(BigDecimal)
+   * @generated
+   */
+  boolean isSetOpen1();
+
+  /**
    * Returns the value of the '<em><b>High</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <p>
@@ -155,6 +250,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>High</em>' attribute.
+   * @see #isSetHigh()
+   * @see #unsetHigh()
    * @see #setHigh(BigDecimal)
    * @generated
    */
@@ -165,12 +262,37 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>High</em>' attribute.
+   * @see #isSetHigh()
+   * @see #unsetHigh()
    * @see #getHigh()
    * @generated
    */
   void setHigh(BigDecimal value);
 
   /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getHigh <em>High</em>}'
attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetHigh()
+   * @see #getHigh()
+   * @see #setHigh(BigDecimal)
+   * @generated
+   */
+  void unsetHigh();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getHigh <em>High</em>}'
attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>High</em>' attribute is set.
+   * @see #unsetHigh()
+   * @see #getHigh()
+   * @see #setHigh(BigDecimal)
+   * @generated
+   */
+  boolean isSetHigh();
+
+  /**
    * Returns the value of the '<em><b>Low</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <p>
@@ -179,6 +301,8 @@
    * </p>
    * <!-- end-user-doc -->
    * @return the value of the '<em>Low</em>' attribute.
+   * @see #isSetLow()
+   * @see #unsetLow()
    * @see #setLow(BigDecimal)
    * @generated
    */
@@ -189,10 +313,35 @@
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @param value the new value of the '<em>Low</em>' attribute.
+   * @see #isSetLow()
+   * @see #unsetLow()
    * @see #getLow()
    * @generated
    */
   void setLow(BigDecimal value);
+
+  /**
+   * Unsets the value of the '{@link com.example.simple.Quote#getLow <em>Low</em>}'
attribute.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @see #isSetLow()
+   * @see #getLow()
+   * @see #setLow(BigDecimal)
+   * @generated
+   */
+  void unsetLow();
+
+  /**
+   * Returns whether the value of the '{@link com.example.simple.Quote#getLow <em>Low</em>}'
attribute is set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @return whether the value of the '<em>Low</em>' attribute is set.
+   * @see #unsetLow()
+   * @see #getLow()
+   * @see #setLow(BigDecimal)
+   * @generated
+   */
+  boolean isSetLow();
 
   /**
    * Returns the value of the '<em><b>Volume</b></em>' attribute.

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/SimpleFactory.java Thu
Mar  1 16:14:06 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * $Id$
  */
 package com.example.simple;
 

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/QuoteImpl.java Thu
Mar  1 16:14:06 2007
@@ -1,3 +1,9 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
 package com.example.simple.impl;
 
 import com.example.simple.Quote;
@@ -13,116 +19,159 @@
 import org.apache.tuscany.sdo.impl.DataObjectBase;
 
 /**
-*
-*  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.
-*/
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Quote</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getSymbol <em>Symbol</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getCompanyName <em>Company
Name</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getPrice <em>Price</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getOpen1 <em>Open1</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getHigh <em>High</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getLow <em>Low</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getVolume <em>Volume</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getChange1 <em>Change1</em>}</li>
+ *   <li>{@link com.example.simple.impl.QuoteImpl#getQuotes <em>Quotes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
 public class QuoteImpl extends DataObjectBase implements Quote
 {
+
+  public final static int SYMBOL = 0;
+
+  public final static int COMPANY_NAME = 1;
+
+  public final static int PRICE = 2;
+
+  public final static int OPEN1 = 3;
+
+  public final static int HIGH = 4;
+
+  public final static int LOW = 5;
+
+  public final static int VOLUME = 6;
+
+  public final static int CHANGE1 = 7;
+
+  public final static int QUOTES = 8;
+
+  public final static int SDO_PROPERTY_COUNT = 9;
+
+  public final static int EXTENDED_PROPERTY_COUNT = 0;
+
+
   /**
-   * The feature id for the '<em><b>Symbol</b></em>' attribute.
+   * The internal feature id for the '<em><b>Symbol</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int SYMBOL = 0;
+   */ 
+  public final static int INTERNAL_SYMBOL = 0;
 
   /**
-   * The feature id for the '<em><b>Company Name</b></em>' attribute.
+   * The internal feature id for the '<em><b>Company Name</b></em>'
attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int COMPANY_NAME = 1;
+   */ 
+  public final static int INTERNAL_COMPANY_NAME = 1;
 
   /**
-   * The feature id for the '<em><b>Price</b></em>' attribute.
+   * The internal feature id for the '<em><b>Price</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int PRICE = 2;
+   */ 
+  public final static int INTERNAL_PRICE = 2;
 
   /**
-   * The feature id for the '<em><b>Open1</b></em>' attribute.
+   * The internal feature id for the '<em><b>Open1</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int OPEN1 = 3;
+   */ 
+  public final static int INTERNAL_OPEN1 = 3;
 
   /**
-   * The feature id for the '<em><b>High</b></em>' attribute.
+   * The internal feature id for the '<em><b>High</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int HIGH = 4;
+   */ 
+  public final static int INTERNAL_HIGH = 4;
 
   /**
-   * The feature id for the '<em><b>Low</b></em>' attribute.
+   * The internal feature id for the '<em><b>Low</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int LOW = 5;
+   */ 
+  public final static int INTERNAL_LOW = 5;
 
   /**
-   * The feature id for the '<em><b>Volume</b></em>' attribute.
+   * The internal feature id for the '<em><b>Volume</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int VOLUME = 6;
+   */ 
+  public final static int INTERNAL_VOLUME = 6;
 
   /**
-   * The feature id for the '<em><b>Change1</b></em>' attribute.
+   * The internal feature id for the '<em><b>Change1</b></em>' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int CHANGE1 = 7;
+   */ 
+  public final static int INTERNAL_CHANGE1 = 7;
 
   /**
-   * The feature id for the '<em><b>Quotes</b></em>' containment
reference list.
+   * The internal feature id for the '<em><b>Quotes</b></em>' containment
reference list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
-   */	 
-  public final static int QUOTES = 8;
+   */ 
+  public final static int INTERNAL_QUOTES = 8;
 
   /**
-   * This represents the number of properties for this type.
+   * The number of properties for this type.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
    * @ordered
    */
-  
-  public final static int SDO_PROPERTY_COUNT = 9;
+  public final static int INTERNAL_PROPERTY_COUNT = 9;
+
+  protected int internalConvertIndex(int internalIndex)
+  {
+    switch (internalIndex)
+    {
+      case INTERNAL_SYMBOL: return SYMBOL;
+      case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
+      case INTERNAL_PRICE: return PRICE;
+      case INTERNAL_OPEN1: return OPEN1;
+      case INTERNAL_HIGH: return HIGH;
+      case INTERNAL_LOW: return LOW;
+      case INTERNAL_VOLUME: return VOLUME;
+      case INTERNAL_CHANGE1: return CHANGE1;
+      case INTERNAL_QUOTES: return QUOTES;
+    }
+    return super.internalConvertIndex(internalIndex);
+  }
+
 
   /**
    * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
@@ -145,6 +194,15 @@
   protected String symbol = SYMBOL_DEFAULT_;
 
   /**
+   * This is true if the Symbol attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean symbol_set_ = false;
+
+  /**
    * The default value of the '{@link #getCompanyName() <em>Company Name</em>}'
attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -165,6 +223,15 @@
   protected String companyName = COMPANY_NAME_DEFAULT_;
 
   /**
+   * This is true if the Company Name attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean companyName_set_ = false;
+
+  /**
    * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -185,6 +252,15 @@
   protected BigDecimal price = PRICE_DEFAULT_;
 
   /**
+   * This is true if the Price attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean price_set_ = false;
+
+  /**
    * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -205,6 +281,15 @@
   protected BigDecimal open1 = OPEN1_DEFAULT_;
 
   /**
+   * This is true if the Open1 attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean open1_set_ = false;
+
+  /**
    * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -225,6 +310,15 @@
   protected BigDecimal high = HIGH_DEFAULT_;
 
   /**
+   * This is true if the High attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean high_set_ = false;
+
+  /**
    * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -245,6 +339,15 @@
   protected BigDecimal low = LOW_DEFAULT_;
 
   /**
+   * This is true if the Low attribute has been set.
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   * @ordered
+   */
+  protected boolean low_set_ = false;
+
+  /**
    * The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -351,8 +454,35 @@
   {
     String oldSymbol = symbol;
     symbol = newSymbol;
+    boolean oldSymbol_set_ = symbol_set_;
+    symbol_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetSymbol()
+  {
+    String oldSymbol = symbol;
+    boolean oldSymbol_set_ = symbol_set_;
+    symbol = SYMBOL_DEFAULT_;
+    symbol_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol);
+      notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetSymbol()
+  {
+    return symbol_set_;
   }
 
   /**
@@ -373,8 +503,35 @@
   {
     String oldCompanyName = companyName;
     companyName = newCompanyName;
+    boolean oldCompanyName_set_ = companyName_set_;
+    companyName_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetCompanyName()
+  {
+    String oldCompanyName = companyName;
+    boolean oldCompanyName_set_ = companyName_set_;
+    companyName = COMPANY_NAME_DEFAULT_;
+    companyName_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName);
+      notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetCompanyName()
+  {
+    return companyName_set_;
   }
 
   /**
@@ -395,8 +552,35 @@
   {
     BigDecimal oldPrice = price;
     price = newPrice;
+    boolean oldPrice_set_ = price_set_;
+    price_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetPrice()
+  {
+    BigDecimal oldPrice = price;
+    boolean oldPrice_set_ = price_set_;
+    price = PRICE_DEFAULT_;
+    price_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.SET, PRICE, oldPrice, price);
+      notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetPrice()
+  {
+    return price_set_;
   }
 
   /**
@@ -417,8 +601,35 @@
   {
     BigDecimal oldOpen1 = open1;
     open1 = newOpen1;
+    boolean oldOpen1_set_ = open1_set_;
+    open1_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, OPEN1, oldOpen1, open1);
+      notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetOpen1()
+  {
+    BigDecimal oldOpen1 = open1;
+    boolean oldOpen1_set_ = open1_set_;
+    open1 = OPEN1_DEFAULT_;
+    open1_set_ = false;
+    if (isNotifying())
+      notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetOpen1()
+  {
+    return open1_set_;
   }
 
   /**
@@ -439,8 +650,35 @@
   {
     BigDecimal oldHigh = high;
     high = newHigh;
+    boolean oldHigh_set_ = high_set_;
+    high_set_ = true;
+    if (isNotifying())
+      notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetHigh()
+  {
+    BigDecimal oldHigh = high;
+    boolean oldHigh_set_ = high_set_;
+    high = HIGH_DEFAULT_;
+    high_set_ = false;
     if (isNotifying())
-      notify(ChangeKind.SET, HIGH, oldHigh, high);
+      notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetHigh()
+  {
+    return high_set_;
   }
 
   /**
@@ -461,8 +699,35 @@
   {
     BigDecimal oldLow = low;
     low = newLow;
+    boolean oldLow_set_ = low_set_;
+    low_set_ = true;
     if (isNotifying())
-      notify(ChangeKind.SET, LOW, oldLow, low);
+      notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public void unsetLow()
+  {
+    BigDecimal oldLow = low;
+    boolean oldLow_set_ = low_set_;
+    low = LOW_DEFAULT_;
+    low_set_ = false;
+    if (isNotifying())
+      notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public boolean isSetLow()
+  {
+    return low_set_;
   }
 
   /**
@@ -673,22 +938,22 @@
     switch (propertyIndex)
     {
       case SYMBOL:
-        setSymbol(SYMBOL_DEFAULT_);
+        unsetSymbol();
         return;
       case COMPANY_NAME:
-        setCompanyName(COMPANY_NAME_DEFAULT_);
+        unsetCompanyName();
         return;
       case PRICE:
-        setPrice(PRICE_DEFAULT_);
+        unsetPrice();
         return;
       case OPEN1:
-        setOpen1(OPEN1_DEFAULT_);
+        unsetOpen1();
         return;
       case HIGH:
-        setHigh(HIGH_DEFAULT_);
+        unsetHigh();
         return;
       case LOW:
-        setLow(LOW_DEFAULT_);
+        unsetLow();
         return;
       case VOLUME:
         unsetVolume();
@@ -713,17 +978,17 @@
     switch (propertyIndex)
     {
       case SYMBOL:
-        return SYMBOL_DEFAULT_ == null ? symbol != null : !SYMBOL_DEFAULT_.equals(symbol);
+        return isSetSymbol();
       case COMPANY_NAME:
-        return COMPANY_NAME_DEFAULT_ == null ? companyName != null : !COMPANY_NAME_DEFAULT_.equals(companyName);
+        return isSetCompanyName();
       case PRICE:
-        return PRICE_DEFAULT_ == null ? price != null : !PRICE_DEFAULT_.equals(price);
+        return isSetPrice();
       case OPEN1:
-        return OPEN1_DEFAULT_ == null ? open1 != null : !OPEN1_DEFAULT_.equals(open1);
+        return isSetOpen1();
       case HIGH:
-        return HIGH_DEFAULT_ == null ? high != null : !HIGH_DEFAULT_.equals(high);
+        return isSetHigh();
       case LOW:
-        return LOW_DEFAULT_ == null ? low != null : !LOW_DEFAULT_.equals(low);
+        return isSetLow();
       case VOLUME:
         return isSetVolume();
       case CHANGE1:
@@ -745,17 +1010,17 @@
 
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (symbol: ");
-    result.append(symbol);
+    if (symbol_set_) result.append(symbol); else result.append("<unset>");
     result.append(", companyName: ");
-    result.append(companyName);
+    if (companyName_set_) result.append(companyName); else result.append("<unset>");
     result.append(", price: ");
-    result.append(price);
+    if (price_set_) result.append(price); else result.append("<unset>");
     result.append(", open1: ");
-    result.append(open1);
+    if (open1_set_) result.append(open1); else result.append("<unset>");
     result.append(", high: ");
-    result.append(high);
+    if (high_set_) result.append(high); else result.append("<unset>");
     result.append(", low: ");
-    result.append(low);
+    if (low_set_) result.append(low); else result.append("<unset>");
     result.append(", volume: ");
     if (volume_set_) result.append(volume); else result.append("<unset>");
     result.append(", change1: ");

Modified: incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java?view=diff&rev=513560&r1=513559&r2=513560
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
Thu Mar  1 16:14:06 2007
@@ -1,21 +1,8 @@
 /**
+ * <copyright>
+ * </copyright>
  *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * $Id$
  */
 package com.example.simple.impl;
 
@@ -42,7 +29,7 @@
  * <!-- begin-user-doc -->
  * An implementation of the model <b>Factory</b>.
  * Generator information:
- * patternVersion=1.0;
+ * patternVersion=1.1;
  * <!-- end-user-doc -->
  * @generated
  */
@@ -71,7 +58,7 @@
    * <!-- end-user-doc -->
    * @generated
    */
-  public static final String PATTERN_VERSION = "1.0";
+  public static final String PATTERN_VERSION = "1.1";
   
   public static final int QUOTE = 1;
   
@@ -168,16 +155,16 @@
     isCreated = true;	
 
     // Create types and their properties
-    quoteType = createType(false, QUOTE);
-    createProperty(true, quoteType, QuoteImpl.SYMBOL);
-    createProperty(true, quoteType, QuoteImpl.COMPANY_NAME);
-    createProperty(true, quoteType, QuoteImpl.PRICE);
-    createProperty(true, quoteType, QuoteImpl.OPEN1);
-    createProperty(true, quoteType, QuoteImpl.HIGH);
-    createProperty(true, quoteType, QuoteImpl.LOW);
-    createProperty(true, quoteType, QuoteImpl.VOLUME);
-    createProperty(true, quoteType, QuoteImpl.CHANGE1);
-    createProperty(false, quoteType, QuoteImpl.QUOTES);
+          quoteType = createType(false, QUOTE);
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_SYMBOL); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_COMPANY_NAME); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_PRICE); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_OPEN1); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_HIGH); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_LOW); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_VOLUME); 
+    createProperty(true, quoteType,QuoteImpl.INTERNAL_CHANGE1); 
+    createProperty(false, quoteType,QuoteImpl.INTERNAL_QUOTES); 
   }
   
   private boolean isInitialized = false;
@@ -195,24 +182,32 @@
 
     // Initialize types and properties
     initializeType(quoteType, Quote.class, "Quote", false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.SYMBOL);
-    initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class,
false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.COMPANY_NAME);
-    initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1,
1, Quote.class, false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.PRICE);
-    initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class,
false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.OPEN1);
-    initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class,
false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.HIGH);
-    initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class,
false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.LOW);
-    initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class,
false, false, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.VOLUME);
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL);
+    initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class,
false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME);
+    initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1,
1, Quote.class, false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_PRICE);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class,
false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class,
false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_HIGH);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class,
false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_LOW);
+    initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class,
false, true, false);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME);
     initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class,
false, true, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.CHANGE1);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1);
     initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1,
Quote.class, false, true, false);
-    property = (Property)quoteType.getProperties().get(QuoteImpl.QUOTES);
-    initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false,
false, false, true, null);
+
+    property = getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES);
+    initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false,
false, false, true , null);
 
     createXSDMetaData(theModelPackageImpl);
   }
@@ -223,6 +218,7 @@
     
     Property property = null;
     
+
     property = createGlobalProperty
       ("stockQuote",
       this.getQuote(),
@@ -242,7 +238,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.SYMBOL),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL),
        new String[]
        {
        "kind", "element",
@@ -250,7 +246,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.COMPANY_NAME),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME),
        new String[]
        {
        "kind", "element",
@@ -258,7 +254,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.PRICE),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_PRICE),
        new String[]
        {
        "kind", "element",
@@ -266,7 +262,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.OPEN1),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1),
        new String[]
        {
        "kind", "element",
@@ -274,7 +270,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.HIGH),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_HIGH),
        new String[]
        {
        "kind", "element",
@@ -282,7 +278,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.LOW),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_LOW),
        new String[]
        {
        "kind", "element",
@@ -290,7 +286,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.VOLUME),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME),
        new String[]
        {
        "kind", "element",
@@ -298,7 +294,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.CHANGE1),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1),
        new String[]
        {
        "kind", "element",
@@ -306,7 +302,7 @@
        });
 
     addXSDMapping
-      ((Property)quoteType.getProperties().get(QuoteImpl.QUOTES),
+      (getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES),
        new String[]
        {
        "kind", "element",
@@ -314,5 +310,5 @@
        });
 
   }
-  
+    
 } //SimpleFactoryImpl



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


Mime
View raw message