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/06/13 16:11:30 UTC
svn commit: r546884 [2/3] - in /incubator/tuscany/java/sdo: impl/model/
impl/src/main/java/org/apache/tuscany/sdo/
impl/src/main/java/org/apache/tuscany/sdo/helper/
impl/src/main/java/org/apache/tuscany/sdo/impl/
impl/src/main/java/org/apache/tuscany/s...
Added: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java?view=auto&rev=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java (added)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -0,0 +1,414 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.extensible.customer.impl;
+
+import commonj.sdo.helper.HelperContext;
+import org.apache.tuscany.sdo.helper.TypeHelperImpl;
+
+import com.example.extensible.customer.*;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.SDOFactory;
+
+import org.apache.tuscany.sdo.impl.FactoryBase;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
+
+import org.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>.
+ * Generator information:
+ * patternVersion=1.2;
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CustomerFactoryImpl extends FactoryBase implements CustomerFactory
+{
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_URI = "http://www.example.com/extensible/customer";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_PREFIX = "customer";
+
+ /**
+ * The version of the generator pattern used to generate this class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String PATTERN_VERSION = "1.2";
+
+ public static final int CUSTOMERS_TYPE = 1;
+ public static final int CUSTOMER_TYPE = 2;
+ public static final int INFO_TYPE = 3;
+ public static final int CUST_NAME_TYPE = 4;
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomerFactoryImpl()
+ {
+ super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.extensible.customer");
+ }
+
+ /**
+ * Registers the Factory instance so that it is available within the supplied scope.
+ * @argument scope a HelperContext instance that will make the types supported by this Factory available.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void register(HelperContext scope) {
+ if(scope == null) {
+ throw new IllegalArgumentException("Scope can not be null");
+ }
+ TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
+ th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DataObject create(int typeNumber)
+ {
+ switch (typeNumber)
+ {
+ case CUSTOMERS_TYPE: return (DataObject)createCustomersType();
+ case CUSTOMER_TYPE: return (DataObject)createCustomerType();
+ case INFO_TYPE: return (DataObject)createInfoType();
+ default:
+ return super.create(typeNumber);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object createFromString(int typeNumber, String initialValue)
+ {
+ switch (typeNumber)
+ {
+ case CUST_NAME_TYPE:
+ return createCustNameTypeFromString(initialValue);
+ default:
+ throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertToString(int typeNumber, Object instanceValue)
+ {
+ switch (typeNumber)
+ {
+ case CUST_NAME_TYPE:
+ return convertCustNameTypeToString(instanceValue);
+ default:
+ throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
+ }
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomersType createCustomersType()
+ {
+ CustomersTypeImpl customersType = new CustomersTypeImpl();
+ return customersType;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomerType createCustomerType()
+ {
+ CustomerTypeImpl customerType = new CustomerTypeImpl();
+ return customerType;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InfoType createInfoType()
+ {
+ InfoTypeImpl infoType = new InfoTypeImpl();
+ return infoType;
+ }
+
+ // Following creates and initializes SDO metadata for the supported types.
+ protected Type customersTypeType = null;
+
+ public Type getCustomersType()
+ {
+ return customersTypeType;
+ }
+
+ protected Type customerTypeType = null;
+
+ public Type getCustomerType()
+ {
+ return customerTypeType;
+ }
+
+ protected Type infoTypeType = null;
+
+ public Type getInfoType()
+ {
+ return infoTypeType;
+ }
+
+ protected Type custNameTypeType = null;
+
+ public Type getCustNameType()
+ {
+ return custNameTypeType;
+ }
+
+
+ private static boolean isInited = false;
+
+ 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);
+
+ // Create package meta-data objects
+ theCustomerFactoryImpl.createMetaData();
+
+ // Initialize created meta-data
+ theCustomerFactoryImpl.initializeMetaData();
+
+ // Mark meta-data to indicate it can't be changed
+ //theCustomerFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
+
+ return theCustomerFactoryImpl;
+ }
+
+ private boolean isCreated = false;
+
+ public void createMetaData()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create types and their properties
+ customersTypeType = createType(false, CUSTOMERS_TYPE);
+ createProperty(false, customersTypeType,CustomersTypeImpl.INTERNAL_CUSTOMER);
+ 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);
+
+ // Create data types
+ custNameTypeType = createType(true, CUST_NAME_TYPE );
+ }
+
+ private boolean isInitialized = false;
+
+ public void initializeMetaData()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Obtain other dependent packages
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ Property property = null;
+
+ // Add supertypes to types
+
+ // Initialize types and properties
+ initializeType(customersTypeType, CustomersType.class, "CustomersType", false);
+ property = getLocalProperty(customersTypeType, 0);
+ initializeProperty(property, this.getCustomerType(), "customer", null, 1, -1, CustomersType.class, false, false, false, true , null);
+
+ initializeType(customerTypeType, CustomerType.class, "CustomerType", false);
+ property = getLocalProperty(customerTypeType, 0);
+ initializeProperty(property, this.getCustNameType(), "name", null, 1, 1, CustomerType.class, false, true, false);
+
+ property = getLocalProperty(customerTypeType, 1);
+ initializeProperty(property, theModelPackageImpl.getInteger(), "number", null, 1, 1, CustomerType.class, false, true, false);
+
+ property = getLocalProperty(customerTypeType, 2);
+ initializeProperty(property, this.getInfoType(), "info", null, 1, 1, CustomerType.class, false, true, false, true , null);
+
+ initializeType(infoTypeType, InfoType.class, "InfoType", false);
+ // Initialize data types
+ initializeType(custNameTypeType, String.class, "CustNameType", true, false);
+
+ createXSDMetaData(theModelPackageImpl);
+ }
+
+ protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
+ {
+ super.initXSD();
+
+ Property property = null;
+
+
+ addXSDMapping
+ (customersTypeType,
+ new String[]
+ {
+ "name", "CustomersType",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(customersTypeType, CustomersTypeImpl.INTERNAL_CUSTOMER),
+ new String[]
+ {
+ "kind", "element",
+ "name", "customer",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (customerTypeType,
+ new String[]
+ {
+ "name", "CustomerType",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_NAME),
+ new String[]
+ {
+ "kind", "element",
+ "name", "name",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_NUMBER),
+ new String[]
+ {
+ "kind", "element",
+ "name", "number",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_INFO),
+ new String[]
+ {
+ "kind", "element",
+ "name", "info"
+ });
+
+ property = createGlobalProperty
+ ("customer",
+ this.getCustomerType(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "customer",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("customers",
+ this.getCustomersType(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "customers",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (infoTypeType,
+ new String[]
+ {
+ "name", "InfoType",
+ "kind", "empty"
+ });
+
+ addXSDMapping
+ (custNameTypeType,
+ new String[]
+ {
+ "name", "CustNameType",
+ "baseType", "commonj.sdo#String"
+ });
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String createCustNameTypeFromString(String initialValue)
+ {
+ return (String)((ModelFactoryImpl)ModelFactory.INSTANCE).createStringFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertCustNameTypeToString(Object instanceValue)
+ {
+ return ((ModelFactoryImpl)ModelFactory.INSTANCE).convertStringToString(instanceValue);
+ }
+
+} //CustomerFactoryImpl
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java?view=auto&rev=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java (added)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java Wed Jun 13 07:11:26 2007
@@ -0,0 +1,524 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.extensible.customer.impl;
+
+import com.example.extensible.customer.CustomerFactory;
+import com.example.extensible.customer.CustomerType;
+import com.example.extensible.customer.InfoType;
+
+import commonj.sdo.Type;
+
+import java.math.BigInteger;
+
+import org.apache.tuscany.sdo.impl.DataObjectBase;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getName <em>Name</em>}</li>
+ * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getNumber <em>Number</em>}</li>
+ * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getInfo <em>Info</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CustomerTypeImpl extends DataObjectBase implements CustomerType
+{
+
+ public final static int NAME = 0;
+
+ public final static int NUMBER = 1;
+
+ public final static int INFO = 2;
+
+ public final static int SDO_PROPERTY_COUNT = 3;
+
+ public final static int EXTENDED_PROPERTY_COUNT = 0;
+
+
+ /**
+ * The internal feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_NAME = 0;
+
+ /**
+ * The internal feature id for the '<em><b>Number</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_NUMBER = 1;
+
+ /**
+ * The internal feature id for the '<em><b>Info</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_INFO = 2;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 3;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_NAME: return NAME;
+ case INTERNAL_NUMBER: return NUMBER;
+ case INTERNAL_INFO: return INFO;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_DEFAULT_ = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_DEFAULT_;
+
+ /**
+ * This is true if the Name attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean name_set_ = false;
+
+ /**
+ * The default value of the '{@link #getNumber() <em>Number</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNumber()
+ * @generated
+ * @ordered
+ */
+ protected static final BigInteger NUMBER_DEFAULT_ = null;
+
+ /**
+ * The cached value of the '{@link #getNumber() <em>Number</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNumber()
+ * @generated
+ * @ordered
+ */
+ protected BigInteger number = NUMBER_DEFAULT_;
+
+ /**
+ * This is true if the Number attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean number_set_ = false;
+
+ /**
+ * The cached value of the '{@link #getInfo() <em>Info</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInfo()
+ * @generated
+ * @ordered
+ */
+
+ protected InfoType info = null;
+
+ /**
+ * This is true if the Info containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean info_set_ = false;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomerTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getCustomerType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ boolean oldName_set_ = name_set_;
+ name_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, NAME, oldName, name, !oldName_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetName()
+ {
+ String oldName = name;
+ boolean oldName_set_ = name_set_;
+ name = NAME_DEFAULT_;
+ name_set_ = false;
+ if (isNotifying())
+ notify(ChangeKind.UNSET, NAME, oldName, NAME_DEFAULT_, oldName_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetName()
+ {
+ return name_set_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigInteger getNumber()
+ {
+ return number;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNumber(BigInteger newNumber)
+ {
+ BigInteger oldNumber = number;
+ number = newNumber;
+ boolean oldNumber_set_ = number_set_;
+ number_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, NUMBER, oldNumber, number, !oldNumber_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetNumber()
+ {
+ BigInteger oldNumber = number;
+ boolean oldNumber_set_ = number_set_;
+ number = NUMBER_DEFAULT_;
+ number_set_ = false;
+ if (isNotifying())
+ notify(ChangeKind.UNSET, NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetNumber()
+ {
+ return number_set_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InfoType getInfo()
+ {
+ return info;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext basicSetInfo(InfoType newInfo, ChangeContext changeContext)
+ {
+ InfoType oldInfo = info;
+ info = newInfo;
+ boolean oldInfo_set_ = info_set_;
+ info_set_ = true;
+ if (isNotifying())
+ {
+ addNotification(this, ChangeKind.SET, INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
+ }
+ return changeContext;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInfo(InfoType newInfo)
+ {
+ if (newInfo != info)
+ {
+ ChangeContext changeContext = null;
+ if (info != null)
+ changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+ if (newInfo != null)
+ changeContext = inverseAdd(newInfo, this, OPPOSITE_FEATURE_BASE - 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_);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext basicUnsetInfo(ChangeContext changeContext)
+ {
+ InfoType oldInfo = info;
+ info = null;
+ boolean oldInfo_set_ = info_set_;
+ info_set_ = false;
+ if (isNotifying())
+ {
+ addNotification(this, ChangeKind.UNSET, INFO, oldInfo, null, !oldInfo_set_, changeContext);
+ }
+ return changeContext;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetInfo()
+ {
+ if (info != null)
+ {
+ ChangeContext changeContext = null;
+ changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+ changeContext = basicUnsetInfo(changeContext);
+ if (changeContext != null) dispatch(changeContext);
+ }
+ else
+ {
+ boolean oldInfo_set_ = info_set_;
+ info_set_ = false;
+ if (isNotifying())
+ notify(ChangeKind.UNSET, INFO, null, null, oldInfo_set_);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetInfo()
+ {
+ return info_set_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case INFO:
+ return basicUnsetInfo(changeContext);
+ }
+ return super.inverseRemove(otherEnd, propertyIndex, changeContext);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object get(int propertyIndex, boolean resolve)
+ {
+ switch (propertyIndex)
+ {
+ case NAME:
+ return getName();
+ case NUMBER:
+ return getNumber();
+ case INFO:
+ return getInfo();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case NAME:
+ setName((String)newValue);
+ return;
+ case NUMBER:
+ setNumber((BigInteger)newValue);
+ return;
+ case INFO:
+ setInfo((InfoType)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case NAME:
+ unsetName();
+ return;
+ case NUMBER:
+ unsetNumber();
+ return;
+ case INFO:
+ unsetInfo();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case NAME:
+ return isSetName();
+ case NUMBER:
+ return isSetNumber();
+ case INFO:
+ return isSetInfo();
+ }
+ return super.isSet(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString()
+ {
+ if (isProxy(this)) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ if (name_set_) result.append(name); else result.append("<unset>");
+ result.append(", number: ");
+ if (number_set_) result.append(number); else result.append("<unset>");
+ result.append(')');
+ return result.toString();
+ }
+
+} //CustomerTypeImpl
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java?view=auto&rev=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java (added)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java Wed Jun 13 07:11:26 2007
@@ -0,0 +1,206 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.extensible.customer.impl;
+
+import com.example.extensible.customer.CustomerFactory;
+import com.example.extensible.customer.CustomerType;
+import com.example.extensible.customer.CustomersType;
+
+import commonj.sdo.Type;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.tuscany.sdo.impl.DataObjectBase;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Customers Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.extensible.customer.impl.CustomersTypeImpl#getCustomer <em>Customer</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CustomersTypeImpl extends DataObjectBase implements CustomersType
+{
+
+ public final static int CUSTOMER = 0;
+
+ public final static int SDO_PROPERTY_COUNT = 1;
+
+ public final static int EXTENDED_PROPERTY_COUNT = 0;
+
+
+ /**
+ * The internal feature id for the '<em><b>Customer</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_CUSTOMER = 0;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 1;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_CUSTOMER: return CUSTOMER;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getCustomer() <em>Customer</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomer()
+ * @generated
+ * @ordered
+ */
+
+ protected List customer = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomersTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getCustomersType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getCustomer()
+ {
+ if (customer == null)
+ {
+ customer = createPropertyList(ListKind.CONTAINMENT, CustomerType.class, CUSTOMER, 0);
+ }
+ return customer;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case CUSTOMER:
+ return removeFromList(getCustomer(), otherEnd, changeContext);
+ }
+ return super.inverseRemove(otherEnd, propertyIndex, changeContext);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object get(int propertyIndex, boolean resolve)
+ {
+ switch (propertyIndex)
+ {
+ case CUSTOMER:
+ return getCustomer();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case CUSTOMER:
+ getCustomer().clear();
+ getCustomer().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case CUSTOMER:
+ getCustomer().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case CUSTOMER:
+ return customer != null && !customer.isEmpty();
+ }
+ return super.isSet(propertyIndex);
+ }
+
+} //CustomersTypeImpl
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java?view=auto&rev=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java (added)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java Wed Jun 13 07:11:26 2007
@@ -0,0 +1,84 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.extensible.customer.impl;
+
+import com.example.extensible.customer.CustomerFactory;
+import com.example.extensible.customer.InfoType;
+
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.impl.DataObjectBase;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Info Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class InfoTypeImpl extends DataObjectBase implements InfoType
+{
+
+ public final static int SDO_PROPERTY_COUNT = 0;
+
+ public final static int EXTENDED_PROPERTY_COUNT = 0;
+
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 0;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InfoTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getInfoType();
+ }
+
+} //InfoTypeImpl
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sdo/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/noInterfaces/simple/Quote.java Wed Jun 13 07:11:26 2007
@@ -445,7 +445,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SimpleFactory)SimpleFactory.INSTANCE).getQuote();
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java Wed Jun 13 07:11:26 2007
@@ -147,7 +147,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((OpenFactoryImpl)OpenFactory.INSTANCE).getOneElementAndAnyAttr();
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -44,7 +44,7 @@
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* Generator information:
- * patternVersion=1.1;
+ * patternVersion=1.2;
* <!-- end-user-doc -->
* @generated
*/
@@ -73,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 ONE_ELEMENT_AND_ANY_ATTR = 1;
@@ -146,7 +146,7 @@
OpenFactoryImpl theOpenFactoryImpl = new OpenFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
SDOUtil.registerStaticTypes(InternalFactory.class);
@@ -191,10 +191,10 @@
// Initialize types and properties
initializeType(oneElementAndAnyAttrType, OneElementAndAnyAttr.class, "OneElementAndAnyAttr", false);
- property = getProperty(oneElementAndAnyAttrType, OneElementAndAnyAttrImpl.INTERNAL_NAME);
+ property = getLocalProperty(oneElementAndAnyAttrType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "name", null, 1, 1, OneElementAndAnyAttr.class, false, true, false);
- property = getProperty(oneElementAndAnyAttrType, OneElementAndAnyAttrImpl.INTERNAL_ANY_ATTRIBUTE);
+ property = getLocalProperty(oneElementAndAnyAttrType, 1);
initializeProperty(property, getSequence(), "anyAttribute", null, 0, -1, OneElementAndAnyAttr.class, false, false, false);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java Wed Jun 13 07:11:26 2007
@@ -146,7 +146,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((RepchoiceFactoryImpl)RepchoiceFactory.INSTANCE).getRCType();
}
@@ -171,8 +171,7 @@
*/
public List getS()
{
- return getList(getGroup(), getType(), S);
-
+ return getList(getGroup(), getType(), INTERNAL_S);
}
/**
* <!-- begin-user-doc -->
@@ -181,8 +180,7 @@
*/
public List getI()
{
- return getList(getGroup(), getType(), I);
-
+ return getList(getGroup(), getType(), INTERNAL_I);
}
/**
* <!-- begin-user-doc -->
@@ -191,8 +189,7 @@
*/
public List getF()
{
- return getList(getGroup(), getType(), F);
-
+ return getList(getGroup(), getType(), INTERNAL_F);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -36,13 +36,15 @@
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>.
* Generator information:
- * patternVersion=1.1;
+ * patternVersion=1.2;
* <!-- end-user-doc -->
* @generated
*/
@@ -71,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 RC_TYPE = 1;
@@ -144,9 +146,10 @@
RepchoiceFactoryImpl theRepchoiceFactoryImpl = new RepchoiceFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
// Create package meta-data objects
theRepchoiceFactoryImpl.createMetaData();
@@ -190,16 +193,16 @@
// Initialize types and properties
initializeType(rcTypeType, RCType.class, "RCType", false);
- property = getProperty(rcTypeType, RCTypeImpl.INTERNAL_GROUP);
+ property = getLocalProperty(rcTypeType, 0);
initializeProperty(property, getSequence(), "group", null, 0, -1, RCType.class, false, false, false);
- property = getProperty(rcTypeType, RCTypeImpl.INTERNAL_S);
+ property = getLocalProperty(rcTypeType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "s", null, 0, -1, RCType.class, false, false, true);
- property = getProperty(rcTypeType, RCTypeImpl.INTERNAL_I);
+ property = getLocalProperty(rcTypeType, 2);
initializeProperty(property, theModelPackageImpl.getInt(), "i", null, 0, -1, RCType.class, false, false, true);
- property = getProperty(rcTypeType, RCTypeImpl.INTERNAL_F);
+ property = getLocalProperty(rcTypeType, 3);
initializeProperty(property, theModelPackageImpl.getFloat(), "f", null, 0, -1, RCType.class, false, false, true);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java Wed Jun 13 07:11:26 2007
@@ -226,7 +226,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedQuote();
}
@@ -270,7 +270,7 @@
*/
public void unsetSymbol()
{
- unset(getMixed(), getType(), SYMBOL);
+ unset(getMixed(), getType(), INTERNAL_SYMBOL);
}
/**
@@ -280,7 +280,7 @@
*/
public boolean isSetSymbol()
{
- return isSet(getMixed(), getType(), SYMBOL);
+ return isSet(getMixed(), getType(), INTERNAL_SYMBOL);
}
/**
@@ -309,7 +309,7 @@
*/
public void unsetCompanyName()
{
- unset(getMixed(), getType(), COMPANY_NAME);
+ unset(getMixed(), getType(), INTERNAL_COMPANY_NAME);
}
/**
@@ -319,7 +319,7 @@
*/
public boolean isSetCompanyName()
{
- return isSet(getMixed(), getType(), COMPANY_NAME);
+ return isSet(getMixed(), getType(), INTERNAL_COMPANY_NAME);
}
/**
@@ -348,7 +348,7 @@
*/
public void unsetPrice()
{
- unset(getMixed(), getType(), PRICE);
+ unset(getMixed(), getType(), INTERNAL_PRICE);
}
/**
@@ -358,7 +358,7 @@
*/
public boolean isSetPrice()
{
- return isSet(getMixed(), getType(), PRICE);
+ return isSet(getMixed(), getType(), INTERNAL_PRICE);
}
/**
@@ -387,7 +387,7 @@
*/
public void unsetOpen1()
{
- unset(getMixed(), getType(), OPEN1);
+ unset(getMixed(), getType(), INTERNAL_OPEN1);
}
/**
@@ -397,7 +397,7 @@
*/
public boolean isSetOpen1()
{
- return isSet(getMixed(), getType(), OPEN1);
+ return isSet(getMixed(), getType(), INTERNAL_OPEN1);
}
/**
@@ -426,7 +426,7 @@
*/
public void unsetHigh()
{
- unset(getMixed(), getType(), HIGH);
+ unset(getMixed(), getType(), INTERNAL_HIGH);
}
/**
@@ -436,7 +436,7 @@
*/
public boolean isSetHigh()
{
- return isSet(getMixed(), getType(), HIGH);
+ return isSet(getMixed(), getType(), INTERNAL_HIGH);
}
/**
@@ -465,7 +465,7 @@
*/
public void unsetLow()
{
- unset(getMixed(), getType(), LOW);
+ unset(getMixed(), getType(), INTERNAL_LOW);
}
/**
@@ -475,7 +475,7 @@
*/
public boolean isSetLow()
{
- return isSet(getMixed(), getType(), LOW);
+ return isSet(getMixed(), getType(), INTERNAL_LOW);
}
/**
@@ -504,7 +504,7 @@
*/
public void unsetVolume()
{
- unset(getMixed(), getType(), VOLUME);
+ unset(getMixed(), getType(), INTERNAL_VOLUME);
}
/**
@@ -514,7 +514,7 @@
*/
public boolean isSetVolume()
{
- return isSet(getMixed(), getType(), VOLUME);
+ return isSet(getMixed(), getType(), INTERNAL_VOLUME);
}
/**
@@ -543,7 +543,7 @@
*/
public void unsetChange1()
{
- unset(getMixed(), getType(), CHANGE1);
+ unset(getMixed(), getType(), INTERNAL_CHANGE1);
}
/**
@@ -553,7 +553,7 @@
*/
public boolean isSetChange1()
{
- return isSet(getMixed(), getType(), CHANGE1);
+ return isSet(getMixed(), getType(), INTERNAL_CHANGE1);
}
/**
@@ -563,8 +563,7 @@
*/
public List getQuotes()
{
- return getList(getMixed(), getType(), QUOTES);
-
+ return getList(getMixed(), getType(), INTERNAL_QUOTES);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java Wed Jun 13 07:11:26 2007
@@ -146,7 +146,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedRepeatingChoice();
}
@@ -171,7 +171,7 @@
*/
public Sequence getGroup()
{
- return createSequence(getMixed(), getType(), GROUP);
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP);
}
/**
* <!-- begin-user-doc -->
@@ -180,8 +180,7 @@
*/
public List getA()
{
- return getList(getGroup(), getType(), A);
-
+ return getList(getGroup(), getType(), INTERNAL_A);
}
/**
* <!-- begin-user-doc -->
@@ -190,8 +189,7 @@
*/
public List getB()
{
- return getList(getGroup(), getType(), B);
-
+ return getList(getGroup(), getType(), INTERNAL_B);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java Wed Jun 13 07:11:26 2007
@@ -133,7 +133,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getRepeatingChoice();
}
@@ -158,8 +158,7 @@
*/
public List getA()
{
- return getList(getGroup(), getType(), A);
-
+ return getList(getGroup(), getType(), INTERNAL_A);
}
/**
* <!-- begin-user-doc -->
@@ -168,8 +167,7 @@
*/
public List getB()
{
- return getList(getGroup(), getType(), B);
-
+ return getList(getGroup(), getType(), INTERNAL_B);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -36,13 +36,15 @@
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>.
* Generator information:
- * patternVersion=1.1; -prefix Sequences
+ * patternVersion=1.2; -prefix Sequences
* <!-- end-user-doc -->
* @generated
*/
@@ -71,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 MIXED_QUOTE = 1;
public static final int MIXED_REPEATING_CHOICE = 2;
@@ -220,9 +222,10 @@
SequencesFactoryImpl theSequencesFactoryImpl = new SequencesFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
// Create package meta-data objects
theSequencesFactoryImpl.createMetaData();
@@ -298,104 +301,104 @@
// Initialize types and properties
initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote", false);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED);
+ property = getLocalProperty(mixedQuoteType, 0);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL);
+ property = getLocalProperty(mixedQuoteType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME);
+ property = getLocalProperty(mixedQuoteType, 2);
initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE);
+ property = getLocalProperty(mixedQuoteType, 3);
initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1);
+ property = getLocalProperty(mixedQuoteType, 4);
initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH);
+ property = getLocalProperty(mixedQuoteType, 5);
initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW);
+ property = getLocalProperty(mixedQuoteType, 6);
initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME);
+ property = getLocalProperty(mixedQuoteType, 7);
initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1);
+ property = getLocalProperty(mixedQuoteType, 8);
initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true);
- property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES);
+ property = getLocalProperty(mixedQuoteType, 9);
initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true , null);
initializeType(mixedRepeatingChoiceType, MixedRepeatingChoice.class, "MixedRepeatingChoice", false);
- property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED);
+ property = getLocalProperty(mixedRepeatingChoiceType, 0);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false);
- property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP);
+ property = getLocalProperty(mixedRepeatingChoiceType, 1);
initializeProperty(property, getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
- property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A);
+ property = getLocalProperty(mixedRepeatingChoiceType, 2);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
- property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B);
+ property = getLocalProperty(mixedRepeatingChoiceType, 3);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice", false);
- property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP);
+ property = getLocalProperty(repeatingChoiceType, 0);
initializeProperty(property, getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false);
- property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A);
+ property = getLocalProperty(repeatingChoiceType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true);
- property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B);
+ property = getLocalProperty(repeatingChoiceType, 2);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true);
initializeType(twoRCsType, TwoRCs.class, "TwoRCs", false);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP);
+ property = getLocalProperty(twoRCsType, 0);
initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A);
+ property = getLocalProperty(twoRCsType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B);
+ property = getLocalProperty(twoRCsType, 2);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT);
+ property = getLocalProperty(twoRCsType, 3);
initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, true, false);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1);
+ property = getLocalProperty(twoRCsType, 4);
initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y);
+ property = getLocalProperty(twoRCsType, 5);
initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true);
- property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z);
+ property = getLocalProperty(twoRCsType, 6);
initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true);
initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed", false);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED);
+ property = getLocalProperty(twoRCsMixedType, 0);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP);
+ property = getLocalProperty(twoRCsMixedType, 1);
initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A);
+ property = getLocalProperty(twoRCsMixedType, 2);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B);
+ property = getLocalProperty(twoRCsMixedType, 3);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT);
+ property = getLocalProperty(twoRCsMixedType, 4);
initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, true, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1);
+ property = getLocalProperty(twoRCsMixedType, 5);
initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y);
+ property = getLocalProperty(twoRCsMixedType, 6);
initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z);
+ property = getLocalProperty(twoRCsMixedType, 7);
initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCsMixed.class, false, false, true);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java Wed Jun 13 07:11:26 2007
@@ -225,7 +225,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getTwoRCs();
}
@@ -250,8 +250,7 @@
*/
public List getA()
{
- return getList(getGroup(), getType(), A);
-
+ return getList(getGroup(), getType(), INTERNAL_A);
}
/**
* <!-- begin-user-doc -->
@@ -260,8 +259,7 @@
*/
public List getB()
{
- return getList(getGroup(), getType(), B);
-
+ return getList(getGroup(), getType(), INTERNAL_B);
}
/**
* <!-- begin-user-doc -->
@@ -332,8 +330,7 @@
*/
public List getY()
{
- return getList(getGroup1(), getType(), Y);
-
+ return getList(getGroup1(), getType(), INTERNAL_Y);
}
/**
* <!-- begin-user-doc -->
@@ -342,8 +339,7 @@
*/
public List getZ()
{
- return getList(getGroup1(), getType(), Z);
-
+ return getList(getGroup1(), getType(), INTERNAL_Z);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java Wed Jun 13 07:11:26 2007
@@ -198,7 +198,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getTwoRCsMixed();
}
@@ -223,7 +223,7 @@
*/
public Sequence getGroup()
{
- return createSequence(getMixed(), getType(), GROUP);
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP);
}
/**
* <!-- begin-user-doc -->
@@ -232,8 +232,7 @@
*/
public List getA()
{
- return getList(getGroup(), getType(), A);
-
+ return getList(getGroup(), getType(), INTERNAL_A);
}
/**
* <!-- begin-user-doc -->
@@ -242,8 +241,7 @@
*/
public List getB()
{
- return getList(getGroup(), getType(), B);
-
+ return getList(getGroup(), getType(), INTERNAL_B);
}
/**
* <!-- begin-user-doc -->
@@ -271,7 +269,7 @@
*/
public void unsetSplit()
{
- unset(getMixed(), getType(), SPLIT);
+ unset(getMixed(), getType(), INTERNAL_SPLIT);
}
/**
@@ -281,7 +279,7 @@
*/
public boolean isSetSplit()
{
- return isSet(getMixed(), getType(), SPLIT);
+ return isSet(getMixed(), getType(), INTERNAL_SPLIT);
}
/**
@@ -291,7 +289,7 @@
*/
public Sequence getGroup1()
{
- return createSequence(getMixed(), getType(), GROUP1);
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP1);
}
/**
* <!-- begin-user-doc -->
@@ -300,8 +298,7 @@
*/
public List getY()
{
- return getList(getGroup1(), getType(), Y);
-
+ return getList(getGroup1(), getType(), INTERNAL_Y);
}
/**
* <!-- begin-user-doc -->
@@ -310,8 +307,7 @@
*/
public List getZ()
{
- return getList(getGroup1(), getType(), Z);
-
+ return getList(getGroup1(), getType(), INTERNAL_Z);
}
/**
* <!-- begin-user-doc -->
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -36,13 +36,15 @@
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>.
* Generator information:
- * patternVersion=1.1; -prefix CS
+ * patternVersion=1.2; -prefix CS
* <!-- end-user-doc -->
* @generated
*/
@@ -71,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;
public static final int QUOTE_BASE = 2;
@@ -163,9 +165,10 @@
CSFactoryImpl theCSFactoryImpl = new CSFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
// Create package meta-data objects
theCSFactoryImpl.createMetaData();
@@ -213,39 +216,39 @@
Property property = null;
// Add supertypes to types
- addSuperType(quoteBaseType, quoteType);
+ addSuperType(quoteBaseType, this.getQuote());
// Initialize types and properties
initializeType(quoteType, Quote.class, "Quote", false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL);
+ property = getLocalProperty(quoteType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME);
+ property = getLocalProperty(quoteType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_PRICE);
+ property = getLocalProperty(quoteType, 2);
initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1);
+ property = getLocalProperty(quoteType, 3);
initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_HIGH);
+ property = getLocalProperty(quoteType, 4);
initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_LOW);
+ property = getLocalProperty(quoteType, 5);
initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME);
+ property = getLocalProperty(quoteType, 6);
initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1);
+ property = getLocalProperty(quoteType, 7);
initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES);
+ property = getLocalProperty(quoteType, 8);
initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
initializeType(quoteBaseType, QuoteBase.class, "QuoteBase", false);
- property = getProperty(quoteBaseType, QuoteBaseImpl.INTERNAL_CHANGES);
+ property = getLocalProperty(quoteBaseType, 0);
initializeProperty(property, theModelPackageImpl.getChangeSummaryType(), "changes", null, 1, 1, QuoteBase.class, false, true, false);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java Wed Jun 13 07:11:26 2007
@@ -55,7 +55,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_SYMBOL = QuoteImpl.SYMBOL;
+ public final static int INTERNAL_SYMBOL = QuoteImpl.INTERNAL_SYMBOL;
/**
* The internal feature id for the '<em><b>Company Name</b></em>' attribute.
@@ -64,7 +64,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_COMPANY_NAME = QuoteImpl.COMPANY_NAME;
+ public final static int INTERNAL_COMPANY_NAME = QuoteImpl.INTERNAL_COMPANY_NAME;
/**
* The internal feature id for the '<em><b>Price</b></em>' attribute.
@@ -73,7 +73,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_PRICE = QuoteImpl.PRICE;
+ public final static int INTERNAL_PRICE = QuoteImpl.INTERNAL_PRICE;
/**
* The internal feature id for the '<em><b>Open1</b></em>' attribute.
@@ -82,7 +82,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_OPEN1 = QuoteImpl.OPEN1;
+ public final static int INTERNAL_OPEN1 = QuoteImpl.INTERNAL_OPEN1;
/**
* The internal feature id for the '<em><b>High</b></em>' attribute.
@@ -91,7 +91,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_HIGH = QuoteImpl.HIGH;
+ public final static int INTERNAL_HIGH = QuoteImpl.INTERNAL_HIGH;
/**
* The internal feature id for the '<em><b>Low</b></em>' attribute.
@@ -100,7 +100,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_LOW = QuoteImpl.LOW;
+ public final static int INTERNAL_LOW = QuoteImpl.INTERNAL_LOW;
/**
* The internal feature id for the '<em><b>Volume</b></em>' attribute.
@@ -109,7 +109,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_VOLUME = QuoteImpl.VOLUME;
+ public final static int INTERNAL_VOLUME = QuoteImpl.INTERNAL_VOLUME;
/**
* The internal feature id for the '<em><b>Change1</b></em>' attribute.
@@ -118,7 +118,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_CHANGE1 = QuoteImpl.CHANGE1;
+ public final static int INTERNAL_CHANGE1 = QuoteImpl.INTERNAL_CHANGE1;
/**
* The internal feature id for the '<em><b>Quotes</b></em>' containment reference list.
@@ -127,7 +127,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_QUOTES = QuoteImpl.QUOTES;
+ public final static int INTERNAL_QUOTES = QuoteImpl.INTERNAL_QUOTES;
/**
* The internal feature id for the '<em><b>Changes</b></em>' attribute.
@@ -211,7 +211,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((CSFactoryImpl)CSFactory.INSTANCE).getQuoteBase();
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java Wed Jun 13 07:11:26 2007
@@ -444,7 +444,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((CSFactoryImpl)CSFactory.INSTANCE).getQuote();
}
@@ -850,7 +850,7 @@
{
if (quotes == null)
{
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES);
+ quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
}
return quotes;
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java Wed Jun 13 07:11:26 2007
@@ -444,7 +444,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SimpleFactoryImpl)SimpleFactory.INSTANCE).getQuote();
}
@@ -850,7 +850,7 @@
{
if (quotes == null)
{
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES);
+ quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
}
return quotes;
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -36,13 +36,15 @@
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>.
* Generator information:
- * patternVersion=1.1;
+ * patternVersion=1.2;
* <!-- end-user-doc -->
* @generated
*/
@@ -71,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;
@@ -144,9 +146,10 @@
SimpleFactoryImpl theSimpleFactoryImpl = new SimpleFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
// Create package meta-data objects
theSimpleFactoryImpl.createMetaData();
@@ -195,31 +198,31 @@
// Initialize types and properties
initializeType(quoteType, Quote.class, "Quote", false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL);
+ property = getLocalProperty(quoteType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME);
+ property = getLocalProperty(quoteType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_PRICE);
+ property = getLocalProperty(quoteType, 2);
initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1);
+ property = getLocalProperty(quoteType, 3);
initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_HIGH);
+ property = getLocalProperty(quoteType, 4);
initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_LOW);
+ property = getLocalProperty(quoteType, 5);
initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME);
+ property = getLocalProperty(quoteType, 6);
initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1);
+ property = getLocalProperty(quoteType, 7);
initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, QuoteImpl.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/java/sdo/tools/src/test/java/com/example/subgroup/SubgroupFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/SubgroupFactory.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/SubgroupFactory.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/SubgroupFactory.java Wed Jun 13 07:11:26 2007
@@ -17,7 +17,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package com.example.subgroup;
import commonj.sdo.helper.HelperContext;
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/AImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/AImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/AImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/AImpl.java Wed Jun 13 07:11:26 2007
@@ -118,7 +118,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getA();
}
@@ -152,7 +152,7 @@
*/
public ChangeContext basicSetGe1(B newGe1, ChangeContext changeContext)
{
- return basicAdd(getGe1Group(), getType(), GE1, newGe1, changeContext);
+ return basicAdd(getGe1Group(), getType(), INTERNAL_GE1, newGe1, changeContext);
}
/**
@@ -187,7 +187,7 @@
*/
public void unsetGe1()
{
- unset(getGe1Group(), getType(), GE1);
+ unset(getGe1Group(), getType(), INTERNAL_GE1);
}
/**
@@ -197,7 +197,7 @@
*/
public boolean isSetGe1()
{
- return isSet(getGe1Group(), getType(), GE1);
+ return isSet(getGe1Group(), getType(), INTERNAL_GE1);
}
/**
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BImpl.java Wed Jun 13 07:11:26 2007
@@ -121,7 +121,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getB();
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java Wed Jun 13 07:11:26 2007
@@ -54,7 +54,7 @@
* @generated
* @ordered
*/
- public final static int INTERNAL_IM_IN_TYPE_B = BImpl.IM_IN_TYPE_B;
+ public final static int INTERNAL_IM_IN_TYPE_B = BImpl.INTERNAL_IM_IN_TYPE_B;
/**
* The internal feature id for the '<em><b>Im In Type Bprime</b></em>' attribute.
@@ -129,7 +129,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public Type getType()
+ public Type getStaticType()
{
return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getBprime();
}
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java Wed Jun 13 07:11:26 2007
@@ -36,13 +36,15 @@
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>.
* Generator information:
- * patternVersion=1.1; -prefix Subgroup
+ * patternVersion=1.2; -prefix Subgroup
* <!-- end-user-doc -->
* @generated
*/
@@ -71,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 A = 1;
public static final int B = 2;
@@ -182,9 +184,10 @@
SubgroupFactoryImpl theSubgroupFactoryImpl = new SubgroupFactoryImpl();
isInited = true;
- // Initialize simple dependencies
+ // Initialize dependencies
SDOUtil.registerStaticTypes(SDOFactory.class);
SDOUtil.registerStaticTypes(ModelFactory.class);
+ SDOUtil.registerStaticTypes(InternalFactory.class);
// Create package meta-data objects
theSubgroupFactoryImpl.createMetaData();
@@ -227,22 +230,22 @@
Property property = null;
// Add supertypes to types
- addSuperType(bprimeType, bType);
+ addSuperType(bprimeType, this.getB());
// Initialize types and properties
initializeType(aType, A.class, "A", false);
- property = getProperty(aType, AImpl.INTERNAL_GE1_GROUP);
+ property = getLocalProperty(aType, 0);
initializeProperty(property, getSequence(), "ge1Group", null, 1, 1, A.class, false, false, false);
- property = getProperty(aType, AImpl.INTERNAL_GE1);
+ property = getLocalProperty(aType, 1);
initializeProperty(property, this.getB(), "ge1", null, 1, 1, A.class, false, true, true, true , null);
initializeType(bType, B.class, "B", false);
- property = getProperty(bType, BImpl.INTERNAL_IM_IN_TYPE_B);
+ property = getLocalProperty(bType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "imInTypeB", null, 1, 1, B.class, false, true, false);
initializeType(bprimeType, Bprime.class, "Bprime", false);
- property = getProperty(bprimeType, BprimeImpl.INTERNAL_IM_IN_TYPE_BPRIME);
+ property = getLocalProperty(bprimeType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "imInTypeBprime", null, 1, 1, Bprime.class, false, true, false);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java?view=diff&rev=546884&r1=546883&r2=546884
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java Wed Jun 13 07:11:26 2007
@@ -30,8 +30,10 @@
TestSuite suite = new TestSuite();
suite.addTestSuite(ChangeSummaryGenTestCase.class);
+ suite.addTestSuite(ExtensibleTestCase.class);
suite.addTestSuite(GenPatternsTestCase.class);
suite.addTestSuite(InheritanceTestCase.class);
+ suite.addTestSuite(OpenContentTestCase.class);
suite.addTestSuite(SimpleStaticTestCase.class);
return suite;
@@ -46,4 +48,5 @@
junit.textui.TestRunner.run(suite());
}
}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org