You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/07/25 18:42:24 UTC
svn commit: r559518 [2/3] - in
/incubator/tuscany/tags/java/sdo/1.0-incubating: ./
distribution/src/main/release/ distribution/src/main/release/bin/ impl/
impl/src/main/resources/META-INF/ lib/src/main/resources/META-INF/
plugin/src/main/resources/META...
Added: incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/LICENSE?view=auto&rev=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/LICENSE (added)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/LICENSE Wed Jul 25 09:42:11 2007
@@ -0,0 +1,276 @@
+Each file in this JAR is covered by one of the two liceses listed below.
+License applicable to the files ....
+
+commonj/sdo/ChangeSummary$Setting.class
+commonj/sdo/ChangeSummary.class
+commonj/sdo/DataGraph.class
+commonj/sdo/DataObject.class
+commonj/sdo/helper/CopyHelper.class
+commonj/sdo/helper/DataFactory.class
+commonj/sdo/helper/DataHelper.class
+commonj/sdo/helper/EqualityHelper.class
+commonj/sdo/helper/HelperContext.class
+commonj/sdo/helper/TypeHelper.class
+commonj/sdo/helper/XMLDocument.class
+commonj/sdo/helper/XMLHelper.class
+commonj/sdo/helper/XSDHelper.class
+commonj/sdo/impl/ExternalizableDelegator$Resolvable.class
+commonj/sdo/impl/ExternalizableDelegator.class
+commonj/sdo/Property.class
+commonj/sdo/Sequence.class
+commonj/sdo/Type.class
+xml/datagraph.xsd
+xml/sdoJava.xml
+xml/sdoJava.xsd
+xml/sdoModel.xml
+xml/sdoModel.xsd
+xml/sdoXML.xml
+xml/sdoXML.xsd
+
+License for the Service Data Objects JavaDoc and Interface Definition files.
+
+The Service Data Objects Specification is being provided by the copyright holders under the following
+license. By using and/or copying this work, you agree that you have read, understood and will comply with
+the following terms and conditions:
+
+Permission to copy, display and distribute the Service Data Objects Specification and/or portions thereof, without
+modification, in any medium without fee or royalty is hereby granted, provided that you include the
+following on ALL copies of the Service Data Objects Specification, or portions thereof, that you make:
+
+1. A link or URL to the Service Data Objects Specification at this location:
+http://www.osoa.org/display/Main/Service+Data+Objects+Specifications
+
+2. The full text of this copyright notice as shown in the Service Data Objects Specification.
+
+BEA, IBM, Oracle, Primeton Technologies, Rogue Wave Software, SAP, Software AG, Sun Microsystems, Xcalia,
+Zend Technologies (collectively, the “Authors”) agree to grant you a royalty-free license, under reasonable,
+non-discriminatory terms and conditions to patents that they deem necessary to implement the Service Data
+Objects Specification.
+
+THE Service Data Objects SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR
+WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SPECIFICATION AND THE IMPLEMENTATION OF ITS CONTENTS,
+INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+NON-INFRINGEMENT OR TITLE. THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SERVICE DATA OBJECTS
+SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity
+pertaining to the Service Data Objects Specification or its contents without specific, written prior
+permission. Title to copyright in the Service Data Objects Specification will at all times remain with the
+Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+============================================================================================================
+
+License applicable to the files ...
+
+commonj/sdo/impl/HelperProvider$1.class
+commonj/sdo/impl/HelperProvider$2.class
+commonj/sdo/impl/HelperProvider$DefaultHelperContext.class
+commonj/sdo/impl/HelperProvider.class
+commonj/sdo/impl/NoHelperProviderException.class
+
+
+ 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.
+
Added: incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/NOTICE?view=auto&rev=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/NOTICE (added)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/sdo-api/src/main/resources/META-INF/NOTICE Wed Jul 25 09:42:11 2007
@@ -0,0 +1,16 @@
+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/).
+
+This product also includes software developed by the Open Service Oriented Architecture organisation
+(http://osoa.org).
+
+Please see the LICENSE file present in the META-INF directory of this archive.
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java Wed Jul 25 09:42:11 2007
@@ -17,7 +17,7 @@
return result;
}
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ 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";
@@ -1479,9 +1479,9 @@
int baseCount = base.getFeatureCount();
if (g < baseCount)
{
- featureValue = base.getClassName() + "." + genFeature.getUpperName();
+ featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
} else {
- String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
featureValue = baseCountID + " + " + Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
}
}
@@ -1503,9 +1503,9 @@
int baseCount = base.getFeatureCount();
if (g < baseCount)
{
- featureValue = base.getClassName() + "." + genFeature.getUpperName();
+ featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
} else {
- String baseCountID = base.getClassName() + "." + "EXTENDED_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
featureValue = baseCountID + " + " + Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
}
}
@@ -1523,7 +1523,7 @@
featureCount = Integer.toString(declaredPropertiesCount);
}
else {
- String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
featureCount = baseCountID + " + " + Integer.toString(declaredPropertiesCount);
}
stringBuffer.append(TEXT_68);
@@ -1536,7 +1536,7 @@
featureCount = Integer.toString(extendedPropertiesCount*-1);
}
else {
- String baseCountID = base.getClassName() + "." + "EXTENDED_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
featureCount = baseCountID + " - " + Integer.toString(extendedPropertiesCount);
}
stringBuffer.append(TEXT_70);
@@ -1559,9 +1559,9 @@
int baseCount = base.getFeatureCount();
if (g < baseCount)
{
- featureValue = base.getClassName() + ".INTERNAL_" + genFeature.getUpperName();
+ featureValue = base.getImportedClassName() + ".INTERNAL_" + genFeature.getUpperName();
} else {
- String baseCountID = base.getClassName() + "." + "INTERNAL_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
featureValue = baseCountID + " + " + Integer.toString(g - baseCount);
}
}
@@ -1579,7 +1579,7 @@
featureCount = Integer.toString(genClass.getFeatureCount());
}
else {
- String baseCountID = base.getClassName() + "." + "INTERNAL_PROPERTY_COUNT";
+ String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
}
stringBuffer.append(TEXT_79);
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/LICENSE.txt Wed Jul 25 09:42:11 2007
@@ -202,282 +202,6 @@
limitations under the License.
-APACHE TUSCANY SDO SUBCOMPONENTS:
-The Apache Tuscany SDO distribution includes a number of subcomponents with
-separate copyright notices and license terms. Your use of the source
-code for the these subcomponents is subject to the terms and
-conditions of the following licenses.
-##
-License for the Service Data Objects JavaDoc and Interface Definition files. (sdo-api-r2.0.1-1.0-incubator-M2.jar)
-Permission to copy, make derivative works of, and distribute the Service Data Objects
-JavaDoc and Interface Definition Files files in any medium without fee or royalty as part
-of a compliant implementation of the Service Data Objects Specification is hereby granted.
-The Service Data Objects Specification may be found at any of the following locations:
-
-http://dev2dev.bea.com/technologies/commonj/index.jsp
-http://www.ibm.com/developerworks/library/specification/ws-sdo/
-http://oracle.com/technology/webservices/sca
-https://www.sdn.sap.com/
-http://www.xcalia/xdn/specs/sdo
-
-THE SERVICE DATA OBJECTS SPECIFICATION AND THE JAVADOC AND INTERFACE DEFINITION FILES
-ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS
-SPECIFICATION OR THE JAVADOC AND INTERFACE DEFINITION FILES AND THE IMPLEMENTATION OF THEIR CONTENTS,
-INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT OR TITLE. THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
-INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE
-SERVICE DATA OBJECTS SPECIFICATION OR THE JAVADOC OR INTERFACE DEFINTION FILES.
-
-The name and trademarks of the Authors may NOT be used in any manner, including advertising or
-publicity pertaining to the Service Component Architecture Specification or its contents without specific,
-written prior permission. Title to copyright in the Service Data Objects Specification and the
-JavaDoc and Interface Definition Files will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
-
-===============================================================================
-
-For the Eclipse Modeling Framework component
-
-applicable to the jars ...
-
-codegen-2.2.2.jar
-codegen-ecore-2.2.2.jar
-common-2.2.2.jar
-ecore-2.2.2.jar
-ecore-change-2.2.2.jar
-ecore-xmi-2.2.2.jar
-xsd-2.2.2.jar
-
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and
-documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and
-are distributed by that particular Contributor. A Contribution
-'originates' from a Contributor if it was added to the Program by such
-Contributor itself or anyone acting on such Contributor's behalf.
-Contributions do not include additions to the Program which: (i) are
-separate modules of software distributed in conjunction with the
-Program under their own license agreement, and (ii) are not derivative
-works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor
-which are necessarily infringed by the use or sale of its Contribution
-alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this
-Agreement.
-
-"Recipient" means anyone who receives the Program under this
-Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free copyright
-license to reproduce, prepare derivative works of, publicly display,
-publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and
-object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free patent
-license under Licensed Patents to make, use, sell, offer to sell,
-import and otherwise transfer the Contribution of such Contributor, if
-any, in source code and object code form. This patent license shall
-apply to the combination of the Contribution and the Program if, at
-the time the Contribution is added by the Contributor, such addition
-of the Contribution causes such combination to be covered by the
-Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the
-licenses to its Contributions set forth herein, no assurances are
-provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow
-Recipient to distribute the Program, it is Recipient's responsibility
-to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient
-copyright rights in its Contribution, if any, to grant the copyright
-license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form
-under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties
-and conditions, express and implied, including warranties or
-conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability
-for damages, including direct, indirect, special, incidental and
-consequential damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are
-offered by that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such
-Contributor, and informs licensees how to obtain it in a reasonable
-manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the
-Program.
-
-Contributors may not remove or alter any copyright notices contained
-within the Program.
-
-Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a
-commercial product offering should do so in a manner which does not
-create potential liability for other Contributors. Therefore, if a
-Contributor includes the Program in a commercial product offering,
-such Contributor ("Commercial Contributor") hereby agrees to defend
-and indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses") arising
-from claims, lawsuits and other legal actions brought by a third party
-against the Indemnified Contributor to the extent caused by the acts
-or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement.
-In order to qualify, an Indemnified Contributor must: a) promptly
-notify the Commercial Contributor in writing of such claim, and b)
-allow the Commercial Contributor to control, and cooperate with the
-Commercial Contributor in, the defense and any related settlement
-negotiations. The Indemnified Contributor may participate in any such
-claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED 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. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable
-laws, damage to or loss of data, programs or equipment, and
-unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further
-action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-the Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of
-the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of
-time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use
-and distribution of the Program as soon as reasonably practicable.
-However, Recipient's obligations under this Agreement and any licenses
-granted by Recipient relating to the Program shall continue and
-survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement,
-but in order to avoid inconsistency the Agreement is copyrighted and
-may only be modified in the following manner. The Agreement Steward
-reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement
-Steward has the right to modify this Agreement. The Eclipse Foundation
-is the initial Agreement Steward. The Eclipse Foundation may assign
-the responsibility to serve as the Agreement Steward to a suitable
-separate entity. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions)
-may always be distributed subject to the version of the Agreement
-under which it was received. In addition, after a new version of the
-Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives
-no rights or licenses to the intellectual property of any Contributor
-under this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No
-party to this Agreement will bring a legal action under this Agreement
-more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.
-
-===============================================================================
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/NOTICE?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/NOTICE (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/NOTICE Wed Jul 25 09:42:11 2007
@@ -1,28 +1,14 @@
-Apache Tuscany SDO for Java
-Copyright 2006, 2007 The Apache Software Foundation
+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/).
-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.
-
-Unless otherwise indicated, all distribution made available by the Apache Software Foundation
-is provided to you under the terms and conditions of the Apache License Version 2.0 ("AL").
-A copy of the AL is provided with this distribution as the LICENSE.txt file present in the
-root directory, and is also available at http://www.apache.org/licenses/.
-
-The terms and conditions governing the distribution may refer to the AL or other license
-agreements, notices or terms and conditions. Some of these other license agreements may
-include (but are not limited to):
-
- . Eclipse Public License Version 1.0 (available at http://www.eclipse.org/legal/epl-v10.html)
+Please see the LICENSE file present in the META-INF directory of this archive.
-It is your obligation to read and accept all such terms and conditions prior to use of the
-distribution. If term or condition is provided, please contact the Apache Software Foundation
-to determine what terms and conditions govern that particular distribution.
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/README.txt
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/README.txt?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/README.txt (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/main/resources/META-INF/README.txt Wed Jul 25 09:42:11 2007
@@ -1,19 +1,7 @@
-Apache Tuscany M3 build (March 2007)
-===================================
+Apache Tuscany 1.0-incubating build (July 2007)
+===============================================
http://incubator.apache.org/tuscany/
-
-Tuscany is an effort undergoing incubation at the Apache Software Foundation
-(ASF), sponsored by the 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.
-
Support
-------
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/AccountImpl.java Wed Jul 25 09:42:11 2007
@@ -147,7 +147,7 @@
boolean oldAccountNum_set_ = accountNum_set_;
accountNum_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, ACCOUNT_NUM, oldAccountNum, accountNum, !oldAccountNum_set_);
+ notify(ChangeKind.SET, INTERNAL_ACCOUNT_NUM, oldAccountNum, accountNum, !oldAccountNum_set_);
}
/**
@@ -162,7 +162,7 @@
accountNum = ACCOUNT_NUM_DEFAULT_;
accountNum_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, ACCOUNT_NUM, oldAccountNum, ACCOUNT_NUM_DEFAULT_, oldAccountNum_set_);
+ notify(ChangeKind.UNSET, INTERNAL_ACCOUNT_NUM, oldAccountNum, ACCOUNT_NUM_DEFAULT_, oldAccountNum_set_);
}
/**
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerFactoryImpl.java Wed Jul 25 09:42:11 2007
@@ -28,18 +28,12 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -95,11 +89,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -157,29 +157,25 @@
}
- private static boolean isInited = false;
-
+ private static CustomerFactoryImpl instance = null;
public static CustomerFactoryImpl init()
{
- if (isInited) return (CustomerFactoryImpl)FactoryBase.getStaticFactory(CustomerFactoryImpl.NAMESPACE_URI);
- CustomerFactoryImpl theCustomerFactoryImpl = new CustomerFactoryImpl();
- isInited = true;
-
- // Initialize simple dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
+ if (instance != null ) return instance;
+ instance = new CustomerFactoryImpl();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theCustomerFactoryImpl.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theCustomerFactoryImpl.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theCustomerFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
- return theCustomerFactoryImpl;
+ return instance;
}
private boolean isCreated = false;
@@ -190,9 +186,9 @@
isCreated = true;
// Create types and their properties
- accountType = createType(false, ACCOUNT);
+ accountType = createType(false, ACCOUNT);
createProperty(true, accountType,AccountImpl.INTERNAL_ACCOUNT_NUM);
- customerType = createType(false, CUSTOMER);
+ customerType = createType(false, CUSTOMER);
createProperty(false, customerType,CustomerImpl.INTERNAL_ACCOUNT);
createProperty(true, customerType,CustomerImpl.INTERNAL_FIRST_NAME);
}
@@ -205,7 +201,7 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/customer/impl/CustomerImpl.java Wed Jul 25 09:42:11 2007
@@ -182,7 +182,7 @@
account_set_ = true;
if (isNotifying())
{
- addNotification(this, ChangeKind.SET, ACCOUNT, oldAccount, newAccount, !oldAccount_set_, changeContext);
+ addNotification(this, ChangeKind.SET, INTERNAL_ACCOUNT, oldAccount, newAccount, !oldAccount_set_, changeContext);
}
return changeContext;
}
@@ -198,19 +198,19 @@
{
ChangeContext changeContext = null;
if (account != null)
- changeContext = inverseRemove(account, this, OPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+ changeContext = inverseRemove(account, this, OPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
if (newAccount != null)
- changeContext = inverseAdd(newAccount, this, OPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+ 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, ACCOUNT, newAccount, newAccount, !oldAccount_set_);
- }
+ notify(ChangeKind.SET, INTERNAL_ACCOUNT, newAccount, newAccount, !oldAccount_set_);
+ }
}
/**
@@ -226,7 +226,7 @@
account_set_ = false;
if (isNotifying())
{
- addNotification(this, ChangeKind.UNSET, ACCOUNT, oldAccount, null, !oldAccount_set_, changeContext);
+ addNotification(this, ChangeKind.UNSET, INTERNAL_ACCOUNT, oldAccount, null, !oldAccount_set_, changeContext);
}
return changeContext;
}
@@ -241,7 +241,7 @@
if (account != null)
{
ChangeContext changeContext = null;
- changeContext = inverseRemove(account, this, EOPPOSITE_FEATURE_BASE - ACCOUNT, null, changeContext);
+ changeContext = inverseRemove(account, this, EOPPOSITE_FEATURE_BASE - INTERNAL_ACCOUNT, null, changeContext);
changeContext = basicUnsetAccount(changeContext);
if (changeContext != null) dispatch(changeContext);
}
@@ -250,7 +250,7 @@
boolean oldAccount_set_ = account_set_;
account_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, ACCOUNT, null, null, oldAccount_set_);
+ notify(ChangeKind.UNSET, INTERNAL_ACCOUNT, null, null, oldAccount_set_);
}
}
@@ -285,7 +285,7 @@
boolean oldFirstName_set_ = firstName_set_;
firstName_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, FIRST_NAME, oldFirstName, firstName, !oldFirstName_set_);
+ notify(ChangeKind.SET, INTERNAL_FIRST_NAME, oldFirstName, firstName, !oldFirstName_set_);
}
/**
@@ -300,7 +300,7 @@
firstName = FIRST_NAME_DEFAULT_;
firstName_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, FIRST_NAME, oldFirstName, FIRST_NAME_DEFAULT_, oldFirstName_set_);
+ notify(ChangeKind.UNSET, INTERNAL_FIRST_NAME, oldFirstName, FIRST_NAME_DEFAULT_, oldFirstName_set_);
}
/**
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerFactoryImpl.java Wed Jul 25 09:42:11 2007
@@ -28,18 +28,12 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -97,11 +91,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -215,29 +215,25 @@
}
- private static boolean isInited = false;
-
+ private static CustomerFactoryImpl instance = null;
public static CustomerFactoryImpl init()
{
- if (isInited) return (CustomerFactoryImpl)FactoryBase.getStaticFactory(CustomerFactoryImpl.NAMESPACE_URI);
- CustomerFactoryImpl theCustomerFactoryImpl = new CustomerFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
+ if (instance != null ) return instance;
+ instance = new CustomerFactoryImpl();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theCustomerFactoryImpl.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theCustomerFactoryImpl.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theCustomerFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
- return theCustomerFactoryImpl;
+ return instance;
}
private boolean isCreated = false;
@@ -248,13 +244,13 @@
isCreated = true;
// Create types and their properties
- customersTypeType = createType(false, CUSTOMERS_TYPE);
+ customersTypeType = createType(false, CUSTOMERS_TYPE);
createProperty(false, customersTypeType,CustomersTypeImpl.INTERNAL_CUSTOMER);
- customerTypeType = createType(false, CUSTOMER_TYPE);
+ 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);
+ infoTypeType = createType(false, INFO_TYPE);
// Create data types
custNameTypeType = createType(true, CUST_NAME_TYPE );
@@ -268,7 +264,7 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/extensible/customer/impl/CustomerTypeImpl.java Wed Jul 25 09:42:11 2007
@@ -225,7 +225,7 @@
boolean oldName_set_ = name_set_;
name_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, NAME, oldName, name, !oldName_set_);
+ notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
}
/**
@@ -240,7 +240,7 @@
name = NAME_DEFAULT_;
name_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, NAME, oldName, NAME_DEFAULT_, oldName_set_);
+ notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
}
/**
@@ -274,7 +274,7 @@
boolean oldNumber_set_ = number_set_;
number_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, NUMBER, oldNumber, number, !oldNumber_set_);
+ notify(ChangeKind.SET, INTERNAL_NUMBER, oldNumber, number, !oldNumber_set_);
}
/**
@@ -289,7 +289,7 @@
number = NUMBER_DEFAULT_;
number_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
+ notify(ChangeKind.UNSET, INTERNAL_NUMBER, oldNumber, NUMBER_DEFAULT_, oldNumber_set_);
}
/**
@@ -324,7 +324,7 @@
info_set_ = true;
if (isNotifying())
{
- addNotification(this, ChangeKind.SET, INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
+ addNotification(this, ChangeKind.SET, INTERNAL_INFO, oldInfo, newInfo, !oldInfo_set_, changeContext);
}
return changeContext;
}
@@ -340,19 +340,19 @@
{
ChangeContext changeContext = null;
if (info != null)
- changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+ changeContext = inverseRemove(info, this, OPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
if (newInfo != null)
- changeContext = inverseAdd(newInfo, this, OPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+ 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, INFO, newInfo, newInfo, !oldInfo_set_);
- }
+ notify(ChangeKind.SET, INTERNAL_INFO, newInfo, newInfo, !oldInfo_set_);
+ }
}
/**
@@ -368,7 +368,7 @@
info_set_ = false;
if (isNotifying())
{
- addNotification(this, ChangeKind.UNSET, INFO, oldInfo, null, !oldInfo_set_, changeContext);
+ addNotification(this, ChangeKind.UNSET, INTERNAL_INFO, oldInfo, null, !oldInfo_set_, changeContext);
}
return changeContext;
}
@@ -383,7 +383,7 @@
if (info != null)
{
ChangeContext changeContext = null;
- changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INFO, null, changeContext);
+ changeContext = inverseRemove(info, this, EOPPOSITE_FEATURE_BASE - INTERNAL_INFO, null, changeContext);
changeContext = basicUnsetInfo(changeContext);
if (changeContext != null) dispatch(changeContext);
}
@@ -392,7 +392,7 @@
boolean oldInfo_set_ = info_set_;
info_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, INFO, null, null, oldInfo_set_);
+ notify(ChangeKind.UNSET, INTERNAL_INFO, null, null, oldInfo_set_);
}
}
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/Quote.java Wed Jul 25 09:42:11 2007
@@ -485,7 +485,7 @@
boolean oldSymbol_set_ = symbol_set_;
symbol_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
+ notify(ChangeKind.SET, INTERNAL_SYMBOL, oldSymbol, symbol, !oldSymbol_set_);
}
/**
@@ -504,7 +504,7 @@
symbol = SYMBOL_DEFAULT_;
symbol_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
+ notify(ChangeKind.UNSET, INTERNAL_SYMBOL, oldSymbol, SYMBOL_DEFAULT_, oldSymbol_set_);
}
/**
@@ -557,7 +557,7 @@
boolean oldCompanyName_set_ = companyName_set_;
companyName_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
+ notify(ChangeKind.SET, INTERNAL_COMPANY_NAME, oldCompanyName, companyName, !oldCompanyName_set_);
}
/**
@@ -576,7 +576,7 @@
companyName = COMPANY_NAME_DEFAULT_;
companyName_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
+ notify(ChangeKind.UNSET, INTERNAL_COMPANY_NAME, oldCompanyName, COMPANY_NAME_DEFAULT_, oldCompanyName_set_);
}
/**
@@ -629,7 +629,7 @@
boolean oldPrice_set_ = price_set_;
price_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, PRICE, oldPrice, price, !oldPrice_set_);
+ notify(ChangeKind.SET, INTERNAL_PRICE, oldPrice, price, !oldPrice_set_);
}
/**
@@ -648,7 +648,7 @@
price = PRICE_DEFAULT_;
price_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
+ notify(ChangeKind.UNSET, INTERNAL_PRICE, oldPrice, PRICE_DEFAULT_, oldPrice_set_);
}
/**
@@ -701,7 +701,7 @@
boolean oldOpen1_set_ = open1_set_;
open1_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, OPEN1, oldOpen1, open1, !oldOpen1_set_);
+ notify(ChangeKind.SET, INTERNAL_OPEN1, oldOpen1, open1, !oldOpen1_set_);
}
/**
@@ -720,7 +720,7 @@
open1 = OPEN1_DEFAULT_;
open1_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
+ notify(ChangeKind.UNSET, INTERNAL_OPEN1, oldOpen1, OPEN1_DEFAULT_, oldOpen1_set_);
}
/**
@@ -773,7 +773,7 @@
boolean oldHigh_set_ = high_set_;
high_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, HIGH, oldHigh, high, !oldHigh_set_);
+ notify(ChangeKind.SET, INTERNAL_HIGH, oldHigh, high, !oldHigh_set_);
}
/**
@@ -792,7 +792,7 @@
high = HIGH_DEFAULT_;
high_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
+ notify(ChangeKind.UNSET, INTERNAL_HIGH, oldHigh, HIGH_DEFAULT_, oldHigh_set_);
}
/**
@@ -845,7 +845,7 @@
boolean oldLow_set_ = low_set_;
low_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, LOW, oldLow, low, !oldLow_set_);
+ notify(ChangeKind.SET, INTERNAL_LOW, oldLow, low, !oldLow_set_);
}
/**
@@ -864,7 +864,7 @@
low = LOW_DEFAULT_;
low_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
+ notify(ChangeKind.UNSET, INTERNAL_LOW, oldLow, LOW_DEFAULT_, oldLow_set_);
}
/**
@@ -917,7 +917,7 @@
boolean oldVolume_set_ = volume_set_;
volume_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, VOLUME, oldVolume, volume, !oldVolume_set_);
+ notify(ChangeKind.SET, INTERNAL_VOLUME, oldVolume, volume, !oldVolume_set_);
}
/**
@@ -936,7 +936,7 @@
volume = VOLUME_DEFAULT_;
volume_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
+ notify(ChangeKind.UNSET, INTERNAL_VOLUME, oldVolume, VOLUME_DEFAULT_, oldVolume_set_);
}
/**
@@ -989,7 +989,7 @@
boolean oldChange1_set_ = change1_set_;
change1_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, CHANGE1, oldChange1, change1, !oldChange1_set_);
+ notify(ChangeKind.SET, INTERNAL_CHANGE1, oldChange1, change1, !oldChange1_set_);
}
/**
@@ -1008,7 +1008,7 @@
change1 = CHANGE1_DEFAULT_;
change1_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
+ notify(ChangeKind.UNSET, INTERNAL_CHANGE1, oldChange1, CHANGE1_DEFAULT_, oldChange1_set_);
}
/**
@@ -1042,7 +1042,7 @@
{
if (quotes == null)
{
- quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES);
+ quotes = createPropertyList(ListKind.CONTAINMENT, Quote.class, QUOTES, 0);
}
return quotes;
}
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/noInterfaces/simple/SimpleFactory.java Wed Jul 25 09:42:11 2007
@@ -26,22 +26,18 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- 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.1; -noInterfaces
+ * patternVersion=1.2; -noInterfaces
* @generated
*/
public class SimpleFactory extends FactoryBase
@@ -77,7 +73,7 @@
* <!-- end-user-doc -->
* @generated
*/
- public static final String PATTERN_VERSION = "1.1";
+ public static final String PATTERN_VERSION = "1.2";
public static final int QUOTE = 1;
@@ -98,11 +94,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -142,28 +144,25 @@
}
- private static boolean isInited = false;
-
+ private static SimpleFactory instance = null;
public static SimpleFactory init()
{
- if (isInited) return (SimpleFactory)FactoryBase.getStaticFactory(SimpleFactory.NAMESPACE_URI);
- SimpleFactory theSimpleFactory = new SimpleFactory();
- isInited = true;
-
- // Initialize simple dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
+ if (instance != null ) return instance;
+ instance = new SimpleFactory();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theSimpleFactory.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theSimpleFactory.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theSimpleFactory.freeze(); //FB do we need to freeze / should we freeze ????
- return theSimpleFactory;
+ return instance;
}
private boolean isCreated = false;
@@ -174,7 +173,7 @@
isCreated = true;
// Create types and their properties
- quoteType = createType(false, QUOTE);
+ quoteType = createType(false, QUOTE);
createProperty(true, quoteType,Quote.INTERNAL_SYMBOL);
createProperty(true, quoteType,Quote.INTERNAL_COMPANY_NAME);
createProperty(true, quoteType,Quote.INTERNAL_PRICE);
@@ -194,38 +193,38 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
// Initialize types and properties
initializeType(quoteType, Quote.class, "Quote", false);
- property = getProperty(quoteType, Quote.INTERNAL_SYMBOL);
+ property = getLocalProperty(quoteType, 0);
initializeProperty(property, theModelPackageImpl.getString(), "symbol", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_COMPANY_NAME);
+ property = getLocalProperty(quoteType, 1);
initializeProperty(property, theModelPackageImpl.getString(), "companyName", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_PRICE);
+ property = getLocalProperty(quoteType, 2);
initializeProperty(property, theModelPackageImpl.getDecimal(), "price", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_OPEN1);
+ property = getLocalProperty(quoteType, 3);
initializeProperty(property, theModelPackageImpl.getDecimal(), "open1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_HIGH);
+ property = getLocalProperty(quoteType, 4);
initializeProperty(property, theModelPackageImpl.getDecimal(), "high", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_LOW);
+ property = getLocalProperty(quoteType, 5);
initializeProperty(property, theModelPackageImpl.getDecimal(), "low", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_VOLUME);
+ property = getLocalProperty(quoteType, 6);
initializeProperty(property, theModelPackageImpl.getDouble(), "volume", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_CHANGE1);
+ property = getLocalProperty(quoteType, 7);
initializeProperty(property, theModelPackageImpl.getDouble(), "change1", null, 1, 1, Quote.class, false, true, false);
- property = getProperty(quoteType, Quote.INTERNAL_QUOTES);
+ property = getLocalProperty(quoteType, 8);
initializeProperty(property, this.getQuote(), "quotes", null, 0, -1, Quote.class, false, false, false, true , null);
createXSDMetaData(theModelPackageImpl);
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OneElementAndAnyAttrImpl.java Wed Jul 25 09:42:11 2007
@@ -1,5 +1,4 @@
/**
-/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -173,7 +172,7 @@
boolean oldName_set_ = name_set_;
name_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, NAME, oldName, name, !oldName_set_);
+ notify(ChangeKind.SET, INTERNAL_NAME, oldName, name, !oldName_set_);
}
/**
@@ -188,7 +187,7 @@
name = NAME_DEFAULT_;
name_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, NAME, oldName, NAME_DEFAULT_, oldName_set_);
+ notify(ChangeKind.UNSET, INTERNAL_NAME, oldName, NAME_DEFAULT_, oldName_set_);
}
/**
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/open/impl/OpenFactoryImpl.java Wed Jul 25 09:42:11 2007
@@ -28,18 +28,12 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -94,11 +88,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -138,29 +138,25 @@
}
- private static boolean isInited = false;
-
+ private static OpenFactoryImpl instance = null;
public static OpenFactoryImpl init()
{
- if (isInited) return (OpenFactoryImpl)FactoryBase.getStaticFactory(OpenFactoryImpl.NAMESPACE_URI);
- OpenFactoryImpl theOpenFactoryImpl = new OpenFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
+ if (instance != null ) return instance;
+ instance = new OpenFactoryImpl();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theOpenFactoryImpl.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theOpenFactoryImpl.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theOpenFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
- return theOpenFactoryImpl;
+ return instance;
}
private boolean isCreated = false;
@@ -171,7 +167,7 @@
isCreated = true;
// Create types and their properties
- oneElementAndAnyAttrType = createType(false, ONE_ELEMENT_AND_ANY_ATTR);
+ oneElementAndAnyAttrType = createType(false, ONE_ELEMENT_AND_ANY_ATTR);
createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_NAME);
createProperty(true, oneElementAndAnyAttrType,OneElementAndAnyAttrImpl.INTERNAL_ANY_ATTRIBUTE);
}
@@ -184,7 +180,7 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java Wed Jul 25 09:42:11 2007
@@ -28,18 +28,12 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -94,11 +88,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -138,29 +138,25 @@
}
- private static boolean isInited = false;
-
+ private static RepchoiceFactoryImpl instance = null;
public static RepchoiceFactoryImpl init()
{
- if (isInited) return (RepchoiceFactoryImpl)FactoryBase.getStaticFactory(RepchoiceFactoryImpl.NAMESPACE_URI);
- RepchoiceFactoryImpl theRepchoiceFactoryImpl = new RepchoiceFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
+ if (instance != null ) return instance;
+ instance = new RepchoiceFactoryImpl();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theRepchoiceFactoryImpl.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theRepchoiceFactoryImpl.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theRepchoiceFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
- return theRepchoiceFactoryImpl;
+ return instance;
}
private boolean isCreated = false;
@@ -171,7 +167,7 @@
isCreated = true;
// Create types and their properties
- rcTypeType = createType(false, RC_TYPE);
+ rcTypeType = createType(false, RC_TYPE);
createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_GROUP);
createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_S);
createProperty(true, rcTypeType,RCTypeImpl.INTERNAL_I);
@@ -186,7 +182,7 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java Wed Jul 25 09:42:11 2007
@@ -28,18 +28,12 @@
import commonj.sdo.Property;
import commonj.sdo.Type;
-import org.apache.tuscany.sdo.SDOFactory;
-
import org.apache.tuscany.sdo.impl.FactoryBase;
import org.apache.tuscany.sdo.model.ModelFactory;
import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -98,11 +92,17 @@
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
- */
- public void register(HelperContext scope) {
+ */
+ public void register(HelperContext scope)
+ {
if(scope == null) {
- throw new IllegalArgumentException("Scope can not be 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);
}
@@ -214,29 +214,25 @@
}
- private static boolean isInited = false;
-
+ private static SequencesFactoryImpl instance = null;
public static SequencesFactoryImpl init()
{
- if (isInited) return (SequencesFactoryImpl)FactoryBase.getStaticFactory(SequencesFactoryImpl.NAMESPACE_URI);
- SequencesFactoryImpl theSequencesFactoryImpl = new SequencesFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
+ if (instance != null ) return instance;
+ instance = new SequencesFactoryImpl();
+ // Initialize dependent packages
+ ModelFactory ModelFactoryInstance = ModelFactory.INSTANCE;
+
// Create package meta-data objects
- theSequencesFactoryImpl.createMetaData();
+ instance.createMetaData();
// Initialize created meta-data
- theSequencesFactoryImpl.initializeMetaData();
-
+ instance.initializeMetaData();
+
// Mark meta-data to indicate it can't be changed
//theSequencesFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
- return theSequencesFactoryImpl;
+ return instance;
}
private boolean isCreated = false;
@@ -247,7 +243,7 @@
isCreated = true;
// Create types and their properties
- mixedQuoteType = createType(false, MIXED_QUOTE);
+ mixedQuoteType = createType(false, MIXED_QUOTE);
createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_MIXED);
createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_SYMBOL);
createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_COMPANY_NAME);
@@ -258,16 +254,16 @@
createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_VOLUME);
createProperty(true, mixedQuoteType,MixedQuoteImpl.INTERNAL_CHANGE1);
createProperty(false, mixedQuoteType,MixedQuoteImpl.INTERNAL_QUOTES);
- mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE);
+ 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);
+ 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);
+ twoRCsType = createType(false, TWO_RCS);
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP);
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_A);
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_B);
@@ -275,7 +271,7 @@
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_GROUP1);
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Y);
createProperty(true, twoRCsType,TwoRCsImpl.INTERNAL_Z);
- twoRCsMixedType = createType(false, TWO_RCS_MIXED);
+ twoRCsMixedType = createType(false, TWO_RCS_MIXED);
createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_MIXED);
createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_GROUP);
createProperty(true, twoRCsMixedType,TwoRCsMixedImpl.INTERNAL_A);
@@ -294,7 +290,7 @@
isInitialized = true;
// Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
+ ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)ModelFactory.INSTANCE;
Property property = null;
// Add supertypes to types
Modified: incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java?view=diff&rev=559518&r1=559517&r2=559518
==============================================================================
--- incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java (original)
+++ incubator/tuscany/tags/java/sdo/1.0-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java Wed Jul 25 09:42:11 2007
@@ -282,7 +282,7 @@
boolean oldSplit_set_ = split_set_;
split_set_ = true;
if (isNotifying())
- notify(ChangeKind.SET, SPLIT, oldSplit, split, !oldSplit_set_);
+ notify(ChangeKind.SET, INTERNAL_SPLIT, oldSplit, split, !oldSplit_set_);
}
/**
@@ -297,7 +297,7 @@
split = SPLIT_DEFAULT_;
split_set_ = false;
if (isNotifying())
- notify(ChangeKind.UNSET, SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
+ notify(ChangeKind.UNSET, INTERNAL_SPLIT, oldSplit, SPLIT_DEFAULT_, oldSplit_set_);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org