summaryrefslogtreecommitdiffstats
path: root/branches/sdo-1.0-incubating/tools
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-10 19:19:15 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-10 19:19:15 +0000
commitc993ba575bdd1530b7bbc0c6a19c32e66fce4b89 (patch)
tree94cfba65fe887c9017ea73727966d673e51d1ab7 /branches/sdo-1.0-incubating/tools
parentdc741421e88c3e4210b00f39877159c5117b99d3 (diff)
moving SDO branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834612 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sdo-1.0-incubating/tools')
-rw-r--r--branches/sdo-1.0-incubating/tools/pom.xml126
-rw-r--r--branches/sdo-1.0-incubating/tools/readme.htm44
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java244
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java724
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java466
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java46
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java54
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java52
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java4281
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java1147
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java250
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java27
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/DISCLAIMER7
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt207
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/MANIFEST.MF21
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/NOTICE14
-rw-r--r--branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/README.txt23
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Account.java93
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Customer.java144
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/CustomerFactory.java70
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java256
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java296
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java419
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerFactory.java79
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerType.java198
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomersType.java57
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/InfoType.java35
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java410
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java524
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java206
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java84
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java1237
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java332
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OneElementAndAnyAttr.java108
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OpenFactory.java61
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java323
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java245
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RCType.java103
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java61
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java322
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java269
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java491
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java102
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java88
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java97
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java184
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java198
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java756
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java325
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java289
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java770
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java511
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java489
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/Quote.java475
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/SimpleFactory.java61
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/CSFactory.java70
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/Quote.java475
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/QuoteBase.java91
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java368
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java346
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java1045
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java1045
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java326
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/A.java108
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/B.java92
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/Bprime.java90
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/SubgroupFactory.java79
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/AImpl.java310
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java256
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java264
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java351
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java53
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java131
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java55
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java96
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java115
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java76
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java102
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java75
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java86
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java288
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/CustomerAccount.xsd38
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/Open.xsd33
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/TUSCANY1050.xsd44
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/enum.xsd50
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customer.xsd47
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customers.xml39
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xml24
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xsd36
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xml24
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xsd36
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/extensible/nonamespace.xsd25
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml20
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/mixedStaticTestResult.xml27
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoice.xsd33
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml25
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/sdoModel.xsd28
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/sequences.xsd100
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/simple.xsd41
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/simpleWithChangeSummary.xsd49
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/subgroup.xsd48
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/subgroup1.xml23
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml20
-rw-r--r--branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml28
-rw-r--r--branches/sdo-1.0-incubating/tools/templates/Header.javajetinc6
-rw-r--r--branches/sdo-1.0-incubating/tools/templates/models/SDOClass.javajet1948
-rw-r--r--branches/sdo-1.0-incubating/tools/templates/models/SDOFactoryClass.javajet646
-rw-r--r--branches/sdo-1.0-incubating/tools/templates/models/generator.skeleton25
108 files changed, 0 insertions, 28357 deletions
diff --git a/branches/sdo-1.0-incubating/tools/pom.xml b/branches/sdo-1.0-incubating/tools/pom.xml
deleted file mode 100644
index e03f5140a9..0000000000
--- a/branches/sdo-1.0-incubating/tools/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?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.
--->
-<project>
- <parent>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo</artifactId>
- <version>1.0-incubating</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>tuscany-sdo-tools</artifactId>
- <name>Tuscany SDO Tools</name>
- <description>SDO Tools.</description>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-lib</artifactId>
- <version>${pom.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-impl</artifactId>
- <version>${pom.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>codegen</artifactId>
- <version>${emfVersion}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>codegen-ecore</artifactId>
- <version>${emfVersion}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- <!-- this is needed because test program calls XMLHelper.save() and SDOXMLResourceImpl (in the sdo/impl project) uses StAX ??? -->
- <dependency>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>1.0.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Extension-Name>${project.artifactId}</Extension-Name>
- <Specification-Title>${project.name}</Specification-Title>
- <Specification-Vendor>${project.organization.name}</Specification-Vendor>
- <Specification-Version>${version}</Specification-Version>
- <Implementation-Title>${project.artifactId}</Implementation-Title>
- <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
- <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
- <Implementation-Version>${project.version}</Implementation-Version>
- <!--
- <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-SymbolicName>org.apache.tuscany.sdo.tools</Bundle-SymbolicName>
- <Bundle-Version>1.0.0</Bundle-Version>
- <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
- -->
- <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</Require-Bundle>
- <Export-Package>org.apache.tuscany.sdo.generate,org.apache.tuscany.sdo.generate.util</Export-Package>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <!-- <overview>${basedir}/src/main/java/org/apache/tuscany/sdo/overview.html</overview> -->
- <version>2.0</version>
- </configuration>
- <!-- <executions>
- <execution>
- <id>package</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions> -->
- </plugin>
-
- </plugins>
- </build>
-
-
-</project>
diff --git a/branches/sdo-1.0-incubating/tools/readme.htm b/branches/sdo-1.0-incubating/tools/readme.htm
deleted file mode 100644
index e7aa8d6718..0000000000
--- a/branches/sdo-1.0-incubating/tools/readme.htm
+++ /dev/null
@@ -1,44 +0,0 @@
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <!--
- 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.
- -->
-
-<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
-<meta content="text/css" http-equiv="Content-Style-Type"><title>Tuscany SDO Tools</title>
-
-<style type="text/css" media="all">
-@import url("../../css/maven-base.css");
-@import url("../../css/maven-theme.css");
-@import url("../../css/site.css");
-</style>
-<link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></head>
-
-<body>
-<h2>Tuscany SDO Tools</h2>
-<h3>Building SDO Tools</h3>
-
-To build the Tuscany SDO Java Generator tools, perform the following steps
-<ul>
-<li> Ensure that the environment variable JAVA_HOME is set to point to an installation of Java 5 (Java 1.5.0_6 works) </li>
-<li> Run the command "mvn" </li>
-</ul>
-<b>Note:</b> only the Interface2JavaGenerator class requires Java 5. You can build the XSD2JavaGenerator tool using a Java 1.4 JDK by removing the Interface2JavaGenerator.java file before running the "mvn" command.
-
-</body></html>
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
deleted file mode 100644
index 9cb5d64c38..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/**
- *
- * 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.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-
-import commonj.sdo.helper.TypeHelper;
-
-public class Interface2JavaGenerator extends JavaGenerator
-{
- /**
- * Generate static SDOs from Java interfaces
- *
- * Usage arguments: see JavaGenerator
- *
- * [ -targetDirectory <target-root-directory> ]
- * [ -javaPackage <java-package-name> ]
- * [ -namespace <xsd-namespace> ]
- * [ other options ... ]
- * interface-names
- *
- * Options:
- *
- * -namespace
- * Set the namespaceURI of the generated SDO Types to the specified value.
- *
- * NOTE: see the base class JavaGenerator for other options.
- *
- * Example:
- *
- * generate somepackage.InterfaceA somepackage.InterfaceB
- *
- */
- public static void main(String args[])
- {
- try
- {
- JavaGenerator generator = new Interface2JavaGenerator();
- generator.processArguments(args);
- generator.run(args);
- }
- catch (IllegalArgumentException e)
- {
- printUsage();
- }
- }
-
- protected String namespace = null;
-
- protected int handleArgument(String args[], int index)
- {
- if (args[index].equalsIgnoreCase("-namespace"))
- {
- namespace = args[++index];
- }
- else
- {
- return super.handleArgument(args, index);
- }
-
- return index + 1;
- }
-
- protected void run(String args[])
- {
- List javaInterfaces=new ArrayList();
-
- for (int index = inputIndex; index < args.length; ++index)
- {
- javaInterfaces.add(args[index]);
- }
-
- ClassLoader classLoader=JavaGenerator.class.getClassLoader();
- generateFromJavaInterfaces(classLoader, javaInterfaces, namespace, targetDirectory, javaPackage, prefix, genOptions);
- }
-
- public static void generateFromJavaInterfaces(ClassLoader classLoader, List javaInterfaces, String packageURI, String targetDirectory, String javaPackage, String prefix, int genOptions)
- {
- try
- {
- // Initialize the SDO runtime
- DataObjectUtil.initRuntime();
- EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
-
- // Create an EPackage for the generated SDO
- if (packageURI == null)
- packageURI = "http://" + javaPackage;
- EPackage implEPackage = EcoreFactory.eINSTANCE.createEPackage();
- implEPackage.setNsURI(packageURI);
- String shortName = shortName(packageURI);
- implEPackage.setName(shortName);
- implEPackage.setNsPrefix(shortName.toLowerCase());
- packageRegistry.put(packageURI, implEPackage);
-
- // Create EClasses for all the given Java interfaces
- Map eClasses = new HashMap();
- for (Iterator iter = javaInterfaces.iterator(); iter.hasNext();)
- {
- String interfaceName = (String)iter.next();
- Class instanceClass = Class.forName(interfaceName, true, classLoader);
-
- EClass implEClass = EcoreFactory.eINSTANCE.createEClass();
- String className = shortName(instanceClass.getName());
- implEClass.setName(className);
- implEClass.setInstanceClass(instanceClass);
-
- eClasses.put(instanceClass, implEClass);
- implEPackage.getEClassifiers().add(implEClass);
- }
-
- // Populate the EClasses with EAttributes and EReferences for their properties
- for (Iterator iter = implEPackage.getEClassifiers().iterator(); iter.hasNext();)
- {
- EClass implEClass = (EClass)iter.next();
- Class instanceClass = implEClass.getInstanceClass();
- Method[] methods = instanceClass.getMethods();
- for (int m = 0; m < methods.length; m++)
- {
- Method method = methods[m];
- String propertyName = null;
- if (method.getName().startsWith("get"))
- propertyName = method.getName().substring(3);
- else if (method.getName().startsWith("is"))
- propertyName = method.getName().substring(2);
-
- if (propertyName != null)
- {
- if (propertyName.length() > 1)
- propertyName = propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);
-
- Class propertyClass = method.getReturnType();
- EClass propertyEClass = (EClass)eClasses.get(propertyClass);
-
- if (propertyEClass != null)
- {
- // The property is another SDO, create an EReference to represent the property
- EReference reference = EcoreFactory.eINSTANCE.createEReference();
- reference.setName(propertyName);
- reference.setContainment(true);
- reference.setEType(propertyEClass);
- implEClass.getEStructuralFeatures().add(reference);
-
- }
- else
- {
- // The property is a List<T> and T is an SDO, created a 0..many EReference to represent the property
- if (propertyClass == List.class)
- {
- Type genericType = method.getGenericReturnType();
- if (genericType instanceof ParameterizedType)
- {
- ParameterizedType parameterizedType = (ParameterizedType)genericType;
- Type[] targs = parameterizedType.getActualTypeArguments();
- if (targs.length != 0 && eClasses.containsKey(targs[0]))
- {
- propertyEClass = (EClass)eClasses.get(targs[0]);
- if (propertyEClass != null)
- {
- EReference reference = EcoreFactory.eINSTANCE.createEReference();
- reference.setName(propertyName);
- reference.setContainment(true);
- reference.setEType(propertyEClass);
- reference.setUpperBound(-1);
- implEClass.getEStructuralFeatures().add(reference);
- }
- }
- }
- continue;
- }
-
- // The property is a regular Java type / not an SDO, create an EAttribute to represent it
- EAttribute attribute = EcoreFactory.eINSTANCE.createEAttribute();
- attribute.setName(propertyName);
- EDataType dataType = (EDataType)TypeHelper.INSTANCE.getType(propertyClass);
- attribute.setEType(dataType);
- implEClass.getEStructuralFeatures().add(attribute);
- }
- }
- }
- }
-
- generatePackages(packageRegistry.values(), packageURI, shortName, targetDirectory, javaPackage, prefix, genOptions);
- }
- catch (ClassNotFoundException e)
- {
- e.printStackTrace();
- }
- }
-
- 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(" [ -namespace <xsd-namespace> ]");
- 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 ]"); */
- System.out.println(" interface-names");
- System.out.println("");
- System.out.println("For example:");
- System.out.println("");
- System.out.println(" generate somepackage.InterfaceA somepackage.InterfaceB");
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
deleted file mode 100644
index a2c2f79210..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
+++ /dev/null
@@ -1,724 +0,0 @@
-/**
- *
- * 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.Collections;
-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.helper.XSDHelperImpl;
-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.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();
-
- 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();
-
- //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/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
deleted file mode 100644
index 281c59ee24..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/**
- *
- * 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 (IllegalArgumentException e)
- {
- 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);
- }
-
- public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
- {
- 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, false );
- }
-
-
- 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());
- }
- }
- }
- */
- }
-
- /*
- 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);
- return schema.getTargetNamespace();
- }
-
- 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
- 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 List classes;
-
- public String getNamespace() {return namespace;}
- public List getClasses() {return classes;}
-
- GeneratedPackage(GenPackage genPackage, ExtendedMetaData extendedMetaData, Hashtable eclassGenClassMap )
- {
- classes = new ArrayList();
-
- EPackage ePackage = genPackage.getEcorePackage();
- namespace = extendedMetaData.getNamespace(ePackage);
-
- List genClasses = genPackage.getGenClasses();
- for (Iterator iterClass = genClasses.iterator(); iterClass.hasNext();)
- {
- GenClass genClass = (GenClass)iterClass.next();
- String name = extendedMetaData.getName(genClass.getEcoreClass());
- String className = genPackage.getInterfacePackageName() + "." + genClass.getInterfaceName();
- classes.add( new PackageClassInfo( name, className, false, null ) );
- List features = genClass.getGenFeatures();
- for (Iterator iterFeatures = features.iterator(); iterFeatures.hasNext();)
- {
- GenFeature feature = (GenFeature)iterFeatures.next();
- EStructuralFeature element = feature.getEcoreFeature();
- EClassifier elementType = element.getEType();
- if( elementType instanceof EClass )
- {
- // complex type
- EClass eClass = (EClass)elementType;
- GenClass genEClass = (GenClass)eclassGenClassMap.get(elementType);
- if( genEClass != null )
- {
- name = extendedMetaData.getName(element);
- String interfaceName = genEClass.getGenPackage().getInterfacePackageName()
- + '.' + genEClass.getInterfaceName();
- boolean anonymous = extendedMetaData.isAnonymous(eClass);
-
- // Build list of property names
- List 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);
- }
- }
- classes.add( new PackageClassInfo( name, interfaceName, anonymous, propertyClassNames ) );
- }
- }
- else
- {
- // simple type
- name = extendedMetaData.getName(element);
- className = elementType.getInstanceClass().getName();
- classes.add( new PackageClassInfo( name, className, false, null ) );
- }
- }
- }
- }
-
- 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/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
deleted file mode 100644
index 80f8fe7755..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- *
- * 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;
-
-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;
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
deleted file mode 100644
index eabf90c310..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- *
- * 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;
- }
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
deleted file mode 100644
index 4a187674ce..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- *
- * 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
- }
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
deleted file mode 100644
index e08123c233..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
+++ /dev/null
@@ -1,4281 +0,0 @@
-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;
- 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 + "\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_1235 = NL + "\t\treturn new ";
- protected final String TEXT_1236 = "(getTypedKey());" + NL + " \t";
- protected final String TEXT_1237 = NL + "\t\treturn getTypedKey();" + NL + " \t";
- protected final String TEXT_1238 = 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_1239 = NL + "\t\tgetTypedKey().addAll((";
- protected final String TEXT_1240 = ")key);";
- protected final String TEXT_1241 = NL + "\t\tsetTypedKey(((";
- protected final String TEXT_1242 = ")key).";
- protected final String TEXT_1243 = "());";
- protected final String TEXT_1244 = NL + "\t\tsetTypedKey((";
- protected final String TEXT_1245 = ")key);";
- protected final String TEXT_1246 = 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_1247 = NL + "\t\treturn new ";
- protected final String TEXT_1248 = "(getTypedValue());" + NL + " \t";
- protected final String TEXT_1249 = NL + "\t\treturn getTypedValue();" + NL + " \t";
- protected final String TEXT_1250 = 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_1251 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll((";
- protected final String TEXT_1252 = ")value);" + NL + " \t";
- protected final String TEXT_1253 = NL + "\t\tsetTypedValue(((";
- protected final String TEXT_1254 = ")value).";
- protected final String TEXT_1255 = "());" + NL + " \t";
- protected final String TEXT_1256 = NL + "\t\tsetTypedValue((";
- protected final String TEXT_1257 = ")value);" + NL + " \t";
- protected final String TEXT_1258 = 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_1259 = " getEMap()" + NL + "\t{" + NL + "\t\t";
- protected final String TEXT_1260 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
- protected final String TEXT_1261 = ")container.get(eContainmentFeature());" + NL + "\t}";
- protected final String TEXT_1262 = NL + "} //";
- protected final String TEXT_1263 = 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(genFeature.getStaticDefaultValue());
- 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 && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
- stringBuffer.append(TEXT_1234);
- if (keyFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1235);
- stringBuffer.append(keyFeature.getObjectType());
- stringBuffer.append(TEXT_1236);
- } else {
- stringBuffer.append(TEXT_1237);
- }
- stringBuffer.append(TEXT_1238);
- if (keyFeature.isListType()) {
- stringBuffer.append(TEXT_1239);
- stringBuffer.append(genModel.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_1240);
- } else if (keyFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1241);
- stringBuffer.append(keyFeature.getObjectType());
- stringBuffer.append(TEXT_1242);
- stringBuffer.append(keyFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_1243);
- } else {
- stringBuffer.append(TEXT_1244);
- stringBuffer.append(keyFeature.getImportedType());
- stringBuffer.append(TEXT_1245);
- }
- stringBuffer.append(TEXT_1246);
- if (valueFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1247);
- stringBuffer.append(valueFeature.getObjectType());
- stringBuffer.append(TEXT_1248);
- } else {
- stringBuffer.append(TEXT_1249);
- }
- stringBuffer.append(TEXT_1250);
- if (valueFeature.isListType()) {
- stringBuffer.append(TEXT_1251);
- stringBuffer.append(genModel.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_1252);
- } else if (valueFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1253);
- stringBuffer.append(valueFeature.getObjectType());
- stringBuffer.append(TEXT_1254);
- stringBuffer.append(valueFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_1255);
- } else {
- stringBuffer.append(TEXT_1256);
- stringBuffer.append(valueFeature.getImportedType());
- stringBuffer.append(TEXT_1257);
- }
- stringBuffer.append(TEXT_1258);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1259);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
- stringBuffer.append(TEXT_1260);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1261);
- }
- stringBuffer.append(TEXT_1262);
- stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
- // TODO fix the space above
- genModel.emitSortedImports();
- stringBuffer.append(TEXT_1263);
- return stringBuffer.toString();
- }
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
deleted file mode 100644
index 54f5251ecb..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
+++ /dev/null
@@ -1,1147 +0,0 @@
-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;
- }
-
- public 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;";
- 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\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\t// Initialize this package " + NL + "\t\tTypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();" + NL + "\t\tth.getExtendedMetaData().putPackage(NAMESPACE_URI, this);" + 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// Initialize dependent packages";
- protected final String TEXT_103 = NL + "\t\t";
- protected final String TEXT_104 = " ";
- protected final String TEXT_105 = "Instance = ";
- protected final String TEXT_106 = ".INSTANCE;";
- protected final String TEXT_107 = NL + "\t\t" + 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_108 = ".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_109 = "\t" + NL + "" + NL + "\t\t// Create types and their properties";
- protected final String TEXT_110 = NL + "\t\t";
- protected final String TEXT_111 = "Type = createType(false, ";
- protected final String TEXT_112 = ");";
- protected final String TEXT_113 = NL + "\t\tcreateProperty(";
- protected final String TEXT_114 = ", ";
- protected final String TEXT_115 = "Type,";
- protected final String TEXT_116 = ".INTERNAL_";
- protected final String TEXT_117 = "); ";
- protected final String TEXT_118 = NL + NL + "\t\t// Create data types";
- protected final String TEXT_119 = NL + "\t\t";
- protected final String TEXT_120 = "Type = createType(true, ";
- protected final String TEXT_121 = " );";
- protected final String TEXT_122 = 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_123 = NL + NL + "\t\t// Obtain other dependent packages";
- protected final String TEXT_124 = NL + "\t\t";
- protected final String TEXT_125 = " ";
- protected final String TEXT_126 = " = (";
- protected final String TEXT_127 = ")";
- protected final String TEXT_128 = ".INSTANCE;";
- protected final String TEXT_129 = NL + "\t\t";
- protected final String TEXT_130 = " property = null;" + NL + "" + NL + "\t\t// Add supertypes to types";
- protected final String TEXT_131 = NL + "\t\taddSuperType(";
- protected final String TEXT_132 = "Type, ";
- protected final String TEXT_133 = ".get";
- protected final String TEXT_134 = "());";
- protected final String TEXT_135 = NL + NL + "\t\t// Initialize types and properties";
- protected final String TEXT_136 = NL + "\t\tinitializeType(";
- protected final String TEXT_137 = "Type, ";
- protected final String TEXT_138 = ".class, \"";
- protected final String TEXT_139 = "\", ";
- protected final String TEXT_140 = ");";
- protected final String TEXT_141 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_142 = "Type, \"";
- protected final String TEXT_143 = "\", ";
- protected final String TEXT_144 = ", ";
- protected final String TEXT_145 = ");";
- protected final String TEXT_146 = NL + "\t\tproperty = getLocalProperty(";
- protected final String TEXT_147 = "Type, ";
- protected final String TEXT_148 = ");";
- protected final String TEXT_149 = NL + "\t\tinitializeProperty(property, ";
- 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 = ", ";
- 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 = NL + "\t\tinitializeProperty(property, ";
- 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 = ", ";
- protected final String TEXT_167 = ", ";
- protected final String TEXT_168 = ", ";
- protected final String TEXT_169 = ", ";
- protected final String TEXT_170 = ");";
- protected final String TEXT_171 = NL + "\t\tsetInstanceProperty (property, \"";
- protected final String TEXT_172 = "\", ";
- protected final String TEXT_173 = ", ";
- protected final String TEXT_174 = ");";
- protected final String TEXT_175 = NL;
- protected final String TEXT_176 = NL + "\t\t// Initialize data types";
- protected final String TEXT_177 = NL + "\t\tinitializeType(";
- protected final String TEXT_178 = "Type, ";
- protected final String TEXT_179 = ".class, \"";
- protected final String TEXT_180 = "\", ";
- protected final String TEXT_181 = ", ";
- protected final String TEXT_182 = ");";
- protected final String TEXT_183 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_184 = "Type, \"";
- protected final String TEXT_185 = "\", ";
- protected final String TEXT_186 = ", ";
- protected final String TEXT_187 = ");";
- protected final String TEXT_188 = NL;
- protected final String TEXT_189 = NL + "\t\tcreateXSDMetaData(";
- protected final String TEXT_190 = ");" + NL + "\t}" + NL + "\t " + NL + "\tprotected void createXSDMetaData(";
- protected final String TEXT_191 = ")" + NL + "\t{" + NL + "\t\tsuper.initXSD();" + NL + "\t\t" + NL + "\t\t";
- protected final String TEXT_192 = " property = null;" + NL + "\t\t";
- protected final String TEXT_193 = NL + "\t\taddXSDMapping" + NL + "\t\t (new String[]" + NL + "\t\t\t {";
- protected final String TEXT_194 = NL + "\t\t\t ";
- protected final String TEXT_195 = ", ";
- protected final String TEXT_196 = NL + "\t\t\t });" + NL;
- protected final String TEXT_197 = NL;
- protected final String TEXT_198 = NL + "\t\taddXSDMapping" + NL + "\t\t (";
- protected final String TEXT_199 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
- protected final String TEXT_200 = NL + "\t\t\t ";
- protected final String TEXT_201 = ", ";
- protected final String TEXT_202 = NL + "\t\t\t });" + NL;
- protected final String TEXT_203 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t (\"";
- protected final String TEXT_204 = "\"," + NL + "\t\t ";
- protected final String TEXT_205 = ".get";
- protected final String TEXT_206 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_207 = NL + "\t\t\t ";
- protected final String TEXT_208 = ", ";
- protected final String TEXT_209 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
- protected final String TEXT_210 = NL + "\t\t\t });";
- protected final String TEXT_211 = NL + " ";
- protected final String TEXT_212 = NL + "\t\tsetInstanceProperty" + NL + "\t\t (property," + NL + "\t\t\t \"";
- protected final String TEXT_213 = "\"," + NL + "\t\t\t ";
- protected final String TEXT_214 = ", ";
- protected final String TEXT_215 = ");";
- protected final String TEXT_216 = NL + " ";
- protected final String TEXT_217 = " ";
- protected final String TEXT_218 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getProperty(";
- protected final String TEXT_219 = "Type, ";
- protected final String TEXT_220 = ".INTERNAL_";
- protected final String TEXT_221 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_222 = NL + "\t\t\t ";
- protected final String TEXT_223 = ", ";
- protected final String TEXT_224 = NL + "\t\t\t });" + NL;
- protected final String TEXT_225 = NL + " }" + NL + " ";
- protected final String TEXT_226 = NL + "\t/**" + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_227 = " create";
- protected final String TEXT_228 = "FromString(String initialValue)" + NL + "\t{";
- protected final String TEXT_229 = NL + "\t\t";
- protected final String TEXT_230 = " result = ";
- protected final String TEXT_231 = ".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_232 = NL + "\t\treturn result;";
- protected final String TEXT_233 = NL + "\t\treturn (";
- protected final String TEXT_234 = ")create";
- protected final String TEXT_235 = "FromString(initialValue);";
- protected final String TEXT_236 = NL + "\t\treturn (";
- protected final String TEXT_237 = ")";
- protected final String TEXT_238 = ".create";
- protected final String TEXT_239 = "FromString(initialValue);";
- protected final String TEXT_240 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_241 = " result = new ";
- protected final String TEXT_242 = "();" + NL + "\t\tfor (";
- protected final String TEXT_243 = " stringTokenizer = new ";
- protected final String TEXT_244 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
- protected final String TEXT_245 = NL + "\t\t\tresult.add(create";
- protected final String TEXT_246 = "FromString(item));";
- protected final String TEXT_247 = NL + "\t\t\tresult.add(";
- protected final String TEXT_248 = ".create";
- protected final String TEXT_249 = "FromString(item));";
- protected final String TEXT_250 = NL + "\t\t}" + NL + "\t\treturn result;";
- protected final String TEXT_251 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_252 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
- protected final String TEXT_253 = NL + "\t\ttry" + NL + "\t\t{";
- protected final String TEXT_254 = NL + "\t\t\tresult = (";
- protected final String TEXT_255 = ")create";
- protected final String TEXT_256 = "FromString(initialValue);";
- protected final String TEXT_257 = NL + "\t\t\tresult = (";
- protected final String TEXT_258 = ")";
- protected final String TEXT_259 = ".create";
- protected final String TEXT_260 = "FromString(initialValue);";
- protected final String TEXT_261 = 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_262 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;";
- protected final String TEXT_263 = 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_264 = "();";
- protected final String TEXT_265 = NL + "\t\treturn (";
- protected final String TEXT_266 = ")super.createFromString(";
- protected final String TEXT_267 = ", initialValue);";
- protected final String TEXT_268 = 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_269 = "ToString(Object instanceValue)" + NL + "\t{";
- protected final String TEXT_270 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
- protected final String TEXT_271 = NL + "\t\treturn convert";
- protected final String TEXT_272 = "ToString(instanceValue);";
- protected final String TEXT_273 = NL + "\t\treturn ";
- protected final String TEXT_274 = ".convert";
- protected final String TEXT_275 = "ToString(instanceValue);";
- protected final String TEXT_276 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_277 = " list = (";
- protected final String TEXT_278 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
- protected final String TEXT_279 = " result = new ";
- protected final String TEXT_280 = "();" + NL + "\t\tfor (";
- protected final String TEXT_281 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
- protected final String TEXT_282 = NL + "\t\t\tresult.append(convert";
- protected final String TEXT_283 = "ToString(i.next()));";
- protected final String TEXT_284 = NL + "\t\t\tresult.append(";
- protected final String TEXT_285 = ".convert";
- protected final String TEXT_286 = "ToString(i.next()));";
- protected final String TEXT_287 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
- protected final String TEXT_288 = NL + "\t\tif (instanceValue == null) return null;";
- protected final String TEXT_289 = NL + "\t\tif (";
- protected final String TEXT_290 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
- protected final String TEXT_291 = NL + "\t\t\t\tString value = convert";
- protected final String TEXT_292 = "ToString(instanceValue);";
- protected final String TEXT_293 = NL + "\t\t\t\tString value = ";
- protected final String TEXT_294 = ".convert";
- protected final String TEXT_295 = "ToString(instanceValue);";
- protected final String TEXT_296 = 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_297 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
- protected final String TEXT_298 = "\");";
- protected final String TEXT_299 = 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_300 = "();";
- protected final String TEXT_301 = NL + "\t\treturn super.convertToString(";
- protected final String TEXT_302 = ", instanceValue);";
- protected final String TEXT_303 = NL + "\t}" + NL;
- protected final String TEXT_304 = NL + "\t/**" + NL + "\t * Returns a new object of class '<em>";
- protected final String TEXT_305 = "</em>'." + NL + "\t * <!-- begin-user-doc -->" + NL + "\t * <!-- end-user-doc -->" + NL + "\t * @return a new object of class '<em>";
- protected final String TEXT_306 = "</em>'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
- protected final String TEXT_307 = " create";
- protected final String TEXT_308 = "();" + NL;
- protected final String TEXT_309 = 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_310 = NL + "\t/**" + NL + "\t * Returns an instance of data type '<em>";
- protected final String TEXT_311 = "</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_312 = " create";
- protected final String TEXT_313 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '<em>";
- protected final String TEXT_314 = "</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_315 = "(";
- protected final String TEXT_316 = " instanceValue);" + NL;
- protected final String TEXT_317 = NL + "} //";
- protected final String TEXT_318 = 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);
- for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
- stringBuffer.append(TEXT_103);
- stringBuffer.append(dep.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_104);
- stringBuffer.append(dep.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_105);
- stringBuffer.append(dep.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_106);
- }
- stringBuffer.append(TEXT_107);
- stringBuffer.append(factoryType);
- stringBuffer.append(TEXT_108);
- if (!genPackage.getGenClasses().isEmpty()) {
- stringBuffer.append(TEXT_109);
- for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
- if (!genClass.isDynamic()) {
- stringBuffer.append(TEXT_110);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_111);
- stringBuffer.append(genPackage.getClassifierID(genClass));
- stringBuffer.append(TEXT_112);
- for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();
- stringBuffer.append(TEXT_113);
- stringBuffer.append(!genFeature.isReferenceType());
- stringBuffer.append(TEXT_114);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_115);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_116);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_117);
- }
- }
- }
- }
- if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_118);
- for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_119);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_120);
- stringBuffer.append(genPackage.getClassifierID(genDataType));
- stringBuffer.append(TEXT_121);
- }
- }
- stringBuffer.append(TEXT_122);
- if (!genPackage.getPackageInitializationDependencies().isEmpty()) {
- stringBuffer.append(TEXT_123);
- for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
- stringBuffer.append(TEXT_124);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_125);
- stringBuffer.append(genPackage.getPackageInstanceVariable(dep));
- stringBuffer.append(TEXT_126);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_127);
- stringBuffer.append(dep.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_128);
- }
- }
- List annotationSources = genPackage.getAnnotationSources();
- annotationSources.remove(ExtendedMetaData.ANNOTATION_URI);
- stringBuffer.append(TEXT_129);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_130);
- 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_131);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_132);
- stringBuffer.append(genPackage.getPackageInstanceVariable(baseGenClass.getGenPackage()));
- stringBuffer.append(TEXT_133);
- stringBuffer.append(baseGenClass.getClassifierAccessorName());
- stringBuffer.append(TEXT_134);
- }
- }
- stringBuffer.append(TEXT_135);
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (!genClass.isDynamic()) {
- stringBuffer.append(TEXT_136);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_137);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_138);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_139);
- stringBuffer.append(genClass.isAbstract());
- stringBuffer.append(TEXT_140);
- 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_141);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_142);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_143);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_144);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_145);
- }
- }
- }
- 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_146);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_147);
- stringBuffer.append(genClass.getLocalFeatureIndex(genFeature));
- stringBuffer.append(TEXT_148);
- if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();
- String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";
- stringBuffer.append(TEXT_149);
- stringBuffer.append(type);
- stringBuffer.append(TEXT_150);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_151);
- stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_152);
- stringBuffer.append(genFeature.getLowerBound());
- stringBuffer.append(TEXT_153);
- stringBuffer.append(genFeature.getUpperBound());
- stringBuffer.append(TEXT_154);
- stringBuffer.append(genFeature.getContainerClass());
- stringBuffer.append(TEXT_155);
- stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
- stringBuffer.append(TEXT_156);
- stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
- stringBuffer.append(TEXT_157);
- stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
- stringBuffer.append(TEXT_158);
- stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false");
- stringBuffer.append(TEXT_159);
- stringBuffer.append(reverse);
- stringBuffer.append(TEXT_160);
- }else{
- stringBuffer.append(TEXT_161);
- stringBuffer.append(type);
- stringBuffer.append(TEXT_162);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_163);
- stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_164);
- stringBuffer.append(genFeature.getLowerBound());
- stringBuffer.append(TEXT_165);
- stringBuffer.append(genFeature.getUpperBound());
- stringBuffer.append(TEXT_166);
- stringBuffer.append(genFeature.getContainerClass());
- stringBuffer.append(TEXT_167);
- stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
- stringBuffer.append(TEXT_168);
- stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
- stringBuffer.append(TEXT_169);
- stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
- stringBuffer.append(TEXT_170);
- }
- 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_171);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_172);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_173);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_174);
- }
- }
- }
- stringBuffer.append(TEXT_175);
- }
- }
- }
- if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_176);
- for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_177);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_178);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_179);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_180);
- stringBuffer.append(genDataType.getSerializableFlag().equals("IS_SERIALIZABLE") ? "true" : "false");
- stringBuffer.append(TEXT_181);
- stringBuffer.append(genDataType.getGeneratedInstanceClassFlag().equals("IS_GENERATED_INSTANCE_CLASS") ? "true" : "false" );
- stringBuffer.append(TEXT_182);
- 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_183);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_184);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_185);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_186);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_187);
- }
- }
- }
- stringBuffer.append(TEXT_188);
- }
- }
- stringBuffer.append(TEXT_189);
- stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, false));
- stringBuffer.append(TEXT_190);
- stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, true));
- stringBuffer.append(TEXT_191);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_192);
- String extendedMetaDataSource = ExtendedMetaData.ANNOTATION_URI;
- EAnnotation packageAnnotation = genPackage.getEcorePackage().getEAnnotation(extendedMetaDataSource);
- if (packageAnnotation != null){
- stringBuffer.append(TEXT_193);
- 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_194);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_195);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_196);
- }
- stringBuffer.append(TEXT_197);
- 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_198);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_199);
- 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_200);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_201);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_202);
- }
- 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_203);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_204);
- stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
- stringBuffer.append(TEXT_205);
- stringBuffer.append(genFeature.getTypeClassifierAccessorName());
- stringBuffer.append(TEXT_206);
- 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_207);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_208);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- if (!genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_209);
- } else {
- stringBuffer.append(TEXT_210);
- }
- stringBuffer.append(TEXT_211);
- 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_212);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_213);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_214);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_215);
- }
- stringBuffer.append(TEXT_216);
- }
- }
- stringBuffer.append(TEXT_217);
- }
- }
- } else {
- stringBuffer.append(TEXT_218);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_219);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_220);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_221);
- 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_222);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_223);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_224);
- }
- }
- }
- }
- stringBuffer.append(TEXT_225);
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_226);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_227);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_228);
- if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_229);
- stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_230);
- stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_231);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
- stringBuffer.append(genModel.getNonNLS(3));
- stringBuffer.append(TEXT_232);
- } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
- if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_233);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_234);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_235);
- } else {
- stringBuffer.append(TEXT_236);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_237);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_238);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_239);
- }
- } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_240);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_241);
- stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_242);
- stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_243);
- stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_244);
- if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_245);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_246);
- } else {
- stringBuffer.append(TEXT_247);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_248);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_249);
- }
- stringBuffer.append(TEXT_250);
- } else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_251);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_252);
- for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_253);
- if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_254);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_255);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_256);
- } else {
- stringBuffer.append(TEXT_257);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_258);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_259);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_260);
- }
- stringBuffer.append(TEXT_261);
- }
- stringBuffer.append(TEXT_262);
- } else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_263);
- stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_264);
- } else {
- stringBuffer.append(TEXT_265);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_266);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_267);
- }
- stringBuffer.append(TEXT_268);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_269);
- if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_270);
- } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
- if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_271);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_272);
- } else {
- stringBuffer.append(TEXT_273);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_274);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_275);
- }
- } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_276);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_277);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_278);
- stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_279);
- stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_280);
- stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_281);
- if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_282);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_283);
- } else {
- stringBuffer.append(TEXT_284);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_285);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_286);
- }
- stringBuffer.append(TEXT_287);
- } else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_288);
- for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_289);
- stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
- stringBuffer.append(TEXT_290);
- if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_291);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_292);
- } else {
- stringBuffer.append(TEXT_293);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_294);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_295);
- }
- stringBuffer.append(TEXT_296);
- }
- stringBuffer.append(TEXT_297);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_298);
- } else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_299);
- stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_300);
- } else {
- stringBuffer.append(TEXT_301);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_302);
- }
- stringBuffer.append(TEXT_303);
- }
- }
- } else {
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (genClass.hasFactoryInterfaceCreateMethod()) {
- stringBuffer.append(TEXT_304);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_305);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_306);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_307);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_308);
- }
- }
- stringBuffer.append(TEXT_309);
- if (genPackage.isDataTypeConverters()) {
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_310);
- stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_311);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_312);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_313);
- stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_314);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_315);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_316);
- }
- }
- }
- }
- stringBuffer.append(TEXT_317);
- stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName());
- genModel.emitSortedImports();
- stringBuffer.append(TEXT_318);
- return stringBuffer.toString();
- }
-} \ No newline at end of file
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
deleted file mode 100644
index bc59ec1745..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- *
- * 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.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.util.CodeGenUtil;
-import org.eclipse.emf.ecore.EClassifier;
-
-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();
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java b/branches/sdo-1.0-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
deleted file mode 100644
index 1c1f37682f..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-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/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,207 +0,0 @@
-
- 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/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/MANIFEST.MF b/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 8bb7dea1fe..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-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/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/NOTICE b/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index ba033412a9..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,14 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2007 The Apache Software Foundation
-
-=========================================================================
-== NOTICE file corresponding to the section 4 d of ==
-== the Apache License, Version 2.0, ==
-== in this case for the Apache Tuscany distribution. ==
-=========================================================================
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Please see the LICENSE file present in the META-INF directory of this archive.
-
diff --git a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/README.txt b/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 0ad57411e2..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.0-incubating build (July 2007)
-===============================================
-
-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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Account.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Account.java
deleted file mode 100644
index b2062121cd..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Account.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- *
- * 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.customer;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Account</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.customer.Account#getAccountNum <em>Account Num</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface Account extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Account Num</b></em>' attribute.
- * The default value is <code>"0"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Account Num</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Account Num</em>' attribute.
- * @see #isSetAccountNum()
- * @see #unsetAccountNum()
- * @see #setAccountNum(int)
- * @generated
- */
- int getAccountNum();
-
- /**
- * Sets the value of the '{@link com.example.customer.Account#getAccountNum <em>Account Num</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Account Num</em>' attribute.
- * @see #isSetAccountNum()
- * @see #unsetAccountNum()
- * @see #getAccountNum()
- * @generated
- */
- void setAccountNum(int value);
-
- /**
- * Unsets the value of the '{@link com.example.customer.Account#getAccountNum <em>Account Num</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetAccountNum()
- * @see #getAccountNum()
- * @see #setAccountNum(int)
- * @generated
- */
- void unsetAccountNum();
-
- /**
- * Returns whether the value of the '{@link com.example.customer.Account#getAccountNum <em>Account Num</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Account Num</em>' attribute is set.
- * @see #unsetAccountNum()
- * @see #getAccountNum()
- * @see #setAccountNum(int)
- * @generated
- */
- boolean isSetAccountNum();
-
-} // Account
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Customer.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Customer.java
deleted file mode 100644
index 213afd0da8..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/Customer.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- *
- * 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.customer;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Customer</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.customer.Customer#getAccount <em>Account</em>}</li>
- * <li>{@link com.example.customer.Customer#getFirstName <em>First Name</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface Customer extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Account</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Account</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Account</em>' containment reference.
- * @see #isSetAccount()
- * @see #unsetAccount()
- * @see #setAccount(Account)
- * @generated
- */
- Account getAccount();
-
- /**
- * Sets the value of the '{@link com.example.customer.Customer#getAccount <em>Account</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Account</em>' containment reference.
- * @see #isSetAccount()
- * @see #unsetAccount()
- * @see #getAccount()
- * @generated
- */
- void setAccount(Account value);
-
- /**
- * Unsets the value of the '{@link com.example.customer.Customer#getAccount <em>Account</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetAccount()
- * @see #getAccount()
- * @see #setAccount(Account)
- * @generated
- */
- void unsetAccount();
-
- /**
- * Returns whether the value of the '{@link com.example.customer.Customer#getAccount <em>Account</em>}' containment reference is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Account</em>' containment reference is set.
- * @see #unsetAccount()
- * @see #getAccount()
- * @see #setAccount(Account)
- * @generated
- */
- boolean isSetAccount();
-
- /**
- * Returns the value of the '<em><b>First Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>First 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>First Name</em>' attribute.
- * @see #isSetFirstName()
- * @see #unsetFirstName()
- * @see #setFirstName(String)
- * @generated
- */
- String getFirstName();
-
- /**
- * Sets the value of the '{@link com.example.customer.Customer#getFirstName <em>First Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>First Name</em>' attribute.
- * @see #isSetFirstName()
- * @see #unsetFirstName()
- * @see #getFirstName()
- * @generated
- */
- void setFirstName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.customer.Customer#getFirstName <em>First Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetFirstName()
- * @see #getFirstName()
- * @see #setFirstName(String)
- * @generated
- */
- void unsetFirstName();
-
- /**
- * Returns whether the value of the '{@link com.example.customer.Customer#getFirstName <em>First Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>First Name</em>' attribute is set.
- * @see #unsetFirstName()
- * @see #getFirstName()
- * @see #setFirstName(String)
- * @generated
- */
- boolean isSetFirstName();
-
-} // Customer
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/CustomerFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/CustomerFactory.java
deleted file mode 100644
index 59f94f673a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/CustomerFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- *
- * 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.customer;
-
-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 CustomerFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- CustomerFactory INSTANCE = com.example.customer.impl.CustomerFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Account</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Account</em>'.
- * @generated
- */
- Account createAccount();
-
- /**
- * Returns a new object of class '<em>Customer</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Customer</em>'.
- * @generated
- */
- Customer createCustomer();
-
- /**
- * 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);
-
-} //CustomerFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java
deleted file mode 100644
index a5d03e0b25..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- *
- * 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.customer.impl;
-
-import com.example.customer.Account;
-import com.example.customer.CustomerFactory;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Account</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.customer.impl.AccountImpl#getAccountNum <em>Account Num</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class AccountImpl extends DataObjectBase implements Account
-{
-
- public final static int ACCOUNT_NUM = 0;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Account Num</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_ACCOUNT_NUM = 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_ACCOUNT_NUM: return ACCOUNT_NUM;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getAccountNum() <em>Account Num</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccountNum()
- * @generated
- * @ordered
- */
- protected static final int ACCOUNT_NUM_DEFAULT_ = 0;
-
- /**
- * The cached value of the '{@link #getAccountNum() <em>Account Num</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccountNum()
- * @generated
- * @ordered
- */
- protected int accountNum = ACCOUNT_NUM_DEFAULT_;
-
- /**
- * This is true if the Account Num attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean accountNum_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AccountImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getAccount();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getAccountNum()
- {
- return accountNum;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAccountNum(int newAccountNum)
- {
- int oldAccountNum = accountNum;
- accountNum = newAccountNum;
- boolean oldAccountNum_set_ = accountNum_set_;
- accountNum_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_ACCOUNT_NUM, oldAccountNum, accountNum, !oldAccountNum_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetAccountNum()
- {
- int oldAccountNum = accountNum;
- boolean oldAccountNum_set_ = accountNum_set_;
- accountNum = ACCOUNT_NUM_DEFAULT_;
- accountNum_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_ACCOUNT_NUM, oldAccountNum, ACCOUNT_NUM_DEFAULT_, oldAccountNum_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetAccountNum()
- {
- return accountNum_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case ACCOUNT_NUM:
- return new Integer(getAccountNum());
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case ACCOUNT_NUM:
- setAccountNum(((Integer)newValue).intValue());
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ACCOUNT_NUM:
- unsetAccountNum();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ACCOUNT_NUM:
- return isSetAccountNum();
- }
- 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(" (accountNum: ");
- if (accountNum_set_) result.append(accountNum); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //AccountImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java
deleted file mode 100644
index 271b273348..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- *
- * 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.customer.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.customer.*;
-
-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 Customer
- * <!-- end-user-doc -->
- * @generated
- */
-public class CustomerFactoryImpl extends FactoryBase implements CustomerFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://example.com/customer";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "stn_1";
-
- /**
- * 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 ACCOUNT = 1;
- public static final int CUSTOMER = 2;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomerFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.customer");
- }
-
- /**
- * Registers the Factory instance so that it is available within the supplied scope.
- * @argument scope a HelperContext instance that will make the types supported by this Factory available.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void register(HelperContext scope)
- {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
-
- //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 ACCOUNT: return (DataObject)createAccount();
- case CUSTOMER: return (DataObject)createCustomer();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Account createAccount()
- {
- AccountImpl account = new AccountImpl();
- return account;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Customer createCustomer()
- {
- CustomerImpl customer = new CustomerImpl();
- return customer;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type accountType = null;
-
- public Type getAccount()
- {
- return accountType;
- }
-
- protected Type customerType = null;
-
- public Type getCustomer()
- {
- return customerType;
- }
-
-
- private static CustomerFactoryImpl instance = null;
- public static CustomerFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new CustomerFactoryImpl();
-
- // 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
- //theCustomerFactoryImpl.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
- accountType = createType(false, ACCOUNT);
- createProperty(true, accountType,AccountImpl.INTERNAL_ACCOUNT_NUM);
- customerType = createType(false, CUSTOMER);
- createProperty(false, customerType,CustomerImpl.INTERNAL_ACCOUNT);
- createProperty(true, customerType,CustomerImpl.INTERNAL_FIRST_NAME);
- }
-
- 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(accountType, Account.class, "Account", false);
- property = getLocalProperty(accountType, 0);
- initializeProperty(property, theModelPackageImpl.getInt(), "accountNum", "0", 0, 1, Account.class, false, true, false);
-
- initializeType(customerType, Customer.class, "Customer", false);
- property = getLocalProperty(customerType, 0);
- initializeProperty(property, this.getAccount(), "account", null, 1, 1, Customer.class, false, true, false, true , null);
-
- property = getLocalProperty(customerType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "firstName", null, 0, 1, Customer.class, false, true, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (accountType,
- new String[]
- {
- "name", "Account",
- "kind", "empty"
- });
-
- addXSDMapping
- (getProperty(accountType, AccountImpl.INTERNAL_ACCOUNT_NUM),
- new String[]
- {
- "kind", "attribute",
- "name", "accountNum",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (customerType,
- new String[]
- {
- "name", "Customer",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(customerType, CustomerImpl.INTERNAL_ACCOUNT),
- new String[]
- {
- "kind", "element",
- "name", "account",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getProperty(customerType, CustomerImpl.INTERNAL_FIRST_NAME),
- new String[]
- {
- "kind", "attribute",
- "name", "firstName",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("account",
- this.getAccount(),
- new String[]
- {
- "kind", "element",
- "name", "account",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("customer",
- this.getCustomer(),
- new String[]
- {
- "kind", "element",
- "name", "customer",
- "namespace", "##targetNamespace"
- });
-
- }
-
-} //CustomerFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java
deleted file mode 100644
index c3838b760d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/**
- *
- * 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.customer.impl;
-
-import com.example.customer.Account;
-import com.example.customer.Customer;
-import com.example.customer.CustomerFactory;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Customer</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.customer.impl.CustomerImpl#getAccount <em>Account</em>}</li>
- * <li>{@link com.example.customer.impl.CustomerImpl#getFirstName <em>First Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class CustomerImpl extends DataObjectBase implements Customer
-{
-
- public final static int ACCOUNT = 0;
-
- public final static int FIRST_NAME = 1;
-
- public final static int SDO_PROPERTY_COUNT = 2;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Account</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_ACCOUNT = 0;
-
- /**
- * The internal feature id for the '<em><b>First Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_FIRST_NAME = 1;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 2;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_ACCOUNT: return ACCOUNT;
- case INTERNAL_FIRST_NAME: return FIRST_NAME;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The cached value of the '{@link #getAccount() <em>Account</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAccount()
- * @generated
- * @ordered
- */
-
- protected Account account = null;
-
- /**
- * This is true if the Account containment reference has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean account_set_ = false;
-
- /**
- * The default value of the '{@link #getFirstName() <em>First Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFirstName()
- * @generated
- * @ordered
- */
- protected static final String FIRST_NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getFirstName() <em>First Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFirstName()
- * @generated
- * @ordered
- */
- protected String firstName = FIRST_NAME_DEFAULT_;
-
- /**
- * This is true if the First Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean firstName_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomerImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getCustomer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Account getAccount()
- {
- return account;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicSetAccount(Account newAccount, ChangeContext changeContext)
- {
- Account oldAccount = account;
- account = newAccount;
- boolean oldAccount_set_ = account_set_;
- account_set_ = true;
- if (isNotifying())
- {
- addNotification(this, ChangeKind.SET, INTERNAL_ACCOUNT, oldAccount, newAccount, !oldAccount_set_, changeContext);
- }
- return changeContext;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAccount(Account newAccount)
- {
- if (newAccount != account)
- {
- ChangeContext changeContext = null;
- if (account != null)
- changeContext = inverseRemove(account, this, OPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
- if (newAccount != null)
- changeContext = inverseAdd(newAccount, this, OPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
- changeContext = basicSetAccount(newAccount, changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- else
- {
- boolean oldAccount_set_ = account_set_;
- account_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_ACCOUNT, newAccount, newAccount, !oldAccount_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicUnsetAccount(ChangeContext changeContext)
- {
- Account oldAccount = account;
- account = null;
- boolean oldAccount_set_ = account_set_;
- account_set_ = false;
- if (isNotifying())
- {
- addNotification(this, ChangeKind.UNSET, INTERNAL_ACCOUNT, oldAccount, null, !oldAccount_set_, changeContext);
- }
- return changeContext;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetAccount()
- {
- if (account != null)
- {
- ChangeContext changeContext = null;
- changeContext = inverseRemove(account, this, EOPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
- changeContext = basicUnsetAccount(changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- else
- {
- boolean oldAccount_set_ = account_set_;
- account_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_ACCOUNT, null, null, oldAccount_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetAccount()
- {
- return account_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getFirstName()
- {
- return firstName;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setFirstName(String newFirstName)
- {
- String oldFirstName = firstName;
- firstName = newFirstName;
- boolean oldFirstName_set_ = firstName_set_;
- firstName_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_FIRST_NAME, oldFirstName, firstName, !oldFirstName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetFirstName()
- {
- String oldFirstName = firstName;
- boolean oldFirstName_set_ = firstName_set_;
- firstName = FIRST_NAME_DEFAULT_;
- firstName_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_FIRST_NAME, oldFirstName, FIRST_NAME_DEFAULT_, oldFirstName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetFirstName()
- {
- return firstName_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case ACCOUNT:
- return basicUnsetAccount(changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case ACCOUNT:
- return getAccount();
- case FIRST_NAME:
- return getFirstName();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case ACCOUNT:
- setAccount((Account)newValue);
- return;
- case FIRST_NAME:
- setFirstName((String)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ACCOUNT:
- unsetAccount();
- return;
- case FIRST_NAME:
- unsetFirstName();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ACCOUNT:
- return isSetAccount();
- case FIRST_NAME:
- return isSetFirstName();
- }
- 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(" (firstName: ");
- if (firstName_set_) result.append(firstName); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //CustomerImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerFactory.java
deleted file mode 100644
index fbac1f8e28..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer;
-
-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 CustomerFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- CustomerFactory INSTANCE = com.example.extensible.customer.impl.CustomerFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Customers Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Customers Type</em>'.
- * @generated
- */
- CustomersType createCustomersType();
-
- /**
- * Returns a new object of class '<em>Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Type</em>'.
- * @generated
- */
- CustomerType createCustomerType();
-
- /**
- * Returns a new object of class '<em>Info Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Info Type</em>'.
- * @generated
- */
- InfoType createInfoType();
-
- /**
- * 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);
-
-} //CustomerFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerType.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerType.java
deleted file mode 100644
index 34caf80111..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomerType.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer;
-
-import java.io.Serializable;
-
-import java.math.BigInteger;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.extensible.customer.CustomerType#getName <em>Name</em>}</li>
- * <li>{@link com.example.extensible.customer.CustomerType#getNumber <em>Number</em>}</li>
- * <li>{@link com.example.extensible.customer.CustomerType#getInfo <em>Info</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface CustomerType extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>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>Name</em>' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #setName(String)
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link com.example.extensible.customer.CustomerType#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.extensible.customer.CustomerType#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- void unsetName();
-
- /**
- * Returns whether the value of the '{@link com.example.extensible.customer.CustomerType#getName <em>Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Name</em>' attribute is set.
- * @see #unsetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- boolean isSetName();
-
- /**
- * Returns the value of the '<em><b>Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Number</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Number</em>' attribute.
- * @see #isSetNumber()
- * @see #unsetNumber()
- * @see #setNumber(BigInteger)
- * @generated
- */
- BigInteger getNumber();
-
- /**
- * Sets the value of the '{@link com.example.extensible.customer.CustomerType#getNumber <em>Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Number</em>' attribute.
- * @see #isSetNumber()
- * @see #unsetNumber()
- * @see #getNumber()
- * @generated
- */
- void setNumber(BigInteger value);
-
- /**
- * Unsets the value of the '{@link com.example.extensible.customer.CustomerType#getNumber <em>Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetNumber()
- * @see #getNumber()
- * @see #setNumber(BigInteger)
- * @generated
- */
- void unsetNumber();
-
- /**
- * Returns whether the value of the '{@link com.example.extensible.customer.CustomerType#getNumber <em>Number</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Number</em>' attribute is set.
- * @see #unsetNumber()
- * @see #getNumber()
- * @see #setNumber(BigInteger)
- * @generated
- */
- boolean isSetNumber();
-
- /**
- * Returns the value of the '<em><b>Info</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Info</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Info</em>' containment reference.
- * @see #isSetInfo()
- * @see #unsetInfo()
- * @see #setInfo(InfoType)
- * @generated
- */
- InfoType getInfo();
-
- /**
- * Sets the value of the '{@link com.example.extensible.customer.CustomerType#getInfo <em>Info</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Info</em>' containment reference.
- * @see #isSetInfo()
- * @see #unsetInfo()
- * @see #getInfo()
- * @generated
- */
- void setInfo(InfoType value);
-
- /**
- * Unsets the value of the '{@link com.example.extensible.customer.CustomerType#getInfo <em>Info</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetInfo()
- * @see #getInfo()
- * @see #setInfo(InfoType)
- * @generated
- */
- void unsetInfo();
-
- /**
- * Returns whether the value of the '{@link com.example.extensible.customer.CustomerType#getInfo <em>Info</em>}' containment reference is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Info</em>' containment reference is set.
- * @see #unsetInfo()
- * @see #getInfo()
- * @see #setInfo(InfoType)
- * @generated
- */
- boolean isSetInfo();
-
-} // CustomerType
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomersType.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomersType.java
deleted file mode 100644
index 5d24e228b2..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/CustomersType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Customers Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.extensible.customer.CustomersType#getCustomer <em>Customer</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface CustomersType extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Customer</b></em>' containment reference list.
- * The list contents are of type {@link com.example.extensible.customer.CustomerType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Customer</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>Customer</em>' containment reference list.
- * @generated
- */
- List getCustomer();
-
-} // CustomersType
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/InfoType.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/InfoType.java
deleted file mode 100644
index 8bda4f74b2..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/InfoType.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Info Type</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface InfoType extends Serializable
-{
-} // InfoType
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
deleted file mode 100644
index 67bc859536..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.extensible.customer.*;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.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 CustomerFactoryImpl extends FactoryBase implements CustomerFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/extensible/customer";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "customer";
-
- /**
- * The version of the generator pattern used to generate this class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String PATTERN_VERSION = "1.2";
-
- public static final int CUSTOMERS_TYPE = 1;
- public static final int CUSTOMER_TYPE = 2;
- public static final int INFO_TYPE = 3;
- public static final int CUST_NAME_TYPE = 4;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomerFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.extensible.customer");
- }
-
- /**
- * Registers the Factory instance so that it is available within the supplied scope.
- * @argument scope a HelperContext instance that will make the types supported by this Factory available.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void register(HelperContext scope)
- {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
-
- //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 CUSTOMERS_TYPE: return (DataObject)createCustomersType();
- case CUSTOMER_TYPE: return (DataObject)createCustomerType();
- case INFO_TYPE: return (DataObject)createInfoType();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(int typeNumber, String initialValue)
- {
- switch (typeNumber)
- {
- case CUST_NAME_TYPE:
- return createCustNameTypeFromString(initialValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertToString(int typeNumber, Object instanceValue)
- {
- switch (typeNumber)
- {
- case CUST_NAME_TYPE:
- return convertCustNameTypeToString(instanceValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomersType createCustomersType()
- {
- CustomersTypeImpl customersType = new CustomersTypeImpl();
- return customersType;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomerType createCustomerType()
- {
- CustomerTypeImpl customerType = new CustomerTypeImpl();
- return customerType;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public InfoType createInfoType()
- {
- InfoTypeImpl infoType = new InfoTypeImpl();
- return infoType;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type customersTypeType = null;
-
- public Type getCustomersType()
- {
- return customersTypeType;
- }
-
- protected Type customerTypeType = null;
-
- public Type getCustomerType()
- {
- return customerTypeType;
- }
-
- protected Type infoTypeType = null;
-
- public Type getInfoType()
- {
- return infoTypeType;
- }
-
- protected Type custNameTypeType = null;
-
- public Type getCustNameType()
- {
- return custNameTypeType;
- }
-
-
- private static CustomerFactoryImpl instance = null;
- public static CustomerFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new CustomerFactoryImpl();
-
- // 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
- //theCustomerFactoryImpl.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
- customersTypeType = createType(false, CUSTOMERS_TYPE);
- createProperty(false, customersTypeType,CustomersTypeImpl.INTERNAL_CUSTOMER);
- customerTypeType = createType(false, CUSTOMER_TYPE);
- createProperty(true, customerTypeType,CustomerTypeImpl.INTERNAL_NAME);
- createProperty(true, customerTypeType,CustomerTypeImpl.INTERNAL_NUMBER);
- createProperty(false, customerTypeType,CustomerTypeImpl.INTERNAL_INFO);
- infoTypeType = createType(false, INFO_TYPE);
-
- // Create data types
- custNameTypeType = createType(true, CUST_NAME_TYPE );
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- initializeType(customersTypeType, CustomersType.class, "CustomersType", false);
- property = getLocalProperty(customersTypeType, 0);
- initializeProperty(property, this.getCustomerType(), "customer", null, 1, -1, CustomersType.class, false, false, false, true , null);
-
- initializeType(customerTypeType, CustomerType.class, "CustomerType", false);
- property = getLocalProperty(customerTypeType, 0);
- initializeProperty(property, this.getCustNameType(), "name", null, 1, 1, CustomerType.class, false, true, false);
-
- property = getLocalProperty(customerTypeType, 1);
- initializeProperty(property, theModelPackageImpl.getInteger(), "number", null, 1, 1, CustomerType.class, false, true, false);
-
- property = getLocalProperty(customerTypeType, 2);
- initializeProperty(property, this.getInfoType(), "info", null, 1, 1, CustomerType.class, false, true, false, true , null);
-
- initializeType(infoTypeType, InfoType.class, "InfoType", false);
- // Initialize data types
- initializeType(custNameTypeType, String.class, "CustNameType", true, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (customersTypeType,
- new String[]
- {
- "name", "CustomersType",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(customersTypeType, CustomersTypeImpl.INTERNAL_CUSTOMER),
- new String[]
- {
- "kind", "element",
- "name", "customer",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (customerTypeType,
- new String[]
- {
- "name", "CustomerType",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_NAME),
- new String[]
- {
- "kind", "element",
- "name", "name",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_NUMBER),
- new String[]
- {
- "kind", "element",
- "name", "number",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getProperty(customerTypeType, CustomerTypeImpl.INTERNAL_INFO),
- new String[]
- {
- "kind", "element",
- "name", "info"
- });
-
- property = createGlobalProperty
- ("customer",
- this.getCustomerType(),
- new String[]
- {
- "kind", "element",
- "name", "customer",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("customers",
- this.getCustomersType(),
- new String[]
- {
- "kind", "element",
- "name", "customers",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (infoTypeType,
- new String[]
- {
- "name", "InfoType",
- "kind", "empty"
- });
-
- addXSDMapping
- (custNameTypeType,
- new String[]
- {
- "name", "CustNameType",
- "baseType", "commonj.sdo#String"
- });
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String createCustNameTypeFromString(String initialValue)
- {
- return (String)((ModelFactoryImpl)ModelFactory.INSTANCE).createStringFromString(initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertCustNameTypeToString(Object instanceValue)
- {
- return ((ModelFactoryImpl)ModelFactory.INSTANCE).convertStringToString(instanceValue);
- }
-
-} //CustomerFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
deleted file mode 100644
index 216f1ba9ff..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer.impl;
-
-import com.example.extensible.customer.CustomerFactory;
-import com.example.extensible.customer.CustomerType;
-import com.example.extensible.customer.InfoType;
-
-import commonj.sdo.Type;
-
-import java.math.BigInteger;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getName <em>Name</em>}</li>
- * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getNumber <em>Number</em>}</li>
- * <li>{@link com.example.extensible.customer.impl.CustomerTypeImpl#getInfo <em>Info</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class CustomerTypeImpl extends DataObjectBase implements CustomerType
-{
-
- public final static int NAME = 0;
-
- public final static int NUMBER = 1;
-
- public final static int INFO = 2;
-
- public final static int SDO_PROPERTY_COUNT = 3;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_NAME = 0;
-
- /**
- * The internal feature id for the '<em><b>Number</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_NUMBER = 1;
-
- /**
- * The internal feature id for the '<em><b>Info</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_INFO = 2;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 3;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_NAME: return NAME;
- case INTERNAL_NUMBER: return NUMBER;
- case INTERNAL_INFO: return INFO;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_DEFAULT_;
-
- /**
- * This is true if the Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean name_set_ = false;
-
- /**
- * The default value of the '{@link #getNumber() <em>Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNumber()
- * @generated
- * @ordered
- */
- protected static final BigInteger NUMBER_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getNumber() <em>Number</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNumber()
- * @generated
- * @ordered
- */
- protected BigInteger number = NUMBER_DEFAULT_;
-
- /**
- * This is true if the Number attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean number_set_ = false;
-
- /**
- * The cached value of the '{@link #getInfo() <em>Info</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInfo()
- * @generated
- * @ordered
- */
-
- protected InfoType info = null;
-
- /**
- * This is true if the Info containment reference has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean info_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomerTypeImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getCustomerType();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- boolean oldName_set_ = name_set_;
- name_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetName()
- {
- String oldName = name;
- boolean oldName_set_ = name_set_;
- name = NAME_DEFAULT_;
- name_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetName()
- {
- return name_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigInteger getNumber()
- {
- return number;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setNumber(BigInteger newNumber)
- {
- BigInteger oldNumber = number;
- number = newNumber;
- boolean oldNumber_set_ = number_set_;
- number_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_NUMBER, oldNumber, number, !oldNumber_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetNumber()
- {
- BigInteger oldNumber = number;
- boolean oldNumber_set_ = number_set_;
- number = NUMBER_DEFAULT_;
- number_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetNumber()
- {
- return number_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public InfoType getInfo()
- {
- return info;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicSetInfo(InfoType newInfo, ChangeContext changeContext)
- {
- InfoType oldInfo = info;
- info = newInfo;
- boolean oldInfo_set_ = info_set_;
- info_set_ = true;
- if (isNotifying())
- {
- addNotification(this, ChangeKind.SET, INTERNAL_INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
- }
- return changeContext;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInfo(InfoType newInfo)
- {
- if (newInfo != info)
- {
- ChangeContext changeContext = null;
- if (info != null)
- changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
- if (newInfo != null)
- changeContext = inverseAdd(newInfo, this, OPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
- changeContext = basicSetInfo(newInfo, changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- else
- {
- boolean oldInfo_set_ = info_set_;
- info_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_INFO, newInfo, newInfo, !oldInfo_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicUnsetInfo(ChangeContext changeContext)
- {
- InfoType oldInfo = info;
- info = null;
- boolean oldInfo_set_ = info_set_;
- info_set_ = false;
- if (isNotifying())
- {
- addNotification(this, ChangeKind.UNSET, INTERNAL_INFO, oldInfo, null, !oldInfo_set_, changeContext);
- }
- return changeContext;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetInfo()
- {
- if (info != null)
- {
- ChangeContext changeContext = null;
- changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
- changeContext = basicUnsetInfo(changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- else
- {
- boolean oldInfo_set_ = info_set_;
- info_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_INFO, null, null, oldInfo_set_);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetInfo()
- {
- return info_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case INFO:
- return basicUnsetInfo(changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case NAME:
- return getName();
- case NUMBER:
- return getNumber();
- case INFO:
- return getInfo();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case NAME:
- setName((String)newValue);
- return;
- case NUMBER:
- setNumber((BigInteger)newValue);
- return;
- case INFO:
- setInfo((InfoType)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case NAME:
- unsetName();
- return;
- case NUMBER:
- unsetNumber();
- return;
- case INFO:
- unsetInfo();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case NAME:
- return isSetName();
- case NUMBER:
- return isSetNumber();
- case INFO:
- return isSetInfo();
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString()
- {
- if (isProxy(this)) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- if (name_set_) result.append(name); else result.append("<unset>");
- result.append(", number: ");
- if (number_set_) result.append(number); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //CustomerTypeImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java
deleted file mode 100644
index 984fea97e9..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomersTypeImpl.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer.impl;
-
-import com.example.extensible.customer.CustomerFactory;
-import com.example.extensible.customer.CustomerType;
-import com.example.extensible.customer.CustomersType;
-
-import commonj.sdo.Type;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Customers Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.extensible.customer.impl.CustomersTypeImpl#getCustomer <em>Customer</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class CustomersTypeImpl extends DataObjectBase implements CustomersType
-{
-
- public final static int CUSTOMER = 0;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Customer</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_CUSTOMER = 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_CUSTOMER: return CUSTOMER;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The cached value of the '{@link #getCustomer() <em>Customer</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCustomer()
- * @generated
- * @ordered
- */
-
- protected List customer = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CustomersTypeImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getCustomersType();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getCustomer()
- {
- if (customer == null)
- {
- customer = createPropertyList(ListKind.CONTAINMENT, CustomerType.class, CUSTOMER, 0);
- }
- return customer;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case CUSTOMER:
- return removeFromList(getCustomer(), otherEnd, changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case CUSTOMER:
- return getCustomer();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case CUSTOMER:
- getCustomer().clear();
- getCustomer().addAll((Collection)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case CUSTOMER:
- getCustomer().clear();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case CUSTOMER:
- return customer != null && !customer.isEmpty();
- }
- return super.isSet(propertyIndex);
- }
-
-} //CustomersTypeImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java
deleted file mode 100644
index 66f3dc424a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/InfoTypeImpl.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example.extensible.customer.impl;
-
-import com.example.extensible.customer.CustomerFactory;
-import com.example.extensible.customer.InfoType;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Info Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * </p>
- *
- * @generated
- */
-public class InfoTypeImpl extends DataObjectBase implements InfoType
-{
-
- public final static int SDO_PROPERTY_COUNT = 0;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 0;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public InfoTypeImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CustomerFactoryImpl)CustomerFactory.INSTANCE).getInfoType();
- }
-
-} //InfoTypeImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
deleted file mode 100644
index f01784049f..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
+++ /dev/null
@@ -1,1237 +0,0 @@
-/**
- *
- * 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.noInterfaces.simple;
-
-import commonj.sdo.Type;
-
-import java.io.Serializable;
-
-import java.math.BigDecimal;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Quote</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.noInterfaces.simple.Quote#getSymbol <em>Symbol</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getCompanyName <em>Company Name</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getPrice <em>Price</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getOpen1 <em>Open1</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getHigh <em>High</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getLow <em>Low</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getVolume <em>Volume</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getChange1 <em>Change1</em>}</li>
- * <li>{@link com.example.noInterfaces.simple.Quote#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public class Quote extends DataObjectBase implements Serializable
-{
-
- public final static int SYMBOL = 0;
-
- public final static int COMPANY_NAME = 1;
-
- public final static int PRICE = 2;
-
- public final static int OPEN1 = 3;
-
- public final static int HIGH = 4;
-
- public final static int LOW = 5;
-
- public final static int VOLUME = 6;
-
- public final static int CHANGE1 = 7;
-
- public final static int QUOTES = 8;
-
- public final static int SDO_PROPERTY_COUNT = 9;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The 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 = 0;
-
- /**
- * 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 = 1;
-
- /**
- * 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 = 2;
-
- /**
- * 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 = 3;
-
- /**
- * 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 = 4;
-
- /**
- * 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 = 5;
-
- /**
- * 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 = 6;
-
- /**
- * 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 = 7;
-
- /**
- * 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 = 8;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 9;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_SYMBOL: return SYMBOL;
- case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
- case INTERNAL_PRICE: return PRICE;
- case INTERNAL_OPEN1: return OPEN1;
- case INTERNAL_HIGH: return HIGH;
- case INTERNAL_LOW: return LOW;
- case INTERNAL_VOLUME: return VOLUME;
- case INTERNAL_CHANGE1: return CHANGE1;
- case INTERNAL_QUOTES: return QUOTES;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected static final String SYMBOL_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected String symbol = SYMBOL_DEFAULT_;
-
- /**
- * This is true if the Symbol attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean symbol_set_ = false;
-
- /**
- * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected static final String COMPANY_NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected String companyName = COMPANY_NAME_DEFAULT_;
-
- /**
- * This is true if the Company Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean companyName_set_ = false;
-
- /**
- * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected static final BigDecimal PRICE_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected BigDecimal price = PRICE_DEFAULT_;
-
- /**
- * This is true if the Price attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean price_set_ = false;
-
- /**
- * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected static final BigDecimal OPEN1_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected BigDecimal open1 = OPEN1_DEFAULT_;
-
- /**
- * This is true if the Open1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean open1_set_ = false;
-
- /**
- * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected static final BigDecimal HIGH_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected BigDecimal high = HIGH_DEFAULT_;
-
- /**
- * This is true if the High attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean high_set_ = false;
-
- /**
- * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected static final BigDecimal LOW_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected BigDecimal low = LOW_DEFAULT_;
-
- /**
- * This is true if the Low attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean low_set_ = false;
-
- /**
- * The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected static final double VOLUME_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected double volume = VOLUME_DEFAULT_;
-
- /**
- * This is true if the Volume attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean volume_set_ = false;
-
- /**
- * The default value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected static final double CHANGE1_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected double change1 = CHANGE1_DEFAULT_;
-
- /**
- * This is true if the Change1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean change1_set_ = false;
-
- /**
- * The cached value of the '{@link #getQuotes() <em>Quotes</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuotes()
- * @generated
- * @ordered
- */
-
- protected List quotes = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Quote()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((SimpleFactory)SimpleFactory.INSTANCE).getQuote();
- }
-
- /**
- * 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
- */
- public String getSymbol()
- {
- return symbol;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setSymbol(String newSymbol)
- {
- String oldSymbol = symbol;
- symbol = newSymbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- public void unsetSymbol()
- {
- String oldSymbol = symbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol = SYMBOL_DEFAULT_;
- symbol_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getSymbol <em>Symbol</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Symbol</em>' attribute is set.
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- public boolean isSetSymbol()
- {
- return symbol_set_;
- }
-
- /**
- * 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
- */
- public String getCompanyName()
- {
- return companyName;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setCompanyName(String newCompanyName)
- {
- String oldCompanyName = companyName;
- companyName = newCompanyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- public void unsetCompanyName()
- {
- String oldCompanyName = companyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName = COMPANY_NAME_DEFAULT_;
- companyName_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getCompanyName <em>Company Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Company Name</em>' attribute is set.
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- public boolean isSetCompanyName()
- {
- return companyName_set_;
- }
-
- /**
- * 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
- */
- public BigDecimal getPrice()
- {
- return price;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setPrice(BigDecimal newPrice)
- {
- BigDecimal oldPrice = price;
- price = newPrice;
- boolean oldPrice_set_ = price_set_;
- price_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- public void unsetPrice()
- {
- BigDecimal oldPrice = price;
- boolean oldPrice_set_ = price_set_;
- price = PRICE_DEFAULT_;
- price_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getPrice <em>Price</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Price</em>' attribute is set.
- * @see #unsetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- public boolean isSetPrice()
- {
- return price_set_;
- }
-
- /**
- * 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
- */
- public BigDecimal getOpen1()
- {
- return open1;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setOpen1(BigDecimal newOpen1)
- {
- BigDecimal oldOpen1 = open1;
- open1 = newOpen1;
- boolean oldOpen1_set_ = open1_set_;
- open1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- public void unsetOpen1()
- {
- BigDecimal oldOpen1 = open1;
- boolean oldOpen1_set_ = open1_set_;
- open1 = OPEN1_DEFAULT_;
- open1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getOpen1 <em>Open1</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Open1</em>' attribute is set.
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- public boolean isSetOpen1()
- {
- return open1_set_;
- }
-
- /**
- * 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
- */
- public BigDecimal getHigh()
- {
- return high;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setHigh(BigDecimal newHigh)
- {
- BigDecimal oldHigh = high;
- high = newHigh;
- boolean oldHigh_set_ = high_set_;
- high_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- public void unsetHigh()
- {
- BigDecimal oldHigh = high;
- boolean oldHigh_set_ = high_set_;
- high = HIGH_DEFAULT_;
- high_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getHigh <em>High</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>High</em>' attribute is set.
- * @see #unsetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- public boolean isSetHigh()
- {
- return high_set_;
- }
-
- /**
- * 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
- */
- public BigDecimal getLow()
- {
- return low;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setLow(BigDecimal newLow)
- {
- BigDecimal oldLow = low;
- low = newLow;
- boolean oldLow_set_ = low_set_;
- low_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getLow <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- public void unsetLow()
- {
- BigDecimal oldLow = low;
- boolean oldLow_set_ = low_set_;
- low = LOW_DEFAULT_;
- low_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#getLow <em>Low</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Low</em>' attribute is set.
- * @see #unsetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- public boolean isSetLow()
- {
- return low_set_;
- }
-
- /**
- * 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
- */
- public double getVolume()
- {
- return volume;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setVolume(double newVolume)
- {
- double oldVolume = volume;
- volume = newVolume;
- boolean oldVolume_set_ = volume_set_;
- volume_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getVolume <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetVolume()
- * @see #getVolume()
- * @see #setVolume(double)
- * @generated
- */
- public void unsetVolume()
- {
- double oldVolume = volume;
- boolean oldVolume_set_ = volume_set_;
- volume = VOLUME_DEFAULT_;
- volume_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public boolean isSetVolume()
- {
- return volume_set_;
- }
-
- /**
- * 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
- */
- public double getChange1()
- {
- return change1;
- }
- /**
- * Sets the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public void setChange1(double newChange1)
- {
- double oldChange1 = change1;
- change1 = newChange1;
- boolean oldChange1_set_ = change1_set_;
- change1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
- }
-
- /**
- * Unsets the value of the '{@link com.example.noInterfaces.simple.Quote#getChange1 <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetChange1()
- * @see #getChange1()
- * @see #setChange1(double)
- * @generated
- */
- public void unsetChange1()
- {
- double oldChange1 = change1;
- boolean oldChange1_set_ = change1_set_;
- change1 = CHANGE1_DEFAULT_;
- change1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
- }
-
- /**
- * Returns whether the value of the '{@link com.example.noInterfaces.simple.Quote#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
- */
- public boolean isSetChange1()
- {
- return change1_set_;
- }
-
- /**
- * Returns the value of the '<em><b>Quotes</b></em>' containment reference list.
- * The list contents are of type {@link com.example.noInterfaces.simple.Quote}.
- * <!-- 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
- */
- public List getQuotes()
- {
- if (quotes == null)
- {
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
- }
- return quotes;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- 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 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 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 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 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 quotes != null && !quotes.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(" (symbol: ");
- if (symbol_set_) result.append(symbol); else result.append("<unset>");
- result.append(", companyName: ");
- if (companyName_set_) result.append(companyName); else result.append("<unset>");
- result.append(", price: ");
- if (price_set_) result.append(price); else result.append("<unset>");
- result.append(", open1: ");
- if (open1_set_) result.append(open1); else result.append("<unset>");
- result.append(", high: ");
- if (high_set_) result.append(high); else result.append("<unset>");
- result.append(", low: ");
- if (low_set_) result.append(low); else result.append("<unset>");
- result.append(", volume: ");
- if (volume_set_) result.append(volume); else result.append("<unset>");
- result.append(", change1: ");
- if (change1_set_) result.append(change1); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} // Quote
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java
deleted file mode 100644
index a3b8bd81c8..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- *
- * 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.noInterfaces.simple;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-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 -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * patternVersion=1.2; -noInterfaces
- * @generated
- */
-public class SimpleFactory extends FactoryBase
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final SimpleFactory INSTANCE = com.example.noInterfaces.simple.SimpleFactory.init();
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/simple";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "simple";
-
- /**
- * 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 QUOTE = 1;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SimpleFactory()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.noInterfaces.simple");
- }
-
- /**
- * 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 QUOTE: return (DataObject)createQuote();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Quote createQuote()
- {
- Quote quote = new Quote();
- return quote;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type quoteType = null;
-
- public Type getQuote()
- {
- return quoteType;
- }
-
-
- private static SimpleFactory instance = null;
- public static SimpleFactory init()
- {
- if (instance != null ) return instance;
- instance = new SimpleFactory();
-
- // 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
- //theSimpleFactory.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
- quoteType = createType(false, QUOTE);
- createProperty(true, quoteType,Quote.INTERNAL_SYMBOL);
- createProperty(true, quoteType,Quote.INTERNAL_COMPANY_NAME);
- createProperty(true, quoteType,Quote.INTERNAL_PRICE);
- createProperty(true, quoteType,Quote.INTERNAL_OPEN1);
- createProperty(true, quoteType,Quote.INTERNAL_HIGH);
- createProperty(true, quoteType,Quote.INTERNAL_LOW);
- createProperty(true, quoteType,Quote.INTERNAL_VOLUME);
- createProperty(true, quoteType,Quote.INTERNAL_CHANGE1);
- createProperty(false, quoteType,Quote.INTERNAL_QUOTES);
- }
-
- 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(quoteType, Quote.class, "Quote", false);
- property = getLocalProperty(quoteType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 2);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 3);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 4);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 5);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 6);
- initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 7);
- initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 8);
- initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("stockQuote",
- this.getQuote(),
- new String[]
- {
- "kind", "element",
- "name", "stockQuote",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (quoteType,
- new String[]
- {
- "name", "Quote",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_SYMBOL),
- new String[]
- {
- "kind", "element",
- "name", "symbol"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_COMPANY_NAME),
- new String[]
- {
- "kind", "element",
- "name", "companyName"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_PRICE),
- new String[]
- {
- "kind", "element",
- "name", "price"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_OPEN1),
- new String[]
- {
- "kind", "element",
- "name", "open1"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_HIGH),
- new String[]
- {
- "kind", "element",
- "name", "high"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_LOW),
- new String[]
- {
- "kind", "element",
- "name", "low"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_VOLUME),
- new String[]
- {
- "kind", "element",
- "name", "volume"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_CHANGE1),
- new String[]
- {
- "kind", "element",
- "name", "change1"
- });
-
- addXSDMapping
- (getProperty(quoteType, Quote.INTERNAL_QUOTES),
- new String[]
- {
- "kind", "element",
- "name", "quotes"
- });
-
- }
-
-} //SimpleFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OneElementAndAnyAttr.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OneElementAndAnyAttr.java
deleted file mode 100644
index 6c3beeedee..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OneElementAndAnyAttr.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- *
- * 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.open;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>One Element And Any Attr</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.open.OneElementAndAnyAttr#getName <em>Name</em>}</li>
- * <li>{@link com.example.open.OneElementAndAnyAttr#getAnyAttribute <em>Any Attribute</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface OneElementAndAnyAttr extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>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>Name</em>' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #setName(String)
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link com.example.open.OneElementAndAnyAttr#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.open.OneElementAndAnyAttr#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- void unsetName();
-
- /**
- * Returns whether the value of the '{@link com.example.open.OneElementAndAnyAttr#getName <em>Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Name</em>' attribute is set.
- * @see #unsetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- boolean isSetName();
-
- /**
- * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Any Attribute</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>Any Attribute</em>' attribute list.
- * @generated
- */
- Sequence getAnyAttribute();
-
-} // OneElementAndAnyAttr
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OpenFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OpenFactory.java
deleted file mode 100644
index cc248c1ac5..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/OpenFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.open;
-
-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 OpenFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- OpenFactory INSTANCE = com.example.open.impl.OpenFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>One Element And Any Attr</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>One Element And Any Attr</em>'.
- * @generated
- */
- OneElementAndAnyAttr createOneElementAndAnyAttr();
-
- /**
- * 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);
-
-} //OpenFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
deleted file mode 100644
index 1746f04d5b..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**
- *
- * 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.open.impl;
-
-import com.example.open.OneElementAndAnyAttr;
-import com.example.open.OpenFactory;
-
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>One Element And Any Attr</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.open.impl.OneElementAndAnyAttrImpl#getName <em>Name</em>}</li>
- * <li>{@link com.example.open.impl.OneElementAndAnyAttrImpl#getAnyAttribute <em>Any Attribute</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class OneElementAndAnyAttrImpl extends DataObjectBase implements OneElementAndAnyAttr
-{
-
- public final static int NAME = 0;
-
- public final static int ANY_ATTRIBUTE = -1;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = -1;
-
-
- /**
- * The internal feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_NAME = 0;
-
- /**
- * The internal feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_ANY_ATTRIBUTE = 1;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 2;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_NAME: return NAME;
- case INTERNAL_ANY_ATTRIBUTE: return ANY_ATTRIBUTE;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_DEFAULT_;
-
- /**
- * This is true if the Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean name_set_ = false;
-
- /**
- * The cached value of the '{@link #getAnyAttribute() <em>Any Attribute</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAnyAttribute()
- * @generated
- * @ordered
- */
-
- protected Sequence anyAttribute = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OneElementAndAnyAttrImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((OpenFactoryImpl)OpenFactory.INSTANCE).getOneElementAndAnyAttr();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- boolean oldName_set_ = name_set_;
- name_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetName()
- {
- String oldName = name;
- boolean oldName_set_ = name_set_;
- name = NAME_DEFAULT_;
- name_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetName()
- {
- return name_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Sequence getAnyAttribute()
- {
- if (anyAttribute == null)
- {
- anyAttribute = createSequence(INTERNAL_ANY_ATTRIBUTE);
- }
- return anyAttribute;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case ANY_ATTRIBUTE:
- return removeFromSequence(getAnyAttribute(), 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 NAME:
- return getName();
- case ANY_ATTRIBUTE:
- // 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 getAnyAttribute();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case NAME:
- setName((String)newValue);
- return;
- case ANY_ATTRIBUTE:
- setSequence(getAnyAttribute(), newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case NAME:
- unsetName();
- return;
- case ANY_ATTRIBUTE:
- unsetSequence(getAnyAttribute());
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case NAME:
- return isSetName();
- case ANY_ATTRIBUTE:
- return anyAttribute != null && !isSequenceEmpty(getAnyAttribute());
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString()
- {
- if (isProxy(this)) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- if (name_set_) result.append(name); else result.append("<unset>");
- result.append(", anyAttribute: ");
- result.append(anyAttribute);
- result.append(')');
- return result.toString();
- }
-
-} //OneElementAndAnyAttrImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
deleted file mode 100644
index 461616584a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- *
- * 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.open.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.open.*;
-
-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 OpenFactoryImpl extends FactoryBase implements OpenFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/open";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "open";
-
- /**
- * 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 ONE_ELEMENT_AND_ANY_ATTR = 1;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OpenFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.open");
- }
-
- /**
- * 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 ONE_ELEMENT_AND_ANY_ATTR: return (DataObject)createOneElementAndAnyAttr();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public OneElementAndAnyAttr createOneElementAndAnyAttr()
- {
- OneElementAndAnyAttrImpl oneElementAndAnyAttr = new OneElementAndAnyAttrImpl();
- return oneElementAndAnyAttr;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type oneElementAndAnyAttrType = null;
-
- public Type getOneElementAndAnyAttr()
- {
- return oneElementAndAnyAttrType;
- }
-
-
- private static OpenFactoryImpl instance = null;
- public static OpenFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new OpenFactoryImpl();
-
- // 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
- //theOpenFactoryImpl.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
- oneElementAndAnyAttrType = createType(false, ONE_ELEMENT_AND_ANY_ATTR);
- createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_NAME);
- createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_ANY_ATTRIBUTE);
- }
-
- 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(oneElementAndAnyAttrType, OneElementAndAnyAttr.class, "OneElementAndAnyAttr", false);
- property = getLocalProperty(oneElementAndAnyAttrType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "name", null, 1, 1, OneElementAndAnyAttr.class, false, true, false);
-
- property = getLocalProperty(oneElementAndAnyAttrType, 1);
- initializeProperty(property, getSequence(), "anyAttribute", null, 0, -1, OneElementAndAnyAttr.class, false, false, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("globAttribute",
- theModelPackageImpl.getString(),
- new String[]
- {
- "kind", "attribute",
- "name", "globAttribute",
- "namespace", "##targetNamespace"
- },
- IS_ATTRIBUTE);
-
- addXSDMapping
- (oneElementAndAnyAttrType,
- new String[]
- {
- "name", "OneElementAndAnyAttr",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(oneElementAndAnyAttrType, OneElementAndAnyAttrImpl.INTERNAL_NAME),
- new String[]
- {
- "kind", "element",
- "name", "name"
- });
-
- addXSDMapping
- (getProperty(oneElementAndAnyAttrType, OneElementAndAnyAttrImpl.INTERNAL_ANY_ATTRIBUTE),
- new String[]
- {
- "kind", "attributeWildcard",
- "wildcards", "##any",
- "name", ":1",
- "processing", "lax"
- });
-
- }
-
-} //OpenFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RCType.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RCType.java
deleted file mode 100644
index 29a558b5a2..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RCType.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
deleted file mode 100644
index 9a7c3033a5..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
deleted file mode 100644
index eb1310cc9d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
deleted file mode 100644
index 40d3e9eeec..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java
deleted file mode 100644
index f1882ba616..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
deleted file mode 100644
index dba64b0487..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
deleted file mode 100644
index 3f0b0839f2..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
deleted file mode 100644
index 900b51ddc3..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
deleted file mode 100644
index c6e54e6598..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
deleted file mode 100644
index 90d5f942b6..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
deleted file mode 100644
index c0699e50fb..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
+++ /dev/null
@@ -1,756 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
deleted file mode 100644
index 2fb4c5ec45..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
deleted file mode 100644
index dc6fcf6323..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
deleted file mode 100644
index 84631cb06d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
+++ /dev/null
@@ -1,770 +0,0 @@
-/**
- *
- * 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
deleted file mode 100644
index b1ac177cb9..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
deleted file mode 100644
index df28d645e9..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
+++ /dev/null
@@ -1,489 +0,0 @@
-/**
- *
- * 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 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/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/Quote.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/Quote.java
deleted file mode 100644
index 48dcf96d64..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/Quote.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/**
- *
- * 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.simple;
-
-import java.io.Serializable;
-
-import java.math.BigDecimal;
-
-import java.util.List;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Quote</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.simple.Quote#getSymbol <em>Symbol</em>}</li>
- * <li>{@link com.example.simple.Quote#getCompanyName <em>Company Name</em>}</li>
- * <li>{@link com.example.simple.Quote#getPrice <em>Price</em>}</li>
- * <li>{@link com.example.simple.Quote#getOpen1 <em>Open1</em>}</li>
- * <li>{@link com.example.simple.Quote#getHigh <em>High</em>}</li>
- * <li>{@link com.example.simple.Quote#getLow <em>Low</em>}</li>
- * <li>{@link com.example.simple.Quote#getVolume <em>Volume</em>}</li>
- * <li>{@link com.example.simple.Quote#getChange1 <em>Change1</em>}</li>
- * <li>{@link com.example.simple.Quote#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface Quote extends Serializable
-{
- /**
- * 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.simple.Quote#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.simple.Quote#getSymbol <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- void unsetSymbol();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getSymbol <em>Symbol</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Symbol</em>' attribute is set.
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- boolean isSetSymbol();
-
- /**
- * Returns the value of the '<em><b>Company Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.Quote#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.simple.Quote#getCompanyName <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- void unsetCompanyName();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getCompanyName <em>Company Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Company Name</em>' attribute is set.
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- boolean isSetCompanyName();
-
- /**
- * Returns the value of the '<em><b>Price</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.Quote#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.simple.Quote#getPrice <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- void unsetPrice();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getPrice <em>Price</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Price</em>' attribute is set.
- * @see #unsetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- boolean isSetPrice();
-
- /**
- * Returns the value of the '<em><b>Open1</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.Quote#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.simple.Quote#getOpen1 <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- void unsetOpen1();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getOpen1 <em>Open1</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Open1</em>' attribute is set.
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- boolean isSetOpen1();
-
- /**
- * Returns the value of the '<em><b>High</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.Quote#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.simple.Quote#getHigh <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- void unsetHigh();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getHigh <em>High</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>High</em>' attribute is set.
- * @see #unsetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- boolean isSetHigh();
-
- /**
- * Returns the value of the '<em><b>Low</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.Quote#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.simple.Quote#getLow <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- void unsetLow();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getLow <em>Low</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Low</em>' attribute is set.
- * @see #unsetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- boolean isSetLow();
-
- /**
- * Returns the value of the '<em><b>Volume</b></em>' attribute.
- * <!-- 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.simple.Quote#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.simple.Quote#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.simple.Quote#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.simple.Quote#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.simple.Quote#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.simple.Quote#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.simple.Quote}.
- * <!-- 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();
-
-} // Quote
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/SimpleFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/SimpleFactory.java
deleted file mode 100644
index 98dc01d69a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/SimpleFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- *
- * 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.simple;
-
-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 SimpleFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SimpleFactory INSTANCE = com.example.simple.impl.SimpleFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Quote</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Quote</em>'.
- * @generated
- */
- Quote createQuote();
-
- /**
- * 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);
-
-} //SimpleFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/CSFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/CSFactory.java
deleted file mode 100644
index 6a742b2cdf..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/CSFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- *
- * 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.simple.cs;
-
-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 CSFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- CSFactory INSTANCE = com.example.simple.cs.impl.CSFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Quote</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Quote</em>'.
- * @generated
- */
- Quote createQuote();
-
- /**
- * Returns a new object of class '<em>Quote Base</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Quote Base</em>'.
- * @generated
- */
- QuoteBase createQuoteBase();
-
- /**
- * 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);
-
-} //CSFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/Quote.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/Quote.java
deleted file mode 100644
index f18f8117c4..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/Quote.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/**
- *
- * 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.simple.cs;
-
-import java.io.Serializable;
-
-import java.math.BigDecimal;
-
-import java.util.List;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Quote</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.simple.cs.Quote#getSymbol <em>Symbol</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getCompanyName <em>Company Name</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getPrice <em>Price</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getOpen1 <em>Open1</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getHigh <em>High</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getLow <em>Low</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getVolume <em>Volume</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getChange1 <em>Change1</em>}</li>
- * <li>{@link com.example.simple.cs.Quote#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface Quote extends Serializable
-{
- /**
- * 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.simple.cs.Quote#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.simple.cs.Quote#getSymbol <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- void unsetSymbol();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getSymbol <em>Symbol</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Symbol</em>' attribute is set.
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- boolean isSetSymbol();
-
- /**
- * Returns the value of the '<em><b>Company Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.cs.Quote#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.simple.cs.Quote#getCompanyName <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- void unsetCompanyName();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getCompanyName <em>Company Name</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Company Name</em>' attribute is set.
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- boolean isSetCompanyName();
-
- /**
- * Returns the value of the '<em><b>Price</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.cs.Quote#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.simple.cs.Quote#getPrice <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- void unsetPrice();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getPrice <em>Price</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Price</em>' attribute is set.
- * @see #unsetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- boolean isSetPrice();
-
- /**
- * Returns the value of the '<em><b>Open1</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.cs.Quote#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.simple.cs.Quote#getOpen1 <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- void unsetOpen1();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getOpen1 <em>Open1</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Open1</em>' attribute is set.
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- boolean isSetOpen1();
-
- /**
- * Returns the value of the '<em><b>High</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.cs.Quote#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.simple.cs.Quote#getHigh <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- void unsetHigh();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getHigh <em>High</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>High</em>' attribute is set.
- * @see #unsetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- boolean isSetHigh();
-
- /**
- * Returns the value of the '<em><b>Low</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * 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.simple.cs.Quote#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.simple.cs.Quote#getLow <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- void unsetLow();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.Quote#getLow <em>Low</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Low</em>' attribute is set.
- * @see #unsetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- boolean isSetLow();
-
- /**
- * Returns the value of the '<em><b>Volume</b></em>' attribute.
- * <!-- 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.simple.cs.Quote#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.simple.cs.Quote#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.simple.cs.Quote#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.simple.cs.Quote#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.simple.cs.Quote#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.simple.cs.Quote#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.simple.cs.Quote}.
- * <!-- 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();
-
-} // Quote
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/QuoteBase.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/QuoteBase.java
deleted file mode 100644
index c086be2c71..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/QuoteBase.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- *
- * 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.simple.cs;
-
-import commonj.sdo.ChangeSummary;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Quote Base</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public interface QuoteBase extends Quote
-{
- /**
- * Returns the value of the '<em><b>Changes</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Changes</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Changes</em>' attribute.
- * @see #isSetChanges()
- * @see #unsetChanges()
- * @see #setChanges(ChangeSummary)
- * @generated
- */
- ChangeSummary getChanges();
-
- /**
- * Sets the value of the '{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Changes</em>' attribute.
- * @see #isSetChanges()
- * @see #unsetChanges()
- * @see #getChanges()
- * @generated
- */
- void setChanges(ChangeSummary value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetChanges()
- * @see #getChanges()
- * @see #setChanges(ChangeSummary)
- * @generated
- */
- void unsetChanges();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.cs.QuoteBase#getChanges <em>Changes</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Changes</em>' attribute is set.
- * @see #unsetChanges()
- * @see #getChanges()
- * @see #setChanges(ChangeSummary)
- * @generated
- */
- boolean isSetChanges();
-
-} // QuoteBase
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java
deleted file mode 100644
index ce63e6bfae..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/CSFactoryImpl.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/**
- *
- * 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.simple.cs.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.simple.cs.*;
-
-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 CS
- * <!-- end-user-doc -->
- * @generated
- */
-public class CSFactoryImpl extends FactoryBase implements CSFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/simpleCS";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "simpleCS";
-
- /**
- * 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 QUOTE = 1;
- public static final int QUOTE_BASE = 2;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CSFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.simple.cs");
- }
-
- /**
- * 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 QUOTE: return (DataObject)createQuote();
- case QUOTE_BASE: return (DataObject)createQuoteBase();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Quote createQuote()
- {
- QuoteImpl quote = new QuoteImpl();
- return quote;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public QuoteBase createQuoteBase()
- {
- QuoteBaseImpl quoteBase = new QuoteBaseImpl();
- return quoteBase;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type quoteType = null;
-
- public Type getQuote()
- {
- return quoteType;
- }
-
- protected Type quoteBaseType = null;
-
- public Type getQuoteBase()
- {
- return quoteBaseType;
- }
-
-
- private static CSFactoryImpl instance = null;
- public static CSFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new CSFactoryImpl();
-
- // 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
- //theCSFactoryImpl.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
- quoteType = createType(false, QUOTE);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_SYMBOL);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_COMPANY_NAME);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_PRICE);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_OPEN1);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_HIGH);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_LOW);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_VOLUME);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_CHANGE1);
- createProperty(false, quoteType,QuoteImpl.INTERNAL_QUOTES);
- quoteBaseType = createType(false, QUOTE_BASE);
- createProperty(true, quoteBaseType,QuoteBaseImpl.INTERNAL_CHANGES);
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
- Property property = null;
-
- // Add supertypes to types
- addSuperType(quoteBaseType, this.getQuote());
-
- // Initialize types and properties
- initializeType(quoteType, Quote.class, "Quote", false);
- property = getLocalProperty(quoteType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 2);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 3);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 4);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 5);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 6);
- initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 7);
- initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 8);
- initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
-
- initializeType(quoteBaseType, QuoteBase.class, "QuoteBase", false);
- property = getLocalProperty(quoteBaseType, 0);
- initializeProperty(property, theModelPackageImpl.getChangeSummaryType(), "changes", null, 1, 1, QuoteBase.class, false, true, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("stockQuote",
- this.getQuoteBase(),
- new String[]
- {
- "kind", "element",
- "name", "stockQuote",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (quoteType,
- new String[]
- {
- "name", "Quote",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL),
- new String[]
- {
- "kind", "element",
- "name", "symbol"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME),
- new String[]
- {
- "kind", "element",
- "name", "companyName"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_PRICE),
- new String[]
- {
- "kind", "element",
- "name", "price"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1),
- new String[]
- {
- "kind", "element",
- "name", "open1"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_HIGH),
- new String[]
- {
- "kind", "element",
- "name", "high"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_LOW),
- new String[]
- {
- "kind", "element",
- "name", "low"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME),
- new String[]
- {
- "kind", "element",
- "name", "volume"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1),
- new String[]
- {
- "kind", "element",
- "name", "change1"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES),
- new String[]
- {
- "kind", "element",
- "name", "quotes"
- });
-
- addXSDMapping
- (quoteBaseType,
- new String[]
- {
- "name", "QuoteBase",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(quoteBaseType, QuoteBaseImpl.INTERNAL_CHANGES),
- new String[]
- {
- "kind", "element",
- "name", "changes"
- });
-
- }
-
-} //CSFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java
deleted file mode 100644
index 77a25ca7d3..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteBaseImpl.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- *
- * 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.simple.cs.impl;
-
-import com.example.simple.cs.CSFactory;
-import com.example.simple.cs.QuoteBase;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.Type;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Quote Base</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.simple.cs.impl.QuoteBaseImpl#getChanges <em>Changes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class QuoteBaseImpl extends QuoteImpl implements QuoteBase
-{
-
- public final static int CHANGES = QuoteImpl.SDO_PROPERTY_COUNT + 0;
-
- public final static int SDO_PROPERTY_COUNT = QuoteImpl.SDO_PROPERTY_COUNT + 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = QuoteImpl.EXTENDED_PROPERTY_COUNT - 0;
-
-
- /**
- * The 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 = QuoteImpl.INTERNAL_SYMBOL;
-
- /**
- * 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 = QuoteImpl.INTERNAL_COMPANY_NAME;
-
- /**
- * 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 = QuoteImpl.INTERNAL_PRICE;
-
- /**
- * 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 = QuoteImpl.INTERNAL_OPEN1;
-
- /**
- * 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 = QuoteImpl.INTERNAL_HIGH;
-
- /**
- * 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 = QuoteImpl.INTERNAL_LOW;
-
- /**
- * 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 = QuoteImpl.INTERNAL_VOLUME;
-
- /**
- * 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 = QuoteImpl.INTERNAL_CHANGE1;
-
- /**
- * 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 = QuoteImpl.INTERNAL_QUOTES;
-
- /**
- * The internal feature id for the '<em><b>Changes</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_CHANGES = QuoteImpl.INTERNAL_PROPERTY_COUNT + 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = QuoteImpl.INTERNAL_PROPERTY_COUNT + 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_SYMBOL: return SYMBOL;
- case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
- case INTERNAL_PRICE: return PRICE;
- case INTERNAL_OPEN1: return OPEN1;
- case INTERNAL_HIGH: return HIGH;
- case INTERNAL_LOW: return LOW;
- case INTERNAL_VOLUME: return VOLUME;
- case INTERNAL_CHANGE1: return CHANGE1;
- case INTERNAL_QUOTES: return QUOTES;
- case INTERNAL_CHANGES: return CHANGES;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getChanges() <em>Changes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChanges()
- * @generated
- * @ordered
- */
- protected static final ChangeSummary CHANGES_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getChanges() <em>Changes</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChanges()
- * @generated
- * @ordered
- */
- protected ChangeSummary changes = CHANGES_DEFAULT_;
-
- /**
- * This is true if the Changes attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean changes_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public QuoteBaseImpl()
- {
- super();
- createChangeSummary(CHANGES);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CSFactoryImpl)CSFactory.INSTANCE).getQuoteBase();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeSummary getChanges()
- {
- return changes;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setChanges(ChangeSummary newChanges)
- {
- ChangeSummary oldChanges = changes;
- changes = newChanges;
- boolean oldChanges_set_ = changes_set_;
- changes_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_CHANGES, oldChanges, changes, !oldChanges_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetChanges()
- {
- ChangeSummary oldChanges = changes;
- boolean oldChanges_set_ = changes_set_;
- changes = CHANGES_DEFAULT_;
- changes_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_CHANGES, oldChanges, CHANGES_DEFAULT_, oldChanges_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetChanges()
- {
- return changes_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case CHANGES:
- return getChanges();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case CHANGES:
- setChanges((ChangeSummary)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case CHANGES:
- unsetChanges();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case CHANGES:
- return isSetChanges();
- }
- 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(" (changes: ");
- if (changes_set_) result.append(changes); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //QuoteBaseImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java
deleted file mode 100644
index d26af102d3..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/cs/impl/QuoteImpl.java
+++ /dev/null
@@ -1,1045 +0,0 @@
-/**
- *
- * 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.simple.cs.impl;
-
-import com.example.simple.cs.CSFactory;
-import com.example.simple.cs.Quote;
-
-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>Quote</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getSymbol <em>Symbol</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getCompanyName <em>Company Name</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getPrice <em>Price</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getOpen1 <em>Open1</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getHigh <em>High</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getLow <em>Low</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getVolume <em>Volume</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getChange1 <em>Change1</em>}</li>
- * <li>{@link com.example.simple.cs.impl.QuoteImpl#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class QuoteImpl extends DataObjectBase implements Quote
-{
-
- public final static int SYMBOL = 0;
-
- public final static int COMPANY_NAME = 1;
-
- public final static int PRICE = 2;
-
- public final static int OPEN1 = 3;
-
- public final static int HIGH = 4;
-
- public final static int LOW = 5;
-
- public final static int VOLUME = 6;
-
- public final static int CHANGE1 = 7;
-
- public final static int QUOTES = 8;
-
- public final static int SDO_PROPERTY_COUNT = 9;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The 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 = 0;
-
- /**
- * 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 = 1;
-
- /**
- * 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 = 2;
-
- /**
- * 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 = 3;
-
- /**
- * 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 = 4;
-
- /**
- * 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 = 5;
-
- /**
- * 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 = 6;
-
- /**
- * 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 = 7;
-
- /**
- * 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 = 8;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 9;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_SYMBOL: return SYMBOL;
- case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
- case INTERNAL_PRICE: return PRICE;
- case INTERNAL_OPEN1: return OPEN1;
- case INTERNAL_HIGH: return HIGH;
- case INTERNAL_LOW: return LOW;
- case INTERNAL_VOLUME: return VOLUME;
- case INTERNAL_CHANGE1: return CHANGE1;
- case INTERNAL_QUOTES: return QUOTES;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected static final String SYMBOL_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected String symbol = SYMBOL_DEFAULT_;
-
- /**
- * This is true if the Symbol attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean symbol_set_ = false;
-
- /**
- * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected static final String COMPANY_NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected String companyName = COMPANY_NAME_DEFAULT_;
-
- /**
- * This is true if the Company Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean companyName_set_ = false;
-
- /**
- * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected static final BigDecimal PRICE_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected BigDecimal price = PRICE_DEFAULT_;
-
- /**
- * This is true if the Price attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean price_set_ = false;
-
- /**
- * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected static final BigDecimal OPEN1_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected BigDecimal open1 = OPEN1_DEFAULT_;
-
- /**
- * This is true if the Open1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean open1_set_ = false;
-
- /**
- * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected static final BigDecimal HIGH_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected BigDecimal high = HIGH_DEFAULT_;
-
- /**
- * This is true if the High attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean high_set_ = false;
-
- /**
- * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected static final BigDecimal LOW_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected BigDecimal low = LOW_DEFAULT_;
-
- /**
- * This is true if the Low attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean low_set_ = false;
-
- /**
- * The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected static final double VOLUME_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected double volume = VOLUME_DEFAULT_;
-
- /**
- * This is true if the Volume attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean volume_set_ = false;
-
- /**
- * The default value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected static final double CHANGE1_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected double change1 = CHANGE1_DEFAULT_;
-
- /**
- * This is true if the Change1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean change1_set_ = false;
-
- /**
- * The cached value of the '{@link #getQuotes() <em>Quotes</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuotes()
- * @generated
- * @ordered
- */
-
- protected List quotes = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public QuoteImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((CSFactoryImpl)CSFactory.INSTANCE).getQuote();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getSymbol()
- {
- return symbol;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSymbol(String newSymbol)
- {
- String oldSymbol = symbol;
- symbol = newSymbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetSymbol()
- {
- String oldSymbol = symbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol = SYMBOL_DEFAULT_;
- symbol_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSymbol()
- {
- return symbol_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getCompanyName()
- {
- return companyName;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setCompanyName(String newCompanyName)
- {
- String oldCompanyName = companyName;
- companyName = newCompanyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetCompanyName()
- {
- String oldCompanyName = companyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName = COMPANY_NAME_DEFAULT_;
- companyName_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetCompanyName()
- {
- return companyName_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getPrice()
- {
- return price;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPrice(BigDecimal newPrice)
- {
- BigDecimal oldPrice = price;
- price = newPrice;
- boolean oldPrice_set_ = price_set_;
- price_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetPrice()
- {
- BigDecimal oldPrice = price;
- boolean oldPrice_set_ = price_set_;
- price = PRICE_DEFAULT_;
- price_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetPrice()
- {
- return price_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getOpen1()
- {
- return open1;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOpen1(BigDecimal newOpen1)
- {
- BigDecimal oldOpen1 = open1;
- open1 = newOpen1;
- boolean oldOpen1_set_ = open1_set_;
- open1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetOpen1()
- {
- BigDecimal oldOpen1 = open1;
- boolean oldOpen1_set_ = open1_set_;
- open1 = OPEN1_DEFAULT_;
- open1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetOpen1()
- {
- return open1_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getHigh()
- {
- return high;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setHigh(BigDecimal newHigh)
- {
- BigDecimal oldHigh = high;
- high = newHigh;
- boolean oldHigh_set_ = high_set_;
- high_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetHigh()
- {
- BigDecimal oldHigh = high;
- boolean oldHigh_set_ = high_set_;
- high = HIGH_DEFAULT_;
- high_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetHigh()
- {
- return high_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getLow()
- {
- return low;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLow(BigDecimal newLow)
- {
- BigDecimal oldLow = low;
- low = newLow;
- boolean oldLow_set_ = low_set_;
- low_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetLow()
- {
- BigDecimal oldLow = low;
- boolean oldLow_set_ = low_set_;
- low = LOW_DEFAULT_;
- low_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetLow()
- {
- return low_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public double getVolume()
- {
- return volume;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setVolume(double newVolume)
- {
- double oldVolume = volume;
- volume = newVolume;
- boolean oldVolume_set_ = volume_set_;
- volume_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetVolume()
- {
- double oldVolume = volume;
- boolean oldVolume_set_ = volume_set_;
- volume = VOLUME_DEFAULT_;
- volume_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetVolume()
- {
- return volume_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public double getChange1()
- {
- return change1;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setChange1(double newChange1)
- {
- double oldChange1 = change1;
- change1 = newChange1;
- boolean oldChange1_set_ = change1_set_;
- change1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetChange1()
- {
- double oldChange1 = change1;
- boolean oldChange1_set_ = change1_set_;
- change1 = CHANGE1_DEFAULT_;
- change1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetChange1()
- {
- return change1_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getQuotes()
- {
- if (quotes == null)
- {
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
- }
- return quotes;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- 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 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 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 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 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 quotes != null && !quotes.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(" (symbol: ");
- if (symbol_set_) result.append(symbol); else result.append("<unset>");
- result.append(", companyName: ");
- if (companyName_set_) result.append(companyName); else result.append("<unset>");
- result.append(", price: ");
- if (price_set_) result.append(price); else result.append("<unset>");
- result.append(", open1: ");
- if (open1_set_) result.append(open1); else result.append("<unset>");
- result.append(", high: ");
- if (high_set_) result.append(high); else result.append("<unset>");
- result.append(", low: ");
- if (low_set_) result.append(low); else result.append("<unset>");
- result.append(", volume: ");
- if (volume_set_) result.append(volume); else result.append("<unset>");
- result.append(", change1: ");
- if (change1_set_) result.append(change1); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //QuoteImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java
deleted file mode 100644
index dce5259550..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/QuoteImpl.java
+++ /dev/null
@@ -1,1045 +0,0 @@
-/**
- *
- * 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.simple.impl;
-
-import com.example.simple.Quote;
-import com.example.simple.SimpleFactory;
-
-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>Quote</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.simple.impl.QuoteImpl#getSymbol <em>Symbol</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getCompanyName <em>Company Name</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getPrice <em>Price</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getOpen1 <em>Open1</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getHigh <em>High</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getLow <em>Low</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getVolume <em>Volume</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getChange1 <em>Change1</em>}</li>
- * <li>{@link com.example.simple.impl.QuoteImpl#getQuotes <em>Quotes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class QuoteImpl extends DataObjectBase implements Quote
-{
-
- public final static int SYMBOL = 0;
-
- public final static int COMPANY_NAME = 1;
-
- public final static int PRICE = 2;
-
- public final static int OPEN1 = 3;
-
- public final static int HIGH = 4;
-
- public final static int LOW = 5;
-
- public final static int VOLUME = 6;
-
- public final static int CHANGE1 = 7;
-
- public final static int QUOTES = 8;
-
- public final static int SDO_PROPERTY_COUNT = 9;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The 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 = 0;
-
- /**
- * 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 = 1;
-
- /**
- * 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 = 2;
-
- /**
- * 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 = 3;
-
- /**
- * 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 = 4;
-
- /**
- * 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 = 5;
-
- /**
- * 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 = 6;
-
- /**
- * 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 = 7;
-
- /**
- * 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 = 8;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 9;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_SYMBOL: return SYMBOL;
- case INTERNAL_COMPANY_NAME: return COMPANY_NAME;
- case INTERNAL_PRICE: return PRICE;
- case INTERNAL_OPEN1: return OPEN1;
- case INTERNAL_HIGH: return HIGH;
- case INTERNAL_LOW: return LOW;
- case INTERNAL_VOLUME: return VOLUME;
- case INTERNAL_CHANGE1: return CHANGE1;
- case INTERNAL_QUOTES: return QUOTES;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected static final String SYMBOL_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSymbol()
- * @generated
- * @ordered
- */
- protected String symbol = SYMBOL_DEFAULT_;
-
- /**
- * This is true if the Symbol attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean symbol_set_ = false;
-
- /**
- * The default value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected static final String COMPANY_NAME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getCompanyName() <em>Company Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCompanyName()
- * @generated
- * @ordered
- */
- protected String companyName = COMPANY_NAME_DEFAULT_;
-
- /**
- * This is true if the Company Name attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean companyName_set_ = false;
-
- /**
- * The default value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected static final BigDecimal PRICE_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected BigDecimal price = PRICE_DEFAULT_;
-
- /**
- * This is true if the Price attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean price_set_ = false;
-
- /**
- * The default value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected static final BigDecimal OPEN1_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getOpen1() <em>Open1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOpen1()
- * @generated
- * @ordered
- */
- protected BigDecimal open1 = OPEN1_DEFAULT_;
-
- /**
- * This is true if the Open1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean open1_set_ = false;
-
- /**
- * The default value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected static final BigDecimal HIGH_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getHigh() <em>High</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getHigh()
- * @generated
- * @ordered
- */
- protected BigDecimal high = HIGH_DEFAULT_;
-
- /**
- * This is true if the High attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean high_set_ = false;
-
- /**
- * The default value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected static final BigDecimal LOW_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getLow() <em>Low</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLow()
- * @generated
- * @ordered
- */
- protected BigDecimal low = LOW_DEFAULT_;
-
- /**
- * This is true if the Low attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean low_set_ = false;
-
- /**
- * The default value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected static final double VOLUME_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getVolume() <em>Volume</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVolume()
- * @generated
- * @ordered
- */
- protected double volume = VOLUME_DEFAULT_;
-
- /**
- * This is true if the Volume attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean volume_set_ = false;
-
- /**
- * The default value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected static final double CHANGE1_DEFAULT_ = 0.0;
-
- /**
- * The cached value of the '{@link #getChange1() <em>Change1</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getChange1()
- * @generated
- * @ordered
- */
- protected double change1 = CHANGE1_DEFAULT_;
-
- /**
- * This is true if the Change1 attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean change1_set_ = false;
-
- /**
- * The cached value of the '{@link #getQuotes() <em>Quotes</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQuotes()
- * @generated
- * @ordered
- */
-
- protected List quotes = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public QuoteImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((SimpleFactoryImpl)SimpleFactory.INSTANCE).getQuote();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getSymbol()
- {
- return symbol;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSymbol(String newSymbol)
- {
- String oldSymbol = symbol;
- symbol = newSymbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetSymbol()
- {
- String oldSymbol = symbol;
- boolean oldSymbol_set_ = symbol_set_;
- symbol = SYMBOL_DEFAULT_;
- symbol_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSymbol()
- {
- return symbol_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getCompanyName()
- {
- return companyName;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setCompanyName(String newCompanyName)
- {
- String oldCompanyName = companyName;
- companyName = newCompanyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetCompanyName()
- {
- String oldCompanyName = companyName;
- boolean oldCompanyName_set_ = companyName_set_;
- companyName = COMPANY_NAME_DEFAULT_;
- companyName_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetCompanyName()
- {
- return companyName_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getPrice()
- {
- return price;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPrice(BigDecimal newPrice)
- {
- BigDecimal oldPrice = price;
- price = newPrice;
- boolean oldPrice_set_ = price_set_;
- price_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetPrice()
- {
- BigDecimal oldPrice = price;
- boolean oldPrice_set_ = price_set_;
- price = PRICE_DEFAULT_;
- price_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetPrice()
- {
- return price_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getOpen1()
- {
- return open1;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOpen1(BigDecimal newOpen1)
- {
- BigDecimal oldOpen1 = open1;
- open1 = newOpen1;
- boolean oldOpen1_set_ = open1_set_;
- open1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetOpen1()
- {
- BigDecimal oldOpen1 = open1;
- boolean oldOpen1_set_ = open1_set_;
- open1 = OPEN1_DEFAULT_;
- open1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetOpen1()
- {
- return open1_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getHigh()
- {
- return high;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setHigh(BigDecimal newHigh)
- {
- BigDecimal oldHigh = high;
- high = newHigh;
- boolean oldHigh_set_ = high_set_;
- high_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetHigh()
- {
- BigDecimal oldHigh = high;
- boolean oldHigh_set_ = high_set_;
- high = HIGH_DEFAULT_;
- high_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetHigh()
- {
- return high_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BigDecimal getLow()
- {
- return low;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLow(BigDecimal newLow)
- {
- BigDecimal oldLow = low;
- low = newLow;
- boolean oldLow_set_ = low_set_;
- low_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetLow()
- {
- BigDecimal oldLow = low;
- boolean oldLow_set_ = low_set_;
- low = LOW_DEFAULT_;
- low_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetLow()
- {
- return low_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public double getVolume()
- {
- return volume;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setVolume(double newVolume)
- {
- double oldVolume = volume;
- volume = newVolume;
- boolean oldVolume_set_ = volume_set_;
- volume_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetVolume()
- {
- double oldVolume = volume;
- boolean oldVolume_set_ = volume_set_;
- volume = VOLUME_DEFAULT_;
- volume_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetVolume()
- {
- return volume_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public double getChange1()
- {
- return change1;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setChange1(double newChange1)
- {
- double oldChange1 = change1;
- change1 = newChange1;
- boolean oldChange1_set_ = change1_set_;
- change1_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetChange1()
- {
- double oldChange1 = change1;
- boolean oldChange1_set_ = change1_set_;
- change1 = CHANGE1_DEFAULT_;
- change1_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetChange1()
- {
- return change1_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public List getQuotes()
- {
- if (quotes == null)
- {
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
- }
- return quotes;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- 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 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 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 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 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 quotes != null && !quotes.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(" (symbol: ");
- if (symbol_set_) result.append(symbol); else result.append("<unset>");
- result.append(", companyName: ");
- if (companyName_set_) result.append(companyName); else result.append("<unset>");
- result.append(", price: ");
- if (price_set_) result.append(price); else result.append("<unset>");
- result.append(", open1: ");
- if (open1_set_) result.append(open1); else result.append("<unset>");
- result.append(", high: ");
- if (high_set_) result.append(high); else result.append("<unset>");
- result.append(", low: ");
- if (low_set_) result.append(low); else result.append("<unset>");
- result.append(", volume: ");
- if (volume_set_) result.append(volume); else result.append("<unset>");
- result.append(", change1: ");
- if (change1_set_) result.append(change1); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //QuoteImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
deleted file mode 100644
index 9eedba57dd..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- *
- * 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.simple.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.simple.*;
-
-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 SimpleFactoryImpl extends FactoryBase implements SimpleFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/simple";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "simple";
-
- /**
- * 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 QUOTE = 1;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SimpleFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.simple");
- }
-
- /**
- * 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 QUOTE: return (DataObject)createQuote();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Quote createQuote()
- {
- QuoteImpl quote = new QuoteImpl();
- return quote;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type quoteType = null;
-
- public Type getQuote()
- {
- return quoteType;
- }
-
-
- private static SimpleFactoryImpl instance = null;
- public static SimpleFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new SimpleFactoryImpl();
-
- // 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
- //theSimpleFactoryImpl.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
- quoteType = createType(false, QUOTE);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_SYMBOL);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_COMPANY_NAME);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_PRICE);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_OPEN1);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_HIGH);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_LOW);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_VOLUME);
- createProperty(true, quoteType,QuoteImpl.INTERNAL_CHANGE1);
- createProperty(false, quoteType,QuoteImpl.INTERNAL_QUOTES);
- }
-
- private boolean isInitialized = false;
-
- 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(quoteType, Quote.class, "Quote", false);
- property = getLocalProperty(quoteType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 2);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 3);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 4);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 5);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 6);
- initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 7);
- initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
-
- property = getLocalProperty(quoteType, 8);
- initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("stockQuote",
- this.getQuote(),
- new String[]
- {
- "kind", "element",
- "name", "stockQuote",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (quoteType,
- new String[]
- {
- "name", "Quote",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_SYMBOL),
- new String[]
- {
- "kind", "element",
- "name", "symbol"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_COMPANY_NAME),
- new String[]
- {
- "kind", "element",
- "name", "companyName"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_PRICE),
- new String[]
- {
- "kind", "element",
- "name", "price"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_OPEN1),
- new String[]
- {
- "kind", "element",
- "name", "open1"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_HIGH),
- new String[]
- {
- "kind", "element",
- "name", "high"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_LOW),
- new String[]
- {
- "kind", "element",
- "name", "low"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_VOLUME),
- new String[]
- {
- "kind", "element",
- "name", "volume"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_CHANGE1),
- new String[]
- {
- "kind", "element",
- "name", "change1"
- });
-
- addXSDMapping
- (getProperty(quoteType, QuoteImpl.INTERNAL_QUOTES),
- new String[]
- {
- "kind", "element",
- "name", "quotes"
- });
-
- }
-
-} //SimpleFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/A.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/A.java
deleted file mode 100644
index 2e5f28e00e..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/A.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- *
- * 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.subgroup;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>A</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.subgroup.A#getGe1Group <em>Ge1 Group</em>}</li>
- * <li>{@link com.example.subgroup.A#getGe1 <em>Ge1</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface A extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Ge1 Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Ge1 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>Ge1 Group</em>' attribute list.
- * @generated
- */
- Sequence getGe1Group();
-
- /**
- * Returns the value of the '<em><b>Ge1</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Ge1</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Ge1</em>' containment reference.
- * @see #isSetGe1()
- * @see #unsetGe1()
- * @see #setGe1(B)
- * @generated
- */
- B getGe1();
-
- /**
- * Sets the value of the '{@link com.example.subgroup.A#getGe1 <em>Ge1</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Ge1</em>' containment reference.
- * @see #isSetGe1()
- * @see #unsetGe1()
- * @see #getGe1()
- * @generated
- */
- void setGe1(B value);
-
- /**
- * Unsets the value of the '{@link com.example.subgroup.A#getGe1 <em>Ge1</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetGe1()
- * @see #getGe1()
- * @see #setGe1(B)
- * @generated
- */
- void unsetGe1();
-
- /**
- * Returns whether the value of the '{@link com.example.subgroup.A#getGe1 <em>Ge1</em>}' containment reference is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Ge1</em>' containment reference is set.
- * @see #unsetGe1()
- * @see #getGe1()
- * @see #setGe1(B)
- * @generated
- */
- boolean isSetGe1();
-
-} // A
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/B.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/B.java
deleted file mode 100644
index e306049ecb..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/B.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- *
- * 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.subgroup;
-
-import java.io.Serializable;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>B</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.subgroup.B#getImInTypeB <em>Im In Type B</em>}</li>
- * </ul>
- * </p>
- *
- * @extends Serializable
- * @generated
- */
-public interface B extends Serializable
-{
- /**
- * Returns the value of the '<em><b>Im In Type B</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Im In Type B</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Im In Type B</em>' attribute.
- * @see #isSetImInTypeB()
- * @see #unsetImInTypeB()
- * @see #setImInTypeB(String)
- * @generated
- */
- String getImInTypeB();
-
- /**
- * Sets the value of the '{@link com.example.subgroup.B#getImInTypeB <em>Im In Type B</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Im In Type B</em>' attribute.
- * @see #isSetImInTypeB()
- * @see #unsetImInTypeB()
- * @see #getImInTypeB()
- * @generated
- */
- void setImInTypeB(String value);
-
- /**
- * Unsets the value of the '{@link com.example.subgroup.B#getImInTypeB <em>Im In Type B</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetImInTypeB()
- * @see #getImInTypeB()
- * @see #setImInTypeB(String)
- * @generated
- */
- void unsetImInTypeB();
-
- /**
- * Returns whether the value of the '{@link com.example.subgroup.B#getImInTypeB <em>Im In Type B</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Im In Type B</em>' attribute is set.
- * @see #unsetImInTypeB()
- * @see #getImInTypeB()
- * @see #setImInTypeB(String)
- * @generated
- */
- boolean isSetImInTypeB();
-
-} // B
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/Bprime.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/Bprime.java
deleted file mode 100644
index ef7bac01c8..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/Bprime.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- *
- * 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.subgroup;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Bprime</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link com.example.subgroup.Bprime#getImInTypeBprime <em>Im In Type Bprime</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public interface Bprime extends B
-{
- /**
- * Returns the value of the '<em><b>Im In Type Bprime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Im In Type Bprime</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Im In Type Bprime</em>' attribute.
- * @see #isSetImInTypeBprime()
- * @see #unsetImInTypeBprime()
- * @see #setImInTypeBprime(String)
- * @generated
- */
- String getImInTypeBprime();
-
- /**
- * Sets the value of the '{@link com.example.subgroup.Bprime#getImInTypeBprime <em>Im In Type Bprime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Im In Type Bprime</em>' attribute.
- * @see #isSetImInTypeBprime()
- * @see #unsetImInTypeBprime()
- * @see #getImInTypeBprime()
- * @generated
- */
- void setImInTypeBprime(String value);
-
- /**
- * Unsets the value of the '{@link com.example.subgroup.Bprime#getImInTypeBprime <em>Im In Type Bprime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetImInTypeBprime()
- * @see #getImInTypeBprime()
- * @see #setImInTypeBprime(String)
- * @generated
- */
- void unsetImInTypeBprime();
-
- /**
- * Returns whether the value of the '{@link com.example.subgroup.Bprime#getImInTypeBprime <em>Im In Type Bprime</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Im In Type Bprime</em>' attribute is set.
- * @see #unsetImInTypeBprime()
- * @see #getImInTypeBprime()
- * @see #setImInTypeBprime(String)
- * @generated
- */
- boolean isSetImInTypeBprime();
-
-} // Bprime
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/SubgroupFactory.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/SubgroupFactory.java
deleted file mode 100644
index cee8ec1a78..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/SubgroupFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- *
- * 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.subgroup;
-
-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 SubgroupFactory
-{
-
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SubgroupFactory INSTANCE = com.example.subgroup.impl.SubgroupFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>A</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>A</em>'.
- * @generated
- */
- A createA();
-
- /**
- * Returns a new object of class '<em>B</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>B</em>'.
- * @generated
- */
- B createB();
-
- /**
- * Returns a new object of class '<em>Bprime</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Bprime</em>'.
- * @generated
- */
- Bprime createBprime();
-
- /**
- * 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);
-
-} //SubgroupFactory
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/AImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/AImpl.java
deleted file mode 100644
index 604708f0fd..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/AImpl.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/**
- *
- * 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.subgroup.impl;
-
-import com.example.subgroup.A;
-import com.example.subgroup.B;
-import com.example.subgroup.SubgroupFactory;
-
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>A</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.subgroup.impl.AImpl#getGe1Group <em>Ge1 Group</em>}</li>
- * <li>{@link com.example.subgroup.impl.AImpl#getGe1 <em>Ge1</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class AImpl extends DataObjectBase implements A
-{
-
- public final static int GE1_GROUP = -1;
-
- public final static int GE1 = 0;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = -1;
-
-
- /**
- * The internal feature id for the '<em><b>Ge1 Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_GE1_GROUP = 0;
-
- /**
- * The internal feature id for the '<em><b>Ge1</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_GE1 = 1;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 2;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_GE1_GROUP: return GE1_GROUP;
- case INTERNAL_GE1: return GE1;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The cached value of the '{@link #getGe1Group() <em>Ge1 Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGe1Group()
- * @generated
- * @ordered
- */
-
- protected Sequence ge1Group = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getA();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Sequence getGe1Group()
- {
- if (ge1Group == null)
- {
- ge1Group = createSequence(INTERNAL_GE1_GROUP);
- }
- return ge1Group;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public B getGe1()
- {
- return (B)get(getGe1Group(), getType(), INTERNAL_GE1);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicSetGe1(B newGe1, ChangeContext changeContext)
- {
- return basicAdd(getGe1Group(), getType(), INTERNAL_GE1, newGe1, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setGe1(B newGe1)
- {
- set(getGe1Group(), getType(), INTERNAL_GE1, newGe1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicUnsetGe1(ChangeContext changeContext)
- {
- // TODO: implement this method to unset the contained 'Ge1' containment reference
- // -> this method is automatically invoked to keep the containment relationship in synch
- // -> do not modify other features
- // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetGe1()
- {
- unset(getGe1Group(), getType(), INTERNAL_GE1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetGe1()
- {
- return isSet(getGe1Group(), getType(), INTERNAL_GE1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case GE1_GROUP:
- return removeFromSequence(getGe1Group(), otherEnd, changeContext);
- case GE1:
- return basicUnsetGe1(changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case GE1_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 getGe1Group();
- case GE1:
- return getGe1();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case GE1_GROUP:
- setSequence(getGe1Group(), newValue);
- return;
- case GE1:
- setGe1((B)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case GE1_GROUP:
- unsetSequence(getGe1Group());
- return;
- case GE1:
- unsetGe1();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case GE1_GROUP:
- return ge1Group != null && !isSequenceEmpty(getGe1Group());
- case GE1:
- return isSetGe1();
- }
- 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(" (ge1Group: ");
- result.append(ge1Group);
- result.append(')');
- return result.toString();
- }
-
-} //AImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java
deleted file mode 100644
index ccbbfb27a0..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BImpl.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- *
- * 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.subgroup.impl;
-
-import com.example.subgroup.B;
-import com.example.subgroup.SubgroupFactory;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>B</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.subgroup.impl.BImpl#getImInTypeB <em>Im In Type B</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class BImpl extends DataObjectBase implements B
-{
-
- public final static int IM_IN_TYPE_B = 0;
-
- public final static int SDO_PROPERTY_COUNT = 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = 0;
-
-
- /**
- * The internal feature id for the '<em><b>Im In Type B</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_IM_IN_TYPE_B = 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_IM_IN_TYPE_B: return IM_IN_TYPE_B;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getImInTypeB() <em>Im In Type B</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImInTypeB()
- * @generated
- * @ordered
- */
- protected static final String IM_IN_TYPE_B_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getImInTypeB() <em>Im In Type B</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImInTypeB()
- * @generated
- * @ordered
- */
- protected String imInTypeB = IM_IN_TYPE_B_DEFAULT_;
-
- /**
- * This is true if the Im In Type B attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean imInTypeB_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getB();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getImInTypeB()
- {
- return imInTypeB;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setImInTypeB(String newImInTypeB)
- {
- String oldImInTypeB = imInTypeB;
- imInTypeB = newImInTypeB;
- boolean oldImInTypeB_set_ = imInTypeB_set_;
- imInTypeB_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_IM_IN_TYPE_B, oldImInTypeB, imInTypeB, !oldImInTypeB_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetImInTypeB()
- {
- String oldImInTypeB = imInTypeB;
- boolean oldImInTypeB_set_ = imInTypeB_set_;
- imInTypeB = IM_IN_TYPE_B_DEFAULT_;
- imInTypeB_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_IM_IN_TYPE_B, oldImInTypeB, IM_IN_TYPE_B_DEFAULT_, oldImInTypeB_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetImInTypeB()
- {
- return imInTypeB_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_B:
- return getImInTypeB();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_B:
- setImInTypeB((String)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_B:
- unsetImInTypeB();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_B:
- return isSetImInTypeB();
- }
- 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(" (imInTypeB: ");
- if (imInTypeB_set_) result.append(imInTypeB); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //BImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java
deleted file mode 100644
index 04bf5758e7..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/BprimeImpl.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/**
- *
- * 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.subgroup.impl;
-
-import com.example.subgroup.Bprime;
-import com.example.subgroup.SubgroupFactory;
-
-import commonj.sdo.Type;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Bprime</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link com.example.subgroup.impl.BprimeImpl#getImInTypeBprime <em>Im In Type Bprime</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class BprimeImpl extends BImpl implements Bprime
-{
-
- public final static int IM_IN_TYPE_BPRIME = BImpl.SDO_PROPERTY_COUNT + 0;
-
- public final static int SDO_PROPERTY_COUNT = BImpl.SDO_PROPERTY_COUNT + 1;
-
- public final static int EXTENDED_PROPERTY_COUNT = BImpl.EXTENDED_PROPERTY_COUNT - 0;
-
-
- /**
- * The internal feature id for the '<em><b>Im In Type B</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_IM_IN_TYPE_B = BImpl.INTERNAL_IM_IN_TYPE_B;
-
- /**
- * The internal feature id for the '<em><b>Im In Type Bprime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_IM_IN_TYPE_BPRIME = BImpl.INTERNAL_PROPERTY_COUNT + 0;
-
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = BImpl.INTERNAL_PROPERTY_COUNT + 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_IM_IN_TYPE_B: return IM_IN_TYPE_B;
- case INTERNAL_IM_IN_TYPE_BPRIME: return IM_IN_TYPE_BPRIME;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The default value of the '{@link #getImInTypeBprime() <em>Im In Type Bprime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImInTypeBprime()
- * @generated
- * @ordered
- */
- protected static final String IM_IN_TYPE_BPRIME_DEFAULT_ = null;
-
- /**
- * The cached value of the '{@link #getImInTypeBprime() <em>Im In Type Bprime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImInTypeBprime()
- * @generated
- * @ordered
- */
- protected String imInTypeBprime = IM_IN_TYPE_BPRIME_DEFAULT_;
-
- /**
- * This is true if the Im In Type Bprime attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean imInTypeBprime_set_ = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BprimeImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Type getStaticType()
- {
- return ((SubgroupFactoryImpl)SubgroupFactory.INSTANCE).getBprime();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getImInTypeBprime()
- {
- return imInTypeBprime;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setImInTypeBprime(String newImInTypeBprime)
- {
- String oldImInTypeBprime = imInTypeBprime;
- imInTypeBprime = newImInTypeBprime;
- boolean oldImInTypeBprime_set_ = imInTypeBprime_set_;
- imInTypeBprime_set_ = true;
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_IM_IN_TYPE_BPRIME, oldImInTypeBprime, imInTypeBprime, !oldImInTypeBprime_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetImInTypeBprime()
- {
- String oldImInTypeBprime = imInTypeBprime;
- boolean oldImInTypeBprime_set_ = imInTypeBprime_set_;
- imInTypeBprime = IM_IN_TYPE_BPRIME_DEFAULT_;
- imInTypeBprime_set_ = false;
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_IM_IN_TYPE_BPRIME, oldImInTypeBprime, IM_IN_TYPE_BPRIME_DEFAULT_, oldImInTypeBprime_set_);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetImInTypeBprime()
- {
- return imInTypeBprime_set_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_BPRIME:
- return getImInTypeBprime();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_BPRIME:
- setImInTypeBprime((String)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_BPRIME:
- unsetImInTypeBprime();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case IM_IN_TYPE_BPRIME:
- return isSetImInTypeBprime();
- }
- 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(" (imInTypeBprime: ");
- if (imInTypeBprime_set_) result.append(imInTypeBprime); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //BprimeImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java b/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java
deleted file mode 100644
index 49d0e6e905..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/com/example/subgroup/impl/SubgroupFactoryImpl.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/**
- *
- * 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.subgroup.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.subgroup.*;
-
-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 Subgroup
- * <!-- end-user-doc -->
- * @generated
- */
-public class SubgroupFactoryImpl extends FactoryBase implements SubgroupFactory
-{
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_URI = "http://example.com/subgroup";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "sg";
-
- /**
- * 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 A = 1;
- public static final int B = 2;
- public static final int BPRIME = 3;
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SubgroupFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.subgroup");
- }
-
- /**
- * 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 A: return (DataObject)createA();
- case B: return (DataObject)createB();
- case BPRIME: return (DataObject)createBprime();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public A createA()
- {
- AImpl a = new AImpl();
- return a;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public B createB()
- {
- BImpl b = new BImpl();
- return b;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Bprime createBprime()
- {
- BprimeImpl bprime = new BprimeImpl();
- return bprime;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type aType = null;
-
- public Type getA()
- {
- return aType;
- }
-
- protected Type bType = null;
-
- public Type getB()
- {
- return bType;
- }
-
- protected Type bprimeType = null;
-
- public Type getBprime()
- {
- return bprimeType;
- }
-
-
- private static SubgroupFactoryImpl instance = null;
- public static SubgroupFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new SubgroupFactoryImpl();
-
- // 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
- //theSubgroupFactoryImpl.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
- aType = createType(false, A);
- createProperty(true, aType,AImpl.INTERNAL_GE1_GROUP);
- createProperty(false, aType,AImpl.INTERNAL_GE1);
- bType = createType(false, B);
- createProperty(true, bType,BImpl.INTERNAL_IM_IN_TYPE_B);
- bprimeType = createType(false, BPRIME);
- createProperty(true, bprimeType,BprimeImpl.INTERNAL_IM_IN_TYPE_BPRIME);
- }
-
- 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
- addSuperType(bprimeType, this.getB());
-
- // Initialize types and properties
- initializeType(aType, A.class, "A", false);
- property = getLocalProperty(aType, 0);
- initializeProperty(property, getSequence(), "ge1Group", null, 1, 1, A.class, false, false, false);
-
- property = getLocalProperty(aType, 1);
- initializeProperty(property, this.getB(), "ge1", null, 1, 1, A.class, false, true, true, true , null);
-
- initializeType(bType, B.class, "B", false);
- property = getLocalProperty(bType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "imInTypeB", null, 1, 1, B.class, false, true, false);
-
- initializeType(bprimeType, Bprime.class, "Bprime", false);
- property = getLocalProperty(bprimeType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "imInTypeBprime", null, 1, 1, Bprime.class, false, true, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (aType,
- new String[]
- {
- "name", "A",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(aType, AImpl.INTERNAL_GE1_GROUP),
- new String[]
- {
- "kind", "group",
- "name", "ge1:group",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (getProperty(aType, AImpl.INTERNAL_GE1),
- new String[]
- {
- "kind", "element",
- "name", "ge1",
- "namespace", "##targetNamespace",
- "group", "ge1:group"
- });
-
- addXSDMapping
- (bType,
- new String[]
- {
- "name", "B",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(bType, BImpl.INTERNAL_IM_IN_TYPE_B),
- new String[]
- {
- "kind", "element",
- "name", "imInTypeB",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (bprimeType,
- new String[]
- {
- "name", "Bprime",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(bprimeType, BprimeImpl.INTERNAL_IM_IN_TYPE_BPRIME),
- new String[]
- {
- "kind", "element",
- "name", "imInTypeBprime",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("a",
- this.getA(),
- new String[]
- {
- "kind", "element",
- "name", "a",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("ge1",
- this.getB(),
- new String[]
- {
- "kind", "element",
- "name", "ge1",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("se1",
- this.getBprime(),
- new String[]
- {
- "kind", "element",
- "name", "se1",
- "namespace", "##targetNamespace",
- "affiliation", "ge1"
- });
-
- }
-
-} //SubgroupFactoryImpl
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
deleted file mode 100644
index f54313e9bf..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- *
- * 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(ChangeSummaryGenTestCase.class);
- suite.addTestSuite(ExtensibleTestCase.class);
- suite.addTestSuite(GenPatternsTestCase.class);
- suite.addTestSuite(InheritanceTestCase.class);
- suite.addTestSuite(OpenContentTestCase.class);
- suite.addTestSuite(SimpleStaticTestCase.class);
- 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/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
deleted file mode 100644
index f58d607cba..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- *
- * 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.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.List;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import junit.framework.TestCase;
-
-import com.example.customer.Account;
-import com.example.customer.Customer;
-import com.example.customer.CustomerFactory;
-import com.example.simple.cs.CSFactory;
-import com.example.simple.cs.Quote;
-import com.example.simple.cs.QuoteBase;
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.impl.HelperProvider;
-
-
-public class ChangeSummaryGenTestCase extends TestCase {
-
- public void testMixedQuoteType() throws IOException {
- QuoteBase quote = CSFactory.INSTANCE.createQuoteBase();
- DataObject dQuote = (DataObject)quote;
-
- // ChangeSummary csp = quote.getChanges();
- ChangeSummary cs = dQuote.getChangeSummary();
- ChangeSummary csp = quote.getChanges();
- cs.beginLogging();
-
- assertSame(cs, csp);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- List quotes = quote.getQuotes();
- Quote innerQuote = CSFactory.INSTANCE.createQuote();
-
- quotes.add(innerQuote);
- innerQuote.setPrice(new BigDecimal("2000.0"));
-
- cs.endLogging();
-
- //XMLHelper.INSTANCE.save(dQuote, "http://www.example.com/simpleCS", "quoteBase", System.out);
-
- cs.undoChanges();
-
- //System.out.println("\nAfter Undo Changes:");
- //XMLHelper.INSTANCE.save(dQuote, "http://www.example.com/simpleCS", "quoteBase", System.out);
- }
-
- public void testChangeSummaryOnDatagraphWithContainmentStatic() throws Exception {
-
- HelperContext hc = HelperProvider.getDefaultContext();
- CustomerFactory.INSTANCE.register(hc);
-
- Type customerType = hc.getTypeHelper().getType(Customer.class);
- DataGraph dataGraph = SDOUtil.createDataGraph();
- Customer customer = (Customer) dataGraph.createRootObject(customerType);
-
- Account account = CustomerFactory.INSTANCE.createAccount();
- customer.setAccount(account);
- customer.setFirstName("John");
- customer.getAccount().setAccountNum(1234);
-
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dataGraph, outputStream, null);
- DataGraph loadDataGraph = SDOUtil.loadDataGraph(new ByteArrayInputStream(outputStream.toByteArray()), null);
-
- loadDataGraph.getChangeSummary().beginLogging();
-
- customer = (Customer) loadDataGraph.getRootObject();
- customer.getAccount().setAccountNum(987);
-
- loadDataGraph.getChangeSummary().endLogging();
-
- List changedDataObjects = loadDataGraph.getChangeSummary().getChangedDataObjects();
- assertEquals("in fact 1 Object was changed in the code", 1, changedDataObjects.size());
- }
-
- public void testChangeSummaryOnDataGraphWithInt() throws Exception {
-
- HelperContext hc = HelperProvider.getDefaultContext();
- CustomerFactory factory = CustomerFactory.INSTANCE;
- factory.register(hc);
- Customer customer = factory.createCustomer();
- Account account = factory.createAccount();
- customer.setAccount(account);
- DataObject customerDO = (DataObject) customer;
- DataGraph dg = SDOUtil.createDataGraph();
- SDOUtil.setRootObject(dg, customerDO);
- dg.getChangeSummary().beginLogging();
- dg.getRootObject().getDataObject(0).delete();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dg, baos, null);
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java
deleted file mode 100644
index 6d81ebaf77..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/CreateTestClasses.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * 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 org.apache.tuscany.sdo.generate.JavaGenerator;
-import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
-
-/**
- * A utility class to regenerate the classes for the test cases
- */
-public class CreateTestClasses {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
-
- CreateTestClasses ctc = new CreateTestClasses();
- ctc.run();
-
-
- }
-
- private void run() {
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/CustomerAccount.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/extensible/customer.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/open.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simpleWithChangeSummary.xsd").getFile(), "http://www.example.com/simpleCS", "src/test/java/", "com.example.simple.cs", "CS", 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simple.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/simple.xsd").getFile(), null, "src/test/java/", "com.example.noInterfaces.simple", null, JavaGenerator.OPTION_NO_INTERFACES);
-
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/repeatingChoice.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/sequences.xsd").getFile(), null, "src/test/java/", null, null, 0);
- XSD2JavaGenerator.generateFromXMLSchema(getClass().getResource("/subgroup.xsd").getFile(), null, "src/test/java/", null, null, 0);
-
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java
deleted file mode 100644
index be65951ba5..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- *
- * 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.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.extensible.customer.CustomerFactory;
-import com.example.extensible.customer.CustomersType;
-import com.example.extensible.customer.InfoType;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-public class ExtensibleTestCase extends TestCase {
-
- private final String[] MODELS = new String[] {
- "/extensible/nonamespace.xsd",
- "/extensible/infostreet.xsd",
- "/extensible/infozipcode.xsd"
- };
-
- private final String CUSTOMERS_XML = "/extensible/customers.xml";
- private final String INFOSTREET_XML = "/extensible/infostreet.xml";
- private final String INFOZIPCODE_XML = "/extensible/infozipcode.xml";
-
- private HelperContext scope;
-
- public void testCustomersLoad() throws IOException {
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream(CUSTOMERS_XML));
- assertEquals("customers", doc.getRootElementName());
- assertTrue("RootObject of " + CUSTOMERS_XML + " should be instanceof CustomersType",
- doc.getRootObject() instanceof CustomersType);
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- assertTrue(strdoc.indexOf("<street>341 Duckworth Way</street>") != -1);
- }
-
- public void testInfoLoad() throws IOException {
- String[] infoXmls = new String[] {INFOSTREET_XML, INFOZIPCODE_XML};
- for (int i = 0; i < infoXmls.length; i++) {
- String infoXml = infoXmls[i];
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream(infoXml));
- assertEquals("info", doc.getRootElementName());
- assertTrue("RootObject of " + infoXml + " should be instanceof InfoType",
- doc.getRootObject() instanceof InfoType);
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- String elementName = (i == 0) ? "street" : "zipcode";
- String valuePrefix = "21043";
- assertTrue(strdoc.indexOf("<" + elementName + ">") != -1);
- assertTrue(strdoc.indexOf("</" + elementName + ">") != -1);
- assertTrue(strdoc.indexOf(">" + valuePrefix) != -1);
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- CustomerFactory.INSTANCE.register(scope);
-
- // Populate the meta data for the models
- for (int i = 0; i < MODELS.length; i++) {
- String model = MODELS[i];
- URL url = getClass().getResource(model);
- InputStream inputStream = url.openStream();
- scope.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- }
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java
deleted file mode 100644
index 19fbc7b10e..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- *
- * 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.math.BigDecimal;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.simple.SimpleFactory;
-import commonj.sdo.helper.HelperContext;
-
-
-public class GenPatternsTestCase extends TestCase
-{
- /**
- * Simple Default Generation Pattern Static SDO 2.1 test.
- */
- public void testSimpleDefaultGeneratedClasses()
- {
- try
- {
- HelperContext scope = SDOUtil.createHelperContext();
- com.example.simple.SimpleFactory.INSTANCE.register(scope);
-
- com.example.simple.Quote quote =
- (com.example.simple.Quote)scope.getDataFactory().create(com.example.simple.Quote.class);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- com.example.simple.Quote child =
- (com.example.simple.Quote)scope.getDataFactory().create(com.example.simple.Quote.class);
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- //XMLHelper.INSTANCE.save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Simple Default Generation Pattern Static SDO 2.1 test.
- */
- public void testSimpleNoInterfaceGeneratedClasses()
- {
- try
- {
- HelperContext scope = SDOUtil.createHelperContext();
- com.example.noInterfaces.simple.SimpleFactory.INSTANCE.register(scope);
-
- com.example.noInterfaces.simple.Quote quote =
- (com.example.noInterfaces.simple.Quote)scope.getDataFactory().create(com.example.noInterfaces.simple.Quote.class);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- com.example.noInterfaces.simple.Quote child =
- (com.example.noInterfaces.simple.Quote)scope.getDataFactory().create(com.example.noInterfaces.simple.Quote.class);
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- //XMLHelper.INSTANCE.save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void testFailureOnNullScope() {
- try {
- SimpleFactory.INSTANCE.register(null);
- assertTrue("Should not be able to register in null scope", false);
- }
- catch (Exception e) {
- // caught expected exception
- }
- }
-
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java
deleted file mode 100644
index 3e6267623c..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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 validatedDocRoot = false;
- boolean validatedMixedQuote = false;
- boolean validatedSymbol = false;
- for (Iterator iterClass = packageInfo.getClasses().iterator(); iterClass.hasNext();)
- {
- XSD2JavaGenerator.GeneratedPackage.PackageClassInfo classInfo = (XSD2JavaGenerator.GeneratedPackage.PackageClassInfo)iterClass.next();
- name = classInfo.getName();
-
- if( "MixedQuote".equals(name))
- {
- assertTrue("com.example.sequences.MixedQuote".equals(classInfo.getClassName()));
- validatedMixedQuote = true;
- }
- if( "".equals(name))
- {
- assertTrue("com.example.sequences.DocumentRoot".equals(classInfo.getClassName()));
- validatedDocRoot = true;
- }
- if( "symbol".equals(name))
- {
- assertTrue("java.lang.String".equals(classInfo.getClassName()));
- validatedSymbol = true;
- }
- }
- assertTrue(validatedMixedQuote);
- assertTrue(validatedDocRoot);
- assertTrue(validatedSymbol);
- }
- }
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
deleted file mode 100644
index a971f79f0f..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- *
- * 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.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.subgroup.A;
-import com.example.subgroup.B;
-import com.example.subgroup.Bprime;
-import com.example.subgroup.SubgroupFactory;
-import com.example.subgroup.impl.AImpl;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-public class InheritanceTestCase extends TestCase {
-
- private HelperContext scope;
-
- public void testSubGroupLoad() throws IOException {
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream("/subgroup1.xml"));
- assertEquals("a", doc.getRootElementName());
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- assertTrue(strdoc.indexOf("<sg:imInTypeB>thisIsElB</sg:imInTypeB>") != -1);
- }
-
- public void testSubGroup_AcontainsB() {
- A a = (A) scope.getDataFactory().create(A.class);
- B b = (B) scope.getDataFactory().create(B.class);
- b.setImInTypeB("thisIsElB");
- a.setGe1(b);
-
- assertSame(b, a.getGe1());
- assertSame(b, ((AImpl) a).get(AImpl.GE1));
-
- String doc = scope.getXMLHelper().save((DataObject) a,
- "http://example.com/subgroup", "a");
- assertTrue(doc.indexOf("<sg:imInTypeB>thisIsElB</sg:imInTypeB>") != -1);
-
- }
-
- public void testSubGroup_AcontainsBprime() {
- A a = (A) scope.getDataFactory().create(A.class);
- Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
- bp.setImInTypeBprime("thisIsElBprime");
- a.setGe1(bp);
-
- assertSame(bp, a.getGe1());
- assertSame(bp, ((AImpl) a).get(AImpl.GE1));
-
- String doc = scope.getXMLHelper().save((DataObject) a,
- "http://example.com/subgroup", "a");
-
- assertTrue(doc.indexOf("<sg:imInTypeBprime>thisIsElBprime</sg:imInTypeBprime>") != -1);
-
- }
-
- public void testSubGroup_Bprime() {
- Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
- bp.setImInTypeB("bValue");
- bp.setImInTypeBprime("bpvalue");
- String doc = scope.getXMLHelper().save((DataObject) bp,
- "http://example.com/subgroup", "bp");
- assertTrue(doc.indexOf("<sg:imInTypeB>bValue</sg:imInTypeB>") != -1);
- assertTrue(doc.indexOf("<sg:imInTypeBprime>bpvalue</sg:imInTypeBprime>") != -1);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- SubgroupFactory.INSTANCE.register(scope);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java
deleted file mode 100644
index f2b1bb08b8..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- *
- * 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.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.open.OneElementAndAnyAttr;
-import com.example.open.OpenFactory;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.helper.HelperContext;
-
-
-public class OpenContentTestCase extends TestCase
-{
-
- HelperContext scope;
-
- public void testAnyAttribute() throws IOException
- {
-
- OpenFactory.INSTANCE.register(scope);
- DataObject dob = scope.getDataFactory().create(OneElementAndAnyAttr.class);
- OneElementAndAnyAttr staticDob = (OneElementAndAnyAttr)dob;
-
- staticDob.setName("fred");
-
- assertEquals(1, dob.getInstanceProperties().size());
- Sequence s = ((OneElementAndAnyAttr)dob).getAnyAttribute();
-
- assertFalse(dob.getType().isSequenced());
- assertTrue(dob.getType().isOpen());
- assertNull(dob.getSequence());
-
- Property prop = scope.getTypeHelper().getOpenContentProperty("http://www.example.com/open", "globAttribute");
- s.add(prop, "foo");
- assertEquals(2, dob.getInstanceProperties().size());
- assertTrue(dob.getInstanceProperties().contains(prop));
-
- // scope.getXMLHelper().save((DataObject)dob, "http://www.example.com/open", "bar", System.out);
- }
-
- protected void setUp() throws Exception {
- scope = SDOUtil.createHelperContext();
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java
deleted file mode 100644
index 207ccd4484..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- *
- * 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.math.BigDecimal;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.simple.Quote;
-import com.example.simple.SimpleFactory;
-import com.example.simple.impl.SimpleFactoryImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-
-
-public class SimpleStaticTestCase extends TestCase
-{
-
- HelperContext scope;
- /**
- * Simple Static SDO 2 test.
- */
- public void testSimpleStatic()
- {
- try
- {
- SimpleFactory.INSTANCE.register(scope);
- // System.out.println(SimpleFactoryImpl.PATTERN_VERSION);
-
- //Quote quote = (Quote)DataFactory.INSTANCE.create(Quote.class);
- Quote quote = SimpleFactory.INSTANCE.createQuote();
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- //Quote child = (Quote)((DataObject)quote).createDataObject(8);
- Quote child = SimpleFactory.INSTANCE.createQuote();
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- // scope.getXMLHelper().save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- protected void setUp() throws Exception {
- scope = SDOUtil.createHelperContext();
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java b/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
deleted file mode 100644
index 0ca49b6122..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- *
- * 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.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-public class TestUtil
-{
- private static void getAllNodes(NodeList nodeList, List nodes)
- {
- int length = nodeList.getLength();
- if (length == 0)
- {
- return;
- }
-
- for (int i=0; i<length; i++)
- {
- Node node = nodeList.item(i);
- nodes.add(node);
- getAllNodes(node.getChildNodes(), nodes);
- } // for
- }
-
- private static boolean equalNamedNodeMap(NamedNodeMap mapA, NamedNodeMap mapB) {
- if (mapA == null) {
- if (mapB == null) {
- return true;
- }
- return false;
- }
- if (mapA.getLength() != mapB.getLength()) {
- return false;
- }
- for (int i = 0; i < mapA.getLength(); i++) {
- Node trialNode = mapA.item(i);
- if (trialNode == null) {
- return false;
- }
- Node checkNode = mapB.getNamedItem(trialNode.getNodeName());
- if (checkNode == null) {
- return false;
- }
- if (!equalNode(trialNode, checkNode)) {
- return false;
- }
- }
- return true;
- }
-
- private static boolean equalNode(Node nodeA, Node nodeB) {
- if (nodeA == null) {
- if (nodeB == null) {
- return true;
- }
- return false;
- }
- // following is intended to provide same function as 1.5 isEqualNode()
- if (nodeA.getNodeType() != nodeB.getNodeType()) {
- return false;
- }
- if (!equalString(nodeA.getNodeName(), nodeB.getNodeName())) {
- return false;
- }
- if (!equalString(nodeA.getLocalName(), nodeB.getLocalName())) {
- return false;
- }
- if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
- return false;
- }
- if (!equalString(nodeA.getNamespaceURI(), nodeB.getNamespaceURI())) {
- return false;
- }
- if (!equalString(nodeA.getPrefix(), nodeB.getPrefix())) {
- return false;
- }
- if (!equalString(nodeA.getNodeValue(), nodeB.getNodeValue())) {
- return false;
- }
- if (!equalNamedNodeMap(nodeA.getAttributes(), nodeB.getAttributes())) {
- return false;
- }
- if (!equalNodeList(nodeA.getChildNodes(), nodeB.getChildNodes())) {
- return false;
- }
- if (nodeA.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
- DocumentType documentTypeA = (DocumentType) nodeA;
- DocumentType documentTypeB = (DocumentType) nodeB;
- if (!equalString(documentTypeA.getPublicId(), documentTypeB.getPublicId())) {
- return false;
- }
- if (!equalString(documentTypeA.getSystemId(), documentTypeB.getSystemId())) {
- return false;
- }
- if (!equalString(documentTypeA.getInternalSubset(), documentTypeB.getInternalSubset())) {
- return false;
- }
- if (!equalNamedNodeMap(documentTypeA.getEntities(), documentTypeB.getEntities())) {
- return false;
- }
- if (!equalNamedNodeMap(documentTypeA.getNotations(), documentTypeB.getNotations())) {
- return false;
- }
- }
- return true;
- }
-
- private static boolean equalNodeList(NodeList nodeListA, NodeList nodeListB) {
- if (nodeListA == null) {
- if (nodeListB == null) {
- return true;
- }
- return false;
- }
- return equalNodes(nodeListA, nodeListB);
- }
-
- private static boolean equalString(String stringA, String stringB) {
- if (stringA == null) {
- if (stringB == null) {
- return true;
- }
- return false;
- }
- return stringA.equals(stringB);
- }
-
- private static boolean equalNodes(NodeList sourceNodeList, NodeList targetNodeList)
- {
- ArrayList sourceNodes = new ArrayList();
- ArrayList targetNodes = new ArrayList();
-
- getAllNodes(sourceNodeList, sourceNodes);
- getAllNodes(targetNodeList, targetNodes);
-
- int sourceLength = sourceNodes.size();
- int targetLength = targetNodes.size();
-
- if (sourceLength != targetLength)
- {
- return false;
- }
-
- for (int i=0; i<sourceLength; i++)
- {
- Node sourceNode = (Node)sourceNodes.get(i);
- Node targetNode = (Node)targetNodes.get(i);
-
- /* remove comment when migrated to Java 1.5
- if (!sourceNode.isEqualNode(targetNode))
- {
- return false;
- }
- */
- // following is intended as 1.4 equivalent of isEqualNode()
- if (!equalNode(sourceNode, targetNode))
- {
- return false;
- }
- } // for
-
- return true;
- }
-
- public static boolean equalXmlFiles(URL source, URL target)
- {
- try {
- return equalXmlFiles(source.openStream(), target.openStream());
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(InputStream sourceStream, URL target)
- {
- try {
- return equalXmlFiles(sourceStream, target.openStream());
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(URL source, InputStream targetStream)
- {
- try {
- return equalXmlFiles(source.openStream(), targetStream);
- }
- catch (IOException e)
- {
- return false;
- }
- }
-
- public static boolean equalXmlFiles(InputStream sourceStream, InputStream targetStream)
- {
- DocumentBuilder builder;
- Document sourceDocument;
- Document targetDocument;
-
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setIgnoringComments(true);
- builder = factory.newDocumentBuilder();
- //builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- sourceDocument = builder.parse(sourceStream);
- targetDocument = builder.parse(targetStream);
- }
- catch (FactoryConfigurationError fce) {
- return false;
- }
- catch (ParserConfigurationException ce) {
- return false;
- }
- catch (SAXException se)
- {
- return false;
- }
- catch (IOException ie)
- {
- return false;
- }
-
- sourceDocument.normalize();
- targetDocument.normalize();
-
- /* remove comment when migrated to Java 1.5
- if (!sourceDocument.getXmlVersion().equals(targetDocument.getXmlVersion()))
- {
- return false;
- }
-
- String sourceXmlEncoding = sourceDocument.getXmlEncoding();
- String targetXmlEncoding = targetDocument.getXmlEncoding();
-
- if (sourceXmlEncoding != null && targetXmlEncoding != null &&
- sourceXmlEncoding.equalsIgnoreCase(targetXmlEncoding))
- {
- // continue
- }
- else
- {
- return false;
- }
- */
-
- NodeList sourceNodes = sourceDocument.getChildNodes();
- NodeList targetNodes = targetDocument.getChildNodes();
-
- return equalNodes(sourceNodes, targetNodes);
- }
-}
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/CustomerAccount.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/CustomerAccount.xsd
deleted file mode 100644
index cbde98662f..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/CustomerAccount.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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.
- -->
-<xs:schema xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java" xmlns:stn_1="http://example.com/customer" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://example.com/customer">
-
- <xs:complexType abstract="false" name="Account">
- <xs:sequence/>
- <xs:attribute default="0" name="accountNum" type="xs:int"/>
- </xs:complexType>
-
- <xs:element name="account" type="stn_1:Account"/>
-
- <xs:complexType abstract="false" name="Customer">
- <xs:sequence>
- <xs:element name="account" type="stn_1:Account"/>
- </xs:sequence>
- <xs:attribute name="firstName" type="xs:string"/>
- </xs:complexType>
-
- <xs:element name="customer" type="stn_1:Customer"/>
-
-</xs:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/Open.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/Open.xsd
deleted file mode 100644
index 0f158e591a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/Open.xsd
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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:open="http://www.example.com/open" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/open">
-
-
- <xsd:attribute name="globAttribute" type="xsd:string"/>
-
- <xsd:complexType name="OneElementAndAnyAttr">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- <xsd:anyAttribute processContents="lax"/>
- </xsd:complexType>
-
-
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/TUSCANY1050.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/TUSCANY1050.xsd
deleted file mode 100644
index a218eb574c..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/TUSCANY1050.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/enum.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/enum.xsd
deleted file mode 100644
index 6c906539a9..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/enum.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customer.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customer.xsd
deleted file mode 100644
index 3736ff172a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customer.xsd
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://www.example.com/extensible/customer">
-
- <xsd:complexType name="CustomersType">
- <xsd:sequence>
- <xsd:element name="customer" type="CustomerType" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CustomerType">
- <xsd:all>
- <xsd:element name="name" type="CustNameType" />
- <xsd:element name="number" type="xsd:integer" />
- <xsd:element form="unqualified" name="info" type="InfoType" />
- </xsd:all>
- </xsd:complexType>
-
- <xsd:simpleType name="CustNameType">
- <xsd:restriction base="xsd:string" />
- </xsd:simpleType>
-
- <xsd:complexType name="InfoType" />
-
- <xsd:element name="customers" type="CustomersType" />
- <xsd:element name="customer" type="CustomerType" />
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customers.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customers.xml
deleted file mode 100644
index fd61ad468f..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/customers.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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.
- -->
- <customers xmlns="http://www.example.com/extensible/customer"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/extensible/customer customer.xsd">
- <customer>
- <name>Pat Walmsley</name>
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:ns1="http://www.example.com/extensible/info/zipcode">
- <zipcode>21043</zipcode>
- </info>
- <number>15465</number>
- </customer>
- <customer>
- <name>Priscilla Walmsley</name>
- <number>15466</number>
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:ns1="http://www.example.com/extensible/info/street">
- <street>341 Duckworth Way</street>
- </info>
- </customer>
-</customers>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xml
deleted file mode 100644
index 4ee4c4df85..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
- -->
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://www.example.com/extensible/info/street">
- <street>21043 Jones Way</street>
-</info>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xsd
deleted file mode 100644
index 4ba71d3829..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infostreet.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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="http://www.example.com/extensible/info/street"
- xmlns:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified"
- targetNamespace="http://www.example.com/extensible/info/street">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:complexType name="InfoType">
- <xsd:complexContent>
- <xsd:extension base="customer:InfoType">
- <xsd:sequence>
- <xsd:element name="street" type="xsd:string" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xml
deleted file mode 100644
index 33d7023334..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
- -->
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://www.example.com/extensible/info/zipcode">
- <zipcode>21043</zipcode>
-</info>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xsd
deleted file mode 100644
index 7a7dda0e41..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/infozipcode.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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="http://www.example.com/extensible/info/zipcode"
- xmlns:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified"
- targetNamespace="http://www.example.com/extensible/info/zipcode">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:complexType name="InfoType">
- <xsd:complexContent>
- <xsd:extension base="customer:InfoType">
- <xsd:sequence>
- <xsd:element name="zipcode" type="xsd:string" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/nonamespace.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/nonamespace.xsd
deleted file mode 100644
index 088676049b..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/extensible/nonamespace.xsd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:element name="info" type="customer:InfoType"></xsd:element>
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
deleted file mode 100644
index 0aa17bb50a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/mixedStaticTestResult.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/mixedStaticTestResult.xml
deleted file mode 100644
index 9136f0780d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/mixedStaticTestResult.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoice.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoice.xsd
deleted file mode 100644
index 1d566da671..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoice.xsd
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml
deleted file mode 100644
index 2719457b6d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/sdoModel.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/sdoModel.xsd
deleted file mode 100644
index 645b7b700a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/sdoModel.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/sequences.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/sequences.xsd
deleted file mode 100644
index b74a56eab7..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/sequences.xsd
+++ /dev/null
@@ -1,100 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/simple.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/simple.xsd
deleted file mode 100644
index f058e5b63a..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/simple.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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:complexType name="Quote">
- <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 name="quotes" type="simple:Quote" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/simpleWithChangeSummary.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/simpleWithChangeSummary.xsd
deleted file mode 100644
index 35d504425d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/simpleWithChangeSummary.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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.
- -->
-<xsd:schema xmlns:sdo="commonj.sdo" xmlns:simpleCS="http://www.example.com/simpleCS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.example.com/simpleCS">
-
-
- <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>
-
- <xsd:complexType name="QuoteBase">
- <xsd:complexContent>
- <xsd:extension base="simpleCS:Quote">
- <xsd:sequence>
- <xsd:element name="changes" type="sdo:ChangeSummaryType"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
-
- </xsd:complexType>
-
- <xsd:element name="stockQuote" type="simpleCS:QuoteBase"/>
-
- <xsd:complexType name="Quote">
- <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="simpleCS:Quote"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup.xsd b/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup.xsd
deleted file mode 100644
index 798085b88d..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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.
- -->
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sg="http://example.com/subgroup" elementFormDefault="qualified" targetNamespace="http://example.com/subgroup">
-
- <element name="a" type="sg:A"/>
-
- <complexType name="A">
- <sequence>
- <element maxOccurs="1" minOccurs="1" ref="sg:ge1"/>
- </sequence>
- </complexType>
-
- <element name="ge1" type="sg:B"/>
- <element name="se1" substitutionGroup="sg:ge1" type="sg:Bprime"/>
-
- <complexType name="B">
- <sequence>
- <element maxOccurs="1" name="imInTypeB" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name="Bprime">
- <complexContent>
- <extension base="sg:B">
- <sequence>
- <element name="imInTypeBprime" type="string"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-</schema>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup1.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup1.xml
deleted file mode 100644
index 15eed43c10..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/subgroup1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- * 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.
- -->
-<subgroup:a xmlns:subgroup="http://example.com/subgroup">
- <subgroup:ge1>
- <subgroup:imInTypeB>thisIsElB</subgroup:imInTypeB>
- </subgroup:ge1>
-</subgroup:a>
diff --git a/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
deleted file mode 100644
index a62cd66b58..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml b/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
deleted file mode 100644
index 3585ad00d3..0000000000
--- a/branches/sdo-1.0-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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>
diff --git a/branches/sdo-1.0-incubating/tools/templates/Header.javajetinc b/branches/sdo-1.0-incubating/tools/templates/Header.javajetinc
deleted file mode 100644
index 27becf3645..0000000000
--- a/branches/sdo-1.0-incubating/tools/templates/Header.javajetinc
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * <%="$"%>Id<%="$"%>
- */
diff --git a/branches/sdo-1.0-incubating/tools/templates/models/SDOClass.javajet b/branches/sdo-1.0-incubating/tools/templates/models/SDOClass.javajet
deleted file mode 100644
index b2727d925d..0000000000
--- a/branches/sdo-1.0-incubating/tools/templates/models/SDOClass.javajet
+++ /dev/null
@@ -1,1948 +0,0 @@
-<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" imports="org.eclipse.emf.codegen.util.* org.apache.tuscany.sdo.impl.* java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.apache.tuscany.sdo.generate.util.*" class="SDOClass" version="$Id: Class.javajet,v 1.41 2006/02/15 19:58:39 emerks Exp $" %>
-<%
-/**
- *
- * 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%>
-<% */%>
-<%@ include file="../Header.javajetinc"%>
-<%if (isInterface) {%>
-package <%=genPackage.getInterfacePackageName()%>;
-<%} else {%>
-package <%=genPackage.getClassPackageName()%>;
-<%}%>
-
-<%genModel.markImportLocation(stringBuffer, genPackage);%>
-
-<%if (isDebug) { // EYECATCHER 1 %>
- // EYECATCHER 1
-<%}%>
-<%if (isInterface) {%>
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
- * <!-- end-user-doc -->
-<%if (genClass.hasDocumentation()) {%>
- *
- * <!-- begin-model-doc -->
- * <%=genClass.getDocumentation(genModel.getIndentation(stringBuffer))%>
- * <!-- end-model-doc -->
-<%}%>
- *
-<%if (!genClass.getGenFeatures().isEmpty()) {%>
- * <p>
- * The following features are supported:
- * <ul>
-<%for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genFeature.isSuppressedGetVisibility()) {%>
- * <li>{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
- <%}%>
-<%}%>
- * </ul>
- * </p>
-<%}%>
- *
-<%if (!genModel.isSuppressEMFMetaData()) {%>
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genClass.getClassifierAccessorName()%>()
-<%}%>
-<%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;%>
- * @model <%=modelInfo%>
-<%} else {%>
- * <%=modelInfo%>
-<%}} if (first) {%>
- * @model
-<%}}%>
-<%if (genClass.needsRootExtendsInterfaceExtendsTag()) { // does it need an @extends tag %>
- * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%>
-<%}%>
- * @generated
- */
-<%} else {%>
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
- * <!-- end-user-doc -->
- * <p>
-<%if (!genClass.getImplementedGenFeatures().isEmpty()) {%>
- * The following features are implemented:
- * <ul>
-<%for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- * <li>{@link <%=genClass.getQualifiedClassName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
-<%}%>
- * </ul>
-<%}%>
- * </p>
- *
- * @generated
- */
-<%}%>
-<%if (isImplementation) {%>
-public<%if (genClass.isAbstract()) {%> abstract<%}%> class <%=genClass.getClassName()%><%=genClass.getClassExtends()%><%=genClass.getClassImplements()%>
-<%} else {%>
-public interface <%=genClass.getInterfaceName()%><%=genClass.getInterfaceExtends()%>
-<%}%>
-{
-<%if (genModel.getCopyrightText() != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genModel.getDriverNumber() != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> mofDriverNumber = "<%=genModel.getDriverNumber()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genClass.isJavaIOSerializable()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final long serialVersionUID = 1L;
-
-<%}%>
-<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
- <%if (eVirtualValuesField != null) {%>
- /**
- * An array of objects representing the values of non-primitive features.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Object[] <%=eVirtualValuesField%> = null;
-
- <%}%>
- <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%>
- <%if (!eVirtualIndexBitFields.isEmpty()) {%>
- <%for (Iterator i = eVirtualIndexBitFields.iterator(); i.hasNext();) { String eVirtualIndexBitField = (String)i.next();%>
- /**
- * A bit field representing the indices of non-primitive feature values.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected int <%=eVirtualIndexBitField%> = 0;
-
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-<%if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) {%>
- /**
- * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected int <%=genModel.getBooleanFlagsField()%> = 0;
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation()) {%>
-
- <%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()));
- }
- }%>
- public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;
-
- <%} 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()));
- }
- }%>
- public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;
-
- <%}%>
- <%}%>
- <%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);%>
- <%}%>
- public final static int SDO_PROPERTY_COUNT = <%=featureCount%>;
-
- <%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);%>
- <%}%>
- public final static int EXTENDED_PROPERTY_COUNT = <%=featureCount%>;
-
-
- <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
- /**
- * The internal feature id for the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%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);%>
- <%}%>
- <%}%>
- public final static int INTERNAL_<%=genFeature.getUpperName()%> = <%=featureValue%>;
-
- <%}%>
- /**
- * The number of properties for this type.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- <%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());
- }%>
- public final static int INTERNAL_PROPERTY_COUNT = <%=featureCount%>;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
- case INTERNAL_<%=genFeature.getUpperName()%>: return <%=genFeature.getUpperName()%>;
- <%}%>
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- <%for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
-<%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (genFeature.isListType() || genFeature.isReferenceType()) {%>
- <%if (genClass.isField(genFeature)) {%>
- /**
- * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
-
- protected <%=genModel.getImportedName(genFeature.getType())%> <%=genFeature.getSafeName()%> = null;
-
- <%}%>
- <%if (genModel.isArrayAccessors() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
- /**
- * The empty value for the '{@link #<%=genFeature.getGetArrayAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' array accessor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetArrayAccessor()%>()
- * @generated
- * @ordered
- */
- protected static final <%=genFeature.getListItemType()%>[] <%=genFeature.getUpperName()%>_EEMPTY_ARRAY = new <%=genFeature.getListItemType()%> [0];
-
- <%}%>
- <%} else {%>
- <%if (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable())) {%>
- /**
- * The default value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- protected static final <%=genFeature.getImportedType()%> <%=genFeature.getUpperName()%>_DEFAULT_ = <%=genFeature.getStaticDefaultValue()%>;<%=genModel.getNonNLS(genFeature.getStaticDefaultValue())%>
-
- <%}%>
- <%if (genClass.isField(genFeature)) {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) {%>
- /**
- * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected int <%=genClass.getFlagsField(genFeature)%> = 0;
-
- <%}%>
- /**
- * The flag representing the value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_EFLAG = 1 <%="<< " + genClass.getFlagIndex(genFeature) % 32 %>;
-
- <%} else {%>
- /**
- * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- protected <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_;
-
- <%}%>
- <%}%>
- <%}%>
- <%if (genClass.isESetField(genFeature)) {%>
- <%if (genClass.isESetFlag(genFeature)) {%>
- <%if (genClass.getESetFlagIndex(genFeature) > 31 && genClass.getESetFlagIndex(genFeature) % 32 == 0) {%>
- /**
- * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected int <%=genClass.getESetFlagsField(genFeature)%> = 0;
-
- <%}%>
- /**
- * The flag representing whether the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected static final int <%=genFeature.getUpperName()%>_ESETFLAG = 1 <%="<< " + genClass.getESetFlagIndex(genFeature) % 32 %>;
-
- <%} else {%>
- /**
- * This is true if the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean <%=genFeature.getUncapName()%>_set_ = false;
-
- <%}%>
- <%}%>
- <%}%>
-<%@ include file="Class/declaredFieldGenFeature.insert.javajetinc" fail="silent" %>
-<%@ end %><%//Class/declaredFieldGenFeature.override.javajetinc%>
-<%}%>
-<%if (isImplementation) { // create constructor %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genClass.getClassName()%>()
- {
- super();
- <%for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG;
- <%}%>
- <%if (SDOGenUtil.hasChangeSummaryProperty(genClass)) {%>
- createChangeSummary(<%=SDOGenUtil.getChangeSummaryProperty(genClass)%>);
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName("commonj.sdo.Type")%> getStaticType()
- {
- return ((<%=genPackage.getImportedFactoryClassName()%>)<%=genPackage.getImportedFactoryInterfaceName()%>.INSTANCE).get<%=genClass.getClassifierAccessorName()%>();
- }
-
-<%}%>
-<%/*%>
-<% * Output getter and setter interfaces / impls%>
-<% */%>
-<%%>
-<%for (Iterator i=(isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures()).iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
-<%@ include file="Class/genFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- <%if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- <%=genFeature.getListItemType()%>[] <%=genFeature.getGetArrayAccessor()%>();
-
- <%} else {%>
- public <%=genFeature.getListItemType()%>[] <%=genFeature.getGetArrayAccessor()%>()
- {
- <%if (genFeature.isVolatile()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getGetAccessor()%>();
- if (list.isEmpty()) return <%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
- <%} else {%>
- if (<%=genFeature.getSafeName()%> == null || <%=genFeature.getSafeName()%>.isEmpty()) return <%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
- <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getSafeName()%>;
- <%}%>
- list.shrink();
- return (<%=genFeature.getListItemType()%>[])list.data();
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- <%=genFeature.getListItemType()%> get<%=genFeature.getAccessorName()%>(int index);
- <%} else {%>
- public <%=genFeature.getListItemType()%> get<%=genFeature.getAccessorName()%>(int index)
- {
- return (<%=genFeature.getListItemType()%>)<%=genFeature.getGetAccessor()%>().get(index);
- }
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- int get<%=genFeature.getAccessorName()%>Length();
-
- <%} else {%>
- public int get<%=genFeature.getAccessorName()%>Length()
- {
- <%if (genFeature.isVolatile()) {%>
- return <%=genFeature.getGetAccessor()%>().size();
- <%} else {%>
- return <%=genFeature.getSafeName()%> == null ? 0 : <%=genFeature.getSafeName()%>.size();
- <%}%>
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType()%>[] new<%=genFeature.getCapName()%>);
-
- <%} else {%>
- public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType()%>[] new<%=genFeature.getCapName()%>)
- {
- ((<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getGetAccessor()%>()).setData(new<%=genFeature.getCapName()%>.length, new<%=genFeature.getCapName()%>);
- }
-
- <%}%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%if (!isImplementation) {%>
- void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType()%> element);
-
- <%} else {%>
- public void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType()%> element)
- {
- <%=genFeature.getGetAccessor()%>().set(index, element);
- }
-
- <%}%>
- <%}%>
- <%if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) {%>
-<%@ include file="Class/getGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
- /**
- * Returns the value of the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); %>
- * The key is of type <%if (keyFeature.isListType()) {%>list of {@link <%=keyFeature.getQualifiedListItemType()%>}<%} else {%>{@link <%=keyFeature.getType()%>}<%}%>,
- * and the value is of type <%if (valueFeature.isListType()) {%>list of {@link <%=valueFeature.getQualifiedListItemType()%>}<%} else {%>{@link <%=valueFeature.getType()%>}<%}%>,
- <%} else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType()))) {%>
- * The list contents are of type {@link <%=genFeature.getQualifiedListItemType()%>}.
- <%}%>
- <%} else if (genFeature.isSetDefaultValue()) {%>
- * The default value is <code><%=genFeature.getDefaultValue()%></code>.
- <%}%>
- <%if (genFeature.getTypeGenEnum() != null) {%>
- * The literals are from the enumeration {@link <%=genFeature.getTypeGenEnum().getQualifiedName()%>}.
- <%}%>
- <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
- <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
- * It is bidirectional and its opposite is '{@link <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> <em><%=reverseGenFeature.getFormattedName()%></em>}'.
- <%}%>
- <%}%>
- * <!-- begin-user-doc -->
- <%if (!genFeature.hasDocumentation()) {%>
- * <p>
- * If the meaning of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> isn't clear,
- * there really should be more of a description here...
- * </p>
- <%}%>
- * <!-- end-user-doc -->
- <%if (genFeature.hasDocumentation()) {%>
- * <!-- begin-model-doc -->
- * <%=genFeature.getDocumentation(genModel.getIndentation(stringBuffer))%>
- * <!-- end-model-doc -->
- <%}%>
- * @return the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.getTypeGenEnum() != null) {%>
- * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- <%}%>
- <%if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
- <%}%>
- <%if (!genModel.isSuppressEMFMetaData()) {%>
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genFeature.getFeatureAccessorName()%>()
- <%}%>
- <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
- <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
- * @see <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=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;%>
- * @model <%=modelInfo%>
- <%} else {%>
- * <%=modelInfo%>
- <%}} if (first) {%>
- * @model
- <%}}%>
- * @generated
- */
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (!isImplementation) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>();
-
-<%} else {%>
- public <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>()
- {
-<%@ include file="Class/getGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isReflectiveDelegation()) {%>
- return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> == null)
- {
- <%if (genModel.isVirtualDelegation()) {%>
- eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>);
- <%} else {
- if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
- <%=genFeature.getSafeName()%> = createSequence(INTERNAL_<%=genFeature.getUpperName()%>);<%} else {%>
- <%=genFeature.getSafeName()%> = createPropertyList(<%=SDOGenUtil.getListKind(genFeature, genFeature.isUnsettable())%>, <%=genFeature.getListItemType()%>.class, <%=genFeature.getUpperName()%>, <%=genFeature.isBidirectional()?genFeature.getReverse().getUpperName():"0" %>);<%}}%>
- }
- return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>;
- <%} else if (genFeature.isContainer()) {%>
- if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null;
- return (<%=genFeature.getImportedType()%>)eContainer();
- <%} else {%>
- <%if (genFeature.isResolveProxies()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null && isProxy(<%=genFeature.getSafeName()%>))
- {
- Object old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%=genFeature.getSafeName()%> = <%=genFeature.getNonEObjectInternalTypeCast()%>resolveProxy(old<%=genFeature.getCapName()%>);
- if (<%=genFeature.getSafeName()%> != old<%=genFeature.getCapName()%>)
- {
- <%if (genFeature.isEffectiveContains()) {%>
- <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> new<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>;
- <%if (!genFeature.isBidirectional()) {%>
- ChangeContext changeContext = old<%=genFeature.getCapName()%>.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, null);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- <%=genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext")%> changeContext = old<%=genFeature.getCapName()%>.eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, null);
- <%}%>
- if (new<%=genFeature.getCapName()%>.eInternalContainer() == null)
- {
- <%if (!genFeature.isBidirectional()) {%>
- changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- <%}%>
- }
- if (changeContext != null) dispatch(changeContext);
- <%} else if (genModel.isVirtualDelegation()) {%>
- eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>);
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.RESOLVE, INTERNAL_<%=genFeature.getUpperName()%>, old<%=genFeature.getCapName()%>, <%=genFeature.getSafeName()%>);
- <%}%>
- }
- }
- <%}%>
- <%if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>);
- <%} else if (genClass.isFlag(genFeature)) {%>
- return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%} else {%>
- return <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%} else {//volatile%>
- <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>();
- return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeName()%>.isProxy() ? <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>;
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // AAAA%>
- <%if (genFeature.isFeatureMapType()) {%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);
- <%} else {%>
- return (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else if (genFeature.isListType()) {%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return get<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);
- <%} else {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else {%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%} else {%>
- return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
- <%}%>
- <%}%>
- <%} else {%>
-<%@ include file="Class/getGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/getGenFeature.todo.override.javajetinc%>
- <%}%>
- <%}%>
- }
-<%}%>
-<%@ end %><%//Class/getGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {%>
-<%@ include file="Class/basicGetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genFeature.getImportedType()%> basicGet<%=genFeature.getAccessorName()%>()
- {
-<%@ include file="Class/basicGetGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genFeature.isContainer()) {%>
- if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null;
- return (<%=genFeature.getImportedType()%>)eInternalContainer();
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%} else {%>
- return <%=genFeature.getSafeName()%>;
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //BBBB%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);
- <%} else {%>
- return (<%=genFeature.getImportedType()%>)get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false);
- <%}%>
- <%} else {%>
-<%@ include file="Class/basicGetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> do not perform proxy resolution
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicGetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class/basicGetGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {%>
-<%@ include file="Class/basicSetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedInternalType()%> new<%=genFeature.getCapName()%>, ChangeContext changeContext)
- {
- <%if (!genFeature.isVolatile()) {%>
-<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %>
- <%if (genModel.isVirtualDelegation()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>);
- <%} else {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%>;
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%=genFeature.getUncapName()%>_set_ = true;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- {
- <%if (genFeature.isUnsettable()) {%>
- addNotification(this, ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>, changeContext);
- <%} else {%>
- addNotification(this, ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, changeContext);
- <%}%>
- }
- <%}%>
-<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
- return changeContext;
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //CCCC%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
- <%} else {%>
- return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
- <%}%>
- <%} else {%>
-<%@ include file="Class/basicSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to set the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> this method is automatically invoked to keep the containment relationship in synch
- // -> do not modify other features
- // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicSetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class/basicSetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {%>
-<%@ include file="Class/setGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) { %>
- /**
- * Sets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
- <%if (genFeature.isEnumType()) {%>
- * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- <%if (!genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- */
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (!isImplementation) { %>
- void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> value);
-
-<%} else {%>
- public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> new<%=genFeature.getCapName()%>)
- {
-<%@ include file="Class/setGenFeature.pre.insert.javajetinc" fail="alternative" %>
- <%if (genModel.isReflectiveDelegation()) {%>
- _set_(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()) {%>)<%}%>);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- if (new<%=genFeature.getCapName()%> != eInternalContainer() || (eContainerFeatureID != <%=genFeature.getUpperName()%> && new<%=genFeature.getCapName()%> != null))
- {
- if (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.isAncestor(this, <%=genFeature.getEObjectCast()%>new<%=genFeature.getCapName()%>))
- throw new <%=genModel.getImportedName("java.lang.IllegalArgumentException")%>("Recursive containment not allowed for " + toString());<%=genModel.getNonNLS()%>
- ChangeContext changeContext = null;
- if (eInternalContainer() != null)
- changeContext = eBasicRemoveFromContainer(changeContext);
- if (new<%=genFeature.getCapName()%> != null)
- changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- changeContext = eBasicSetContainer((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genFeature.getUpperName()%>, changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- <%if (!genModel.isSuppressNotification()) {%>
- else if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>);
- <%}%>
- <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%}%>
- if (new<%=genFeature.getCapName()%> != <%=genFeature.getSafeName()%>)
- {
- ChangeContext changeContext = null;
- if (<%=genFeature.getSafeName()%> != null)
- <%if (!genFeature.isBidirectional()) {%>
- changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, OPPOSITE_FEATURE_BASE - INTERNAL_<%=genFeature.getUpperName()%>, null, changeContext);
- if (new<%=genFeature.getCapName()%> != null)
- changeContext = inverseAdd(new<%=genFeature.getCapName()%>, this, OPPOSITE_FEATURE_BASE - INTERNAL_<%=genFeature.getUpperName()%>, null, changeContext);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, <%=SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- if (new<%=genFeature.getCapName()%> != null)
- changeContext = inverseAdd(new<%=genFeature.getCapName()%>, this, <%=SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- <%}%>
- changeContext = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- <%if (genFeature.isUnsettable()) {%>
- else
- {
- <%if (genModel.isVirtualDelegation()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%}%>
- <%=genFeature.getUncapName()%>_set_ = true;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>, !old<%=genFeature.getCapName()%>_set_);
- <%}%>
- }
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- else if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>);
- <%}%>
- <%}%>
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%}%>
- if (new<%=genFeature.getCapName()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
- <%} else {%>
- <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%if (genFeature.isEnumType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>;
- <%} else {%>
- <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>;
- <%}%>
- <%} else {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
- <%} else {%>
- <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
- <%}%>
- <%}%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>);
- <%}%>
- <%}%>
- <%if (genFeature.isUnsettable()) {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%}%>
- <%=genFeature.getUncapName()%>_set_ = true;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>);
- <%}%>
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.SET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>);
- <%}%>
- <%}%>
- <%}%>
-<%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // DDDD%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- set(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
- <%} else {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
- <%}%>
- <%} else {%>
-<%@ include file="Class/setGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to set the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/setGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/setGenFeature.override.javajetinc%>
- <%}%>
- <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {%>
-<%@ include file="Class/basicUnsetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext basicUnset<%=genFeature.getAccessorName()%>(ChangeContext changeContext)
- {
- <%if (!genFeature.isVolatile()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>);
- <%} else {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%=genFeature.getSafeName()%> = null;
- <%}%>
- <%if (genModel.isVirtualDelegation()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%=genFeature.getUncapName()%>_set_ = false;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- {
- <%if (genFeature.isUnsettable()) {%>
- addNotification(this, ChangeKind.UNSET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>, changeContext);
- <%} else {%>
- addNotification(this, ChangeKind.UNSET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, null, changeContext);
- <%}%>
- }
- <%}%>
- return changeContext;
- <%} else {%>
-<%@ include file="Class/basicUnsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to unset the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // -> this method is automatically invoked to keep the containment relationship in synch
- // -> do not modify other features
- // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/basicUnsetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%@ end %><%//Class.basicUnsetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {%>
-<%@ include file="Class/unsetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
- /**
- * Unsets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
- * @see #isSet<%=genFeature.getAccessorName()%>()
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- <%if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
- <%}%>
- * @generated
- */
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (!isImplementation) {%>
- void unset<%=genFeature.getAccessorName()%>();
-
-<%} else {%>
- public void unset<%=genFeature.getAccessorName()%>()
- {
- <%if (genModel.isReflectiveDelegation()) {%>
- unset(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)get<%=genFeature.getAccessorName()%>()).unset();
- <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null)
- {
- ChangeContext changeContext = null;
- <%if (!genFeature.isBidirectional()) {%>
- changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, EOPPOSITE_FEATURE_BASE - INTERNAL_<%=genFeature.getUpperName()%>, null, changeContext);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, <%=SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- <%}%>
- changeContext = basicUnset<%=genFeature.getAccessorName()%>(changeContext);
- if (changeContext != null) dispatch(changeContext);
- }
- else
- {
- <%if (genModel.isVirtualDelegation()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%}%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%}%>
- <%=genFeature.getUncapName()%>_set_ = false;
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_<%=genFeature.getUpperName()%>, null, null, old<%=genFeature.getCapName()%>_set_);
- <%}%>
- }
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
- <%}%>
- <%} else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>);
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
- <%}%>
- <%}%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%} else {%>
- <%if (!genModel.isSuppressNotification()) {%>
- boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
- <%}%>
- <%}%>
- <%if (genFeature.isReferenceType()) {%>
- <%=genFeature.getSafeName()%> = null;
- <%if (!genModel.isVirtualDelegation()) {%>
- <%if (genClass.isESetFlag(genFeature)) {%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%=genFeature.getUncapName()%>_set_ = false;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
- <%}%>
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- if (<%=genFeature.getUpperName()%>_DEFAULT_) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
- <%} else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_;
- <%}%>
- <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
- <%if (genClass.isESetFlag(genFeature)) {%>
- <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
- <%} else {%>
- <%=genFeature.getUncapName()%>_set_ = false;
- <%}%>
- <%}%>
- <%if (!genModel.isSuppressNotification()) {%>
- if (isNotifying())
- notify(ChangeKind.UNSET, INTERNAL_<%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? old<%=genFeature.getCapName()%> : <%=genFeature.getUpperName()%>_DEFAULT_<%} else {%>old<%=genFeature.getCapName()%><%}%>, <%=genFeature.getUpperName()%>_DEFAULT_, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
- <%}%>
- <%}%>
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //EEEE%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- unset(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);
- <%} else {%>
- unset<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>());
- <%}%>
- <%} else {%>
-<%@ include file="Class/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to unset the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/unsetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/unsetGenFeature.override.javajetinc%>
- <%}%>
- <%if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {%>
-<%@ include file="Class/isSetGenFeature.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
- /**
- * Returns whether the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%> is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> is set.
- <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
- * @see #unset<%=genFeature.getAccessorName()%>()
- <%}%>
- * @see #<%=genFeature.getGetAccessor()%>()
- <%if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {%>
- * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
- <%}%>
- * @generated
- */
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (!isImplementation) {%>
- boolean isSet<%=genFeature.getAccessorName()%>();
-
-<%} else {%>
- public boolean isSet<%=genFeature.getAccessorName()%>()
- {
- <%if (genModel.isReflectiveDelegation()) {%>
- return isSet(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%} else if (!genFeature.isVolatile()) {%>
- <%if (genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%}%>
- return <%=genFeature.getSafeName()%> != null && ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)<%=genFeature.getSafeName()%>).isSet();
- <%} else {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- return eVirtualIsSet(<%=genFeature.getUpperName()%>);
- <%} else if (genClass.isESetFlag(genFeature)) {%>
- return (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
- <%} else {%>
- return <%=genFeature.getUncapName()%>_set_;
- <%}%>
- <%}%>
- <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //FFFF%>
- <%if (delegateFeature.isWrappedFeatureMapType()) {%>
- return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), INTERNAL_<%=genFeature.getUpperName()%>);
- <%} else {%>
- return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>);
- <%}%>
- <%} else {%>
-<%@ include file="Class/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method to return whether the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/isSetGenFeature.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ end %><%//Class/isSetGenFeature.override.javajetinc%>
- <%}%>
-<%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %>
-<%@ end %><%//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();%>
-<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
-<%@ start %>
-<%if (isInterface) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- <%if (genOperation.hasDocumentation()) {%>
- * <!-- begin-model-doc -->
- * <%=genOperation.getDocumentation(genModel.getIndentation(stringBuffer))%>
- * <!-- end-model-doc -->
- <%}%>
- <%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;%>
- * @model <%=modelInfo%>
- <%} else {%>
- * <%=modelInfo%>
- <%}} if (first) {%>
- * @model
- <%}}%>
- * @generated
- */
-<%} else {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (!isImplementation) {%>
- <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>;
-
-<%} else {%>
- public <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>
- {
- <%if (genOperation.hasBody()) {%>
- <%=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();%>
- // TODO: implement this method
- // -> specify the condition that violates the invariant
- // -> verify the details of the diagnostic, including severity and message
- // Ensure that you remove @generated or mark it @generated NOT
- if (false)
- {
- if (<%=diagnostics%> != null)
- {
- <%=diagnostics%>.add
- (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
- (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
- <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
- <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- new Object [] { this }));
- }
- return false;
- }
- return true;
- <%} else {%>
-<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
-<%@ start %>
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
-<%@ end %><%//Class/implementedGenOperation.todo.override.javajetinc%>
- <%}%>
- }
-
-<%}%>
-<%@ include file="Class/genOperation.insert.javajetinc" fail="silent" %>
-<%@ end %><%//Class/implementedGenOperation.override.javajetinc%>
-<%}//for%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext eInverseAdd(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicAdd(otherEnd, changeContext);
- <%} else {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)<%=genFeature.getGetAccessor()%>()).basicAdd(otherEnd, changeContext);
- <%}%>
- <%} else if (genFeature.isContainer()) {%>
- if (eInternalContainer() != null)
- changeContext = eBasicRemoveFromContainer(changeContext);
- return eBasicSetContainer(otherEnd, <%=genFeature.getUpperName()%>, changeContext);
- <%} else {%>
- <%if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- <%}%>
- if (<%=genFeature.getSafeName()%> != null)
- <%if (genFeature.isEffectiveContains()) {%>
- changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
- <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
- changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- <%}%>
- return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)otherEnd, changeContext);
- <%}%>
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eInverseAdd(otherEnd, propertyIndex, changeContext);
-<%} else {%>
- return eDynamicInverseAdd(otherEnd, propertyIndex, changeContext);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext inverseRemove(<%=genModel.getImportedName("java.lang.Object")%> otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicRemove(otherEnd, changeContext);
- <%} else if (genFeature.isWrappedFeatureMapType()) {%>
- return removeFrom<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext);
- <%} else {%>
- return removeFromList(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext);
- <%}%>
- <%} else if (genFeature.isContainer()) {%>
- return eBasicSetContainer(null, <%=genFeature.getUpperName()%>, changeContext);
- <%} else if (genFeature.isUnsettable()) {%>
- return basicUnset<%=genFeature.getAccessorName()%>(changeContext);
- <%} else {%>
- return basicSet<%=genFeature.getAccessorName()%>(null, changeContext);
- <%}%>
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
-<%} else {%>
- return eDynamicInverseRemove(otherEnd, propertyIndex, changeContext);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext)
- {
- switch (eContainerFeatureID)
- {
-<%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)) {%>
- case <%=genFeature.getUpperName()%>:
- return eInternalContainer().eInverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.eBasicRemoveFromContainerFeature(changeContext);
-<%} else {%>
- return eDynamicBasicRemoveFromContainer(changeContext);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isPrimitiveType()) {%>
- <%if (genFeature.isBooleanType()) {%>
- return <%=genFeature.getGetAccessor()%>() ? Boolean.TRUE : Boolean.FALSE;
- <%} else {%>
- return new <%=genFeature.getObjectType()%>(<%=genFeature.getGetAccessor()%>());
- <%}%>
- <%} else if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
- if (resolve) return <%=genFeature.getGetAccessor()%>();
- return basicGet<%=genFeature.getAccessorName()%>();
- <%} else if (genFeature.isMapType()) {%>
- <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
- if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap();
- else return <%=genFeature.getGetAccessor()%>();
- <%} else {%>
- if (coreType) return <%=genFeature.getGetAccessor()%>();
- else return <%=genFeature.getGetAccessor()%>().map();
- <%}%>
- <%} else if (genFeature.isWrappedFeatureMapType()) {%>
- // 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 <%=genFeature.getGetAccessor()%>();
- <%} else if (genFeature.isFeatureMapType()) {%>
- if (coreType) return <%=genFeature.getGetAccessor()%>();
- return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).getWrapper();
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>();
- <%}%>
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.get(propertyIndex, resolve);
-<%} else {%>
- return eDynamicGet(propertyIndex, resolve, coreType);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isListType()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- set<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), newValue);
- <%} else if (genFeature.isFeatureMapType()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).set(newValue);
- <%} else if (genFeature.isMapType()) {%>
- <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).set(newValue);
- <%} else {%>
- ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)<%=genFeature.getGetAccessor()%>()).set(newValue);
- <%}%>
- <%} else {%>
- <%=genFeature.getGetAccessor()%>().clear();
- <%=genFeature.getGetAccessor()%>().addAll((<%=genModel.getImportedName("java.util.Collection")%>)newValue);
- <%}%>
- <%} else if (genFeature.isPrimitiveType()) {%>
- set<%=genFeature.getAccessorName()%>(((<%=genFeature.getObjectType()%>)newValue).<%=genFeature.getPrimitiveValueFunction()%>());
- <%} else {%>
- set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)newValue);
- <%}%>
- return;
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- super.set(propertyIndex, newValue);
-<%} else {%>
- eDynamicSet(propertyIndex, newValue);
-<%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- unset<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>());
- <%} else {%>
- <%=genFeature.getGetAccessor()%>().clear();
- <%}%>
- <%} else if (genFeature.isUnsettable()) {%>
- unset<%=genFeature.getAccessorName()%>();
- <%} else if (genFeature.isReferenceType()) {%>
- set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)null);
- <%} else {%>
- set<%=genFeature.getAccessorName()%>(<%=genFeature.getUpperName()%>_DEFAULT_);
- <%}%>
- return;
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- super.unset(propertyIndex);
-<%} else {%>
- eDynamicUnset(propertyIndex);
-<%}%>
- }
-
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%>
-<%@ include file="Class/eIsSet.override.javajetinc" fail="alternative" %>
-<%@ start %>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
-<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
- case <%=genFeature.getUpperName()%>:
- <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
- <%if (genFeature.isWrappedFeatureMapType()) {%>
- <%if (genFeature.isVolatile()) {%>
- return !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>());
- <%} else {%>
- return <%=genFeature.getSafeName()%> != null && !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>());
- <%}%>
- <%} else {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty();
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
- return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty();
- <%} else {%>
- return !<%=genFeature.getGetAccessor()%>().isEmpty();
- <%}%>
- <%}%>
- <%}%>
- <%} else if (genFeature.isUnsettable()) {%>
- return isSet<%=genFeature.getAccessorName()%>();
- <%} else if (genFeature.isResolveProxies()) {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=genFeature.getSafeName()%> != null;
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genFeature.getUpperName()%>) != null;
- <%} else {%>
- return basicGet<%=genFeature.getAccessorName()%>() != null;
- <%}%>
- <%}%>
- <%} else if (genFeature.isReferenceType()) {%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=genFeature.getSafeName()%> != null;
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genFeature.getUpperName()%>) != null;
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>() != null;
- <%}%>
- <%}%>
- <%} else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {%>
- <%if (genClass.isField(genFeature)) {%>
- <%if (genClass.isFlag(genFeature)) {%>
- return ((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0) != <%=genFeature.getUpperName()%>_DEFAULT_;
- <%} else {%>
- return <%=genFeature.getSafeName()%> != <%=genFeature.getUpperName()%>_DEFAULT_;
- <%}%>
- <%} else {%>
- <%if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- return eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_) != <%=genFeature.getUpperName()%>_DEFAULT_;
- <%} else {%>
- return <%=genFeature.getGetAccessor()%>() != <%=genFeature.getUpperName()%>_DEFAULT_;
- <%}%>
- <%}%>
- <%} else {//datatype%>
- <%if (genClass.isField(genFeature)) {%>
- return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>);
- <%} else {%>
- <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
- <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_);
- return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>);
- <%} else {%>
- return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getGetAccessor()%>() != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getGetAccessor()%>());
- <%}%>
- <%}%>
- <%}%>
- <%}%>
-<%}%>
- }
-<%if (genModel.isMinimalReflectiveMethods()) {%>
- return super.isSet(propertyIndex);
-<%} else {%>
- return eDynamicIsSet(propertyIndex);
-<%}%>
- }
-
-<%@ end %><%//Class/eIsSet.override.javajetinc%>
-<%}%>
-<%if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass)
- {
- <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %>
- if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class)
- {
- switch (derivedFeatureID)
- {
- <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %>
- case <%=genFeature.getUpperName()%>: return <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass)
- {
- <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %>
- if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class)
- {
- switch (baseFeatureID)
- {
- <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %>
- case <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>: return <%=genFeature.getUpperName()%>;
- <%}%>
- default: return -1;
- }
- }
- <%}%>
- return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
- }
-
-<%}%>
-<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
- <%if (eVirtualValuesField != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Object[] eVirtualValues()
- {
- return <%=eVirtualValuesField%>;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setVirtualValues(Object[] newValues)
- {
- <%=eVirtualValuesField%> = newValues;
- }
-
- <%}%>
- <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%>
- <%if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected int eVirtualIndexBits(int offset)
- {
- switch (offset)
- {
- <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
- case <%=i%> :
- return <%=allEVirtualIndexBitFields.get(i)%>;
- <%}%>
- default :
- throw new IndexOutOfBoundsException();
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setVirtualIndexBits(int offset, int newIndexBits)
- {
- switch (offset)
- {
- <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
- case <%=i%> :
- <%=allEVirtualIndexBitFields.get(i)%> = newIndexBits;
- break;
- <%}%>
- default :
- throw new IndexOutOfBoundsException();
- }
- }
-
- <%}%>
- <%}%>
-<%}%>
-<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString()
- {
- if (isProxy(this)) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- <%{ boolean first = true;%>
- <%for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();%>
- <%if (first) { first = false;%>
- result.append(" (<%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%>
- <%} else {%>
- result.append(", <%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%>
- <%}%>
- <%if (genFeature.isUnsettable() && !genFeature.isListType()) {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- if (eVirtualIsSet(<%=genFeature.getUpperName()%>)) result.append(eVirtualGet(<%=genFeature.getUpperName()%>)); else result.append("<unset>");<%=genModel.getNonNLS()%>
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0); else result.append("<unset>");<%=genModel.getNonNLS()%>
- <%} else {%>
- if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append(<%=genFeature.getSafeName()%>); else result.append("<unset>");<%=genModel.getNonNLS()%>
- <%}%>
- <%}%>
- <%} else {%>
- <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
- result.append(eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isListType() && !genFeature.isReferenceType()){%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>));
- <%} else {%>
- <%if (genClass.isFlag(genFeature)) {%>
- result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0);
- <%} else {%>
- result.append(<%=genFeature.getSafeName()%>);
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- result.append(')');
- return result.toString();
- }
-
-<%}%>
-<%if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected int hash = -1;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getHash()
- {
- if (hash == -1)
- {
- Object theKey = getKey();
- hash = (theKey == null ? 0 : theKey.hashCode());
- }
- return hash;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setHash(int hash)
- {
- this.hash = hash;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object getKey()
- {
- <%if (keyFeature.isPrimitiveType()) {%>
- return new <%=keyFeature.getObjectType()%>(getTypedKey());
- <%} else {%>
- return getTypedKey();
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setKey(Object key)
- {
- <%if (keyFeature.isListType()) {%>
- getTypedKey().addAll((<%=genModel.getImportedName("java.util.Collection")%>)key);
- <%} else if (keyFeature.isPrimitiveType()) {%>
- setTypedKey(((<%=keyFeature.getObjectType()%>)key).<%=keyFeature.getPrimitiveValueFunction()%>());
- <%} else {%>
- setTypedKey((<%=keyFeature.getImportedType()%>)key);
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object getValue()
- {
- <%if (valueFeature.isPrimitiveType()) {%>
- return new <%=valueFeature.getObjectType()%>(getTypedValue());
- <%} else {%>
- return getTypedValue();
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object setValue(Object value)
- {
- Object oldValue = getValue();
- <%if (valueFeature.isListType()) {%>
- getTypedValue().clear();
- getTypedValue().addAll((<%=genModel.getImportedName("java.util.Collection")%>)value);
- <%} else if (valueFeature.isPrimitiveType()) {%>
- setTypedValue(((<%=valueFeature.getObjectType()%>)value).<%=valueFeature.getPrimitiveValueFunction()%>());
- <%} else {%>
- setTypedValue((<%=valueFeature.getImportedType()%>)value);
- <%}%>
- return oldValue;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%> getEMap()
- {
- <%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> container = eContainer();
- return container == null ? null : (<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>)container.get(eContainmentFeature());
- }
-<%}%>
-<%@ include file="Class/insert.javajetinc" fail="silent" %>
-} //<%=isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()%>
-<%// TODO fix the space above%>
-<%genModel.emitSortedImports();%>
diff --git a/branches/sdo-1.0-incubating/tools/templates/models/SDOFactoryClass.javajet b/branches/sdo-1.0-incubating/tools/templates/models/SDOFactoryClass.javajet
deleted file mode 100644
index c874e28206..0000000000
--- a/branches/sdo-1.0-incubating/tools/templates/models/SDOFactoryClass.javajet
+++ /dev/null
@@ -1,646 +0,0 @@
-<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" skeleton="generator.skeleton" imports="org.apache.tuscany.sdo.generate.util.* java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.ecore.* org.eclipse.emf.codegen.ecore.genmodel.impl.Literals org.eclipse.emf.ecore.util.* org.eclipse.emf.codegen.util.CodeGenUtil" class="SDOFactoryClass" version="$Id: SDOFactoryClass.javajet,v 1.23 2005/12/10 13:31:02 emerks Exp $" %>
-<%
-/**
- *
- * 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 " : "";%>
-<%@ include file="../Header.javajetinc"%>
-<%if (isInterface || genModel.isSuppressInterfaces()) {%>
-package <%=genPackage.getReflectionPackageName()%>;
-<%} else {%>
-package <%=genPackage.getClassPackageName()%>;
-<%}%>
-
-import commonj.sdo.helper.HelperContext;
-<%if (!isInterface || genModel.isSuppressInterfaces()) {%>
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-<%}%>
-
-<%if (isImplementation) {%>
-<%if (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");%>
-<%}%>
-<%genModel.markImportLocation(stringBuffer);%>
-
-<%if (isInterface) {%>
-/**
- * <!-- 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 -->
-<%if (!genModel.isSuppressEMFMetaData()) {%>
- * @see <%=genPackage.getQualifiedPackageInterfaceName()%>
-<%}%>
-<%if (genModel.isSuppressInterfaces()) {%>
- * patternVersion=<%=factoryPatternVersion%>;<%=SDOGenUtil.printArguments(genPackage, genModel) %>
-<%}%>
- * @generated
- */
-<%} else {%>
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * Generator information:
- * patternVersion=<%=factoryPatternVersion%>;<%=SDOGenUtil.printArguments(genPackage, genModel) %>
- * <!-- end-user-doc -->
- * @generated
- */
-<%}%>
-<%if (isImplementation) {%>
-public class <%=genPackage.getFactoryClassName()%> extends <%=genModel.getImportedName("org.apache.tuscany.sdo.impl.FactoryBase")%><%if (!genModel.isSuppressInterfaces()) {%> implements <%=genPackage.getImportedFactoryInterfaceName()%><%}%>
-<%} else {%>
-public interface <%=genPackage.getFactoryInterfaceName()%><%if (!genModel.isSuppressEMFMetaData()) {%> extends <%=genModel.getImportedName("org.eclipse.emf.ecore.EFactory")%><%}%>
-<%}%>
-{
-<%if (genModel.getCopyrightText() != null) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-
-<%if (isInterface && genModel.isSuppressEMFMetaData()) {%>
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genPackage.getFactoryInterfaceName()%> INSTANCE = <%=genPackage.getQualifiedFactoryClassName()%>.init();
-
-<%} else if (isInterface && !genModel.isSuppressInterfaces()) {%>
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genPackage.getFactoryInterfaceName()%> eINSTANCE = <%=genPackage.getQualifiedFactoryClassName()%>.init();
-
-<%}%>
-<%if (isImplementation) {%>
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> NAMESPACE_URI = "<%=genPackage.getNSURI()%>";<%=genModel.getNonNLS()%>
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> NAMESPACE_PREFIX = "<%=genPackage.getNSName()%>";<%=genModel.getNonNLS()%>
-
- /**
- * The version of the generator pattern used to generate this class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> PATTERN_VERSION = "<%=factoryPatternVersion%>";
-
-<%int genIndex = 1;
-for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();%>
- <%if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) { %>
- <%=publicStaticFinalFlag%>int <%=genPackage.getClassifierID(genClassifier)%> = <%=genIndex%>;
-<%genIndex++;%>
-<% } }%>
-
-<%String factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();%>
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genPackage.getFactoryClassName()%>()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "<%=genPackage.getReflectionPackageName()%>");
- }
-
- /**
- * 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
- <%for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();%>
- <%=dep.getImportedFactoryInterfaceName()%>.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 <%=genModel.getImportedName("commonj.sdo.DataObject")%> create(int typeNumber)
- {
- switch (typeNumber)
- {
-<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%>
-<%if (!genClass.isAbstract() && !genClass.isDynamic()) {%>
- case <%=genClass.getClassifierID()%>: return (<%=genModel.getImportedName("commonj.sdo.DataObject")%>)create<%=genClass.getName()%>();
-<%}%>
-<%}%>
- default:
- return super.create(typeNumber);
- }
- }
-
-<%if (!genPackage.getAllGenDataTypes().isEmpty()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(int typeNumber, String initialValue)
- {
- switch (typeNumber)
- {
-<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%>
- <%if (genDataType.isSerializable()) {%>
- case <%=genDataType.getClassifierID()%>:
- return create<%=genDataType.getName()%>FromString(initialValue);
- <%}%>
-<%}%>
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertToString(int typeNumber, Object instanceValue)
- {
- switch (typeNumber)
- {
-<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%>
- <%if (genDataType.isSerializable()) {%>
- case <%=genDataType.getClassifierID()%>:
- return convert<%=genDataType.getName()%>ToString(instanceValue);
- <%}%>
-<%}%>
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
- }
- }
-<%}%>
-<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%>
- <%if (!genClass.isAbstract() && !genClass.isDynamic()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genClass.getImportedInterfaceName()%> create<%=genClass.getName()%>()
- {
- <%if (genClass.isDynamic()) {%>
- <%=genClass.getImportedInterfaceName()%> <%=genClass.getSafeUncapName()%> = <%=genClass.getCastFromEObject()%>super.create(<%=genClass.getQualifiedClassifierAccessor()%>);
- <%} else {%>
- <%=genClass.getImportedClassName()%> <%=genClass.getSafeUncapName()%> = new <%=genClass.getImportedClassName()%>()<%if (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {%>{}<%}%>;
- <%}%>
- return <%=genClass.getSafeUncapName()%>;
- }
- <%}%>
-<%}%>
-
- // Following creates and initializes SDO metadata for the supported types.
-<%for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();%>
- <%if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) { %>
- protected <%=genModel.getImportedName("commonj.sdo.Type")%> <%=genClassifier.getSafeUncapName()%>Type = null;
-
- public <%=genModel.getImportedName("commonj.sdo.Type")%> get<%=genClassifier.getClassifierAccessorName()%>()
- {
- return <%=genClassifier.getSafeUncapName()%>Type;
- }
-
-<%} }%>
-
- private static <%=factoryType%> instance = null;
- public static <%=factoryType%> init()
- {
- if (instance != null ) return instance;
- instance = new <%=factoryType%>();
-
- // Initialize dependent packages
- <%for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();%>
- <%=dep.getImportedFactoryInterfaceName()%> <%=dep.getImportedFactoryInterfaceName()%>Instance = <%=dep.getImportedFactoryInterfaceName()%>.INSTANCE;
- <%}%>
-
- // Create package meta-data objects
- instance.createMetaData();
-
- // Initialize created meta-data
- instance.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //the<%=factoryType%>.freeze(); //FB do we need to freeze / should we freeze ????
-
- return instance;
- }
-
- private boolean isCreated = false;
-
- public void createMetaData()
- {
- if (isCreated) return;
- isCreated = true;
- <%if (!genPackage.getGenClasses().isEmpty()) {%>
-
- // Create types and their properties
- <%for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();%>
- <%if (!genClass.isDynamic()) {%>
- <%=genClass.getSafeUncapName()%>Type = createType(false, <%=genPackage.getClassifierID(genClass)%>);
- <%for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();%>
- createProperty(<%=!genFeature.isReferenceType()%>, <%=genClass.getSafeUncapName()%>Type,<%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>);
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- <%if (!genPackage.getGenDataTypes().isEmpty()) {%>
-
- // Create data types
- <%for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();%>
- <%=genDataType.getSafeUncapName()%>Type = createType(true, <%=genPackage.getClassifierID(genDataType)%> );
- <%}%>
- <%}%>
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
- <%if (!genPackage.getPackageInitializationDependencies().isEmpty()) {%>
-
- // Obtain other dependent packages
- <%for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();%>
- <%=dep.getImportedFactoryClassName()%> <%=genPackage.getPackageInstanceVariable(dep)%> = (<%=dep.getImportedFactoryClassName()%>)<%=dep.getImportedFactoryInterfaceName()%>.INSTANCE;
- <%}%>
- <%}%>
- <%List annotationSources = genPackage.getAnnotationSources();%>
- <%annotationSources.remove(ExtendedMetaData.ANNOTATION_URI);%>
- <%=genModel.getImportedName("commonj.sdo.Property")%> property = null;
-
- // Add supertypes to types
- <%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();%>
- addSuperType(<%=genClass.getSafeUncapName()%>Type, <%=genPackage.getPackageInstanceVariable(baseGenClass.getGenPackage())%>.get<%=baseGenClass.getClassifierAccessorName()%>());
- <%}%>
- <%}%>
-
- // Initialize types and properties
- <%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%>
- <%if (!genClass.isDynamic()) {%>
- initializeType(<%=genClass.getSafeUncapName()%>Type, <%=genClass.getImportedInterfaceName()%>.class, "<%=genClass.getName()%>", <%=genClass.isAbstract()%>);
- <%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);%>
- setInstanceProperty (<%=genClass.getSafeUncapName()%>Type, "<%=annotationSource%>", <%=key%>, <%=value%><%=genModel.getNonNLS(key + value)%>);
- <%}%>
- <%}%>
- <%}%>
- <%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() + "()";%>
- property = getLocalProperty(<%=genClass.getSafeUncapName()%>Type, <%=genClass.getLocalFeatureIndex(genFeature)%>);
- <%if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();%>
- <%String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";%>
- initializeProperty(property, <%=type%>, "<%=genFeature.getName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>, <%=genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false"%> , <%=reverse%>);
- <%}else{%>
- initializeProperty(property, <%=type%>, "<%=genFeature.getName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>);
- <%}%>
- <%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);%>
- setInstanceProperty (property, "<%=annotationSource%>", <%=key%>, <%=value%><%=genModel.getNonNLS(key + value)%>);
- <%}%>
- <%}%>
- <%}%>
-
- <%}%>
- <%}%>
- <%}%>
- <%if (!genPackage.getGenDataTypes().isEmpty()) {%>
- // Initialize data types
- <%for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();%>
- initializeType(<%=genDataType.getSafeUncapName()%>Type, <%=genDataType.getImportedInstanceClassName()%>.class, "<%=genDataType.getName()%>", <%=genDataType.getSerializableFlag().equals("IS_SERIALIZABLE") ? "true" : "false"%>, <%=genDataType.getGeneratedInstanceClassFlag().equals("IS_GENERATED_INSTANCE_CLASS") ? "true" : "false" %>);<%=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);%>
- setInstanceProperty (<%=genDataType.getSafeUncapName()%>Type, "<%=annotationSource%>", <%=key%>, <%=value%><%=genModel.getNonNLS(key + value)%>);
- <%}%>
- <%}%>
- <%}%>
-
- <%}%>
- <%}%>
- createXSDMetaData(<%=SDOGenUtil.getDependentFactoryArgumentList(genPackage, false)%>);
- }
-
- protected void createXSDMetaData(<%=SDOGenUtil.getDependentFactoryArgumentList(genPackage, true)%>)
- {
- super.initXSD();
-
- <%=genModel.getImportedName("commonj.sdo.Property")%> property = null;
-
- <%String extendedMetaDataSource = ExtendedMetaData.ANNOTATION_URI;%>
- <%EAnnotation packageAnnotation = genPackage.getEcorePackage().getEAnnotation(extendedMetaDataSource);%>
- <%if (packageAnnotation != null){ %>
- addXSDMapping
- (new String[]
- {
- <%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);%>
- <%=key%>, <%=value%><%=k.hasNext() ? "," : ""%><%=genModel.getNonNLS(key + value)%>
- <%}%>
- });
-
- <%}%>
-
- <%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")) {%>
- addXSDMapping
- (<%=genClassifier.getSafeUncapName()%>Type,
- new String[]
- {
- <%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);%>
- <%=key%>, <%=value%><%=k.hasNext() ? "," : ""%><%=genModel.getNonNLS(key + value)%>
- <%}%>
- });
-
- <%}%>
- <%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"))) { %>
- property = createGlobalProperty
- ("<%=genFeature.getName()%>",
- <%=genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage())%>.get<%=genFeature.getTypeClassifierAccessorName()%>(),
- new String[]
- {
- <%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);%>
- <%=key%>, <%=value%><%=k.hasNext() ? "," : ""%><%=genModel.getNonNLS(key + value)%>
- <%}%>
- <%if (!genFeature.isReferenceType()) {%>
- },
- IS_ATTRIBUTE);
- <%} else {%>
- });
- <%}%>
-
- <%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);%>
- setInstanceProperty
- (property,
- "<%=annotationSource%>",
- <%=key%>, <%=value%><%=genModel.getNonNLS(key + value)%>);
- <%}%>
-
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- <%} else {%>
- addXSDMapping
- (getProperty(<%=genClassifier.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.INTERNAL_<%=genFeature.getUpperName()%>),
- new String[]
- {
- <%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);%>
- <%=key%>, <%=value%><%=k.hasNext() ? "," : ""%><%=genModel.getNonNLS(key + value)%>
- <%}%>
- });
-
- <%}%>
- <%}%>
- <%}%>
- <%}%>
- }
-
-<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%>
- <%if (genDataType.isSerializable()) {%>
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public <%=genDataType.getObjectInstanceClassName()%> create<%=genDataType.getName()%>FromString(String initialValue)
- {
- <%if (genDataType instanceof GenEnum) {%>
- <%=((GenEnum)genDataType).getImportedInstanceClassName()%> result = <%=((GenEnum)genDataType).getImportedInstanceClassName()%>.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + type.getName() + "'");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
- return result;
- <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); %>
- <%if (genBaseType.getGenPackage() == genPackage) {%>
- return (<%=genDataType.getObjectInstanceClassName()%>)create<%=genBaseType.getName()%>FromString(initialValue);
- <%} else {%>
- return (<%=genDataType.getObjectInstanceClassName()%>)<%=SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage())%>.create<%=genBaseType.getName()%>FromString(initialValue);
- <%}%>
- <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %>
- if (initialValue == null) return null;
- <%=genModel.getImportedName("java.util.List")%> result = new <%=genModel.getImportedName("java.util.ArrayList")%>();
- for (<%=genModel.getImportedName("java.util.StringTokenizer")%> stringTokenizer = new <%=genModel.getImportedName("java.util.StringTokenizer")%>(initialValue); stringTokenizer.hasMoreTokens(); )
- {
- String item = stringTokenizer.nextToken();
- <%if (genItemType.getGenPackage() == genPackage) {%>
- result.add(create<%=genItemType.getName()%>FromString(item));
- <%} else {%>
- result.add(<%=SDOGenUtil.getFactoryImpl(genItemType.getGenPackage())%>.create<%=genItemType.getName()%>FromString(item));
- <%}%>
- }
- return result;
- <%} else if (!genDataType.getMemberTypes().isEmpty()) {%>
- if (initialValue == null) return null;
- <%=genDataType.getObjectInstanceClassName()%> result = null;
- RuntimeException exception = null;
- <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%>
- try
- {
- <%if (genMemberType.getGenPackage() == genPackage) {%>
- result = (<%=genDataType.getObjectInstanceClassName()%>)create<%=genMemberType.getName()%>FromString(initialValue);
- <%} else {%>
- result = (<%=genDataType.getObjectInstanceClassName()%>)<%=SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage())%>.create<%=genMemberType.getName()%>FromString(initialValue);
- <%}%>
- if (result != null/* && Diagnostician.INSTANCE.validate(type, result, null, null)*/)
- {
- return result;
- }
- }
- catch (RuntimeException e)
- {
- exception = e;
- }
- <%}%>
- if (result != null || exception == null) return result;
-
- throw exception;
- <%} else if (genDataType.isArrayType()) {%>
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>();
- <%} else {%>
- return (<%=genDataType.getObjectInstanceClassName()%>)super.createFromString(<%=genDataType.getClassifierID()%>, initialValue);
- <%}%>
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convert<%=genDataType.getName()%>ToString(Object instanceValue)
- {
- <%if (genDataType instanceof GenEnum) {%>
- return instanceValue == null ? null : instanceValue.toString();
- <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); %>
- <%if (genBaseType.getGenPackage() == genPackage) {%>
- return convert<%=genBaseType.getName()%>ToString(instanceValue);
- <%} else {%>
- return <%=SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage())%>.convert<%=genBaseType.getName()%>ToString(instanceValue);
- <%}%>
- <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %>
- if (instanceValue == null) return null;
- <%=genModel.getImportedName("java.util.List")%> list = (<%=genModel.getImportedName("java.util.List")%>)instanceValue;
- if (list.isEmpty()) return "";
- <%=genModel.getImportedName("java.lang.StringBuffer")%> result = new <%=genModel.getImportedName("java.lang.StringBuffer")%>();
- for (<%=genModel.getImportedName("java.util.Iterator")%> i = list.iterator(); i.hasNext(); )
- {
- <%if (genItemType.getGenPackage() == genPackage) {%>
- result.append(convert<%=genItemType.getName()%>ToString(i.next()));
- <%} else {%>
- result.append(<%=SDOGenUtil.getFactoryImpl(genItemType.getGenPackage())%>.convert<%=genItemType.getName()%>ToString(i.next()));
- <%}%>
- result.append(' ');
- }
- return result.substring(0, result.length() - 1);
- <%} else if (!genDataType.getMemberTypes().isEmpty()) {%>
- if (instanceValue == null) return null;
- <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%>
- if (<%=SDOGenUtil.getQualifiedTypeAccessor(genMemberType)%>.isInstance(instanceValue))
- {
- try
- {
- <%if (genMemberType.getGenPackage() == genPackage) {%>
- String value = convert<%=genMemberType.getName()%>ToString(instanceValue);
- <%} else {%>
- String value = <%=SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage())%>.convert<%=genMemberType.getName()%>ToString(instanceValue);
- <%}%>
- if (value != null) return value;
- }
- catch (Exception e)
- {
- }
- }
- <%}%>
- throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :<%=genDataType.getName()%>");
- <%} else if (genDataType.isArrayType()) {%>
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>();
- <%} else {%>
- return super.convertToString(<%=genDataType.getClassifierID()%>, instanceValue);
- <%}%>
- }
-
- <%}%>
-<%}%>
-<%} else {%>
- <%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%>
- <%if (genClass.hasFactoryInterfaceCreateMethod()) {%>
- /**
- * Returns a new object of class '<em><%=genClass.getFormattedName()%></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em><%=genClass.getFormattedName()%></em>'.
- * @generated
- */
- <%=genClass.getImportedInterfaceName()%> create<%=genClass.getName()%>();
-
- <%}%>
- <%}%>
- /**
- * 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);
-
- <%if (genPackage.isDataTypeConverters()) {%>
- <%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%>
- <%if (genDataType.isSerializable()) {%>
- /**
- * Returns an instance of data type '<em><%=genDataType.getFormattedName()%></em>' corresponding the given literal.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param literal a literal of the data type.
- * @return a new instance value of the data type.
- * @generated
- */
- <%=genDataType.getImportedInstanceClassName()%> create<%=genDataType.getName()%>(String literal);
-
- /**
- * Returns a literal representation of an instance of data type '<em><%=genDataType.getFormattedName()%></em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param instanceValue an instance value of the data type.
- * @return a literal representation of the instance value.
- * @generated
- */
- String convert<%=genDataType.getName()%>(<%=genDataType.getImportedInstanceClassName()%> instanceValue);
-
- <%}%>
- <%}%>
- <%}%>
-<%}%>
-} //<%=isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName()%>
-<%genModel.emitSortedImports();%>
diff --git a/branches/sdo-1.0-incubating/tools/templates/models/generator.skeleton b/branches/sdo-1.0-incubating/tools/templates/models/generator.skeleton
deleted file mode 100644
index 5c123c01fd..0000000000
--- a/branches/sdo-1.0-incubating/tools/templates/models/generator.skeleton
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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 CLASS
- {
- public String generate(Object argument)
- {
- return "";
- }
- } \ No newline at end of file