You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/02/26 15:32:49 UTC
svn commit: r511815 [5/6] - in /incubator/tuscany/java/sdo:
impl/src/main/java/org/apache/tuscany/sdo/helper/
impl/src/main/java/org/apache/tuscany/sdo/impl/
impl/src/main/java/org/apache/tuscany/sdo/util/
impl/src/main/java/org/apache/tuscany/sdo/util...
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=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -1,21 +1,8 @@
/**
+ * <copyright>
+ * </copyright>
*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * $Id$
*/
package com.example.sequences.impl;
@@ -42,7 +29,7 @@
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* Generator information:
- * patternVersion=1.0; -prefix Sequences
+ * patternVersion=1.1; -prefix Sequences
* <!-- end-user-doc -->
* @generated
*/
@@ -71,7 +58,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public static final String PATTERN_VERSION = "1.0";
+ public static final String PATTERN_VERSION = "1.1";
public static final int MIXED_QUOTE = 1;
public static final int MIXED_REPEATING_CHOICE = 2;
@@ -244,47 +231,43 @@
isCreated = true;
// Create types and their properties
- mixedQuoteType = createType(false, MIXED_QUOTE);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.MIXED);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.SYMBOL);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.COMPANY_NAME);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.PRICE);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.OPEN1);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.HIGH);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.LOW);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.VOLUME);
- createProperty(true, mixedQuoteType, MixedQuoteImpl.CHANGE1);
- createProperty(false, mixedQuoteType, MixedQuoteImpl.QUOTES);
-
- mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
- createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.MIXED);
- createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.GROUP);
- createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.A);
- createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.B);
-
- repeatingChoiceType = createType(false, REPEATING_CHOICE);
- createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.GROUP);
- createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.A);
- createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.B);
-
- twoRCsType = createType(false, TWO_RCS);
- createProperty(true, twoRCsType, TwoRCsImpl.GROUP);
- createProperty(true, twoRCsType, TwoRCsImpl.A);
- createProperty(true, twoRCsType, TwoRCsImpl.B);
- createProperty(true, twoRCsType, TwoRCsImpl.SPLIT);
- createProperty(true, twoRCsType, TwoRCsImpl.GROUP1);
- createProperty(true, twoRCsType, TwoRCsImpl.Y);
- createProperty(true, twoRCsType, TwoRCsImpl.Z);
-
- twoRCsMixedType = createType(false, TWO_RCS_MIXED);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.MIXED);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.A);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.B);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.SPLIT);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP1);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Y);
- createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Z);
+ mixedQuoteType = createType(false, MIXED_QUOTE);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_MIXED);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_SYMBOL);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_COMPANY_NAME);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_PRICE);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_OPEN1);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_HIGH);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_LOW);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_VOLUME);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_CHANGE1);
+ createProperty(false, mixedQuoteType,MixedQuoteImpl.INTERNAL_QUOTES);
+ mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
+ createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_MIXED);
+ createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_GROUP);
+ createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_A);
+ createProperty(true, mixedRepeatingChoiceType,MixedRepeatingChoiceImpl.INTERNAL_B);
+ repeatingChoiceType = createType(false, REPEATING_CHOICE);
+ createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_GROUP);
+ createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_A);
+ createProperty(true, repeatingChoiceType,RepeatingChoiceImpl.INTERNAL_B);
+ twoRCsType = createType(false, TWO_RCS);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_A);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_B);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_SPLIT);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP1);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Y);
+ createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Z);
+ twoRCsMixedType = createType(false, TWO_RCS_MIXED);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_MIXED);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_A);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_B);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_SPLIT);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP1);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_Y);
+ createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_Z);
}
private boolean isInitialized = false;
@@ -302,77 +285,104 @@
// Initialize types and properties
initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote", false);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED);
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL);
- initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME);
- initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, false, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL);
+ initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME);
+ initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME);
initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1);
initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true);
- property = (Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES);
- initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true, null);
+
+ property = getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES);
+ initializeProperty(property, this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true , null);
initializeType(mixedRepeatingChoiceType, MixedRepeatingChoice.class, "MixedRepeatingChoice", false);
- property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED);
+ property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false);
- property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP);
+
+ property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP);
initializeProperty(property, getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
- property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A);
+
+ property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
- property = (Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B);
+
+ property = getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice", false);
- property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP);
+ property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP);
initializeProperty(property, getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false);
- property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A);
+
+ property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true);
- property = (Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B);
+
+ property = getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true);
initializeType(twoRCsType, TwoRCs.class, "TwoRCs", false);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP);
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP);
initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.A);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.B);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT);
- initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, false, false);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT);
+ initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, true, false);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1);
initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Y);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y);
initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true);
- property = (Property)twoRCsType.getProperties().get(TwoRCsImpl.Z);
+
+ property = getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z);
initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true);
initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed", false);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED);
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED);
initializeProperty(property, getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP);
initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A);
initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B);
initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT);
- initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT);
+ initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, true, true);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1);
initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y);
initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true);
- property = (Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z);
+
+ property = getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z);
initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCsMixed.class, false, false, true);
createXSDMetaData(theModelPackageImpl);
@@ -384,6 +394,7 @@
Property property = null;
+
property = createGlobalProperty
("mixedStockQuote",
this.getMixedQuote(),
@@ -443,7 +454,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED),
new String[]
{
"kind", "elementWildcard",
@@ -451,7 +462,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL),
new String[]
{
"kind", "element",
@@ -459,7 +470,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME),
new String[]
{
"kind", "element",
@@ -467,7 +478,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE),
new String[]
{
"kind", "element",
@@ -475,7 +486,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1),
new String[]
{
"kind", "element",
@@ -483,7 +494,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH),
new String[]
{
"kind", "element",
@@ -491,7 +502,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW),
new String[]
{
"kind", "element",
@@ -499,7 +510,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME),
new String[]
{
"kind", "element",
@@ -507,7 +518,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1),
new String[]
{
"kind", "element",
@@ -515,7 +526,7 @@
});
addXSDMapping
- ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES),
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES),
new String[]
{
"kind", "element",
@@ -531,7 +542,7 @@
});
addXSDMapping
- ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED),
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED),
new String[]
{
"kind", "elementWildcard",
@@ -539,7 +550,7 @@
});
addXSDMapping
- ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP),
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP),
new String[]
{
"kind", "group",
@@ -547,7 +558,7 @@
});
addXSDMapping
- ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A),
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A),
new String[]
{
"kind", "element",
@@ -556,7 +567,7 @@
});
addXSDMapping
- ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B),
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B),
new String[]
{
"kind", "element",
@@ -573,7 +584,7 @@
});
addXSDMapping
- ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP),
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP),
new String[]
{
"kind", "group",
@@ -581,7 +592,7 @@
});
addXSDMapping
- ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A),
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A),
new String[]
{
"kind", "element",
@@ -590,7 +601,7 @@
});
addXSDMapping
- ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B),
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B),
new String[]
{
"kind", "element",
@@ -607,7 +618,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP),
new String[]
{
"kind", "group",
@@ -615,7 +626,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.A),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A),
new String[]
{
"kind", "element",
@@ -624,7 +635,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.B),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B),
new String[]
{
"kind", "element",
@@ -633,7 +644,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT),
new String[]
{
"kind", "element",
@@ -641,7 +652,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1),
new String[]
{
"kind", "group",
@@ -649,7 +660,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Y),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y),
new String[]
{
"kind", "element",
@@ -658,7 +669,7 @@
});
addXSDMapping
- ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Z),
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z),
new String[]
{
"kind", "element",
@@ -675,7 +686,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED),
new String[]
{
"kind", "elementWildcard",
@@ -683,7 +694,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP),
new String[]
{
"kind", "group",
@@ -691,7 +702,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A),
new String[]
{
"kind", "element",
@@ -700,7 +711,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B),
new String[]
{
"kind", "element",
@@ -709,7 +720,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT),
new String[]
{
"kind", "element",
@@ -717,7 +728,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1),
new String[]
{
"kind", "group",
@@ -725,7 +736,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y),
new String[]
{
"kind", "element",
@@ -734,7 +745,7 @@
});
addXSDMapping
- ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z),
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z),
new String[]
{
"kind", "element",
@@ -743,5 +754,5 @@
});
}
-
+
} //SequencesFactoryImpl
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -1,21 +1,8 @@
/**
+ * <copyright>
+ * </copyright>
*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * $Id$
*/
package com.example.sequences.impl;
@@ -51,78 +38,113 @@
*/
public class TwoRCsImpl extends DataObjectBase implements TwoRCs
{
+
+ public final static int GROUP = -1;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SPLIT = 2;
+
+ public final static int GROUP1 = -2;
+
+ public final static int Y = 3;
+
+ public final static int Z = 4;
+
+ public final static int SDO_PROPERTY_COUNT = 5;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -2;
+
+
/**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int GROUP = 0;
+ */
+ public final static int INTERNAL_GROUP = 0;
/**
- * The feature id for the '<em><b>A</b></em>' attribute list.
+ * The internal feature id for the '<em><b>A</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int A = 1;
+ */
+ public final static int INTERNAL_A = 1;
/**
- * The feature id for the '<em><b>B</b></em>' attribute list.
+ * The internal feature id for the '<em><b>B</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int B = 2;
+ */
+ public final static int INTERNAL_B = 2;
/**
- * The feature id for the '<em><b>Split</b></em>' attribute.
+ * The internal feature id for the '<em><b>Split</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int SPLIT = 3;
+ */
+ public final static int INTERNAL_SPLIT = 3;
/**
- * The feature id for the '<em><b>Group1</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int GROUP1 = 4;
+ */
+ public final static int INTERNAL_GROUP1 = 4;
/**
- * The feature id for the '<em><b>Y</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Y</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int Y = 5;
+ */
+ public final static int INTERNAL_Y = 5;
/**
- * The feature id for the '<em><b>Z</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Z</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int Z = 6;
+ */
+ public final static int INTERNAL_Z = 6;
/**
- * This represents the number of properties for this type.
+ * The number of properties for this type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
-
- public final static int SDO_PROPERTY_COUNT = 7;
+ public final static int INTERNAL_PROPERTY_COUNT = 7;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ case INTERNAL_SPLIT: return SPLIT;
+ case INTERNAL_GROUP1: return GROUP1;
+ case INTERNAL_Y: return Y;
+ case INTERNAL_Z: return Z;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
/**
* The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
@@ -156,6 +178,15 @@
protected String split = SPLIT_DEFAULT_;
/**
+ * This is true if the Split attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean split_set_ = false;
+
+ /**
* The cached value of the '{@link #getGroup1() <em>Group1</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -195,7 +226,7 @@
{
if (group == null)
{
- group = createSequence(GROUP);
+ group = createSequence(INTERNAL_GROUP);
}
return group;
}
@@ -237,8 +268,35 @@
{
String oldSplit = split;
split = newSplit;
+ boolean oldSplit_set_ = split_set_;
+ split_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, SPLIT, oldSplit, split, !oldSplit_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSplit()
+ {
+ String oldSplit = split;
+ boolean oldSplit_set_ = split_set_;
+ split = SPLIT_DEFAULT_;
+ split_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, SPLIT, oldSplit, split);
+ notify(ChangeKind.UNSET, SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSplit()
+ {
+ return split_set_;
}
/**
@@ -250,7 +308,7 @@
{
if (group1 == null)
{
- group1 = createSequence(GROUP1);
+ group1 = createSequence(INTERNAL_GROUP1);
}
return group1;
}
@@ -379,7 +437,7 @@
getB().clear();
return;
case SPLIT:
- setSplit(SPLIT_DEFAULT_);
+ unsetSplit();
return;
case GROUP1:
unsetSequence(getGroup1());
@@ -410,7 +468,7 @@
case B:
return !getB().isEmpty();
case SPLIT:
- return SPLIT_DEFAULT_ == null ? split != null : !SPLIT_DEFAULT_.equals(split);
+ return isSetSplit();
case GROUP1:
return group1 != null && !isSequenceEmpty(getGroup1());
case Y:
@@ -434,7 +492,7 @@
result.append(" (group: ");
result.append(group);
result.append(", split: ");
- result.append(split);
+ if (split_set_) result.append(split); else result.append("<unset>");
result.append(", group1: ");
result.append(group1);
result.append(')');
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=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -1,21 +1,8 @@
/**
+ * <copyright>
+ * </copyright>
*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * $Id$
*/
package com.example.sequences.impl;
@@ -52,87 +39,125 @@
*/
public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed
{
+
+ public final static int MIXED = -1;
+
+ public final static int GROUP = -2;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SPLIT = 2;
+
+ public final static int GROUP1 = -3;
+
+ public final static int Y = 3;
+
+ public final static int Z = 4;
+
+ public final static int SDO_PROPERTY_COUNT = 5;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -3;
+
+
/**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Mixed</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int MIXED = 0;
+ */
+ public final static int INTERNAL_MIXED = 0;
/**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Group</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int GROUP = 1;
+ */
+ public final static int INTERNAL_GROUP = 1;
/**
- * The feature id for the '<em><b>A</b></em>' attribute list.
+ * The internal feature id for the '<em><b>A</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int A = 2;
+ */
+ public final static int INTERNAL_A = 2;
/**
- * The feature id for the '<em><b>B</b></em>' attribute list.
+ * The internal feature id for the '<em><b>B</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int B = 3;
+ */
+ public final static int INTERNAL_B = 3;
/**
- * The feature id for the '<em><b>Split</b></em>' attribute.
+ * The internal feature id for the '<em><b>Split</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int SPLIT = 4;
+ */
+ public final static int INTERNAL_SPLIT = 4;
/**
- * The feature id for the '<em><b>Group1</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Group1</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int GROUP1 = 5;
+ */
+ public final static int INTERNAL_GROUP1 = 5;
/**
- * The feature id for the '<em><b>Y</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Y</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int Y = 6;
+ */
+ public final static int INTERNAL_Y = 6;
/**
- * The feature id for the '<em><b>Z</b></em>' attribute list.
+ * The internal feature id for the '<em><b>Z</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int Z = 7;
+ */
+ public final static int INTERNAL_Z = 7;
/**
- * This represents the number of properties for this type.
+ * The number of properties for this type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
-
- public final static int SDO_PROPERTY_COUNT = 8;
+ public final static int INTERNAL_PROPERTY_COUNT = 8;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_MIXED: return MIXED;
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ case INTERNAL_SPLIT: return SPLIT;
+ case INTERNAL_GROUP1: return GROUP1;
+ case INTERNAL_Y: return Y;
+ case INTERNAL_Z: return Z;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
/**
* The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
@@ -146,16 +171,6 @@
protected Sequence mixed = null;
/**
- * The default value of the '{@link #getSplit() <em>Split</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSplit()
- * @generated
- * @ordered
- */
- protected static final String SPLIT_DEFAULT_ = null;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -184,7 +199,7 @@
{
if (mixed == null)
{
- mixed = createSequence(MIXED);
+ mixed = createSequence(INTERNAL_MIXED);
}
return mixed;
}
@@ -224,7 +239,7 @@
*/
public String getSplit()
{
- return (String)get(getMixed(), getType(), SPLIT);
+ return (String)get(getMixed(), getType(), INTERNAL_SPLIT);
}
/**
* <!-- begin-user-doc -->
@@ -233,7 +248,27 @@
*/
public void setSplit(String newSplit)
{
- set(getMixed(), getType(), SPLIT, newSplit);
+ set(getMixed(), getType(), INTERNAL_SPLIT, newSplit);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSplit()
+ {
+ unset(getMixed(), getType(), SPLIT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSplit()
+ {
+ return isSet(getMixed(), getType(), SPLIT);
}
/**
@@ -382,7 +417,7 @@
getB().clear();
return;
case SPLIT:
- setSplit(SPLIT_DEFAULT_);
+ unsetSplit();
return;
case GROUP1:
unsetSequence(getGroup1());
@@ -415,7 +450,7 @@
case B:
return !getB().isEmpty();
case SPLIT:
- return SPLIT_DEFAULT_ == null ? getSplit() != null : !SPLIT_DEFAULT_.equals(getSplit());
+ return isSetSplit();
case GROUP1:
return !isSequenceEmpty(getGroup1());
case Y:
Modified: incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/Quote.java?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/Quote.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/Quote.java Mon Feb 26 06:32:47 2007
@@ -46,6 +46,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Symbol</em>' attribute.
+ * @see #isSetSymbol()
+ * @see #unsetSymbol()
* @see #setSymbol(String)
* @generated
*/
@@ -56,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>
@@ -70,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
*/
@@ -80,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>
@@ -94,6 +148,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Price</em>' attribute.
+ * @see #isSetPrice()
+ * @see #unsetPrice()
* @see #setPrice(BigDecimal)
* @generated
*/
@@ -104,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>
@@ -118,6 +199,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Open1</em>' attribute.
+ * @see #isSetOpen1()
+ * @see #unsetOpen1()
* @see #setOpen1(BigDecimal)
* @generated
*/
@@ -128,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>
@@ -142,6 +250,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>High</em>' attribute.
+ * @see #isSetHigh()
+ * @see #unsetHigh()
* @see #setHigh(BigDecimal)
* @generated
*/
@@ -152,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>
@@ -166,6 +301,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Low</em>' attribute.
+ * @see #isSetLow()
+ * @see #unsetLow()
* @see #setLow(BigDecimal)
* @generated
*/
@@ -176,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/tools/src/test/java/com/example/simple/cs/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/Quote.java?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/Quote.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/Quote.java Mon Feb 26 06:32:47 2007
@@ -46,6 +46,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Symbol</em>' attribute.
+ * @see #isSetSymbol()
+ * @see #unsetSymbol()
* @see #setSymbol(String)
* @generated
*/
@@ -56,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.cs.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.cs.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>
@@ -70,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
*/
@@ -80,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.cs.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.cs.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>
@@ -94,6 +148,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Price</em>' attribute.
+ * @see #isSetPrice()
+ * @see #unsetPrice()
* @see #setPrice(BigDecimal)
* @generated
*/
@@ -104,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.cs.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.cs.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>
@@ -118,6 +199,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Open1</em>' attribute.
+ * @see #isSetOpen1()
+ * @see #unsetOpen1()
* @see #setOpen1(BigDecimal)
* @generated
*/
@@ -128,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.cs.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.cs.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>
@@ -142,6 +250,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>High</em>' attribute.
+ * @see #isSetHigh()
+ * @see #unsetHigh()
* @see #setHigh(BigDecimal)
* @generated
*/
@@ -152,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.cs.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.cs.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>
@@ -166,6 +301,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Low</em>' attribute.
+ * @see #isSetLow()
+ * @see #unsetLow()
* @see #setLow(BigDecimal)
* @generated
*/
@@ -176,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.cs.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.cs.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/tools/src/test/java/com/example/simple/cs/QuoteBase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/QuoteBase.java?view=diff&rev=511815&r1=511814&r2=511815
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/QuoteBase.java (original)
+++ incubator/tuscany/java/sdo/tools/src/test/java/com/example/simple/cs/QuoteBase.java Mon Feb 26 06:32:47 2007
@@ -33,6 +33,8 @@
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Changes</em>' attribute.
+ * @see #isSetChanges()
+ * @see #unsetChanges()
* @see #setChanges(ChangeSummary)
* @generated
*/
@@ -43,9 +45,34 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Changes</em>' attribute.
+ * @see #isSetChanges()
+ * @see #unsetChanges()
* @see #getChanges()
* @generated
*/
void setChanges(ChangeSummary value);
+
+ /**
+ * Unsets the value of the '{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetChanges()
+ * @see #getChanges()
+ * @see #setChanges(ChangeSummary)
+ * @generated
+ */
+ void unsetChanges();
+
+ /**
+ * Returns whether the value of the '{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Changes</em>' attribute is set.
+ * @see #unsetChanges()
+ * @see #getChanges()
+ * @see #setChanges(ChangeSummary)
+ * @generated
+ */
+ boolean isSetChanges();
} // QuoteBase
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=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -29,7 +29,7 @@
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* Generator information:
- * patternVersion=1.0; -prefix CS
+ * patternVersion=1.1; -prefix CS
* <!-- end-user-doc -->
* @generated
*/
@@ -50,7 +50,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public static final String NAMESPACE_PREFIX = "cs";
+ public static final String NAMESPACE_PREFIX = "simpleCS";
/**
* The version of the generator pattern used to generate this class.
@@ -58,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;
public static final int QUOTE_BASE = 2;
@@ -174,19 +174,18 @@
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);
-
- quoteBaseType = createType(false, QUOTE_BASE);
- createProperty(true, quoteBaseType, QuoteBaseImpl.CHANGES);
+ 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);
+ quoteBaseType = createType(false, QUOTE_BASE);
+ createProperty(true, quoteBaseType,QuoteBaseImpl.INTERNAL_CHANGES);
}
private boolean isInitialized = false;
@@ -205,28 +204,36 @@
// 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);
initializeType(quoteBaseType, QuoteBase.class, "QuoteBase", false);
- property = (Property)quoteBaseType.getProperties().get(QuoteBaseImpl.CHANGES);
- initializeProperty(property, theModelPackageImpl.getChangeSummaryType(), "changes", null, 1, 1, QuoteBase.class, false, false, false);
+ property = getProperty(quoteBaseType, QuoteBaseImpl.INTERNAL_CHANGES);
+ initializeProperty(property, theModelPackageImpl.getChangeSummaryType(), "changes", null, 1, 1, QuoteBase.class, false, true, false);
createXSDMetaData(theModelPackageImpl);
}
@@ -237,6 +244,7 @@
Property property = null;
+
property = createGlobalProperty
("stockQuote",
this.getQuoteBase(),
@@ -256,7 +264,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.SYMBOL),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL),
new String[]
{
"kind", "element",
@@ -264,7 +272,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.COMPANY_NAME),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME),
new String[]
{
"kind", "element",
@@ -272,7 +280,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.PRICE),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_PRICE),
new String[]
{
"kind", "element",
@@ -280,7 +288,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.OPEN1),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1),
new String[]
{
"kind", "element",
@@ -288,7 +296,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.HIGH),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_HIGH),
new String[]
{
"kind", "element",
@@ -296,7 +304,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.LOW),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_LOW),
new String[]
{
"kind", "element",
@@ -304,7 +312,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.VOLUME),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME),
new String[]
{
"kind", "element",
@@ -312,7 +320,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.CHANGE1),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1),
new String[]
{
"kind", "element",
@@ -320,7 +328,7 @@
});
addXSDMapping
- ((Property)quoteType.getProperties().get(QuoteImpl.QUOTES),
+ (getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES),
new String[]
{
"kind", "element",
@@ -336,7 +344,7 @@
});
addXSDMapping
- ((Property)quoteBaseType.getProperties().get(QuoteBaseImpl.CHANGES),
+ (getProperty(quoteBaseType, QuoteBaseImpl.INTERNAL_CHANGES),
new String[]
{
"kind", "element",
@@ -344,5 +352,5 @@
});
}
-
+
} //CSFactoryImpl
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=511815&r1=511814&r2=511815
==============================================================================
--- 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 Mon Feb 26 06:32:47 2007
@@ -27,105 +27,131 @@
*/
public class QuoteBaseImpl extends QuoteImpl implements QuoteBase
{
+
+ public final static int CHANGES = QuoteImpl.SDO_PROPERTY_COUNT + 0;
+
+ public final static int SDO_PROPERTY_COUNT = QuoteImpl.SDO_PROPERTY_COUNT + 1;
+
+ public final static int EXTENDED_PROPERTY_COUNT = QuoteImpl.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 = QuoteImpl.SYMBOL;
+ */
+ public final static int INTERNAL_SYMBOL = QuoteImpl.SYMBOL;
/**
- * 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 = QuoteImpl.COMPANY_NAME;
+ */
+ public final static int INTERNAL_COMPANY_NAME = QuoteImpl.COMPANY_NAME;
/**
- * 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 = QuoteImpl.PRICE;
+ */
+ public final static int INTERNAL_PRICE = QuoteImpl.PRICE;
/**
- * 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 = QuoteImpl.OPEN1;
+ */
+ public final static int INTERNAL_OPEN1 = QuoteImpl.OPEN1;
/**
- * 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 = QuoteImpl.HIGH;
+ */
+ public final static int INTERNAL_HIGH = QuoteImpl.HIGH;
/**
- * 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 = QuoteImpl.LOW;
+ */
+ public final static int INTERNAL_LOW = QuoteImpl.LOW;
/**
- * 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 = QuoteImpl.VOLUME;
+ */
+ public final static int INTERNAL_VOLUME = QuoteImpl.VOLUME;
/**
- * 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 = QuoteImpl.CHANGE1;
+ */
+ public final static int INTERNAL_CHANGE1 = QuoteImpl.CHANGE1;
/**
- * 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 = QuoteImpl.QUOTES;
+ */
+ public final static int INTERNAL_QUOTES = QuoteImpl.QUOTES;
/**
- * The feature id for the '<em><b>Changes</b></em>' attribute.
+ * The internal feature id for the '<em><b>Changes</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
- */
- public final static int CHANGES = QuoteImpl.SDO_PROPERTY_COUNT + 0;
+ */
+ public final static int INTERNAL_CHANGES = QuoteImpl.INTERNAL_PROPERTY_COUNT + 0;
/**
- * 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 = QuoteImpl.SDO_PROPERTY_COUNT + 1;
+ public final static int INTERNAL_PROPERTY_COUNT = QuoteImpl.INTERNAL_PROPERTY_COUNT + 1;
+
+ 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;
+ case INTERNAL_CHANGES: return CHANGES;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
/**
* The default value of the '{@link #getChanges() <em>Changes</em>}' attribute.
@@ -148,6 +174,15 @@
protected ChangeSummary changes = CHANGES_DEFAULT_;
/**
+ * This is true if the Changes attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean changes_set_ = false;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -186,8 +221,35 @@
{
ChangeSummary oldChanges = changes;
changes = newChanges;
+ boolean oldChanges_set_ = changes_set_;
+ changes_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, CHANGES, oldChanges, changes, !oldChanges_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetChanges()
+ {
+ ChangeSummary oldChanges = changes;
+ boolean oldChanges_set_ = changes_set_;
+ changes = CHANGES_DEFAULT_;
+ changes_set_ = false;
if (isNotifying())
- notify(ChangeKind.SET, CHANGES, oldChanges, changes);
+ notify(ChangeKind.UNSET, CHANGES, oldChanges, CHANGES_DEFAULT_, oldChanges_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetChanges()
+ {
+ return changes_set_;
}
/**
@@ -231,7 +293,7 @@
switch (propertyIndex)
{
case CHANGES:
- setChanges(CHANGES_DEFAULT_);
+ unsetChanges();
return;
}
super.unset(propertyIndex);
@@ -247,7 +309,7 @@
switch (propertyIndex)
{
case CHANGES:
- return CHANGES_DEFAULT_ == null ? changes != null : !CHANGES_DEFAULT_.equals(changes);
+ return isSetChanges();
}
return super.isSet(propertyIndex);
}
@@ -263,7 +325,7 @@
StringBuffer result = new StringBuffer(super.toString());
result.append(" (changes: ");
- result.append(changes);
+ if (changes_set_) result.append(changes); else result.append("<unset>");
result.append(')');
return result.toString();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org