summaryrefslogtreecommitdiffstats
path: root/sdo-java/branches/sdo-1.1.1-incubating/tools/src
diff options
context:
space:
mode:
Diffstat (limited to 'sdo-java/branches/sdo-1.1.1-incubating/tools/src')
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java739
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java500
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java53
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java38
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java63
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java59
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java4288
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java1132
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java326
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java27
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER7
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt207
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF21
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE7
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt23
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java103
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java61
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java332
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java269
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java491
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java102
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java88
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java97
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java184
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java198
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java766
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java335
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java299
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java770
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java521
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java499
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java48
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java70
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/TUSCANY1050.xsd44
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/enum.xsd50
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml20
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedStaticTestResult.xml27
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoice.xsd33
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml25
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sdoModel.xsd28
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sequences.xsd100
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml20
-rw-r--r--sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml28
43 files changed, 13098 insertions, 0 deletions
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
new file mode 100644
index 0000000000..c735e55e2a
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
@@ -0,0 +1,739 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.tuscany.sdo.generate.adapter.SDOGenModelGeneratorAdapterFactory;
+import org.apache.tuscany.sdo.helper.HelperContextImpl;
+import org.apache.tuscany.sdo.impl.SDOPackageImpl;
+import org.apache.tuscany.sdo.model.ModelFactory;
+import org.apache.tuscany.sdo.model.internal.InternalFactory;
+import org.apache.tuscany.sdo.util.DataObjectUtil;
+import org.eclipse.emf.codegen.ecore.generator.Generator;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.GenResourceKind;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
+import org.eclipse.emf.codegen.merge.java.JControlModel;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
+import org.eclipse.emf.common.util.BasicMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.xsd.XSDSchema;
+
+import commonj.sdo.helper.XSDHelper;
+
+/**
+ * Abstract base class for static SDO code generators. See XSD2JavaGenerator and Interface2JavaGenerator for
+ * concrete generator commands.
+ *
+ * Supports the following command line options:
+ *
+ * [ -targetDirectory <target-root-directory> ]
+ * [ -javaPackage <java-package-name> ]
+ * [ -prefix <prefix-string> ]
+ * [ -noInterfaces ]
+ * [ -noContainment ]
+ * [ -noNotification ]
+ * [ -noUnsettable ]
+ *
+ * Not supported (future options):
+ *
+ * [ -arrayAccessors ]
+ * [ -generateLoader ]
+ * [ -interfaceDataObject ]
+ * [ -sparsePattern | -storePattern ]
+ * [ -noGenerate ]
+ *
+ * Basic options:
+ *
+ * -javaPackage
+ * Overrides the Java package for the generated classes. By default the package name is derived
+ * from the targetNamespace of the XML schema being generated. For example, if the targetNamespace is
+ * "http://www.example.com/simple", the default package will be "com.example.simple".
+ * -prefix
+ * Specifies the prefix string to use for naming the generated factory. For example "-prefix Foo" will
+ * result in a factory interface with the name "FooFactory".
+ * -targetDirectory
+ * Generates the Java source code in the specified directory. By default, the code is generated
+ * in the same directory as the input xsd or wsdl file.
+ * is not necessary.
+ *
+ * Extended options:
+ *
+ * -noContainment
+ * Turns off container management for containment properties. DataObject.getContainer() will always
+ * return null for data objects generated with this option, even if a containment reference is set.
+ * Setting a containment reference will also not automatically remove the target object from its
+ * previous container, if it had one, so it will need to be explicitly removed by the client. Use
+ * of this option is only recommended for scenarios where this kind of container movement/management
+ * -noInterfaces
+ * By default, each DataObject generates both a Java interface and a corresponding implementation
+ * class. If an SDO metamodel does not use multiple inheritance (which is always the case for
+ * XML Schema derived models), then this option can be used to eliminate the interface and to generate
+ * only an implementation class.
+ * -noNotification
+ * This option eliminates all change notification overhead in the generated classes. Changes to
+ * DataObjects generated using this option cannot be recorded, and consequently the classes cannot
+ * be used with an SDO ChangeSummary or DataGraph.
+ * -noUnsettable
+ * By default, some XML constructs result in SDO property implementations that maintain additional
+ * state information to record when the property has been set to the "default value", as opposed to
+ * being truly unset (see DataObject.isSet() and DataObject.unset()). The SDO specification allows an
+ * implementation to choose to provide this behavior or not. With this option, all generated properties
+ * will not record their unset state. The generated isSet() methods simply returns whether the current
+ * value is equal to the property's "default value".
+ *
+ * Following are planned but not supported yet:
+ *
+ * -arrayAccessors
+ * Generates Java array getters/setters for multiplicity-many properties. With this option,
+ * the set of "standard" JavaBean array accessor methods (e.g., Foo[] getFoo(), Foo getFoo(int),
+ * int getFooLength(), setFoo(Foo[]), and void setFoo(int, Foo)) are generated. The normal
+ * List-returning accessor is renamed with the suffix "List" (e.g., List getFooList()). The array
+ * returned by the generated method is not a copy, but instead a pointer to the underlying storage
+ * array, so directly modifying it can have undesirable consequences and should be avoided.
+ * -generateLoader
+ * Generate a fast XML parser/loader for instances of the model. The details of this option are
+ * subject to change, but currently it generates two additional classes in a "util" package:
+ * <prefix>ResourceImpl and <prefix>ResourceFactoryImpl. To use the generated loader at runtime,
+ * you need to pass an option to the XMLHelper.load() method like this:
+ * Map options = new HashMap();
+ * options.put("GENERATED_LOADER", <prefix>ResourceFactoryImpl.class);
+ * XMLDocument doc = XMLHelper.INSTANCE.load(new FileInputStream("somefile.xml"), null, options);
+ * Note: this option currently only works for simple schemas without substitution groups or wildcards.
+ * -interfaceDataObject
+ * This option is used to generate static interfaces that extend commonj.sdo.DataObject
+ * -sparsePattern
+ * For SDO metamodels that have classes with many properties of which only a few are typically set at
+ * runtime, this option can be used to produce a space-optimized implementation (at the expense of speed).
+ * -storePattern
+ * This option can be used to generate static classes that work with a Store-based DataObject
+ * implementation. It changes the generator pattern to generate accessors which delegate to the
+ * reflective methods (as opposed to the other way around) and changes the DataObject base class
+ * to org.apache.tuscany.sdo.impl.StoreDataObjectImpl. Note that this option generates classes that
+ * require a Store implementation to be provided before they can be run.
+ * -noGenerate
+ * A basic implementation of this switch is in place, but is not fully implemented. An intention
+ * behind this is to provide commentary on the artifacts that would be generated.
+ *
+ *
+ */
+public abstract class JavaGenerator
+{
+ public static int OPTION_NO_INTERFACES=0x1;
+ public static int OPTION_SPARSE_PATTERN=0x2;
+ public static int OPTION_STORE_PATTERN=0x4;
+ public static int OPTION_NO_CONTAINMENT=0x8;
+ public static int OPTION_NO_NOTIFICATION=0x10;
+ public static int OPTION_ARRAY_ACCESSORS=0x20;
+ public static int OPTION_GENERATE_LOADER=0x40;
+ public static int OPTION_NO_UNSETTABLE=0x80;
+ //FIXME Temporary, I need this option for now to get Switch classes generated for the SCDL models
+ public static int OPTION_GENERATE_SWITCH=0x100;
+ public static int OPTION_INTERFACE_DO=0x400;
+ public static int OPTION_NO_GENERATE=0x800;
+
+ static
+ {
+ System.setProperty("EMF_NO_CONSTRAINTS", "true"); // never generate a validator class
+ }
+
+ /**
+ * @deprecated replaced by XSD2JavaGenerator
+ */
+ public static void main(String args[])
+ {
+ try
+ {
+ JavaGenerator generator = new XSD2JavaGenerator();
+ generator.processArguments(args);
+ generator.run(args);
+ }
+ catch (IllegalArgumentException e)
+ {
+ printUsage();
+ }
+ }
+
+ protected void processArguments(String args[])
+ {
+ if (args.length == 0)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ int index = 0;
+ while (args[index].startsWith("-"))
+ {
+ int newIndex = handleArgument(args, index);
+ if (newIndex == index)
+ {
+ throw new IllegalArgumentException();
+ }
+ index = newIndex;
+ if (index == args.length)
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ inputIndex = index;
+ }
+
+ protected String targetDirectory = null;
+ protected String javaPackage = null;
+ protected String prefix = null;
+ protected int genOptions = 0;
+ protected String xsdFileName;
+ protected int inputIndex;
+
+ protected int handleArgument(String args[], int index)
+ {
+ if (args[index].equalsIgnoreCase("-targetDirectory"))
+ {
+ targetDirectory = args[++index];
+ }
+ else if (args[index].equalsIgnoreCase("-javaPackage"))
+ {
+ javaPackage = args[++index];
+ }
+ else if (args[index].equalsIgnoreCase("-prefix"))
+ {
+ prefix = args[++index];
+ }
+ else if (args[index].equalsIgnoreCase("-noInterfaces"))
+ {
+ genOptions |= OPTION_NO_INTERFACES;
+ }
+ else if (args[index].equalsIgnoreCase("-sparsePattern"))
+ {
+ genOptions |= OPTION_SPARSE_PATTERN;
+ }
+ else if (args[index].equalsIgnoreCase("-storePattern"))
+ {
+ genOptions |= OPTION_STORE_PATTERN;
+ }
+ else if (args[index].equalsIgnoreCase("-noContainment"))
+ {
+ genOptions |= OPTION_NO_CONTAINMENT;
+ }
+ else if (args[index].equalsIgnoreCase("-noNotification"))
+ {
+ genOptions |= OPTION_NO_NOTIFICATION;
+ }
+ else if (args[index].equalsIgnoreCase("-arrayAccessors"))
+ {
+ genOptions |= OPTION_ARRAY_ACCESSORS;
+ }
+ else if (args[index].equalsIgnoreCase("-generateLoader"))
+ {
+ genOptions |= OPTION_GENERATE_LOADER;
+ }
+ else if (args[index].equalsIgnoreCase("-noUnsettable"))
+ {
+ genOptions |= OPTION_NO_UNSETTABLE;
+ }
+ else if (args[index].equalsIgnoreCase("-noEMF"))
+ {
+ System.out.println("Warning: -noEMF is deprecated. It is the default now.");
+ //genOptions |= OPTION_NO_EMF;
+ }
+ else if (args[index].equalsIgnoreCase("-interfaceDataObject"))
+ {
+ genOptions |= OPTION_INTERFACE_DO;
+ }
+ else if (args[index].equalsIgnoreCase("-noGenerate"))
+ {
+ genOptions |= OPTION_NO_GENERATE;
+ }
+ //else if (...)
+ else
+ {
+ return index;
+ }
+
+ return index + 1;
+ }
+
+ protected abstract void run(String args[]);
+
+ /**
+ * @deprecated moved to XSD2JavaGenerator
+ */
+ public static void generateFromXMLSchema(String xsdFileName, String targetDirectory, String javaPackage, String prefix, int genOptions)
+ {
+ DataObjectUtil.initRuntime();
+ EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+ ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
+ XSDHelper xsdHelper = (new HelperContextImpl(extendedMetaData, false)).getXSDHelper();
+
+ try
+ {
+ File inputFile = new File(xsdFileName).getAbsoluteFile();
+ InputStream inputStream = new FileInputStream(inputFile);
+ xsdHelper.define(inputStream, inputFile.toURI().toString());
+
+ if (targetDirectory == null)
+ {
+ targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
+ }
+ else
+ {
+ targetDirectory = new File(targetDirectory).getCanonicalPath();
+ }
+
+ if (!packageRegistry.values().isEmpty())
+ {
+ String packageURI = getSchemaNamespace(xsdFileName);
+ generatePackages(packageRegistry.values(), packageURI, null, targetDirectory, javaPackage, prefix, genOptions);
+ }
+
+ /*
+ for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();)
+ {
+ EPackage ePackage = (EPackage)iter.next();
+ String basePackage = extractBasePackageName(ePackage, javaPackage);
+ if (prefix == null)
+ {
+ prefix = CodeGenUtil.capName(ePackage.getName());
+ }
+ generateFromEPackage(ePackage, targetDirectory, basePackage, prefix, genOptions);
+ }
+ */
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ protected static void generatePackages(Collection packageList, String packageURI, String shortName, String targetDirectory, String javaPackage, String prefix, int genOptions)
+ {
+ Hashtable packageInfoTable = new Hashtable();
+ packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, packageURI, shortName ));
+ generatePackages(packageList, targetDirectory, packageInfoTable, genOptions, false);
+ }
+
+ protected static GenModel generatePackages(Collection packageList, String targetDirectory, Hashtable packageInfoTable, int genOptions, boolean allNamespaces )
+ {
+ ResourceSet resourceSet = DataObjectUtil.createResourceSet();
+ List usedGenPackages = new ArrayList();
+ GenModel genModel = null;
+ ArrayList packagesToModel = new ArrayList();
+ for (Iterator iter = packageList.iterator(); iter.hasNext();)
+ {
+ EPackage currentEPackage = (EPackage)iter.next();
+ String packageNamespace = currentEPackage.getNsURI();
+ PackageInfo packageInfo = (PackageInfo)packageInfoTable.get(packageNamespace);
+ boolean bTargetPackage = allNamespaces;
+ String javaPackage = null;
+ String prefix = null;
+ String shortName = null;
+ if( packageInfo != null )
+ {
+ bTargetPackage = true;
+ javaPackage = packageInfo.getBasePackage();
+ prefix = packageInfo.getPrefix();
+ shortName = packageInfo.getShortName();
+ }
+ String currentBasePackage = extractBasePackageName(currentEPackage, bTargetPackage ? javaPackage : null);
+ String currentPrefix = bTargetPackage && prefix != null ? prefix : CodeGenUtil.capName(shortName != null ? shortName : currentEPackage.getName());
+ packageInfoTable.put(currentEPackage, new PackageInfo(currentBasePackage, currentPrefix, null, null ));
+
+ if( allNamespaces || packageInfo != null )
+ packagesToModel.add(currentEPackage);
+ else
+ {
+ GenPackage currentGenPackage = createGenPackage(currentEPackage, currentBasePackage, currentPrefix, genOptions, resourceSet);
+ usedGenPackages.add(currentGenPackage);
+ }
+ }
+ genModel = createGenPackages(packagesToModel, packageInfoTable, genOptions, resourceSet);
+
+ if (genModel == null) return null; // nothing to generate
+
+ //TODO Figure out which predefined packages are really "used"
+ usedGenPackages.add(createGenPackage(SDOPackageImpl.eINSTANCE, "org.apache.tuscany", "SDO", 0, resourceSet));
+ usedGenPackages.add(createGenPackage((EPackage)ModelFactory.INSTANCE, "org.apache.tuscany.sdo", "Model", 0, resourceSet));
+ usedGenPackages.add(createGenPackage((EPackage)InternalFactory.INSTANCE, "org.apache.tuscany.sdo.model", "Internal", 0, resourceSet));
+ //usedGenPackages.add(createGenPackage((EPackage)JavaFactory.INSTANCE, "org.apache.tuscany.sdo.model", "Java", 0, resourceSet));
+ //usedGenPackages.add(createGenPackage((EPackage)XMLFactory.INSTANCE, "org.apache.tuscany.sdo.model", "XML", 0, resourceSet));
+
+ genModel.getUsedGenPackages().addAll(usedGenPackages);
+
+ // If the display namespace option is selected, Don't generate
+ if( (genOptions & OPTION_NO_GENERATE) == 0)
+ {
+ // Invoke the SDO JavaGenerator to generate the SDO classes
+ try
+ {
+ generateFromGenModel(genModel, new File(targetDirectory).getCanonicalPath(), genOptions);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ return genModel;
+ }
+
+ /**
+ * @deprecated
+ */
+ public static String getSchemaNamespace(String xsdFileName)
+ {
+ ResourceSet resourceSet = DataObjectUtil.createResourceSet();
+ File inputFile = new File(xsdFileName).getAbsoluteFile();
+ Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true);
+ XSDSchema schema = (XSDSchema)model.getContents().get(0);
+ return schema.getTargetNamespace();
+ }
+
+ protected static GenModel createGenPackages(Collection ePackages, Hashtable packageInfoTable, int genOptions, ResourceSet resourceSet)
+ {
+ GenModel genModel = ecore2GenModel(ePackages, packageInfoTable, genOptions);
+
+ for (Iterator iter = ePackages.iterator(); iter.hasNext();)
+ {
+ EPackage ePackage = (EPackage)iter.next();
+
+ URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore");
+ URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
+
+ Resource ecoreResource = resourceSet.createResource(ecoreURI);
+ ecoreResource.getContents().add(ePackage);
+
+ Resource genModelResource = resourceSet.createResource(genModelURI);
+ genModelResource.getContents().add(genModel);
+ }
+
+ return genModel;
+ }
+
+ public static GenPackage createGenPackage(EPackage ePackage, String basePackage, String prefix, int genOptions, ResourceSet resourceSet)
+ {
+ GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions);
+
+ URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore");
+ URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
+
+ Resource ecoreResource = resourceSet.createResource(ecoreURI);
+ ecoreResource.getContents().add(ePackage);
+
+ Resource genModelResource = resourceSet.createResource(genModelURI);
+ genModelResource.getContents().add(genModel);
+
+ return (GenPackage)genModel.getGenPackages().get(0);
+ }
+
+ public static void generateFromEPackage(EPackage ePackage, String targetDirectory, String basePackage, String prefix, int genOptions)
+ {
+ GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions);
+
+ ResourceSet resourceSet = DataObjectUtil.createResourceSet();
+ URI ecoreURI = URI.createURI("file:///temp.ecore");
+ URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
+
+ Resource ecoreResource = resourceSet.createResource(ecoreURI);
+ ecoreResource.getContents().add(ePackage);
+
+ Resource genModelResource = resourceSet.createResource(genModelURI);
+ genModelResource.getContents().add(genModel);
+
+ generateFromGenModel(genModel, targetDirectory, genOptions);
+ }
+
+ public static void generateFromGenModel(GenModel genModel, String targetDirectory, int genOptions)
+ {
+ Resource resource = genModel.eResource();
+
+ // Return if nothing is found
+ if( resource == null )
+ return;
+
+ if (targetDirectory != null)
+ {
+ resource.getResourceSet().getURIConverter().getURIMap().put(
+ URI.createURI("platform:/resource/TargetProject/"),
+ URI.createFileURI(targetDirectory + "/"));
+ genModel.setModelDirectory("/TargetProject");
+ }
+
+ //genModel.gen(new BasicMonitor.Printing(System.out));
+ GeneratorAdapterFactory.Descriptor.Registry.INSTANCE.addDescriptor
+ (GenModelPackage.eNS_URI, GenModelGeneratorAdapterFactory.DESCRIPTOR);
+
+ //Generator generator = new Generator();
+ Generator generator = new Generator()
+ {
+ public JControlModel getJControlModel()
+ {
+ if (jControlModel == null)
+ {
+ jControlModel = new JControlModel();
+ }
+ return jControlModel;
+ }
+ };
+
+
+ //if ((genOptions & OPTION_USE_EMF_PATTERNS) == 0)
+ {
+ generator.getAdapterFactoryDescriptorRegistry().addDescriptor
+ (GenModelPackage.eNS_URI, SDOGenModelGeneratorAdapterFactory.DESCRIPTOR);
+ }
+
+ generator.setInput(genModel);
+ generator.generate(genModel, GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, new BasicMonitor.Printing(System.out));
+
+
+ for (Iterator j = resource.getContents().iterator(); j.hasNext();)
+ {
+ EObject eObject = (EObject)j.next();
+ Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
+ if (diagnostic.getSeverity() != Diagnostic.OK)
+ {
+ printDiagnostic(diagnostic, "");
+ }
+ }
+ }
+
+ public static GenModel ecore2GenModel(EPackage ePackage, String basePackage, String prefix, int genOptions)
+ {
+ ArrayList ePackages = new ArrayList();
+ ePackages.add(ePackage);
+ Hashtable packageInfoTable = new Hashtable();
+ packageInfoTable.put(ePackage, new PackageInfo(basePackage, prefix, null, null ));
+ return ecore2GenModel(ePackages, packageInfoTable, genOptions );
+ }
+
+ private static GenModel ecore2GenModel(Collection ePackages, Hashtable packageInfoTable, int genOptions)
+ {
+ GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
+ genModel.initialize(ePackages);
+
+ genModel.setRootExtendsInterface("");
+ genModel.setRootImplementsInterface("commonj.sdo.DataObject");
+ genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl");
+ genModel.setFeatureMapWrapperInterface("commonj.sdo.Sequence");
+ genModel.setFeatureMapWrapperInternalInterface("org.apache.tuscany.sdo.util.BasicSequence");
+ genModel.setFeatureMapWrapperClass("org.apache.tuscany.sdo.util.BasicSequence");
+ genModel.setSuppressEMFTypes(true);
+ genModel.setSuppressEMFMetaData(true);
+ genModel.setSuppressEMFModelTags(true);
+ genModel.setCanGenerate(true);
+ //FIXME workaround java.lang.NoClassDefFoundError: org/eclipse/jdt/core/jdom/IDOMNode with 02162006 build
+ genModel.setFacadeHelperClass("Hack");
+ genModel.setForceOverwrite(true);
+
+ if ((genOptions & OPTION_NO_INTERFACES) != 0)
+ {
+ genModel.setSuppressInterfaces(true);
+ }
+
+ if ((genOptions & OPTION_SPARSE_PATTERN) != 0)
+ {
+ genModel.setFeatureDelegation(GenDelegationKind.VIRTUAL_LITERAL);
+ }
+ else if ((genOptions & OPTION_STORE_PATTERN) != 0)
+ {
+ genModel.setFeatureDelegation(GenDelegationKind.REFLECTIVE_LITERAL);
+ genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.StoreDataObjectImpl");
+ }
+
+ if ((genOptions & OPTION_NO_CONTAINMENT) != 0)
+ {
+ genModel.setSuppressContainment(true);
+ }
+
+ if ((genOptions & OPTION_NO_NOTIFICATION) != 0)
+ {
+ genModel.setSuppressNotification(true);
+ }
+
+ if ((genOptions & OPTION_ARRAY_ACCESSORS) != 0)
+ {
+ genModel.setArrayAccessors(true);
+ }
+
+ if ((genOptions & OPTION_NO_UNSETTABLE) != 0)
+ {
+ genModel.setSuppressUnsettable(true);
+ }
+
+ //if ((genOptions & OPTION_USE_EMF_PATTERNS) == 0)
+ {
+ genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.DataObjectBase");
+ }
+
+ if ((genOptions & OPTION_INTERFACE_DO) != 0)
+ {
+ genModel.setRootExtendsInterface("commonj.sdo.DataObject");
+ }
+ else
+ {
+ genModel.setRootExtendsInterface("java.io.Serializable");
+ }
+
+ //GenPackage genPackage = (GenPackage)genModel.getGenPackages().get(0);
+ Collection packages = genModel.getGenPackages();
+ for (Iterator iter1 = packages.iterator(); iter1.hasNext();)
+ {
+ GenPackage genPackage = (GenPackage)iter1.next();
+ PackageInfo packageInfo = (PackageInfo)packageInfoTable.get(genPackage.getEcorePackage());
+
+ if (packageInfo.getBasePackage() != null)
+ {
+ genPackage.setBasePackage(packageInfo.getBasePackage());
+ }
+ if (packageInfo.getPrefix() != null)
+ {
+ genPackage.setPrefix(packageInfo.getPrefix());
+ }
+
+ //FIXME Temporary, I need this option for now to get Switch classes generated for the SCDL models
+ if ((genOptions & OPTION_GENERATE_SWITCH) == 0)
+ {
+ genPackage.setAdapterFactory(false);
+ }
+
+ if ((genOptions & OPTION_GENERATE_LOADER) != 0)
+ {
+ //FIXME workaround compile error with 02162006 build, generated code references non-existent EcoreResourceImpl class
+ genPackage.setResource(GenResourceKind.XML_LITERAL);
+ //genPackage.setDataTypeConverters(true);
+ }
+ else
+ {
+ genPackage.setResource(GenResourceKind.NONE_LITERAL);
+ for (Iterator iter2 = genPackage.getGenClasses().iterator(); iter2.hasNext();)
+ {
+ GenClass genClass = (GenClass)iter2.next();
+ if ("DocumentRoot".equals(genClass.getName()))
+ {
+ genClass.setDynamic(true); // Don't generate DocumentRoot class
+ break;
+ }
+ }
+ }
+ }
+ return genModel;
+ }
+
+ public static String extractBasePackageName(EPackage ePackage, String javaPackage)
+ {
+ String qualifiedName = javaPackage != null ? javaPackage : ePackage.getName();
+ String name = /*CodeGenUtil.*/shortName(qualifiedName);
+ String baseName = qualifiedName.substring(0, qualifiedName.length() - name.length());
+ if (javaPackage != null || !name.equals(qualifiedName))
+ {
+ ePackage.setName(name);
+ }
+ return baseName != null ? /*CodeGenUtil.*/safeQualifiedName(baseName) : null;
+ }
+
+ public static String shortName(String qualifiedName)
+ {
+ int index = qualifiedName.lastIndexOf(".");
+ return index != -1 ? qualifiedName.substring(index + 1) : qualifiedName;
+ }
+
+ public static String safeQualifiedName(String qualifiedName)
+ {
+ StringBuffer safeQualifiedName = new StringBuffer();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(qualifiedName, "."); stringTokenizer.hasMoreTokens();)
+ {
+ String name = stringTokenizer.nextToken();
+ safeQualifiedName.append(CodeGenUtil.safeName(name));
+ if (stringTokenizer.hasMoreTokens())
+ {
+ safeQualifiedName.append('.');
+ }
+ }
+ return safeQualifiedName.toString();
+ }
+
+ protected static void printDiagnostic(Diagnostic diagnostic, String indent)
+ {
+ System.out.print(indent);
+ System.out.println(diagnostic.getMessage());
+ for (Iterator i = diagnostic.getChildren().iterator(); i.hasNext();)
+ {
+ printDiagnostic((Diagnostic)i.next(), indent + " ");
+ }
+ }
+
+ protected static void printUsage()
+ {
+ System.out.println("Usage: this is a deprecated command replaced by XSD2JavaGenerator");
+ }
+
+ public static class PackageInfo
+ {
+ private String basePackage;
+ private String prefix;
+ private String namespace;
+ private String shortName;
+
+ public PackageInfo(String basePackage, String prefix, String namespace, String shortName )
+ {
+ setBasePackage(basePackage);
+ setPrefix(prefix);
+ setNamespace(namespace);
+ setShortName(shortName);
+ }
+
+ public void setBasePackage(String basePackage) { this.basePackage = basePackage; }
+ public String getBasePackage() { return basePackage; }
+ public void setPrefix(String prefix) { this.prefix = prefix; }
+ public String getPrefix() { return prefix; }
+ public void setNamespace(String namespace) { this.namespace = namespace; }
+ public String getNamespace() { return namespace; }
+ public void setShortName(String shortName) { this.shortName = shortName; }
+ public String getShortName() { return shortName; }
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
new file mode 100644
index 0000000000..7e65549165
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
@@ -0,0 +1,500 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.tuscany.sdo.helper.HelperContextImpl;
+import org.apache.tuscany.sdo.helper.XSDHelperImpl;
+import org.apache.tuscany.sdo.util.DataObjectUtil;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.xsd.XSDSchema;
+
+import commonj.sdo.helper.HelperContext;
+import commonj.sdo.helper.XSDHelper;
+
+public class XSD2JavaGenerator extends JavaGenerator
+{
+ /**
+ * Generate static SDOs from XML Schema
+ *
+ * Usage arguments: see JavaGenerator
+ *
+ * [ -targetDirectory <target-root-directory> ]
+ * [ -javaPackage <java-package-name> ]
+ * [ -schemaNamespace <namespace-uri> ]
+ * [ -namespaceInfo <namespaces-file> ]
+ * [ other options ... ]
+ * <xsd-file> | <wsdl-file>
+ *
+ * Options:
+ *
+ * -schemaNamespace
+ * Generate classes for XSD types in the specified targetNamespace. By default, types in the
+ * targetNamespace of the first schema in the specified xsd or wsdl file are generated. Specify
+ * 'all' and this parameter will act as a wildcard selecting all namespaces for code generation.
+ * -namespaceInfo
+ * Specifies the name of a file that should contain a list of namespaces and their associated package names.
+ * Optionally, a prefix may be assigned to each namespace as well. These values are separated by semicolons.
+ * So each line in the file would look something like this:
+ *
+ * some\namespace;custom.package.name;optionalPrefix
+ *
+ * NOTE: see the base class JavaGenerator for other options.
+ *
+ * Example:
+ *
+ * generate somedir/somefile.xsd
+ *
+ * See base class JavaGenerator for details and the other options.
+ *
+ */
+ public static void main(String args[])
+ {
+ try
+ {
+ XSD2JavaGenerator generator = new XSD2JavaGenerator();
+ generator.processArguments(args);
+ generator.run(args);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ printUsage();
+ }
+ }
+
+
+ protected String schemaNamespace = null;
+ protected String namespaceInfo = null;
+ protected String generateBuiltIn = null;
+ protected static GeneratedPackages generatedPackages = null;
+ protected boolean allNamespaces = false;
+
+ protected int handleArgument(String args[], int index)
+ {
+ if (args[index].equalsIgnoreCase("-schemaNamespace"))
+ {
+ schemaNamespace = args[++index];
+ if( "all".equalsIgnoreCase(schemaNamespace) )
+ {
+ schemaNamespace = null;
+ allNamespaces = true;
+ }
+ }
+ else if (args[index].equalsIgnoreCase("-generateBuiltIn"))
+ {
+ // Internal option used when regenerating one of the built-in (predefined) models (e.g., commonj.sdo).
+ generateBuiltIn = args[++index];
+ }
+ else if (args[index].equalsIgnoreCase("-namespaceInfo"))
+ {
+ namespaceInfo = args[++index];
+ }
+ else
+ {
+ return super.handleArgument(args, index);
+ }
+
+ return index + 1;
+ }
+
+ protected void run(String args[])
+ {
+ String xsdFileName = args[inputIndex];
+ EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+ ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
+ String packageURI = getSchemaNamespace(xsdFileName);
+ Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
+ generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
+ }
+
+ /**
+ * This method was invoked by the SDO Mojo plugin
+ *
+ * @param xsdFileName
+ * @param namespace
+ * @param targetDirectory
+ * @param javaPackage
+ * @param prefix
+ * @param genOptions
+ */
+ public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
+ {
+ boolean allNamespaces = false;
+
+ // Need to process the passed-in schemaNamespace value from Mojo plugin the same as the command line
+ if( "all".equalsIgnoreCase(namespace))
+ {
+ namespace = null;
+ allNamespaces = true;
+ }
+
+ EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+ ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
+ String packageURI = getSchemaNamespace(xsdFileName);
+ Hashtable packageInfoTable = createPackageInfoTable(packageURI, namespace, javaPackage, prefix, null );
+ generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, null, allNamespaces);
+ }
+
+
+ protected static GenModel generateFromXMLSchema(String xsdFileName,
+ EPackage.Registry packageRegistry,
+ ExtendedMetaData extendedMetaData,
+ String targetDirectory,
+ Hashtable packageInfoTable,
+ int genOptions,
+ String regenerateBuiltIn,
+ boolean allNamespaces )
+ {
+ GenModel genModel = null;
+
+ HelperContext hc = new HelperContextImpl(extendedMetaData, false);
+ XSDHelper xsdHelper = hc.getXSDHelper();
+ ((XSDHelperImpl)xsdHelper).setRedefineBuiltIn(regenerateBuiltIn);
+
+ try
+ {
+ File inputFile = new File(xsdFileName).getAbsoluteFile();
+ InputStream inputStream = new FileInputStream(inputFile);
+ xsdHelper.define(inputStream, inputFile.toURI().toString());
+
+ if (targetDirectory == null)
+ {
+ targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
+ }
+ else
+ {
+ targetDirectory = new File(targetDirectory).getCanonicalPath();
+ }
+
+ if (!packageRegistry.values().isEmpty())
+ {
+ genModel = generatePackages(packageRegistry.values(), targetDirectory, packageInfoTable, genOptions, allNamespaces );
+ // For now, this option is not supported
+ /*
+ if( (genModel != null) )
+ {
+ if((extendedMetaData != null))
+ {
+ // Display only, will report all namespaces and associated packages found
+ List genPackages = genModel.getGenPackages();
+ for (Iterator iter = genPackages.iterator(); iter.hasNext();)
+ {
+ GenPackage genPackage = (GenPackage)iter.next();
+ EPackage ecorePackage = genPackage.getEcorePackage();
+ if( (genOptions & OPTION_DISPLAY_NAMESPACES) != 0)
+ System.out.println(extendedMetaData.getNamespace(ecorePackage)+";"+genPackage.getInterfacePackageName()+"."+ecorePackage.getName());
+ }
+ }
+ }
+ */
+ } else {
+ System.err.println("Input schema file " + xsdFileName + " defined no metadata.");
+ }
+
+ /*
+ for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();)
+ {
+ EPackage ePackage = (EPackage)iter.next();
+ String basePackage = extractBasePackageName(ePackage, javaPackage);
+ if (prefix == null)
+ {
+ prefix = CodeGenUtil.capName(ePackage.getName());
+ }
+ generateFromEPackage(ePackage, targetDirectory, basePackage, prefix, genOptions);
+ }
+ */
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return genModel;
+ }
+
+ public static String getSchemaNamespace(String xsdFileName)
+ {
+ ResourceSet resourceSet = DataObjectUtil.createResourceSet();
+ File inputFile = new File(xsdFileName).getAbsoluteFile();
+ Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true);
+ XSDSchema schema = (XSDSchema)model.getContents().get(0);
+ String targetNS = schema.getTargetNamespace();
+ if (targetNS == null) {
+ targetNS = schema.getSchemaLocation();
+ }
+
+ return targetNS;
+ }
+
+ protected static void printUsage()
+ {
+ System.out.println("Usage arguments:");
+ System.out.println(" [ -targetDirectory <target-root-directory> ]");
+ System.out.println(" [ -javaPackage <java-package-name> ]");
+ System.out.println(" [ -prefix <prefix-string> ]");
+ System.out.println(" [ -schemaNamespace <namespace-uri> ]");
+ System.out.println(" [ -namespaceInfo <namespaces-file> ]");
+ System.out.println(" [ -noInterfaces ]");
+ System.out.println(" [ -noContainment ]");
+ System.out.println(" [ -noNotification ]");
+ System.out.println(" [ -noUnsettable ]");
+ /* Future Option: System.out.println(" [ -sparsePattern | -storePattern ]"); */
+ /* Future Option: System.out.println(" [ -arrayAccessors ]"); */
+ /* Future Option: System.out.println(" [ -generateLoader ]"); */
+ /* Future Option: System.out.println(" [ -interfaceDataObject ]"); */
+ System.out.println(" <xsd-file> | <wsdl-file>");
+ System.out.println("");
+ System.out.println("For example:");
+ System.out.println("");
+ System.out.println(" generate somedir/somefile.xsd");
+ }
+
+ public void generateFromXMLSchema(String args[])
+ {
+ try
+ {
+ processArguments(args);
+ EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+ ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
+ String xsdFileName = args[inputIndex];
+ String packageURI = getSchemaNamespace(xsdFileName);
+ Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
+ GenModel genModel = generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
+ generatedPackages = new GeneratedPackages(genModel,extendedMetaData);
+ }
+ catch (IllegalArgumentException e)
+ {
+ printUsage();
+ }
+ }
+
+ private static Hashtable createPackageInfoTable( String packageURI, String schemaNamespace, String javaPackage, String prefix, String namespaceInfo )
+ {
+ Hashtable packageInfoTable = new Hashtable();
+
+ if( namespaceInfo != null )
+ {
+ try
+ {
+ FileReader inputFile = new FileReader(namespaceInfo);
+ BufferedReader bufRead = new BufferedReader(inputFile);
+
+ String line = bufRead.readLine();
+ while( line != null )
+ {
+ if( line.length() > 0 )
+ {
+ String [] options = line.split(";");
+ if( options.length > 1 )
+ {
+ if( options.length > 2 )
+ packageInfoTable.put(options[0], new PackageInfo(options[1], options[2], options[0], null ));
+ else
+ packageInfoTable.put(options[0], new PackageInfo(options[1], null, options[0], null ));
+ }
+ else
+ packageInfoTable.put(options[0], new PackageInfo(null, null, options[0], null ));
+ }
+ line = bufRead.readLine();
+ }
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ else
+ {
+ if( schemaNamespace != null )
+ packageInfoTable.put(schemaNamespace, new PackageInfo(javaPackage, prefix, schemaNamespace, null ));
+ else if( packageURI != null )
+ packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, null, null ));
+ }
+ return packageInfoTable;
+ }
+
+ public List getGeneratedPackageInfo()
+ {
+ if( generatedPackages != null )
+ return generatedPackages.getPackageList();
+ else
+ return null;
+ }
+
+ protected class GeneratedPackages
+ {
+ private List genPackages = null;
+
+ GeneratedPackages(GenModel genModel, ExtendedMetaData extendedMetaData)
+ {
+ List packages = genModel.getGenPackages();
+ Hashtable genClasses = new Hashtable();
+ for (Iterator iter = packages.iterator(); iter.hasNext();)
+ {
+ // loop through the list, once to build up the eclass to genclass mapper
+ GenPackage genPackage = (GenPackage)iter.next();
+ List classes = genPackage.getGenClasses();
+ for (Iterator classIter = classes.iterator(); classIter.hasNext();)
+ {
+ GenClass genClass = (GenClass)classIter.next();
+ genClasses.put(genClass.getEcoreClass(), genClass);
+ }
+ }
+ genPackages = new ArrayList();
+ for (Iterator iter = packages.iterator(); iter.hasNext();)
+ {
+ // now process the pckage list
+ GenPackage genPackage = (GenPackage)iter.next();
+ genPackages.add(new GeneratedPackage(genPackage,extendedMetaData,genClasses));
+ }
+ }
+
+ List getPackageList() {return genPackages;}
+ }
+
+ public class GeneratedPackage
+ {
+ private String namespace;
+ private Hashtable classes;
+
+ public String getNamespace() {return namespace;}
+ public List getClasses() {return new ArrayList(classes.values());}
+
+ GeneratedPackage(GenPackage genPackage, ExtendedMetaData extendedMetaData, Hashtable eclassGenClassMap )
+ {
+ classes = new Hashtable();
+
+ EPackage ePackage = genPackage.getEcorePackage();
+ namespace = extendedMetaData.getNamespace(ePackage);
+
+ List genClasses = genPackage.getGenClasses();
+ for (Iterator iterClass = genClasses.iterator(); iterClass.hasNext();)
+ {
+ GenClass genClass = (GenClass)iterClass.next();
+ if ("DocumentRoot".equals(genClass.getEcoreClass().getName())) {
+ List features = genClass.getGenFeatures();
+ for (Iterator iterFeatures = features.iterator(); iterFeatures.hasNext();)
+ {
+ GenFeature feature = (GenFeature)iterFeatures.next();
+ addGlobalElement(feature.getEcoreFeature(),extendedMetaData, eclassGenClassMap);
+ }
+ }
+ }
+ }
+
+ private void addGlobalElement(EStructuralFeature eFeature, ExtendedMetaData extendedMetaData, Hashtable eclassGenClassMap )
+ {
+
+ String name = eFeature.getName();
+ String classname = "";
+ boolean anonymous = false;
+ List propertyClassNames = null;
+
+ EClassifier eClassifier = eFeature.getEType();
+
+ if( eClassifier instanceof EClass )
+ {
+ // complex type
+ EClass eClass = (EClass)eClassifier;
+ GenClass genEClass = (GenClass)eclassGenClassMap.get(eClassifier);
+ if( genEClass != null )
+ {
+ classname = genEClass.getGenPackage().getInterfacePackageName()
+ + '.' + genEClass.getInterfaceName();
+ anonymous = extendedMetaData.isAnonymous(eClass);
+
+ // Build list of property names
+ propertyClassNames = new ArrayList();
+ List properties = eClass.getEStructuralFeatures();
+ for (Iterator iterProperties = properties.iterator(); iterProperties.hasNext();)
+ {
+ EStructuralFeature property = (EStructuralFeature)iterProperties.next();
+ EClassifier propertyType = property.getEType();
+ if (propertyType instanceof EClass)
+ {
+ GenClass propertyGenClass = (GenClass)eclassGenClassMap.get(propertyType);
+ if( propertyGenClass != null )
+ {
+ String propertyClassName = propertyGenClass.getGenPackage().getInterfacePackageName() + '.'
+ + propertyGenClass.getInterfaceName();
+ propertyClassNames.add(propertyClassName);
+ }
+ }
+ else if (propertyType instanceof EClassifier)
+ {
+ String propertyClassName = propertyType.getInstanceClass().getName();
+ propertyClassNames.add(propertyClassName);
+ }
+ }
+ }
+ }
+ else
+ {
+ // simple type
+ classname = eClassifier.getInstanceClass().getName();
+ }
+ classes.put( name, new PackageClassInfo( name, classname, anonymous, propertyClassNames ) );
+ }
+
+ public class PackageClassInfo
+ {
+ private String name;
+ private String className = null;
+ private boolean anonymous = false;
+ private List properties = null;
+
+ PackageClassInfo( String name, String className, boolean anonymous, List properties )
+ {
+ this.name = name;
+ this.className = className;
+ this.anonymous = anonymous;
+ this.properties = properties;
+ }
+
+ public String getName() {return name;}
+ public String getClassName() {return className;}
+ public boolean getAnonymous() {return anonymous;}
+ public List getProperties() {return properties;}
+ }
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
new file mode 100644
index 0000000000..d522ad5fad
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
@@ -0,0 +1,53 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate.adapter;
+
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter;
+import org.eclipse.emf.common.util.Monitor;
+
+public class SDOGenClassGeneratorAdapter extends GenClassGeneratorAdapter {
+
+ public SDOGenClassGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory)
+ {
+ super(generatorAdapterFactory);
+ }
+
+ private static JETEmitterDescriptor[] jetEmitterDescriptors;
+
+ protected JETEmitterDescriptor[] getJETEmitterDescriptors()
+ {
+ if (jetEmitterDescriptors == null)
+ {
+ JETEmitterDescriptor[] base = super.getJETEmitterDescriptors();
+ jetEmitterDescriptors = new JETEmitterDescriptor[base.length];
+ System.arraycopy(base, 0, jetEmitterDescriptors, 0, base.length);
+ jetEmitterDescriptors[CLASS_ID] = new JETEmitterDescriptor("model/SDOClass.javajet", "org.apache.tuscany.sdo.generate.templates.model.SDOClass");
+ }
+ return jetEmitterDescriptors;
+ }
+
+ protected void ensureProjectExists(String workspacePath, Object object,
+ Object projectType, boolean force, Monitor monitor)
+ {
+ // Do nothing -- this avoids differential behaviour according to whether we
+ // are running in Eclipse or not
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
new file mode 100644
index 0000000000..16678e001b
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate.adapter;
+
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapter;
+import org.eclipse.emf.common.util.Monitor;
+
+public class SDOGenModelGeneratorAdapter extends GenModelGeneratorAdapter {
+
+ public SDOGenModelGeneratorAdapter(
+ GeneratorAdapterFactory generatorAdapterFactory) {
+ super(generatorAdapterFactory);
+ }
+
+ protected void ensureProjectExists(String workspacePath, Object object,
+ Object projectType, boolean force, Monitor monitor) {
+ // Do nothing -- this avoids differential behaviour according to whether we
+ // are running in Eclipse or not
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
new file mode 100644
index 0000000000..dfe62878af
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
@@ -0,0 +1,63 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate.adapter;
+
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
+import org.eclipse.emf.common.notify.Adapter;
+
+public class SDOGenModelGeneratorAdapterFactory extends
+ GenModelGeneratorAdapterFactory {
+
+ public static final GeneratorAdapterFactory.Descriptor DESCRIPTOR = new GeneratorAdapterFactory.Descriptor()
+ {
+ public GeneratorAdapterFactory createAdapterFactory()
+ {
+ return new SDOGenModelGeneratorAdapterFactory();
+ }
+ };
+
+ public Adapter createGenClassAdapter()
+ {
+ if (genClassGeneratorAdapter == null)
+ {
+ genClassGeneratorAdapter = new SDOGenClassGeneratorAdapter(this);
+ }
+ return genClassGeneratorAdapter;
+ }
+
+ public Adapter createGenPackageAdapter()
+ {
+ if (genPackageGeneratorAdapter == null)
+ {
+ genPackageGeneratorAdapter = new SDOGenPackageGeneratorAdapter(this);
+ }
+ return genPackageGeneratorAdapter;
+ }
+
+ public Adapter createGenModelAdapter()
+ {
+ if (genModelGeneratorAdapter == null)
+ {
+ genModelGeneratorAdapter = new SDOGenModelGeneratorAdapter(this);
+ }
+ return genModelGeneratorAdapter;
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
new file mode 100644
index 0000000000..6616be995c
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate.adapter;
+
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter;
+import org.eclipse.emf.common.util.Monitor;
+
+public class SDOGenPackageGeneratorAdapter extends GenPackageGeneratorAdapter
+{
+ public SDOGenPackageGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory)
+ {
+ super(generatorAdapterFactory);
+ }
+
+ private static JETEmitterDescriptor[] jetEmitterDescriptors;
+
+ protected JETEmitterDescriptor[] getJETEmitterDescriptors()
+ {
+ if (jetEmitterDescriptors == null)
+ {
+ JETEmitterDescriptor[] base = super.getJETEmitterDescriptors();
+ jetEmitterDescriptors = new JETEmitterDescriptor[base.length];
+ System.arraycopy(base, 0, jetEmitterDescriptors, 0, base.length);
+ jetEmitterDescriptors[FACTORY_CLASS_ID] = new JETEmitterDescriptor("model/SDOFactoryClass.javajet", "org.apache.tuscany.sdo.generate.templates.model.SDOFactoryClass");
+ }
+ return jetEmitterDescriptors;
+ }
+
+ protected void generatePackageClass(GenPackage genPackage, Monitor monitor)
+ {
+ // do nothing
+ }
+
+ protected void ensureProjectExists(String workspacePath, Object object,
+ Object projectType, boolean force, Monitor monitor)
+ {
+ // Do nothing -- this avoids differential behaviour according to whether we
+ // are running in Eclipse or not
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
new file mode 100644
index 0000000000..74e6a77699
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
@@ -0,0 +1,4288 @@
+package org.apache.tuscany.sdo.generate.templates.model;
+
+import org.eclipse.emf.codegen.util.*;
+import org.apache.tuscany.sdo.impl.*;
+import java.util.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import org.apache.tuscany.sdo.generate.util.*;
+
+public class SDOClass
+{
+ protected static String nl;
+ public static synchronized SDOClass create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ SDOClass result = new SDOClass();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "";
+ protected final String TEXT_2 = "/**" + NL + " * <copyright>" + NL + " * </copyright>" + NL + " *" + NL + " * ";
+ protected final String TEXT_3 = "Id";
+ protected final String TEXT_4 = NL + " */";
+ protected final String TEXT_5 = NL + "package ";
+ protected final String TEXT_6 = ";";
+ protected final String TEXT_7 = NL + "package ";
+ protected final String TEXT_8 = ";";
+ protected final String TEXT_9 = NL;
+ protected final String TEXT_10 = NL;
+ protected final String TEXT_11 = NL + " // EYECATCHER 1";
+ protected final String TEXT_12 = NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * A representation of the model object '<em><b>";
+ protected final String TEXT_13 = "</b></em>'." + NL + " * <!-- end-user-doc -->";
+ protected final String TEXT_14 = NL + " *" + NL + " * <!-- begin-model-doc -->" + NL + " * ";
+ protected final String TEXT_15 = NL + " * <!-- end-model-doc -->";
+ protected final String TEXT_16 = NL + " *";
+ protected final String TEXT_17 = NL + " * <p>" + NL + " * The following features are supported:" + NL + " * <ul>";
+ protected final String TEXT_18 = NL + " * <li>{@link ";
+ protected final String TEXT_19 = "#";
+ protected final String TEXT_20 = " <em>";
+ protected final String TEXT_21 = "</em>}</li>";
+ protected final String TEXT_22 = NL + " * </ul>" + NL + " * </p>";
+ protected final String TEXT_23 = NL + " *";
+ protected final String TEXT_24 = NL + " * @see ";
+ protected final String TEXT_25 = "#get";
+ protected final String TEXT_26 = "()";
+ protected final String TEXT_27 = NL + " * @model ";
+ protected final String TEXT_28 = NL + " * ";
+ protected final String TEXT_29 = NL + " * @model";
+ protected final String TEXT_30 = NL + " * @extends ";
+ protected final String TEXT_31 = NL + " * @generated" + NL + " */";
+ protected final String TEXT_32 = NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * An implementation of the model object '<em><b>";
+ protected final String TEXT_33 = "</b></em>'." + NL + " * <!-- end-user-doc -->" + NL + " * <p>";
+ protected final String TEXT_34 = NL + " * The following features are implemented:" + NL + " * <ul>";
+ protected final String TEXT_35 = NL + " * <li>{@link ";
+ protected final String TEXT_36 = "#";
+ protected final String TEXT_37 = " <em>";
+ protected final String TEXT_38 = "</em>}</li>";
+ protected final String TEXT_39 = NL + " * </ul>";
+ protected final String TEXT_40 = NL + " * </p>" + NL + " *" + NL + " * @generated" + NL + " */";
+ protected final String TEXT_41 = NL + "public";
+ protected final String TEXT_42 = " abstract";
+ protected final String TEXT_43 = " class ";
+ protected final String TEXT_44 = NL + "public interface ";
+ protected final String TEXT_45 = NL + "{";
+ protected final String TEXT_46 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_47 = " copyright = \"";
+ protected final String TEXT_48 = "\";";
+ protected final String TEXT_49 = NL;
+ protected final String TEXT_50 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final ";
+ protected final String TEXT_51 = " mofDriverNumber = \"";
+ protected final String TEXT_52 = "\";";
+ protected final String TEXT_53 = NL;
+ protected final String TEXT_54 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final long serialVersionUID = 1L;" + NL;
+ protected final String TEXT_55 = NL + "\t/**" + NL + "\t * An array of objects representing the values of non-primitive features." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Object[] ";
+ protected final String TEXT_56 = " = null;" + NL;
+ protected final String TEXT_57 = NL + "\t/**" + NL + "\t * A bit field representing the indices of non-primitive feature values." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int ";
+ protected final String TEXT_58 = " = 0;" + NL;
+ protected final String TEXT_59 = NL + "\t/**" + NL + "\t * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected int ";
+ protected final String TEXT_60 = " = 0;" + NL;
+ protected final String TEXT_61 = NL;
+ protected final String TEXT_62 = NL + "\tpublic final static int ";
+ protected final String TEXT_63 = " = ";
+ protected final String TEXT_64 = ";" + NL;
+ protected final String TEXT_65 = NL + "\tpublic final static int ";
+ protected final String TEXT_66 = " = ";
+ protected final String TEXT_67 = ";" + NL;
+ protected final String TEXT_68 = NL + "\tpublic final static int SDO_PROPERTY_COUNT = ";
+ protected final String TEXT_69 = ";" + NL;
+ protected final String TEXT_70 = NL + "\tpublic final static int EXTENDED_PROPERTY_COUNT = ";
+ protected final String TEXT_71 = ";" + NL + NL;
+ protected final String TEXT_72 = NL + "\t/**" + NL + "\t * The internal feature id for the '<em><b>";
+ protected final String TEXT_73 = "</b></em>' ";
+ protected final String TEXT_74 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */";
+ protected final String TEXT_75 = " " + NL + "\tpublic final static int _INTERNAL_";
+ protected final String TEXT_76 = " = ";
+ protected final String TEXT_77 = ";" + NL;
+ protected final String TEXT_78 = NL + "\t/**" + NL + "\t * The number of properties for this type." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */";
+ protected final String TEXT_79 = NL + "\tpublic final static int INTERNAL_PROPERTY_COUNT = ";
+ protected final String TEXT_80 = ";" + NL + "" + NL + "\tprotected int internalConvertIndex(int internalIndex)" + NL + "\t{" + NL + "\t\tswitch (internalIndex)" + NL + "\t\t{";
+ protected final String TEXT_81 = NL + "\t\t\tcase _INTERNAL_";
+ protected final String TEXT_82 = ": return ";
+ protected final String TEXT_83 = ";";
+ protected final String TEXT_84 = NL + "\t\t}" + NL + "\t\treturn super.internalConvertIndex(internalIndex);" + NL + "\t}" + NL + NL;
+ protected final String TEXT_85 = NL + "\t/**" + NL + "\t * The cached value of the '{@link #";
+ protected final String TEXT_86 = "() <em>";
+ protected final String TEXT_87 = "</em>}' ";
+ protected final String TEXT_88 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
+ protected final String TEXT_89 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\t" + NL + "\tprotected ";
+ protected final String TEXT_90 = " ";
+ protected final String TEXT_91 = " = null;" + NL + "\t";
+ protected final String TEXT_92 = NL + "\t/**" + NL + "\t * The empty value for the '{@link #";
+ protected final String TEXT_93 = "() <em>";
+ protected final String TEXT_94 = "</em>}' array accessor." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
+ protected final String TEXT_95 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final ";
+ protected final String TEXT_96 = "[] ";
+ protected final String TEXT_97 = "_EEMPTY_ARRAY = new ";
+ protected final String TEXT_98 = " [0];" + NL;
+ protected final String TEXT_99 = NL + "\t/**" + NL + "\t * The default value of the '{@link #";
+ protected final String TEXT_100 = "() <em>";
+ protected final String TEXT_101 = "</em>}' ";
+ protected final String TEXT_102 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
+ protected final String TEXT_103 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final ";
+ protected final String TEXT_104 = " ";
+ protected final String TEXT_105 = "_DEFAULT_ = ";
+ protected final String TEXT_106 = ";";
+ protected final String TEXT_107 = NL;
+ protected final String TEXT_108 = NL + "\t/**" + NL + "\t * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected int ";
+ protected final String TEXT_109 = " = 0;" + NL;
+ protected final String TEXT_110 = NL + "\t/**" + NL + "\t * The flag representing the value of the '{@link #";
+ protected final String TEXT_111 = "() <em>";
+ protected final String TEXT_112 = "</em>}' ";
+ protected final String TEXT_113 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
+ protected final String TEXT_114 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final int ";
+ protected final String TEXT_115 = "_EFLAG = 1 ";
+ protected final String TEXT_116 = ";" + NL;
+ protected final String TEXT_117 = NL + "\t/**" + NL + "\t * The cached value of the '{@link #";
+ protected final String TEXT_118 = "() <em>";
+ protected final String TEXT_119 = "</em>}' ";
+ protected final String TEXT_120 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @see #";
+ protected final String TEXT_121 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_122 = " ";
+ protected final String TEXT_123 = " = ";
+ protected final String TEXT_124 = "_DEFAULT_;" + NL;
+ protected final String TEXT_125 = NL + "\t/**" + NL + "\t * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected int ";
+ protected final String TEXT_126 = " = 0;" + NL;
+ protected final String TEXT_127 = NL + "\t/**" + NL + "\t * The flag representing whether the ";
+ protected final String TEXT_128 = " ";
+ protected final String TEXT_129 = " has been set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final int ";
+ protected final String TEXT_130 = "_ESETFLAG = 1 ";
+ protected final String TEXT_131 = ";" + NL;
+ protected final String TEXT_132 = NL + "\t/**" + NL + "\t * This is true if the ";
+ protected final String TEXT_133 = " ";
+ protected final String TEXT_134 = " has been set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected boolean ";
+ protected final String TEXT_135 = "_set_ = false;" + NL;
+ protected final String TEXT_136 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_137 = "()" + NL + "\t{" + NL + "\t\tsuper();";
+ protected final String TEXT_138 = NL + "\t\t";
+ protected final String TEXT_139 = " |= ";
+ protected final String TEXT_140 = "_EFLAG;";
+ protected final String TEXT_141 = NL + "\t\tcreateChangeSummary(";
+ protected final String TEXT_142 = ");";
+ protected final String TEXT_143 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_144 = " getStaticType()" + NL + "\t{" + NL + "\t\treturn ((";
+ protected final String TEXT_145 = ")";
+ protected final String TEXT_146 = ".INSTANCE).get";
+ protected final String TEXT_147 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getStaticPropertyCount()" + NL + "\t{" + NL + "\t\treturn INTERNAL_PROPERTY_COUNT;" + NL + "\t}" + NL;
+ protected final String TEXT_148 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_149 = NL + "\t";
+ protected final String TEXT_150 = "[] ";
+ protected final String TEXT_151 = "();" + NL;
+ protected final String TEXT_152 = NL + "\tpublic ";
+ protected final String TEXT_153 = "[] ";
+ protected final String TEXT_154 = "()" + NL + "\t{";
+ protected final String TEXT_155 = NL + "\t\t";
+ protected final String TEXT_156 = " list = (";
+ protected final String TEXT_157 = ")";
+ protected final String TEXT_158 = "();" + NL + "\t\tif (list.isEmpty()) return ";
+ protected final String TEXT_159 = "_EEMPTY_ARRAY;";
+ protected final String TEXT_160 = NL + "\t\tif (";
+ protected final String TEXT_161 = " == null || ";
+ protected final String TEXT_162 = ".isEmpty()) return ";
+ protected final String TEXT_163 = "_EEMPTY_ARRAY;" + NL + "\t\t";
+ protected final String TEXT_164 = " list = (";
+ protected final String TEXT_165 = ")";
+ protected final String TEXT_166 = ";";
+ protected final String TEXT_167 = NL + "\t\tlist.shrink();" + NL + "\t\treturn (";
+ protected final String TEXT_168 = "[])list.data();" + NL + "\t}" + NL;
+ protected final String TEXT_169 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_170 = NL + "\t";
+ protected final String TEXT_171 = " get";
+ protected final String TEXT_172 = "(int index);";
+ protected final String TEXT_173 = NL + "\tpublic ";
+ protected final String TEXT_174 = " get";
+ protected final String TEXT_175 = "(int index)" + NL + "\t{" + NL + "\t\treturn (";
+ protected final String TEXT_176 = ")";
+ protected final String TEXT_177 = "().get(index);" + NL + "\t}";
+ protected final String TEXT_178 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_179 = NL + "\tint get";
+ protected final String TEXT_180 = "Length();" + NL;
+ protected final String TEXT_181 = NL + "\tpublic int get";
+ protected final String TEXT_182 = "Length()" + NL + "\t{";
+ protected final String TEXT_183 = NL + "\t\treturn ";
+ protected final String TEXT_184 = "().size();";
+ protected final String TEXT_185 = NL + "\t\treturn ";
+ protected final String TEXT_186 = " == null ? 0 : ";
+ protected final String TEXT_187 = ".size();";
+ protected final String TEXT_188 = NL + "\t}" + NL;
+ protected final String TEXT_189 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_190 = NL + "\tvoid set";
+ protected final String TEXT_191 = "(";
+ protected final String TEXT_192 = "[] new";
+ protected final String TEXT_193 = ");" + NL;
+ protected final String TEXT_194 = NL + "\tpublic void set";
+ protected final String TEXT_195 = "(";
+ protected final String TEXT_196 = "[] new";
+ protected final String TEXT_197 = ")" + NL + "\t{" + NL + "\t\t((";
+ protected final String TEXT_198 = ")";
+ protected final String TEXT_199 = "()).setData(new";
+ protected final String TEXT_200 = ".length, new";
+ protected final String TEXT_201 = ");" + NL + "\t}" + NL;
+ protected final String TEXT_202 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_203 = NL + "\tvoid set";
+ protected final String TEXT_204 = "(int index, ";
+ protected final String TEXT_205 = " element);" + NL;
+ protected final String TEXT_206 = NL + "\tpublic void set";
+ protected final String TEXT_207 = "(int index, ";
+ protected final String TEXT_208 = " element)" + NL + "\t{" + NL + "\t\t";
+ protected final String TEXT_209 = "().set(index, element);" + NL + "\t}" + NL;
+ protected final String TEXT_210 = NL + "\t/**" + NL + "\t * Returns the value of the '<em><b>";
+ protected final String TEXT_211 = "</b></em>' ";
+ protected final String TEXT_212 = ".";
+ protected final String TEXT_213 = NL + "\t * The key is of type ";
+ protected final String TEXT_214 = "list of {@link ";
+ protected final String TEXT_215 = "}";
+ protected final String TEXT_216 = "{@link ";
+ protected final String TEXT_217 = "}";
+ protected final String TEXT_218 = "," + NL + "\t * and the value is of type ";
+ protected final String TEXT_219 = "list of {@link ";
+ protected final String TEXT_220 = "}";
+ protected final String TEXT_221 = "{@link ";
+ protected final String TEXT_222 = "}";
+ protected final String TEXT_223 = ",";
+ protected final String TEXT_224 = NL + "\t * The list contents are of type {@link ";
+ protected final String TEXT_225 = "}.";
+ protected final String TEXT_226 = NL + "\t * The default value is <code>";
+ protected final String TEXT_227 = "</code>.";
+ protected final String TEXT_228 = NL + "\t * The literals are from the enumeration {@link ";
+ protected final String TEXT_229 = "}.";
+ protected final String TEXT_230 = NL + "\t * It is bidirectional and its opposite is '{@link ";
+ protected final String TEXT_231 = "#";
+ protected final String TEXT_232 = " <em>";
+ protected final String TEXT_233 = "</em>}'.";
+ protected final String TEXT_234 = NL + "\t * <!-- begin-user-doc -->";
+ protected final String TEXT_235 = NL + "\t * <p>" + NL + "\t * If the meaning of the '<em>";
+ protected final String TEXT_236 = "</em>' ";
+ protected final String TEXT_237 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t * </p>";
+ protected final String TEXT_238 = NL + "\t * <!-- end-user-doc -->";
+ protected final String TEXT_239 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * ";
+ protected final String TEXT_240 = NL + "\t * <!-- end-model-doc -->";
+ protected final String TEXT_241 = NL + "\t * @return the value of the '<em>";
+ protected final String TEXT_242 = "</em>' ";
+ protected final String TEXT_243 = ".";
+ protected final String TEXT_244 = NL + "\t * @see ";
+ protected final String TEXT_245 = NL + "\t * @see #isSet";
+ protected final String TEXT_246 = "()";
+ protected final String TEXT_247 = NL + "\t * @see #unset";
+ protected final String TEXT_248 = "()";
+ protected final String TEXT_249 = NL + "\t * @see #set";
+ protected final String TEXT_250 = "(";
+ protected final String TEXT_251 = ")";
+ protected final String TEXT_252 = NL + "\t * @see ";
+ protected final String TEXT_253 = "#get";
+ protected final String TEXT_254 = "()";
+ protected final String TEXT_255 = NL + "\t * @see ";
+ protected final String TEXT_256 = "#";
+ protected final String TEXT_257 = NL + "\t * @model ";
+ protected final String TEXT_258 = NL + "\t * ";
+ protected final String TEXT_259 = NL + "\t * @model";
+ protected final String TEXT_260 = NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_261 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_262 = NL + "\t";
+ protected final String TEXT_263 = " ";
+ protected final String TEXT_264 = "();" + NL;
+ protected final String TEXT_265 = NL + "\tpublic ";
+ protected final String TEXT_266 = " ";
+ protected final String TEXT_267 = "()" + NL + "\t{";
+ protected final String TEXT_268 = NL + "\t\treturn ";
+ protected final String TEXT_269 = "(";
+ protected final String TEXT_270 = "(";
+ protected final String TEXT_271 = ")get(";
+ protected final String TEXT_272 = ", true)";
+ protected final String TEXT_273 = ").";
+ protected final String TEXT_274 = "()";
+ protected final String TEXT_275 = ";";
+ protected final String TEXT_276 = NL + "\t\t";
+ protected final String TEXT_277 = " ";
+ protected final String TEXT_278 = " = (";
+ protected final String TEXT_279 = ")eVirtualGet(";
+ protected final String TEXT_280 = ");";
+ protected final String TEXT_281 = NL + "\t\tif (";
+ protected final String TEXT_282 = " == null)" + NL + "\t\t{";
+ protected final String TEXT_283 = NL + "\t\t\teVirtualSet(";
+ protected final String TEXT_284 = ", ";
+ protected final String TEXT_285 = " = new ";
+ protected final String TEXT_286 = ");";
+ protected final String TEXT_287 = NL + "\t\t ";
+ protected final String TEXT_288 = " = createSequence(_INTERNAL_";
+ protected final String TEXT_289 = ");";
+ protected final String TEXT_290 = NL + "\t\t ";
+ protected final String TEXT_291 = " = createPropertyList(";
+ protected final String TEXT_292 = ", ";
+ protected final String TEXT_293 = ".class, ";
+ protected final String TEXT_294 = ", ";
+ protected final String TEXT_295 = ");";
+ protected final String TEXT_296 = NL + "\t\t}" + NL + "\t\treturn ";
+ protected final String TEXT_297 = ";";
+ protected final String TEXT_298 = NL + "\t\tif (eContainerFeatureID != ";
+ protected final String TEXT_299 = ") return null;" + NL + "\t\treturn (";
+ protected final String TEXT_300 = ")eContainer();";
+ protected final String TEXT_301 = NL + "\t\t";
+ protected final String TEXT_302 = " ";
+ protected final String TEXT_303 = " = (";
+ protected final String TEXT_304 = ")eVirtualGet(";
+ protected final String TEXT_305 = ", ";
+ protected final String TEXT_306 = "_DEFAULT_";
+ protected final String TEXT_307 = ");";
+ protected final String TEXT_308 = NL + "\t\tif (";
+ protected final String TEXT_309 = " != null && isProxy(";
+ protected final String TEXT_310 = "))" + NL + "\t\t{" + NL + "\t\t\tObject old";
+ protected final String TEXT_311 = " = ";
+ protected final String TEXT_312 = ";" + NL + "\t\t\t";
+ protected final String TEXT_313 = " = ";
+ protected final String TEXT_314 = "resolveProxy(old";
+ protected final String TEXT_315 = ");" + NL + "\t\t\tif (";
+ protected final String TEXT_316 = " != old";
+ protected final String TEXT_317 = ")" + NL + "\t\t\t{";
+ protected final String TEXT_318 = NL + "\t\t\t\t";
+ protected final String TEXT_319 = " new";
+ protected final String TEXT_320 = " = (";
+ protected final String TEXT_321 = ")";
+ protected final String TEXT_322 = ";";
+ protected final String TEXT_323 = NL + "\t\t\t\tChangeContext changeContext = old";
+ protected final String TEXT_324 = ".eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
+ protected final String TEXT_325 = ", null, null);";
+ protected final String TEXT_326 = NL + "\t\t\t\t";
+ protected final String TEXT_327 = " changeContext = old";
+ protected final String TEXT_328 = ".eInverseRemove(this, ";
+ protected final String TEXT_329 = ", ";
+ protected final String TEXT_330 = ".class, null);";
+ protected final String TEXT_331 = NL + "\t\t\t\tif (new";
+ protected final String TEXT_332 = ".eInternalContainer() == null)" + NL + "\t\t\t\t{";
+ protected final String TEXT_333 = NL + "\t\t\t\t\tchangeContext = new";
+ protected final String TEXT_334 = ".eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ";
+ protected final String TEXT_335 = ", null, changeContext);";
+ protected final String TEXT_336 = NL + "\t\t\t\t\tchangeContext = new";
+ protected final String TEXT_337 = ".eInverseAdd(this, ";
+ protected final String TEXT_338 = ", ";
+ protected final String TEXT_339 = ".class, changeContext);";
+ protected final String TEXT_340 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (changeContext != null) dispatch(changeContext);";
+ protected final String TEXT_341 = NL + "\t\t\t\teVirtualSet(";
+ protected final String TEXT_342 = ", ";
+ protected final String TEXT_343 = ");";
+ protected final String TEXT_344 = NL + "\t\t\t\tif (isNotifying())" + NL + "\t\t\t\t\tnotify(ChangeKind.RESOLVE, _INTERNAL_";
+ protected final String TEXT_345 = ", old";
+ protected final String TEXT_346 = ", ";
+ protected final String TEXT_347 = ");";
+ protected final String TEXT_348 = NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_349 = NL + "\t\treturn (";
+ protected final String TEXT_350 = ")eVirtualGet(";
+ protected final String TEXT_351 = ", ";
+ protected final String TEXT_352 = "_DEFAULT_";
+ protected final String TEXT_353 = ");";
+ protected final String TEXT_354 = NL + "\t\treturn (";
+ protected final String TEXT_355 = " & ";
+ protected final String TEXT_356 = "_EFLAG) != 0;";
+ protected final String TEXT_357 = NL + "\t\treturn ";
+ protected final String TEXT_358 = ";";
+ protected final String TEXT_359 = NL + "\t\t";
+ protected final String TEXT_360 = " ";
+ protected final String TEXT_361 = " = basicGet";
+ protected final String TEXT_362 = "();" + NL + "\t\treturn ";
+ protected final String TEXT_363 = " != null && ";
+ protected final String TEXT_364 = ".isProxy() ? ";
+ protected final String TEXT_365 = "eResolveProxy((";
+ protected final String TEXT_366 = ")";
+ protected final String TEXT_367 = ") : ";
+ protected final String TEXT_368 = ";";
+ protected final String TEXT_369 = NL + "\t\treturn create";
+ protected final String TEXT_370 = "(get";
+ protected final String TEXT_371 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_372 = ");";
+ protected final String TEXT_373 = NL + "\t\treturn (";
+ protected final String TEXT_374 = ")((";
+ protected final String TEXT_375 = ")get";
+ protected final String TEXT_376 = "()).list(";
+ protected final String TEXT_377 = ");";
+ protected final String TEXT_378 = NL + "\t\treturn get";
+ protected final String TEXT_379 = "(get";
+ protected final String TEXT_380 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_381 = ");";
+ protected final String TEXT_382 = NL + "\t\treturn ((";
+ protected final String TEXT_383 = ")get";
+ protected final String TEXT_384 = "()).list(";
+ protected final String TEXT_385 = ");";
+ protected final String TEXT_386 = NL + "\t\treturn ";
+ protected final String TEXT_387 = "(";
+ protected final String TEXT_388 = "(";
+ protected final String TEXT_389 = ")get(get";
+ protected final String TEXT_390 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_391 = ")";
+ protected final String TEXT_392 = ").";
+ protected final String TEXT_393 = "()";
+ protected final String TEXT_394 = ";";
+ protected final String TEXT_395 = NL + "\t\treturn ";
+ protected final String TEXT_396 = "(";
+ protected final String TEXT_397 = "(";
+ protected final String TEXT_398 = ")get(get";
+ protected final String TEXT_399 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_400 = ")";
+ protected final String TEXT_401 = ").";
+ protected final String TEXT_402 = "()";
+ protected final String TEXT_403 = ";";
+ protected final String TEXT_404 = NL + "\t\t// TODO: implement this method to return the '";
+ protected final String TEXT_405 = "' ";
+ protected final String TEXT_406 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_407 = NL + "\t}";
+ protected final String TEXT_408 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_409 = " basicGet";
+ protected final String TEXT_410 = "()" + NL + "\t{";
+ protected final String TEXT_411 = NL + "\t\tif (eContainerFeatureID != ";
+ protected final String TEXT_412 = ") return null;" + NL + "\t\treturn (";
+ protected final String TEXT_413 = ")eInternalContainer();";
+ protected final String TEXT_414 = NL + "\t\treturn (";
+ protected final String TEXT_415 = ")eVirtualGet(";
+ protected final String TEXT_416 = ");";
+ protected final String TEXT_417 = NL + "\t\treturn ";
+ protected final String TEXT_418 = ";";
+ protected final String TEXT_419 = NL + "\t\treturn (";
+ protected final String TEXT_420 = ")get(get";
+ protected final String TEXT_421 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_422 = ");";
+ protected final String TEXT_423 = NL + "\t\treturn (";
+ protected final String TEXT_424 = ")get";
+ protected final String TEXT_425 = "().get(";
+ protected final String TEXT_426 = ", false);";
+ protected final String TEXT_427 = NL + "\t\t// TODO: implement this method to return the '";
+ protected final String TEXT_428 = "' ";
+ protected final String TEXT_429 = NL + "\t\t// -> do not perform proxy resolution" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_430 = NL + "\t}" + NL;
+ protected final String TEXT_431 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicSet";
+ protected final String TEXT_432 = "(";
+ protected final String TEXT_433 = " new";
+ protected final String TEXT_434 = ", ChangeContext changeContext)" + NL + "\t{";
+ protected final String TEXT_435 = NL + "\t\tObject old";
+ protected final String TEXT_436 = " = eVirtualSet(";
+ protected final String TEXT_437 = ", new";
+ protected final String TEXT_438 = ");";
+ protected final String TEXT_439 = NL + "\t\t";
+ protected final String TEXT_440 = " old";
+ protected final String TEXT_441 = " = ";
+ protected final String TEXT_442 = ";" + NL + "\t\t";
+ protected final String TEXT_443 = " = new";
+ protected final String TEXT_444 = ";";
+ protected final String TEXT_445 = NL + "\t\tboolean isSetChange = old";
+ protected final String TEXT_446 = " == EVIRTUAL_NO_VALUE;";
+ protected final String TEXT_447 = NL + "\t\tboolean old";
+ protected final String TEXT_448 = "_set_ = (";
+ protected final String TEXT_449 = " & ";
+ protected final String TEXT_450 = "_ESETFLAG) != 0;" + NL + "\t\t";
+ protected final String TEXT_451 = " |= ";
+ protected final String TEXT_452 = "_ESETFLAG;";
+ protected final String TEXT_453 = NL + "\t\tboolean old";
+ protected final String TEXT_454 = "_set_ = ";
+ protected final String TEXT_455 = "_set_;" + NL + "\t\t";
+ protected final String TEXT_456 = "_set_ = true;";
+ protected final String TEXT_457 = NL + "\t\tif (isNotifying())" + NL + "\t\t{";
+ protected final String TEXT_458 = NL + "\t\t\taddNotification(this, ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_459 = ", ";
+ protected final String TEXT_460 = "isSetChange ? null : old";
+ protected final String TEXT_461 = "old";
+ protected final String TEXT_462 = ", new";
+ protected final String TEXT_463 = ", ";
+ protected final String TEXT_464 = "isSetChange";
+ protected final String TEXT_465 = "!old";
+ protected final String TEXT_466 = "_set_";
+ protected final String TEXT_467 = ", changeContext);";
+ protected final String TEXT_468 = NL + "\t\t\taddNotification(this, ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_469 = ", ";
+ protected final String TEXT_470 = "old";
+ protected final String TEXT_471 = " == EVIRTUAL_NO_VALUE ? null : old";
+ protected final String TEXT_472 = "old";
+ protected final String TEXT_473 = ", new";
+ protected final String TEXT_474 = ", changeContext);";
+ protected final String TEXT_475 = NL + "\t\t}";
+ protected final String TEXT_476 = NL + "\t\treturn changeContext;";
+ protected final String TEXT_477 = NL + "\t\treturn basicAdd(get";
+ protected final String TEXT_478 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_479 = ", new";
+ protected final String TEXT_480 = ", changeContext);";
+ protected final String TEXT_481 = NL + "\t\treturn basicAdd(get";
+ protected final String TEXT_482 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_483 = ", new";
+ protected final String TEXT_484 = ", changeContext);";
+ protected final String TEXT_485 = NL + "\t\t// TODO: implement this method to set the contained '";
+ protected final String TEXT_486 = "' ";
+ protected final String TEXT_487 = NL + "\t\t// -> this method is automatically invoked to keep the containment relationship in synch" + NL + "\t\t// -> do not modify other features" + NL + "\t\t// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_488 = NL + "\t}" + NL;
+ protected final String TEXT_489 = NL + "\t/**" + NL + "\t * Sets the value of the '{@link ";
+ protected final String TEXT_490 = "#";
+ protected final String TEXT_491 = " <em>";
+ protected final String TEXT_492 = "</em>}' ";
+ protected final String TEXT_493 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param value the new value of the '<em>";
+ protected final String TEXT_494 = "</em>' ";
+ protected final String TEXT_495 = ".";
+ protected final String TEXT_496 = NL + "\t * @see ";
+ protected final String TEXT_497 = NL + "\t * @see #isSet";
+ protected final String TEXT_498 = "()";
+ protected final String TEXT_499 = NL + "\t * @see #unset";
+ protected final String TEXT_500 = "()";
+ protected final String TEXT_501 = NL + "\t * @see #";
+ protected final String TEXT_502 = "()" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_503 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_504 = NL + "\tvoid set";
+ protected final String TEXT_505 = "(";
+ protected final String TEXT_506 = " value);" + NL;
+ protected final String TEXT_507 = NL + "\tpublic void set";
+ protected final String TEXT_508 = "(";
+ protected final String TEXT_509 = " new";
+ protected final String TEXT_510 = ")" + NL + "\t{";
+ protected final String TEXT_511 = NL + "\t\t_set_(";
+ protected final String TEXT_512 = ", ";
+ protected final String TEXT_513 = "new ";
+ protected final String TEXT_514 = "(";
+ protected final String TEXT_515 = "new";
+ protected final String TEXT_516 = ")";
+ protected final String TEXT_517 = ");";
+ protected final String TEXT_518 = NL + "\t\tif (new";
+ protected final String TEXT_519 = " != eInternalContainer() || (eContainerFeatureID != ";
+ protected final String TEXT_520 = " && new";
+ protected final String TEXT_521 = " != null))" + NL + "\t\t{" + NL + "\t\t\tif (";
+ protected final String TEXT_522 = ".isAncestor(this, ";
+ protected final String TEXT_523 = "new";
+ protected final String TEXT_524 = "))" + NL + "\t\t\t\tthrow new ";
+ protected final String TEXT_525 = "(\"Recursive containment not allowed for \" + toString());";
+ protected final String TEXT_526 = NL + "\t\t\tChangeContext changeContext = null;" + NL + "\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\tchangeContext = eBasicRemoveFromContainer(changeContext);" + NL + "\t\t\tif (new";
+ protected final String TEXT_527 = " != null)" + NL + "\t\t\t\tchangeContext = ((";
+ protected final String TEXT_528 = ")new";
+ protected final String TEXT_529 = ").eInverseAdd(this, ";
+ protected final String TEXT_530 = ", ";
+ protected final String TEXT_531 = ".class, changeContext);" + NL + "\t\t\tchangeContext = eBasicSetContainer((";
+ protected final String TEXT_532 = ")new";
+ protected final String TEXT_533 = ", ";
+ protected final String TEXT_534 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) dispatch(changeContext);" + NL + "\t\t}";
+ protected final String TEXT_535 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_536 = ", new";
+ protected final String TEXT_537 = ", new";
+ protected final String TEXT_538 = ");";
+ protected final String TEXT_539 = NL + "\t\t";
+ protected final String TEXT_540 = " ";
+ protected final String TEXT_541 = " = (";
+ protected final String TEXT_542 = ")eVirtualGet(";
+ protected final String TEXT_543 = ");";
+ protected final String TEXT_544 = NL + "\t\tif (new";
+ protected final String TEXT_545 = " != ";
+ protected final String TEXT_546 = ")" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;" + NL + "\t\t\tif (";
+ protected final String TEXT_547 = " != null)";
+ protected final String TEXT_548 = NL + "\t\t\t\tchangeContext = inverseRemove(";
+ protected final String TEXT_549 = ", this, OPPOSITE_FEATURE_BASE - _INTERNAL_";
+ protected final String TEXT_550 = ", null, changeContext);" + NL + "\t\t\tif (new";
+ protected final String TEXT_551 = " != null)" + NL + "\t\t\t\tchangeContext = inverseAdd(new";
+ protected final String TEXT_552 = ", this, OPPOSITE_FEATURE_BASE - _INTERNAL_";
+ protected final String TEXT_553 = ", null, changeContext);";
+ protected final String TEXT_554 = NL + "\t\t\t\tchangeContext = inverseRemove(";
+ protected final String TEXT_555 = ", this, ";
+ protected final String TEXT_556 = ", ";
+ protected final String TEXT_557 = ".class, changeContext);" + NL + "\t\t\tif (new";
+ protected final String TEXT_558 = " != null)" + NL + "\t\t\t\tchangeContext = inverseAdd(new";
+ protected final String TEXT_559 = ", this, ";
+ protected final String TEXT_560 = ", ";
+ protected final String TEXT_561 = ".class, changeContext);";
+ protected final String TEXT_562 = NL + "\t\t\tchangeContext = basicSet";
+ protected final String TEXT_563 = "(";
+ protected final String TEXT_564 = "new";
+ protected final String TEXT_565 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) dispatch(changeContext);" + NL + "\t\t}";
+ protected final String TEXT_566 = NL + "\t\telse" + NL + "\t\t{";
+ protected final String TEXT_567 = NL + "\t\t\tboolean old";
+ protected final String TEXT_568 = "_set_ = eVirtualIsSet(";
+ protected final String TEXT_569 = ");";
+ protected final String TEXT_570 = NL + "\t\t\tboolean old";
+ protected final String TEXT_571 = "_set_ = (";
+ protected final String TEXT_572 = " & ";
+ protected final String TEXT_573 = "_ESETFLAG) != 0;";
+ protected final String TEXT_574 = NL + "\t\t\t";
+ protected final String TEXT_575 = " |= ";
+ protected final String TEXT_576 = "_ESETFLAG;";
+ protected final String TEXT_577 = NL + "\t\t\tboolean old";
+ protected final String TEXT_578 = "_set_ = ";
+ protected final String TEXT_579 = "_set_;";
+ protected final String TEXT_580 = NL + "\t\t\t";
+ protected final String TEXT_581 = "_set_ = true;";
+ protected final String TEXT_582 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_583 = ", new";
+ protected final String TEXT_584 = ", new";
+ protected final String TEXT_585 = ", !old";
+ protected final String TEXT_586 = "_set_);";
+ protected final String TEXT_587 = NL + "\t\t}";
+ protected final String TEXT_588 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_589 = ", new";
+ protected final String TEXT_590 = ", new";
+ protected final String TEXT_591 = ");";
+ protected final String TEXT_592 = NL + "\t\t";
+ protected final String TEXT_593 = " old";
+ protected final String TEXT_594 = " = (";
+ protected final String TEXT_595 = " & ";
+ protected final String TEXT_596 = "_EFLAG) != 0;";
+ protected final String TEXT_597 = NL + "\t\tif (new";
+ protected final String TEXT_598 = ") ";
+ protected final String TEXT_599 = " |= ";
+ protected final String TEXT_600 = "_EFLAG; else ";
+ protected final String TEXT_601 = " &= ~";
+ protected final String TEXT_602 = "_EFLAG;";
+ protected final String TEXT_603 = NL + "\t\t";
+ protected final String TEXT_604 = " old";
+ protected final String TEXT_605 = " = ";
+ protected final String TEXT_606 = ";";
+ protected final String TEXT_607 = NL + "\t\t";
+ protected final String TEXT_608 = " ";
+ protected final String TEXT_609 = " = new";
+ protected final String TEXT_610 = " == null ? ";
+ protected final String TEXT_611 = "_DEFAULT_ : new";
+ protected final String TEXT_612 = ";";
+ protected final String TEXT_613 = NL + "\t\t";
+ protected final String TEXT_614 = " = new";
+ protected final String TEXT_615 = " == null ? ";
+ protected final String TEXT_616 = "_DEFAULT_ : new";
+ protected final String TEXT_617 = ";";
+ protected final String TEXT_618 = NL + "\t\t";
+ protected final String TEXT_619 = " ";
+ protected final String TEXT_620 = " = ";
+ protected final String TEXT_621 = "new";
+ protected final String TEXT_622 = ";";
+ protected final String TEXT_623 = NL + "\t\t";
+ protected final String TEXT_624 = " = ";
+ protected final String TEXT_625 = "new";
+ protected final String TEXT_626 = ";";
+ protected final String TEXT_627 = NL + "\t\tObject old";
+ protected final String TEXT_628 = " = eVirtualSet(";
+ protected final String TEXT_629 = ", ";
+ protected final String TEXT_630 = ");";
+ protected final String TEXT_631 = NL + "\t\tboolean isSetChange = old";
+ protected final String TEXT_632 = " == EVIRTUAL_NO_VALUE;";
+ protected final String TEXT_633 = NL + "\t\tboolean old";
+ protected final String TEXT_634 = "_set_ = (";
+ protected final String TEXT_635 = " & ";
+ protected final String TEXT_636 = "_ESETFLAG) != 0;";
+ protected final String TEXT_637 = NL + "\t\t";
+ protected final String TEXT_638 = " |= ";
+ protected final String TEXT_639 = "_ESETFLAG;";
+ protected final String TEXT_640 = NL + "\t\tboolean old";
+ protected final String TEXT_641 = "_set_ = ";
+ protected final String TEXT_642 = "_set_;";
+ protected final String TEXT_643 = NL + "\t\t";
+ protected final String TEXT_644 = "_set_ = true;";
+ protected final String TEXT_645 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_646 = ", ";
+ protected final String TEXT_647 = "isSetChange ? ";
+ protected final String TEXT_648 = "null";
+ protected final String TEXT_649 = "_DEFAULT_";
+ protected final String TEXT_650 = " : old";
+ protected final String TEXT_651 = "old";
+ protected final String TEXT_652 = ", ";
+ protected final String TEXT_653 = "new";
+ protected final String TEXT_654 = ", ";
+ protected final String TEXT_655 = "isSetChange";
+ protected final String TEXT_656 = "!old";
+ protected final String TEXT_657 = "_set_";
+ protected final String TEXT_658 = ");";
+ protected final String TEXT_659 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, _INTERNAL_";
+ protected final String TEXT_660 = ", ";
+ protected final String TEXT_661 = "old";
+ protected final String TEXT_662 = " == EVIRTUAL_NO_VALUE ? ";
+ protected final String TEXT_663 = "null";
+ protected final String TEXT_664 = "_DEFAULT_";
+ protected final String TEXT_665 = " : old";
+ protected final String TEXT_666 = "old";
+ protected final String TEXT_667 = ", ";
+ protected final String TEXT_668 = "new";
+ protected final String TEXT_669 = ");";
+ protected final String TEXT_670 = NL + "\t\tset(get";
+ protected final String TEXT_671 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_672 = ", ";
+ protected final String TEXT_673 = " new ";
+ protected final String TEXT_674 = "(";
+ protected final String TEXT_675 = "new";
+ protected final String TEXT_676 = ")";
+ protected final String TEXT_677 = ");";
+ protected final String TEXT_678 = NL + "\t\t((";
+ protected final String TEXT_679 = ".Internal)get";
+ protected final String TEXT_680 = "()).set(";
+ protected final String TEXT_681 = ", ";
+ protected final String TEXT_682 = "new ";
+ protected final String TEXT_683 = "(";
+ protected final String TEXT_684 = "new";
+ protected final String TEXT_685 = ")";
+ protected final String TEXT_686 = ");";
+ protected final String TEXT_687 = NL + "\t\t// TODO: implement this method to set the '";
+ protected final String TEXT_688 = "' ";
+ protected final String TEXT_689 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_690 = NL + "\t}" + NL;
+ protected final String TEXT_691 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicUnset";
+ protected final String TEXT_692 = "(ChangeContext changeContext)" + NL + "\t{";
+ protected final String TEXT_693 = NL + "\t\tObject old";
+ protected final String TEXT_694 = " = eVirtualUnset(";
+ protected final String TEXT_695 = ");";
+ protected final String TEXT_696 = NL + "\t\t";
+ protected final String TEXT_697 = " old";
+ protected final String TEXT_698 = " = ";
+ protected final String TEXT_699 = ";" + NL + "\t\t";
+ protected final String TEXT_700 = " = null;";
+ protected final String TEXT_701 = NL + "\t\tboolean isSetChange = old";
+ protected final String TEXT_702 = " != EVIRTUAL_NO_VALUE;";
+ protected final String TEXT_703 = NL + "\t\tboolean old";
+ protected final String TEXT_704 = "_set_ = (";
+ protected final String TEXT_705 = " & ";
+ protected final String TEXT_706 = "_ESETFLAG) != 0;" + NL + "\t\t";
+ protected final String TEXT_707 = " &= ~";
+ protected final String TEXT_708 = "_ESETFLAG;";
+ protected final String TEXT_709 = NL + "\t\tboolean old";
+ protected final String TEXT_710 = "_set_ = ";
+ protected final String TEXT_711 = "_set_;" + NL + "\t\t";
+ protected final String TEXT_712 = "_set_ = false;";
+ protected final String TEXT_713 = NL + "\t\tif (isNotifying())" + NL + "\t\t{";
+ protected final String TEXT_714 = NL + "\t\t\taddNotification(this, ChangeKind.UNSET, _INTERNAL_";
+ protected final String TEXT_715 = ", ";
+ protected final String TEXT_716 = "isSetChange ? null : old";
+ protected final String TEXT_717 = "old";
+ protected final String TEXT_718 = ", null, ";
+ protected final String TEXT_719 = "isSetChange";
+ protected final String TEXT_720 = "!old";
+ protected final String TEXT_721 = "_set_";
+ protected final String TEXT_722 = ", changeContext);";
+ protected final String TEXT_723 = NL + "\t\t\taddNotification(this, ChangeKind.UNSET, _INTERNAL_";
+ protected final String TEXT_724 = ", ";
+ protected final String TEXT_725 = "old";
+ protected final String TEXT_726 = " == EVIRTUAL_NO_VALUE ? null : old";
+ protected final String TEXT_727 = "old";
+ protected final String TEXT_728 = ", null, changeContext);";
+ protected final String TEXT_729 = NL + "\t\t}";
+ protected final String TEXT_730 = NL + "\t\treturn changeContext;";
+ protected final String TEXT_731 = NL + "\t\t// TODO: implement this method to unset the contained '";
+ protected final String TEXT_732 = "' ";
+ protected final String TEXT_733 = NL + "\t\t// -> this method is automatically invoked to keep the containment relationship in synch" + NL + "\t\t// -> do not modify other features" + NL + "\t\t// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_734 = NL + "\t}" + NL;
+ protected final String TEXT_735 = NL + "\t/**" + NL + "\t * Unsets the value of the '{@link ";
+ protected final String TEXT_736 = "#";
+ protected final String TEXT_737 = " <em>";
+ protected final String TEXT_738 = "</em>}' ";
+ protected final String TEXT_739 = "." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
+ protected final String TEXT_740 = NL + "\t * @see #isSet";
+ protected final String TEXT_741 = "()";
+ protected final String TEXT_742 = NL + "\t * @see #";
+ protected final String TEXT_743 = "()";
+ protected final String TEXT_744 = NL + "\t * @see #set";
+ protected final String TEXT_745 = "(";
+ protected final String TEXT_746 = ")";
+ protected final String TEXT_747 = NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_748 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_749 = NL + "\tvoid unset";
+ protected final String TEXT_750 = "();" + NL;
+ protected final String TEXT_751 = NL + "\tpublic void unset";
+ protected final String TEXT_752 = "()" + NL + "\t{";
+ protected final String TEXT_753 = NL + "\t\tunset(";
+ protected final String TEXT_754 = ");";
+ protected final String TEXT_755 = NL + "\t\t((";
+ protected final String TEXT_756 = ".Unsettable)get";
+ protected final String TEXT_757 = "()).unset();";
+ protected final String TEXT_758 = NL + "\t\t";
+ protected final String TEXT_759 = " ";
+ protected final String TEXT_760 = " = (";
+ protected final String TEXT_761 = ")eVirtualGet(";
+ protected final String TEXT_762 = ");";
+ protected final String TEXT_763 = NL + "\t\tif (";
+ protected final String TEXT_764 = " != null)" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;";
+ protected final String TEXT_765 = NL + "\t\t\tchangeContext = inverseRemove(";
+ protected final String TEXT_766 = ", this, EOPPOSITE_FEATURE_BASE - _INTERNAL_";
+ protected final String TEXT_767 = ", null, changeContext);";
+ protected final String TEXT_768 = NL + "\t\t\tchangeContext = inverseRemove(";
+ protected final String TEXT_769 = ", this, ";
+ protected final String TEXT_770 = ", ";
+ protected final String TEXT_771 = ".class, changeContext);";
+ protected final String TEXT_772 = NL + "\t\t\tchangeContext = basicUnset";
+ protected final String TEXT_773 = "(changeContext);" + NL + "\t\t\tif (changeContext != null) dispatch(changeContext);" + NL + "\t\t}" + NL + "\t\telse" + NL + " \t{";
+ protected final String TEXT_774 = NL + "\t\t\tboolean old";
+ protected final String TEXT_775 = "_set_ = eVirtualIsSet(";
+ protected final String TEXT_776 = ");";
+ protected final String TEXT_777 = NL + "\t\t\tboolean old";
+ protected final String TEXT_778 = "_set_ = (";
+ protected final String TEXT_779 = " & ";
+ protected final String TEXT_780 = "_ESETFLAG) != 0;";
+ protected final String TEXT_781 = NL + "\t\t\t";
+ protected final String TEXT_782 = " &= ~";
+ protected final String TEXT_783 = "_ESETFLAG;";
+ protected final String TEXT_784 = NL + "\t\t\tboolean old";
+ protected final String TEXT_785 = "_set_ = ";
+ protected final String TEXT_786 = "_set_;";
+ protected final String TEXT_787 = NL + "\t\t\t";
+ protected final String TEXT_788 = "_set_ = false;";
+ protected final String TEXT_789 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.UNSET, _INTERNAL_";
+ protected final String TEXT_790 = ", null, null, old";
+ protected final String TEXT_791 = "_set_);";
+ protected final String TEXT_792 = NL + " \t}";
+ protected final String TEXT_793 = NL + "\t\t";
+ protected final String TEXT_794 = " old";
+ protected final String TEXT_795 = " = (";
+ protected final String TEXT_796 = " & ";
+ protected final String TEXT_797 = "_EFLAG) != 0;";
+ protected final String TEXT_798 = NL + "\t\tObject old";
+ protected final String TEXT_799 = " = eVirtualUnset(";
+ protected final String TEXT_800 = ");";
+ protected final String TEXT_801 = NL + "\t\t";
+ protected final String TEXT_802 = " old";
+ protected final String TEXT_803 = " = ";
+ protected final String TEXT_804 = ";";
+ protected final String TEXT_805 = NL + "\t\tboolean isSetChange = old";
+ protected final String TEXT_806 = " != EVIRTUAL_NO_VALUE;";
+ protected final String TEXT_807 = NL + "\t\tboolean old";
+ protected final String TEXT_808 = "_set_ = (";
+ protected final String TEXT_809 = " & ";
+ protected final String TEXT_810 = "_ESETFLAG) != 0;";
+ protected final String TEXT_811 = NL + "\t\tboolean old";
+ protected final String TEXT_812 = "_set_ = ";
+ protected final String TEXT_813 = "_set_;";
+ protected final String TEXT_814 = NL + "\t\t";
+ protected final String TEXT_815 = " = null;";
+ protected final String TEXT_816 = NL + "\t\t";
+ protected final String TEXT_817 = " &= ~";
+ protected final String TEXT_818 = "_ESETFLAG;";
+ protected final String TEXT_819 = NL + "\t\t";
+ protected final String TEXT_820 = "_set_ = false;";
+ protected final String TEXT_821 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, _INTERNAL_";
+ protected final String TEXT_822 = ", ";
+ protected final String TEXT_823 = "isSetChange ? old";
+ protected final String TEXT_824 = " : null";
+ protected final String TEXT_825 = "old";
+ protected final String TEXT_826 = ", null, ";
+ protected final String TEXT_827 = "isSetChange";
+ protected final String TEXT_828 = "old";
+ protected final String TEXT_829 = "_set_";
+ protected final String TEXT_830 = ");";
+ protected final String TEXT_831 = NL + "\t\tif (";
+ protected final String TEXT_832 = "_DEFAULT_) ";
+ protected final String TEXT_833 = " |= ";
+ protected final String TEXT_834 = "_EFLAG; else ";
+ protected final String TEXT_835 = " &= ~";
+ protected final String TEXT_836 = "_EFLAG;";
+ protected final String TEXT_837 = NL + "\t\t";
+ protected final String TEXT_838 = " = ";
+ protected final String TEXT_839 = "_DEFAULT_;";
+ protected final String TEXT_840 = NL + "\t\t";
+ protected final String TEXT_841 = " &= ~";
+ protected final String TEXT_842 = "_ESETFLAG;";
+ protected final String TEXT_843 = NL + "\t\t";
+ protected final String TEXT_844 = "_set_ = false;";
+ protected final String TEXT_845 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, _INTERNAL_";
+ protected final String TEXT_846 = ", ";
+ protected final String TEXT_847 = "isSetChange ? old";
+ protected final String TEXT_848 = " : ";
+ protected final String TEXT_849 = "_DEFAULT_";
+ protected final String TEXT_850 = "old";
+ protected final String TEXT_851 = ", ";
+ protected final String TEXT_852 = "_DEFAULT_, ";
+ protected final String TEXT_853 = "isSetChange";
+ protected final String TEXT_854 = "old";
+ protected final String TEXT_855 = "_set_";
+ protected final String TEXT_856 = ");";
+ protected final String TEXT_857 = NL + " unset(get";
+ protected final String TEXT_858 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_859 = ");";
+ protected final String TEXT_860 = NL + " unset";
+ protected final String TEXT_861 = "(get";
+ protected final String TEXT_862 = "());";
+ protected final String TEXT_863 = NL + "\t\t// TODO: implement this method to unset the '";
+ protected final String TEXT_864 = "' ";
+ protected final String TEXT_865 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_866 = NL + "\t}" + NL;
+ protected final String TEXT_867 = NL + "\t/**" + NL + "\t * Returns whether the value of the '{@link ";
+ protected final String TEXT_868 = "#";
+ protected final String TEXT_869 = " <em>";
+ protected final String TEXT_870 = "</em>}' ";
+ protected final String TEXT_871 = " is set." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return whether the value of the '<em>";
+ protected final String TEXT_872 = "</em>' ";
+ protected final String TEXT_873 = " is set.";
+ protected final String TEXT_874 = NL + "\t * @see #unset";
+ protected final String TEXT_875 = "()";
+ protected final String TEXT_876 = NL + "\t * @see #";
+ protected final String TEXT_877 = "()";
+ protected final String TEXT_878 = NL + "\t * @see #set";
+ protected final String TEXT_879 = "(";
+ protected final String TEXT_880 = ")";
+ protected final String TEXT_881 = NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_882 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_883 = NL + "\tboolean isSet";
+ protected final String TEXT_884 = "();" + NL;
+ protected final String TEXT_885 = NL + "\tpublic boolean isSet";
+ protected final String TEXT_886 = "()" + NL + "\t{";
+ protected final String TEXT_887 = NL + "\t\treturn isSet(";
+ protected final String TEXT_888 = ");";
+ protected final String TEXT_889 = NL + "\t\t";
+ protected final String TEXT_890 = " ";
+ protected final String TEXT_891 = " = (";
+ protected final String TEXT_892 = ")eVirtualGet(";
+ protected final String TEXT_893 = ");";
+ protected final String TEXT_894 = NL + "\t\treturn ";
+ protected final String TEXT_895 = " != null && ((";
+ protected final String TEXT_896 = ".Unsettable)";
+ protected final String TEXT_897 = ").isSet();";
+ protected final String TEXT_898 = NL + "\t\treturn eVirtualIsSet(";
+ protected final String TEXT_899 = ");";
+ protected final String TEXT_900 = NL + "\t\treturn (";
+ protected final String TEXT_901 = " & ";
+ protected final String TEXT_902 = "_ESETFLAG) != 0;";
+ protected final String TEXT_903 = NL + "\t\treturn ";
+ protected final String TEXT_904 = "_set_;";
+ protected final String TEXT_905 = NL + " return isSet(get";
+ protected final String TEXT_906 = "(), getType(), _INTERNAL_";
+ protected final String TEXT_907 = ");";
+ protected final String TEXT_908 = NL + "\t\treturn !((";
+ protected final String TEXT_909 = ".Internal)get";
+ protected final String TEXT_910 = "()).isEmpty(";
+ protected final String TEXT_911 = ");";
+ protected final String TEXT_912 = NL + "\t\t// TODO: implement this method to return whether the '";
+ protected final String TEXT_913 = "' ";
+ protected final String TEXT_914 = " is set" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_915 = NL + "\t}" + NL;
+ protected final String TEXT_916 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->";
+ protected final String TEXT_917 = NL + "\t * <!-- begin-model-doc -->" + NL + "\t * ";
+ protected final String TEXT_918 = NL + "\t * <!-- end-model-doc -->";
+ protected final String TEXT_919 = NL + "\t * @model ";
+ protected final String TEXT_920 = NL + "\t * ";
+ protected final String TEXT_921 = NL + "\t * @model";
+ protected final String TEXT_922 = NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_923 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */";
+ protected final String TEXT_924 = NL + "\t";
+ protected final String TEXT_925 = " ";
+ protected final String TEXT_926 = "(";
+ protected final String TEXT_927 = ")";
+ protected final String TEXT_928 = ";" + NL;
+ protected final String TEXT_929 = NL + "\tpublic ";
+ protected final String TEXT_930 = " ";
+ protected final String TEXT_931 = "(";
+ protected final String TEXT_932 = ")";
+ protected final String TEXT_933 = NL + "\t{";
+ protected final String TEXT_934 = NL + "\t\t";
+ protected final String TEXT_935 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// -> specify the condition that violates the invariant" + NL + "\t\t// -> verify the details of the diagnostic, including severity and message" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tif (false)" + NL + "\t\t{" + NL + "\t\t\tif (";
+ protected final String TEXT_936 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t";
+ protected final String TEXT_937 = ".add" + NL + "\t\t\t\t\t(new ";
+ protected final String TEXT_938 = NL + "\t\t\t\t\t\t(";
+ protected final String TEXT_939 = ".ERROR," + NL + "\t\t\t\t\t\t ";
+ protected final String TEXT_940 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t ";
+ protected final String TEXT_941 = ".";
+ protected final String TEXT_942 = "," + NL + "\t\t\t\t\t\t ";
+ protected final String TEXT_943 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \"";
+ protected final String TEXT_944 = "\", ";
+ protected final String TEXT_945 = ".getObjectLabel(this, ";
+ protected final String TEXT_946 = ") }),";
+ protected final String TEXT_947 = NL + "\t\t\t\t\t\t new Object [] { this }));" + NL + "\t\t\t}" + NL + "\t\t\treturn false;" + NL + "\t\t}" + NL + "\t\treturn true;";
+ protected final String TEXT_948 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();";
+ protected final String TEXT_949 = NL + "\t}" + NL;
+ protected final String TEXT_950 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext eInverseAdd(";
+ protected final String TEXT_951 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_952 = NL + "\t\t\tcase ";
+ protected final String TEXT_953 = ":";
+ protected final String TEXT_954 = NL + "\t\t\t\treturn ((";
+ protected final String TEXT_955 = ")((";
+ protected final String TEXT_956 = ".InternalMapView)";
+ protected final String TEXT_957 = "()).eMap()).basicAdd(otherEnd, changeContext);";
+ protected final String TEXT_958 = NL + "\t\t\t\treturn ((";
+ protected final String TEXT_959 = ")";
+ protected final String TEXT_960 = "()).basicAdd(otherEnd, changeContext);";
+ protected final String TEXT_961 = NL + "\t\t\t\tif (eInternalContainer() != null)" + NL + "\t\t\t\t\tchangeContext = eBasicRemoveFromContainer(changeContext);" + NL + "\t\t\t\treturn eBasicSetContainer(otherEnd, ";
+ protected final String TEXT_962 = ", changeContext);";
+ protected final String TEXT_963 = NL + "\t\t\t\t";
+ protected final String TEXT_964 = " ";
+ protected final String TEXT_965 = " = (";
+ protected final String TEXT_966 = ")eVirtualGet(";
+ protected final String TEXT_967 = ");";
+ protected final String TEXT_968 = NL + "\t\t\t\tif (";
+ protected final String TEXT_969 = " != null)";
+ protected final String TEXT_970 = NL + "\t\t\t\t\tchangeContext = ((";
+ protected final String TEXT_971 = ")";
+ protected final String TEXT_972 = ").eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ";
+ protected final String TEXT_973 = ", null, changeContext);";
+ protected final String TEXT_974 = NL + "\t\t\t\t\tchangeContext = ((";
+ protected final String TEXT_975 = ")";
+ protected final String TEXT_976 = ").eInverseRemove(this, ";
+ protected final String TEXT_977 = ", ";
+ protected final String TEXT_978 = ".class, changeContext);";
+ protected final String TEXT_979 = NL + "\t\t\t\treturn basicSet";
+ protected final String TEXT_980 = "((";
+ protected final String TEXT_981 = ")otherEnd, changeContext);";
+ protected final String TEXT_982 = NL + "\t\t}";
+ protected final String TEXT_983 = NL + "\t\treturn super.eInverseAdd(otherEnd, propertyIndex, changeContext);";
+ protected final String TEXT_984 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, propertyIndex, changeContext);";
+ protected final String TEXT_985 = NL + "\t}" + NL;
+ protected final String TEXT_986 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext inverseRemove(";
+ protected final String TEXT_987 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_988 = NL + "\t\t\tcase ";
+ protected final String TEXT_989 = ":";
+ protected final String TEXT_990 = NL + "\t\t\t\treturn ((";
+ protected final String TEXT_991 = ")((";
+ protected final String TEXT_992 = ".InternalMapView)";
+ protected final String TEXT_993 = "()).eMap()).basicRemove(otherEnd, changeContext);";
+ protected final String TEXT_994 = NL + "\t\t\t\treturn removeFrom";
+ protected final String TEXT_995 = "(";
+ protected final String TEXT_996 = "(), otherEnd, changeContext);";
+ protected final String TEXT_997 = NL + "\t\t\t\treturn removeFromList(";
+ protected final String TEXT_998 = "(), otherEnd, changeContext);";
+ protected final String TEXT_999 = NL + "\t\t\t\treturn eBasicSetContainer(null, ";
+ protected final String TEXT_1000 = ", changeContext);";
+ protected final String TEXT_1001 = NL + "\t\t\t\treturn basicUnset";
+ protected final String TEXT_1002 = "(changeContext);";
+ protected final String TEXT_1003 = NL + "\t\t\t\treturn basicSet";
+ protected final String TEXT_1004 = "(null, changeContext);";
+ protected final String TEXT_1005 = NL + "\t\t}";
+ protected final String TEXT_1006 = NL + "\t\treturn super.inverseRemove(otherEnd, propertyIndex, changeContext);";
+ protected final String TEXT_1007 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, propertyIndex, changeContext);";
+ protected final String TEXT_1008 = NL + "\t}" + NL;
+ protected final String TEXT_1009 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (eContainerFeatureID)" + NL + "\t\t{";
+ protected final String TEXT_1010 = NL + "\t\t\tcase ";
+ protected final String TEXT_1011 = ":" + NL + "\t\t\t\treturn eInternalContainer().eInverseRemove(this, ";
+ protected final String TEXT_1012 = ", ";
+ protected final String TEXT_1013 = ".class, changeContext);";
+ protected final String TEXT_1014 = NL + "\t\t}";
+ protected final String TEXT_1015 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(changeContext);";
+ protected final String TEXT_1016 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(changeContext);";
+ protected final String TEXT_1017 = NL + "\t}" + NL;
+ protected final String TEXT_1018 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object get(int propertyIndex, boolean resolve)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_1019 = NL + "\t\t\tcase ";
+ protected final String TEXT_1020 = ":";
+ protected final String TEXT_1021 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1022 = "() ? Boolean.TRUE : Boolean.FALSE;";
+ protected final String TEXT_1023 = NL + "\t\t\t\treturn new ";
+ protected final String TEXT_1024 = "(";
+ protected final String TEXT_1025 = "());";
+ protected final String TEXT_1026 = NL + "\t\t\t\tif (resolve) return ";
+ protected final String TEXT_1027 = "();" + NL + "\t\t\t\treturn basicGet";
+ protected final String TEXT_1028 = "();";
+ protected final String TEXT_1029 = NL + "\t\t\t\tif (coreType) return ((";
+ protected final String TEXT_1030 = ".InternalMapView)";
+ protected final String TEXT_1031 = "()).eMap();" + NL + "\t\t\t\telse return ";
+ protected final String TEXT_1032 = "();";
+ protected final String TEXT_1033 = NL + "\t\t\t\tif (coreType) return ";
+ protected final String TEXT_1034 = "();" + NL + "\t\t\t\telse return ";
+ protected final String TEXT_1035 = "().map();";
+ protected final String TEXT_1036 = NL + "\t\t\t\t// XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view" + NL + "\t\t\t\t//if (coreType) " + NL + "\t\t\t\treturn ";
+ protected final String TEXT_1037 = "();";
+ protected final String TEXT_1038 = NL + "\t\t\t\tif (coreType) return ";
+ protected final String TEXT_1039 = "();" + NL + "\t\t\t\treturn ((";
+ protected final String TEXT_1040 = ".Internal)";
+ protected final String TEXT_1041 = "()).getWrapper();";
+ protected final String TEXT_1042 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1043 = "();";
+ protected final String TEXT_1044 = NL + "\t\t}";
+ protected final String TEXT_1045 = NL + "\t\treturn super.get(propertyIndex, resolve);";
+ protected final String TEXT_1046 = NL + "\t\treturn eDynamicGet(propertyIndex, resolve, coreType);";
+ protected final String TEXT_1047 = NL + "\t}" + NL;
+ protected final String TEXT_1048 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void set(int propertyIndex, Object newValue)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_1049 = NL + "\t\t\tcase ";
+ protected final String TEXT_1050 = ":";
+ protected final String TEXT_1051 = NL + " \tset";
+ protected final String TEXT_1052 = "(";
+ protected final String TEXT_1053 = "(), newValue);";
+ protected final String TEXT_1054 = NL + "\t\t\t\t((";
+ protected final String TEXT_1055 = ".Internal)";
+ protected final String TEXT_1056 = "()).set(newValue);";
+ protected final String TEXT_1057 = NL + "\t\t\t\t((";
+ protected final String TEXT_1058 = ".Setting)((";
+ protected final String TEXT_1059 = ".InternalMapView)";
+ protected final String TEXT_1060 = "()).eMap()).set(newValue);";
+ protected final String TEXT_1061 = NL + "\t\t\t\t((";
+ protected final String TEXT_1062 = ".Setting)";
+ protected final String TEXT_1063 = "()).set(newValue);";
+ protected final String TEXT_1064 = NL + "\t\t\t\t";
+ protected final String TEXT_1065 = "().clear();" + NL + "\t\t\t\t";
+ protected final String TEXT_1066 = "().addAll((";
+ protected final String TEXT_1067 = ")newValue);";
+ protected final String TEXT_1068 = NL + "\t\t\t\tset";
+ protected final String TEXT_1069 = "(((";
+ protected final String TEXT_1070 = ")newValue).";
+ protected final String TEXT_1071 = "());";
+ protected final String TEXT_1072 = NL + "\t\t\t\tset";
+ protected final String TEXT_1073 = "((";
+ protected final String TEXT_1074 = ")newValue);";
+ protected final String TEXT_1075 = NL + "\t\t\t\treturn;";
+ protected final String TEXT_1076 = NL + "\t\t}";
+ protected final String TEXT_1077 = NL + "\t\tsuper.set(propertyIndex, newValue);";
+ protected final String TEXT_1078 = NL + "\t\teDynamicSet(propertyIndex, newValue);";
+ protected final String TEXT_1079 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void unset(int propertyIndex)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_1080 = NL + "\t\t\tcase ";
+ protected final String TEXT_1081 = ":";
+ protected final String TEXT_1082 = NL + "\t\t\t\tunset";
+ protected final String TEXT_1083 = "(";
+ protected final String TEXT_1084 = "());";
+ protected final String TEXT_1085 = NL + "\t\t\t\t";
+ protected final String TEXT_1086 = "().clear();";
+ protected final String TEXT_1087 = NL + "\t\t\t\tunset";
+ protected final String TEXT_1088 = "();";
+ protected final String TEXT_1089 = NL + "\t\t\t\tset";
+ protected final String TEXT_1090 = "((";
+ protected final String TEXT_1091 = ")null);";
+ protected final String TEXT_1092 = NL + "\t\t\t\tset";
+ protected final String TEXT_1093 = "(";
+ protected final String TEXT_1094 = "_DEFAULT_);";
+ protected final String TEXT_1095 = NL + "\t\t\t\treturn;";
+ protected final String TEXT_1096 = NL + "\t\t}";
+ protected final String TEXT_1097 = NL + "\t\tsuper.unset(propertyIndex);";
+ protected final String TEXT_1098 = NL + "\t\teDynamicUnset(propertyIndex);";
+ protected final String TEXT_1099 = NL + "\t}" + NL;
+ protected final String TEXT_1100 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean isSet(int propertyIndex)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{";
+ protected final String TEXT_1101 = NL + "\t\t\tcase ";
+ protected final String TEXT_1102 = ":";
+ protected final String TEXT_1103 = NL + "\t\t\t\treturn !is";
+ protected final String TEXT_1104 = "Empty(";
+ protected final String TEXT_1105 = "());";
+ protected final String TEXT_1106 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1107 = " != null && !is";
+ protected final String TEXT_1108 = "Empty(";
+ protected final String TEXT_1109 = "());";
+ protected final String TEXT_1110 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1111 = " != null && !";
+ protected final String TEXT_1112 = ".isEmpty();";
+ protected final String TEXT_1113 = NL + "\t\t\t\t";
+ protected final String TEXT_1114 = " ";
+ protected final String TEXT_1115 = " = (";
+ protected final String TEXT_1116 = ")eVirtualGet(";
+ protected final String TEXT_1117 = ");" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_1118 = " != null && !";
+ protected final String TEXT_1119 = ".isEmpty();";
+ protected final String TEXT_1120 = NL + "\t\t\t\treturn !";
+ protected final String TEXT_1121 = "().isEmpty();";
+ protected final String TEXT_1122 = NL + "\t\t\t\treturn isSet";
+ protected final String TEXT_1123 = "();";
+ protected final String TEXT_1124 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1125 = " != null;";
+ protected final String TEXT_1126 = NL + "\t\t\t\treturn eVirtualGet(";
+ protected final String TEXT_1127 = ") != null;";
+ protected final String TEXT_1128 = NL + "\t\t\t\treturn basicGet";
+ protected final String TEXT_1129 = "() != null;";
+ protected final String TEXT_1130 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1131 = " != null;";
+ protected final String TEXT_1132 = NL + "\t\t\t\treturn eVirtualGet(";
+ protected final String TEXT_1133 = ") != null;";
+ protected final String TEXT_1134 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1135 = "() != null;";
+ protected final String TEXT_1136 = NL + "\t\t\t\treturn ((";
+ protected final String TEXT_1137 = " & ";
+ protected final String TEXT_1138 = "_EFLAG) != 0) != ";
+ protected final String TEXT_1139 = "_DEFAULT_;";
+ protected final String TEXT_1140 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1141 = " != ";
+ protected final String TEXT_1142 = "_DEFAULT_;";
+ protected final String TEXT_1143 = NL + "\t\t\t\treturn eVirtualGet(";
+ protected final String TEXT_1144 = ", ";
+ protected final String TEXT_1145 = "_DEFAULT_) != ";
+ protected final String TEXT_1146 = "_DEFAULT_;";
+ protected final String TEXT_1147 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1148 = "() != ";
+ protected final String TEXT_1149 = "_DEFAULT_;";
+ protected final String TEXT_1150 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1151 = "_DEFAULT_ == null ? ";
+ protected final String TEXT_1152 = " != null : !";
+ protected final String TEXT_1153 = "_DEFAULT_.equals(";
+ protected final String TEXT_1154 = ");";
+ protected final String TEXT_1155 = NL + "\t\t\t\t";
+ protected final String TEXT_1156 = " ";
+ protected final String TEXT_1157 = " = (";
+ protected final String TEXT_1158 = ")eVirtualGet(";
+ protected final String TEXT_1159 = ", ";
+ protected final String TEXT_1160 = "_DEFAULT_);" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_1161 = "_DEFAULT_ == null ? ";
+ protected final String TEXT_1162 = " != null : !";
+ protected final String TEXT_1163 = "_DEFAULT_.equals(";
+ protected final String TEXT_1164 = ");";
+ protected final String TEXT_1165 = NL + "\t\t\t\treturn ";
+ protected final String TEXT_1166 = "_DEFAULT_ == null ? ";
+ protected final String TEXT_1167 = "() != null : !";
+ protected final String TEXT_1168 = "_DEFAULT_.equals(";
+ protected final String TEXT_1169 = "());";
+ protected final String TEXT_1170 = NL + "\t\t}";
+ protected final String TEXT_1171 = NL + "\t\treturn super.isSet(propertyIndex);";
+ protected final String TEXT_1172 = NL + "\t\treturn eDynamicIsSet(propertyIndex);";
+ protected final String TEXT_1173 = NL + "\t}" + NL;
+ protected final String TEXT_1174 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass)" + NL + "\t{";
+ protected final String TEXT_1175 = NL + "\t\tif (baseClass == ";
+ protected final String TEXT_1176 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID)" + NL + "\t\t\t{";
+ protected final String TEXT_1177 = NL + "\t\t\t\tcase ";
+ protected final String TEXT_1178 = ": return ";
+ protected final String TEXT_1179 = ";";
+ protected final String TEXT_1180 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_1181 = NL + "\t\treturn super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass)" + NL + "\t{";
+ protected final String TEXT_1182 = NL + "\t\tif (baseClass == ";
+ protected final String TEXT_1183 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{";
+ protected final String TEXT_1184 = NL + "\t\t\t\tcase ";
+ protected final String TEXT_1185 = ": return ";
+ protected final String TEXT_1186 = ";";
+ protected final String TEXT_1187 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_1188 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL;
+ protected final String TEXT_1189 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_1190 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setVirtualValues(Object[] newValues)" + NL + "\t{" + NL + "\t\t";
+ protected final String TEXT_1191 = " = newValues;" + NL + "\t}" + NL;
+ protected final String TEXT_1192 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int eVirtualIndexBits(int offset)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
+ protected final String TEXT_1193 = NL + "\t\t\tcase ";
+ protected final String TEXT_1194 = " :" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_1195 = ";";
+ protected final String TEXT_1196 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setVirtualIndexBits(int offset, int newIndexBits)" + NL + "\t{" + NL + "\t\tswitch (offset)" + NL + "\t\t{";
+ protected final String TEXT_1197 = NL + "\t\t\tcase ";
+ protected final String TEXT_1198 = " :" + NL + "\t\t\t\t";
+ protected final String TEXT_1199 = " = newIndexBits;" + NL + "\t\t\t\tbreak;";
+ protected final String TEXT_1200 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL;
+ protected final String TEXT_1201 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (isProxy(this)) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());";
+ protected final String TEXT_1202 = NL + "\t\tresult.append(\" (";
+ protected final String TEXT_1203 = ": \");";
+ protected final String TEXT_1204 = NL + "\t\tresult.append(\", ";
+ protected final String TEXT_1205 = ": \");";
+ protected final String TEXT_1206 = NL + "\t\tif (eVirtualIsSet(";
+ protected final String TEXT_1207 = ")) result.append(eVirtualGet(";
+ protected final String TEXT_1208 = ")); else result.append(\"<unset>\");";
+ protected final String TEXT_1209 = NL + "\t\tif (";
+ protected final String TEXT_1210 = "(";
+ protected final String TEXT_1211 = " & ";
+ protected final String TEXT_1212 = "_ESETFLAG) != 0";
+ protected final String TEXT_1213 = "_set_";
+ protected final String TEXT_1214 = ") result.append((";
+ protected final String TEXT_1215 = " & ";
+ protected final String TEXT_1216 = "_EFLAG) != 0); else result.append(\"<unset>\");";
+ protected final String TEXT_1217 = NL + "\t\tif (";
+ protected final String TEXT_1218 = "(";
+ protected final String TEXT_1219 = " & ";
+ protected final String TEXT_1220 = "_ESETFLAG) != 0";
+ protected final String TEXT_1221 = "_set_";
+ protected final String TEXT_1222 = ") result.append(";
+ protected final String TEXT_1223 = "); else result.append(\"<unset>\");";
+ protected final String TEXT_1224 = NL + "\t\tresult.append(eVirtualGet(";
+ protected final String TEXT_1225 = ", ";
+ protected final String TEXT_1226 = "_DEFAULT_";
+ protected final String TEXT_1227 = "));";
+ protected final String TEXT_1228 = NL + "\t\tresult.append((";
+ protected final String TEXT_1229 = " & ";
+ protected final String TEXT_1230 = "_EFLAG) != 0);";
+ protected final String TEXT_1231 = NL + "\t\tresult.append(";
+ protected final String TEXT_1232 = ");";
+ protected final String TEXT_1233 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL;
+ protected final String TEXT_1234 = NL + "\tpublic static class ConcreteBase extends ";
+ protected final String TEXT_1235 = NL + "\t{" + NL + "\t\tpublic ConcreteBase()" + NL + "\t\t{" + NL + "\t\t\tsuper();" + NL + "\t\t}" + NL + "\t}" + NL + "\t";
+ protected final String TEXT_1236 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int hash = -1;" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + " \t * @generated" + NL + " \t */" + NL + "\tpublic int getHash()" + NL + "\t{" + NL + "\t\tif (hash == -1)" + NL + "\t\t{" + NL + "\t\t\tObject theKey = getKey();" + NL + "\t\t\thash = (theKey == null ? 0 : theKey.hashCode());" + NL + "\t\t}" + NL + "\t\treturn hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * <!-- begin-user-doc -->" + NL + " \t * <!-- end-user-doc -->" + NL + " \t * @generated" + NL + " \t */" + NL + "\tpublic void setHash(int hash)" + NL + "\t{" + NL + "\t\tthis.hash = hash;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * <!-- begin-user-doc -->" + NL + " \t * <!-- end-user-doc -->" + NL + " \t * @generated" + NL + " \t */" + NL + "\tpublic Object getKey()" + NL + "\t{" + NL + " \t";
+ protected final String TEXT_1237 = NL + "\t\treturn new ";
+ protected final String TEXT_1238 = "(getTypedKey());" + NL + " \t";
+ protected final String TEXT_1239 = NL + "\t\treturn getTypedKey();" + NL + " \t";
+ protected final String TEXT_1240 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setKey(Object key)" + NL + "\t{";
+ protected final String TEXT_1241 = NL + "\t\tgetTypedKey().addAll((";
+ protected final String TEXT_1242 = ")key);";
+ protected final String TEXT_1243 = NL + "\t\tsetTypedKey(((";
+ protected final String TEXT_1244 = ")key).";
+ protected final String TEXT_1245 = "());";
+ protected final String TEXT_1246 = NL + "\t\tsetTypedKey((";
+ protected final String TEXT_1247 = ")key);";
+ protected final String TEXT_1248 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getValue()" + NL + "\t{" + NL + " \t";
+ protected final String TEXT_1249 = NL + "\t\treturn new ";
+ protected final String TEXT_1250 = "(getTypedValue());" + NL + " \t";
+ protected final String TEXT_1251 = NL + "\t\treturn getTypedValue();" + NL + " \t";
+ protected final String TEXT_1252 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object setValue(Object value)" + NL + "\t{" + NL + "\t\tObject oldValue = getValue();" + NL + " \t";
+ protected final String TEXT_1253 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll((";
+ protected final String TEXT_1254 = ")value);" + NL + " \t";
+ protected final String TEXT_1255 = NL + "\t\tsetTypedValue(((";
+ protected final String TEXT_1256 = ")value).";
+ protected final String TEXT_1257 = "());" + NL + " \t";
+ protected final String TEXT_1258 = NL + "\t\tsetTypedValue((";
+ protected final String TEXT_1259 = ")value);" + NL + " \t";
+ protected final String TEXT_1260 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_1261 = " getEMap()" + NL + "\t{" + NL + "\t\t";
+ protected final String TEXT_1262 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
+ protected final String TEXT_1263 = ")container.get(eContainmentFeature());" + NL + "\t}";
+ protected final String TEXT_1264 = NL + "} //";
+ protected final String TEXT_1265 = NL;
+
+ public String generate(Object argument)
+ {
+ final StringBuffer stringBuffer = new StringBuffer();
+
+/**
+ *
+ * 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.
+ */
+
+ GenClass genClass = (GenClass)((Object[])argument)[0]; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel();
+ boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);
+ boolean isDebug = false;
+ String publicStaticFinalFlag = isImplementation ? "public static final " : "";
+ /*
+ * Output preamble and javadoc header
+ */
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append("$");
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append("$");
+ stringBuffer.append(TEXT_4);
+ if (isInterface) {
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genPackage.getInterfacePackageName());
+ stringBuffer.append(TEXT_6);
+ } else {
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genPackage.getClassPackageName());
+ stringBuffer.append(TEXT_8);
+ }
+ stringBuffer.append(TEXT_9);
+ genModel.markImportLocation(stringBuffer, genPackage);
+ stringBuffer.append(TEXT_10);
+ if (isDebug) { // EYECATCHER 1
+ stringBuffer.append(TEXT_11);
+ }
+ if (isInterface) {
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(genClass.getFormattedName());
+ stringBuffer.append(TEXT_13);
+ if (genClass.hasDocumentation()) {
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer)));
+ stringBuffer.append(TEXT_15);
+ }
+ stringBuffer.append(TEXT_16);
+ if (!genClass.getGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_17);
+ for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genFeature.isSuppressedGetVisibility()) {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(genClass.getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_19);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_21);
+ }
+ }
+ stringBuffer.append(TEXT_22);
+ }
+ stringBuffer.append(TEXT_23);
+ if (!genModel.isSuppressEMFMetaData()) {
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(genClass.getClassifierAccessorName());
+ stringBuffer.append(TEXT_26);
+ }
+ if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append(modelInfo);
+ } else {
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append(modelInfo);
+ }} if (first) {
+ stringBuffer.append(TEXT_29);
+ }}
+ if (genClass.needsRootExtendsInterfaceExtendsTag()) { // does it need an @extends tag
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface()));
+ }
+ stringBuffer.append(TEXT_31);
+ } else {
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append(genClass.getFormattedName());
+ stringBuffer.append(TEXT_33);
+ if (!genClass.getImplementedGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_34);
+ for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ stringBuffer.append(TEXT_35);
+ stringBuffer.append(genClass.getQualifiedClassName());
+ stringBuffer.append(TEXT_36);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_37);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_38);
+ }
+ stringBuffer.append(TEXT_39);
+ }
+ stringBuffer.append(TEXT_40);
+ }
+ if (isImplementation) {
+ stringBuffer.append(TEXT_41);
+ if (genClass.isAbstract()) {
+ stringBuffer.append(TEXT_42);
+ }
+ stringBuffer.append(TEXT_43);
+ stringBuffer.append(genClass.getClassName());
+ stringBuffer.append(genClass.getClassExtends());
+ stringBuffer.append(genClass.getClassImplements());
+ } else {
+ stringBuffer.append(TEXT_44);
+ stringBuffer.append(genClass.getInterfaceName());
+ stringBuffer.append(genClass.getInterfaceExtends());
+ }
+ stringBuffer.append(TEXT_45);
+ if (genModel.getCopyrightText() != null) {
+ stringBuffer.append(TEXT_46);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append(genModel.getCopyrightText());
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_49);
+ }
+ if (isImplementation && genModel.getDriverNumber() != null) {
+ stringBuffer.append(TEXT_50);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append(genModel.getDriverNumber());
+ stringBuffer.append(TEXT_52);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_53);
+ }
+ if (isImplementation && genClass.isJavaIOSerializable()) {
+ stringBuffer.append(TEXT_54);
+ }
+ if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
+ if (eVirtualValuesField != null) {
+ stringBuffer.append(TEXT_55);
+ stringBuffer.append(eVirtualValuesField);
+ stringBuffer.append(TEXT_56);
+ }
+ { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());
+ if (!eVirtualIndexBitFields.isEmpty()) {
+ for (Iterator i = eVirtualIndexBitFields.iterator(); i.hasNext();) { String eVirtualIndexBitField = (String)i.next();
+ stringBuffer.append(TEXT_57);
+ stringBuffer.append(eVirtualIndexBitField);
+ stringBuffer.append(TEXT_58);
+ }
+ }
+ }
+ }
+ if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) {
+ stringBuffer.append(TEXT_59);
+ stringBuffer.append(genModel.getBooleanFlagsField());
+ stringBuffer.append(TEXT_60);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation()) {
+ stringBuffer.append(TEXT_61);
+ ClassImpl classImpl = (ClassImpl) genClass.getEcoreClass();
+ List declaredProperties = classImpl.getDeclaredProperties();
+ List extendedProperties = classImpl.getExtendedProperties();
+ int declaredPropertiesCount = 0;
+ int extendedPropertiesCount = 0;
+ for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
+ if (declaredProperties.contains(genFeature.getEcoreFeature())){
+ declaredPropertiesCount++;
+ String featureValue = "";
+ List allFeatures = genClass.getAllGenFeatures();
+ int g = allFeatures.indexOf(genFeature);
+ GenClass base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureValue = Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
+ } else {
+ int baseCount = base.getFeatureCount();
+ if (g < baseCount)
+ {
+ featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
+ } else {
+ String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
+ featureValue = baseCountID + " + " + Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
+ }
+ }
+ stringBuffer.append(TEXT_62);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_63);
+ stringBuffer.append(featureValue);
+ stringBuffer.append(TEXT_64);
+ } else if (extendedProperties.contains(genFeature.getEcoreFeature())){
+ extendedPropertiesCount++;
+ String featureValue = "";
+ List allFeatures = genClass.getAllGenFeatures();
+ int g = allFeatures.indexOf(genFeature);
+ GenClass base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureValue = Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
+ } else {
+ int baseCount = base.getFeatureCount();
+ if (g < baseCount)
+ {
+ featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
+ } else {
+ String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
+ featureValue = baseCountID + " + " + Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
+ }
+ }
+ stringBuffer.append(TEXT_65);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_66);
+ stringBuffer.append(featureValue);
+ stringBuffer.append(TEXT_67);
+ }
+ }
+ String featureCount = "";
+ GenClass base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureCount = Integer.toString(declaredPropertiesCount);
+ }
+ else {
+ String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
+ featureCount = baseCountID + " + " + Integer.toString(declaredPropertiesCount);
+ }
+ stringBuffer.append(TEXT_68);
+ stringBuffer.append(featureCount);
+ stringBuffer.append(TEXT_69);
+ featureCount = "";
+ base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureCount = Integer.toString(extendedPropertiesCount*-1);
+ }
+ else {
+ String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
+ featureCount = baseCountID + " - " + Integer.toString(extendedPropertiesCount);
+ }
+ stringBuffer.append(TEXT_70);
+ stringBuffer.append(featureCount);
+ stringBuffer.append(TEXT_71);
+ for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
+ stringBuffer.append(TEXT_72);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_73);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_74);
+ String featureValue = "";
+ List allFeatures = genClass.getAllGenFeatures();
+ int g = allFeatures.indexOf(genFeature);
+ base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureValue = Integer.toString(g);
+ } else {
+ int baseCount = base.getFeatureCount();
+ if (g < baseCount)
+ {
+ featureValue = base.getImportedClassName() + "._INTERNAL_" + genFeature.getUpperName();
+ } else {
+ String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
+ featureValue = baseCountID + " + " + Integer.toString(g - baseCount);
+ }
+ }
+ stringBuffer.append(TEXT_75);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_76);
+ stringBuffer.append(featureValue);
+ stringBuffer.append(TEXT_77);
+ }
+ stringBuffer.append(TEXT_78);
+ featureCount = "";
+ base = genClass.getBaseGenClass();
+ if (base == null)
+ {
+ featureCount = Integer.toString(genClass.getFeatureCount());
+ }
+ else {
+ String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
+ featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
+ }
+ stringBuffer.append(TEXT_79);
+ stringBuffer.append(featureCount);
+ stringBuffer.append(TEXT_80);
+ for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
+ stringBuffer.append(TEXT_81);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_82);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_83);
+ }
+ stringBuffer.append(TEXT_84);
+ for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (genFeature.isListType() || genFeature.isReferenceType()) {
+ if (genClass.isField(genFeature)) {
+ stringBuffer.append(TEXT_85);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_86);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_87);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_88);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_89);
+ stringBuffer.append(genModel.getImportedName(genFeature.getType()));
+ stringBuffer.append(TEXT_90);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_91);
+ }
+ if (genModel.isArrayAccessors() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
+ stringBuffer.append(TEXT_92);
+ stringBuffer.append(genFeature.getGetArrayAccessor());
+ stringBuffer.append(TEXT_93);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_94);
+ stringBuffer.append(genFeature.getGetArrayAccessor());
+ stringBuffer.append(TEXT_95);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_96);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_97);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_98);
+ }
+ } else {
+ if (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable())) {
+ stringBuffer.append(TEXT_99);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_100);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_101);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_102);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_103);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_104);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_105);
+ stringBuffer.append(SDOGenUtil.getStaticDefaultValue(genFeature));
+ stringBuffer.append(TEXT_106);
+ stringBuffer.append(genModel.getNonNLS(genFeature.getStaticDefaultValue()));
+ stringBuffer.append(TEXT_107);
+ }
+ if (genClass.isField(genFeature)) {
+ if (genClass.isFlag(genFeature)) {
+ if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) {
+ stringBuffer.append(TEXT_108);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_109);
+ }
+ stringBuffer.append(TEXT_110);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_111);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_112);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_113);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_114);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_115);
+ stringBuffer.append("<< " + genClass.getFlagIndex(genFeature) % 32 );
+ stringBuffer.append(TEXT_116);
+ } else {
+ stringBuffer.append(TEXT_117);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_118);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_119);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_120);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_121);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_122);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_123);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_124);
+ }
+ }
+ }
+ if (genClass.isESetField(genFeature)) {
+ if (genClass.isESetFlag(genFeature)) {
+ if (genClass.getESetFlagIndex(genFeature) > 31 && genClass.getESetFlagIndex(genFeature) % 32 == 0) {
+ stringBuffer.append(TEXT_125);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_126);
+ }
+ stringBuffer.append(TEXT_127);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_128);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_129);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_130);
+ stringBuffer.append("<< " + genClass.getESetFlagIndex(genFeature) % 32 );
+ stringBuffer.append(TEXT_131);
+ } else {
+ stringBuffer.append(TEXT_132);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_133);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_134);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_135);
+ }
+ }
+ }
+ //Class/declaredFieldGenFeature.override.javajetinc
+ }
+ if (isImplementation) { // create constructor
+ stringBuffer.append(TEXT_136);
+ stringBuffer.append(genClass.getClassName());
+ stringBuffer.append(TEXT_137);
+ for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ stringBuffer.append(TEXT_138);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_139);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_140);
+ }
+ if (SDOGenUtil.hasChangeSummaryProperty(genClass)) {
+ stringBuffer.append(TEXT_141);
+ stringBuffer.append(SDOGenUtil.getChangeSummaryProperty(genClass));
+ stringBuffer.append(TEXT_142);
+ }
+ stringBuffer.append(TEXT_143);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
+ stringBuffer.append(TEXT_144);
+ stringBuffer.append(genPackage.getImportedFactoryClassName());
+ stringBuffer.append(TEXT_145);
+ stringBuffer.append(genPackage.getImportedFactoryInterfaceName());
+ stringBuffer.append(TEXT_146);
+ stringBuffer.append(genClass.getClassifierAccessorName());
+ stringBuffer.append(TEXT_147);
+ }
+ /*
+ * Output getter and setter interfaces / impls
+ */
+
+ for (Iterator i=(isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures()).iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
+ stringBuffer.append(TEXT_148);
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_149);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_150);
+ stringBuffer.append(genFeature.getGetArrayAccessor());
+ stringBuffer.append(TEXT_151);
+ } else {
+ stringBuffer.append(TEXT_152);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_153);
+ stringBuffer.append(genFeature.getGetArrayAccessor());
+ stringBuffer.append(TEXT_154);
+ if (genFeature.isVolatile()) {
+ stringBuffer.append(TEXT_155);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
+ stringBuffer.append(TEXT_156);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
+ stringBuffer.append(TEXT_157);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_158);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_159);
+ } else {
+ stringBuffer.append(TEXT_160);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_161);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_162);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_163);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
+ stringBuffer.append(TEXT_164);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
+ stringBuffer.append(TEXT_165);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_166);
+ }
+ stringBuffer.append(TEXT_167);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_168);
+ }
+ stringBuffer.append(TEXT_169);
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_170);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_171);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_172);
+ } else {
+ stringBuffer.append(TEXT_173);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_174);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_175);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_176);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_177);
+ }
+ stringBuffer.append(TEXT_178);
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_179);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_180);
+ } else {
+ stringBuffer.append(TEXT_181);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_182);
+ if (genFeature.isVolatile()) {
+ stringBuffer.append(TEXT_183);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_184);
+ } else {
+ stringBuffer.append(TEXT_185);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_186);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_187);
+ }
+ stringBuffer.append(TEXT_188);
+ }
+ stringBuffer.append(TEXT_189);
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_190);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_191);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_192);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_193);
+ } else {
+ stringBuffer.append(TEXT_194);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_195);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_196);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_197);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
+ stringBuffer.append(TEXT_198);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_199);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_200);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_201);
+ }
+ stringBuffer.append(TEXT_202);
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_203);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_204);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_205);
+ } else {
+ stringBuffer.append(TEXT_206);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_207);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_208);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_209);
+ }
+ }
+ if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) {
+ if (isInterface) {
+ stringBuffer.append(TEXT_210);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_211);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_212);
+ if (genFeature.isListType()) {
+ if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature();
+ stringBuffer.append(TEXT_213);
+ if (keyFeature.isListType()) {
+ stringBuffer.append(TEXT_214);
+ stringBuffer.append(keyFeature.getQualifiedListItemType());
+ stringBuffer.append(TEXT_215);
+ } else {
+ stringBuffer.append(TEXT_216);
+ stringBuffer.append(keyFeature.getType());
+ stringBuffer.append(TEXT_217);
+ }
+ stringBuffer.append(TEXT_218);
+ if (valueFeature.isListType()) {
+ stringBuffer.append(TEXT_219);
+ stringBuffer.append(valueFeature.getQualifiedListItemType());
+ stringBuffer.append(TEXT_220);
+ } else {
+ stringBuffer.append(TEXT_221);
+ stringBuffer.append(valueFeature.getType());
+ stringBuffer.append(TEXT_222);
+ }
+ stringBuffer.append(TEXT_223);
+ } else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType()))) {
+ stringBuffer.append(TEXT_224);
+ stringBuffer.append(genFeature.getQualifiedListItemType());
+ stringBuffer.append(TEXT_225);
+ }
+ } else if (genFeature.isSetDefaultValue()) {
+ stringBuffer.append(TEXT_226);
+ stringBuffer.append(genFeature.getDefaultValue());
+ stringBuffer.append(TEXT_227);
+ }
+ if (genFeature.getTypeGenEnum() != null) {
+ stringBuffer.append(TEXT_228);
+ stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
+ stringBuffer.append(TEXT_229);
+ }
+ if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse();
+ if (!reverseGenFeature.isSuppressedGetVisibility()) {
+ stringBuffer.append(TEXT_230);
+ stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_231);
+ stringBuffer.append(reverseGenFeature.getGetAccessor());
+ stringBuffer.append(TEXT_232);
+ stringBuffer.append(reverseGenFeature.getFormattedName());
+ stringBuffer.append(TEXT_233);
+ }
+ }
+ stringBuffer.append(TEXT_234);
+ if (!genFeature.hasDocumentation()) {
+ stringBuffer.append(TEXT_235);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_236);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_237);
+ }
+ stringBuffer.append(TEXT_238);
+ if (genFeature.hasDocumentation()) {
+ stringBuffer.append(TEXT_239);
+ stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer)));
+ stringBuffer.append(TEXT_240);
+ }
+ stringBuffer.append(TEXT_241);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_242);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_243);
+ if (genFeature.getTypeGenEnum() != null) {
+ stringBuffer.append(TEXT_244);
+ stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
+ }
+ if (genFeature.isUnsettable()) {
+ if (!genFeature.isSuppressedIsSetVisibility()) {
+ stringBuffer.append(TEXT_245);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_246);
+ }
+ if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {
+ stringBuffer.append(TEXT_247);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_248);
+ }
+ }
+ if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {
+ stringBuffer.append(TEXT_249);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_250);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_251);
+ }
+ if (!genModel.isSuppressEMFMetaData()) {
+ stringBuffer.append(TEXT_252);
+ stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
+ stringBuffer.append(TEXT_253);
+ stringBuffer.append(genFeature.getFeatureAccessorName());
+ stringBuffer.append(TEXT_254);
+ }
+ if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse();
+ if (!reverseGenFeature.isSuppressedGetVisibility()) {
+ stringBuffer.append(TEXT_255);
+ stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_256);
+ stringBuffer.append(reverseGenFeature.getGetAccessor());
+ }
+ }
+ if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
+ stringBuffer.append(TEXT_257);
+ stringBuffer.append(modelInfo);
+ } else {
+ stringBuffer.append(TEXT_258);
+ stringBuffer.append(modelInfo);
+ }} if (first) {
+ stringBuffer.append(TEXT_259);
+ }}
+ stringBuffer.append(TEXT_260);
+ } else {
+ stringBuffer.append(TEXT_261);
+ }
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_262);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_263);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_264);
+ } else {
+ stringBuffer.append(TEXT_265);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_266);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_267);
+ if (genModel.isReflectiveDelegation()) {
+ stringBuffer.append(TEXT_268);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_269);
+ }
+ stringBuffer.append(TEXT_270);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_271);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_272);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_273);
+ stringBuffer.append(genFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_274);
+ }
+ stringBuffer.append(TEXT_275);
+ } else if (!genFeature.isVolatile()) {
+ if (genFeature.isListType()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_276);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_277);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_278);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_279);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_280);
+ }
+ stringBuffer.append(TEXT_281);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_282);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_283);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_284);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_285);
+ stringBuffer.append(genClass.getListConstructor(genFeature));
+ stringBuffer.append(TEXT_286);
+ } else {
+ if (genFeature.getType().equals("commonj.sdo.Sequence")){
+ stringBuffer.append(TEXT_287);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_288);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_289);
+ } else {
+ stringBuffer.append(TEXT_290);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_291);
+ stringBuffer.append(SDOGenUtil.getListKind(genFeature, genFeature.isUnsettable()));
+ stringBuffer.append(TEXT_292);
+ stringBuffer.append(genFeature.getListItemType());
+ stringBuffer.append(TEXT_293);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_294);
+ stringBuffer.append(genFeature.isBidirectional()?genFeature.getReverse().getUpperName():"0" );
+ stringBuffer.append(TEXT_295);
+ }}
+ stringBuffer.append(TEXT_296);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : "");
+ stringBuffer.append(TEXT_297);
+ } else if (genFeature.isContainer()) {
+ stringBuffer.append(TEXT_298);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_299);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_300);
+ } else {
+ if (genFeature.isResolveProxies()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_301);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_302);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_303);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_304);
+ stringBuffer.append(genFeature.getUpperName());
+ if (!genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_305);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_306);
+ }
+ stringBuffer.append(TEXT_307);
+ }
+ stringBuffer.append(TEXT_308);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_309);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_310);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_311);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_312);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_313);
+ stringBuffer.append(genFeature.getNonEObjectInternalTypeCast());
+ stringBuffer.append(TEXT_314);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_315);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_316);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_317);
+ if (genFeature.isEffectiveContains()) {
+ stringBuffer.append(TEXT_318);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_319);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_320);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_321);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_322);
+ if (!genFeature.isBidirectional()) {
+ stringBuffer.append(TEXT_323);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_324);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_325);
+ } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_326);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext"));
+ stringBuffer.append(TEXT_327);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_328);
+ stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
+ stringBuffer.append(TEXT_329);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_330);
+ }
+ stringBuffer.append(TEXT_331);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_332);
+ if (!genFeature.isBidirectional()) {
+ stringBuffer.append(TEXT_333);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_334);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_335);
+ } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_336);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_337);
+ stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
+ stringBuffer.append(TEXT_338);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_339);
+ }
+ stringBuffer.append(TEXT_340);
+ } else if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_341);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_342);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_343);
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_344);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_345);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_346);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_347);
+ }
+ stringBuffer.append(TEXT_348);
+ }
+ if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_349);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_350);
+ stringBuffer.append(genFeature.getUpperName());
+ if (!genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_351);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_352);
+ }
+ stringBuffer.append(TEXT_353);
+ } else if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_354);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_355);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_356);
+ } else {
+ stringBuffer.append(TEXT_357);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_358);
+ }
+ }
+ } else {//volatile
+ if (genFeature.isResolveProxies() && !genFeature.isListType()) {
+ stringBuffer.append(TEXT_359);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_360);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_361);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_362);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_363);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_364);
+ stringBuffer.append(genFeature.getNonEObjectInternalTypeCast());
+ stringBuffer.append(TEXT_365);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_366);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_367);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_368);
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // AAAA
+ if (genFeature.isFeatureMapType()) {
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_369);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_370);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_371);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_372);
+ } else {
+ stringBuffer.append(TEXT_373);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_374);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_375);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_376);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_377);
+ }
+ } else if (genFeature.isListType()) {
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_378);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_379);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_380);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_381);
+ } else {
+ stringBuffer.append(TEXT_382);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_383);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_384);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_385);
+ }
+ } else {
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_386);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_387);
+ }
+ stringBuffer.append(TEXT_388);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_389);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_390);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_391);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_392);
+ stringBuffer.append(genFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_393);
+ }
+ stringBuffer.append(TEXT_394);
+ } else {
+ stringBuffer.append(TEXT_395);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_396);
+ }
+ stringBuffer.append(TEXT_397);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_398);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_399);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_400);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_401);
+ stringBuffer.append(genFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_402);
+ }
+ stringBuffer.append(TEXT_403);
+ }
+ }
+ } else {
+ stringBuffer.append(TEXT_404);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_405);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_406);
+ //Class/getGenFeature.todo.override.javajetinc
+ }
+ }
+ stringBuffer.append(TEXT_407);
+ }
+ //Class/getGenFeature.override.javajetinc
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {
+ stringBuffer.append(TEXT_408);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_409);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_410);
+ if (genFeature.isContainer()) {
+ stringBuffer.append(TEXT_411);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_412);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_413);
+ } else if (!genFeature.isVolatile()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_414);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_415);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_416);
+ } else {
+ stringBuffer.append(TEXT_417);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_418);
+ }
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //BBBB
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_419);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_420);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_421);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_422);
+ } else {
+ stringBuffer.append(TEXT_423);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_424);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_425);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_426);
+ }
+ } else {
+ stringBuffer.append(TEXT_427);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_428);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_429);
+ //Class/basicGetGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_430);
+ //Class/basicGetGenFeature.override.javajetinc
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {
+ stringBuffer.append(TEXT_431);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_432);
+ stringBuffer.append(genFeature.getImportedInternalType());
+ stringBuffer.append(TEXT_433);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_434);
+ if (!genFeature.isVolatile()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_435);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_436);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_437);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_438);
+ } else {
+ stringBuffer.append(TEXT_439);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_440);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_441);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_442);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_443);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_444);
+ }
+ if (genFeature.isUnsettable()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_445);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_446);
+ } else if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_447);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_448);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_449);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_450);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_451);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_452);
+ } else {
+ stringBuffer.append(TEXT_453);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_454);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_455);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_456);
+ }
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_457);
+ if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_458);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_459);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_460);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_461);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_462);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_463);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_464);
+ } else {
+ stringBuffer.append(TEXT_465);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_466);
+ }
+ stringBuffer.append(TEXT_467);
+ } else {
+ stringBuffer.append(TEXT_468);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_469);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_470);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_471);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_472);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_473);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_474);
+ }
+ stringBuffer.append(TEXT_475);
+ }
+ stringBuffer.append(TEXT_476);
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //CCCC
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_477);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_478);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_479);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_480);
+ } else {
+ stringBuffer.append(TEXT_481);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_482);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_483);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_484);
+ }
+ } else {
+ stringBuffer.append(TEXT_485);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_486);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_487);
+ //Class/basicSetGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_488);
+ //Class/basicSetGenFeature.override.javajetinc
+ }
+ if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {
+ if (isInterface) {
+ stringBuffer.append(TEXT_489);
+ stringBuffer.append(genClass.getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_490);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_491);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_492);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_493);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_494);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_495);
+ if (genFeature.isEnumType()) {
+ stringBuffer.append(TEXT_496);
+ stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
+ }
+ if (genFeature.isUnsettable()) {
+ if (!genFeature.isSuppressedIsSetVisibility()) {
+ stringBuffer.append(TEXT_497);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_498);
+ }
+ if (!genFeature.isSuppressedUnsetVisibility()) {
+ stringBuffer.append(TEXT_499);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_500);
+ }
+ }
+ stringBuffer.append(TEXT_501);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_502);
+ } else {
+ stringBuffer.append(TEXT_503);
+ }
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_504);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_505);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_506);
+ } else {
+ stringBuffer.append(TEXT_507);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_508);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_509);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_510);
+ if (genModel.isReflectiveDelegation()) {
+ stringBuffer.append(TEXT_511);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_512);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_513);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_514);
+ }
+ stringBuffer.append(TEXT_515);
+ stringBuffer.append(genFeature.getCapName());
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_516);
+ }
+ stringBuffer.append(TEXT_517);
+ } else if (!genFeature.isVolatile()) {
+ if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_518);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_519);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_520);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_521);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil"));
+ stringBuffer.append(TEXT_522);
+ stringBuffer.append(genFeature.getEObjectCast());
+ stringBuffer.append(TEXT_523);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_524);
+ stringBuffer.append(genModel.getImportedName("java.lang.IllegalArgumentException"));
+ stringBuffer.append(TEXT_525);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_526);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_527);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_528);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_529);
+ stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
+ stringBuffer.append(TEXT_530);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_531);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_532);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_533);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_534);
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_535);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_536);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_537);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_538);
+ }
+ } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_539);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_540);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_541);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_542);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_543);
+ }
+ stringBuffer.append(TEXT_544);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_545);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_546);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_547);
+ if (!genFeature.isBidirectional()) {
+ stringBuffer.append(TEXT_548);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_549);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_550);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_551);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_552);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_553);
+ } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_554);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_555);
+ stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
+ stringBuffer.append(TEXT_556);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_557);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_558);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_559);
+ stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
+ stringBuffer.append(TEXT_560);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_561);
+ }
+ stringBuffer.append(TEXT_562);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_563);
+ stringBuffer.append(genFeature.getInternalTypeCast());
+ stringBuffer.append(TEXT_564);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_565);
+ if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_566);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_567);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_568);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_569);
+ } else if (genClass.isESetFlag(genFeature)) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_570);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_571);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_572);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_573);
+ }
+ stringBuffer.append(TEXT_574);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_575);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_576);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_577);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_578);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_579);
+ }
+ stringBuffer.append(TEXT_580);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_581);
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_582);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_583);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_584);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_585);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_586);
+ }
+ stringBuffer.append(TEXT_587);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_588);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_589);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_590);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_591);
+ }
+ }
+ } else {
+ if (genClass.isFlag(genFeature)) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_592);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_593);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_594);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_595);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_596);
+ }
+ stringBuffer.append(TEXT_597);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_598);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_599);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_600);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_601);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_602);
+ } else {
+ if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_603);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_604);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_605);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_606);
+ }
+ }
+ if (genFeature.isEnumType()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_607);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_608);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_609);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_610);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_611);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_612);
+ } else {
+ stringBuffer.append(TEXT_613);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_614);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_615);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_616);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_617);
+ }
+ } else {
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_618);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_619);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_620);
+ stringBuffer.append(genFeature.getInternalTypeCast());
+ stringBuffer.append(TEXT_621);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_622);
+ } else {
+ stringBuffer.append(TEXT_623);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_624);
+ stringBuffer.append(genFeature.getInternalTypeCast());
+ stringBuffer.append(TEXT_625);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_626);
+ }
+ }
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_627);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_628);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_629);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_630);
+ }
+ }
+ if (genFeature.isUnsettable()) {
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_631);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_632);
+ } else if (genClass.isESetFlag(genFeature)) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_633);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_634);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_635);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_636);
+ }
+ stringBuffer.append(TEXT_637);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_638);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_639);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_640);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_641);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_642);
+ }
+ stringBuffer.append(TEXT_643);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_644);
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_645);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_646);
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_647);
+ if (genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_648);
+ } else {
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_649);
+ }
+ stringBuffer.append(TEXT_650);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_651);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_652);
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_653);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(genFeature.getSafeName());
+ }
+ stringBuffer.append(TEXT_654);
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_655);
+ } else {
+ stringBuffer.append(TEXT_656);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_657);
+ }
+ stringBuffer.append(TEXT_658);
+ }
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_659);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_660);
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_661);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_662);
+ if (genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_663);
+ } else {
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_664);
+ }
+ stringBuffer.append(TEXT_665);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_666);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_667);
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_668);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(genFeature.getSafeName());
+ }
+ stringBuffer.append(TEXT_669);
+ }
+ }
+ }
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // DDDD
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_670);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_671);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_672);
+ if (genFeature.isPrimitiveType()){
+ stringBuffer.append(TEXT_673);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_674);
+ }
+ stringBuffer.append(TEXT_675);
+ stringBuffer.append(genFeature.getCapName());
+ if (genFeature.isPrimitiveType()){
+ stringBuffer.append(TEXT_676);
+ }
+ stringBuffer.append(TEXT_677);
+ } else {
+ stringBuffer.append(TEXT_678);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_679);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_680);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_681);
+ if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_682);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_683);
+ }
+ stringBuffer.append(TEXT_684);
+ stringBuffer.append(genFeature.getCapName());
+ if (genFeature.isPrimitiveType()){
+ stringBuffer.append(TEXT_685);
+ }
+ stringBuffer.append(TEXT_686);
+ }
+ } else {
+ stringBuffer.append(TEXT_687);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_688);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_689);
+ //Class/setGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_690);
+ }
+ //Class/setGenFeature.override.javajetinc
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {
+ stringBuffer.append(TEXT_691);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_692);
+ if (!genFeature.isVolatile()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_693);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_694);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_695);
+ } else {
+ stringBuffer.append(TEXT_696);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_697);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_698);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_699);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_700);
+ }
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_701);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_702);
+ } else if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_703);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_704);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_705);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_706);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_707);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_708);
+ } else {
+ stringBuffer.append(TEXT_709);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_710);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_711);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_712);
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_713);
+ if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_714);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_715);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_716);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_717);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_718);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_719);
+ } else {
+ stringBuffer.append(TEXT_720);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_721);
+ }
+ stringBuffer.append(TEXT_722);
+ } else {
+ stringBuffer.append(TEXT_723);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_724);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_725);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_726);
+ stringBuffer.append(genFeature.getCapName());
+ } else {
+ stringBuffer.append(TEXT_727);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_728);
+ }
+ stringBuffer.append(TEXT_729);
+ }
+ stringBuffer.append(TEXT_730);
+ } else {
+ stringBuffer.append(TEXT_731);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_732);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_733);
+ //Class/basicUnsetGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_734);
+ //Class.basicUnsetGenFeature.override.javajetinc
+ }
+ if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {
+ if (isInterface) {
+ stringBuffer.append(TEXT_735);
+ stringBuffer.append(genClass.getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_736);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_737);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_738);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_739);
+ if (!genFeature.isSuppressedIsSetVisibility()) {
+ stringBuffer.append(TEXT_740);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_741);
+ }
+ stringBuffer.append(TEXT_742);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_743);
+ if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {
+ stringBuffer.append(TEXT_744);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_745);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_746);
+ }
+ stringBuffer.append(TEXT_747);
+ } else {
+ stringBuffer.append(TEXT_748);
+ }
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_749);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_750);
+ } else {
+ stringBuffer.append(TEXT_751);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_752);
+ if (genModel.isReflectiveDelegation()) {
+ stringBuffer.append(TEXT_753);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_754);
+ } else if (!genFeature.isVolatile()) {
+ if (genFeature.isListType()) {
+ stringBuffer.append(TEXT_755);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
+ stringBuffer.append(TEXT_756);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_757);
+ } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_758);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_759);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_760);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_761);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_762);
+ }
+ stringBuffer.append(TEXT_763);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_764);
+ if (!genFeature.isBidirectional()) {
+ stringBuffer.append(TEXT_765);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_766);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_767);
+ } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_768);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_769);
+ stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
+ stringBuffer.append(TEXT_770);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_771);
+ }
+ stringBuffer.append(TEXT_772);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_773);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_774);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_775);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_776);
+ } else if (genClass.isESetFlag(genFeature)) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_777);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_778);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_779);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_780);
+ }
+ stringBuffer.append(TEXT_781);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_782);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_783);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_784);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_785);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_786);
+ }
+ stringBuffer.append(TEXT_787);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_788);
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_789);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_790);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_791);
+ }
+ stringBuffer.append(TEXT_792);
+ } else {
+ if (genClass.isFlag(genFeature)) {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_793);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_794);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_795);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_796);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_797);
+ }
+ } else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_798);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_799);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_800);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_801);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_802);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_803);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_804);
+ }
+ }
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_805);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_806);
+ } else if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_807);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_808);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_809);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_810);
+ } else {
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_811);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_812);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_813);
+ }
+ }
+ if (genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_814);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_815);
+ if (!genModel.isVirtualDelegation()) {
+ if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_816);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_817);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_818);
+ } else {
+ stringBuffer.append(TEXT_819);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_820);
+ }
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_821);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_822);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_823);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_824);
+ } else {
+ stringBuffer.append(TEXT_825);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_826);
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_827);
+ } else {
+ stringBuffer.append(TEXT_828);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_829);
+ }
+ stringBuffer.append(TEXT_830);
+ }
+ } else {
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_831);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_832);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_833);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_834);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_835);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_836);
+ } else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_837);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_838);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_839);
+ }
+ if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
+ if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_840);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_841);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_842);
+ } else {
+ stringBuffer.append(TEXT_843);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_844);
+ }
+ }
+ if (!genModel.isSuppressNotification()) {
+ stringBuffer.append(TEXT_845);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_846);
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_847);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_848);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_849);
+ } else {
+ stringBuffer.append(TEXT_850);
+ stringBuffer.append(genFeature.getCapName());
+ }
+ stringBuffer.append(TEXT_851);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_852);
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_853);
+ } else {
+ stringBuffer.append(TEXT_854);
+ stringBuffer.append(genFeature.getCapName());
+ stringBuffer.append(TEXT_855);
+ }
+ stringBuffer.append(TEXT_856);
+ }
+ }
+ }
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //EEEE
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_857);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_858);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_859);
+ } else {
+ stringBuffer.append(TEXT_860);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_861);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_862);
+ }
+ } else {
+ stringBuffer.append(TEXT_863);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_864);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_865);
+ //Class/unsetGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_866);
+ }
+ //Class/unsetGenFeature.override.javajetinc
+ }
+ if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {
+ if (isInterface) {
+ stringBuffer.append(TEXT_867);
+ stringBuffer.append(genClass.getQualifiedInterfaceName());
+ stringBuffer.append(TEXT_868);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_869);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_870);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_871);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_872);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_873);
+ if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {
+ stringBuffer.append(TEXT_874);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_875);
+ }
+ stringBuffer.append(TEXT_876);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_877);
+ if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {
+ stringBuffer.append(TEXT_878);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_879);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_880);
+ }
+ stringBuffer.append(TEXT_881);
+ } else {
+ stringBuffer.append(TEXT_882);
+ }
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_883);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_884);
+ } else {
+ stringBuffer.append(TEXT_885);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_886);
+ if (genModel.isReflectiveDelegation()) {
+ stringBuffer.append(TEXT_887);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_888);
+ } else if (!genFeature.isVolatile()) {
+ if (genFeature.isListType()) {
+ if (genModel.isVirtualDelegation()) {
+ stringBuffer.append(TEXT_889);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_890);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_891);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_892);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_893);
+ }
+ stringBuffer.append(TEXT_894);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_895);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
+ stringBuffer.append(TEXT_896);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_897);
+ } else {
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_898);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_899);
+ } else if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_900);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_901);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_902);
+ } else {
+ stringBuffer.append(TEXT_903);
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_904);
+ }
+ }
+ } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //FFFF
+ if (delegateFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_905);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_906);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_907);
+ } else {
+ stringBuffer.append(TEXT_908);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_909);
+ stringBuffer.append(delegateFeature.getAccessorName());
+ stringBuffer.append(TEXT_910);
+ stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
+ stringBuffer.append(TEXT_911);
+ }
+ } else {
+ stringBuffer.append(TEXT_912);
+ stringBuffer.append(genFeature.getFormattedName());
+ stringBuffer.append(TEXT_913);
+ stringBuffer.append(genFeature.getFeatureKind());
+ stringBuffer.append(TEXT_914);
+ //Class/isSetGenFeature.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_915);
+ }
+ //Class/isSetGenFeature.override.javajetinc
+ }
+ //Class/genFeature.override.javajetinc
+ }// end output getter and setter interfaces or impls
+ for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();
+ if (isInterface) {
+ stringBuffer.append(TEXT_916);
+ if (genOperation.hasDocumentation()) {
+ stringBuffer.append(TEXT_917);
+ stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
+ stringBuffer.append(TEXT_918);
+ }
+ if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
+ stringBuffer.append(TEXT_919);
+ stringBuffer.append(modelInfo);
+ } else {
+ stringBuffer.append(TEXT_920);
+ stringBuffer.append(modelInfo);
+ }} if (first) {
+ stringBuffer.append(TEXT_921);
+ }}
+ stringBuffer.append(TEXT_922);
+ } else {
+ stringBuffer.append(TEXT_923);
+ }
+ if (!isImplementation) {
+ stringBuffer.append(TEXT_924);
+ stringBuffer.append(genOperation.getImportedType());
+ stringBuffer.append(TEXT_925);
+ stringBuffer.append(genOperation.getName());
+ stringBuffer.append(TEXT_926);
+ stringBuffer.append(genOperation.getParameters());
+ stringBuffer.append(TEXT_927);
+ stringBuffer.append(genOperation.getThrows());
+ stringBuffer.append(TEXT_928);
+ } else {
+ stringBuffer.append(TEXT_929);
+ stringBuffer.append(genOperation.getImportedType());
+ stringBuffer.append(TEXT_930);
+ stringBuffer.append(genOperation.getName());
+ stringBuffer.append(TEXT_931);
+ stringBuffer.append(genOperation.getParameters());
+ stringBuffer.append(TEXT_932);
+ stringBuffer.append(genOperation.getThrows());
+ stringBuffer.append(TEXT_933);
+ if (genOperation.hasBody()) {
+ stringBuffer.append(TEXT_934);
+ stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer)));
+ } else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = ((GenParameter)genOperation.getGenParameters().get(0)).getName(); String context = ((GenParameter)genOperation.getGenParameters().get(1)).getName();
+ stringBuffer.append(TEXT_935);
+ stringBuffer.append(diagnostics);
+ stringBuffer.append(TEXT_936);
+ stringBuffer.append(diagnostics);
+ stringBuffer.append(TEXT_937);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
+ stringBuffer.append(TEXT_938);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
+ stringBuffer.append(TEXT_939);
+ stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
+ stringBuffer.append(TEXT_940);
+ stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
+ stringBuffer.append(TEXT_941);
+ stringBuffer.append(opClass.getOperationID(genOperation));
+ stringBuffer.append(TEXT_942);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
+ stringBuffer.append(TEXT_943);
+ stringBuffer.append(genOperation.getName());
+ stringBuffer.append(TEXT_944);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
+ stringBuffer.append(TEXT_945);
+ stringBuffer.append(context);
+ stringBuffer.append(TEXT_946);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
+ stringBuffer.append(TEXT_947);
+ } else {
+ stringBuffer.append(TEXT_948);
+ //Class/implementedGenOperation.todo.override.javajetinc
+ }
+ stringBuffer.append(TEXT_949);
+ }
+ //Class/implementedGenOperation.override.javajetinc
+ }//for
+ if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
+ stringBuffer.append(TEXT_950);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_951);
+ for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_952);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_953);
+ if (genFeature.isListType()) {
+ if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
+ stringBuffer.append(TEXT_954);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
+ stringBuffer.append(TEXT_955);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_956);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_957);
+ } else {
+ stringBuffer.append(TEXT_958);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
+ stringBuffer.append(TEXT_959);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_960);
+ }
+ } else if (genFeature.isContainer()) {
+ stringBuffer.append(TEXT_961);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_962);
+ } else {
+ if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_963);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_964);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_965);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_966);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_967);
+ }
+ stringBuffer.append(TEXT_968);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_969);
+ if (genFeature.isEffectiveContains()) {
+ stringBuffer.append(TEXT_970);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_971);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_972);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_973);
+ } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ stringBuffer.append(TEXT_974);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
+ stringBuffer.append(TEXT_975);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_976);
+ stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
+ stringBuffer.append(TEXT_977);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_978);
+ }
+ stringBuffer.append(TEXT_979);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_980);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_981);
+ }
+ }
+ }
+ stringBuffer.append(TEXT_982);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_983);
+ } else {
+ stringBuffer.append(TEXT_984);
+ }
+ stringBuffer.append(TEXT_985);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
+ stringBuffer.append(TEXT_986);
+ stringBuffer.append(genModel.getImportedName("java.lang.Object"));
+ stringBuffer.append(TEXT_987);
+ for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_988);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_989);
+ if (genFeature.isListType()) {
+ if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
+ stringBuffer.append(TEXT_990);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
+ stringBuffer.append(TEXT_991);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_992);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_993);
+ } else if (genFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_994);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_995);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_996);
+ } else {
+ stringBuffer.append(TEXT_997);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_998);
+ }
+ } else if (genFeature.isContainer()) {
+ stringBuffer.append(TEXT_999);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1000);
+ } else if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_1001);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1002);
+ } else {
+ stringBuffer.append(TEXT_1003);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1004);
+ }
+ }
+ }
+ stringBuffer.append(TEXT_1005);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1006);
+ } else {
+ stringBuffer.append(TEXT_1007);
+ }
+ stringBuffer.append(TEXT_1008);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
+ stringBuffer.append(TEXT_1009);
+ for (Iterator i=genClass.getEBasicRemoveFromContainerGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_1010);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1011);
+ stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
+ stringBuffer.append(TEXT_1012);
+ stringBuffer.append(targetClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_1013);
+ }
+ }
+ stringBuffer.append(TEXT_1014);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1015);
+ } else {
+ stringBuffer.append(TEXT_1016);
+ }
+ stringBuffer.append(TEXT_1017);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_1018);
+ for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_1019);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1020);
+ if (genFeature.isPrimitiveType()) {
+ if (genFeature.isBooleanType()) {
+ stringBuffer.append(TEXT_1021);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1022);
+ } else {
+ stringBuffer.append(TEXT_1023);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_1024);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1025);
+ }
+ } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
+ stringBuffer.append(TEXT_1026);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1027);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1028);
+ } else if (genFeature.isMapType()) {
+ if (genFeature.isEffectiveSuppressEMFTypes()) {
+ stringBuffer.append(TEXT_1029);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_1030);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1031);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1032);
+ } else {
+ stringBuffer.append(TEXT_1033);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1034);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1035);
+ }
+ } else if (genFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_1036);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1037);
+ } else if (genFeature.isFeatureMapType()) {
+ stringBuffer.append(TEXT_1038);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1039);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_1040);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1041);
+ } else {
+ stringBuffer.append(TEXT_1042);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1043);
+ }
+ }
+ }
+ stringBuffer.append(TEXT_1044);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1045);
+ } else {
+ stringBuffer.append(TEXT_1046);
+ }
+ stringBuffer.append(TEXT_1047);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
+ stringBuffer.append(TEXT_1048);
+ for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_1049);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1050);
+ if (genFeature.isListType()) {
+ if (genFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_1051);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1052);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1053);
+ } else if (genFeature.isFeatureMapType()) {
+ stringBuffer.append(TEXT_1054);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
+ stringBuffer.append(TEXT_1055);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1056);
+ } else if (genFeature.isMapType()) {
+ if (genFeature.isEffectiveSuppressEMFTypes()) {
+ stringBuffer.append(TEXT_1057);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
+ stringBuffer.append(TEXT_1058);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_1059);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1060);
+ } else {
+ stringBuffer.append(TEXT_1061);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
+ stringBuffer.append(TEXT_1062);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1063);
+ }
+ } else {
+ stringBuffer.append(TEXT_1064);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1065);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1066);
+ stringBuffer.append(genModel.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_1067);
+ }
+ } else if (genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1068);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1069);
+ stringBuffer.append(genFeature.getObjectType());
+ stringBuffer.append(TEXT_1070);
+ stringBuffer.append(genFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_1071);
+ } else {
+ stringBuffer.append(TEXT_1072);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1073);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1074);
+ }
+ stringBuffer.append(TEXT_1075);
+ }
+ }
+ stringBuffer.append(TEXT_1076);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1077);
+ } else {
+ stringBuffer.append(TEXT_1078);
+ }
+ stringBuffer.append(TEXT_1079);
+ for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_1080);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1081);
+ if (genFeature.isListType() && !genFeature.isUnsettable()) {
+ if (genFeature.isWrappedFeatureMapType()) {
+ stringBuffer.append(TEXT_1082);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1083);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1084);
+ } else {
+ stringBuffer.append(TEXT_1085);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1086);
+ }
+ } else if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_1087);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1088);
+ } else if (genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_1089);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1090);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1091);
+ } else {
+ stringBuffer.append(TEXT_1092);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1093);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1094);
+ }
+ stringBuffer.append(TEXT_1095);
+ }
+ }
+ stringBuffer.append(TEXT_1096);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1097);
+ } else {
+ stringBuffer.append(TEXT_1098);
+ }
+ stringBuffer.append(TEXT_1099);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_1100);
+ for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
+ if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
+ stringBuffer.append(TEXT_1101);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1102);
+ if (genFeature.isListType() && !genFeature.isUnsettable()) {
+ if (genFeature.isWrappedFeatureMapType()) {
+ if (genFeature.isVolatile()) {
+ stringBuffer.append(TEXT_1103);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1104);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1105);
+ } else {
+ stringBuffer.append(TEXT_1106);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1107);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1108);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1109);
+ }
+ } else {
+ if (genClass.isField(genFeature)) {
+ stringBuffer.append(TEXT_1110);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1111);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1112);
+ } else {
+ if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_1113);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1114);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1115);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1116);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1117);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1118);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1119);
+ } else {
+ stringBuffer.append(TEXT_1120);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1121);
+ }
+ }
+ }
+ } else if (genFeature.isUnsettable()) {
+ stringBuffer.append(TEXT_1122);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1123);
+ } else if (genFeature.isResolveProxies()) {
+ if (genClass.isField(genFeature)) {
+ stringBuffer.append(TEXT_1124);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1125);
+ } else {
+ if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_1126);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1127);
+ } else {
+ stringBuffer.append(TEXT_1128);
+ stringBuffer.append(genFeature.getAccessorName());
+ stringBuffer.append(TEXT_1129);
+ }
+ }
+ } else if (genFeature.isReferenceType()) {
+ if (genClass.isField(genFeature)) {
+ stringBuffer.append(TEXT_1130);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1131);
+ } else {
+ if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_1132);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1133);
+ } else {
+ stringBuffer.append(TEXT_1134);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1135);
+ }
+ }
+ } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
+ if (genClass.isField(genFeature)) {
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_1136);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_1137);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1138);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1139);
+ } else {
+ stringBuffer.append(TEXT_1140);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1141);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1142);
+ }
+ } else {
+ if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_1143);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1144);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1145);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1146);
+ } else {
+ stringBuffer.append(TEXT_1147);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1148);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1149);
+ }
+ }
+ } else {//datatype
+ if (genClass.isField(genFeature)) {
+ stringBuffer.append(TEXT_1150);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1151);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1152);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1153);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1154);
+ } else {
+ if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
+ stringBuffer.append(TEXT_1155);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1156);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1157);
+ stringBuffer.append(genFeature.getImportedType());
+ stringBuffer.append(TEXT_1158);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1159);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1160);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1161);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1162);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1163);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1164);
+ } else {
+ stringBuffer.append(TEXT_1165);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1166);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1167);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1168);
+ stringBuffer.append(genFeature.getGetAccessor());
+ stringBuffer.append(TEXT_1169);
+ }
+ }
+ }
+ }
+ }
+ stringBuffer.append(TEXT_1170);
+ if (genModel.isMinimalReflectiveMethods()) {
+ stringBuffer.append(TEXT_1171);
+ } else {
+ stringBuffer.append(TEXT_1172);
+ }
+ stringBuffer.append(TEXT_1173);
+ //Class/eIsSet.override.javajetinc
+ }
+ if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_1174);
+ for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next();
+ stringBuffer.append(TEXT_1175);
+ stringBuffer.append(mixinGenClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_1176);
+ for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
+ stringBuffer.append(TEXT_1177);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1178);
+ stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
+ stringBuffer.append(TEXT_1179);
+ }
+ stringBuffer.append(TEXT_1180);
+ }
+ stringBuffer.append(TEXT_1181);
+ for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next();
+ stringBuffer.append(TEXT_1182);
+ stringBuffer.append(mixinGenClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_1183);
+ for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
+ stringBuffer.append(TEXT_1184);
+ stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
+ stringBuffer.append(TEXT_1185);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1186);
+ }
+ stringBuffer.append(TEXT_1187);
+ }
+ stringBuffer.append(TEXT_1188);
+ }
+ if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
+ if (eVirtualValuesField != null) {
+ stringBuffer.append(TEXT_1189);
+ stringBuffer.append(eVirtualValuesField);
+ stringBuffer.append(TEXT_1190);
+ stringBuffer.append(eVirtualValuesField);
+ stringBuffer.append(TEXT_1191);
+ }
+ { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());
+ if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());
+ stringBuffer.append(TEXT_1192);
+ for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
+ stringBuffer.append(TEXT_1193);
+ stringBuffer.append(i);
+ stringBuffer.append(TEXT_1194);
+ stringBuffer.append(allEVirtualIndexBitFields.get(i));
+ stringBuffer.append(TEXT_1195);
+ }
+ stringBuffer.append(TEXT_1196);
+ for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
+ stringBuffer.append(TEXT_1197);
+ stringBuffer.append(i);
+ stringBuffer.append(TEXT_1198);
+ stringBuffer.append(allEVirtualIndexBitFields.get(i));
+ stringBuffer.append(TEXT_1199);
+ }
+ stringBuffer.append(TEXT_1200);
+ }
+ }
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
+ stringBuffer.append(TEXT_1201);
+ { boolean first = true;
+ for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();
+ if (first) { first = false;
+ stringBuffer.append(TEXT_1202);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_1203);
+ stringBuffer.append(genModel.getNonNLS());
+ } else {
+ stringBuffer.append(TEXT_1204);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_1205);
+ stringBuffer.append(genModel.getNonNLS());
+ }
+ if (genFeature.isUnsettable() && !genFeature.isListType()) {
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1206);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1207);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1208);
+ stringBuffer.append(genModel.getNonNLS());
+ } else {
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_1209);
+ if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_1210);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_1211);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1212);
+ } else {
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_1213);
+ }
+ stringBuffer.append(TEXT_1214);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_1215);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1216);
+ stringBuffer.append(genModel.getNonNLS());
+ } else {
+ stringBuffer.append(TEXT_1217);
+ if (genClass.isESetFlag(genFeature)) {
+ stringBuffer.append(TEXT_1218);
+ stringBuffer.append(genClass.getESetFlagsField(genFeature));
+ stringBuffer.append(TEXT_1219);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1220);
+ } else {
+ stringBuffer.append(genFeature.getUncapName());
+ stringBuffer.append(TEXT_1221);
+ }
+ stringBuffer.append(TEXT_1222);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1223);
+ stringBuffer.append(genModel.getNonNLS());
+ }
+ }
+ } else {
+ if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1224);
+ stringBuffer.append(genFeature.getUpperName());
+ if (!genFeature.isListType() && !genFeature.isReferenceType()){
+ stringBuffer.append(TEXT_1225);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1226);
+ }
+ stringBuffer.append(TEXT_1227);
+ } else {
+ if (genClass.isFlag(genFeature)) {
+ stringBuffer.append(TEXT_1228);
+ stringBuffer.append(genClass.getFlagsField(genFeature));
+ stringBuffer.append(TEXT_1229);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_1230);
+ } else {
+ stringBuffer.append(TEXT_1231);
+ stringBuffer.append(genFeature.getSafeName());
+ stringBuffer.append(TEXT_1232);
+ }
+ }
+ }
+ }
+ }
+ stringBuffer.append(TEXT_1233);
+ }
+ if (isImplementation && !genModel.isReflectiveDelegation() && genClass.isAbstract()) {
+ stringBuffer.append(TEXT_1234);
+ stringBuffer.append(genClass.getClassName());
+ stringBuffer.append(TEXT_1235);
+ }
+ if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
+ stringBuffer.append(TEXT_1236);
+ if (keyFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1237);
+ stringBuffer.append(keyFeature.getObjectType());
+ stringBuffer.append(TEXT_1238);
+ } else {
+ stringBuffer.append(TEXT_1239);
+ }
+ stringBuffer.append(TEXT_1240);
+ if (keyFeature.isListType()) {
+ stringBuffer.append(TEXT_1241);
+ stringBuffer.append(genModel.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_1242);
+ } else if (keyFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1243);
+ stringBuffer.append(keyFeature.getObjectType());
+ stringBuffer.append(TEXT_1244);
+ stringBuffer.append(keyFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_1245);
+ } else {
+ stringBuffer.append(TEXT_1246);
+ stringBuffer.append(keyFeature.getImportedType());
+ stringBuffer.append(TEXT_1247);
+ }
+ stringBuffer.append(TEXT_1248);
+ if (valueFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1249);
+ stringBuffer.append(valueFeature.getObjectType());
+ stringBuffer.append(TEXT_1250);
+ } else {
+ stringBuffer.append(TEXT_1251);
+ }
+ stringBuffer.append(TEXT_1252);
+ if (valueFeature.isListType()) {
+ stringBuffer.append(TEXT_1253);
+ stringBuffer.append(genModel.getImportedName("java.util.Collection"));
+ stringBuffer.append(TEXT_1254);
+ } else if (valueFeature.isPrimitiveType()) {
+ stringBuffer.append(TEXT_1255);
+ stringBuffer.append(valueFeature.getObjectType());
+ stringBuffer.append(TEXT_1256);
+ stringBuffer.append(valueFeature.getPrimitiveValueFunction());
+ stringBuffer.append(TEXT_1257);
+ } else {
+ stringBuffer.append(TEXT_1258);
+ stringBuffer.append(valueFeature.getImportedType());
+ stringBuffer.append(TEXT_1259);
+ }
+ stringBuffer.append(TEXT_1260);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_1261);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_1262);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
+ stringBuffer.append(TEXT_1263);
+ }
+ stringBuffer.append(TEXT_1264);
+ stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
+ // TODO fix the space above
+ genModel.emitSortedImports();
+ stringBuffer.append(TEXT_1265);
+ return stringBuffer.toString();
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
new file mode 100644
index 0000000000..4a86a29027
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
@@ -0,0 +1,1132 @@
+package org.apache.tuscany.sdo.generate.templates.model;
+
+import org.apache.tuscany.sdo.generate.util.*;
+import java.util.*;
+import org.eclipse.emf.codegen.ecore.genmodel.*;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.codegen.ecore.genmodel.impl.Literals;
+import org.eclipse.emf.ecore.util.*;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
+
+/**
+ * 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.
+ */
+ public class SDOFactoryClass
+ {
+ protected static String nl;
+ public static synchronized SDOFactoryClass create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ SDOFactoryClass result = new SDOFactoryClass();
+ nl = null;
+ return result;
+ }
+
+ protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "";
+ protected final String TEXT_2 = "/**" + NL + " * <copyright>" + NL + " * </copyright>" + NL + " *" + NL + " * ";
+ protected final String TEXT_3 = "Id";
+ protected final String TEXT_4 = NL + " */";
+ protected final String TEXT_5 = NL + "package ";
+ protected final String TEXT_6 = ";";
+ protected final String TEXT_7 = NL + "package ";
+ protected final String TEXT_8 = ";";
+ protected final String TEXT_9 = NL + NL + "import commonj.sdo.helper.HelperContext;" + NL + "import org.apache.tuscany.sdo.helper.HelperContextImpl;";
+ protected final String TEXT_10 = NL + "import org.apache.tuscany.sdo.helper.TypeHelperImpl;";
+ protected final String TEXT_11 = NL;
+ protected final String TEXT_12 = NL;
+ protected final String TEXT_13 = NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * The <b>Factory</b> for the model." + NL + " * It provides a create method for each non-abstract class of the model." + NL + " * <!-- end-user-doc -->";
+ protected final String TEXT_14 = NL + " * @see ";
+ protected final String TEXT_15 = NL + " * patternVersion=";
+ protected final String TEXT_16 = ";";
+ protected final String TEXT_17 = NL + " * @generated" + NL + " */";
+ protected final String TEXT_18 = NL + "/**" + NL + " * <!-- begin-user-doc -->" + NL + " * An implementation of the model <b>Factory</b>." + NL + " * Generator information:" + NL + " * patternVersion=";
+ protected final String TEXT_19 = ";";
+ protected final String TEXT_20 = NL + " * <!-- end-user-doc -->" + NL + " * @generated" + NL + " */";
+ protected final String TEXT_21 = NL + "public class ";
+ protected final String TEXT_22 = " extends ";
+ protected final String TEXT_23 = " implements ";
+ protected final String TEXT_24 = NL + "public interface ";
+ protected final String TEXT_25 = " extends ";
+ protected final String TEXT_26 = NL + "{";
+ protected final String TEXT_27 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_28 = " copyright = \"";
+ protected final String TEXT_29 = "\";";
+ protected final String TEXT_30 = NL;
+ protected final String TEXT_31 = NL;
+ protected final String TEXT_32 = NL + "\t/**" + NL + "\t * The singleton instance of the factory." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_33 = " INSTANCE = ";
+ protected final String TEXT_34 = ".init();" + NL;
+ protected final String TEXT_35 = NL + "\t/**" + NL + "\t * The singleton instance of the factory." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_36 = " eINSTANCE = ";
+ protected final String TEXT_37 = ".init();" + NL;
+ protected final String TEXT_38 = NL + "\t/**" + NL + "\t * The package namespace URI." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_39 = " NAMESPACE_URI = \"";
+ protected final String TEXT_40 = "\";";
+ protected final String TEXT_41 = NL + NL + "\t/**" + NL + "\t * The package namespace name." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_42 = " NAMESPACE_PREFIX = \"";
+ protected final String TEXT_43 = "\";";
+ protected final String TEXT_44 = NL + NL + "\t/**" + NL + "\t * The version of the generator pattern used to generate this class." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_45 = " PATTERN_VERSION = \"";
+ protected final String TEXT_46 = "\";" + NL;
+ protected final String TEXT_47 = "\t" + NL + "\t";
+ protected final String TEXT_48 = "int ";
+ protected final String TEXT_49 = " = ";
+ protected final String TEXT_50 = ";";
+ protected final String TEXT_51 = NL + "\t";
+ protected final String TEXT_52 = NL + "\t/**" + NL + "\t * Creates an instance of the factory." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_53 = "()" + NL + "\t{" + NL + "\t\tsuper(NAMESPACE_URI, NAMESPACE_PREFIX, \"";
+ protected final String TEXT_54 = "\");" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Registers the Factory instance so that it is available within the supplied scope." + NL + " * @argument scope a HelperContext instance that will make the types supported by this Factory available." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void register(HelperContext scope) " + NL + "\t{" + NL + "\t\tif(scope == null) {" + NL + "\t\t\tthrow new IllegalArgumentException(\"Scope can not be null\");" + NL + "\t\t}" + NL + "" + NL + "\t\tif (((HelperContextImpl)scope).getExtendedMetaData().getPackage(NAMESPACE_URI) != null)" + NL + "\t\t\treturn;" + NL + " " + NL + "\t\t// Register this package with provided scope " + NL + "\t\t((HelperContextImpl)scope).getExtendedMetaData().putPackage(NAMESPACE_URI, this);" + NL + "\t\t" + NL + "\t\t//Register dependent packages with provided scope";
+ protected final String TEXT_55 = NL + "\t\t";
+ protected final String TEXT_56 = ".INSTANCE.register(scope);";
+ protected final String TEXT_57 = NL + " }" + NL + "\t" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_58 = " create(int typeNumber)" + NL + "\t{" + NL + "\t\tswitch (typeNumber)" + NL + "\t\t{";
+ protected final String TEXT_59 = NL + "\t\t\tcase ";
+ protected final String TEXT_60 = ": return (";
+ protected final String TEXT_61 = ")create";
+ protected final String TEXT_62 = "();";
+ protected final String TEXT_63 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn super.create(typeNumber);" + NL + "\t\t}" + NL + "\t}" + NL;
+ protected final String TEXT_64 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object createFromString(int typeNumber, String initialValue)" + NL + "\t{" + NL + "\t\tswitch (typeNumber)" + NL + "\t\t{";
+ protected final String TEXT_65 = NL + "\t\t\tcase ";
+ protected final String TEXT_66 = ":" + NL + "\t\t\t\treturn create";
+ protected final String TEXT_67 = "FromString(initialValue);";
+ protected final String TEXT_68 = NL + "\t\t\tdefault:" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"The type number '\" + typeNumber + \"' is not a valid datatype\");";
+ protected final String TEXT_69 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convertToString(int typeNumber, Object instanceValue)" + NL + "\t{" + NL + "\t\tswitch (typeNumber)" + NL + "\t\t{";
+ protected final String TEXT_70 = NL + "\t\t\tcase ";
+ protected final String TEXT_71 = ":" + NL + "\t\t\t\treturn convert";
+ protected final String TEXT_72 = "ToString(instanceValue);";
+ protected final String TEXT_73 = NL + "\t\t\tdefault:" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"The type number '\" + typeNumber + \"' is not a valid datatype\");";
+ protected final String TEXT_74 = NL + "\t\t}" + NL + "\t}";
+ protected final String TEXT_75 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_76 = " create";
+ protected final String TEXT_77 = "()" + NL + "\t{";
+ protected final String TEXT_78 = NL + "\t\t";
+ protected final String TEXT_79 = " ";
+ protected final String TEXT_80 = " = ";
+ protected final String TEXT_81 = "super.create(";
+ protected final String TEXT_82 = ");";
+ protected final String TEXT_83 = NL + "\t\t";
+ protected final String TEXT_84 = " ";
+ protected final String TEXT_85 = " = new ";
+ protected final String TEXT_86 = "()";
+ protected final String TEXT_87 = "{}";
+ protected final String TEXT_88 = ";";
+ protected final String TEXT_89 = NL + "\t\treturn ";
+ protected final String TEXT_90 = ";" + NL + "\t}";
+ protected final String TEXT_91 = NL + "\t" + NL + "\t// Following creates and initializes SDO metadata for the supported types.";
+ protected final String TEXT_92 = "\t";
+ protected final String TEXT_93 = "\t" + NL + "\tprotected ";
+ protected final String TEXT_94 = " ";
+ protected final String TEXT_95 = "Type = null;" + NL + "" + NL + "\tpublic ";
+ protected final String TEXT_96 = " get";
+ protected final String TEXT_97 = "()" + NL + "\t{" + NL + "\t\treturn ";
+ protected final String TEXT_98 = "Type;" + NL + "\t}" + NL;
+ protected final String TEXT_99 = "\t" + NL + "" + NL + "\tprivate static ";
+ protected final String TEXT_100 = " instance = null; " + NL + "\tpublic static ";
+ protected final String TEXT_101 = " init()" + NL + "\t{" + NL + "\t\tif (instance != null ) return instance;" + NL + "\t\tinstance = new ";
+ protected final String TEXT_102 = "();" + NL + "" + NL + "\t\t// Create package meta-data objects" + NL + "\t\tinstance.createMetaData();" + NL + "" + NL + "\t\t// Initialize created meta-data" + NL + "\t\tinstance.initializeMetaData();" + NL + "\t\t" + NL + "\t\t// Mark meta-data to indicate it can't be changed" + NL + "\t\t//the";
+ protected final String TEXT_103 = ".freeze(); //FB do we need to freeze / should we freeze ????" + NL + "" + NL + "\t\treturn instance;" + NL + "\t}" + NL + " " + NL + "\tprivate boolean isCreated = false;" + NL + "" + NL + "\tpublic void createMetaData()" + NL + "\t{" + NL + "\t\tif (isCreated) return;" + NL + "\t\tisCreated = true;";
+ protected final String TEXT_104 = "\t" + NL + "" + NL + "\t\t// Create types and their properties";
+ protected final String TEXT_105 = NL + "\t\t";
+ protected final String TEXT_106 = "Type = createType(false, ";
+ protected final String TEXT_107 = ");";
+ protected final String TEXT_108 = NL + "\t\tcreateProperty(";
+ protected final String TEXT_109 = ", ";
+ protected final String TEXT_110 = "Type,";
+ protected final String TEXT_111 = "._INTERNAL_";
+ protected final String TEXT_112 = "); ";
+ protected final String TEXT_113 = NL + NL + "\t\t// Create data types";
+ protected final String TEXT_114 = NL + "\t\t";
+ protected final String TEXT_115 = "Type = createType(true, ";
+ protected final String TEXT_116 = " );";
+ protected final String TEXT_117 = NL + "\t}" + NL + "\t" + NL + "\tprivate boolean isInitialized = false;" + NL + "" + NL + "\tpublic void initializeMetaData()" + NL + "\t{" + NL + "\t\tif (isInitialized) return;" + NL + "\t\tisInitialized = true;";
+ protected final String TEXT_118 = NL + NL + "\t\t// Obtain other dependent packages";
+ protected final String TEXT_119 = NL + "\t\t";
+ protected final String TEXT_120 = " ";
+ protected final String TEXT_121 = " = (";
+ protected final String TEXT_122 = ")";
+ protected final String TEXT_123 = ".init();";
+ protected final String TEXT_124 = NL + "\t\t";
+ protected final String TEXT_125 = " property = null;" + NL + "" + NL + "\t\t// Add supertypes to types";
+ protected final String TEXT_126 = NL + "\t\taddSuperType(";
+ protected final String TEXT_127 = "Type, ";
+ protected final String TEXT_128 = ".get";
+ protected final String TEXT_129 = "());";
+ protected final String TEXT_130 = NL + NL + "\t\t// Initialize types and properties";
+ protected final String TEXT_131 = NL + "\t\tinitializeType(";
+ protected final String TEXT_132 = "Type, ";
+ protected final String TEXT_133 = ".class, \"";
+ protected final String TEXT_134 = "\", ";
+ protected final String TEXT_135 = ");";
+ protected final String TEXT_136 = NL + "\t\tsetInstanceProperty (";
+ protected final String TEXT_137 = "Type, \"";
+ protected final String TEXT_138 = "\", ";
+ protected final String TEXT_139 = ", ";
+ protected final String TEXT_140 = ");";
+ protected final String TEXT_141 = NL + "\t\tproperty = getLocalProperty(";
+ protected final String TEXT_142 = "Type, ";
+ protected final String TEXT_143 = ");";
+ protected final String TEXT_144 = NL + "\t\tinitializeProperty(property, ";
+ protected final String TEXT_145 = ", \"";
+ protected final String TEXT_146 = "\", ";
+ protected final String TEXT_147 = ", ";
+ protected final String TEXT_148 = ", ";
+ protected final String TEXT_149 = ", ";
+ protected final String TEXT_150 = ", ";
+ protected final String TEXT_151 = ", ";
+ protected final String TEXT_152 = ", ";
+ protected final String TEXT_153 = ", ";
+ protected final String TEXT_154 = " , ";
+ protected final String TEXT_155 = ");";
+ protected final String TEXT_156 = NL + "\t\tinitializeProperty(property, ";
+ protected final String TEXT_157 = ", \"";
+ protected final String TEXT_158 = "\", ";
+ protected final String TEXT_159 = ", ";
+ protected final String TEXT_160 = ", ";
+ protected final String TEXT_161 = ", ";
+ protected final String TEXT_162 = ", ";
+ protected final String TEXT_163 = ", ";
+ protected final String TEXT_164 = ", ";
+ protected final String TEXT_165 = ");";
+ protected final String TEXT_166 = NL + "\t\tsetInstanceProperty (property, \"";
+ protected final String TEXT_167 = "\", ";
+ protected final String TEXT_168 = ", ";
+ protected final String TEXT_169 = ");";
+ protected final String TEXT_170 = NL;
+ protected final String TEXT_171 = NL + "\t\t// Initialize data types";
+ protected final String TEXT_172 = NL + "\t\tinitializeType(";
+ protected final String TEXT_173 = "Type, ";
+ protected final String TEXT_174 = ".class, \"";
+ protected final String TEXT_175 = "\", ";
+ protected final String TEXT_176 = ", ";
+ protected final String TEXT_177 = ");";
+ protected final String TEXT_178 = NL + "\t\tsetInstanceProperty (";
+ protected final String TEXT_179 = "Type, \"";
+ protected final String TEXT_180 = "\", ";
+ protected final String TEXT_181 = ", ";
+ protected final String TEXT_182 = ");";
+ protected final String TEXT_183 = NL;
+ protected final String TEXT_184 = NL + "\t\tcreateXSDMetaData(";
+ protected final String TEXT_185 = ");" + NL + "\t}" + NL + "\t " + NL + "\tprotected void createXSDMetaData(";
+ protected final String TEXT_186 = ")" + NL + "\t{" + NL + "\t\tsuper.initXSD();" + NL + "\t\t" + NL + "\t\t";
+ protected final String TEXT_187 = " property = null;" + NL + "\t\t";
+ protected final String TEXT_188 = NL + "\t\taddXSDMapping" + NL + "\t\t (new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_189 = NL + "\t\t\t ";
+ protected final String TEXT_190 = ", ";
+ protected final String TEXT_191 = NL + "\t\t\t }," + NL + "\t\t\t \"";
+ protected final String TEXT_192 = "\");" + NL;
+ protected final String TEXT_193 = NL;
+ protected final String TEXT_194 = NL + "\t\taddXSDMapping" + NL + "\t\t (";
+ protected final String TEXT_195 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
+ protected final String TEXT_196 = NL + "\t\t\t ";
+ protected final String TEXT_197 = ", ";
+ protected final String TEXT_198 = NL + "\t\t\t });" + NL;
+ protected final String TEXT_199 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t (\"";
+ protected final String TEXT_200 = "\"," + NL + "\t\t ";
+ protected final String TEXT_201 = ".get";
+ protected final String TEXT_202 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_203 = NL + "\t\t\t ";
+ protected final String TEXT_204 = ", ";
+ protected final String TEXT_205 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
+ protected final String TEXT_206 = NL + "\t\t\t });";
+ protected final String TEXT_207 = NL + " ";
+ protected final String TEXT_208 = NL + "\t\tsetInstanceProperty" + NL + "\t\t (property," + NL + "\t\t\t \"";
+ protected final String TEXT_209 = "\"," + NL + "\t\t\t ";
+ protected final String TEXT_210 = ", ";
+ protected final String TEXT_211 = ");";
+ protected final String TEXT_212 = NL + " ";
+ protected final String TEXT_213 = " ";
+ protected final String TEXT_214 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getLocalProperty(";
+ protected final String TEXT_215 = "Type, ";
+ protected final String TEXT_216 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
+ protected final String TEXT_217 = NL + "\t\t\t ";
+ protected final String TEXT_218 = ", ";
+ protected final String TEXT_219 = NL + "\t\t\t });" + NL;
+ protected final String TEXT_220 = NL + " }" + NL + " ";
+ protected final String TEXT_221 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_222 = " create";
+ protected final String TEXT_223 = "FromString(String initialValue)" + NL + "\t{";
+ protected final String TEXT_224 = NL + "\t\t";
+ protected final String TEXT_225 = " result = ";
+ protected final String TEXT_226 = ".get(initialValue);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + type.getName() + \"'\");";
+ protected final String TEXT_227 = NL + "\t\treturn result;";
+ protected final String TEXT_228 = NL + "\t\treturn (";
+ protected final String TEXT_229 = ")create";
+ protected final String TEXT_230 = "FromString(initialValue);";
+ protected final String TEXT_231 = NL + "\t\treturn (";
+ protected final String TEXT_232 = ")";
+ protected final String TEXT_233 = ".create";
+ protected final String TEXT_234 = "FromString(initialValue);";
+ protected final String TEXT_235 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_236 = " result = new ";
+ protected final String TEXT_237 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_238 = " stringTokenizer = new ";
+ protected final String TEXT_239 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
+ protected final String TEXT_240 = NL + "\t\t\tresult.add(create";
+ protected final String TEXT_241 = "FromString(item));";
+ protected final String TEXT_242 = NL + "\t\t\tresult.add(";
+ protected final String TEXT_243 = ".create";
+ protected final String TEXT_244 = "FromString(item));";
+ protected final String TEXT_245 = NL + "\t\t}" + NL + "\t\treturn result;";
+ protected final String TEXT_246 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_247 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
+ protected final String TEXT_248 = NL + "\t\ttry" + NL + "\t\t{";
+ protected final String TEXT_249 = NL + "\t\t\tresult = (";
+ protected final String TEXT_250 = ")create";
+ protected final String TEXT_251 = "FromString(initialValue);";
+ protected final String TEXT_252 = NL + "\t\t\tresult = (";
+ protected final String TEXT_253 = ")";
+ protected final String TEXT_254 = ".create";
+ protected final String TEXT_255 = "FromString(initialValue);";
+ protected final String TEXT_256 = NL + "\t\t\tif (result != null/* && Diagnostician.INSTANCE.validate(type, result, null, null)*/)" + NL + "\t\t\t{" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (RuntimeException e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t}";
+ protected final String TEXT_257 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;";
+ protected final String TEXT_258 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
+ protected final String TEXT_259 = "();";
+ protected final String TEXT_260 = NL + "\t\treturn (";
+ protected final String TEXT_261 = ")super.createFromString(";
+ protected final String TEXT_262 = ", initialValue);";
+ protected final String TEXT_263 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert";
+ protected final String TEXT_264 = "ToString(Object instanceValue)" + NL + "\t{";
+ protected final String TEXT_265 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
+ protected final String TEXT_266 = NL + "\t\treturn convert";
+ protected final String TEXT_267 = "ToString(instanceValue);";
+ protected final String TEXT_268 = NL + "\t\treturn ";
+ protected final String TEXT_269 = ".convert";
+ protected final String TEXT_270 = "ToString(instanceValue);";
+ protected final String TEXT_271 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
+ protected final String TEXT_272 = " list = (";
+ protected final String TEXT_273 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
+ protected final String TEXT_274 = " result = new ";
+ protected final String TEXT_275 = "();" + NL + "\t\tfor (";
+ protected final String TEXT_276 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
+ protected final String TEXT_277 = NL + "\t\t\tresult.append(convert";
+ protected final String TEXT_278 = "ToString(i.next()));";
+ protected final String TEXT_279 = NL + "\t\t\tresult.append(";
+ protected final String TEXT_280 = ".convert";
+ protected final String TEXT_281 = "ToString(i.next()));";
+ protected final String TEXT_282 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
+ protected final String TEXT_283 = NL + "\t\tif (instanceValue == null) return null;";
+ protected final String TEXT_284 = NL + "\t\tif (";
+ protected final String TEXT_285 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
+ protected final String TEXT_286 = NL + "\t\t\t\tString value = convert";
+ protected final String TEXT_287 = "ToString(instanceValue);";
+ protected final String TEXT_288 = NL + "\t\t\t\tString value = ";
+ protected final String TEXT_289 = ".convert";
+ protected final String TEXT_290 = "ToString(instanceValue);";
+ protected final String TEXT_291 = NL + "\t\t\t\tif (value != null) return value;" + NL + "\t\t\t}" + NL + "\t\t\tcatch (Exception e)" + NL + "\t\t\t{" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_292 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
+ protected final String TEXT_293 = "\");";
+ protected final String TEXT_294 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
+ protected final String TEXT_295 = "();";
+ protected final String TEXT_296 = NL + "\t\treturn super.convertToString(";
+ protected final String TEXT_297 = ", instanceValue);";
+ protected final String TEXT_298 = NL + "\t}" + NL;
+ protected final String TEXT_299 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
+ protected final String TEXT_300 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
+ protected final String TEXT_301 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_302 = " create";
+ protected final String TEXT_303 = "();" + NL;
+ protected final String TEXT_304 = NL + " /**" + NL + " * Registers the types supported by this Factory within the supplied scope.argument" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param scope an instance of HelperContext used to manage the scoping of types." + NL + "\t * @generated" + NL + " */" + NL + " public void register(HelperContext scope);" + NL + " ";
+ protected final String TEXT_305 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
+ protected final String TEXT_306 = "</em>' corresponding the given literal." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param literal a literal of the data type." + NL + "\t * @return a new instance value of the data type." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
+ protected final String TEXT_307 = " create";
+ protected final String TEXT_308 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
+ protected final String TEXT_309 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @param instanceValue an instance value of the data type." + NL + "\t * @return a literal representation of the instance value." + NL + "\t * @generated" + NL + "\t */" + NL + "\tString convert";
+ protected final String TEXT_310 = "(";
+ protected final String TEXT_311 = " instanceValue);" + NL;
+ protected final String TEXT_312 = NL + "} //";
+ protected final String TEXT_313 = NL;
+
+ public String generate(Object argument)
+ {
+ final StringBuffer stringBuffer = new StringBuffer();
+
+/**
+ *
+ * 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.
+ */
+
+ GenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel();
+ boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);
+ String factoryPatternVersion = "1.2";
+ String publicStaticFinalFlag = isImplementation ? "public static final " : "";
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append("$");
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append("$");
+ stringBuffer.append(TEXT_4);
+ if (isInterface || genModel.isSuppressInterfaces()) {
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(genPackage.getReflectionPackageName());
+ stringBuffer.append(TEXT_6);
+ } else {
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(genPackage.getClassPackageName());
+ stringBuffer.append(TEXT_8);
+ }
+ stringBuffer.append(TEXT_9);
+ if (!isInterface || genModel.isSuppressInterfaces()) {
+ stringBuffer.append(TEXT_10);
+ }
+ stringBuffer.append(TEXT_11);
+ if (isImplementation) {
+ if (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");
+ }
+ genModel.markImportLocation(stringBuffer);
+ stringBuffer.append(TEXT_12);
+ if (isInterface) {
+ stringBuffer.append(TEXT_13);
+ if (!genModel.isSuppressEMFMetaData()) {
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
+ }
+ if (genModel.isSuppressInterfaces()) {
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(factoryPatternVersion);
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append(SDOGenUtil.printArguments(genPackage, genModel) );
+ }
+ stringBuffer.append(TEXT_17);
+ } else {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append(factoryPatternVersion);
+ stringBuffer.append(TEXT_19);
+ stringBuffer.append(SDOGenUtil.printArguments(genPackage, genModel) );
+ stringBuffer.append(TEXT_20);
+ }
+ if (isImplementation) {
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append(genPackage.getFactoryClassName());
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.impl.FactoryBase"));
+ if (!genModel.isSuppressInterfaces()) {
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append(genPackage.getImportedFactoryInterfaceName());
+ }
+ } else {
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append(genPackage.getFactoryInterfaceName());
+ if (!genModel.isSuppressEMFMetaData()) {
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EFactory"));
+ }
+ }
+ stringBuffer.append(TEXT_26);
+ if (genModel.getCopyrightText() != null) {
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append(genModel.getCopyrightText());
+ stringBuffer.append(TEXT_29);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_30);
+ }
+ stringBuffer.append(TEXT_31);
+ if (isInterface && genModel.isSuppressEMFMetaData()) {
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genPackage.getFactoryInterfaceName());
+ stringBuffer.append(TEXT_33);
+ stringBuffer.append(genPackage.getQualifiedFactoryClassName());
+ stringBuffer.append(TEXT_34);
+ } else if (isInterface && !genModel.isSuppressInterfaces()) {
+ stringBuffer.append(TEXT_35);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genPackage.getFactoryInterfaceName());
+ stringBuffer.append(TEXT_36);
+ stringBuffer.append(genPackage.getQualifiedFactoryClassName());
+ stringBuffer.append(TEXT_37);
+ }
+ if (isImplementation) {
+ stringBuffer.append(TEXT_38);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append(genPackage.getNSURI());
+ stringBuffer.append(TEXT_40);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_42);
+ stringBuffer.append(genPackage.getNSName());
+ stringBuffer.append(TEXT_43);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(TEXT_44);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(genModel.getImportedName("java.lang.String"));
+ stringBuffer.append(TEXT_45);
+ stringBuffer.append(factoryPatternVersion);
+ stringBuffer.append(TEXT_46);
+ int genIndex = 1;
+for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();
+ if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) {
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append(publicStaticFinalFlag);
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append(genPackage.getClassifierID(genClassifier));
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append(genIndex);
+ stringBuffer.append(TEXT_50);
+ genIndex++;
+ } }
+ stringBuffer.append(TEXT_51);
+ String factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();
+ stringBuffer.append(TEXT_52);
+ stringBuffer.append(genPackage.getFactoryClassName());
+ stringBuffer.append(TEXT_53);
+ stringBuffer.append(genPackage.getReflectionPackageName());
+ stringBuffer.append(TEXT_54);
+ for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
+ stringBuffer.append(TEXT_55);
+ stringBuffer.append(dep.getImportedFactoryInterfaceName());
+ stringBuffer.append(TEXT_56);
+ }
+ stringBuffer.append(TEXT_57);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject"));
+ stringBuffer.append(TEXT_58);
+ for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
+ if (!genClass.isAbstract() && !genClass.isDynamic()) {
+ stringBuffer.append(TEXT_59);
+ stringBuffer.append(genClass.getClassifierID());
+ stringBuffer.append(TEXT_60);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject"));
+ stringBuffer.append(TEXT_61);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_62);
+ }
+ }
+ stringBuffer.append(TEXT_63);
+ if (!genPackage.getAllGenDataTypes().isEmpty()) {
+ stringBuffer.append(TEXT_64);
+ for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
+ if (genDataType.isSerializable()) {
+ stringBuffer.append(TEXT_65);
+ stringBuffer.append(genDataType.getClassifierID());
+ stringBuffer.append(TEXT_66);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_67);
+ }
+ }
+ stringBuffer.append(TEXT_68);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
+ stringBuffer.append(TEXT_69);
+ for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
+ if (genDataType.isSerializable()) {
+ stringBuffer.append(TEXT_70);
+ stringBuffer.append(genDataType.getClassifierID());
+ stringBuffer.append(TEXT_71);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_72);
+ }
+ }
+ stringBuffer.append(TEXT_73);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
+ stringBuffer.append(TEXT_74);
+ }
+ for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
+ if (!genClass.isAbstract() && !genClass.isDynamic()) {
+ stringBuffer.append(TEXT_75);
+ stringBuffer.append(genClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_76);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_77);
+ if (genClass.isDynamic()) {
+ stringBuffer.append(TEXT_78);
+ stringBuffer.append(genClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_79);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_80);
+ stringBuffer.append(genClass.getCastFromEObject());
+ stringBuffer.append(TEXT_81);
+ stringBuffer.append(genClass.getQualifiedClassifierAccessor());
+ stringBuffer.append(TEXT_82);
+ } else {
+ stringBuffer.append(TEXT_83);
+ stringBuffer.append(genClass.getImportedClassName());
+ stringBuffer.append(TEXT_84);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_85);
+ stringBuffer.append(genClass.getImportedClassName());
+ stringBuffer.append(TEXT_86);
+ if (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {
+ stringBuffer.append(TEXT_87);
+ }
+ stringBuffer.append(TEXT_88);
+ }
+ stringBuffer.append(TEXT_89);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_90);
+ }
+ }
+ stringBuffer.append(TEXT_91);
+ for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();
+ stringBuffer.append(TEXT_92);
+ if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) {
+ stringBuffer.append(TEXT_93);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
+ stringBuffer.append(TEXT_94);
+ stringBuffer.append(genClassifier.getSafeUncapName());
+ stringBuffer.append(TEXT_95);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
+ stringBuffer.append(TEXT_96);
+ stringBuffer.append(genClassifier.getClassifierAccessorName());
+ stringBuffer.append(TEXT_97);
+ stringBuffer.append(genClassifier.getSafeUncapName());
+ stringBuffer.append(TEXT_98);
+ } }
+ stringBuffer.append(TEXT_99);
+ stringBuffer.append(factoryType);
+ stringBuffer.append(TEXT_100);
+ stringBuffer.append(factoryType);
+ stringBuffer.append(TEXT_101);
+ stringBuffer.append(factoryType);
+ stringBuffer.append(TEXT_102);
+ stringBuffer.append(factoryType);
+ stringBuffer.append(TEXT_103);
+ if (!genPackage.getGenClasses().isEmpty()) {
+ stringBuffer.append(TEXT_104);
+ for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
+ if (!genClass.isDynamic()) {
+ stringBuffer.append(TEXT_105);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_106);
+ stringBuffer.append(genPackage.getClassifierID(genClass));
+ stringBuffer.append(TEXT_107);
+ for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();
+ stringBuffer.append(TEXT_108);
+ stringBuffer.append(!genFeature.isReferenceType());
+ stringBuffer.append(TEXT_109);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_110);
+ stringBuffer.append(genClass.getClassName());
+ stringBuffer.append(TEXT_111);
+ stringBuffer.append(genFeature.getUpperName());
+ stringBuffer.append(TEXT_112);
+ }
+ }
+ }
+ }
+ if (!genPackage.getGenDataTypes().isEmpty()) {
+ stringBuffer.append(TEXT_113);
+ for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
+ stringBuffer.append(TEXT_114);
+ stringBuffer.append(genDataType.getSafeUncapName());
+ stringBuffer.append(TEXT_115);
+ stringBuffer.append(genPackage.getClassifierID(genDataType));
+ stringBuffer.append(TEXT_116);
+ }
+ }
+ stringBuffer.append(TEXT_117);
+ if (!genPackage.getPackageInitializationDependencies().isEmpty()) {
+ stringBuffer.append(TEXT_118);
+ for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
+ stringBuffer.append(TEXT_119);
+ stringBuffer.append(dep.getImportedFactoryClassName());
+ stringBuffer.append(TEXT_120);
+ stringBuffer.append(genPackage.getPackageInstanceVariable(dep));
+ stringBuffer.append(TEXT_121);
+ stringBuffer.append(dep.getImportedFactoryClassName());
+ stringBuffer.append(TEXT_122);
+ stringBuffer.append(dep.getImportedFactoryClassName());
+ stringBuffer.append(TEXT_123);
+ }
+ }
+ List annotationSources = genPackage.getAnnotationSources();
+ annotationSources.remove(ExtendedMetaData.ANNOTATION_URI);
+ stringBuffer.append(TEXT_124);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
+ stringBuffer.append(TEXT_125);
+ for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
+ for (Iterator b=genClass.getBaseGenClasses().iterator(); b.hasNext();) { GenClass baseGenClass = (GenClass)b.next();
+ stringBuffer.append(TEXT_126);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_127);
+ stringBuffer.append(genPackage.getPackageInstanceVariable(baseGenClass.getGenPackage()));
+ stringBuffer.append(TEXT_128);
+ stringBuffer.append(baseGenClass.getClassifierAccessorName());
+ stringBuffer.append(TEXT_129);
+ }
+ }
+ stringBuffer.append(TEXT_130);
+ for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
+ if (!genClass.isDynamic()) {
+ stringBuffer.append(TEXT_131);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_132);
+ stringBuffer.append(genClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_133);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_134);
+ stringBuffer.append(genClass.isAbstract());
+ stringBuffer.append(TEXT_135);
+ for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
+ EAnnotation classAnnotation = genClass.getEcoreClassifier().getEAnnotation(annotationSource);
+ if (classAnnotation != null) {
+ for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_136);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_137);
+ stringBuffer.append(annotationSource);
+ stringBuffer.append(TEXT_138);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_139);
+ stringBuffer.append(value);
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ stringBuffer.append(TEXT_140);
+ }
+ }
+ }
+ for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next();
+ String type = genFeature.getType().equals("commonj.sdo.Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()";
+ stringBuffer.append(TEXT_141);
+ stringBuffer.append(genClass.getSafeUncapName());
+ stringBuffer.append(TEXT_142);
+ stringBuffer.append(genClass.getLocalFeatureIndex(genFeature));
+ stringBuffer.append(TEXT_143);
+ if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();
+ String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";
+ stringBuffer.append(TEXT_144);
+ stringBuffer.append(type);
+ stringBuffer.append(TEXT_145);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_146);
+ stringBuffer.append(genFeature.getDefaultValue());
+ stringBuffer.append(TEXT_147);
+ stringBuffer.append(genFeature.getLowerBound());
+ stringBuffer.append(TEXT_148);
+ stringBuffer.append(genFeature.getUpperBound());
+ stringBuffer.append(TEXT_149);
+ stringBuffer.append(genFeature.getContainerClass());
+ stringBuffer.append(TEXT_150);
+ stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
+ stringBuffer.append(TEXT_151);
+ stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
+ stringBuffer.append(TEXT_152);
+ stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
+ stringBuffer.append(TEXT_153);
+ stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false");
+ stringBuffer.append(TEXT_154);
+ stringBuffer.append(reverse);
+ stringBuffer.append(TEXT_155);
+ }else{
+ stringBuffer.append(TEXT_156);
+ stringBuffer.append(type);
+ stringBuffer.append(TEXT_157);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_158);
+ stringBuffer.append(genFeature.getDefaultValue());
+ stringBuffer.append(TEXT_159);
+ stringBuffer.append(genFeature.getLowerBound());
+ stringBuffer.append(TEXT_160);
+ stringBuffer.append(genFeature.getUpperBound());
+ stringBuffer.append(TEXT_161);
+ stringBuffer.append(genFeature.getContainerClass());
+ stringBuffer.append(TEXT_162);
+ stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
+ stringBuffer.append(TEXT_163);
+ stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
+ stringBuffer.append(TEXT_164);
+ stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
+ stringBuffer.append(TEXT_165);
+ }
+ for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
+ EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
+ if (featureAnnotation != null) {
+ for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_166);
+ stringBuffer.append(annotationSource);
+ stringBuffer.append(TEXT_167);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_168);
+ stringBuffer.append(value);
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ stringBuffer.append(TEXT_169);
+ }
+ }
+ }
+ stringBuffer.append(TEXT_170);
+ }
+ }
+ }
+ if (!genPackage.getGenDataTypes().isEmpty()) {
+ stringBuffer.append(TEXT_171);
+ for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
+ stringBuffer.append(TEXT_172);
+ stringBuffer.append(genDataType.getSafeUncapName());
+ stringBuffer.append(TEXT_173);
+ stringBuffer.append(genDataType.getImportedInstanceClassName());
+ stringBuffer.append(TEXT_174);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_175);
+ stringBuffer.append(genDataType.getSerializableFlag().equals("IS_SERIALIZABLE") ? "true" : "false");
+ stringBuffer.append(TEXT_176);
+ stringBuffer.append(genDataType.getGeneratedInstanceClassFlag().equals("IS_GENERATED_INSTANCE_CLASS") ? "true" : "false" );
+ stringBuffer.append(TEXT_177);
+ stringBuffer.append(genModel.getNonNLS());
+ for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
+ EAnnotation dataTypeAnnotation = genDataType.getEcoreDataType().getEAnnotation(annotationSource);
+ if (dataTypeAnnotation != null) {
+ for (Iterator k = dataTypeAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_178);
+ stringBuffer.append(genDataType.getSafeUncapName());
+ stringBuffer.append(TEXT_179);
+ stringBuffer.append(annotationSource);
+ stringBuffer.append(TEXT_180);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_181);
+ stringBuffer.append(value);
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ stringBuffer.append(TEXT_182);
+ }
+ }
+ }
+ stringBuffer.append(TEXT_183);
+ }
+ }
+ stringBuffer.append(TEXT_184);
+ stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, false));
+ stringBuffer.append(TEXT_185);
+ stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, true));
+ stringBuffer.append(TEXT_186);
+ stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
+ stringBuffer.append(TEXT_187);
+ String extendedMetaDataSource = ExtendedMetaData.ANNOTATION_URI;
+ EAnnotation packageAnnotation = genPackage.getEcorePackage().getEAnnotation(extendedMetaDataSource);
+ if (packageAnnotation != null){
+ stringBuffer.append(TEXT_188);
+ for (Iterator k = packageAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_189);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_190);
+ stringBuffer.append(value);
+ stringBuffer.append(k.hasNext() ? "," : "");
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ }
+ stringBuffer.append(TEXT_191);
+ stringBuffer.append(packageAnnotation.getSource());
+ stringBuffer.append(TEXT_192);
+ }
+ stringBuffer.append(TEXT_193);
+ for (Iterator i=genPackage.getGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next(); EAnnotation classAnnotation = genClassifier.getEcoreClassifier().getEAnnotation(extendedMetaDataSource);
+ if (classAnnotation != null && !genClassifier.getName().equals("DocumentRoot")) {
+ stringBuffer.append(TEXT_194);
+ stringBuffer.append(genClassifier.getSafeUncapName());
+ stringBuffer.append(TEXT_195);
+ for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_196);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_197);
+ stringBuffer.append(value);
+ stringBuffer.append(k.hasNext() ? "," : "");
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ }
+ stringBuffer.append(TEXT_198);
+ }
+ if (genClassifier instanceof GenClass) { GenClass genClass = (GenClass) genClassifier;
+ for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();
+ EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(extendedMetaDataSource);
+ if (genClass.getName().equals("DocumentRoot")) {
+ if (!(genFeature.getName().equals("mixed") || genFeature.getName().equals("xMLNSPrefixMap") || genFeature.getName().equals("xSISchemaLocation"))) {
+ stringBuffer.append(TEXT_199);
+ stringBuffer.append(genFeature.getName());
+ stringBuffer.append(TEXT_200);
+ stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
+ stringBuffer.append(TEXT_201);
+ stringBuffer.append(genFeature.getTypeClassifierAccessorName());
+ stringBuffer.append(TEXT_202);
+ for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_203);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_204);
+ stringBuffer.append(value);
+ stringBuffer.append(k.hasNext() ? "," : "");
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ }
+ if (!genFeature.isReferenceType()) {
+ stringBuffer.append(TEXT_205);
+ } else {
+ stringBuffer.append(TEXT_206);
+ }
+ stringBuffer.append(TEXT_207);
+ for (Iterator sources = genPackage.getAnnotationSources().iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
+ if (!annotationSource.equals(extendedMetaDataSource)) {
+ EAnnotation globalAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
+ if (globalAnnotation != null) {
+ for (Iterator k = globalAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_208);
+ stringBuffer.append(annotationSource);
+ stringBuffer.append(TEXT_209);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_210);
+ stringBuffer.append(value);
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ stringBuffer.append(TEXT_211);
+ }
+ stringBuffer.append(TEXT_212);
+ }
+ }
+ stringBuffer.append(TEXT_213);
+ }
+ }
+ } else {
+ stringBuffer.append(TEXT_214);
+ stringBuffer.append(genClassifier.getSafeUncapName());
+ stringBuffer.append(TEXT_215);
+ stringBuffer.append(genClass.getLocalFeatureIndex(genFeature));
+ stringBuffer.append(TEXT_216);
+ for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
+ stringBuffer.append(TEXT_217);
+ stringBuffer.append(key);
+ stringBuffer.append(TEXT_218);
+ stringBuffer.append(value);
+ stringBuffer.append(k.hasNext() ? "," : "");
+ stringBuffer.append(genModel.getNonNLS(key + value));
+ }
+ stringBuffer.append(TEXT_219);
+ }
+ }
+ }
+ }
+ stringBuffer.append(TEXT_220);
+ for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
+ if (genDataType.isSerializable()) {
+ stringBuffer.append(TEXT_221);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_222);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_223);
+ if (genDataType instanceof GenEnum) {
+ stringBuffer.append(TEXT_224);
+ stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
+ stringBuffer.append(TEXT_225);
+ stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
+ stringBuffer.append(TEXT_226);
+ stringBuffer.append(genModel.getNonNLS());
+ stringBuffer.append(genModel.getNonNLS(2));
+ stringBuffer.append(genModel.getNonNLS(3));
+ stringBuffer.append(TEXT_227);
+ } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
+ if (genBaseType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_228);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_229);
+ stringBuffer.append(genBaseType.getName());
+ stringBuffer.append(TEXT_230);
+ } else {
+ stringBuffer.append(TEXT_231);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_232);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
+ stringBuffer.append(TEXT_233);
+ stringBuffer.append(genBaseType.getName());
+ stringBuffer.append(TEXT_234);
+ }
+ } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
+ stringBuffer.append(TEXT_235);
+ stringBuffer.append(genModel.getImportedName("java.util.List"));
+ stringBuffer.append(TEXT_236);
+ stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(TEXT_237);
+ stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
+ stringBuffer.append(TEXT_238);
+ stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
+ stringBuffer.append(TEXT_239);
+ if (genItemType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_240);
+ stringBuffer.append(genItemType.getName());
+ stringBuffer.append(TEXT_241);
+ } else {
+ stringBuffer.append(TEXT_242);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
+ stringBuffer.append(TEXT_243);
+ stringBuffer.append(genItemType.getName());
+ stringBuffer.append(TEXT_244);
+ }
+ stringBuffer.append(TEXT_245);
+ } else if (!genDataType.getMemberTypes().isEmpty()) {
+ stringBuffer.append(TEXT_246);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_247);
+ for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
+ stringBuffer.append(TEXT_248);
+ if (genMemberType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_249);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_250);
+ stringBuffer.append(genMemberType.getName());
+ stringBuffer.append(TEXT_251);
+ } else {
+ stringBuffer.append(TEXT_252);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_253);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
+ stringBuffer.append(TEXT_254);
+ stringBuffer.append(genMemberType.getName());
+ stringBuffer.append(TEXT_255);
+ }
+ stringBuffer.append(TEXT_256);
+ }
+ stringBuffer.append(TEXT_257);
+ } else if (genDataType.isArrayType()) {
+ stringBuffer.append(TEXT_258);
+ stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
+ stringBuffer.append(TEXT_259);
+ } else {
+ stringBuffer.append(TEXT_260);
+ stringBuffer.append(genDataType.getObjectInstanceClassName());
+ stringBuffer.append(TEXT_261);
+ stringBuffer.append(genDataType.getClassifierID());
+ stringBuffer.append(TEXT_262);
+ }
+ stringBuffer.append(TEXT_263);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_264);
+ if (genDataType instanceof GenEnum) {
+ stringBuffer.append(TEXT_265);
+ } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
+ if (genBaseType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_266);
+ stringBuffer.append(genBaseType.getName());
+ stringBuffer.append(TEXT_267);
+ } else {
+ stringBuffer.append(TEXT_268);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
+ stringBuffer.append(TEXT_269);
+ stringBuffer.append(genBaseType.getName());
+ stringBuffer.append(TEXT_270);
+ }
+ } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
+ stringBuffer.append(TEXT_271);
+ stringBuffer.append(genModel.getImportedName("java.util.List"));
+ stringBuffer.append(TEXT_272);
+ stringBuffer.append(genModel.getImportedName("java.util.List"));
+ stringBuffer.append(TEXT_273);
+ stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
+ stringBuffer.append(TEXT_274);
+ stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
+ stringBuffer.append(TEXT_275);
+ stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
+ stringBuffer.append(TEXT_276);
+ if (genItemType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_277);
+ stringBuffer.append(genItemType.getName());
+ stringBuffer.append(TEXT_278);
+ } else {
+ stringBuffer.append(TEXT_279);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
+ stringBuffer.append(TEXT_280);
+ stringBuffer.append(genItemType.getName());
+ stringBuffer.append(TEXT_281);
+ }
+ stringBuffer.append(TEXT_282);
+ } else if (!genDataType.getMemberTypes().isEmpty()) {
+ stringBuffer.append(TEXT_283);
+ for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
+ stringBuffer.append(TEXT_284);
+ stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
+ stringBuffer.append(TEXT_285);
+ if (genMemberType.getGenPackage() == genPackage) {
+ stringBuffer.append(TEXT_286);
+ stringBuffer.append(genMemberType.getName());
+ stringBuffer.append(TEXT_287);
+ } else {
+ stringBuffer.append(TEXT_288);
+ stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
+ stringBuffer.append(TEXT_289);
+ stringBuffer.append(genMemberType.getName());
+ stringBuffer.append(TEXT_290);
+ }
+ stringBuffer.append(TEXT_291);
+ }
+ stringBuffer.append(TEXT_292);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_293);
+ } else if (genDataType.isArrayType()) {
+ stringBuffer.append(TEXT_294);
+ stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
+ stringBuffer.append(TEXT_295);
+ } else {
+ stringBuffer.append(TEXT_296);
+ stringBuffer.append(genDataType.getClassifierID());
+ stringBuffer.append(TEXT_297);
+ }
+ stringBuffer.append(TEXT_298);
+ }
+ }
+ } else {
+ for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
+ if (genClass.hasFactoryInterfaceCreateMethod()) {
+ stringBuffer.append(TEXT_299);
+ stringBuffer.append(genClass.getFormattedName());
+ stringBuffer.append(TEXT_300);
+ stringBuffer.append(genClass.getFormattedName());
+ stringBuffer.append(TEXT_301);
+ stringBuffer.append(genClass.getImportedInterfaceName());
+ stringBuffer.append(TEXT_302);
+ stringBuffer.append(genClass.getName());
+ stringBuffer.append(TEXT_303);
+ }
+ }
+ stringBuffer.append(TEXT_304);
+ if (genPackage.isDataTypeConverters()) {
+ for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
+ if (genDataType.isSerializable()) {
+ stringBuffer.append(TEXT_305);
+ stringBuffer.append(genDataType.getFormattedName());
+ stringBuffer.append(TEXT_306);
+ stringBuffer.append(genDataType.getImportedInstanceClassName());
+ stringBuffer.append(TEXT_307);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_308);
+ stringBuffer.append(genDataType.getFormattedName());
+ stringBuffer.append(TEXT_309);
+ stringBuffer.append(genDataType.getName());
+ stringBuffer.append(TEXT_310);
+ stringBuffer.append(genDataType.getImportedInstanceClassName());
+ stringBuffer.append(TEXT_311);
+ }
+ }
+ }
+ }
+ stringBuffer.append(TEXT_312);
+ stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName());
+ genModel.emitSortedImports();
+ stringBuffer.append(TEXT_313);
+ return stringBuffer.toString();
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
new file mode 100644
index 0000000000..062580f4b8
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
@@ -0,0 +1,326 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.generate.util;
+
+import java.util.Iterator;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
+import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier;
+import org.eclipse.emf.codegen.ecore.genmodel.GenDataType;
+import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
+import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl;
+import org.eclipse.emf.codegen.ecore.genmodel.impl.Literals;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import commonj.sdo.Type;
+
+public class SDOGenUtil {
+
+ public static String getQualifiedTypeAccessor(GenClassifier genClassifier)
+ {
+ GenPackage genPackage = genClassifier.getGenPackage();
+ return getFactoryImpl(genPackage) + ".get" + genClassifier.getClassifierAccessorName() + "()";
+ }
+
+ public static String getDependentFactoryArgumentList(GenPackage genPackage, boolean isFormalArguments)
+ {
+ StringBuffer result = new StringBuffer();
+ for (Iterator iter = genPackage.getPackageInitializationDependencies().iterator(); iter.hasNext(); )
+ {
+ GenPackage dep = (GenPackage)iter.next();
+ if (isFormalArguments)
+ {
+ result.append(dep.getImportedFactoryClassName());
+ result.append(" ");
+ }
+ result.append(genPackage.getPackageInstanceVariable(dep));
+ if (iter.hasNext()) result.append(", ");
+ }
+ return result.toString();
+ }
+
+ public static String getFactoryImpl(GenPackage genPackage)
+ {
+ return "((" + genPackage.getImportedFactoryClassName() + ")"
+ + genPackage.getImportedFactoryInterfaceName() + ".INSTANCE)";
+ }
+
+ public static String getListKind(GenFeature genFeature, boolean suppressNotification )
+ {
+ boolean unsettable = genFeature.isUnsettable();
+
+ if (suppressNotification)
+ {
+ return "ListKind.BASIC";
+ }
+ else if (genFeature.isEffectiveContains())
+ {
+ if (genFeature.isBidirectional())
+ {
+ if (genFeature.isResolveProxies())
+ {
+ if( unsettable )
+ return "ListKind.CONTAINMENT_INVERSE_RESOLVING_UNSETTABLE";
+ else
+ return "ListKind.CONTAINMENT_INVERSE_RESOLVING";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.CONTAINMENT_INVERSE_UNSETTABLE";
+ else
+ return "ListKind.CONTAINMENT_INVERSE";
+ }
+ }
+ else
+ {
+ if (genFeature.isResolveProxies())
+ {
+ if( unsettable )
+ return "ListKind.CONTAINMENT_RESOLVING_UNSETTABLE";
+ else
+ return "ListKind.CONTAINMENT_RESOLVING";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.CONTAINMENT_UNSETTABLE";
+ else
+ return "ListKind.CONTAINMENT";
+ }
+ }
+ }
+ else if (genFeature.isReferenceType())
+ {
+ if (genFeature.isBidirectional())
+ {
+ GenFeature reverseFeature = genFeature.getReverse();
+ if (genFeature.isResolveProxies())
+ {
+ if (reverseFeature.isListType())
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_MANYINVERSE_RESOLVING_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT_MANYINVERSE_RESOLVING";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_INVERSE_RESOLVING_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT_INVERSE_RESOLVING";
+ }
+ }
+ else
+ {
+ if (reverseFeature.isListType())
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_MANYINVERSE_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT_MANYINVERSE";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_INVERSE_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT_INVERSE";
+ }
+ }
+ }
+ else
+ {
+ if (genFeature.isResolveProxies())
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_RESOLVING_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT_RESOLVING";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.NONCONTAINMENT_UNSETTABLE";
+ else
+ return "ListKind.NONCONTAINMENT";
+ }
+ }
+ }
+ else
+ { //datatype
+ if (genFeature.isUnique())
+ {
+ if( unsettable )
+ return "ListKind.DATATYPE_UNIQUE_UNSETTABLE";
+ else
+ return "ListKind.DATATYPE_UNIQUE";
+ }
+ else
+ {
+ if( unsettable )
+ return "ListKind.DATATYPE_UNSETTABLE";
+ else
+ return "ListKind.DATATYPE";
+ }
+ }
+ }
+
+ public static boolean hasChangeSummaryProperty(GenClass genClass)
+ {
+ return getChangeSummaryProperty(genClass) != null;
+ }
+
+ public static String getQualifiedInternalPropertyID(GenFeature genFeature)
+ {
+ return genFeature.getGenClass().getImportedClassName() + ".INTERNAL_" + genFeature.getUpperName();
+ }
+
+ public static String getChangeSummaryProperty(GenClass genClass)
+ {
+ Type csType = ((ModelFactoryImpl)ModelFactory.INSTANCE).getChangeSummaryType();
+ for (Iterator i = genClass.getGenFeatures().iterator(); i.hasNext(); )
+ {
+ GenFeature genFeature = (GenFeature)i.next();
+ EClassifier eClassifier = genFeature.getEcoreFeature().getEType();
+ if (eClassifier instanceof Type)
+ {
+ Type type = (Type)eClassifier;
+ //if (csType == type)// this doesn't work when generating sdoModel.xsd
+ if (csType.getName().equals(type.getName()) && csType.getURI().equals(type.getURI()))
+ {
+ return genFeature.getUpperName();
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String printArguments(GenPackage genPackage, GenModel genModel) {
+ StringBuffer result = new StringBuffer();
+ if(!CodeGenUtil.capName(genPackage.getNSName()).equals(genPackage.getPrefix())) {
+ result.append(" -prefix " + genPackage.getPrefix());
+ }
+ if (genModel.isSuppressInterfaces()) {
+ result.append(" -noInterfaces");
+ }
+ if ( genModel.getFeatureDelegation() == GenDelegationKind.VIRTUAL_LITERAL) {
+ result.append(" -sparsePattern");
+ }
+ if ("org.apache.tuscany.sdo.impl.StoreDataObjectImpl".equals(genModel.getRootExtendsClass())) {
+ result.append(" -storePattern");
+ }
+ if (genModel.isSuppressNotification()) {
+ result.append(" -noNotification");
+ }
+ if (genModel.isSuppressContainment()) {
+ result.append(" -noContainment");
+ }
+ if (genModel.isArrayAccessors()) {
+ result.append(" -arrayAccessors");
+ }
+ if (genModel.isSuppressUnsettable()) {
+ result.append(" -noUnsettable");
+ }
+
+ return result.toString();
+ }
+
+ /*
+ * EMF doesn't do what we want in all cases, so filter the cases we need to handle
+ * and drop through to EMF for all others.
+ */
+ public static String getStaticDefaultValue(GenFeature genFeature) {
+ String result = "null";
+ boolean defaultFound = false;
+
+ String defaultString = genFeature.getEcoreFeature()
+ .getDefaultValueLiteral();
+ EClassifier eType = genFeature.getEcoreFeature().getEType();
+ if (eType instanceof EDataType) {
+ GenPackage genPackage = ((GenFeatureImpl) genFeature)
+ .findGenPackage(genFeature.getEcoreFeature().getEType().getEPackage());
+ GenDataType gdt = null;
+ if (genPackage != null) {
+ for (Iterator iter = genPackage.getGenDataTypes().iterator(); iter
+ .hasNext()
+ && gdt == null;) {
+ GenDataType genDataType = (GenDataType) iter.next();
+ if (eType.getName().equals(genDataType.getEcoreDataType().getName())) {
+ gdt = genDataType;
+ }
+ }
+ }
+ EClassifier eDataType = gdt.getEcoreDataType();
+ if (eDataType.getEPackage() != EcorePackage.eINSTANCE
+ && defaultString != null) {
+ boolean replaced = false;
+ for (Iterator i = EcorePackage.eINSTANCE.getEClassifiers().iterator(); i
+ .hasNext();) {
+ EClassifier eClassifier = (EClassifier) i.next();
+ if (eClassifier instanceof EDataType
+ && eClassifier.getInstanceClassName().equals(
+ eDataType.getInstanceClassName())
+ && ((EDataType) eClassifier).isSerializable()
+ && eClassifier != EcorePackage.eINSTANCE.getEDate()) {
+ replaced = true;
+ eDataType = eClassifier;
+ break;
+ }
+ }
+ if (!replaced) {
+ result = "((" + genPackage.getFactoryClassName() + ")"
+ + genPackage.getFactoryInterfaceName() + "."
+ + genPackage.getFactoryInstanceName() + ")." + "create"
+ + gdt.getName() + "FromString("
+ + Literals.toLiteral(defaultString) + ")";
+
+
+ if (gdt.isPrimitiveType())
+ {
+ result = "((" + gdt.getObjectInstanceClassName() + ")" + result
+ + ")." + gdt.getPrimitiveValueFunction() + "()";
+ } else if (!gdt.isObjectType()) {
+ result = "(" + gdt.getImportedInstanceClassName() + ")" + result;
+ }
+
+ defaultFound = true;
+ }
+ }
+ }
+
+ if (!defaultFound) {
+ // the input didn't match any special case that we want to handle differently
+ // from EMF's default approach, so go ahead and get EMF to do it
+ result = genFeature.getStaticDefaultValue();
+ }
+
+ return result;
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
new file mode 100644
index 0000000000..1c1f37682f
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
@@ -0,0 +1,27 @@
+/**
+ *
+ * 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.
+ */
+/*******************************************************************************
+ * TEMPORARY dummy file to work around EMF generator dependency problem.
+ * This file will be deleted as soon as the EMF generator is fixed.
+ *******************************************************************************/
+package org.eclipse.jdt.core.formatter;
+
+public abstract class CodeFormatter {
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER
new file mode 100644
index 0000000000..a65af91c5a
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER
@@ -0,0 +1,7 @@
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF. \ No newline at end of file
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000000..9a90d375bc
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,207 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+
+
+
+
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..8bb7dea1fe
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Extension-Name: tuscany-sdo-tools
+Specification-Title: Tuscany SDO Tools Implementation
+Specification-Vendor: Apache Software Foundation
+Implementation-Vendor: Apache Software Foundation
+Implementation-Vendor-Id: org.apache
+Implementation-Title: tuscany-sdo-tools
+Implementation-Version: incubating-M3
+Bundle-ManifestVersion: 2
+Bundle-Name: Tuscany SDO Tools Implementation
+Bundle-SymbolicName: org.apache.tuscany.sdo.tools
+Bundle-Version: 1.0.0
+Bundle-Vendor: Apache Software Foundation
+Require-Bundle: org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.change,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.xsd,
+ org.apache.tuscany.sdo.spec;visibility:=reexport
+Export-Package: org.apache.tuscany.sdo.generate,
+ org.apache.tuscany.sdo.generate.util
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000000..9f9572a167
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,7 @@
+Apache Tuscany
+Copyright (c) 2005 - 2008 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt
new file mode 100644
index 0000000000..3394b161cf
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt
@@ -0,0 +1,23 @@
+Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
+=========================================================
+
+http://incubator.apache.org/tuscany/
+
+Support
+-------
+
+Any problem with this release can be reported to the Tuscany mailing list
+or in the JIRA issue tracker.
+
+Mailing list subscription:
+ tuscany-dev-subscribe@ws.apache.org
+
+Jira:
+ http://issues.apache.org/jira/browse/Tuscany
+
+
+Thank you for using Tuscany!
+
+
+The Tuscany Team.
+
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java
new file mode 100644
index 0000000000..29a558b5a2
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java
@@ -0,0 +1,103 @@
+/**
+ *
+ * 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.repchoice;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>RC Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.repchoice.RCType#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.repchoice.RCType#getS <em>S</em>}</li>
+ * <li>{@link com.example.repchoice.RCType#getI <em>I</em>}</li>
+ * <li>{@link com.example.repchoice.RCType#getF <em>F</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface RCType extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup();
+
+ /**
+ * Returns the value of the '<em><b>S</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>S</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>S</em>' attribute list.
+ * @generated
+ */
+ List getS();
+
+ /**
+ * Returns the value of the '<em><b>I</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>I</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>I</em>' attribute list.
+ * @generated
+ */
+ List getI();
+
+ /**
+ * Returns the value of the '<em><b>F</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Float}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>F</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>F</em>' attribute list.
+ * @generated
+ */
+ List getF();
+
+} // RCType
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
new file mode 100644
index 0000000000..9a7c3033a5
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
@@ -0,0 +1,61 @@
+/**
+ *
+ * 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.repchoice;
+
+import commonj.sdo.helper.HelperContext;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public interface RepchoiceFactory
+{
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ RepchoiceFactory INSTANCE = com.example.repchoice.impl.RepchoiceFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>RC Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>RC Type</em>'.
+ * @generated
+ */
+ RCType createRCType();
+
+ /**
+ * Registers the types supported by this Factory within the supplied scope.argument
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param scope an instance of HelperContext used to manage the scoping of types.
+ * @generated
+ */
+ public void register(HelperContext scope);
+
+} //RepchoiceFactory
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
new file mode 100644
index 0000000000..322dc5a8e0
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
@@ -0,0 +1,332 @@
+/**
+ *
+ * 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.repchoice.impl;
+
+import com.example.repchoice.RCType;
+import com.example.repchoice.RepchoiceFactory;
+
+import commonj.sdo.Sequence;
+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>RC Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.repchoice.impl.RCTypeImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.repchoice.impl.RCTypeImpl#getS <em>S</em>}</li>
+ * <li>{@link com.example.repchoice.impl.RCTypeImpl#getI <em>I</em>}</li>
+ * <li>{@link com.example.repchoice.impl.RCTypeImpl#getF <em>F</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RCTypeImpl extends DataObjectBase implements RCType
+{
+
+ public final static int GROUP = -1;
+
+ public final static int S = 0;
+
+ public final static int I = 1;
+
+ public final static int F = 2;
+
+ public final static int SDO_PROPERTY_COUNT = 3;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -1;
+
+
+ /**
+ * 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 INTERNAL_GROUP = 0;
+
+ /**
+ * The internal feature id for the '<em><b>S</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_S = 1;
+
+ /**
+ * The internal feature id for the '<em><b>I</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_I = 2;
+
+ /**
+ * The internal feature id for the '<em><b>F</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_F = 3;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 4;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_S: return S;
+ case INTERNAL_I: return I;
+ case INTERNAL_F: return F;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroup()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence group = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RCTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((RepchoiceFactoryImpl)RepchoiceFactory.INSTANCE).getRCType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ if (group == null)
+ {
+ group = createSequence(INTERNAL_GROUP);
+ }
+ return group;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getS()
+ {
+ return getList(getGroup(), getType(), INTERNAL_S);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getI()
+ {
+ return getList(getGroup(), getType(), INTERNAL_I);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getF()
+ {
+ return getList(getGroup(), getType(), INTERNAL_F);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return removeFromSequence(getGroup(), 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 GROUP:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup();
+ case S:
+ return getS();
+ case I:
+ return getI();
+ case F:
+ return getF();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case S:
+ getS().clear();
+ getS().addAll((Collection)newValue);
+ return;
+ case I:
+ getI().clear();
+ getI().addAll((Collection)newValue);
+ return;
+ case F:
+ getF().clear();
+ getF().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case S:
+ getS().clear();
+ return;
+ case I:
+ getI().clear();
+ return;
+ case F:
+ getF().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return group != null && !isSequenceEmpty(getGroup());
+ case S:
+ return !getS().isEmpty();
+ case I:
+ return !getI().isEmpty();
+ case F:
+ return !getF().isEmpty();
+ }
+ 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(" (group: ");
+ result.append(group);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RCTypeImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
new file mode 100644
index 0000000000..40d3e9eeec
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
@@ -0,0 +1,269 @@
+/**
+ *
+ * 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.repchoice.impl;
+
+import commonj.sdo.helper.HelperContext;
+import org.apache.tuscany.sdo.helper.TypeHelperImpl;
+
+import com.example.repchoice.*;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.impl.FactoryBase;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
+
+import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * Generator information:
+ * patternVersion=1.2;
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RepchoiceFactoryImpl extends FactoryBase implements RepchoiceFactory
+{
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_URI = "http://www.example.com/repchoice";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_PREFIX = "repchoice";
+
+ /**
+ * 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 RC_TYPE = 1;
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepchoiceFactoryImpl()
+ {
+ super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.repchoice");
+ }
+
+ /**
+ * 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");
+ }
+
+ //Register dependent packages with provided scope
+ ModelFactory.INSTANCE.register(scope);
+
+ // Initialize this package
+ 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 RC_TYPE: return (DataObject)createRCType();
+ default:
+ return super.create(typeNumber);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RCType createRCType()
+ {
+ RCTypeImpl rcType = new RCTypeImpl();
+ return rcType;
+ }
+
+ // Following creates and initializes SDO metadata for the supported types.
+ protected Type rcTypeType = null;
+
+ public Type getRCType()
+ {
+ return rcTypeType;
+ }
+
+
+ private static RepchoiceFactoryImpl instance = null;
+ public static RepchoiceFactoryImpl init()
+ {
+ if (instance != null ) return instance;
+ instance = new RepchoiceFactoryImpl();
+
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
+ // Create package meta-data objects
+ instance.createMetaData();
+
+ // Initialize created meta-data
+ instance.initializeMetaData();
+
+ // Mark meta-data to indicate it can't be changed
+ //theRepchoiceFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
+
+ return instance;
+ }
+
+ private boolean isCreated = false;
+
+ public void createMetaData()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create types and their properties
+ rcTypeType = createType(false, RC_TYPE);
+ createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_GROUP);
+ createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_S);
+ createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_I);
+ createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_F);
+ }
+
+ private boolean isInitialized = false;
+
+ public void initializeMetaData()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Obtain other dependent packages
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
+ Property property = null;
+
+ // Add supertypes to types
+
+ // Initialize types and properties
+ initializeType(rcTypeType, RCType.class, "RCType", false);
+ property = getLocalProperty(rcTypeType, 0);
+ initializeProperty(property, getSequence(), "group", null, 0, -1, RCType.class, false, false, false);
+
+ property = getLocalProperty(rcTypeType, 1);
+ initializeProperty(property, theModelPackageImpl.getString(), "s", null, 0, -1, RCType.class, false, false, true);
+
+ property = getLocalProperty(rcTypeType, 2);
+ initializeProperty(property, theModelPackageImpl.getInt(), "i", null, 0, -1, RCType.class, false, false, true);
+
+ property = getLocalProperty(rcTypeType, 3);
+ initializeProperty(property, theModelPackageImpl.getFloat(), "f", null, 0, -1, RCType.class, false, false, true);
+
+ createXSDMetaData(theModelPackageImpl);
+ }
+
+ protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
+ {
+ super.initXSD();
+
+ Property property = null;
+
+
+ property = createGlobalProperty
+ ("rc",
+ this.getRCType(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "rc",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (rcTypeType,
+ new String[]
+ {
+ "name", "RCType",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(rcTypeType, RCTypeImpl.INTERNAL_GROUP),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:0"
+ });
+
+ addXSDMapping
+ (getProperty(rcTypeType, RCTypeImpl.INTERNAL_S),
+ new String[]
+ {
+ "kind", "element",
+ "name", "s",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (getProperty(rcTypeType, RCTypeImpl.INTERNAL_I),
+ new String[]
+ {
+ "kind", "element",
+ "name", "i",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (getProperty(rcTypeType, RCTypeImpl.INTERNAL_F),
+ new String[]
+ {
+ "kind", "element",
+ "name", "f",
+ "group", "#group:0"
+ });
+
+ }
+
+} //RepchoiceFactoryImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java
new file mode 100644
index 0000000000..f1882ba616
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java
@@ -0,0 +1,491 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.math.BigDecimal;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mixed Quote</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.sequences.MixedQuote#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getSymbol <em>Symbol</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getCompanyName <em>Company Name</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getPrice <em>Price</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getOpen1 <em>Open1</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getHigh <em>High</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getLow <em>Low</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getVolume <em>Volume</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getChange1 <em>Change1</em>}</li>
+ * <li>{@link com.example.sequences.MixedQuote#getQuotes <em>Quotes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface MixedQuote extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @generated
+ */
+ Sequence getMixed();
+
+ /**
+ * Returns the value of the '<em><b>Symbol</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Symbol</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Symbol</em>' attribute.
+ * @see #isSetSymbol()
+ * @see #unsetSymbol()
+ * @see #setSymbol(String)
+ * @generated
+ */
+ String getSymbol();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getSymbol <em>Symbol</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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>
+ * If the meaning of the '<em>Company Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Company Name</em>' attribute.
+ * @see #isSetCompanyName()
+ * @see #unsetCompanyName()
+ * @see #setCompanyName(String)
+ * @generated
+ */
+ String getCompanyName();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getCompanyName <em>Company Name</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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>
+ * If the meaning of the '<em>Price</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Price</em>' attribute.
+ * @see #isSetPrice()
+ * @see #unsetPrice()
+ * @see #setPrice(BigDecimal)
+ * @generated
+ */
+ BigDecimal getPrice();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getPrice <em>Price</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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>
+ * If the meaning of the '<em>Open1</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Open1</em>' attribute.
+ * @see #isSetOpen1()
+ * @see #unsetOpen1()
+ * @see #setOpen1(BigDecimal)
+ * @generated
+ */
+ BigDecimal getOpen1();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getOpen1 <em>Open1</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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>
+ * If the meaning of the '<em>High</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>High</em>' attribute.
+ * @see #isSetHigh()
+ * @see #unsetHigh()
+ * @see #setHigh(BigDecimal)
+ * @generated
+ */
+ BigDecimal getHigh();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getHigh <em>High</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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>
+ * If the meaning of the '<em>Low</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Low</em>' attribute.
+ * @see #isSetLow()
+ * @see #unsetLow()
+ * @see #setLow(BigDecimal)
+ * @generated
+ */
+ BigDecimal getLow();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getLow <em>Low</em>}' attribute.
+ * <!-- 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.sequences.MixedQuote#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.sequences.MixedQuote#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.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Volume</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Volume</em>' attribute.
+ * @see #isSetVolume()
+ * @see #unsetVolume()
+ * @see #setVolume(double)
+ * @generated
+ */
+ double getVolume();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getVolume <em>Volume</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Volume</em>' attribute.
+ * @see #isSetVolume()
+ * @see #unsetVolume()
+ * @see #getVolume()
+ * @generated
+ */
+ void setVolume(double value);
+
+ /**
+ * Unsets the value of the '{@link com.example.sequences.MixedQuote#getVolume <em>Volume</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetVolume()
+ * @see #getVolume()
+ * @see #setVolume(double)
+ * @generated
+ */
+ void unsetVolume();
+
+ /**
+ * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getVolume <em>Volume</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Volume</em>' attribute is set.
+ * @see #unsetVolume()
+ * @see #getVolume()
+ * @see #setVolume(double)
+ * @generated
+ */
+ boolean isSetVolume();
+
+ /**
+ * Returns the value of the '<em><b>Change1</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Change1</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Change1</em>' attribute.
+ * @see #isSetChange1()
+ * @see #unsetChange1()
+ * @see #setChange1(double)
+ * @generated
+ */
+ double getChange1();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.MixedQuote#getChange1 <em>Change1</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Change1</em>' attribute.
+ * @see #isSetChange1()
+ * @see #unsetChange1()
+ * @see #getChange1()
+ * @generated
+ */
+ void setChange1(double value);
+
+ /**
+ * Unsets the value of the '{@link com.example.sequences.MixedQuote#getChange1 <em>Change1</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetChange1()
+ * @see #getChange1()
+ * @see #setChange1(double)
+ * @generated
+ */
+ void unsetChange1();
+
+ /**
+ * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getChange1 <em>Change1</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Change1</em>' attribute is set.
+ * @see #unsetChange1()
+ * @see #getChange1()
+ * @see #setChange1(double)
+ * @generated
+ */
+ boolean isSetChange1();
+
+ /**
+ * Returns the value of the '<em><b>Quotes</b></em>' containment reference list.
+ * The list contents are of type {@link com.example.sequences.MixedQuote}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Quotes</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Quotes</em>' containment reference list.
+ * @generated
+ */
+ List getQuotes();
+
+} // MixedQuote
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
new file mode 100644
index 0000000000..dba64b0487
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
@@ -0,0 +1,102 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mixed Repeating Choice</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.sequences.MixedRepeatingChoice#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.MixedRepeatingChoice#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.MixedRepeatingChoice#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.MixedRepeatingChoice#getB <em>B</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface MixedRepeatingChoice extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @generated
+ */
+ Sequence getMixed();
+
+ /**
+ * Returns the value of the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup();
+
+ /**
+ * Returns the value of the '<em><b>A</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>A</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>A</em>' attribute list.
+ * @generated
+ */
+ List getA();
+
+ /**
+ * Returns the value of the '<em><b>B</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>B</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>B</em>' attribute list.
+ * @generated
+ */
+ List getB();
+
+} // MixedRepeatingChoice
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
new file mode 100644
index 0000000000..3f0b0839f2
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
@@ -0,0 +1,88 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Repeating Choice</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.sequences.RepeatingChoice#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.RepeatingChoice#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.RepeatingChoice#getB <em>B</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface RepeatingChoice extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup();
+
+ /**
+ * Returns the value of the '<em><b>A</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>A</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>A</em>' attribute list.
+ * @generated
+ */
+ List getA();
+
+ /**
+ * Returns the value of the '<em><b>B</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>B</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>B</em>' attribute list.
+ * @generated
+ */
+ List getB();
+
+} // RepeatingChoice
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
new file mode 100644
index 0000000000..900b51ddc3
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
@@ -0,0 +1,97 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.helper.HelperContext;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public interface SequencesFactory
+{
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SequencesFactory INSTANCE = com.example.sequences.impl.SequencesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Mixed Quote</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Mixed Quote</em>'.
+ * @generated
+ */
+ MixedQuote createMixedQuote();
+
+ /**
+ * Returns a new object of class '<em>Mixed Repeating Choice</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Mixed Repeating Choice</em>'.
+ * @generated
+ */
+ MixedRepeatingChoice createMixedRepeatingChoice();
+
+ /**
+ * Returns a new object of class '<em>Repeating Choice</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Repeating Choice</em>'.
+ * @generated
+ */
+ RepeatingChoice createRepeatingChoice();
+
+ /**
+ * Returns a new object of class '<em>Two RCs</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Two RCs</em>'.
+ * @generated
+ */
+ TwoRCs createTwoRCs();
+
+ /**
+ * Returns a new object of class '<em>Two RCs Mixed</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Two RCs Mixed</em>'.
+ * @generated
+ */
+ TwoRCsMixed createTwoRCsMixed();
+
+ /**
+ * Registers the types supported by this Factory within the supplied scope.argument
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param scope an instance of HelperContext used to manage the scoping of types.
+ * @generated
+ */
+ public void register(HelperContext scope);
+
+} //SequencesFactory
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
new file mode 100644
index 0000000000..c6e54e6598
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
@@ -0,0 +1,184 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Two RCs</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.sequences.TwoRCs#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getB <em>B</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getSplit <em>Split</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getGroup1 <em>Group1</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getY <em>Y</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCs#getZ <em>Z</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface TwoRCs extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup();
+
+ /**
+ * Returns the value of the '<em><b>A</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>A</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>A</em>' attribute list.
+ * @generated
+ */
+ List getA();
+
+ /**
+ * Returns the value of the '<em><b>B</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>B</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>B</em>' attribute list.
+ * @generated
+ */
+ List getB();
+
+ /**
+ * Returns the value of the '<em><b>Split</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Split</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Split</em>' attribute.
+ * @see #isSetSplit()
+ * @see #unsetSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ String getSplit();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.TwoRCs#getSplit <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Split</em>' attribute.
+ * @see #isSetSplit()
+ * @see #unsetSplit()
+ * @see #getSplit()
+ * @generated
+ */
+ void setSplit(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.sequences.TwoRCs#getSplit <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetSplit()
+ * @see #getSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ void unsetSplit();
+
+ /**
+ * Returns whether the value of the '{@link com.example.sequences.TwoRCs#getSplit <em>Split</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Split</em>' attribute is set.
+ * @see #unsetSplit()
+ * @see #getSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ boolean isSetSplit();
+
+ /**
+ * Returns the value of the '<em><b>Group1</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group1</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group1</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup1();
+
+ /**
+ * Returns the value of the '<em><b>Y</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Y</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Y</em>' attribute list.
+ * @generated
+ */
+ List getY();
+
+ /**
+ * Returns the value of the '<em><b>Z</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Z</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Z</em>' attribute list.
+ * @generated
+ */
+ List getZ();
+
+} // TwoRCs
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
new file mode 100644
index 0000000000..90d5f942b6
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
@@ -0,0 +1,198 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences;
+
+import commonj.sdo.Sequence;
+
+import java.io.Serializable;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Two RCs Mixed</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getB <em>B</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getSplit <em>Split</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getGroup1 <em>Group1</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getY <em>Y</em>}</li>
+ * <li>{@link com.example.sequences.TwoRCsMixed#getZ <em>Z</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @extends Serializable
+ * @generated
+ */
+public interface TwoRCsMixed extends Serializable
+{
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @generated
+ */
+ Sequence getMixed();
+
+ /**
+ * Returns the value of the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup();
+
+ /**
+ * Returns the value of the '<em><b>A</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>A</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>A</em>' attribute list.
+ * @generated
+ */
+ List getA();
+
+ /**
+ * Returns the value of the '<em><b>B</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>B</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>B</em>' attribute list.
+ * @generated
+ */
+ List getB();
+
+ /**
+ * Returns the value of the '<em><b>Split</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Split</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Split</em>' attribute.
+ * @see #isSetSplit()
+ * @see #unsetSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ String getSplit();
+
+ /**
+ * Sets the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Split</em>' attribute.
+ * @see #isSetSplit()
+ * @see #unsetSplit()
+ * @see #getSplit()
+ * @generated
+ */
+ void setSplit(String value);
+
+ /**
+ * Unsets the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetSplit()
+ * @see #getSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ void unsetSplit();
+
+ /**
+ * Returns whether the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit <em>Split</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Split</em>' attribute is set.
+ * @see #unsetSplit()
+ * @see #getSplit()
+ * @see #setSplit(String)
+ * @generated
+ */
+ boolean isSetSplit();
+
+ /**
+ * Returns the value of the '<em><b>Group1</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Group1</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Group1</em>' attribute list.
+ * @generated
+ */
+ Sequence getGroup1();
+
+ /**
+ * Returns the value of the '<em><b>Y</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Y</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Y</em>' attribute list.
+ * @generated
+ */
+ List getY();
+
+ /**
+ * Returns the value of the '<em><b>Z</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.Integer}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Z</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Z</em>' attribute list.
+ * @generated
+ */
+ List getZ();
+
+} // TwoRCsMixed
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
new file mode 100644
index 0000000000..96fe832ef3
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
@@ -0,0 +1,766 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import com.example.sequences.MixedQuote;
+import com.example.sequences.SequencesFactory;
+
+import commonj.sdo.Sequence;
+import commonj.sdo.Type;
+
+import java.math.BigDecimal;
+
+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>Mixed Quote</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getSymbol <em>Symbol</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getCompanyName <em>Company Name</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getPrice <em>Price</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getOpen1 <em>Open1</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getHigh <em>High</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getLow <em>Low</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getVolume <em>Volume</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getChange1 <em>Change1</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedQuoteImpl#getQuotes <em>Quotes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MixedQuoteImpl extends DataObjectBase implements MixedQuote
+{
+
+ public final static int MIXED = -1;
+
+ public final static int SYMBOL = 0;
+
+ public final static int COMPANY_NAME = 1;
+
+ public final static int PRICE = 2;
+
+ public final static int OPEN1 = 3;
+
+ public final static int HIGH = 4;
+
+ public final static int LOW = 5;
+
+ public final static int VOLUME = 6;
+
+ public final static int CHANGE1 = 7;
+
+ public final static int QUOTES = 8;
+
+ public final static int SDO_PROPERTY_COUNT = 9;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -1;
+
+
+ /**
+ * 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 INTERNAL_MIXED = 0;
+
+ /**
+ * The internal feature id for the '<em><b>Symbol</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_SYMBOL = 1;
+
+ /**
+ * 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 INTERNAL_COMPANY_NAME = 2;
+
+ /**
+ * The internal feature id for the '<em><b>Price</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PRICE = 3;
+
+ /**
+ * The internal feature id for the '<em><b>Open1</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_OPEN1 = 4;
+
+ /**
+ * The internal feature id for the '<em><b>High</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_HIGH = 5;
+
+ /**
+ * The internal feature id for the '<em><b>Low</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_LOW = 6;
+
+ /**
+ * The internal feature id for the '<em><b>Volume</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_VOLUME = 7;
+
+ /**
+ * The internal feature id for the '<em><b>Change1</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_CHANGE1 = 8;
+
+ /**
+ * 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 INTERNAL_QUOTES = 9;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 10;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_MIXED: return MIXED;
+ case INTERNAL_SYMBOL: return SYMBOL;
+ case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
+ case INTERNAL_PRICE: return PRICE;
+ case INTERNAL_OPEN1: return OPEN1;
+ case INTERNAL_HIGH: return HIGH;
+ case INTERNAL_LOW: return LOW;
+ case INTERNAL_VOLUME: return VOLUME;
+ case INTERNAL_CHANGE1: return CHANGE1;
+ case INTERNAL_QUOTES: return QUOTES;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence mixed = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MixedQuoteImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedQuote();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getMixed()
+ {
+ if (mixed == null)
+ {
+ mixed = createSequence(INTERNAL_MIXED);
+ }
+ return mixed;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSymbol()
+ {
+ return (String)get(getMixed(), getType(), INTERNAL_SYMBOL);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSymbol(String newSymbol)
+ {
+ set(getMixed(), getType(), INTERNAL_SYMBOL, newSymbol);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSymbol()
+ {
+ unset(getMixed(), getType(), INTERNAL_SYMBOL);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSymbol()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_SYMBOL);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCompanyName()
+ {
+ return (String)get(getMixed(), getType(), INTERNAL_COMPANY_NAME);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCompanyName(String newCompanyName)
+ {
+ set(getMixed(), getType(), INTERNAL_COMPANY_NAME, newCompanyName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetCompanyName()
+ {
+ unset(getMixed(), getType(), INTERNAL_COMPANY_NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetCompanyName()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_COMPANY_NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigDecimal getPrice()
+ {
+ return (BigDecimal)get(getMixed(), getType(), INTERNAL_PRICE);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPrice(BigDecimal newPrice)
+ {
+ set(getMixed(), getType(), INTERNAL_PRICE, newPrice);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetPrice()
+ {
+ unset(getMixed(), getType(), INTERNAL_PRICE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetPrice()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_PRICE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigDecimal getOpen1()
+ {
+ return (BigDecimal)get(getMixed(), getType(), INTERNAL_OPEN1);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOpen1(BigDecimal newOpen1)
+ {
+ set(getMixed(), getType(), INTERNAL_OPEN1, newOpen1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetOpen1()
+ {
+ unset(getMixed(), getType(), INTERNAL_OPEN1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetOpen1()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_OPEN1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigDecimal getHigh()
+ {
+ return (BigDecimal)get(getMixed(), getType(), INTERNAL_HIGH);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHigh(BigDecimal newHigh)
+ {
+ set(getMixed(), getType(), INTERNAL_HIGH, newHigh);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetHigh()
+ {
+ unset(getMixed(), getType(), INTERNAL_HIGH);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetHigh()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_HIGH);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BigDecimal getLow()
+ {
+ return (BigDecimal)get(getMixed(), getType(), INTERNAL_LOW);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLow(BigDecimal newLow)
+ {
+ set(getMixed(), getType(), INTERNAL_LOW, newLow);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLow()
+ {
+ unset(getMixed(), getType(), INTERNAL_LOW);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLow()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_LOW);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public double getVolume()
+ {
+ return ((Double)get(getMixed(), getType(), INTERNAL_VOLUME)).doubleValue();
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVolume(double newVolume)
+ {
+ set(getMixed(), getType(), INTERNAL_VOLUME, new Double(newVolume));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetVolume()
+ {
+ unset(getMixed(), getType(), INTERNAL_VOLUME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetVolume()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_VOLUME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public double getChange1()
+ {
+ return ((Double)get(getMixed(), getType(), INTERNAL_CHANGE1)).doubleValue();
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setChange1(double newChange1)
+ {
+ set(getMixed(), getType(), INTERNAL_CHANGE1, new Double(newChange1));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetChange1()
+ {
+ unset(getMixed(), getType(), INTERNAL_CHANGE1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetChange1()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_CHANGE1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getQuotes()
+ {
+ return getList(getMixed(), getType(), INTERNAL_QUOTES);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return removeFromSequence(getMixed(), otherEnd, changeContext);
+ case QUOTES:
+ return removeFromList(getQuotes(), 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 MIXED:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getMixed();
+ case SYMBOL:
+ return getSymbol();
+ case COMPANY_NAME:
+ return getCompanyName();
+ case PRICE:
+ return getPrice();
+ case OPEN1:
+ return getOpen1();
+ case HIGH:
+ return getHigh();
+ case LOW:
+ return getLow();
+ case VOLUME:
+ return new Double(getVolume());
+ case CHANGE1:
+ return new Double(getChange1());
+ case QUOTES:
+ return getQuotes();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ setSequence(getMixed(), newValue);
+ return;
+ case SYMBOL:
+ setSymbol((String)newValue);
+ return;
+ case COMPANY_NAME:
+ setCompanyName((String)newValue);
+ return;
+ case PRICE:
+ setPrice((BigDecimal)newValue);
+ return;
+ case OPEN1:
+ setOpen1((BigDecimal)newValue);
+ return;
+ case HIGH:
+ setHigh((BigDecimal)newValue);
+ return;
+ case LOW:
+ setLow((BigDecimal)newValue);
+ return;
+ case VOLUME:
+ setVolume(((Double)newValue).doubleValue());
+ return;
+ case CHANGE1:
+ setChange1(((Double)newValue).doubleValue());
+ return;
+ case QUOTES:
+ getQuotes().clear();
+ getQuotes().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ unsetSequence(getMixed());
+ return;
+ case SYMBOL:
+ unsetSymbol();
+ return;
+ case COMPANY_NAME:
+ unsetCompanyName();
+ return;
+ case PRICE:
+ unsetPrice();
+ return;
+ case OPEN1:
+ unsetOpen1();
+ return;
+ case HIGH:
+ unsetHigh();
+ return;
+ case LOW:
+ unsetLow();
+ return;
+ case VOLUME:
+ unsetVolume();
+ return;
+ case CHANGE1:
+ unsetChange1();
+ return;
+ case QUOTES:
+ getQuotes().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return mixed != null && !isSequenceEmpty(getMixed());
+ case SYMBOL:
+ return isSetSymbol();
+ case COMPANY_NAME:
+ return isSetCompanyName();
+ case PRICE:
+ return isSetPrice();
+ case OPEN1:
+ return isSetOpen1();
+ case HIGH:
+ return isSetHigh();
+ case LOW:
+ return isSetLow();
+ case VOLUME:
+ return isSetVolume();
+ case CHANGE1:
+ return isSetChange1();
+ case QUOTES:
+ return !getQuotes().isEmpty();
+ }
+ 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(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MixedQuoteImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
new file mode 100644
index 0000000000..d9cb3ac080
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
@@ -0,0 +1,335 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import com.example.sequences.MixedRepeatingChoice;
+import com.example.sequences.SequencesFactory;
+
+import commonj.sdo.Sequence;
+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>Mixed Repeating Choice</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getB <em>B</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MixedRepeatingChoiceImpl extends DataObjectBase implements MixedRepeatingChoice
+{
+
+ public final static int MIXED = -1;
+
+ public final static int GROUP = -2;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SDO_PROPERTY_COUNT = 2;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -2;
+
+
+ /**
+ * The internal feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_MIXED = 0;
+
+ /**
+ * 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 INTERNAL_GROUP = 1;
+
+ /**
+ * 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 INTERNAL_A = 2;
+
+ /**
+ * 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 INTERNAL_B = 3;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 4;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_MIXED: return MIXED;
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence mixed = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MixedRepeatingChoiceImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getMixedRepeatingChoice();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getMixed()
+ {
+ if (mixed == null)
+ {
+ mixed = createSequence(INTERNAL_MIXED);
+ }
+ return mixed;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getA()
+ {
+ return getList(getGroup(), getType(), INTERNAL_A);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getB()
+ {
+ return getList(getGroup(), getType(), INTERNAL_B);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return removeFromSequence(getMixed(), otherEnd, changeContext);
+ case GROUP:
+ return removeFromSequence(getGroup(), 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 MIXED:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getMixed();
+ case GROUP:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup();
+ case A:
+ return getA();
+ case B:
+ return getB();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ setSequence(getMixed(), newValue);
+ return;
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case A:
+ getA().clear();
+ getA().addAll((Collection)newValue);
+ return;
+ case B:
+ getB().clear();
+ getB().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ unsetSequence(getMixed());
+ return;
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case A:
+ getA().clear();
+ return;
+ case B:
+ getB().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return mixed != null && !isSequenceEmpty(getMixed());
+ case GROUP:
+ return !isSequenceEmpty(getGroup());
+ case A:
+ return !getA().isEmpty();
+ case B:
+ return !getB().isEmpty();
+ }
+ 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(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MixedRepeatingChoiceImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
new file mode 100644
index 0000000000..376a8471cf
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
@@ -0,0 +1,299 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import com.example.sequences.RepeatingChoice;
+import com.example.sequences.SequencesFactory;
+
+import commonj.sdo.Sequence;
+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>Repeating Choice</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.RepeatingChoiceImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.impl.RepeatingChoiceImpl#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.impl.RepeatingChoiceImpl#getB <em>B</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RepeatingChoiceImpl extends DataObjectBase implements RepeatingChoice
+{
+
+ public final static int GROUP = -1;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SDO_PROPERTY_COUNT = 2;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -1;
+
+
+ /**
+ * The internal feature id for the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_GROUP = 0;
+
+ /**
+ * 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 INTERNAL_A = 1;
+
+ /**
+ * 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 INTERNAL_B = 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_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroup()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence group = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepeatingChoiceImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getRepeatingChoice();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ if (group == null)
+ {
+ group = createSequence(INTERNAL_GROUP);
+ }
+ return group;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getA()
+ {
+ return getList(getGroup(), getType(), INTERNAL_A);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getB()
+ {
+ return getList(getGroup(), getType(), INTERNAL_B);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return removeFromSequence(getGroup(), 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 GROUP:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup();
+ case A:
+ return getA();
+ case B:
+ return getB();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case A:
+ getA().clear();
+ getA().addAll((Collection)newValue);
+ return;
+ case B:
+ getB().clear();
+ getB().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case A:
+ getA().clear();
+ return;
+ case B:
+ getB().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return group != null && !isSequenceEmpty(getGroup());
+ case A:
+ return !getA().isEmpty();
+ case B:
+ return !getB().isEmpty();
+ }
+ 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(" (group: ");
+ result.append(group);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RepeatingChoiceImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
new file mode 100644
index 0000000000..84631cb06d
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
@@ -0,0 +1,770 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import commonj.sdo.helper.HelperContext;
+import org.apache.tuscany.sdo.helper.TypeHelperImpl;
+
+import com.example.sequences.*;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.Property;
+import commonj.sdo.Type;
+
+import org.apache.tuscany.sdo.impl.FactoryBase;
+
+import org.apache.tuscany.sdo.model.ModelFactory;
+
+import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * Generator information:
+ * patternVersion=1.2; -prefix Sequences
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SequencesFactoryImpl extends FactoryBase implements SequencesFactory
+{
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_URI = "http://www.example.com/sequences";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String NAMESPACE_PREFIX = "seq";
+
+ /**
+ * 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 MIXED_QUOTE = 1;
+ public static final int MIXED_REPEATING_CHOICE = 2;
+ public static final int REPEATING_CHOICE = 3;
+ public static final int TWO_RCS = 4;
+ public static final int TWO_RCS_MIXED = 5;
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SequencesFactoryImpl()
+ {
+ super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.sequences");
+ }
+
+ /**
+ * 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");
+ }
+
+ //Register dependent packages with provided scope
+ ModelFactory.INSTANCE.register(scope);
+
+ // Initialize this package
+ 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 MIXED_QUOTE: return (DataObject)createMixedQuote();
+ case MIXED_REPEATING_CHOICE: return (DataObject)createMixedRepeatingChoice();
+ case REPEATING_CHOICE: return (DataObject)createRepeatingChoice();
+ case TWO_RCS: return (DataObject)createTwoRCs();
+ case TWO_RCS_MIXED: return (DataObject)createTwoRCsMixed();
+ default:
+ return super.create(typeNumber);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MixedQuote createMixedQuote()
+ {
+ MixedQuoteImpl mixedQuote = new MixedQuoteImpl();
+ return mixedQuote;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MixedRepeatingChoice createMixedRepeatingChoice()
+ {
+ MixedRepeatingChoiceImpl mixedRepeatingChoice = new MixedRepeatingChoiceImpl();
+ return mixedRepeatingChoice;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RepeatingChoice createRepeatingChoice()
+ {
+ RepeatingChoiceImpl repeatingChoice = new RepeatingChoiceImpl();
+ return repeatingChoice;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TwoRCs createTwoRCs()
+ {
+ TwoRCsImpl twoRCs = new TwoRCsImpl();
+ return twoRCs;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TwoRCsMixed createTwoRCsMixed()
+ {
+ TwoRCsMixedImpl twoRCsMixed = new TwoRCsMixedImpl();
+ return twoRCsMixed;
+ }
+
+ // Following creates and initializes SDO metadata for the supported types.
+ protected Type mixedQuoteType = null;
+
+ public Type getMixedQuote()
+ {
+ return mixedQuoteType;
+ }
+
+ protected Type mixedRepeatingChoiceType = null;
+
+ public Type getMixedRepeatingChoice()
+ {
+ return mixedRepeatingChoiceType;
+ }
+
+ protected Type repeatingChoiceType = null;
+
+ public Type getRepeatingChoice()
+ {
+ return repeatingChoiceType;
+ }
+
+ protected Type twoRCsType = null;
+
+ public Type getTwoRCs()
+ {
+ return twoRCsType;
+ }
+
+ protected Type twoRCsMixedType = null;
+
+ public Type getTwoRCsMixed()
+ {
+ return twoRCsMixedType;
+ }
+
+
+ private static SequencesFactoryImpl instance = null;
+ public static SequencesFactoryImpl init()
+ {
+ if (instance != null ) return instance;
+ instance = new SequencesFactoryImpl();
+
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
+ // Create package meta-data objects
+ instance.createMetaData();
+
+ // Initialize created meta-data
+ instance.initializeMetaData();
+
+ // Mark meta-data to indicate it can't be changed
+ //theSequencesFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
+
+ return instance;
+ }
+
+ private boolean isCreated = false;
+
+ public void createMetaData()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create types and their properties
+ mixedQuoteType = createType(false, MIXED_QUOTE);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_MIXED);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_SYMBOL);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_COMPANY_NAME);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_PRICE);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_OPEN1);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_HIGH);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_LOW);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_VOLUME);
+ createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_CHANGE1);
+ createProperty(false, mixedQuoteType,MixedQuoteImpl.INTERNAL_QUOTES);
+ 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;
+
+ public void initializeMetaData()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Obtain other dependent packages
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
+ Property property = null;
+
+ // Add supertypes to types
+
+ // Initialize types and properties
+ initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote", false);
+ property = getLocalProperty(mixedQuoteType, 0);
+ initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false);
+
+ property = getLocalProperty(mixedQuoteType, 1);
+ initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 2);
+ initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 3);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 4);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 5);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 6);
+ initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 7);
+ initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true);
+
+ property = getLocalProperty(mixedQuoteType, 8);
+ initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true);
+
+ 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 = getLocalProperty(mixedRepeatingChoiceType, 0);
+ initializeProperty(property, getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false);
+
+ property = getLocalProperty(mixedRepeatingChoiceType, 1);
+ initializeProperty(property, getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
+
+ property = getLocalProperty(mixedRepeatingChoiceType, 2);
+ initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
+
+ property = getLocalProperty(mixedRepeatingChoiceType, 3);
+ initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true);
+
+ initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice", false);
+ property = getLocalProperty(repeatingChoiceType, 0);
+ initializeProperty(property, getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false);
+
+ property = getLocalProperty(repeatingChoiceType, 1);
+ initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true);
+
+ property = getLocalProperty(repeatingChoiceType, 2);
+ initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true);
+
+ initializeType(twoRCsType, TwoRCs.class, "TwoRCs", false);
+ property = getLocalProperty(twoRCsType, 0);
+ initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false);
+
+ property = getLocalProperty(twoRCsType, 1);
+ initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true);
+
+ property = getLocalProperty(twoRCsType, 2);
+ initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true);
+
+ property = getLocalProperty(twoRCsType, 3);
+ initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, true, false);
+
+ property = getLocalProperty(twoRCsType, 4);
+ initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false);
+
+ property = getLocalProperty(twoRCsType, 5);
+ initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true);
+
+ property = getLocalProperty(twoRCsType, 6);
+ initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true);
+
+ initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed", false);
+ property = getLocalProperty(twoRCsMixedType, 0);
+ initializeProperty(property, getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false);
+
+ property = getLocalProperty(twoRCsMixedType, 1);
+ initializeProperty(property, getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ property = getLocalProperty(twoRCsMixedType, 2);
+ initializeProperty(property, theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ property = getLocalProperty(twoRCsMixedType, 3);
+ initializeProperty(property, theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ property = getLocalProperty(twoRCsMixedType, 4);
+ initializeProperty(property, theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, true, true);
+
+ property = getLocalProperty(twoRCsMixedType, 5);
+ initializeProperty(property, getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ property = getLocalProperty(twoRCsMixedType, 6);
+ initializeProperty(property, theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ property = getLocalProperty(twoRCsMixedType, 7);
+ initializeProperty(property, theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCsMixed.class, false, false, true);
+
+ createXSDMetaData(theModelPackageImpl);
+ }
+
+ protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
+ {
+ super.initXSD();
+
+ Property property = null;
+
+
+ property = createGlobalProperty
+ ("mixedStockQuote",
+ this.getMixedQuote(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "mixedStockQuote",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("mrc",
+ this.getMixedRepeatingChoice(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "mrc",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("mrc2",
+ this.getTwoRCsMixed(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "mrc2",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("rc",
+ this.getRepeatingChoice(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "rc",
+ "namespace", "##targetNamespace"
+ });
+
+ property = createGlobalProperty
+ ("rc2",
+ this.getTwoRCs(),
+ new String[]
+ {
+ "kind", "element",
+ "name", "rc2",
+ "namespace", "##targetNamespace"
+ });
+
+ addXSDMapping
+ (mixedQuoteType,
+ new String[]
+ {
+ "name", "MixedQuote",
+ "kind", "mixed"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_MIXED),
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_SYMBOL),
+ new String[]
+ {
+ "kind", "element",
+ "name", "symbol"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_COMPANY_NAME),
+ new String[]
+ {
+ "kind", "element",
+ "name", "companyName"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_PRICE),
+ new String[]
+ {
+ "kind", "element",
+ "name", "price"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_OPEN1),
+ new String[]
+ {
+ "kind", "element",
+ "name", "open1"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_HIGH),
+ new String[]
+ {
+ "kind", "element",
+ "name", "high"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_LOW),
+ new String[]
+ {
+ "kind", "element",
+ "name", "low"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_VOLUME),
+ new String[]
+ {
+ "kind", "element",
+ "name", "volume"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_CHANGE1),
+ new String[]
+ {
+ "kind", "element",
+ "name", "change1"
+ });
+
+ addXSDMapping
+ (getProperty(mixedQuoteType, MixedQuoteImpl.INTERNAL_QUOTES),
+ new String[]
+ {
+ "kind", "element",
+ "name", "quotes"
+ });
+
+ addXSDMapping
+ (mixedRepeatingChoiceType,
+ new String[]
+ {
+ "name", "MixedRepeatingChoice",
+ "kind", "mixed"
+ });
+
+ addXSDMapping
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_MIXED),
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+
+ addXSDMapping
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_GROUP),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:1"
+ });
+
+ addXSDMapping
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_A),
+ new String[]
+ {
+ "kind", "element",
+ "name", "a",
+ "group", "#group:1"
+ });
+
+ addXSDMapping
+ (getProperty(mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.INTERNAL_B),
+ new String[]
+ {
+ "kind", "element",
+ "name", "b",
+ "group", "#group:1"
+ });
+
+ addXSDMapping
+ (repeatingChoiceType,
+ new String[]
+ {
+ "name", "RepeatingChoice",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_GROUP),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:0"
+ });
+
+ addXSDMapping
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_A),
+ new String[]
+ {
+ "kind", "element",
+ "name", "a",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (getProperty(repeatingChoiceType, RepeatingChoiceImpl.INTERNAL_B),
+ new String[]
+ {
+ "kind", "element",
+ "name", "b",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (twoRCsType,
+ new String[]
+ {
+ "name", "TwoRCs",
+ "kind", "elementOnly"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:0"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_A),
+ new String[]
+ {
+ "kind", "element",
+ "name", "a",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_B),
+ new String[]
+ {
+ "kind", "element",
+ "name", "b",
+ "group", "#group:0"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_SPLIT),
+ new String[]
+ {
+ "kind", "element",
+ "name", "split"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_GROUP1),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:4"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Y),
+ new String[]
+ {
+ "kind", "element",
+ "name", "y",
+ "group", "#group:4"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsType, TwoRCsImpl.INTERNAL_Z),
+ new String[]
+ {
+ "kind", "element",
+ "name", "z",
+ "group", "#group:4"
+ });
+
+ addXSDMapping
+ (twoRCsMixedType,
+ new String[]
+ {
+ "name", "TwoRCsMixed",
+ "kind", "mixed"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_MIXED),
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:1"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_A),
+ new String[]
+ {
+ "kind", "element",
+ "name", "a",
+ "group", "#group:1"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_B),
+ new String[]
+ {
+ "kind", "element",
+ "name", "b",
+ "group", "#group:1"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_SPLIT),
+ new String[]
+ {
+ "kind", "element",
+ "name", "split"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_GROUP1),
+ new String[]
+ {
+ "kind", "group",
+ "name", "group:5"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Y),
+ new String[]
+ {
+ "kind", "element",
+ "name", "y",
+ "group", "#group:5"
+ });
+
+ addXSDMapping
+ (getProperty(twoRCsMixedType, TwoRCsMixedImpl.INTERNAL_Z),
+ new String[]
+ {
+ "kind", "element",
+ "name", "z",
+ "group", "#group:5"
+ });
+
+ }
+
+} //SequencesFactoryImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
new file mode 100644
index 0000000000..c1e385ec63
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
@@ -0,0 +1,521 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import com.example.sequences.SequencesFactory;
+import com.example.sequences.TwoRCs;
+
+import commonj.sdo.Sequence;
+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>Two RCs</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getB <em>B</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getSplit <em>Split</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getGroup1 <em>Group1</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getY <em>Y</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsImpl#getZ <em>Z</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TwoRCsImpl extends DataObjectBase implements TwoRCs
+{
+
+ public final static int GROUP = -1;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SPLIT = 2;
+
+ public final static int GROUP1 = -2;
+
+ public final static int Y = 3;
+
+ public final static int Z = 4;
+
+ public final static int SDO_PROPERTY_COUNT = 5;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -2;
+
+
+ /**
+ * The internal feature id for the '<em><b>Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_GROUP = 0;
+
+ /**
+ * 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 INTERNAL_A = 1;
+
+ /**
+ * 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 INTERNAL_B = 2;
+
+ /**
+ * The internal feature id for the '<em><b>Split</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_SPLIT = 3;
+
+ /**
+ * 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 INTERNAL_GROUP1 = 4;
+
+ /**
+ * 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 INTERNAL_Y = 5;
+
+ /**
+ * 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 INTERNAL_Z = 6;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 7;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ case INTERNAL_SPLIT: return SPLIT;
+ case INTERNAL_GROUP1: return GROUP1;
+ case INTERNAL_Y: return Y;
+ case INTERNAL_Z: return Z;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroup()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence group = 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;
+
+ /**
+ * The cached value of the '{@link #getSplit() <em>Split</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSplit()
+ * @generated
+ * @ordered
+ */
+ 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 -->
+ * @see #getGroup1()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence group1 = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TwoRCsImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getTwoRCs();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ if (group == null)
+ {
+ group = createSequence(INTERNAL_GROUP);
+ }
+ return group;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getA()
+ {
+ return getList(getGroup(), getType(), INTERNAL_A);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getB()
+ {
+ return getList(getGroup(), getType(), INTERNAL_B);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSplit()
+ {
+ return split;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSplit(String newSplit)
+ {
+ String oldSplit = split;
+ split = newSplit;
+ boolean oldSplit_set_ = split_set_;
+ split_set_ = true;
+ if (isNotifying())
+ notify(ChangeKind.SET, INTERNAL_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.UNSET, INTERNAL_SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSplit()
+ {
+ return split_set_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup1()
+ {
+ if (group1 == null)
+ {
+ group1 = createSequence(INTERNAL_GROUP1);
+ }
+ return group1;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getY()
+ {
+ return getList(getGroup1(), getType(), INTERNAL_Y);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getZ()
+ {
+ return getList(getGroup1(), getType(), INTERNAL_Z);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return removeFromSequence(getGroup(), otherEnd, changeContext);
+ case GROUP1:
+ return removeFromSequence(getGroup1(), 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 GROUP:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup();
+ case A:
+ return getA();
+ case B:
+ return getB();
+ case SPLIT:
+ return getSplit();
+ case GROUP1:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup1();
+ case Y:
+ return getY();
+ case Z:
+ return getZ();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case A:
+ getA().clear();
+ getA().addAll((Collection)newValue);
+ return;
+ case B:
+ getB().clear();
+ getB().addAll((Collection)newValue);
+ return;
+ case SPLIT:
+ setSplit((String)newValue);
+ return;
+ case GROUP1:
+ setSequence(getGroup1(), newValue);
+ return;
+ case Y:
+ getY().clear();
+ getY().addAll((Collection)newValue);
+ return;
+ case Z:
+ getZ().clear();
+ getZ().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case A:
+ getA().clear();
+ return;
+ case B:
+ getB().clear();
+ return;
+ case SPLIT:
+ unsetSplit();
+ return;
+ case GROUP1:
+ unsetSequence(getGroup1());
+ return;
+ case Y:
+ getY().clear();
+ return;
+ case Z:
+ getZ().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case GROUP:
+ return group != null && !isSequenceEmpty(getGroup());
+ case A:
+ return !getA().isEmpty();
+ case B:
+ return !getB().isEmpty();
+ case SPLIT:
+ return isSetSplit();
+ case GROUP1:
+ return group1 != null && !isSequenceEmpty(getGroup1());
+ case Y:
+ return !getY().isEmpty();
+ case Z:
+ return !getZ().isEmpty();
+ }
+ 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(" (group: ");
+ result.append(group);
+ result.append(", split: ");
+ if (split_set_) result.append(split); else result.append("<unset>");
+ result.append(", group1: ");
+ result.append(group1);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TwoRCsImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
new file mode 100644
index 0000000000..0d48a9df69
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
@@ -0,0 +1,499 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.example.sequences.impl;
+
+import com.example.sequences.SequencesFactory;
+import com.example.sequences.TwoRCsMixed;
+
+import commonj.sdo.Sequence;
+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>Two RCs Mixed</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup <em>Group</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getA <em>A</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getB <em>B</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getSplit <em>Split</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup1 <em>Group1</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getY <em>Y</em>}</li>
+ * <li>{@link com.example.sequences.impl.TwoRCsMixedImpl#getZ <em>Z</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed
+{
+
+ public final static int MIXED = -1;
+
+ public final static int GROUP = -2;
+
+ public final static int A = 0;
+
+ public final static int B = 1;
+
+ public final static int SPLIT = 2;
+
+ public final static int GROUP1 = -3;
+
+ public final static int Y = 3;
+
+ public final static int Z = 4;
+
+ public final static int SDO_PROPERTY_COUNT = 5;
+
+ public final static int EXTENDED_PROPERTY_COUNT = -3;
+
+
+ /**
+ * The internal feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_MIXED = 0;
+
+ /**
+ * 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 INTERNAL_GROUP = 1;
+
+ /**
+ * 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 INTERNAL_A = 2;
+
+ /**
+ * 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 INTERNAL_B = 3;
+
+ /**
+ * The internal feature id for the '<em><b>Split</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_SPLIT = 4;
+
+ /**
+ * 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 INTERNAL_GROUP1 = 5;
+
+ /**
+ * 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 INTERNAL_Y = 6;
+
+ /**
+ * 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 INTERNAL_Z = 7;
+
+ /**
+ * The number of properties for this type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public final static int INTERNAL_PROPERTY_COUNT = 8;
+
+ protected int internalConvertIndex(int internalIndex)
+ {
+ switch (internalIndex)
+ {
+ case INTERNAL_MIXED: return MIXED;
+ case INTERNAL_GROUP: return GROUP;
+ case INTERNAL_A: return A;
+ case INTERNAL_B: return B;
+ case INTERNAL_SPLIT: return SPLIT;
+ case INTERNAL_GROUP1: return GROUP1;
+ case INTERNAL_Y: return Y;
+ case INTERNAL_Z: return Z;
+ }
+ return super.internalConvertIndex(internalIndex);
+ }
+
+
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+
+ protected Sequence mixed = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TwoRCsMixedImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getStaticType()
+ {
+ return ((SequencesFactoryImpl)SequencesFactory.INSTANCE).getTwoRCsMixed();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStaticPropertyCount()
+ {
+ return INTERNAL_PROPERTY_COUNT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getMixed()
+ {
+ if (mixed == null)
+ {
+ mixed = createSequence(INTERNAL_MIXED);
+ }
+ return mixed;
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup()
+ {
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getA()
+ {
+ return getList(getGroup(), getType(), INTERNAL_A);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getB()
+ {
+ return getList(getGroup(), getType(), INTERNAL_B);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSplit()
+ {
+ return (String)get(getMixed(), getType(), INTERNAL_SPLIT);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSplit(String newSplit)
+ {
+ set(getMixed(), getType(), INTERNAL_SPLIT, newSplit);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSplit()
+ {
+ unset(getMixed(), getType(), INTERNAL_SPLIT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSplit()
+ {
+ return isSet(getMixed(), getType(), INTERNAL_SPLIT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Sequence getGroup1()
+ {
+ return createSequence(getMixed(), getType(), INTERNAL_GROUP1);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getY()
+ {
+ return getList(getGroup1(), getType(), INTERNAL_Y);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getZ()
+ {
+ return getList(getGroup1(), getType(), INTERNAL_Z);
+ }
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return removeFromSequence(getMixed(), otherEnd, changeContext);
+ case GROUP:
+ return removeFromSequence(getGroup(), otherEnd, changeContext);
+ case GROUP1:
+ return removeFromSequence(getGroup1(), 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 MIXED:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getMixed();
+ case GROUP:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup();
+ case A:
+ return getA();
+ case B:
+ return getB();
+ case SPLIT:
+ return getSplit();
+ case GROUP1:
+ // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
+ //if (coreType)
+ return getGroup1();
+ case Y:
+ return getY();
+ case Z:
+ return getZ();
+ }
+ return super.get(propertyIndex, resolve);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void set(int propertyIndex, Object newValue)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ setSequence(getMixed(), newValue);
+ return;
+ case GROUP:
+ setSequence(getGroup(), newValue);
+ return;
+ case A:
+ getA().clear();
+ getA().addAll((Collection)newValue);
+ return;
+ case B:
+ getB().clear();
+ getB().addAll((Collection)newValue);
+ return;
+ case SPLIT:
+ setSplit((String)newValue);
+ return;
+ case GROUP1:
+ setSequence(getGroup1(), newValue);
+ return;
+ case Y:
+ getY().clear();
+ getY().addAll((Collection)newValue);
+ return;
+ case Z:
+ getZ().clear();
+ getZ().addAll((Collection)newValue);
+ return;
+ }
+ super.set(propertyIndex, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unset(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ unsetSequence(getMixed());
+ return;
+ case GROUP:
+ unsetSequence(getGroup());
+ return;
+ case A:
+ getA().clear();
+ return;
+ case B:
+ getB().clear();
+ return;
+ case SPLIT:
+ unsetSplit();
+ return;
+ case GROUP1:
+ unsetSequence(getGroup1());
+ return;
+ case Y:
+ getY().clear();
+ return;
+ case Z:
+ getZ().clear();
+ return;
+ }
+ super.unset(propertyIndex);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSet(int propertyIndex)
+ {
+ switch (propertyIndex)
+ {
+ case MIXED:
+ return mixed != null && !isSequenceEmpty(getMixed());
+ case GROUP:
+ return !isSequenceEmpty(getGroup());
+ case A:
+ return !getA().isEmpty();
+ case B:
+ return !getB().isEmpty();
+ case SPLIT:
+ return isSetSplit();
+ case GROUP1:
+ return !isSequenceEmpty(getGroup1());
+ case Y:
+ return !getY().isEmpty();
+ case Z:
+ return !getZ().isEmpty();
+ }
+ 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(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TwoRCsMixedImpl
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
new file mode 100644
index 0000000000..67b0e1a3fd
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
@@ -0,0 +1,48 @@
+/**
+ *
+ * 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 org.apache.tuscany.sdo.test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class AllTests extends TestCase {
+
+
+ public static TestSuite suite() {
+
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(GeneratedPackagesTestCase.class);
+
+ return suite;
+ }
+
+
+
+ /**
+ * Runs the test suite using the textual runner.
+ */
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(suite());
+ }
+}
+
+
+
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java
new file mode 100644
index 0000000000..290f27338a
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java
@@ -0,0 +1,70 @@
+/*
+ * 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 org.apache.tuscany.sdo.test;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
+
+import junit.framework.TestCase;
+
+
+public class GeneratedPackagesTestCase extends TestCase
+{
+ static String expectedNamespace = "http://www.example.com/sequences";
+
+ public void testPackageValidity()
+ {
+ XSD2JavaGenerator codeGen = new XSD2JavaGenerator();
+ String [] genArgs = { "-schemaNamespace", "all", "-noGenerate", "src/test/resources/sequences.xsd" };
+ codeGen.generateFromXMLSchema( genArgs );
+ List packages = codeGen.getGeneratedPackageInfo();
+
+ for (Iterator iter = packages.iterator(); iter.hasNext();)
+ {
+ XSD2JavaGenerator.GeneratedPackage packageInfo = (XSD2JavaGenerator.GeneratedPackage)iter.next();
+ assertTrue(expectedNamespace.equals(packageInfo.getNamespace()));
+
+ String name;
+ boolean validatedMixedQuote = false;
+ boolean validatedRC = false;
+ for (Iterator iterClass = packageInfo.getClasses().iterator(); iterClass.hasNext();)
+ {
+ XSD2JavaGenerator.GeneratedPackage.PackageClassInfo classInfo = (XSD2JavaGenerator.GeneratedPackage.PackageClassInfo)iterClass.next();
+ name = classInfo.getName();
+
+ if( "mixedStockQuote".equals(name))
+ {
+ assertTrue("com.example.sequences.MixedQuote".equals(classInfo.getClassName()));
+ validatedMixedQuote = true;
+ }
+
+ if( "rc".equals(name))
+ {
+ assertTrue("com.example.sequences.RepeatingChoice".equals(classInfo.getClassName()));
+ validatedRC = true;
+ }
+ }
+ assertTrue(validatedMixedQuote);
+ assertTrue(validatedRC);
+ }
+ }
+}
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/TUSCANY1050.xsd b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/TUSCANY1050.xsd
new file mode 100644
index 0000000000..a218eb574c
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/TUSCANY1050.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *
+ * 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.
+ * -->
+<xsd:schema xmlns:tns="http://test.data"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://test.data">
+
+ <xsd:element name="description" type="tns:description"/>
+ <xsd:complexType name="description">
+ <xsd:sequence>
+ <xsd:element name="field1" type="xsd:string"/>
+ <xsd:element name="field2" type="xsd:string"/>
+ <xsd:element name="field3" type="xsd:string"/>
+ <xsd:element name="field4" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="Wrapper" type="tns:Wrapper"/>
+ <xsd:complexType name="Wrapper">
+ <xsd:sequence>
+ <xsd:element name="description" nillable="true" type="tns:description"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
+
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/enum.xsd b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/enum.xsd
new file mode 100644
index 0000000000..6c906539a9
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/enum.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<xsd:schema
+ targetNamespace="http://www.example.com/simple"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:simple="http://www.example.com/simple">
+
+ <xsd:element name="stockQuote" type="simple:Quote"/>
+
+ <xsd:simpleType name="PriceClass">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Large"/>
+ <xsd:enumeration value="Medium"/>
+ <xsd:enumeration value="Small"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="Quote">
+ <xsd:sequence>
+ <xsd:element name="symbol" type="xsd:string"/>
+ <xsd:element name="companyName" type="xsd:string"/>
+ <xsd:element name="priceClass" type="simple:PriceClass"/>
+ <xsd:element name="price" type="xsd:decimal"/>
+ <xsd:element name="open1" type="xsd:decimal"/>
+ <xsd:element name="high" type="xsd:decimal"/>
+ <xsd:element name="low" type="xsd:decimal"/>
+ <xsd:element name="volume" type="xsd:double"/>
+ <xsd:element name="change1" type="xsd:double"/>
+ <xsd:element name="quotes" type="simple:Quote" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
new file mode 100644
index 0000000000..0aa17bb50a
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<sequences:mrc xmlns:sequences="http://www.example.com/sequences"><b>1</b><a>foo</a>some mixed text<a>bar</a><b>2</b></sequences:mrc>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedStaticTestResult.xml b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedStaticTestResult.xml
new file mode 100644
index 0000000000..9136f0780d
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedStaticTestResult.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<sequences:mixedStockQuote xmlns:sequences="http://www.example.com/sequences">
+ <symbol>fbnt</symbol>
+ <companyName>FlyByNightTechnology</companyName>
+ some text
+ <quotes><price>2000.0</price></quotes>
+ more text
+ <price>1000.0</price>
+</sequences:mixedStockQuote>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoice.xsd b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoice.xsd
new file mode 100644
index 0000000000..1d566da671
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoice.xsd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<xsd:schema xmlns:repchoice="http://www.example.com/repchoice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/repchoice">
+
+ <xsd:element name="rc" type="repchoice:RCType"/>
+
+ <xsd:complexType name="RCType">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="s" type="xsd:string"/>
+ <xsd:element name="i" type="xsd:int"/>
+ <xsd:element name="f" type="xsd:float"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml
new file mode 100644
index 0000000000..2719457b6d
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<sequences:rc xmlns:sequences="http://www.example.com/sequences">
+ <b>1</b>
+ <a>foo</a>
+ <a>bar</a>
+ <b>2</b>
+</sequences:rc>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sdoModel.xsd b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sdoModel.xsd
new file mode 100644
index 0000000000..6b596c5b36
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sdoModel.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+ -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java" targetNamespace="commonj.sdo">
+
+ <!-- Dummy XSD definition of special SDO ChangeSummaryType -->
+ <xsd:simpleType name="ChangeSummaryType" sdoJava:instanceClass="commonj.sdo.ChangeSummary">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+
+</xsd:schema>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sequences.xsd b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sequences.xsd
new file mode 100644
index 0000000000..b74a56eab7
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/sequences.xsd
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<xsd:schema xmlns:seq="http://www.example.com/sequences"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.example.com/sequences">
+
+ <xsd:element name="mixedStockQuote" type="seq:MixedQuote" />
+ <xsd:element name="rc" type="seq:RepeatingChoice" />
+ <xsd:element name="mrc" type="seq:MixedRepeatingChoice" />
+ <xsd:element name="rc2" type="seq:TwoRCs" />
+ <xsd:element name="mrc2" type="seq:TwoRCsMixed" />
+
+
+
+ <xsd:complexType mixed="true" name="MixedQuote">
+ <xsd:sequence>
+ <xsd:element name="symbol" type="xsd:string" />
+ <xsd:element name="companyName" type="xsd:string" />
+ <xsd:element name="price" type="xsd:decimal" />
+ <xsd:element name="open1" type="xsd:decimal" />
+ <xsd:element name="high" type="xsd:decimal" />
+ <xsd:element name="low" type="xsd:decimal" />
+ <xsd:element name="volume" type="xsd:double" />
+ <xsd:element name="change1" type="xsd:double" />
+ <xsd:element maxOccurs="unbounded" minOccurs="0"
+ name="quotes" type="seq:MixedQuote" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="RepeatingChoice">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType mixed="true" name="MixedRepeatingChoice">
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="TwoRCs">
+ <xsd:sequence>
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+
+ <xsd:element name="split" type="xsd:string" />
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="y" type="xsd:string" />
+ <xsd:element name="z" type="xsd:int" />
+ </xsd:choice>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType mixed="true" name="TwoRCsMixed">
+ <xsd:sequence>
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="a" type="xsd:string" />
+ <xsd:element name="b" type="xsd:int" />
+ </xsd:choice>
+
+ <xsd:element name="split" type="xsd:string" />
+
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element name="y" type="xsd:string" />
+ <xsd:element name="z" type="xsd:int" />
+ </xsd:choice>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
new file mode 100644
index 0000000000..a62cd66b58
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<sequences:rc2m xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sequences="http://www.example.com/sequences" xsi:type="sequences:TwoRCsMixed"><b>1</b>where will this appear?<a>foo</a><a>bar</a><b>2</b><split>pea</split><z>99</z><y>fred</y></sequences:rc2m>
diff --git a/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
new file mode 100644
index 0000000000..3585ad00d3
--- /dev/null
+++ b/sdo-java/branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ 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.
+ -->
+<sequences:rc2 xmlns:sequences="http://www.example.com/sequences">
+ <b>1</b>
+ <a>foo</a>
+ <a>bar</a>
+ <b>2</b>
+ <split>banana</split>
+ <z>99</z>
+ <y>fred</y>
+</sequences:rc2>