From 836328ea2ca7c6780307abf258503201c91e5a96 Mon Sep 17 00:00:00 2001
From: lresende
Date: Tue, 10 Nov 2009 19:20:03 +0000
Subject: moving SDO branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834615 13f79535-47bb-0310-9956-ffa450edef68
---
branches/sdo-1.1.1-incubating/BUILDING | 34 -
branches/sdo-1.1.1-incubating/DISCLAIMER | 7 -
branches/sdo-1.1.1-incubating/LICENSE | 280 -
branches/sdo-1.1.1-incubating/NOTICE | 9 -
branches/sdo-1.1.1-incubating/README | 16 -
branches/sdo-1.1.1-incubating/RELEASE_NOTES | 21 -
branches/sdo-1.1.1-incubating/distribution/pom.xml | 137 -
.../distribution/src/main/assembly/bin.xml | 135 -
.../distribution/src/main/assembly/src.xml | 57 -
.../distribution/src/main/release/bin/INSTALL | 4 -
.../distribution/src/main/release/bin/LICENSE | 427 --
.../distribution/src/main/release/bin/NOTICE | 18 -
.../distribution/src/main/release/bin/README | 23 -
.../src/main/release/bin/samples/README | 11 -
.../src/main/release/bin/samples/runsamples.bat | 26 -
.../src/main/release/bin/samples/runsamples.sh | 27 -
.../release/bin/samples/sampleProgramContents.html | 244 -
branches/sdo-1.1.1-incubating/impl/model/SDO.ecore | 982 ---
.../sdo-1.1.1-incubating/impl/model/SDO.genmodel | 583 --
branches/sdo-1.1.1-incubating/impl/model/SDO.mdl | 7670 --------------------
branches/sdo-1.1.1-incubating/impl/pom.xml | 188 -
.../org/apache/tuscany/sdo/AnyTypeDataObject.java | 37 -
.../apache/tuscany/sdo/SDOExtendedMetaData.java | 39 -
.../java/org/apache/tuscany/sdo/SDOFactory.java | 185 -
.../java/org/apache/tuscany/sdo/SDOPackage.java | 1657 -----
.../org/apache/tuscany/sdo/SDOTypeVisitor.java | 49 -
.../tuscany/sdo/SimpleAnyTypeDataObject.java | 35 -
.../sdo/codegen/BytecodeInterfaceGenerator.java | 98 -
.../tuscany/sdo/codegen/GenerationException.java | 42 -
.../sdo/codegen/JavaInterfaceGenerator.java | 179 -
.../sdo/codegen/NoJavaImplementationException.java | 61 -
.../sdo/helper/BaseSDOExtendedMetaDataImpl.java | 167 -
.../tuscany/sdo/helper/BaseSDOXSDEcoreBuilder.java | 1771 -----
.../apache/tuscany/sdo/helper/CopyHelperImpl.java | 84 -
.../sdo/helper/CrossScopeCopyHelperImpl.java | 255 -
.../apache/tuscany/sdo/helper/DataFactoryImpl.java | 59 -
.../apache/tuscany/sdo/helper/DataHelperImpl.java | 615 --
.../sdo/helper/DefaultHelperContextImpl.java | 72 -
.../tuscany/sdo/helper/EqualityHelperImpl.java | 96 -
.../tuscany/sdo/helper/HelperContextImpl.java | 193 -
.../tuscany/sdo/helper/HelperProviderImpl.java | 50 -
.../apache/tuscany/sdo/helper/SDOAnnotations.java | 51 -
.../sdo/helper/SDOExtendedMetaDataImpl.java | 305 -
.../apache/tuscany/sdo/helper/SDOHelperImpl.java | 530 --
.../tuscany/sdo/helper/SDOSimpleDateFormat.java | 92 -
.../tuscany/sdo/helper/SDOXSDEcoreBuilder.java | 789 --
.../apache/tuscany/sdo/helper/SchemaBuilder.java | 786 --
.../apache/tuscany/sdo/helper/TypeHelperImpl.java | 317 -
.../org/apache/tuscany/sdo/helper/TypeTable.java | 254 -
.../apache/tuscany/sdo/helper/XMLDocumentImpl.java | 574 --
.../apache/tuscany/sdo/helper/XMLHelperImpl.java | 193 -
.../apache/tuscany/sdo/helper/XMLStreamHelper.java | 26 -
.../tuscany/sdo/helper/XMLStreamHelperImpl.java | 151 -
.../apache/tuscany/sdo/helper/XSDHelperImpl.java | 327 -
.../tuscany/sdo/impl/AnyTypeDataObjectImpl.java | 299 -
.../org/apache/tuscany/sdo/impl/AttributeImpl.java | 836 ---
.../apache/tuscany/sdo/impl/ChangeSummaryImpl.java | 876 ---
.../tuscany/sdo/impl/ChangeSummarySettingImpl.java | 113 -
.../org/apache/tuscany/sdo/impl/ClassImpl.java | 1127 ---
.../org/apache/tuscany/sdo/impl/DataGraphImpl.java | 852 ---
.../apache/tuscany/sdo/impl/DataObjectBase.java | 536 --
.../apache/tuscany/sdo/impl/DataObjectImpl.java | 1562 ----
.../org/apache/tuscany/sdo/impl/DataTypeImpl.java | 781 --
.../tuscany/sdo/impl/DynamicDataObjectImpl.java | 216 -
.../sdo/impl/DynamicStoreDataObjectImpl.java | 91 -
.../java/org/apache/tuscany/sdo/impl/EnumImpl.java | 183 -
.../org/apache/tuscany/sdo/impl/EventImpl.java | 78 -
.../tuscany/sdo/impl/ExtensibleDataObjectImpl.java | 267 -
.../org/apache/tuscany/sdo/impl/FactoryBase.java | 368 -
.../org/apache/tuscany/sdo/impl/ListenerBase.java | 33 -
.../org/apache/tuscany/sdo/impl/ReferenceImpl.java | 785 --
.../apache/tuscany/sdo/impl/SDOFactoryImpl.java | 337 -
.../apache/tuscany/sdo/impl/SDOPackageImpl.java | 2207 ------
.../sdo/impl/SimpleAnyTypeDataObjectImpl.java | 333 -
.../tuscany/sdo/impl/StoreDataObjectImpl.java | 314 -
.../tuscany/sdo/model/BaseDataGraphType.java | 213 -
.../apache/tuscany/sdo/model/DataGraphType.java | 53 -
.../org/apache/tuscany/sdo/model/DataObject.java | 35 -
.../org/apache/tuscany/sdo/model/ModelFactory.java | 106 -
.../org/apache/tuscany/sdo/model/ModelsType.java | 62 -
.../org/apache/tuscany/sdo/model/Property.java | 503 --
.../org/apache/tuscany/sdo/model/TextType.java | 57 -
.../java/org/apache/tuscany/sdo/model/Type.java | 431 --
.../java/org/apache/tuscany/sdo/model/Types.java | 59 -
.../java/org/apache/tuscany/sdo/model/XSDType.java | 62 -
.../sdo/model/impl/BaseDataGraphTypeImpl.java | 625 --
.../tuscany/sdo/model/impl/DataGraphTypeImpl.java | 258 -
.../tuscany/sdo/model/impl/DataObjectImpl.java | 84 -
.../tuscany/sdo/model/impl/ModelFactoryImpl.java | 2401 ------
.../tuscany/sdo/model/impl/ModelsTypeImpl.java | 220 -
.../tuscany/sdo/model/impl/PropertyImpl.java | 1170 ---
.../tuscany/sdo/model/impl/TextTypeImpl.java | 206 -
.../apache/tuscany/sdo/model/impl/TypeImpl.java | 1068 ---
.../apache/tuscany/sdo/model/impl/TypesImpl.java | 210 -
.../apache/tuscany/sdo/model/impl/XSDTypeImpl.java | 220 -
.../sdo/model/internal/InternalFactory.java | 52 -
.../model/internal/impl/InternalFactoryImpl.java | 296 -
.../apache/tuscany/sdo/model/java/JavaFactory.java | 61 -
.../apache/tuscany/sdo/model/java/JavaInfo.java | 92 -
.../sdo/model/java/impl/JavaFactoryImpl.java | 659 --
.../tuscany/sdo/model/java/impl/JavaInfoImpl.java | 256 -
.../apache/tuscany/sdo/model/xml/XMLFactory.java | 61 -
.../org/apache/tuscany/sdo/model/xml/XMLInfo.java | 92 -
.../tuscany/sdo/model/xml/impl/XMLFactoryImpl.java | 341 -
.../tuscany/sdo/model/xml/impl/XMLInfoImpl.java | 256 -
.../tuscany/sdo/osgi/SdoBundleActivator.java | 41 -
.../org/apache/tuscany/sdo/util/BasicSequence.java | 176 -
.../sdo/util/DataGraphResourceFactoryImpl.java | 711 --
.../apache/tuscany/sdo/util/DataObjectUtil.java | 3035 --------
.../java/org/apache/tuscany/sdo/util/SDOUtil.java | 593 --
.../apache/tuscany/sdo/util/StAX2SAXAdapter.java | 250 -
.../tuscany/sdo/util/StreamDeserializer.java | 92 -
.../apache/tuscany/sdo/util/VirtualSequence.java | 780 --
.../tuscany/sdo/util/metadata/JavaMetaData.java | 90 -
.../tuscany/sdo/util/metadata/MetadataFactory.java | 77 -
.../sdo/util/metadata/SDOMetaDataGroup.java | 87 -
.../tuscany/sdo/util/metadata/TypeMetaData.java | 65 -
.../tuscany/sdo/util/metadata/XSDMetaData.java | 66 -
.../sdo/util/metadata/impl/JavaMetaDataImpl.java | 267 -
.../util/metadata/impl/MetadataFactoryImpl.java | 367 -
.../util/metadata/impl/SDOMetaDataGroupImpl.java | 285 -
.../sdo/util/metadata/impl/TypeMetaDataImpl.java | 203 -
.../sdo/util/metadata/impl/XSDMetaDataImpl.java | 203 -
.../resource/ChangeSummaryStreamDeserializer.java | 663 --
.../resource/ChangeSummaryStreamSerializer.java | 690 --
.../util/resource/DataObjectXMLStreamReader.java | 1579 ----
.../resource/RecordedEventXMLStreamReader.java | 868 ---
.../tuscany/sdo/util/resource/SDODeserializer.java | 340 -
.../sdo/util/resource/SDOURIConverterImpl.java | 60 -
.../util/resource/SDOXMLResourceFactoryImpl.java | 47 -
.../sdo/util/resource/SDOXMLResourceImpl.java | 1009 ---
.../sdo/util/resource/XMLDocumentStreamReader.java | 438 --
.../sdo/util/resource/XMLFragmentStreamReader.java | 44 -
.../sdo/util/resource/XMLStreamSerializer.java | 414 --
.../impl/src/main/resources/META-INF/DISCLAIMER | 7 -
.../impl/src/main/resources/META-INF/LICENSE.txt | 207 -
.../impl/src/main/resources/META-INF/MANIFEST.MF | 29 -
.../impl/src/main/resources/META-INF/NOTICE | 7 -
.../impl/src/main/resources/META-INF/README.txt | 23 -
.../services/commonj.sdo.impl.HelperProvider | 1 -
.../impl/src/main/resources/sdo-metadata.xsd | 45 -
.../impl/src/main/resources/xml/sdoInternal.xsd | 33 -
.../main/resources/xml/sdoModelChangeSummary.xsd | 28 -
.../ExpectedExceptionFactory.java | 70 -
.../ExpectedException/ExpectedExceptionType.java | 786 --
.../ExpectedException/SequenceReadOnlyType.java | 158 -
.../impl/ExpectedExceptionFactoryImpl.java | 579 --
.../impl/ExpectedExceptionTypeImpl.java | 1682 -----
.../impl/SequenceReadOnlyTypeImpl.java | 354 -
.../src/test/java/com/example/simple/Quote.java | 475 --
.../java/com/example/simple/SimpleFactory.java | 61 -
.../java/com/example/simple/impl/QuoteImpl.java | 1045 ---
.../com/example/simple/impl/SimpleFactoryImpl.java | 330 -
.../test/Containment/ContainmentFactory.java | 61 -
.../example/test/Containment/ContainmentTest.java | 177 -
.../Containment/impl/ContainmentFactoryImpl.java | 270 -
.../test/Containment/impl/ContainmentTestImpl.java | 409 --
.../test/java/org/apache/tuscany/sdo/AllTests.java | 41 -
.../org/apache/tuscany/sdo/codegen/AllTests.java | 47 -
.../java/org/apache/tuscany/sdo/codegen/Bar1.java | 26 -
.../java/org/apache/tuscany/sdo/codegen/Bar2.java | 26 -
.../BytecodeInterfaceGeneratorTestCase.java | 167 -
.../java/org/apache/tuscany/sdo/codegen/Foo.java | 26 -
.../codegen/JavaInterfaceGeneratorTestCase.java | 129 -
.../apache/tuscany/sdo/codegen/MockProperty.java | 94 -
.../org/apache/tuscany/sdo/codegen/MockType.java | 104 -
.../java/org/apache/tuscany/sdo/test/AllTests.java | 87 -
.../org/apache/tuscany/sdo/test/AnyTypeTest.java | 112 -
.../apache/tuscany/sdo/test/BoundsTestCase.java | 79 -
.../test/ChangeSummaryOnDataObjectTestCase.java | 216 -
.../sdo/test/ChangeSummaryPropertyTestCase.java | 219 -
.../tuscany/sdo/test/ChangeSummaryTestCase.java | 92 -
.../tuscany/sdo/test/ContainmentCycleTestCase.java | 866 ---
.../tuscany/sdo/test/ContainmentTypeUtil.java | 86 -
.../tuscany/sdo/test/CrossScopeCopyTestCase.java | 474 --
.../apache/tuscany/sdo/test/DataGraphTestCase.java | 270 -
.../sdo/test/DataObjectGetListTestCase.java | 129 -
.../tuscany/sdo/test/DataTypeBaseTypeTestCase.java | 68 -
.../tuscany/sdo/test/DateConversionTestCase.java | 380 -
.../test/DefineOpenContentPropertyTestCase.java | 133 -
.../tuscany/sdo/test/DefineTypeTestCase.java | 704 --
.../sdo/test/DeserializationNoSchemaTestCase.java | 124 -
.../org/apache/tuscany/sdo/test/DotNameTest.java | 78 -
.../tuscany/sdo/test/DupElementTestCase.java | 99 -
.../sdo/test/DynamicTypesComparisonTestCase.java | 256 -
.../sdo/test/ExpectedExceptionsTestCase.java | 1878 -----
.../org/apache/tuscany/sdo/test/FormTestCase.java | 112 -
.../tuscany/sdo/test/HelperContextTestCase.java | 75 -
.../tuscany/sdo/test/ImplSpecificTestCase.java | 74 -
.../apache/tuscany/sdo/test/IsManyTestCase.java | 65 -
.../sdo/test/JavaSerializeDeserializeTestCase.java | 297 -
.../org/apache/tuscany/sdo/test/JiraTestCases.java | 184 -
.../test/MetadataInstancePropertiesTestCase.java | 243 -
.../apache/tuscany/sdo/test/MixedTypeTestCase.java | 89 -
.../sdo/test/NeverStaleChangeSummaryTestCase.java | 76 -
.../tuscany/sdo/test/NotificationTestCase.java | 186 -
.../apache/tuscany/sdo/test/OpenTypeTestCase.java | 139 -
.../tuscany/sdo/test/SchemaLocationTestCase.java | 48 -
.../apache/tuscany/sdo/test/SequenceTestCase.java | 100 -
.../tuscany/sdo/test/SerializeTypesTestCase.java | 190 -
.../tuscany/sdo/test/SimpleCopyTestCase.java | 71 -
.../tuscany/sdo/test/SimpleDynamicTestCase.java | 123 -
.../tuscany/sdo/test/SimpleEqualityTestCase.java | 91 -
.../sdo/test/SubstitutionValuesTestCase.java | 83 -
.../java/org/apache/tuscany/sdo/test/TestUtil.java | 285 -
.../tuscany/sdo/test/TypeConversionTestCase.java | 1007 ---
.../tuscany/sdo/test/TypeHelperTestCase.java | 45 -
.../tuscany/sdo/test/TypeRoundTripTestCase.java | 147 -
.../tuscany/sdo/test/XMLDocumentTestCase.java | 110 -
.../apache/tuscany/sdo/test/XMLHelperTestCase.java | 314 -
.../tuscany/sdo/test/XMLLoadOptionsTestCase.java | 192 -
.../tuscany/sdo/test/XMLSaveOptionsTestCase.java | 147 -
.../test/XMLStreamHelperPerformanceTestCase.java | 91 -
.../tuscany/sdo/test/XMLStreamHelperTestCase.java | 195 -
.../sdo/test/XMLUnknownPropertiesTestCase.java | 132 -
.../org/apache/tuscany/sdo/test/XPathTestCase.java | 125 -
.../apache/tuscany/sdo/test/XSDHelperTestCase.java | 224 -
.../apache/tuscany/sdo/test/XSDQNameTestCase.java | 123 -
.../tuscany/sdo/test/osgi/ClassLoaderTestCase.java | 192 -
.../apache/tuscany/sdo/test/osgi/OSGiTestCase.java | 354 -
.../tuscany/sdo/test/osgi/TestBundleActivator.java | 66 -
.../src/test/resources/SchemaLocationTestCase.xml | 33 -
.../src/test/resources/SequenceChangeSummary.xsd | 48 -
.../impl/src/test/resources/SubstitutionValues.xsd | 31 -
.../test/resources/TypePropertyMetadataInfo.xsd | 97 -
.../XMLDocumentNoNamespaceSchemaLocation.xsd | 31 -
.../test/resources/XMLDocumentSchemaLocation.xsd | 35 -
.../src/test/resources/XMLDocumentTestCase.xml | 32 -
.../impl/src/test/resources/XMLStreamHelper.xsd | 41 -
.../impl/src/test/resources/anytype.xsd | 36 -
.../impl/src/test/resources/api_test.xsd | 46 -
.../impl/src/test/resources/bank.xsd | 78 -
.../impl/src/test/resources/bounds.xsd | 45 -
.../impl/src/test/resources/company.xsd | 44 -
.../impl/src/test/resources/containmenttest.xsd | 31 -
.../impl/src/test/resources/customer1.xml | 8 -
.../impl/src/test/resources/customer2.xml | 8 -
.../impl/src/test/resources/datatype.xsd | 34 -
.../impl/src/test/resources/dotNames.xsd | 30 -
.../impl/src/test/resources/dupelement.xsd | 39 -
.../impl/src/test/resources/expectedExceptions.xsd | 67 -
.../impl/src/test/resources/foo-ext.xml | 27 -
.../impl/src/test/resources/foo-ext.xsd | 44 -
.../impl/src/test/resources/foo.xsd | 232 -
.../impl/src/test/resources/ipo.xsd | 136 -
.../impl/src/test/resources/mixed.xml | 9 -
.../impl/src/test/resources/mixed.xsd | 41 -
.../impl/src/test/resources/mixed2.xml | 12 -
.../impl/src/test/resources/mixedChangeSummary.xml | 11 -
.../test/resources/mixedChangeSummaryUndone.xml | 2 -
.../impl/src/test/resources/mixedopen.xml | 13 -
.../impl/src/test/resources/names.xsd | 33 -
.../impl/src/test/resources/open.xml | 8 -
.../impl/src/test/resources/open.xsd | 51 -
.../impl/src/test/resources/open1any.xsd | 44 -
.../impl/src/test/resources/open2.xml | 9 -
.../impl/src/test/resources/openChangeSummary.xml | 24 -
.../src/test/resources/openChangeSummaryUndone.xml | 17 -
.../src/test/resources/openContentProperty.xml | 12 -
.../impl/src/test/resources/osgi/sdo.impl.mf | 44 -
.../impl/src/test/resources/osgi/sdo.osgi.test.mf | 40 -
.../impl/src/test/resources/po.xsd | 80 -
.../impl/src/test/resources/prefix.xsd | 24 -
.../impl/src/test/resources/quote.xml | 14 -
.../impl/src/test/resources/quoteInSOAP.xml | 37 -
.../impl/src/test/resources/sdoModel.xsd | 28 -
.../impl/src/test/resources/sdoannotations.xsd | 60 -
.../impl/src/test/resources/sdotypes.xsd | 71 -
.../impl/src/test/resources/shallowquote.xml | 11 -
.../impl/src/test/resources/shallowquote1.xml | 29 -
.../impl/src/test/resources/simple.xsd | 41 -
.../impl/src/test/resources/simple2.xsd | 41 -
.../impl/src/test/resources/simple3.xsd | 34 -
.../src/test/resources/simpleWithChangeSummary.xml | 28 -
.../src/test/resources/simpleWithChangeSummary.xsd | 49 -
.../resources/simpleWithChangeSummaryUndone.xml | 19 -
.../src/test/resources/simplechangesummary.xml | 33 -
.../src/test/resources/substitutionValues1.xml | 23 -
.../src/test/resources/substitutionValues2.xml | 23 -
.../impl/src/test/resources/xpath.xml | 51 -
.../impl/src/test/resources/xpath.xsd | 75 -
.../impl/src/test/resources/xsdCorners.xsd | 34 -
branches/sdo-1.1.1-incubating/java5tools/pom.xml | 98 -
.../sdo/generate/Interface2JavaGenerator.java | 244 -
.../src/main/resources/META-INF/DISCLAIMER | 7 -
.../src/main/resources/META-INF/LICENSE.txt | 207 -
.../java5tools/src/main/resources/META-INF/NOTICE | 7 -
.../src/main/resources/META-INF/README.txt | 23 -
branches/sdo-1.1.1-incubating/lib/pom.xml | 99 -
.../java/org/apache/tuscany/sdo/api/Event.java | 63 -
.../org/apache/tuscany/sdo/api/EventListener.java | 33 -
.../java/org/apache/tuscany/sdo/api/SDOHelper.java | 452 --
.../java/org/apache/tuscany/sdo/api/SDOUtil.java | 445 --
.../apache/tuscany/sdo/api/XMLStreamHelper.java | 125 -
.../java/org/apache/tuscany/sdo/api/overview.html | 38 -
.../tuscany/sdo/lib/SDOObjectInputStream.java | 49 -
.../tuscany/sdo/lib/SDOObjectOutputStream.java | 49 -
.../tuscany/sdo/lib/UnknownPropertyList.java | 70 -
.../apache/tuscany/sdo/spi/HelperProviderBase.java | 246 -
.../org/apache/tuscany/sdo/spi/SDOHelperBase.java | 176 -
.../lib/src/main/resources/META-INF/DISCLAIMER | 7 -
.../lib/src/main/resources/META-INF/LICENSE.txt | 207 -
.../lib/src/main/resources/META-INF/MANIFEST.MF | 19 -
.../lib/src/main/resources/META-INF/NOTICE | 7 -
.../lib/src/main/resources/META-INF/README.txt | 23 -
branches/sdo-1.1.1-incubating/plugin/pom.xml | 106 -
.../apache/tuscany/sdo/plugin/GeneratorMojo.java | 322 -
.../tuscany/sdo/plugin/SchemaFileOption.java | 208 -
.../plugin/src/main/resources/META-INF/DISCLAIMER | 7 -
.../plugin/src/main/resources/META-INF/LICENSE.txt | 207 -
.../plugin/src/main/resources/META-INF/NOTICE | 7 -
.../plugin/src/main/resources/META-INF/README.txt | 23 -
branches/sdo-1.1.1-incubating/pom.xml | 219 -
branches/sdo-1.1.1-incubating/sample/pom.xml | 112 -
.../apache/tuscany/samples/sdo/ExecuteSamples.java | 100 -
.../org/apache/tuscany/samples/sdo/SampleBase.java | 192 -
.../samples/sdo/advanced/MedicalScenario.java | 424 --
.../MedicalScenarioWithChangeMonitoring.java | 449 --
.../sdo/advanced/ObtainingDataGraphFromXml.java | 201 -
.../samples/sdo/advanced/PrintDataGraph.java | 498 --
.../tuscany/samples/sdo/advanced/package.html | 31 -
.../basic/AccessDataObjectPropertiesByName.java | 99 -
.../sdo/basic/AccessingTheContentsOfASequence.java | 115 -
.../tuscany/samples/sdo/basic/CreateCompany.java | 151 -
.../samples/sdo/basic/CreatePurchaseOrder.java | 159 -
.../samples/sdo/basic/ReadPurchaseOrder.java | 147 -
.../apache/tuscany/samples/sdo/basic/package.html | 31 -
.../AccessDataObjectUsingValidXPath.java | 129 -
.../AccessingDataObjectsViaPropertyIndex.java | 164 -
.../sdo/intermediate/CreateCompanyTuscanyAPI.java | 114 -
.../CreateDataObjectFromXmlString.java | 133 -
.../intermediate/DynamicCustomerTypeSample.java | 193 -
.../SerializingDeserializingADataObject.java | 137 -
.../tuscany/samples/sdo/intermediate/package.html | 30 -
.../samples/sdo/internal/DocumentSamples.java | 218 -
.../samples/sdo/internal/SampleInfrastructure.java | 330 -
.../org/apache/tuscany/samples/sdo/overview.html | 127 -
.../org/apache/tuscany/samples/sdo/package.html | 33 -
.../tuscany/samples/sdo/sampleProgramContents.html | 243 -
.../sample/src/main/resources/META-INF/LICENSE.txt | 207 -
.../sample/src/main/resources/META-INF/NOTICE | 7 -
.../sample/src/main/resources/META-INF/README.txt | 23 -
.../sample/src/main/resources/MedicalTest.xsd | 57 -
.../sample/src/main/resources/MedicalTest_CS.xsd | 58 -
.../sample/src/main/resources/People.xsd | 70 -
.../sample/src/main/resources/company.xsd | 45 -
.../main/resources/companyCompleteDataGraph.xml | 69 -
.../sample/src/main/resources/companyDataGraph.xml | 31 -
.../main/resources/companyDataGraphGenerated.xml | 30 -
.../sample/src/main/resources/companyGenerated.xml | 27 -
.../src/main/resources/doc-files/cmdPrompt.GIF | Bin 9431 -> 0 bytes
.../sample/src/main/resources/letter.xml | 21 -
.../sample/src/main/resources/letter.xsd | 32 -
.../sample/src/main/resources/po.xml | 57 -
.../sample/src/main/resources/po.xsd | 81 -
branches/sdo-1.1.1-incubating/sdo-api/pom.xml | 156 -
.../src/main/java/commonj/sdo/ChangeSummary.java | 207 -
.../src/main/java/commonj/sdo/DataGraph.java | 76 -
.../src/main/java/commonj/sdo/DataObject.java | 1121 ---
.../src/main/java/commonj/sdo/Property.java | 115 -
.../src/main/java/commonj/sdo/Sequence.java | 140 -
.../sdo-api/src/main/java/commonj/sdo/Type.java | 166 -
.../main/java/commonj/sdo/helper/CopyHelper.java | 85 -
.../main/java/commonj/sdo/helper/DataFactory.java | 64 -
.../main/java/commonj/sdo/helper/DataHelper.java | 215 -
.../java/commonj/sdo/helper/EqualityHelper.java | 92 -
.../java/commonj/sdo/helper/HelperContext.java | 67 -
.../main/java/commonj/sdo/helper/TypeHelper.java | 96 -
.../main/java/commonj/sdo/helper/XMLDocument.java | 155 -
.../main/java/commonj/sdo/helper/XMLHelper.java | 201 -
.../main/java/commonj/sdo/helper/XSDHelper.java | 196 -
.../commonj/sdo/impl/ExternalizableDelegator.java | 90 -
.../main/java/commonj/sdo/impl/HelperProvider.java | 411 --
.../sdo/impl/NoHelperProviderException.java | 58 -
.../sdo-api/src/main/resources/META-INF/DISCLAIMER | 7 -
.../sdo-api/src/main/resources/META-INF/LICENSE | 277 -
.../sdo-api/src/main/resources/META-INF/NOTICE | 9 -
.../sdo-api/src/main/resources/META-INF/README.txt | 23 -
.../sdo-api/src/main/resources/xml/datagraph.xsd | 88 -
.../sdo-api/src/main/resources/xml/sdoJava.xml | 53 -
.../sdo-api/src/main/resources/xml/sdoJava.xsd | 88 -
.../sdo-api/src/main/resources/xml/sdoModel.xml | 92 -
.../sdo-api/src/main/resources/xml/sdoModel.xsd | 221 -
.../sdo-api/src/main/resources/xml/sdoXML.xml | 40 -
.../sdo-api/src/main/resources/xml/sdoXML.xsd | 56 -
.../commonj/sdo/impl/HelperProviderTestCase.java | 93 -
.../src/test/java/test/DefaultHelperProvider.java | 71 -
.../src/test/java/test/TCCL1HelperProvider.java | 71 -
.../services/commonj.sdo.impl.HelperProvider | 3 -
.../services/commonj.sdo.impl.HelperProvider | 1 -
branches/sdo-1.1.1-incubating/tools/pom.xml | 163 -
branches/sdo-1.1.1-incubating/tools/readme.htm | 44 -
.../apache/tuscany/sdo/generate/JavaGenerator.java | 739 --
.../tuscany/sdo/generate/XSD2JavaGenerator.java | 500 --
.../adapter/SDOGenClassGeneratorAdapter.java | 53 -
.../adapter/SDOGenModelGeneratorAdapter.java | 38 -
.../SDOGenModelGeneratorAdapterFactory.java | 63 -
.../adapter/SDOGenPackageGeneratorAdapter.java | 59 -
.../sdo/generate/templates/model/SDOClass.java | 4288 -----------
.../generate/templates/model/SDOFactoryClass.java | 1132 ---
.../tuscany/sdo/generate/util/SDOGenUtil.java | 326 -
.../eclipse/jdt/core/formatter/CodeFormatter.java | 27 -
.../tools/src/main/resources/META-INF/DISCLAIMER | 7 -
.../tools/src/main/resources/META-INF/LICENSE.txt | 207 -
.../tools/src/main/resources/META-INF/MANIFEST.MF | 21 -
.../tools/src/main/resources/META-INF/NOTICE | 7 -
.../tools/src/main/resources/META-INF/README.txt | 23 -
.../test/java/com/example/repchoice/RCType.java | 103 -
.../com/example/repchoice/RepchoiceFactory.java | 61 -
.../com/example/repchoice/impl/RCTypeImpl.java | 332 -
.../repchoice/impl/RepchoiceFactoryImpl.java | 269 -
.../java/com/example/sequences/MixedQuote.java | 491 --
.../example/sequences/MixedRepeatingChoice.java | 102 -
.../com/example/sequences/RepeatingChoice.java | 88 -
.../com/example/sequences/SequencesFactory.java | 97 -
.../test/java/com/example/sequences/TwoRCs.java | 184 -
.../java/com/example/sequences/TwoRCsMixed.java | 198 -
.../com/example/sequences/impl/MixedQuoteImpl.java | 766 --
.../sequences/impl/MixedRepeatingChoiceImpl.java | 335 -
.../sequences/impl/RepeatingChoiceImpl.java | 299 -
.../sequences/impl/SequencesFactoryImpl.java | 770 --
.../com/example/sequences/impl/TwoRCsImpl.java | 521 --
.../example/sequences/impl/TwoRCsMixedImpl.java | 499 --
.../java/org/apache/tuscany/sdo/test/AllTests.java | 48 -
.../sdo/test/GeneratedPackagesTestCase.java | 70 -
.../tools/src/test/resources/TUSCANY1050.xsd | 44 -
.../tools/src/test/resources/enum.xsd | 50 -
.../resources/mixedRepeatingChoiceTestResult.xml | 20 -
.../src/test/resources/mixedStaticTestResult.xml | 27 -
.../tools/src/test/resources/repeatingChoice.xsd | 33 -
.../test/resources/repeatingChoiceTestResult.xml | 25 -
.../tools/src/test/resources/sdoModel.xsd | 28 -
.../tools/src/test/resources/sequences.xsd | 100 -
.../twoRepeatingChoicesMixedTestResult.xml | 20 -
.../resources/twoRepeatingChoicesTestResult.xml | 28 -
.../tools/templates/Header.javajetinc | 6 -
.../tools/templates/models/SDOClass.javajet | 1968 -----
.../tools/templates/models/SDOFactoryClass.javajet | 645 --
.../tools/templates/models/generator.skeleton | 25 -
439 files changed, 109272 deletions(-)
delete mode 100644 branches/sdo-1.1.1-incubating/BUILDING
delete mode 100644 branches/sdo-1.1.1-incubating/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/LICENSE
delete mode 100644 branches/sdo-1.1.1-incubating/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/README
delete mode 100644 branches/sdo-1.1.1-incubating/RELEASE_NOTES
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/assembly/bin.xml
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/assembly/src.xml
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/INSTALL
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/LICENSE
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/README
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/README
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.bat
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.sh
delete mode 100644 branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/sampleProgramContents.html
delete mode 100644 branches/sdo-1.1.1-incubating/impl/model/SDO.ecore
delete mode 100644 branches/sdo-1.1.1-incubating/impl/model/SDO.genmodel
delete mode 100644 branches/sdo-1.1.1-incubating/impl/model/SDO.mdl
delete mode 100644 branches/sdo-1.1.1-incubating/impl/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/NoJavaImplementationException.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/BaseSDOExtendedMetaDataImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/BaseSDOXSDEcoreBuilder.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CopyHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CrossScopeCopyHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DefaultHelperContextImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/EqualityHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperContextImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperProviderImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOAnnotations.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOSimpleDateFormat.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SchemaBuilder.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeTable.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLDocumentImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/AttributeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummarySettingImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ClassImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataGraphImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DataTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EventImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ExtensibleDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ListenerBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SimpleAnyTypeDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/StoreDataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/XMLInfo.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/xml/impl/XMLInfoImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/osgi/SdoBundleActivator.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/BasicSequence.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataGraphResourceFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/StAX2SAXAdapter.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/StreamDeserializer.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/VirtualSequence.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamDeserializer.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/DataObjectXMLStreamReader.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/RecordedEventXMLStreamReader.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDODeserializer.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOURIConverterImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLDocumentStreamReader.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLFragmentStreamReader.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLStreamSerializer.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/MANIFEST.MF
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/META-INF/services/commonj.sdo.impl.HelperProvider
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/sdo-metadata.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/xml/sdoInternal.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/main/resources/xml/sdoModelChangeSummary.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/ExpectedExceptionType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/SequenceReadOnlyTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/Quote.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/SimpleFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/impl/QuoteImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/ContainmentFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/ContainmentTest.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentTestImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/AllTests.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/BoundsTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryOnDataObjectTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentCycleTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentTypeUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/CrossScopeCopyTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataGraphTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataObjectGetListTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DateConversionTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineOpenContentPropertyTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DeserializationNoSchemaTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DotNameTest.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DupElementTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DynamicTypesComparisonTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ExpectedExceptionsTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/FormTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/HelperContextTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ImplSpecificTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/IsManyTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JavaSerializeDeserializeTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JiraTestCases.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MetadataInstancePropertiesTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NeverStaleChangeSummaryTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NotificationTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SchemaLocationTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SequenceTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SerializeTypesTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValuesTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TypeConversionTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TypeHelperTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TypeRoundTripTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLDocumentTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLHelperTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLLoadOptionsTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLSaveOptionsTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperPerformanceTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLUnknownPropertiesTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDQNameTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/ClassLoaderTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/OSGiTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/TestBundleActivator.java
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/SchemaLocationTestCase.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/SequenceChangeSummary.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/SubstitutionValues.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/TypePropertyMetadataInfo.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentSchemaLocation.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentTestCase.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLStreamHelper.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/anytype.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/api_test.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/bank.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/bounds.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/company.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/containmenttest.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/customer1.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/customer2.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/datatype.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/dotNames.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/dupelement.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/expectedExceptions.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/foo.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/ipo.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed2.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummary.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummaryUndone.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedopen.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/names.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/open1any.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/open2.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummary.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummaryUndone.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/openContentProperty.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.impl.mf
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.osgi.test.mf
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/po.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/prefix.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/quote.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/quoteInSOAP.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoModel.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoannotations.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/sdotypes.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote1.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simple.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simple2.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simple3.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummaryUndone.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/simplechangesummary.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues1.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues2.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xml
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/impl/src/test/resources/xsdCorners.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/lib/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/Event.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/EventListener.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/XMLStreamHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/overview.html
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectInputStream.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectOutputStream.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/UnknownPropertyList.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/HelperProviderBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/SDOHelperBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/MANIFEST.MF
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleBase.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenarioWithChangeMonitoring.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/package.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessingTheContentsOfASequence.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/package.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessingDataObjectsViaPropertyIndex.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateCompanyTuscanyAPI.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/SerializingDeserializingADataObject.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/package.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/DocumentSamples.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/SampleInfrastructure.java
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/overview.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/package.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/sampleProgramContents.html
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest_CS.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/People.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/company.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/companyCompleteDataGraph.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraph.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraphGenerated.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/companyGenerated.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/doc-files/cmdPrompt.GIF
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/ChangeSummary.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataGraph.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataObject.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Property.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Sequence.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Type.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/CopyHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/EqualityHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/HelperContext.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/TypeHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLDocument.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XSDHelper.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/ExternalizableDelegator.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/HelperProvider.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/NoHelperProviderException.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/LICENSE
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/datagraph.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xml
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/test/java/commonj/sdo/impl/HelperProviderTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/DefaultHelperProvider.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/TCCL1HelperProvider.java
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/default/META-INF/services/commonj.sdo.impl.HelperProvider
delete mode 100644 branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/tccl1/META-INF/services/commonj.sdo.impl.HelperProvider
delete mode 100644 branches/sdo-1.1.1-incubating/tools/pom.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/readme.htm
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RepchoiceFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedQuote.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/java/org/apache/tuscany/sdo/test/GeneratedPackagesTestCase.java
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/TUSCANY1050.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/enum.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/mixedStaticTestResult.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoice.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/repeatingChoiceTestResult.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/sdoModel.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/sequences.xsd
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/src/test/resources/twoRepeatingChoicesTestResult.xml
delete mode 100644 branches/sdo-1.1.1-incubating/tools/templates/Header.javajetinc
delete mode 100644 branches/sdo-1.1.1-incubating/tools/templates/models/SDOClass.javajet
delete mode 100644 branches/sdo-1.1.1-incubating/tools/templates/models/SDOFactoryClass.javajet
delete mode 100644 branches/sdo-1.1.1-incubating/tools/templates/models/generator.skeleton
(limited to 'branches/sdo-1.1.1-incubating')
diff --git a/branches/sdo-1.1.1-incubating/BUILDING b/branches/sdo-1.1.1-incubating/BUILDING
deleted file mode 100644
index ff5e3a29f9..0000000000
--- a/branches/sdo-1.1.1-incubating/BUILDING
+++ /dev/null
@@ -1,34 +0,0 @@
-Building the SDO Release from a Source Distribution
-===================================================
-
-
-Note, these instructions are for building the SDO binary release from
-source, not for establishing a development environment. If you wish to
-participate in sdo development, follow the instructions at
-http://incubator.apache.org/tuscany/developing-sdo-java.html
-
-
-Initial Setup
--------------
-
-1) Install J2SE JDK 1.4.2 or above
-2) Install Maven: Download Maven 2.0.7 (download from http://maven.apache.org/download.html) Follow the maven instructions for
-configuring the JAVA_HOME environment variable, and ensuring that the "mvn" command is on your execution PATH.
-
-Building
---------
-
-1) If you have chosen to install a JDK at version 5 then all will be fine, but there is one value add component in the
- Tuscany SDO implementation which relies on new JDK 5.0 features. If you do not wish to use JDK 5 for the following
- build step, then you will need to do mvn -Pjava_1_4_maven, as this profile option excludes the JDK5 dependent features.
-2) In a command window/shell, change to the top level directory of the Tuscany SDO Java source distribution.
-3) Execute: mvn
- This will install the sdo implementation and tools jars in your local maven repository
-4) If you wish to rebuild the Tuscany SDO Java binary dstribution change directory to "distribution" and run mvn
- This will create archives of the binary and source distributions in the target subdirectory of the distribution directory
-
-Note: Depending on the load being experienced by remote Maven 2.0 repositories you may have to execute mvn several
- times until required dependencies are all located in your local maven repository. After you have completed a
- full successful build you can use "mvn -o" which builds without trying to access updated build dependencies (offline mode) and is much faster.
-
-
diff --git a/branches/sdo-1.1.1-incubating/DISCLAIMER b/branches/sdo-1.1.1-incubating/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-incubating/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.1.1-incubating/LICENSE b/branches/sdo-1.1.1-incubating/LICENSE
deleted file mode 100644
index e05521b589..0000000000
--- a/branches/sdo-1.1.1-incubating/LICENSE
+++ /dev/null
@@ -1,280 +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.
-
-===============================================================================================================
-
-Apache Tuscany SDO for Java Subcomponents
-=========================================:
-
-The Tuscany SDO for Java release 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.
-
-These files being ...
-commonj/sdo/ChangeSummary.java
-commonj/sdo/DataGraph.java
-commonj/sdo/DataObject.java
-commonj/sdo/helper/CopyHelper.java
-commonj/sdo/helper/DataFactory.java
-commonj/sdo/helper/DataHelper.java
-commonj/sdo/helper/EqualityHelper.java
-commonj/sdo/helper/HelperContext.java
-commonj/sdo/helper/TypeHelper.java
-commonj/sdo/helper/XMLDocument.java
-commonj/sdo/helper/XMLHelper.java
-commonj/sdo/helper/XSDHelper.java
-commonj/sdo/impl/ExternalizableDelegator.java
-commonj/sdo/Property.java
-commonj/sdo/Sequence.java
-commonj/sdo/Type.java
-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, Interface Definition files
-and XSD files.
-
-The Service Data Objects JavaDoc, Interface Definition files and XSD files
-are 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, make derivative works of and distribute
-the Service Data Objects JavaDoc, Interface Definition files and XSD files
-(the "Artifacts") in any medium without fee or royalty is hereby granted,
-provided that you include the following on ALL copies of the Artifacts,
-or portions thereof, that you make:
-
-1. A link or URL to the Artifacts 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 Artifacts.
-
-
-
-THE ARTIFACTS ARE PROVIDED "AS IS" AND THE AUTHORS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THE
-ARTIFACTS 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 ARTIFACTS.
-
-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.
-
-Revision level 1.11, last updated on 2007/12/21
-=================================================================================================================
diff --git a/branches/sdo-1.1.1-incubating/NOTICE b/branches/sdo-1.1.1-incubating/NOTICE
deleted file mode 100644
index 1201fc07f5..0000000000
--- a/branches/sdo-1.1.1-incubating/NOTICE
+++ /dev/null
@@ -1,9 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-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).
-
diff --git a/branches/sdo-1.1.1-incubating/README b/branches/sdo-1.1.1-incubating/README
deleted file mode 100644
index 7eed879ec2..0000000000
--- a/branches/sdo-1.1.1-incubating/README
+++ /dev/null
@@ -1,16 +0,0 @@
-Tuscany SDO for 1.1.1-incubating-SNAPSHOT Source Distribution Readme File
-
-See the LICENSE, DISCLAIMER and NOTICE files for legal information concerning this distribution.
-
-See the RELEASE_NOTES file for a summary of what's new with this release.
-
-See the BUILDING file for instructions on how to build Tuscany SDO Java from this source distribution.
-
-Documentation
-
-For general documentation about the Tuscany project and the SDO for Java, see the Tuscany website
-http://incubator.apache.org/tuscany
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/RELEASE_NOTES b/branches/sdo-1.1.1-incubating/RELEASE_NOTES
deleted file mode 100644
index 0e80cb23eb..0000000000
--- a/branches/sdo-1.1.1-incubating/RELEASE_NOTES
+++ /dev/null
@@ -1,21 +0,0 @@
-Apache Tuscany's SDO Java Release 1.1.1-incubating-SNAPSHOT
-
-Tuscany SDO provides an implementation of the SDO 2.1 specification which
-aims to simplify and unify the way in which applications handle data.
-
-This 1.1.1-incubating-SNAPSHOT release is a maintenance release over the
-previous 1.1 release. For previous revision history, take a look at
-http://svn.apache.org/repos/asf/incubator/tuscany/tags/java/sdo/1.1/RELEASE_NOTES
-
-Downloading
-===========
-
-Please visit http://incubator.apache.org/tuscany/sdo-java-releases.html
-
------------------------------------------
-Changes in this 1.1.1-incubating release:
------------------------------------------
-
-Bug Fix
- TUSCANY-2240 Creation of SDO object out of XML (read from an JMS message) is taking too long
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/pom.xml b/branches/sdo-1.1.1-incubating/distribution/pom.xml
deleted file mode 100644
index 953c0309f7..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/pom.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
- 4.0.0
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
- ../pom.xml
-
-
- tuscany-sdo-distribution
- Apache Tuscany SDO Distribution
- pom
-
-
- true
- ${pom.version}
- 1.0-incubating
-
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-lib
- ${pom.version}
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-impl
- ${pom.version}
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-tools
- ${pom.version}
-
-
- org.apache.tuscany.sdo
- sample-sdo
- ${pom.version}
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
-
- unpack-javadoc
- package
-
- unpack
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- javadoc
- ${pom.version}
- ${project.build.directory}/javadoc/sdo
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-lib
- javadoc
- ${pom.version}
- ${project.build.directory}/javadoc/tuscany-sdo
-
-
- org.apache.tuscany.sdo
- sample-sdo
- javadoc
- ${pom.version}
- ${project.build.directory}/javadoc/sdo-samples
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
-
-
- distribution-package
- package
-
- single
-
-
-
- src/main/assembly/bin.xml
- src/main/assembly/src.xml
-
- gnu
- apache-tuscany-sdo-${pom.version}
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/bin.xml b/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/bin.xml
deleted file mode 100644
index ed79d518a5..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
- false
-
- tar.gz
- zip
-
-
-
-
-
-
- src/main/release/bin
- tuscany-sdo-${sdo.version}
-
- INSTALL
- NOTICE
-
-
-
- src/main/release/bin/samples
- tuscany-sdo-${sdo.version}/docs/javadoc/sdo-samples
-
- sampleProgramContents.html
-
-
-
-
-
- target/javadoc
- tuscany-sdo-${sdo.version}/docs/javadoc
-
- **/*
-
-
-
-
-
-
-
- ../sample
- tuscany-sdo-${sdo.version}/samples
-
- src/**/*
-
-
- pom.xml
- */.classpath
- */.project
-
- target
-
-
-
-
-
-
- ../DISCLAIMER
- tuscany-sdo-${sdo.version}
- true
-
-
- ../RELEASE_NOTES
- tuscany-sdo-${sdo.version}
- true
-
-
- src/main/release/bin/README
- tuscany-sdo-${sdo.version}
- true
-
-
- src/main/release/bin/samples/runsamples.bat
- tuscany-sdo-${sdo.version}/samples
- true
-
-
- src/main/release/bin/samples/runsamples.sh
- tuscany-sdo-${sdo.version}/samples
- true
- 0755
-
-
- src/main/release/bin/samples/README
- tuscany-sdo-${sdo.version}/samples
- true
-
-
- src/main/release/bin/LICENSE
- tuscany-sdo-${sdo.version}
- true
-
-
-
-
-
- tuscany-sdo-${sdo.version}/lib
-
- org.apache.tuscany.sdo:tuscany-sdo-api-r2.1
- org.apache.tuscany.sdo:tuscany-sdo-lib
- org.apache.tuscany.sdo:tuscany-sdo-impl
- org.apache.tuscany.sdo:tuscany-sdo-tools
- org.apache.tuscany.sdo:sample-sdo
-
- 0644
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/src.xml b/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/src.xml
deleted file mode 100644
index c8f70fb194..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/assembly/src.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
- src
- false
-
- tar.gz
- zip
-
-
-
-
- ..
- tuscany-sdo-${tuscany.version}-src
-
- **/*
-
-
-
- **/target
- **/target/**/*
- **/build
- **/build/**/*
- **/.settings
- **/.classpath
- **/.project
- **/.wtpmodules
- **/surefire*
- **/cobertura.ser
- bin
- bin/*
- **/var/journal
- **/build.out*
- impl/.felix
- impl/.felix/**/*
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/INSTALL b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/INSTALL
deleted file mode 100644
index 7e704a9b15..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/INSTALL
+++ /dev/null
@@ -1,4 +0,0 @@
-Tuscany Java SDO Installation
-
-Unpack the binary archive into a location of your choice and add each of the jar files in the
-lib directory to your CLASSPATH variable.
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/LICENSE b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/LICENSE
deleted file mode 100644
index c562819d8b..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/LICENSE
+++ /dev/null
@@ -1,427 +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.
-
-===============================================================================================================
-
-Apache Tuscany SDO for Java Subcomponents
-=========================================:
-
-The Tuscany SDO for Java release 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. (tuscany-sdo-api-r2.1-${sdo.version}.jar)
-
-These files being ...
-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, Interface Definition files
-and XSD files.
-
-The Service Data Objects JavaDoc, Interface Definition files and XSD files
-are 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, make derivative works of and distribute
-the Service Data Objects JavaDoc, Interface Definition files and XSD files
-(the "Artifacts") in any medium without fee or royalty is hereby granted,
-provided that you include the following on ALL copies of the Artifacts,
-or portions thereof, that you make:
-
-1. A link or URL to the Artifacts 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 Artifacts.
-
-
-
-THE ARTIFACTS ARE PROVIDED "AS IS" AND THE AUTHORS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THE
-ARTIFACTS 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 ARTIFACTS.
-
-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.
-
-Revision level 1.11, last updated on 2007/12/21
-
-
-=================================================================================================================
-Note that the remaining files in the jar tuscany-sdo-api-r2.1-${sdo.version}.jar ....
-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
-
-are licensed by the Apache License Version 2.0, January 2004 as laid out above
-
-
-=================================================================================================================
-
-For the Eclipse EMF components
-(codegen-2.2.3.jar
-codegen-ecore-2.2.3.jar
-common-2.2.3.jar
-ecore-2.2.3.jar
-ecore-change-2.2.3.jar
-ecore-xmi-2.2.3.jar
-xsd-2.2.3.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.
-
-=======================================================================================================================
-
-For the StAX components (stax-api-1.0.1.jar and wstx-asl-3.2.1.jar)
-
-These components are covered by the Apache License Version 2.0, January 2004, as above.
-
-========================================================================================================================
-
-For the backport-util-concurrent-3.0.jar library
-
-Creative Commons Public Domain Dedication
-
-Copyright-Only Dedication (based on United States law) or Public Domain Certification
-
-The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below.
-
-A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain.
-
-Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work.
-
-Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived.
-
-=======================================================================================================================
-
-For the felix components (org.apache.felix.bundlerepository-1.0.0.jar, org.apache.felix.framework-1.0.1.jar, org.apache.felix.main-1.0.1.jar, org.apache.felix.shell-1.0.0.jar and org.apache.felix.shell.tui-1.0.0.jar)
-
-These components are covered by the Apache License Version 2.0, January 2004, as above.
-
-========================================================================================================================
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/NOTICE b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/NOTICE
deleted file mode 100644
index f5b24ee75b..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/NOTICE
+++ /dev/null
@@ -1,18 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product also includes software developed by the Eclipse Modeling Framework project
-(http://www.eclipse.org/emf/)
-
-This product also includes software developed by the Open Service Oriented Architecture organisation
-(http://osoa.org).
-
-This product also includes software developed by the Codehaus Opensource Software Community
-http://codehaus.org/
-
-This product also includes software developed by the Distributed Computing Laboratory, Emory University
-http://backport-jsr166.sourceforge.net/
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/README b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/README
deleted file mode 100644
index adf9ee9c2d..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/README
+++ /dev/null
@@ -1,23 +0,0 @@
-Tuscany SDO for ${sdo.version} Binary Distribution Readme File
-
-See the LICENSE, DISCLAIMER and NOTICE files for legal information concerning this distribution.
-
-See the RELEASE_NOTES file for a summary of what's new with this release.
-
-See the INSTALL file for instructions on how to use Tuscany SDO Java provided in this binary distribution.
-
-See the docs/javadoc/sdo-samples/index.html file for instructions on how to run the sample programs.
-
-Documentation
-
-For general documentation about the Tuscany project and the SDO for Java, see the Tuscany website
-http://incubator.apache.org/tuscany
-
-This distribution contains javadoc for the SDO 2.1 API, the Tuscany SDO extensions API, and the Tuscany SDO samples.
-
-Samples
-
-Sample source code is included with this binary distribution.
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/README b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/README
deleted file mode 100644
index a19704ccd2..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/README
+++ /dev/null
@@ -1,11 +0,0 @@
-Apache Tuscany SDO Java Sample Programs
-
-Documentation for these samples may be found in the docs/javadoc/sdo-samples directory
-of this distribution.
-
-The runsamples.sh and runsamples.bat scripts in their unedited form
-provide a way to run all of the samples sequentially. If you run these scripts
-from within the directory they are found in, they will run correctly.
-If you run them from elsewhere you will need to edit the scripts and set the
-BINARY_BASE variable to the path in your filesystem where you unpacked the
-SDO distribution.
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.bat b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.bat
deleted file mode 100644
index cb7ff2b7f6..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.bat
+++ /dev/null
@@ -1,26 +0,0 @@
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements. See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership. The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied. See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-@echo off
-set BINARY_BASE=..
-set RELEASE=1.1.1-incubating-SNAPSHOT
-echo SDO Sample Programs. Running with BINARY_BASE set to %BINARY_BASE%
-echo If this script fails with ClassDefNotFound errors you probably need to
-echo edit the BINARY_BASE variable in the script to point to the location
-echo where you unpacked the Tuscany SDO binary distribution
-set LIB=%BINARY_BASE%\lib
-set CLASSPATH=%LIB%\sample-sdo-%RELEASE%.jar;%LIB%\tuscany-sdo-api-r2.1-%RELEASE%.jar;%LIB%\tuscany-sdo-lib-%RELEASE%.jar;%LIB%\tuscany-sdo-impl-%RELEASE%.jar;%LIB%\tuscany-sdo-tools-%RELEASE%.jar;%LIB%\codegen-ecore-2.2.3.jar;%LIB%\codegen-2.2.3.jar;%LIB%\ecore-2.2.3.jar;%LIB%\ecore-change-2.2.3.jar;%LIB%\ecore-xmi-2.2.3.jar;%LIB%\common-2.2.3.jar;%LIB%\xsd-2.2.3.jar;%LIB%\stax-api-1.0.1.jar;%LIB%\wstx-asl-3.2.1.jar
-java org.apache.tuscany.samples.sdo.ExecuteSamples
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.sh b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.sh
deleted file mode 100644
index 15e2e376a0..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/runsamples.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# 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.
-echo SDO Sample Programs. Running with BINARY_BASE set to $BINARY_BASE
-echo If this script fails with ClassDefNotFound errors you probably need to
-echo edit the BINARY_BASE variable in the script to point to the location
-echo where you unpacked the Tuscany SDO binary distribution
-export BINARY_BASE=..
-export RELEASE=1.1.1-incubating-SNAPSHOT
-export LIB=$BINARY_BASE/lib
-export CLASSPATH=$LIB/sample-sdo-$RELEASE.jar:$LIB/tuscany-sdo-api-r2.1-$RELEASE.jar:$LIB/tuscany-sdo-lib-$RELEASE.jar:$LIB/tuscany-sdo-impl-$RELEASE.jar:$LIB/tuscany-sdo-tools-$RELEASE.jar:$LIB/codegen-ecore-2.2.3.jar:$LIB/codegen-2.2.3.jar:$LIB/ecore-2.2.3.jar:$LIB/ecore-change-2.2.3.jar:$LIB/ecore-xmi-2.2.3.jar:$LIB/common-2.2.3.jar:$LIB/xsd-2.2.3.jar:$LIB/stax-api-1.0.1.jar:$LIB/wstx-asl-3.2.1.jar
-echo $CLASSPATH
-java org.apache.tuscany.samples.sdo.ExecuteSamples
diff --git a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/sampleProgramContents.html b/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/sampleProgramContents.html
deleted file mode 100644
index 01edf84c69..0000000000
--- a/branches/sdo-1.1.1-incubating/distribution/src/main/release/bin/samples/sampleProgramContents.html
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-SDO Samples
-
SDO Samples
-
-The samples provided in the Tuscany SDO distribution cover many areas of
-the SDO API. Here we provide two indexes into the samples. The first lists
-each sample in sequence and details the central theme(s) of the sample.
-It also mentions if the sample significantly demonstrates other areas in passing.
-The second index lists all the themes that are covered by these samples, and
-indicates which of the samples has that subject area as a central theme or as
-demonstrates the subject area significant as an incidental part of the sample.
-Samples which demonstrate this as their core function
-AccessDataObjectPropertiesByName
-Samples which demonstrate this in addition to their core function
-ReadPurchaseOrder
-
-
Set Properties of DataObject by name
-Samples which demonstrate this as their core function
-CreateCompany
-CreateCompanyTuscanyAPI
-Samples which demonstrate this in addition to their core function
-DynamicCustomerTypeSample
-
-
Create DataObjects by name
-Samples which demonstrate this in addition to their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Get/Set Properties of DataObject by index
-Samples which demonstrate this as their core function
-AccessingDataObjectsViaPropertyIndex
-
-
Get/Set Properties by Instance Properties
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Get/Set Properties of DataObject by Xpath
-Samples which demonstrate this as their core function
-AccessDataObjectUsingValidXPath
-
-
isMany Properties
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Containment
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Create Types using the SDO API
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-DynamicCustomerTypeSample
-MedicalScenario
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Create Types using XML Schema
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Create Types using the Tuscany API
-
-
Using Built-in Types
-Samples which demonstrate this as their core function
-CreateDataObjectFromXmlString
-Samples which demonstrate this in addition to their core function
-DynamicCustomerTypeSample
-ObtainingDataGraphFromXml
-
-
Accessing values in a Sequence
-Samples which demonstrate this as their core function
-AccessingTheContentsOfASequence
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Generic data graph traversal
-Samples which demonstrate this as their core function
-PrintDataGraph
-Samples which demonstrate this in addition to their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Loading data from XML
-Samples which demonstrate this as their core function
-CreateDataObjectFromXmlString
-ReadPurchaseOrder
-CreatePurchaseOrder
-
-
Saving data to XML
-Samples which demonstrate this as their core function
-ReadPurchaseOrder
-CreatePurchaseOrder
-Samples which demonstrate this in addition to their core function
-MedicalScenarioWithChangeMonitoring
-DynamicCustomerTypeSample
-MedicalScenario
-
-
Change Monitoring using a DataGraph
-
-
Change Monitoring using a ChangeSummary Property on a DataObject
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-
-
Wrapping data graph in a DataGraph instance
-Samples which demonstrate this as their core function
-ObtainingDataGraphFromXml
-
-
Open Content
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-
-
Non-Containment
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-MedicalScenario
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Create XML Schema from Types
-
-
Java Serialization of data graph
-Samples which demonstrate this as their core function
-SerializingDeserializingADataObject
-
-
Testing for Graph Equality
-Samples which demonstrate this in addition to their core function
-SerializingDeserializingADataObject
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/model/SDO.ecore b/branches/sdo-1.1.1-incubating/impl/model/SDO.ecore
deleted file mode 100644
index 0dff575474..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/model/SDO.ecore
+++ /dev/null
@@ -1,982 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/model/SDO.genmodel b/branches/sdo-1.1.1-incubating/impl/model/SDO.genmodel
deleted file mode 100644
index 2005e8f042..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/model/SDO.genmodel
+++ /dev/null
@@ -1,583 +0,0 @@
-
-
-
- SDO.mdl
- VABASE_PLUGINS_PATH
- ../..
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/model/SDO.mdl b/branches/sdo-1.1.1-incubating/impl/model/SDO.mdl
deleted file mode 100644
index 2288766bab..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/model/SDO.mdl
+++ /dev/null
@@ -1,7670 +0,0 @@
-
-(object Petal
- version 42
- _written "Rose 4.5.8163.3"
- charSet 0)
-
-(object Design "Logical View"
- is_unit TRUE
- is_loaded TRUE
- defaults (object defaults
- rightMargin 0.250000
- leftMargin 0.250000
- topMargin 0.250000
- bottomMargin 0.500000
- pageOverlap 0.250000
- clipIconLabels TRUE
- autoResize FALSE
- snapToGrid TRUE
- gridX 16
- gridY 16
- defaultFont (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- showMessageNum 1
- showClassOfObject TRUE
- notation "Unified")
- root_usecase_package (object Class_Category "Use Case View"
- quid "3FAA8E8700BE"
- exportControl "Public"
- global TRUE
- logical_models (list unit_reference_list)
- logical_presentations (list unit_reference_list
- (object UseCaseDiagram "Main"
- quid "3FAA8E8700EF"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- root_category (object Class_Category "Logical View"
- quid "3FAA8E8700BD"
- exportControl "Public"
- global TRUE
- subsystem "Component View"
- quidu "3FAA8E8700BF"
- logical_models (list unit_reference_list
- (object Class_Category "sdo"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "nsPrefix"
- value "sdo")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "http://www.apache.org/tuscany/2005/SDO")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "org.apache.tuscany")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "SDO"))
- quid "3FAA8E8B0306"
- exportControl "Public"
- logical_models (list unit_reference_list
- (object Class "ChangeSummary"
- quid "3FAB7C360208"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "4361480602D8"
- supplier "Logical View::change::ChangeDescription"
- quidu "4FAB6F110198"))
- operations (list Operations
- (object Operation "beginLogging"
- quid "3FAB8899003B"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "endLogging"
- quid "3FAB88AB0145"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isCreated"
- quid "3FAB89650125"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isDeleted"
- quid "3FAB896F0314"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOldValues"
- quid "3FAB89A4039C"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isModified"
- quid "435500FB024C"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOldValue"
- quid "435501180185"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject")
- (object Parameter "property"
- type "Property"))
- result "ChangeSummarySetting"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOldContainer"
- quid "43550265035B"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "DataObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOldContainmentProperty"
- quid "4355027F01D2"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "Property"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOldSequence"
- quid "4355029E03A3"
- parameters (list Parameters
- (object Parameter "dataObject"
- type "DataObject"))
- result "Sequence"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "undoChanges"
- quid "435502B303D5"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isLogging"
- quid "435D2CB50354"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getDataGraph"
- quid "435D2CC200A0"
- result "DataGraph"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getChangedDataObjects"
- quid "435D2D2B001F"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getRootObject"
- quid "435D2D360151"
- result "DataObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.ChangeSummary"
- quid "3FAB7C4D0373"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "ChangeSummarySetting"
- quid "3FAB8BF8005A"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "436134F001A6"
- supplier "Logical View::change::FeatureChange"
- quidu "4FC39D6D0177"))
- operations (list Operations
- (object Operation "isSet"
- quid "3FD14B5800BD"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getValue"
- quid "3FDEF80600EA"
- result "EJavaObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getProperty"
- quid "435D2C440045"
- result "Property"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.ChangeSummary$Setting"
- quid "3FAB8C05003A"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "DataGraph"
- quid "3FAB7BFE03C0"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43612C7B0243"
- supplier "Logical View::ecore::EObject"
- quidu "3C4F1C860123"))
- operations (list Operations
- (object Operation "createRootObject"
- quid "3FAB86D40102"
- parameters (list Parameters
- (object Parameter "namespaceURI"
- type "String")
- (object Parameter "typeName"
- type "String"))
- result "DataObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "createRootObject"
- quid "3FAB87520135"
- parameters (list Parameters
- (object Parameter "type"
- type "Type"))
- result "DataObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getType"
- quid "3FAB87E20024"
- parameters (list Parameters
- (object Parameter "namespaceURI"
- type "String")
- (object Parameter "typeName"
- type "String"))
- result "Type"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getRootObject"
- quid "435D2C900120"
- result "DataObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getChangeSummary"
- quid "435D2C9B039D"
- result "ChangeSummary"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.DataGraph"
- quid "3FAB7C1A0171"
- stereotype "javaclass"
- exportControl "Public")
- (object ClassAttribute "resourceSet"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE))
- quid "436129AF0208"
- type "EResourceSet"
- exportControl "Public")
- (object ClassAttribute "rootResource"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value FALSE))
- quid "436129BF0016"
- type "EResource"
- exportControl "Public"
- derived TRUE)))
- (object Class "DataObject"
- quid "3FAB6F7501C4"
- operations (list Operations
- (object Operation "get"
- quid "3FAB8EF201A0"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EJavaObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.get(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "set"
- quid "3FAB8FE502FE"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.set(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "isSet"
- quid "3FAB901001BF"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "unset"
- quid "3FAB901803B6"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.unset(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "get"
- quid "01EDEDEDEDED"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EJavaObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.get(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "set"
- quid "02EDEDEDEDED"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.set(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "isSet"
- quid "03EDEDEDEDED"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "unset"
- quid "04EDEDEDEDED"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.unset(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "get"
- quid "01ADEDEDEDED"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EJavaObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.get(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "set"
- quid "02ADEDEDEDED"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.set(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "isSet"
- quid "03ADEDEDEDED"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "unset"
- quid "04ADEDEDEDED"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.unset(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getContainer"
- quid "AAEDEDEDEDE0"
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getContainer(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getContainmentProperty"
- quid "AAEDEDEDEDE2"
- result "Property"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getContainmentProperty(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDataGraph"
- quid "AAEDEDEDEDE3"
- result "DataGraph"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDataGraph(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getType"
- quid "AAEDEDEDEDE1"
- result "Type"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getType(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigDecimal"
- quid "EDEDEDED0000"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EBigDecimal"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigInteger"
- quid "EDEDEDED0001"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EBigInteger"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBoolean"
- quid "EDEDEDED0002"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getByte"
- quid "EDEDEDED0003"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "byte"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBytes"
- quid "EDEDEDED0004"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EByteArray"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getChar"
- quid "EDEDEDED0005"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "char"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDataObject"
- quid "EDEDEDED0006"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDate"
- quid "EDEDEDED0007"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EDate"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDouble"
- quid "EDEDEDED0008"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "double"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getFloat"
- quid "EDEDEDED0009"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "float"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getInt"
- quid "EDEDEDED000A"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "int"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getList"
- quid "EDEDEDED000B"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "EJavaList"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getList(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getLong"
- quid "EDEDEDED000C"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "long"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getSequence"
- quid "EDEDEDED000D"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "Sequence"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getShort"
- quid "EDEDEDED000E"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "short"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "getString"
- quid "EDEDEDED000F"
- parameters (list Parameters
- (object Parameter "path"
- type "String"))
- result "String"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getString(this, path);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigDecimal"
- quid "EDEDEDED1000"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EBigDecimal"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigInteger"
- quid "EDEDEDED1001"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EBigInteger"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBoolean"
- quid "EDEDEDED1002"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "boolean"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setByte"
- quid "EDEDEDED1003"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "byte"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setByte(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBytes"
- quid "EDEDEDED1004"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EByteArray"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setChar"
- quid "EDEDEDED1005"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "char"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setChar(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDataObject"
- quid "EDEDEDED1006"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "DataObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDate"
- quid "EDEDEDED1007"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EDate"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDate(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDouble"
- quid "EDEDEDED1008"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "double"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setFloat"
- quid "EDEDEDED1009"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "float"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setInt"
- quid "EDEDEDED100A"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "int"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setInt(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setList"
- quid "EDEDEDED100B"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "EJavaList"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setList(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setLong"
- quid "EDEDEDED100C"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "long"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setLong(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setShort"
- quid "EDEDEDED100E"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "short"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setShort(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setString"
- quid "EDEDEDED100F"
- parameters (list Parameters
- (object Parameter "path"
- type "String")
- (object Parameter "value"
- type "String"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setString(this, path, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigDecimal"
- quid "EDEDEDED2000"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EBigDecimal"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigInteger"
- quid "EDEDEDED2001"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EBigInteger"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBoolean"
- quid "EDEDEDED2002"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getByte"
- quid "EDEDEDED2003"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "byte"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBytes"
- quid "EDEDEDED2004"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EByteArray"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getChar"
- quid "EDEDEDED2005"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "char"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDataObject"
- quid "EDEDEDED2006"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDate"
- quid "EDEDEDED2007"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EDate"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDouble"
- quid "EDEDEDED2008"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "double"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getFloat"
- quid "EDEDEDED2009"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "float"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getInt"
- quid "EDEDEDED200A"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "int"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getList"
- quid "EDEDEDED200B"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "EJavaList"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getList(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getLong"
- quid "EDEDEDED200C"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "long"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getSequence"
- quid "EDEDEDED200D"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "Sequence"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getShort"
- quid "EDEDEDED200E"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "short"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "getString"
- quid "EDEDEDED200F"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "String"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getString(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigDecimal"
- quid "EDEDEDED3000"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EBigDecimal"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigInteger"
- quid "EDEDEDED3001"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EBigInteger"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBoolean"
- quid "EDEDEDED3002"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "boolean"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setByte"
- quid "EDEDEDED3003"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "byte"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setByte(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBytes"
- quid "EDEDEDED3004"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EByteArray"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setChar"
- quid "EDEDEDED3005"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "char"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setChar(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDataObject"
- quid "EDEDEDED3006"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "DataObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDate"
- quid "EDEDEDED3007"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EDate"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDate(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDouble"
- quid "EDEDEDED3008"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "double"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setFloat"
- quid "EDEDEDED3009"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "float"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setInt"
- quid "EDEDEDED300A"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "int"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setInt(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setList"
- quid "EDEDEDED300B"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EJavaList"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setList(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setLong"
- quid "EDEDEDED300C"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "long"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setLong(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setShort"
- quid "EDEDEDED300E"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "short"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setShort(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setString"
- quid "EDEDEDED300F"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "String"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setString(this, propertyIndex, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigDecimal"
- quid "EDEDEEEE2000"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EBigDecimal"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBigInteger"
- quid "EDEDEEEE2001"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EBigInteger"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBoolean"
- quid "EDEDEEEE2002"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "boolean"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getByte"
- quid "EDEDEEEE2003"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "byte"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getBytes"
- quid "EDEDEEEE2004"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EByteArray"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getChar"
- quid "EDEDEEEE2005"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "char"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDataObject"
- quid "EDEDEEEE2006"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDate"
- quid "EDEDEEEE2007"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EDate"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getDouble"
- quid "EDEDEEEE2008"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "double"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getFloat"
- quid "EDEDEEEE2009"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "float"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getInt"
- quid "EDEDEEEE200A"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "int"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getList"
- quid "EDEDEEEE200B"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "EJavaList"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getList(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getLong"
- quid "EDEDEEEE200C"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "long"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getSequence"
- quid "EDEDEEEE200D"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "Sequence"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getShort"
- quid "EDEDEEEE200E"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "short"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "getString"
- quid "EDEDEEEE200F"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "String"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getString(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigDecimal"
- quid "EDEDEEEE3000"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EBigDecimal"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBigInteger"
- quid "EDEDEEEE3001"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EBigInteger"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBoolean"
- quid "EDEDEEEE3002"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "boolean"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setByte"
- quid "EDEDEEEE3003"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "byte"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setByte(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setBytes"
- quid "EDEDEEEE3004"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EByteArray"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setChar"
- quid "EDEDEEEE3005"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "char"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setChar(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDataObject"
- quid "EDEDEEEE3006"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "DataObject"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDate"
- quid "EDEDEEEE3007"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EDate"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDate(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setDouble"
- quid "EDEDEEEE3008"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "double"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setFloat"
- quid "EDEDEEEE3009"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "float"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setInt"
- quid "EDEDEEEE300A"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "int"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setInt(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setList"
- quid "EDEDEEEE300B"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EJavaList"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setList(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setLong"
- quid "EDEDEEEE300C"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "long"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setLong(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setShort"
- quid "EDEDEEEE300E"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "short"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setShort(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "setString"
- quid "EDEDEEEE300F"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "String"))
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.setString(this, property, value);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE0"
- parameters (list Parameters
- (object Parameter "propertyName"
- type "String"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyName);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE1"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyIndex);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE2"
- parameters (list Parameters
- (object Parameter "property"
- type "Property"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, property);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE3"
- parameters (list Parameters
- (object Parameter "propertyName"
- type "String")
- (object Parameter "namespaceURI"
- type "String")
- (object Parameter "typeName"
- type "String"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyName, namespaceURI, typeName);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE4"
- parameters (list Parameters
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "namespaceURI"
- type "String")
- (object Parameter "typeName"
- type "String"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyIndex, namespaceURI, typeName);")
- opExportControl "Public"
- uid 0)
- (object Operation "createDataObject"
- quid "EDEDEEEEEEE5"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "type"
- type "Type"))
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, property, type);")
- opExportControl "Public"
- uid 0)
- (object Operation "delete"
- quid "EDEDEEEEEEE6"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.delete(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getSequence"
- quid "4354FB2702D3"
- result "Sequence"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getInstanceProperties"
- quid "4354FB9F00CC"
- result "EJavaList"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getInstanceProperties(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getProperty"
- quid "4354FBB20369"
- parameters (list Parameters
- (object Parameter "propertyName"
- type "String"))
- result "Property"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getProperty(this, propertyName);")
- opExportControl "Public"
- uid 0)
- (object Operation "getRootObject"
- quid "4354FBDD01B2"
- result "DataObject"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getRootObject(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "getChangeSummary"
- quid "4354FC0400F0"
- result "ChangeSummary"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "return <%org.apache.sdo.util.SDOUtil%>.getChangeSummary(this);")
- opExportControl "Public"
- uid 0)
- (object Operation "detach"
- quid "4354FC150068"
- concurrency "Sequential"
- semantics (object Semantic_Info
- PDL "<%org.apache.sdo.util.SDOUtil%>.detach(this);")
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.DataObject"
- quid "3FAB6F8B0284"
- stereotype "javaclass"
- exportControl "Public"))
- abstract TRUE)
- (object Class "Property"
- quid "3FAB7CA1031A"
- stereotype "Interface"
- operations (list Operations
- (object Operation "getName"
- quid "4357B5A1009C"
- result "String"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getType"
- quid "4358FF1A0291"
- result "Type"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isMany"
- quid "4357B64B019A"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isContainment"
- quid "4357B76501FA"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isReadOnly"
- quid "4358FF3501DC"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getContainingType"
- quid "4358FF3C03D1"
- result "Type"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getAliasNames"
- quid "4358FF4D02EF"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getOpposite"
- quid "4358FF59013D"
- result "Property"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getDefault"
- quid "4358FF66029B"
- result "EJavaObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Property"
- quid "3FAB7CAB00E4"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "Sequence"
- quid "3FAB7CC302B5"
- stereotype "Interface"
- operations (list Operations
- (object Operation "size"
- quid "3FD1F958017D"
- result "int"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getProperty"
- quid "3FAC32F4028D"
- parameters (list Parameters
- (object Parameter "index"
- type "int"))
- result "Property"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getValue"
- quid "3FAC3318010E"
- parameters (list Parameters
- (object Parameter "index"
- type "int"))
- result "EJavaObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "setValue"
- quid "3FAC33270259"
- parameters (list Parameters
- (object Parameter "index"
- type "int")
- (object Parameter "value"
- type "EJavaObject"))
- result "EJavaObject"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC333D017C"
- parameters (list Parameters
- (object Parameter "propertyName"
- type "String")
- (object Parameter "value"
- type "EJavaObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC3371009F"
- parameters (list Parameters
- (object Parameter "propertIndex"
- type "int")
- (object Parameter "value"
- type "EJavaObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC338C00CE"
- parameters (list Parameters
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EJavaObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC33AD02C6"
- parameters (list Parameters
- (object Parameter "index"
- type "int")
- (object Parameter "propertyName"
- type "String")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC33C40263"
- parameters (list Parameters
- (object Parameter "index"
- type "int")
- (object Parameter "propertyIndex"
- type "int")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "3FAC33C70375"
- parameters (list Parameters
- (object Parameter "index"
- type "int")
- (object Parameter "property"
- type "Property")
- (object Parameter "value"
- type "EJavaObject"))
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "43550F7D01DE"
- parameters (list Parameters
- (object Parameter "text"
- type "String"))
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "add"
- quid "43550F930352"
- parameters (list Parameters
- (object Parameter "index"
- type "int")
- (object Parameter "text"
- type "String"))
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Sequence"
- quid "3FAB7CEB00D2"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "Type"
- quid "3FAB7C7C0349"
- stereotype "Interface"
- operations (list Operations
- (object Operation "getName"
- quid "4357B56E012E"
- result "String"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getURI"
- quid "4358FE18013C"
- result "String"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getInstanceClass"
- quid "4357B6380265"
- result "EJavaClass"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isInstance"
- quid "3FAB82AD0027"
- parameters (list Parameters
- (object Parameter "object"
- type "EJavaObject"))
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isDataType"
- quid "4358FE26031D"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isSequenced"
- quid "4358FE33020D"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isOpen"
- quid "4358FE4000F3"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "isAbstract"
- quid "4357B7440365"
- result "boolean"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getBaseTypes"
- quid "4358FE4B0316"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getAliasNames"
- quid "4358FE740351"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getProperties"
- quid "4358FE8D0248"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getDeclaredProperties"
- quid "4358FE9C02A4"
- result "EJavaList"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0)
- (object Operation "getProperty"
- quid "3FAB831701D8"
- parameters (list Parameters
- (object Parameter "propertyName"
- type "String"))
- result "Property"
- concurrency "Sequential"
- opExportControl "Public"
- uid 0))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Type"
- quid "3FAB7C8B0015"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "EJavaList"
- quid "3FAB8A010237"
- stereotype "datatype"
- class_attributes (list class_attribute_list
- (object ClassAttribute "java.util.List"
- quid "3FAB8A0F01F1"
- stereotype "javaclass"
- exportControl "Public"))
- abstract TRUE)
- (object Class "EObjectStreamException"
- quid "3FC352DE038F"
- stereotype "datatype"
- class_attributes (list class_attribute_list
- (object ClassAttribute "java.io.ObjectStreamException"
- quid "3FC352F90171"
- stereotype "javaclass"
- exportControl "Public"))
- abstract TRUE)
- (object Class "AnyTypeDataObject"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "xmlContentKind"
- value ("ContentKind" 3)))
- quid "4069645E0146"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "406964870375"
- supplier "Logical View::type::AnyType"
- quidu "40695FE40332")
- (object Inheritance_Relationship
- quid "436141F003E7"
- stereotype "extend"
- supplier "Logical View::sdo::DataObject"
- quidu "3FAB6F7501C4")))
- (object Class "SimpleAnyTypeDataObject"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "xmlContentKind"
- value ("ContentKind" 2)))
- quid "406964710189"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "4069648302E3"
- stereotype "extend"
- supplier "Logical View::sdo::AnyTypeDataObject"
- quidu "4069645E0146")
- (object Inheritance_Relationship
- quid "4069648D02E8"
- supplier "Logical View::type::SimpleAnyType"
- quidu "406961210099")))
- (object Class "Class"
- quid "43559BB702E7"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43559D3A01A3"
- supplier "Logical View::ecore::EClass"
- quidu "3903D5BF000A")
- (object Inheritance_Relationship
- quid "435901C600DC"
- supplier "Logical View::sdo::Type"
- quidu "3FAB7C7C0349"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Type"
- quid "435900CF00F5"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "DataType"
- quid "43559BE502F7"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43590C6F016D"
- supplier "Logical View::sdo::Type"
- quidu "3FAB7C7C0349")
- (object Inheritance_Relationship
- quid "43590C73038F"
- supplier "Logical View::ecore::EDataType"
- quidu "3903D525033E"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Type"
- quid "4358FFE30331"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "Attribute"
- quid "43559E690004"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43559ED801E4"
- supplier "Logical View::ecore::EAttribute"
- quidu "39238472039D")
- (object Inheritance_Relationship
- quid "43567DFD03B6"
- supplier "Logical View::sdo::Property"
- quidu "3FAB7CA1031A"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Property"
- quid "4359014A0246"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "Reference"
- quid "43559E86025E"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43559EE0011D"
- supplier "Logical View::ecore::EReference"
- quidu "39238479039D")
- (object Inheritance_Relationship
- quid "43567DF9022A"
- supplier "Logical View::sdo::Property"
- quidu "3FAB7CA1031A"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Property"
- quid "4359018E0226"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "Enum"
- quid "4357B1010017"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "4357B1410218"
- supplier "Logical View::sdo::Type"
- quidu "3FAB7C7C0349")
- (object Inheritance_Relationship
- quid "4357B14701DA"
- supplier "Logical View::ecore::EEnum"
- quidu "39A473E901D4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.Type"
- quid "4359006102CE"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "DynamicDataObject"
- quid "435E94210124"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "435E9435008D"
- supplier "Logical View::sdo::DataObject"
- quidu "3FAB6F7501C4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.DataObject"
- quid "435E9459021F"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "StoreDataObject"
- quid "43621EBA03B4"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43621F0B03A6"
- supplier "Logical View::sdo::DataObject"
- quidu "3FAB6F7501C4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.DataObject"
- quid "43621EDF015E"
- stereotype "javaclass"
- exportControl "Public")))
- (object Class "DynamicStoreDataObject"
- quid "43621F4203CD"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "43621F920242"
- supplier "Logical View::sdo::StoreDataObject"
- quidu "43621EBA03B4"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "commonj.sdo.DataObject"
- quid "43621F5701ED"
- stereotype "javaclass"
- exportControl "Public")))
- (object Association "$UNNAMED$0"
- quid "3FAD10CA01D5"
- roles (list role_list
- (object Role "eDataGraph"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE))
- quid "3FAD10CC001F"
- label "eDataGraph"
- supplier "Logical View::sdo::DataGraph"
- quidu "3FAB7BFE03C0"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)
- (object Role "eChangeSummary"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value FALSE))
- quid "3FAD10CC0020"
- label "eChangeSummary"
- supplier "Logical View::sdo::ChangeSummary"
- quidu "3FAB7C360208"
- client_cardinality (value cardinality "1")
- Containment "By Value"
- is_navigable TRUE)))
- (object Association "$UNNAMED$1"
- quid "3FAD26E802F5"
- roles (list role_list
- (object Role "$UNNAMED$2"
- quid "3FAD26ED00E9"
- supplier "Logical View::sdo::DataGraph"
- quidu "3FAB7BFE03C0")
- (object Role "eRootObject"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value FALSE))
- quid "3FAD26ED00F3"
- label "eRootObject"
- supplier "Logical View::ecore::EObject"
- quidu "3C4F1C860123"
- client_cardinality (value cardinality "1")
- is_navigable TRUE)))
- (object Association "$UNNAMED$3"
- quid "406962A200CF"
- roles (list role_list
- (object Role "$UNNAMED$4"
- quid "406962A30076"
- supplier "Logical View::type::SimpleAnyType"
- quidu "406961210099")
- (object Role "instanceType"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value FALSE))
- quid "406962A30077"
- label "instanceType"
- supplier "Logical View::ecore::EDataType"
- quidu "3903D525033E"
- client_cardinality (value cardinality "1")
- is_navigable TRUE))))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "SDO Interfaces"
- quid "3FAB8BAA0329"
- title "SDO Interfaces"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 764
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::sdo::Sequence" @1
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (2560, 2032)
- label (object ItemLabel
- Parent_View @1
- location (1999, 1673)
- fill_color 13434879
- nlines 1
- max_width 1122
- justify 0
- label "Sequence")
- stereotype (object ItemLabel
- Parent_View @1
- location (1999, 1623)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 1122
- justify 0
- label "<>")
- icon "Interface"
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7CC302B5"
- compartment (object Compartment
- Parent_View @1
- location (1999, 1733)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 14
- max_width 1128)
- width 1140
- height 842
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DataGraph" @2
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (768, 304)
- label (object ItemLabel
- Parent_View @2
- location (65, 48)
- fill_color 13434879
- nlines 1
- max_width 1406
- justify 0
- label "DataGraph")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7BFE03C0"
- compartment (object Compartment
- Parent_View @2
- location (65, 108)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 9
- max_width 1412)
- width 1424
- height 536
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DataObject" @3
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- ShowOperationSignature TRUE
- location (976, 1280)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @3
- location (62, 674)
- fill_color 13434879
- nlines 1
- max_width 1828
- justify 0
- label "DataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB6F7501C4"
- compartment (object Compartment
- Parent_View @3
- location (62, 734)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 23
- max_width 1834
- compartmentItems (list Compartment
- "+ get(property : Property) : EJavaObject"
- "+ set(property : Property, value : EJavaObject)"
- "+ isSet(property : Property) : boolean"
- "+ unset(property : Property)"
- "+ getContainer() : DataObject"
- "+ getContainmentProperty() : Property"
- "+ getDataGraph() : DataGraph"
- "+ getType() : Type"
- "+ createDataObject(propertyName : String) : DataObject"
- "+ createDataObject(propertyIndex : int) : DataObject"
- "+ createDataObject(property : Property) : DataObject"
- "+ createDataObject(propertyName : String, namespaceURI : String, typeName : String) : DataObject"
- "+ createDataObject(propertyIndex : int, namespaceURI : String, typeName : String) : DataObject"
- "+ createDataObject(property : Property, type : Type) : DataObject"
- "+ delete()"
- "+ getSequence() : Sequence"
- "+ getInstanceProperties() : EJavaList"
- "+ getProperty(propertyName : String) : Property"
- "+ getRootObject() : DataObject"
- "+ getChangeSummary() : ChangeSummary"
- "+ detach()"))
- width 1846
- height 1236
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::ChangeSummary" @4
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (2768, 528)
- label (object ItemLabel
- Parent_View @4
- location (1979, 72)
- fill_color 13434879
- nlines 1
- max_width 1578
- justify 0
- label "ChangeSummary")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7C360208"
- compartment (object Compartment
- Parent_View @4
- location (1979, 132)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 17
- max_width 1575)
- width 1596
- height 936
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::Type" @5
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (512, 2448)
- label (object ItemLabel
- Parent_View @5
- location (75, 2064)
- fill_color 13434879
- nlines 1
- max_width 874
- justify 0
- label "Type")
- stereotype (object ItemLabel
- Parent_View @5
- location (75, 2014)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 874
- justify 0
- label "<>")
- icon "Interface"
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7C7C0349"
- compartment (object Compartment
- Parent_View @5
- location (75, 2124)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 15
- max_width 881)
- width 892
- height 892
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::Property" @6
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (1424, 2352)
- label (object ItemLabel
- Parent_View @6
- location (1054, 2068)
- fill_color 13434879
- nlines 1
- max_width 740
- justify 0
- label "Property")
- stereotype (object ItemLabel
- Parent_View @6
- location (1054, 2018)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 740
- justify 0
- label "<>")
- icon "Interface"
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7CA1031A"
- compartment (object Compartment
- Parent_View @6
- location (1054, 2128)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 11
- max_width 746)
- width 758
- height 692
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::ChangeSummarySetting" @7
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (2528, 1328)
- label (object ItemLabel
- Parent_View @7
- location (2003, 1144)
- fill_color 13434879
- nlines 1
- max_width 1050
- justify 0
- label "ChangeSummarySetting")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB8BF8005A"
- compartment (object Compartment
- Parent_View @7
- location (2003, 1204)
- icon_style "Icon"
- fill_color 16777215
- anchor 2
- nlines 5
- max_width 1056)
- width 1068
- height 392
- annotation 8
- autoResize TRUE)))
- (object ClassDiagram "SDO DataObject Access"
- quid "3FAC2D8D008D"
- title "SDO DataObject Access"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::sdo::DataObject" @8
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- ShowOperationSignature TRUE
- location (528, 1360)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @8
- location (53, 79)
- fill_color 13434879
- nlines 1
- max_width 950
- justify 0
- label "DataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 16316638
- quidu "3FAB6F7501C4"
- compartment (object Compartment
- Parent_View @8
- location (53, 139)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 50
- max_width 0
- compartmentItems (list Compartment
- "+ getBigDecimal(path : String) : EBigDecimal"
- "+ getBigInteger(path : String) : EBigInteger"
- "+ getBoolean(path : String) : boolean"
- "+ getByte(path : String) : byte"
- "+ getBytes(path : String) : EByteArray"
- "+ getChar(path : String) : char"
- "+ getDataObject(path : String) : DataObject"
- "+ getDate(path : String) : EDate"
- "+ getDouble(path : String) : double"
- "+ getFloat(path : String) : float"
- "+ getInt(path : String) : int"
- "+ getList(path : String) : EJavaList"
- "+ getLong(path : String) : long"
- "+ getSequence(path : String) : Sequence"
- "+ getShort(path : String) : short"
- "+ getString(path : String) : String"
- "+ getBigDecimal(propertyIndex : int) : EBigDecimal"
- "+ getBigInteger(propertyIndex : int) : EBigInteger"
- "+ getBoolean(propertyIndex : int) : boolean"
- "+ getByte(propertyIndex : int) : byte"
- "+ getBytes(propertyIndex : int) : EByteArray"
- "+ getChar(propertyIndex : int) : char"
- "+ getDataObject(propertyIndex : int) : DataObject"
- "+ getDate(propertyIndex : int) : EDate"
- "+ getDouble(propertyIndex : int) : double"
- "+ getFloat(propertyIndex : int) : float"
- "+ getInt(propertyIndex : int) : int"
- "+ getList(propertyIndex : int) : EJavaList"
- "+ getLong(propertyIndex : int) : long"
- "+ getSequence(propertyIndex : int) : Sequence"
- "+ getShort(propertyIndex : int) : short"
- "+ getString(propertyIndex : int) : String"
- "+ getBigDecimal(property : Property) : EBigDecimal"
- "+ getBigInteger(property : Property) : EBigInteger"
- "+ getBoolean(property : Property) : boolean"
- "+ getByte(property : Property) : byte"
- "+ getBytes(property : Property) : EByteArray"
- "+ getChar(property : Property) : char"
- "+ getDataObject(property : Property) : DataObject"
- "+ getDate(property : Property) : EDate"
- "+ getDouble(property : Property) : double"
- "+ getFloat(property : Property) : float"
- "+ getInt(property : Property) : int"
- "+ getList(property : Property) : EJavaList"
- "+ getLong(property : Property) : long"
- "+ getSequence(property : Property) : Sequence"
- "+ getShort(property : Property) : short"
- "+ getString(property : Property) : String"
- "<> + commonj.sdo.DataObject"))
- width 968
- height 2586
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DataObject" @9
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- ShowOperationSignature TRUE
- location (1664, 1280)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @9
- location (1131, 74)
- fill_color 13434879
- nlines 1
- max_width 1066
- justify 0
- label "DataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 16316638
- quidu "3FAB6F7501C4"
- compartment (object Compartment
- Parent_View @9
- location (1131, 134)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 47
- max_width 0
- compartmentItems (list Compartment
- "+ setBigDecimal(path : String, value : EBigDecimal)"
- "+ setBigInteger(path : String, value : EBigInteger)"
- "+ setBoolean(path : String, value : boolean)"
- "+ setByte(path : String, value : byte)"
- "+ setBytes(path : String, value : EByteArray)"
- "+ setChar(path : String, value : char)"
- "+ setDataObject(path : String, value : DataObject)"
- "+ setDate(path : String, value : EDate)"
- "+ setDouble(path : String, value : double)"
- "+ setFloat(path : String, value : float)"
- "+ setInt(path : String, value : int)"
- "+ setList(path : String, value : EJavaList)"
- "+ setLong(path : String, value : long)"
- "+ setShort(path : String, value : short)"
- "+ setString(path : String, value : String)"
- "+ setBigDecimal(propertyIndex : int, value : EBigDecimal)"
- "+ setBigInteger(propertyIndex : int, value : EBigInteger)"
- "+ setBoolean(propertyIndex : int, value : boolean)"
- "+ setByte(propertyIndex : int, value : byte)"
- "+ setBytes(propertyIndex : int, value : EByteArray)"
- "+ setChar(propertyIndex : int, value : char)"
- "+ setDataObject(propertyIndex : int, value : DataObject)"
- "+ setDate(propertyIndex : int, value : EDate)"
- "+ setDouble(propertyIndex : int, value : double)"
- "+ setFloat(propertyIndex : int, value : float)"
- "+ setInt(propertyIndex : int, value : int)"
- "+ setList(propertyIndex : int, value : EJavaList)"
- "+ setLong(propertyIndex : int, value : long)"
- "+ setShort(propertyIndex : int, value : short)"
- "+ setString(propertyIndex : int, value : String)"
- "+ setBigDecimal(property : Property, value : EBigDecimal)"
- "+ setBigInteger(property : Property, value : EBigInteger)"
- "+ setBoolean(property : Property, value : boolean)"
- "+ setByte(property : Property, value : byte)"
- "+ setBytes(property : Property, value : EByteArray)"
- "+ setChar(property : Property, value : char)"
- "+ setDataObject(property : Property, value : DataObject)"
- "+ setDate(property : Property, value : EDate)"
- "+ setDouble(property : Property, value : double)"
- "+ setFloat(property : Property, value : float)"
- "+ setInt(property : Property, value : int)"
- "+ setList(property : Property, value : EJavaList)"
- "+ setLong(property : Property, value : long)"
- "+ setShort(property : Property, value : short)"
- "+ setString(property : Property, value : String)"
- "<> + commonj.sdo.DataObject"))
- width 1084
- height 2436
- annotation 8
- autoResize TRUE)))
- (object ClassDiagram "Ecore SDO"
- quid "3FAC379A02D5"
- title "Ecore SDO"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::sdo::DataGraph" @10
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- location (464, 160)
- label (object ItemLabel
- Parent_View @10
- location (74, 104)
- fill_color 13434879
- nlines 1
- max_width 780
- justify 0
- label "DataGraph")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7BFE03C0"
- compartment (object Compartment
- Parent_View @10
- location (74, 164)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.DataGraph"))
- width 798
- height 136
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::ChangeSummary" @11
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- location (528, 400)
- label (object ItemLabel
- Parent_View @11
- location (78, 344)
- fill_color 13434879
- nlines 1
- max_width 900
- justify 0
- label "ChangeSummary")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7C360208"
- compartment (object Compartment
- Parent_View @11
- location (78, 404)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.ChangeSummary"))
- width 918
- height 136
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::Type" @12
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- location (416, 1088)
- label (object ItemLabel
- Parent_View @12
- location (79, 1054)
- fill_color 13434879
- nlines 1
- max_width 674
- justify 0
- label "Type")
- stereotype (object ItemLabel
- Parent_View @12
- location (79, 1004)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 674
- justify 0
- label "<>")
- icon "Interface"
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7C7C0349"
- compartment (object Compartment
- Parent_View @12
- location (79, 1114)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.Type"))
- width 692
- height 192
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::Property" @13
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- location (448, 1648)
- label (object ItemLabel
- Parent_View @13
- location (78, 1614)
- fill_color 13434879
- nlines 1
- max_width 740
- justify 0
- label "Property")
- stereotype (object ItemLabel
- Parent_View @13
- location (78, 1564)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 740
- justify 0
- label "<>")
- icon "Interface"
- icon_style "Label"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7CA1031A"
- compartment (object Compartment
- Parent_View @13
- location (78, 1674)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.Property"))
- width 758
- height 192
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::ChangeSummarySetting" @14
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeOperation TRUE
- location (608, 640)
- label (object ItemLabel
- Parent_View @14
- location (83, 584)
- fill_color 13434879
- nlines 1
- max_width 1050
- justify 0
- label "ChangeSummarySetting")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB8BF8005A"
- compartment (object Compartment
- Parent_View @14
- location (83, 644)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.ChangeSummary$Setting"))
- width 1068
- height 136
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::change::ChangeDescription" @15
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2496, 400)
- label (object ItemLabel
- Parent_View @15
- location (2311, 350)
- fill_color 13434879
- nlines 1
- max_width 370
- justify 0
- label "ChangeDescription")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "4FAB6F110198"
- width 388
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::ecore::EObject" @16
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- location (2592, 160)
- label (object ItemLabel
- Parent_View @16
- location (2503, 110)
- fill_color 13434879
- nlines 1
- max_width 178
- justify 0
- label "EObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3C4F1C860123"
- width 196
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::change::FeatureChange" @17
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2528, 640)
- label (object ItemLabel
- Parent_View @17
- location (2374, 590)
- fill_color 13434879
- nlines 1
- max_width 308
- justify 0
- label "FeatureChange")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "4FC39D6D0177"
- width 326
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::Class" @18
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1648, 1296)
- label (object ItemLabel
- Parent_View @18
- location (1311, 1241)
- fill_color 13434879
- nlines 1
- max_width 674
- justify 0
- label "Class")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43559BB702E7"
- width 692
- height 134
- annotation 8)
- (object ClassView "Class" "Logical View::sdo::DataType" @19
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1648, 880)
- label (object ItemLabel
- Parent_View @19
- location (1311, 825)
- fill_color 13434879
- nlines 1
- max_width 674
- justify 0
- label "DataType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43559BE502F7"
- width 692
- height 134
- annotation 8)
- (object ClassView "Class" "Logical View::ecore::EClass" @20
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2592, 1296)
- label (object ItemLabel
- Parent_View @20
- location (2502, 1246)
- fill_color 13434879
- nlines 1
- max_width 181
- justify 0
- label "EClass")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3903D5BF000A"
- width 199
- height 124
- annotation 8)
- (object ClassView "Class" "Logical View::ecore::EDataType" @21
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2560, 880)
- label (object ItemLabel
- Parent_View @21
- location (2444, 830)
- fill_color 13434879
- nlines 1
- max_width 232
- justify 0
- label "EDataType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3903D525033E"
- width 250
- height 124
- annotation 8)
- (object ClassView "Class" "Logical View::sdo::Attribute" @22
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1664, 1536)
- label (object ItemLabel
- Parent_View @22
- location (1294, 1481)
- fill_color 13434879
- nlines 1
- max_width 740
- justify 0
- label "Attribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43559E690004"
- width 758
- height 134
- annotation 8)
- (object ClassView "Class" "Logical View::sdo::Reference" @23
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1664, 1760)
- label (object ItemLabel
- Parent_View @23
- location (1294, 1705)
- fill_color 13434879
- nlines 1
- max_width 740
- justify 0
- label "Reference")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43559E86025E"
- width 758
- height 134
- annotation 8)
- (object ClassView "Class" "Logical View::ecore::EAttribute" @24
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2576, 1536)
- label (object ItemLabel
- Parent_View @24
- location (2470, 1486)
- fill_color 13434879
- nlines 1
- max_width 212
- justify 0
- label "EAttribute")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39238472039D"
- width 230
- height 124
- annotation 8)
- (object ClassView "Class" "Logical View::ecore::EReference" @25
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2576, 1760)
- label (object ItemLabel
- Parent_View @25
- location (2458, 1710)
- fill_color 13434879
- nlines 1
- max_width 236
- justify 0
- label "EReference")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39238479039D"
- width 254
- height 124
- annotation 8)
- (object InheritView "" @26
- stereotype TRUE
- line_color 3342489
- quidu "43559ED801E4"
- client @22
- supplier @24
- line_style 0)
- (object InheritView "" @27
- stereotype TRUE
- line_color 3342489
- quidu "43559EE0011D"
- client @23
- supplier @25
- line_style 0)
- (object InheritView "" @28
- stereotype TRUE
- line_color 3342489
- quidu "43567DF9022A"
- client @23
- supplier @13
- line_style 0)
- (object InheritView "" @29
- stereotype TRUE
- line_color 3342489
- quidu "43567DFD03B6"
- client @22
- supplier @13
- line_style 0)
- (object ClassView "Class" "Logical View::sdo::Enum" @30
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1648, 1088)
- label (object ItemLabel
- Parent_View @30
- location (1311, 1033)
- fill_color 13434879
- nlines 1
- max_width 674
- justify 0
- label "Enum")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "4357B1010017"
- width 692
- height 134
- annotation 8)
- (object ClassView "Class" "Logical View::ecore::EEnum" @31
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (2592, 1088)
- label (object ItemLabel
- Parent_View @31
- location (2502, 1038)
- fill_color 13434879
- nlines 1
- max_width 181
- justify 0
- label "EEnum")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39A473E901D4"
- width 199
- height 124
- annotation 8)
- (object InheritView "" @32
- stereotype TRUE
- line_color 3342489
- quidu "4357B1410218"
- client @30
- supplier @12
- line_style 0)
- (object InheritView "" @33
- stereotype TRUE
- line_color 3342489
- quidu "4357B14701DA"
- client @30
- supplier @31
- line_style 0)
- (object InheritView "" @34
- stereotype TRUE
- line_color 3342489
- quidu "43559D3A01A3"
- client @18
- supplier @20
- line_style 0)
- (object InheritView "" @35
- stereotype TRUE
- line_color 3342489
- quidu "435901C600DC"
- client @18
- supplier @12
- line_style 0)
- (object InheritView "" @36
- stereotype TRUE
- line_color 3342489
- quidu "43590C6F016D"
- client @19
- supplier @12
- line_style 0)
- (object InheritView "" @37
- stereotype TRUE
- line_color 3342489
- quidu "43590C73038F"
- client @19
- supplier @21
- line_style 0)
- (object InheritView "" @38
- stereotype TRUE
- line_color 3342489
- quidu "43612C7B0243"
- client @10
- supplier @16
- line_style 0)
- (object InheritView "" @39
- stereotype TRUE
- line_color 3342489
- quidu "436134F001A6"
- client @14
- supplier @17
- line_style 0)
- (object InheritView "" @40
- stereotype TRUE
- line_color 3342489
- quidu "4361480602D8"
- client @11
- supplier @15
- line_style 0)))
- (object ClassDiagram "Ecore Data Graph"
- quid "3FAD029E0142"
- title "Ecore Data Graph"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::ecore::EObject" @41
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (464, 832)
- label (object ItemLabel
- Parent_View @41
- location (375, 782)
- fill_color 13434879
- nlines 1
- max_width 178
- justify 0
- label "EObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3C4F1C860123"
- width 196
- height 124
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DataGraph" @42
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (768, 256)
- label (object ItemLabel
- Parent_View @42
- location (378, 150)
- fill_color 13434879
- nlines 1
- max_width 780
- justify 0
- label "DataGraph")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7BFE03C0"
- width 798
- height 236
- annotation 8)
- (object AssociationViewNew "$UNNAMED$1" @43
- location (469, 572)
- stereotype TRUE
- quidu "3FAD26E802F5"
- roleview_list (list RoleViews
- (object RoleView "$UNNAMED$2" @44
- Parent_View @43
- location (-1067, -932)
- stereotype TRUE
- line_color 3342489
- quidu "3FAD26ED00E9"
- client @43
- supplier @42
- line_style 3
- origin_attachment (469, 572)
- terminal_attachment (469, 374))
- (object RoleView "eRootObject" @45
- Parent_View @43
- location (-1067, -932)
- label (object SegLabel @46
- Parent_View @45
- location (324, 683)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 252
- justify 0
- label "+eRootObject"
- pctDist 0.567708
- height 146
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3FAD26ED00F3"
- client @43
- supplier @41
- line_style 3
- origin_attachment (469, 572)
- terminal_attachment (469, 770)
- label (object SegLabel @47
- Parent_View @45
- location (512, 690)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.598958
- height 43
- orientation 0))))
- (object ClassView "Class" "Logical View::sdo::ChangeSummary" @48
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1072, 832)
- label (object ItemLabel
- Parent_View @48
- location (881, 782)
- fill_color 13434879
- nlines 1
- max_width 382
- justify 0
- label "ChangeSummary")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB7C360208"
- width 400
- height 125
- annotation 8)
- (object AssociationViewNew "$UNNAMED$0" @49
- location (1078, 572)
- stereotype TRUE
- quidu "3FAD10CA01D5"
- roleview_list (list RoleViews
- (object RoleView "eDataGraph" @50
- Parent_View @49
- location (662, -692)
- label (object SegLabel @51
- Parent_View @50
- location (929, 437)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 240
- justify 0
- label "+eDataGraph"
- pctDist 0.686170
- height 150
- orientation 0)
- stereotype TRUE
- line_color 3342489
- quidu "3FAD10CC001F"
- client @49
- supplier @42
- line_style 3
- origin_attachment (1078, 572)
- terminal_attachment (1078, 374)
- label (object SegLabel @52
- Parent_View @50
- location (1115, 437)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.686170
- height 37
- orientation 1))
- (object RoleView "eChangeSummary" @53
- Parent_View @49
- location (662, -692)
- label (object SegLabel @54
- Parent_View @53
- location (876, 692)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 360
- justify 0
- label "+eChangeSummary"
- pctDist 0.611702
- height 203
- orientation 1)
- stereotype TRUE
- line_color 3342489
- quidu "3FAD10CC0020"
- client @49
- supplier @48
- line_style 3
- origin_attachment (1078, 572)
- terminal_attachment (1078, 770)
- label (object SegLabel @55
- Parent_View @53
- location (1114, 692)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "1"
- pctDist 0.611702
- height 36
- orientation 0))))))
- (object ClassDiagram "External Types"
- quid "3FAB907F00F7"
- title "External Types"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::sdo::EObjectStreamException" @56
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (1184, 176)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @56
- location (741, 142)
- fill_color 13434879
- nlines 1
- max_width 886
- justify 0
- label "EObjectStreamException")
- stereotype (object ItemLabel
- Parent_View @56
- location (741, 92)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 886
- justify 0
- label "<>")
- icon_style "Icon"
- line_color 3342489
- fill_color 12303359
- quidu "3FC352DE038F"
- width 904
- height 192
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::EJavaList" @57
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (352, 176)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @57
- location (80, 142)
- fill_color 13434879
- nlines 1
- max_width 544
- justify 0
- label "EJavaList")
- stereotype (object ItemLabel
- Parent_View @57
- location (80, 92)
- fill_color 13434879
- anchor 10
- nlines 1
- max_width 544
- justify 0
- label "<>")
- icon_style "Icon"
- line_color 3342489
- fill_color 8963327
- quidu "3FAB8A010237"
- width 562
- height 192
- annotation 8)))
- (object ClassDiagram "SDO XML Type"
- quid "406964270056"
- title "SDO XML Type"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::type::AnyType" @58
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (1488, 576)
- label (object ItemLabel
- Parent_View @58
- location (1075, 421)
- fill_color 13434879
- nlines 1
- max_width 826
- justify 0
- label "AnyType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "40695FE40332"
- width 844
- height 334
- annotation 8)
- (object ClassView "Class" "Logical View::type::SimpleAnyType" @59
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (1488, 1040)
- label (object ItemLabel
- Parent_View @59
- location (1272, 910)
- fill_color 13434879
- nlines 1
- max_width 432
- justify 0
- label "SimpleAnyType")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "406961210099"
- width 450
- height 284
- annotation 8)
- (object ClassView "Class" "Logical View::sdo::AnyTypeDataObject" @60
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (448, 560)
- label (object ItemLabel
- Parent_View @60
- location (250, 509)
- fill_color 13434879
- nlines 1
- max_width 396
- justify 0
- label "AnyTypeDataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "4069645E0146"
- width 414
- height 126
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::SimpleAnyTypeDataObject" @61
- ShowCompartmentStereotypes TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- ShowOperationSignature TRUE
- location (464, 1024)
- label (object ItemLabel
- Parent_View @61
- location (201, 973)
- fill_color 13434879
- nlines 1
- max_width 526
- justify 0
- label "SimpleAnyTypeDataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "406964710189"
- width 544
- height 126
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DataObject" @62
- ShowCompartmentStereotypes TRUE
- SuppressAttribute TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (448, 208)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @62
- location (328, 165)
- fill_color 13434879
- nlines 1
- max_width 240
- justify 0
- label "DataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB6F7501C4"
- width 258
- height 110
- annotation 8)
- (object InheritView "" @63
- stereotype (object SegLabel @64
- Parent_View @63
- location (298, 791)
- anchor 10
- anchor_loc 1
- nlines 1
- max_width 450
- justify 0
- label "<>"
- pctDist 0.502959
- height 150
- orientation 0)
- line_color 3342489
- quidu "4069648302E3"
- client @61
- supplier @60
- line_style 3
- origin_attachment (448, 961)
- terminal_attachment (448, 623))
- (object InheritView "" @65
- stereotype TRUE
- line_color 3342489
- quidu "4069648D02E8"
- client @61
- supplier @59
- line_style 3
- origin_attachment (736, 1002)
- terminal_attachment (1263, 1002))
- (object InheritView "" @66
- stereotype TRUE
- line_color 3342489
- quidu "40696143020B"
- client @59
- supplier @58
- line_style 3
- origin_attachment (1479, 898)
- terminal_attachment (1479, 743))
- (object InheritView "" @67
- stereotype TRUE
- line_color 3342489
- quidu "406964870375"
- client @60
- supplier @58
- line_style 3
- origin_attachment (655, 561)
- terminal_attachment (1066, 561))
- (object InheritView "" @68
- stereotype (object SegLabel @69
- Parent_View @68
- location (294, 403)
- anchor 10
- anchor_loc 1
- nlines 1
- max_width 450
- justify 0
- label "<>"
- pctDist 0.405229
- height 155
- orientation 0)
- line_color 3342489
- quidu "436141F003E7"
- client @60
- supplier @62
- line_style 0)))
- (object ClassDiagram "SDO DataObject Implementations"
- quid "43621DF90149"
- title "SDO DataObject Implementations"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object ClassView "Class" "Logical View::sdo::DataObject" @70
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- location (1056, 368)
- font (object Font
- italics TRUE)
- label (object ItemLabel
- Parent_View @70
- location (661, 312)
- fill_color 13434879
- nlines 1
- max_width 790
- justify 0
- label "DataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAB6F7501C4"
- compartment (object Compartment
- Parent_View @70
- location (661, 372)
- icon_style "Icon"
- fill_color 13434879
- anchor 2
- nlines 1
- max_width 0
- compartmentItems (list Compartment
- "<> + commonj.sdo.DataObject"))
- width 808
- height 136
- annotation 8
- autoResize TRUE)
- (object ClassView "Class" "Logical View::sdo::DynamicDataObject" @71
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (576, 720)
- label (object ItemLabel
- Parent_View @71
- location (181, 664)
- fill_color 13434879
- nlines 1
- max_width 790
- justify 0
- label "DynamicDataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "435E94210124"
- width 808
- height 136
- annotation 8)
- (object ClassView "Class" "Logical View::sdo::StoreDataObject" @72
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1680, 720)
- label (object ItemLabel
- Parent_View @72
- location (1285, 664)
- fill_color 13434879
- nlines 1
- max_width 790
- justify 0
- label "StoreDataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43621EBA03B4"
- width 808
- height 136
- annotation 8)
- (object InheritTreeView "" @73
- location (1053, 559)
- line_color 3342489
- fill_color 13434879
- supplier @70
- vertices (list Points
- (1053, 559)
- (1053, 436)))
- (object InheritView "" @74
- stereotype TRUE
- line_color 3342489
- quidu "435E9435008D"
- client @71
- supplier @70
- line_style 3
- origin_attachment (562, 652)
- terminal_attachment (562, 559)
- drawSupplier @73)
- (object ClassView "Class" "Logical View::sdo::DynamicStoreDataObject" @75
- ShowCompartmentStereotypes TRUE
- SuppressOperation TRUE
- IncludeAttribute TRUE
- IncludeOperation TRUE
- location (1680, 1056)
- label (object ItemLabel
- Parent_View @75
- location (1285, 1000)
- fill_color 13434879
- nlines 1
- max_width 790
- justify 0
- label "DynamicStoreDataObject")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "43621F4203CD"
- width 808
- height 136
- annotation 8)
- (object InheritView "" @76
- stereotype TRUE
- line_color 3342489
- quidu "43621F920242"
- client @75
- supplier @72
- line_style 0)
- (object InheritView "" @77
- stereotype TRUE
- line_color 3342489
- quidu "43621F0B03A6"
- client @72
- supplier @70
- line_style 3
- origin_attachment (1681, 652)
- terminal_attachment (1681, 559)
- drawSupplier @73)))))
- (object Class_Category "ecore"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.emf.ecore\\model\\org.eclipse.emf.Ecore.cat"
- quid "39A5ED04004E")
- (object Class_Category "change"
- is_unit TRUE
- is_loaded FALSE
- file_name "$VABASE_PLUGINS_PATH\\org.eclipse.emf.ecore.change\\model\\org.eclipse.emf.ecore.Change.cat"
- quid "4FAA8E8B0306")
- (object Class_Category "type"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "type")
- (object Attribute
- tool "Ecore"
- name "nsPrefix"
- value "xml.type")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "http://www.eclipse.org/emf/2003/XMLType")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "org.eclipse.emf.ecore.xml")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "XMLType"))
- quid "40696924000C"
- exportControl "Public"
- logical_models (list unit_reference_list
- (object Class "AnyType"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "xmlContentKind"
- value ("ContentKind" 3)))
- quid "40695FE40332"
- class_attributes (list class_attribute_list
- (object ClassAttribute "mixed"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value FALSE))
- quid "40696039001D"
- stereotype "0..*"
- type "EFeatureMapEntry"
- exportControl "Public")
- (object ClassAttribute "any"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value FALSE))
- quid "40696084002F"
- stereotype "0..*"
- type "EFeatureMapEntry"
- exportControl "Public"
- derived TRUE)
- (object ClassAttribute "anyAttribute"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value FALSE))
- quid "4069609A0153"
- stereotype "0..*"
- type "EFeatureMapEntry"
- exportControl "Public")))
- (object Class "SimpleAnyType"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "xmlContentKind"
- value ("ContentKind" 2)))
- quid "406961210099"
- superclasses (list inheritance_relationship_list
- (object Inheritance_Relationship
- quid "40696143020B"
- supplier "Logical View::type::AnyType"
- quidu "40695FE40332"))
- class_attributes (list class_attribute_list
- (object ClassAttribute "rawValue"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value FALSE))
- quid "4069612E0391"
- type "String"
- exportControl "Public"
- derived TRUE)
- (object ClassAttribute "value"
- attributes (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value FALSE))
- quid "406961A40106"
- type "EJavaObject"
- exportControl "Public"
- derived TRUE))))
- logical_presentations (list unit_reference_list)))
- logical_presentations (list unit_reference_list
- (object ClassDiagram "Main"
- quid "3FAA8E8700D0"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list
- (object CategoryView "Logical View::ecore" @78
- location (912, 272)
- label (object ItemLabel
- Parent_View @78
- location (768, 188)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "ecore")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "39A5ED04004E"
- width 300
- height 180)
- (object CategoryView "Logical View::sdo" @79
- location (368, 272)
- label (object ItemLabel
- Parent_View @79
- location (224, 188)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "sdo")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "3FAA8E8B0306"
- width 300
- height 180)
- (object CategoryView "Logical View::change" @80
- location (1440, 272)
- label (object ItemLabel
- Parent_View @80
- location (1296, 188)
- fill_color 13434879
- nlines 2
- max_width 288
- justify 0
- label "change")
- icon_style "Icon"
- line_color 3342489
- fill_color 13434879
- quidu "4FAA8E8B0306"
- width 300
- height 180)))))
- root_subsystem (object SubSystem "Component View"
- quid "3FAA8E8700BF"
- physical_models (list unit_reference_list)
- physical_presentations (list unit_reference_list
- (object Module_Diagram "Main"
- quid "3FAA8E8700EE"
- title "Main"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- process_structure (object Processes
- quid "3FAA8E8700C0"
- ProcsNDevs (list
- (object Process_Diagram "Deployment View"
- quid "3FAA8E8700C2"
- title "Deployment View"
- zoom 100
- max_height 28350
- max_width 21600
- origin_x 0
- origin_y 0
- items (list diagram_item_list))))
- properties (object Properties
- attributes (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "DDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "DDL"
- name "DataBase"
- value ("DataBaseSet" 800))
- (object Attribute
- tool "DDL"
- name "DataBaseSet"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ANSI"
- value 800)
- (object Attribute
- tool "DDL"
- name "Oracle"
- value 801)
- (object Attribute
- tool "DDL"
- name "SQLServer"
- value 802)
- (object Attribute
- tool "DDL"
- name "Sybase"
- value 803)
- (object Attribute
- tool "DDL"
- name "Watcom"
- value 804)))
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnName"
- value "Id")
- (object Attribute
- tool "DDL"
- name "PrimaryKeyColumnType"
- value "NUMBER(5)")
- (object Attribute
- tool "DDL"
- name "ViewName"
- value "V_")
- (object Attribute
- tool "DDL"
- name "TableName"
- value "T_")
- (object Attribute
- tool "DDL"
- name "InheritSuffix"
- value "_V")
- (object Attribute
- tool "DDL"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "BaseViews"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "DDLScriptFilename"
- value "DDL1.SQL")))
- (object Attribute
- tool "DDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "DDL"
- name "ColumnType"
- value "VARCHAR")
- (object Attribute
- tool "DDL"
- name "Length"
- value "")
- (object Attribute
- tool "DDL"
- name "NullsOK"
- value TRUE)
- (object Attribute
- tool "DDL"
- name "PrimaryKey"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "Unique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "DDL"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "DDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "IDL"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "StopOnError"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GeneratePreserveRegions"
- value TRUE)))
- (object Attribute
- tool "IDL"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDefaultSpecifier"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "DefaultSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "IDLElement"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "IDLSpecificationType"
- value ("IDLSpecSet" 22))
- (object Attribute
- tool "IDL"
- name "IDLSpecSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Interface"
- value 22)
- (object Attribute
- tool "IDL"
- name "Typedef"
- value 54)
- (object Attribute
- tool "IDL"
- name "Enumeration"
- value 8)
- (object Attribute
- tool "IDL"
- name "Const"
- value 71)
- (object Attribute
- tool "IDL"
- name "Exception"
- value 61)
- (object Attribute
- tool "IDL"
- name "Struct"
- value 51)
- (object Attribute
- tool "IDL"
- name "Union"
- value 81)))))
- (object Attribute
- tool "IDL"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.emf.ecore.sdo/model/SDO.mdl, emf.ecore.sdo, org.eclipse.dev"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "GenerateIDLModule"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CmIdentification"
- value (value Text " %X% @(#) plugins/org.eclipse.emf.ecore.sdo/model/SDO.mdl, emf.ecore.sdo, org.eclipse.dev"))
- (object Attribute
- tool "IDL"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "IDL"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "IDL"
- name "IncludeBySimpleName"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "OperationIsOneWay"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "Context"
- value "")
- (object Attribute
- tool "IDL"
- name "Raises"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsConst"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "ConstValue"
- value "")))
- (object Attribute
- tool "IDL"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedHasRelType"
- value ("HasRelTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "IDL"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "IDL"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "IDL"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "IDL"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Array"
- value 24)
- (object Attribute
- tool "IDL"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "IDL"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "IDL"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "IDL"
- name "Directory"
- value "AUTO GENERATE")))
- (object Attribute
- tool "IDL"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "SCC"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "propertyId"
- value "809135969")
- (object Attribute
- tool "Ecore"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "packageName"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsPrefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "nsURI"
- value "")
- (object Attribute
- tool "Ecore"
- name "basePackage"
- value "")
- (object Attribute
- tool "Ecore"
- name "prefix"
- value "")
- (object Attribute
- tool "Ecore"
- name "annotation"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "classifierName"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlName"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlContentKind"
- value ("ContentKind" 0))
- (object Attribute
- tool "Ecore"
- name "ContentKind"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "Unspecified"
- value 0)
- (object Attribute
- tool "Ecore"
- name "Empty"
- value 1)
- (object Attribute
- tool "Ecore"
- name "Simple"
- value 2)
- (object Attribute
- tool "Ecore"
- name "Mixed"
- value 3)
- (object Attribute
- tool "Ecore"
- name "ElementOnly"
- value 4)))
- (object Attribute
- tool "Ecore"
- name "annotation"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "operationName"
- value "")
- (object Attribute
- tool "Ecore"
- name "annotation"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "attributeName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isUnique"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isID"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "xmlName"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlNamespace"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlFeatureKind"
- value ("FeatureKind" 0))
- (object Attribute
- tool "Ecore"
- name "FeatureKind"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "Unspecified"
- value 0)
- (object Attribute
- tool "Ecore"
- name "Simple"
- value 1)
- (object Attribute
- tool "Ecore"
- name "Attribute"
- value 2)
- (object Attribute
- tool "Ecore"
- name "Element"
- value 4)))
- (object Attribute
- tool "Ecore"
- name "annotation"
- value "")))
- (object Attribute
- tool "Ecore"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "referenceName"
- value "")
- (object Attribute
- tool "Ecore"
- name "isTransient"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isVolatile"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isChangeable"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "isUnsettable"
- value FALSE)
- (object Attribute
- tool "Ecore"
- name "isResolveProxies"
- value TRUE)
- (object Attribute
- tool "Ecore"
- name "xmlName"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlNamespace"
- value "")
- (object Attribute
- tool "Ecore"
- name "xmlFeatureKind"
- value ("FeatureKind" 0))
- (object Attribute
- tool "Ecore"
- name "FeatureKind"
- value (list Attribute_Set
- (object Attribute
- tool "Ecore"
- name "Unspecified"
- value 0)
- (object Attribute
- tool "Ecore"
- name "Simple"
- value 1)
- (object Attribute
- tool "Ecore"
- name "Attribute"
- value 2)
- (object Attribute
- tool "Ecore"
- name "Element"
- value 4)))
- (object Attribute
- tool "Ecore"
- name "annotation"
- value "")))
- (object Attribute
- tool "framework"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Java"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "Java"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "Java"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "Java"
- name "UsePrefixes"
- value FALSE)
- (object Attribute
- tool "Java"
- name "InstanceVariablePrefix"
- value "m_")
- (object Attribute
- tool "Java"
- name "ClassVariablePrefix"
- value "s_")
- (object Attribute
- tool "Java"
- name "DefaultAttributeDataType"
- value "int")
- (object Attribute
- tool "Java"
- name "DefaultOperationReturnType"
- value "void")))
- (object Attribute
- tool "Java"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateDefaultConstructor"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ConstructorIs"
- value ("Ctor_Set" 62))
- (object Attribute
- tool "Java"
- name "Ctor_Set"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Public"
- value 62)
- (object Attribute
- tool "Java"
- name "Protected"
- value 63)
- (object Attribute
- tool "Java"
- name "Private"
- value 64)))
- (object Attribute
- tool "Java"
- name "GenerateFinalizer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateStaticInitializer"
- value FALSE)
- (object Attribute
- tool "Java"
- name "GenerateInstanceInitializer"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "AdditionalImports"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "Java"
- name "CmIdentification"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "Java"
- name "AdditionalImports"
- value (value Text ""))))
- (object Attribute
- tool "Java"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "Abstract"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Static"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Native"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Synchronized"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Java"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "Java"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "Java"
- name "InitialValue"
- value "")
- (object Attribute
- tool "Java"
- name "Final"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Transient"
- value FALSE)
- (object Attribute
- tool "Java"
- name "Volatile"
- value FALSE)))
- (object Attribute
- tool "Java"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "propertyId"
- value "360000002")
- (object Attribute
- tool "Oracle8"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "DDLScriptFilename"
- value "DDL1.SQL")
- (object Attribute
- tool "Oracle8"
- name "DropClause"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnName"
- value "_ID")
- (object Attribute
- tool "Oracle8"
- name "PrimaryKeyColumnType"
- value "NUMBER(5,0)")
- (object Attribute
- tool "Oracle8"
- name "SchemaNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "SchemaNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TypeNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ViewNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "VarrayNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "NestedTableNameSuffix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNamePrefix"
- value "")
- (object Attribute
- tool "Oracle8"
- name "ObjectTableNameSuffix"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "IsSchema"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "WhereClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeLength"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypePrecision"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionTypeScale"
- value "")
- (object Attribute
- tool "Oracle8"
- name "CollectionOfREFS"
- value FALSE)))
- (object Attribute
- tool "Oracle8"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MethodKind"
- value ("MethodKindSet" 1903))
- (object Attribute
- tool "Oracle8"
- name "OverloadID"
- value "")
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsReadNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsReadNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoDataState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsWriteNoProcessState"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsSelfish"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "TriggerType"
- value ("TriggerTypeSet" 1801))
- (object Attribute
- tool "Oracle8"
- name "TriggerEvent"
- value ("TriggerEventSet" 1601))
- (object Attribute
- tool "Oracle8"
- name "TriggerText"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerReferencingNames"
- value "")
- (object Attribute
- tool "Oracle8"
- name "TriggerForEach"
- value ("TriggerForEachSet" 1701))
- (object Attribute
- tool "Oracle8"
- name "TriggerWhenClause"
- value "")
- (object Attribute
- tool "Oracle8"
- name "MethodKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "MapMethod"
- value 1901)
- (object Attribute
- tool "Oracle8"
- name "OrderMethod"
- value 1902)
- (object Attribute
- tool "Oracle8"
- name "Function"
- value 1903)
- (object Attribute
- tool "Oracle8"
- name "Procedure"
- value 1904)
- (object Attribute
- tool "Oracle8"
- name "Operator"
- value 1905)
- (object Attribute
- tool "Oracle8"
- name "Constructor"
- value 1906)
- (object Attribute
- tool "Oracle8"
- name "Destructor"
- value 1907)
- (object Attribute
- tool "Oracle8"
- name "Trigger"
- value 1908)
- (object Attribute
- tool "Oracle8"
- name "Calculated"
- value 1909)))
- (object Attribute
- tool "Oracle8"
- name "TriggerTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "AFTER"
- value 1801)
- (object Attribute
- tool "Oracle8"
- name "BEFORE"
- value 1802)
- (object Attribute
- tool "Oracle8"
- name "INSTEAD OF"
- value 1803)))
- (object Attribute
- tool "Oracle8"
- name "TriggerForEachSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "ROW"
- value 1701)
- (object Attribute
- tool "Oracle8"
- name "STATEMENT"
- value 1702)))
- (object Attribute
- tool "Oracle8"
- name "TriggerEventSet"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "INSERT"
- value 1601)
- (object Attribute
- tool "Oracle8"
- name "UPDATE"
- value 1602)
- (object Attribute
- tool "Oracle8"
- name "DELETE"
- value 1603)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE"
- value 1604)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR DELETE"
- value 1605)
- (object Attribute
- tool "Oracle8"
- name "UPDATE OR DELETE"
- value 1606)
- (object Attribute
- tool "Oracle8"
- name "INSERT OR UPDATE OR DELETE"
- value 1607)))))
- (object Attribute
- tool "Oracle8"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Oracle8"
- name "OrderNumber"
- value "")
- (object Attribute
- tool "Oracle8"
- name "IsUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "NullsAllowed"
- value TRUE)
- (object Attribute
- tool "Oracle8"
- name "Length"
- value "")
- (object Attribute
- tool "Oracle8"
- name "Precision"
- value "2")
- (object Attribute
- tool "Oracle8"
- name "Scale"
- value "6")
- (object Attribute
- tool "Oracle8"
- name "IsIndex"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "IsPrimaryKey"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CompositeUnique"
- value FALSE)
- (object Attribute
- tool "Oracle8"
- name "CheckConstraint"
- value "")))
- (object Attribute
- tool "Oracle8"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Repository"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "cg"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "cg"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "UseMSVC"
- value FALSE)
- (object Attribute
- tool "cg"
- name "HeaderFileExtension"
- value "h")
- (object Attribute
- tool "cg"
- name "HeaderFileBackupExtension"
- value "h~")
- (object Attribute
- tool "cg"
- name "HeaderFileTemporaryExtension"
- value "h#")
- (object Attribute
- tool "cg"
- name "CodeFileExtension"
- value "cpp")
- (object Attribute
- tool "cg"
- name "CodeFileBackupExtension"
- value "cp~")
- (object Attribute
- tool "cg"
- name "CodeFileTemporaryExtension"
- value "cp#")
- (object Attribute
- tool "cg"
- name "CreateMissingDirectories"
- value TRUE)
- (object Attribute
- tool "cg"
- name "StopOnError"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ErrorLimit"
- value 30)
- (object Attribute
- tool "cg"
- name "Directory"
- value "$ROSECPP_SOURCE")
- (object Attribute
- tool "cg"
- name "PathSeparator"
- value "")
- (object Attribute
- tool "cg"
- name "FileNameFormat"
- value "128vx_b")
- (object Attribute
- tool "cg"
- name "BooleanType"
- value "int")
- (object Attribute
- tool "cg"
- name "AllowTemplates"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowExplicitInstantiations"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AllowProtectedInheritance"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CommentWidth"
- value 60)
- (object Attribute
- tool "cg"
- name "OneByValueContainer"
- value "$targetClass")
- (object Attribute
- tool "cg"
- name "OneByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "OptionalByValueContainer"
- value "OptionalByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "OptionalByReferenceContainer"
- value "$targetClass *")
- (object Attribute
- tool "cg"
- name "FixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByValueContainer"
- value "$targetClass[$limit]")
- (object Attribute
- tool "cg"
- name "FixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "UnorderedFixedByReferenceContainer"
- value "$targetClass *[$limit]")
- (object Attribute
- tool "cg"
- name "BoundedByValueContainer"
- value "BoundedListByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByValueContainer"
- value "BoundedSetByValue<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "BoundedByReferenceContainer"
- value "BoundedListByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnorderedBoundedByReferenceContainer"
- value "BoundedSetByReference<$targetClass,$limit>")
- (object Attribute
- tool "cg"
- name "UnboundedByValueContainer"
- value "UnboundedListByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByValueContainer"
- value "UnboundedSetByValue<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnboundedByReferenceContainer"
- value "UnboundedListByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "UnorderedUnboundedByReferenceContainer"
- value "UnboundedSetByReference<$targetClass>")
- (object Attribute
- tool "cg"
- name "QualifiedByValueContainer"
- value "AssociationByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByValueContainer"
- value "DictionaryByValue<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "QualifiedByReferenceContainer"
- value "AssociationByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "UnorderedQualifiedByReferenceContainer"
- value "DictionaryByReference<$qualtype, $qualcont>")
- (object Attribute
- tool "cg"
- name "GeneratePreserveRegions"
- value TRUE)))
- (object Attribute
- tool "cg"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ImplementationType"
- value "")
- (object Attribute
- tool "cg"
- name "ClassKey"
- value "class")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "PutBodiesInSpec"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDefaultConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "DefaultConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitDefaultConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateCopyConstructor"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "CopyConstructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ExplicitCopyConstructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDestructor"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DestructorVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DestructorKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineDestructor"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateAssignmentOperation"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "AssignmentVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "AssignmentKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineAssignmentOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateEqualityOperations"
- value ("GenerateSet" 199))
- (object Attribute
- tool "cg"
- name "EqualityVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "EqualityKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineEqualityOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "RelationalVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "RelationalKind"
- value ("FriendKindSet" 200))
- (object Attribute
- tool "cg"
- name "InlineRelationalOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StorageMgmtVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStorageMgmtOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "SubscriptVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "SubscriptKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "SubscriptResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineSubscriptOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DereferenceVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "DereferenceKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "DereferenceResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineDereferenceOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IndirectionVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "IndirectionKind"
- value ("ThreeKindSet" 200))
- (object Attribute
- tool "cg"
- name "IndirectionResultType"
- value "")
- (object Attribute
- tool "cg"
- name "InlineIndirectionOperation"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "StreamVisibility"
- value ("VisibilitySet" 45))
- (object Attribute
- tool "cg"
- name "InlineStreamOperations"
- value FALSE)
- (object Attribute
- tool "cg"
- name "ThreeKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)))
- (object Attribute
- tool "cg"
- name "KindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)))
- (object Attribute
- tool "cg"
- name "FriendKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GenerateSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "DeclareAndDefine"
- value 199)
- (object Attribute
- tool "cg"
- name "DeclareOnly"
- value 205)
- (object Attribute
- tool "cg"
- name "DoNotDeclare"
- value 206)))
- (object Attribute
- tool "cg"
- name "VisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)))
- (object Attribute
- tool "cg"
- name "ConstValue"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateDefaultSpecifier"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DefaultSpecifier"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InclusionProtectionSymbol"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Generate"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "CmIdentification"
- value (value Text " %X% %Q% %Z% %W%"))
- (object Attribute
- tool "cg"
- name "CopyrightNotice"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "FileName"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "AllowExtensionlessFileName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludeFormat"
- value (value Text
-|// $package
-|#include "$file"
-|
- ))
- (object Attribute
- tool "cg"
- name "IncludeBySimpleName"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IncludePrecompiledHeader"
- value TRUE)
- (object Attribute
- tool "cg"
- name "IncludeOrder"
- value "AMIR")
- (object Attribute
- tool "cg"
- name "AdditionalIncludes"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "InliningStyle"
- value ("InliningStyleSet" 207))
- (object Attribute
- tool "cg"
- name "InliningStyleSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InClassDeclaration"
- value 208)
- (object Attribute
- tool "cg"
- name "FollowingClassDeclaration"
- value 207)))
- (object Attribute
- tool "cg"
- name "TypesDefined"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "IncludeClosure"
- value (value Text ""))))
- (object Attribute
- tool "cg"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "OperationKind"
- value ("OperationKindSet" 200))
- (object Attribute
- tool "cg"
- name "OperationKindSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "OperationIsConst"
- value FALSE)
- (object Attribute
- tool "cg"
- name "OperationIsExplicit"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Inline"
- value FALSE)
- (object Attribute
- tool "cg"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ExitCode"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))
- (object Attribute
- tool "cg"
- name "BodyAnnotations"
- value "")
- (object Attribute
- tool "cg"
- name "OperationIsOneWay"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Context"
- value "")
- (object Attribute
- tool "cg"
- name "Raises"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "Ordered"
- value TRUE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$supplier")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$relationship")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$relationship")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorName"
- value "")
- (object Attribute
- tool "cg"
- name "SelectorType"
- value "")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BoundedHasRelType"
- value ("HasRelTypeSet" 47))
- (object Attribute
- tool "cg"
- name "HasRelTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Association"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")))
- (object Attribute
- tool "cg"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "InstanceArguments"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "NameIfUnlabeled"
- value "the_$targetClass")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "InitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "ContainerClass"
- value "")
- (object Attribute
- tool "cg"
- name "ContainerGet"
- value "$data.get($keys)")
- (object Attribute
- tool "cg"
- name "ContainerSet"
- value "$data.set($keys,$value)")
- (object Attribute
- tool "cg"
- name "QualifiedContainer"
- value "")
- (object Attribute
- tool "cg"
- name "AssocClassContainer"
- value "$supplier *")
- (object Attribute
- tool "cg"
- name "AssocClassInitialValue"
- value (value Text ""))
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReference"
- value ("QualifiedGetSetByReferenceSet" 2))
- (object Attribute
- tool "cg"
- name "QualifiedGetSetByReferenceSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_GetSetByReference"
- value 2)))
- (object Attribute
- tool "cg"
- name "GenerateQualifiedGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "QualifiedGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineQualifiedGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateQualifiedSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "QualifiedSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "QualifiedSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineQualifiedSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberName"
- value "$target")
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtRelationshipVisibility"
- value 210)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "AssocClassDataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "AssocClassGetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GenerateAssocClassGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetName"
- value "get_$target")
- (object Attribute
- tool "cg"
- name "AssocClassGetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassGetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "InlineAssocClassGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateAssocClassSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassSetName"
- value "set_$target")
- (object Attribute
- tool "cg"
- name "AssocClassSetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineAssocClassSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "AssocClassForwardReferenceOnly"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateForwardReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "IsReadOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BoundedRoleType"
- value ("AssocTypeSet" 47))
- (object Attribute
- tool "cg"
- name "AssocTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Array"
- value 24)
- (object Attribute
- tool "cg"
- name "Sequence"
- value 47)))))
- (object Attribute
- tool "cg"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "cg"
- name "DataMemberName"
- value "$attribute")
- (object Attribute
- tool "cg"
- name "DataMemberVisibility"
- value ("DataMemberVisibilitySet" 14))
- (object Attribute
- tool "cg"
- name "DataMemberVisibilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Public"
- value 45)
- (object Attribute
- tool "cg"
- name "Protected"
- value 44)
- (object Attribute
- tool "cg"
- name "Private"
- value 43)
- (object Attribute
- tool "cg"
- name "Implementation"
- value 14)
- (object Attribute
- tool "cg"
- name "AtAttributeVisibility"
- value 211)))
- (object Attribute
- tool "cg"
- name "DataMemberMutability"
- value ("DataMemberMutabilitySet" 0))
- (object Attribute
- tool "cg"
- name "DataMemberMutabilitySet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Unrestricted"
- value 0)
- (object Attribute
- tool "cg"
- name "Mutable"
- value 1)
- (object Attribute
- tool "cg"
- name "Const"
- value 2)))
- (object Attribute
- tool "cg"
- name "DataMemberIsVolatile"
- value FALSE)
- (object Attribute
- tool "cg"
- name "DataMemberFieldSize"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateGetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GenerateSetOperation"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetName"
- value "get_$attribute")
- (object Attribute
- tool "cg"
- name "SetName"
- value "set_$attribute")
- (object Attribute
- tool "cg"
- name "GetSetKinds"
- value ("GetSetKindsSet" 200))
- (object Attribute
- tool "cg"
- name "GetSetKindsSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Common"
- value 200)
- (object Attribute
- tool "cg"
- name "Virtual"
- value 201)
- (object Attribute
- tool "cg"
- name "Abstract"
- value 202)
- (object Attribute
- tool "cg"
- name "Static"
- value 203)
- (object Attribute
- tool "cg"
- name "Friend"
- value 204)))
- (object Attribute
- tool "cg"
- name "GetIsConst"
- value TRUE)
- (object Attribute
- tool "cg"
- name "GetResultIsConst"
- value ("GetResultIsConstSet" 2))
- (object Attribute
- tool "cg"
- name "GetResultIsConstSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "False"
- value 0)
- (object Attribute
- tool "cg"
- name "True"
- value 1)
- (object Attribute
- tool "cg"
- name "Same_As_Function"
- value 2)))
- (object Attribute
- tool "cg"
- name "GetSetByReference"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineGet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "SetReturnsValue"
- value FALSE)
- (object Attribute
- tool "cg"
- name "InlineSet"
- value TRUE)
- (object Attribute
- tool "cg"
- name "CaseSpecifier"
- value "")
- (object Attribute
- tool "cg"
- name "IsReadOnly"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Uses"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "ForwardReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "BodyReferenceOnly"
- value FALSE)
- (object Attribute
- tool "cg"
- name "GenerateForwardReference"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "default__Subsystem"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "Directory"
- value "AUTO GENERATE")
- (object Attribute
- tool "cg"
- name "DirectoryIsOnSearchList"
- value FALSE)
- (object Attribute
- tool "cg"
- name "PrecompiledHeader"
- value "")))
- (object Attribute
- tool "cg"
- name "default__Category"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "IsNamespace"
- value FALSE)
- (object Attribute
- tool "cg"
- name "Indent"
- value 2)
- (object Attribute
- tool "cg"
- name "CodeName"
- value "")
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegions"
- value ("GenerateEmptyRegionSet" 3))
- (object Attribute
- tool "cg"
- name "GenerateEmptyRegionSet"
- value (list Attribute_Set
- (object Attribute
- tool "cg"
- name "None"
- value 0)
- (object Attribute
- tool "cg"
- name "Preserved"
- value 1)
- (object Attribute
- tool "cg"
- name "Unpreserved"
- value 2)
- (object Attribute
- tool "cg"
- name "All"
- value 3)))))
- (object Attribute
- tool "MSVC"
- name "propertyId"
- value "809135966")
- (object Attribute
- tool "MSVC"
- name "default__Project"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Version"
- value "5.0")))
- (object Attribute
- tool "MSVC"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCClassTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCClassTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Interface_Part"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Connection_Part"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Class_Factory"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionality"
- value ("CObjectFunctionalitySet" 0))
- (object Attribute
- tool "MSVC"
- name "CObjectFunctionalitySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Dynamic"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Dyncreate"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Serial"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "GenerateOverrideGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateDataGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DATA_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateFieldGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_FIELD_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMessageGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "GenerateMessageMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "OLEFactory"
- value ("OLEFactorySet" 0))
- (object Attribute
- tool "MSVC"
- name "OLEFactorySet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "None"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Built_in"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Simple"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Licensed"
- value 3)))
- (object Attribute
- tool "MSVC"
- name "OLEName"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLEClassID"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLECtlType"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLECtlType"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateOLETypeLib"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLETypeLibID"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMajor"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLETypeLibMinor"
- value "")
- (object Attribute
- tool "MSVC"
- name "GeneratePropPageIDs"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "OLEPropPageIDs"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateDispatchMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockProperties"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockFunctions"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DispatchDefValue"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateDispIdEnum"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_DISP_ID_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInterfaceMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "INTERFACE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "InitInterface"
- value "")
- (object Attribute
- tool "MSVC"
- name "GenerateEventMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "StockEvents"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateEventSinkMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "PropNotifySinks"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ConnectionPointIID"
- value "")
- (object Attribute
- tool "MSVC"
- name "InheritanceType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "OLECommands"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCDeclares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MFCImplements"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "ATL_Declares"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateCOMMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "COM_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateConnectionPointMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "CONNECTION_POINT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateMsgMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GeneratePropertyMap"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "PROPERTY_MAP_Entries"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCOperationTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCOperationTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Virtual_Override"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Message_Handler"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dispatch_Handler"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Event_Firing_Function"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Event_Sink_Handler"
- value 5)
- (object Attribute
- tool "MSVC"
- name "Std_OLE_Method"
- value 6)
- (object Attribute
- tool "MSVC"
- name "Command_Parser"
- value 7)
- (object Attribute
- tool "MSVC"
- name "Property_Get_Function"
- value 8)
- (object Attribute
- tool "MSVC"
- name "Property_Set_Function"
- value 9)
- (object Attribute
- tool "MSVC"
- name "Property_Notify_Function"
- value 10)
- (object Attribute
- tool "MSVC"
- name "Macro_Generated_Function"
- value 11)))
- (object Attribute
- tool "MSVC"
- name "AFX_MSG_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "MESSAGE_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENT_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "AFX_EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "EVENTSINK_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "BodyImage"
- value (value Text ""))))
- (object Attribute
- tool "MSVC"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Has"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Type"
- value ("MSVCAttributeTypeSet" 0))
- (object Attribute
- tool "MSVC"
- name "MSVCAttributeTypeSet"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "Normal"
- value 0)
- (object Attribute
- tool "MSVC"
- name "Member_Property"
- value 1)
- (object Attribute
- tool "MSVC"
- name "Get_Set_Property"
- value 2)
- (object Attribute
- tool "MSVC"
- name "Dialog_Data"
- value 3)
- (object Attribute
- tool "MSVC"
- name "Field_Data"
- value 4)
- (object Attribute
- tool "MSVC"
- name "Stock_Property"
- value 5)))
- (object Attribute
- tool "MSVC"
- name "AFX_DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DISPATCH_MAP_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "DeclSpec"
- value "")
- (object Attribute
- tool "MSVC"
- name "PointerBase"
- value "")
- (object Attribute
- tool "MSVC"
- name "CallType"
- value "")
- (object Attribute
- tool "MSVC"
- name "StockPropertyImplementation"
- value "")))
- (object Attribute
- tool "MSVC"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "MSVC"
- name "default__Module-Body"
- value (list Attribute_Set
- (object Attribute
- tool "MSVC"
- name "GenerateIncludesGroup"
- value FALSE)
- (object Attribute
- tool "MSVC"
- name "AFX_INCLUDES_Entries"
- value (value Text ""))
- (object Attribute
- tool "MSVC"
- name "GenerateInsertLocation"
- value FALSE)))
- (object Attribute
- tool "cg"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "TypeLibImporter"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "propertyId"
- value "783606378")
- (object Attribute
- tool "Visual Basic"
- name "default__Class"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "CreatableSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "Private"
- value 221)
- (object Attribute
- tool "Visual Basic"
- name "PublicNotCreatable"
- value 213)
- (object Attribute
- tool "Visual Basic"
- name "SingleUse"
- value 214)
- (object Attribute
- tool "Visual Basic"
- name "GlobalSingleUse"
- value 215)
- (object Attribute
- tool "Visual Basic"
- name "MultiUse"
- value 219)
- (object Attribute
- tool "Visual Basic"
- name "GlobalMultiUse"
- value 220)))
- (object Attribute
- tool "Visual Basic"
- name "OptionBase"
- value "0")
- (object Attribute
- tool "Visual Basic"
- name "OptionExplicit"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "OptionCompare"
- value ("CompareSet" 202))
- (object Attribute
- tool "Visual Basic"
- name "Creatable"
- value ("CreatableSet" 221))
- (object Attribute
- tool "Visual Basic"
- name "GenerateInitialization"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "GenerateTermination"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "CollectionClass"
- value "Collection")
- (object Attribute
- tool "Visual Basic"
- name "CompareSet"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "None"
- value 202)
- (object Attribute
- tool "Visual Basic"
- name "Binary"
- value 203)
- (object Attribute
- tool "Visual Basic"
- name "Text"
- value 204)))))
- (object Attribute
- tool "Visual Basic"
- name "default__Operation"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "OperationName"
- value "$operation")
- (object Attribute
- tool "Visual Basic"
- name "LibraryName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "AliasName"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "IsStatic"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "EntryCode"
- value (value Text ""))
- (object Attribute
- tool "Visual Basic"
- name "ExitCode"
- value (value Text ""))))
- (object Attribute
- tool "Visual Basic"
- name "default__Attribute"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "IsConst"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "NameIfUnlabeled"
- value "the$supplier")
- (object Attribute
- tool "Visual Basic"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "Visual Basic"
- name "GenerateGetOperation"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "GenerateSetOperation"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "GenerateLetOperation"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Role"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "New"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "WithEvents"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "Subscript"
- value "")
- (object Attribute
- tool "Visual Basic"
- name "NameIfUnlabeled"
- value "the$supplier")
- (object Attribute
- tool "Visual Basic"
- name "GenerateDataMember"
- value TRUE)
- (object Attribute
- tool "Visual Basic"
- name "DataMemberName"
- value "$relationship")
- (object Attribute
- tool "Visual Basic"
- name "GenerateGetOperation"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "GenerateSetOperation"
- value FALSE)
- (object Attribute
- tool "Visual Basic"
- name "GenerateLetOperation"
- value FALSE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Inherit"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ImplementsDelegation"
- value TRUE)))
- (object Attribute
- tool "Visual Basic"
- name "default__Module-Spec"
- value (list Attribute_Set
- (object Attribute
- tool "Visual Basic"
- name "ProjectFile"
- value "")))
- (object Attribute
- tool "Visual Basic"
- name "HiddenTool"
- value FALSE)
- (object Attribute
- tool "VisualStudio"
- name "HiddenTool"
- value FALSE))
- quid "3FAA8E8700C1"))
diff --git a/branches/sdo-1.1.1-incubating/impl/pom.xml b/branches/sdo-1.1.1-incubating/impl/pom.xml
deleted file mode 100644
index b658aa8d93..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/pom.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
-
- 4.0.0
- tuscany-sdo-impl
- Tuscany SDO Implementation
- Tuscany implementation of SDO API.
-
-
-
- codehaus
- Codehaus maven repository
- http://repository.codehaus.org/
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-lib
- ${sdo.version}
- compile
-
-
-
- org.eclipse.emf
- common
- ${emfVersion}
- compile
-
-
- org.eclipse.emf
- ecore
- ${emfVersion}
- compile
-
-
- org.eclipse.emf
- ecore-change
- ${emfVersion}
- compile
-
-
- org.eclipse.emf
- ecore-xmi
- ${emfVersion}
- compile
-
-
- org.eclipse.xsd
- xsd
- ${emfVersion}
- compile
-
-
-
- backport-util-concurrent
- backport-util-concurrent
- 3.0
-
-
-
-
- asm
- asm
- 2.2
- provided
- true
-
-
-
-
- stax
- stax-api
- 1.0.1
-
-
-
- org.codehaus.woodstox
- wstx-asl
- 3.2.1
-
-
-
-
- org.apache.felix
- org.apache.felix.main
- 1.0.1
-
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
-
-
-
- maven-jar-plugin
-
-
-
- org.apache
- 1.1.1-incubating-SNAPSHOT
- 1.4
- 1.4
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.1
-
-
-
- ${project.artifactId}
- ${project.name}
- ${project.organization.name}
- ${version}
- ${project.artifactId}
- ${project.organization.name}
- org.apache
- ${project.version}
-
- 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
- commonj.sdo.impl,org.apache.tuscany.sdo,org.apache.tuscany.sdo.helper,org.apache.tuscany.sdo.impl,org.apache.tuscany.sdo.test,org.apache.tuscany.sdo.util
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
- ${basedir}/src/main/java/org/apache/tuscany/sdo/overview.html
- 2.0
- 1.4
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java
deleted file mode 100644
index 79deec6d29..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java
+++ /dev/null
@@ -1,37 +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;
-
-import commonj.sdo.DataObject;
-
-import org.eclipse.emf.ecore.xml.type.AnyType;
-
-/**
- *
- * A representation of the model object 'Any Type Data Object'.
- *
- *
- *
- * @see org.apache.tuscany.sdo.SDOPackage#getAnyTypeDataObject()
- * @model extendedMetaData="kind='mixed'"
- * @generated
- */
-public interface AnyTypeDataObject extends DataObject, AnyType {
-} // AnyTypeDataObject
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java
deleted file mode 100644
index ad546cc614..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java
+++ /dev/null
@@ -1,39 +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;
-
-import java.util.List;
-
-import org.apache.tuscany.sdo.helper.SDOExtendedMetaDataImpl;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-public interface SDOExtendedMetaData extends ExtendedMetaData {
-
- SDOExtendedMetaData INSTANCE = new SDOExtendedMetaDataImpl();
-
- List getAliasNames(EModelElement eModelElement);
-
- void setAliasNames(EModelElement eModelElement, List aliasNames);
-
- void setAliasNames(EModelElement eModelElement, String aliasNames);
-
- void setFeatureNamespaceMatchingLax(boolean featureNamespaceMatchingLax);
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java
deleted file mode 100644
index 04ef0d714a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java
+++ /dev/null
@@ -1,185 +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;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @see org.apache.tuscany.sdo.SDOPackage
- * @generated
- */
-public interface SDOFactory extends EFactory{
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- SDOFactory eINSTANCE = org.apache.tuscany.sdo.impl.SDOFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Change Summary'.
- *
- *
- * @return a new object of class 'Change Summary'.
- * @generated
- */
- ChangeSummary createChangeSummary();
-
- /**
- * Returns a new object of class 'Change Summary Setting'.
- *
- *
- * @return a new object of class 'Change Summary Setting'.
- * @generated
- */
- ChangeSummary.Setting createChangeSummarySetting();
-
- /**
- * Returns a new object of class 'Data Graph'.
- *
- *
- * @return a new object of class 'Data Graph'.
- * @generated
- */
- DataGraph createDataGraph();
-
- /**
- * Returns a new object of class 'Any Type Data Object'.
- *
- *
- * @return a new object of class 'Any Type Data Object'.
- * @generated
- */
- AnyTypeDataObject createAnyTypeDataObject();
-
- /**
- * Returns a new object of class 'Simple Any Type Data Object'.
- *
- *
- * @return a new object of class 'Simple Any Type Data Object'.
- * @generated
- */
- SimpleAnyTypeDataObject createSimpleAnyTypeDataObject();
-
- /**
- * Returns a new object of class 'Class'.
- *
- *
- * @return a new object of class 'Class'.
- * @generated
- */
- Type createClass();
-
- /**
- * Returns a new object of class 'Data Type'.
- *
- *
- * @return a new object of class 'Data Type'.
- * @generated
- */
- Type createDataType();
-
- /**
- * Returns a new object of class 'Attribute'.
- *
- *
- * @return a new object of class 'Attribute'.
- * @generated
- */
- Property createAttribute();
-
- /**
- * Returns a new object of class 'Reference'.
- *
- *
- * @return a new object of class 'Reference'.
- * @generated
- */
- Property createReference();
-
- /**
- * Returns a new object of class 'Enum'.
- *
- *
- * @return a new object of class 'Enum'.
- * @generated
- */
- Type createEnum();
-
- /**
- * Returns a new object of class 'Dynamic Data Object'.
- *
- *
- * @return a new object of class 'Dynamic Data Object'.
- * @generated
- */
- DataObject createDynamicDataObject();
-
- /**
- * Returns a new object of class 'Store Data Object'.
- *
- *
- * @return a new object of class 'Store Data Object'.
- * @generated
- */
- DataObject createStoreDataObject();
-
- /**
- * Returns a new object of class 'Dynamic Store Data Object'.
- *
- *
- * @return a new object of class 'Dynamic Store Data Object'.
- * @generated
- */
- DataObject createDynamicStoreDataObject();
-
- /**
- * Returns a new object of class 'Extensible Data Object'.
- *
- *
- * @return a new object of class 'Extensible Data Object'.
- * @generated
- */
- DataObject createExtensibleDataObject();
-
- /**
- * Returns the package supported by this factory.
- *
- *
- * @return the package supported by this factory.
- * @generated
- */
- SDOPackage getSDOPackage();
-
- ChangeSummary.Setting createChangeSummarySetting(EStructuralFeature eStructuralFeature, Object value, boolean isSet);
-
-} //SDOFactory
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java
deleted file mode 100644
index a21f2308ab..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java
+++ /dev/null
@@ -1,1657 +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;
-
-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.EcorePackage;
-import org.eclipse.emf.ecore.change.ChangePackage;
-
-/**
- *
- * The Package for the model.
- * It contains accessors for the meta objects to represent
- *
- *
each class,
- *
each feature of each class,
- *
each enum,
- *
and each data type
- *
- *
- * @see org.apache.tuscany.sdo.SDOFactory
- * @model kind="package"
- * @generated
- */
-public interface SDOPackage extends EPackage{
- /**
- * The package name.
- *
- *
- * @generated
- */
- String eNAME = "sdo";
-
- /**
- * The package namespace URI.
- *
- *
- * @generated
- */
- String eNS_URI = "http://www.apache.org/tuscany/2005/SDO";
-
- /**
- * The package namespace name.
- *
- *
- * @generated
- */
- String eNS_PREFIX = "sdo";
-
- /**
- * The singleton instance of the package.
- *
- *
- * @generated
- */
- SDOPackage eINSTANCE = org.apache.tuscany.sdo.impl.SDOPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.DataGraphImpl Data Graph}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.DataGraphImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getDataGraph()
- * @generated
- */
- int DATA_GRAPH = 2;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.ChangeSummaryImpl Change Summary}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.ChangeSummaryImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getChangeSummary()
- * @generated
- */
- int CHANGE_SUMMARY = 0;
-
- /**
- * The feature id for the 'Object Changes' map.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY__OBJECT_CHANGES = ChangePackage.CHANGE_DESCRIPTION__OBJECT_CHANGES;
-
- /**
- * The feature id for the 'Objects To Detach' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY__OBJECTS_TO_DETACH = ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH;
-
- /**
- * The feature id for the 'Objects To Attach' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY__OBJECTS_TO_ATTACH = ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH;
-
- /**
- * The feature id for the 'Resource Changes' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY__RESOURCE_CHANGES = ChangePackage.CHANGE_DESCRIPTION__RESOURCE_CHANGES;
-
- /**
- * The feature id for the 'EData Graph' reference.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY__EDATA_GRAPH = ChangePackage.CHANGE_DESCRIPTION_FEATURE_COUNT + 0;
-
-//TODO T-153
-// /**
-// * The feature id for the 'EData Graph' reference.
-// *
-// *
-// * *handcrafted but could be generated
-// * @ordered
-// */
-// int CHANGE_SUMMARY__EDATA_OBJECT = ChangePackage.CHANGE_DESCRIPTION_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the 'Change Summary' class.
- *
- *
- * @generated NOT
- * @ordered
- */
-//TODO T-153
- int CHANGE_SUMMARY_FEATURE_COUNT = ChangePackage.CHANGE_DESCRIPTION_FEATURE_COUNT + 1;
- //int CHANGE_SUMMARY_FEATURE_COUNT = ChangePackage.CHANGE_DESCRIPTION_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.ChangeSummarySettingImpl Change Summary Setting}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.ChangeSummarySettingImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getChangeSummarySetting()
- * @generated
- */
- int CHANGE_SUMMARY_SETTING = 1;
-
- /**
- * The feature id for the 'Feature Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__FEATURE_NAME = ChangePackage.FEATURE_CHANGE__FEATURE_NAME;
-
- /**
- * The feature id for the 'Data Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__DATA_VALUE = ChangePackage.FEATURE_CHANGE__DATA_VALUE;
-
- /**
- * The feature id for the 'Set' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__SET = ChangePackage.FEATURE_CHANGE__SET;
-
- /**
- * The feature id for the 'Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__VALUE = ChangePackage.FEATURE_CHANGE__VALUE;
-
- /**
- * The feature id for the 'Feature' reference.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__FEATURE = ChangePackage.FEATURE_CHANGE__FEATURE;
-
- /**
- * The feature id for the 'Reference Value' reference.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__REFERENCE_VALUE = ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE;
-
- /**
- * The feature id for the 'List Changes' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING__LIST_CHANGES = ChangePackage.FEATURE_CHANGE__LIST_CHANGES;
-
- /**
- * The number of structural features of the 'Change Summary Setting' class.
- *
- *
- * @generated
- * @ordered
- */
- int CHANGE_SUMMARY_SETTING_FEATURE_COUNT = ChangePackage.FEATURE_CHANGE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Resource Set' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_GRAPH__RESOURCE_SET = EcorePackage.EOBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Root Resource' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_GRAPH__ROOT_RESOURCE = EcorePackage.EOBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the 'EChange Summary' reference.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_GRAPH__ECHANGE_SUMMARY = EcorePackage.EOBJECT_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the 'ERoot Object' reference.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_GRAPH__EROOT_OBJECT = EcorePackage.EOBJECT_FEATURE_COUNT + 3;
-
- /**
- * The number of structural features of the 'Data Graph' class.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_GRAPH_FEATURE_COUNT = EcorePackage.EOBJECT_FEATURE_COUNT + 4;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.DataObjectImpl Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.DataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getDataObject()
- * @generated
- */
- int DATA_OBJECT = 3;
-
- /**
- * The meta object id for the '{@link commonj.sdo.Property Property}' class.
- *
- *
- * @see commonj.sdo.Property
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getProperty()
- * @generated
- */
- int PROPERTY = 4;
-
- /**
- * The meta object id for the '{@link commonj.sdo.Sequence Sequence}' class.
- *
- *
- * @see commonj.sdo.Sequence
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getSequence()
- * @generated
- */
- int SEQUENCE = 5;
-
- /**
- * The meta object id for the '{@link commonj.sdo.Type Type}' class.
- *
- *
- * @see commonj.sdo.Type
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getType()
- * @generated
- */
- int TYPE = 6;
-
- /**
- * The number of structural features of the 'Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_OBJECT_FEATURE_COUNT = 0;
-
- /**
- * The number of structural features of the 'Property' class.
- *
- *
- * @generated
- * @ordered
- */
- int PROPERTY_FEATURE_COUNT = 0;
-
- /**
- * The number of structural features of the 'Sequence' class.
- *
- *
- * @generated
- * @ordered
- */
- int SEQUENCE_FEATURE_COUNT = 0;
-
- /**
- * The number of structural features of the 'Type' class.
- *
- *
- * @generated
- * @ordered
- */
- int TYPE_FEATURE_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl Any Type Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getAnyTypeDataObject()
- * @generated
- */
- int ANY_TYPE_DATA_OBJECT = 7;
-
- /**
- * The feature id for the 'Mixed' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int ANY_TYPE_DATA_OBJECT__MIXED = DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Any' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int ANY_TYPE_DATA_OBJECT__ANY = DATA_OBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the 'Any Attribute' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE = DATA_OBJECT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the 'Any Type Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int ANY_TYPE_DATA_OBJECT_FEATURE_COUNT = DATA_OBJECT_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.SimpleAnyTypeDataObjectImpl Simple Any Type Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.SimpleAnyTypeDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getSimpleAnyTypeDataObject()
- * @generated
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT = 8;
-
- /**
- * The feature id for the 'Mixed' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__MIXED = ANY_TYPE_DATA_OBJECT__MIXED;
-
- /**
- * The feature id for the 'Any' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__ANY = ANY_TYPE_DATA_OBJECT__ANY;
-
- /**
- * The feature id for the 'Any Attribute' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE = ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the 'Raw Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE = ANY_TYPE_DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the 'Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE = ANY_TYPE_DATA_OBJECT_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the 'Instance Type' reference.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE = ANY_TYPE_DATA_OBJECT_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the 'Simple Any Type Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int SIMPLE_ANY_TYPE_DATA_OBJECT_FEATURE_COUNT = ANY_TYPE_DATA_OBJECT_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.ClassImpl Class}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.ClassImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getClass_()
- * @generated
- */
- int CLASS = 9;
-
- /**
- * The feature id for the 'EAnnotations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS;
-
- /**
- * The feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__NAME = EcorePackage.ECLASS__NAME;
-
- /**
- * The feature id for the 'Instance Class Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the 'Instance Class' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS;
-
- /**
- * The feature id for the 'Default Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE;
-
- /**
- * The feature id for the 'EPackage' container reference.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EPACKAGE = EcorePackage.ECLASS__EPACKAGE;
-
- /**
- * The feature id for the 'Abstract' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__ABSTRACT = EcorePackage.ECLASS__ABSTRACT;
-
- /**
- * The feature id for the 'Interface' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__INTERFACE = EcorePackage.ECLASS__INTERFACE;
-
- /**
- * The feature id for the 'ESuper Types' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES;
-
- /**
- * The feature id for the 'EOperations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS;
-
- /**
- * The feature id for the 'EAll Attributes' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES;
-
- /**
- * The feature id for the 'EAll References' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES;
-
- /**
- * The feature id for the 'EReferences' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EREFERENCES = EcorePackage.ECLASS__EREFERENCES;
-
- /**
- * The feature id for the 'EAttributes' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES;
-
- /**
- * The feature id for the 'EAll Containments' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS;
-
- /**
- * The feature id for the 'EAll Operations' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS;
-
- /**
- * The feature id for the 'EAll Structural Features' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES;
-
- /**
- * The feature id for the 'EAll Super Types' reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES;
-
- /**
- * The feature id for the 'EID Attribute' reference.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE;
-
- /**
- * The feature id for the 'EStructural Features' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS__ESTRUCTURAL_FEATURES = EcorePackage.ECLASS__ESTRUCTURAL_FEATURES;
-
- /**
- * The number of structural features of the 'Class' class.
- *
- *
- * @generated
- * @ordered
- */
- int CLASS_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.DataTypeImpl Data Type}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.DataTypeImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getDataType()
- * @generated
- */
- int DATA_TYPE = 10;
-
- /**
- * The feature id for the 'EAnnotations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__EANNOTATIONS = EcorePackage.EDATA_TYPE__EANNOTATIONS;
-
- /**
- * The feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__NAME = EcorePackage.EDATA_TYPE__NAME;
-
- /**
- * The feature id for the 'Instance Class Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__INSTANCE_CLASS_NAME = EcorePackage.EDATA_TYPE__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the 'Instance Class' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__INSTANCE_CLASS = EcorePackage.EDATA_TYPE__INSTANCE_CLASS;
-
- /**
- * The feature id for the 'Default Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__DEFAULT_VALUE = EcorePackage.EDATA_TYPE__DEFAULT_VALUE;
-
- /**
- * The feature id for the 'EPackage' container reference.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__EPACKAGE = EcorePackage.EDATA_TYPE__EPACKAGE;
-
- /**
- * The feature id for the 'Serializable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE__SERIALIZABLE = EcorePackage.EDATA_TYPE__SERIALIZABLE;
-
- /**
- * The number of structural features of the 'Data Type' class.
- *
- *
- * @generated
- * @ordered
- */
- int DATA_TYPE_FEATURE_COUNT = EcorePackage.EDATA_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.AttributeImpl Attribute}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.AttributeImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getAttribute()
- * @generated
- */
- int ATTRIBUTE = 11;
-
- /**
- * The feature id for the 'EAnnotations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__EANNOTATIONS = EcorePackage.EATTRIBUTE__EANNOTATIONS;
-
- /**
- * The feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__NAME = EcorePackage.EATTRIBUTE__NAME;
-
- /**
- * The feature id for the 'Ordered' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__ORDERED = EcorePackage.EATTRIBUTE__ORDERED;
-
- /**
- * The feature id for the 'Unique' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__UNIQUE = EcorePackage.EATTRIBUTE__UNIQUE;
-
- /**
- * The feature id for the 'Lower Bound' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__LOWER_BOUND = EcorePackage.EATTRIBUTE__LOWER_BOUND;
-
- /**
- * The feature id for the 'Upper Bound' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__UPPER_BOUND = EcorePackage.EATTRIBUTE__UPPER_BOUND;
-
- /**
- * The feature id for the 'Many' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__MANY = EcorePackage.EATTRIBUTE__MANY;
-
- /**
- * The feature id for the 'Required' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__REQUIRED = EcorePackage.EATTRIBUTE__REQUIRED;
-
- /**
- * The feature id for the 'EType' reference.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__ETYPE = EcorePackage.EATTRIBUTE__ETYPE;
-
- /**
- * The feature id for the 'Changeable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__CHANGEABLE = EcorePackage.EATTRIBUTE__CHANGEABLE;
-
- /**
- * The feature id for the 'Volatile' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__VOLATILE = EcorePackage.EATTRIBUTE__VOLATILE;
-
- /**
- * The feature id for the 'Transient' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__TRANSIENT = EcorePackage.EATTRIBUTE__TRANSIENT;
-
- /**
- * The feature id for the 'Default Value Literal' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__DEFAULT_VALUE_LITERAL = EcorePackage.EATTRIBUTE__DEFAULT_VALUE_LITERAL;
-
- /**
- * The feature id for the 'Default Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__DEFAULT_VALUE = EcorePackage.EATTRIBUTE__DEFAULT_VALUE;
-
- /**
- * The feature id for the 'Unsettable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__UNSETTABLE = EcorePackage.EATTRIBUTE__UNSETTABLE;
-
- /**
- * The feature id for the 'Derived' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__DERIVED = EcorePackage.EATTRIBUTE__DERIVED;
-
- /**
- * The feature id for the 'EContaining Class' container reference.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__ECONTAINING_CLASS = EcorePackage.EATTRIBUTE__ECONTAINING_CLASS;
-
- /**
- * The feature id for the 'ID' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__ID = EcorePackage.EATTRIBUTE__ID;
-
- /**
- * The feature id for the 'EAttribute Type' reference.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE__EATTRIBUTE_TYPE = EcorePackage.EATTRIBUTE__EATTRIBUTE_TYPE;
-
- /**
- * The number of structural features of the 'Attribute' class.
- *
- *
- * @generated
- * @ordered
- */
- int ATTRIBUTE_FEATURE_COUNT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.ReferenceImpl Reference}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.ReferenceImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getReference()
- * @generated
- */
- int REFERENCE = 12;
-
- /**
- * The feature id for the 'EAnnotations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__EANNOTATIONS = EcorePackage.EREFERENCE__EANNOTATIONS;
-
- /**
- * The feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__NAME = EcorePackage.EREFERENCE__NAME;
-
- /**
- * The feature id for the 'Ordered' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__ORDERED = EcorePackage.EREFERENCE__ORDERED;
-
- /**
- * The feature id for the 'Unique' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__UNIQUE = EcorePackage.EREFERENCE__UNIQUE;
-
- /**
- * The feature id for the 'Lower Bound' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__LOWER_BOUND = EcorePackage.EREFERENCE__LOWER_BOUND;
-
- /**
- * The feature id for the 'Upper Bound' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__UPPER_BOUND = EcorePackage.EREFERENCE__UPPER_BOUND;
-
- /**
- * The feature id for the 'Many' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__MANY = EcorePackage.EREFERENCE__MANY;
-
- /**
- * The feature id for the 'Required' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__REQUIRED = EcorePackage.EREFERENCE__REQUIRED;
-
- /**
- * The feature id for the 'EType' reference.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__ETYPE = EcorePackage.EREFERENCE__ETYPE;
-
- /**
- * The feature id for the 'Changeable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__CHANGEABLE = EcorePackage.EREFERENCE__CHANGEABLE;
-
- /**
- * The feature id for the 'Volatile' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__VOLATILE = EcorePackage.EREFERENCE__VOLATILE;
-
- /**
- * The feature id for the 'Transient' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__TRANSIENT = EcorePackage.EREFERENCE__TRANSIENT;
-
- /**
- * The feature id for the 'Default Value Literal' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__DEFAULT_VALUE_LITERAL = EcorePackage.EREFERENCE__DEFAULT_VALUE_LITERAL;
-
- /**
- * The feature id for the 'Default Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__DEFAULT_VALUE = EcorePackage.EREFERENCE__DEFAULT_VALUE;
-
- /**
- * The feature id for the 'Unsettable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__UNSETTABLE = EcorePackage.EREFERENCE__UNSETTABLE;
-
- /**
- * The feature id for the 'Derived' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__DERIVED = EcorePackage.EREFERENCE__DERIVED;
-
- /**
- * The feature id for the 'EContaining Class' container reference.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__ECONTAINING_CLASS = EcorePackage.EREFERENCE__ECONTAINING_CLASS;
-
- /**
- * The feature id for the 'Containment' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__CONTAINMENT = EcorePackage.EREFERENCE__CONTAINMENT;
-
- /**
- * The feature id for the 'Container' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__CONTAINER = EcorePackage.EREFERENCE__CONTAINER;
-
- /**
- * The feature id for the 'Resolve Proxies' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__RESOLVE_PROXIES = EcorePackage.EREFERENCE__RESOLVE_PROXIES;
-
- /**
- * The feature id for the 'EOpposite' reference.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__EOPPOSITE = EcorePackage.EREFERENCE__EOPPOSITE;
-
- /**
- * The feature id for the 'EReference Type' reference.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE__EREFERENCE_TYPE = EcorePackage.EREFERENCE__EREFERENCE_TYPE;
-
- /**
- * The number of structural features of the 'Reference' class.
- *
- *
- * @generated
- * @ordered
- */
- int REFERENCE_FEATURE_COUNT = EcorePackage.EREFERENCE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.EnumImpl Enum}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.EnumImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getEnum()
- * @generated
- */
- int ENUM = 13;
-
- /**
- * The feature id for the 'EAnnotations' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__EANNOTATIONS = EcorePackage.EENUM__EANNOTATIONS;
-
- /**
- * The feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__NAME = EcorePackage.EENUM__NAME;
-
- /**
- * The feature id for the 'Instance Class Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__INSTANCE_CLASS_NAME = EcorePackage.EENUM__INSTANCE_CLASS_NAME;
-
- /**
- * The feature id for the 'Instance Class' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__INSTANCE_CLASS = EcorePackage.EENUM__INSTANCE_CLASS;
-
- /**
- * The feature id for the 'Default Value' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__DEFAULT_VALUE = EcorePackage.EENUM__DEFAULT_VALUE;
-
- /**
- * The feature id for the 'EPackage' container reference.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__EPACKAGE = EcorePackage.EENUM__EPACKAGE;
-
- /**
- * The feature id for the 'Serializable' attribute.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__SERIALIZABLE = EcorePackage.EENUM__SERIALIZABLE;
-
- /**
- * The feature id for the 'ELiterals' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM__ELITERALS = EcorePackage.EENUM__ELITERALS;
-
- /**
- * The number of structural features of the 'Enum' class.
- *
- *
- * @generated
- * @ordered
- */
- int ENUM_FEATURE_COUNT = EcorePackage.EENUM_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.DynamicDataObjectImpl Dynamic Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.DynamicDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getDynamicDataObject()
- * @generated
- */
- int DYNAMIC_DATA_OBJECT = 14;
-
- /**
- * The number of structural features of the 'Dynamic Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int DYNAMIC_DATA_OBJECT_FEATURE_COUNT = DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.StoreDataObjectImpl Store Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.StoreDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getStoreDataObject()
- * @generated
- */
- int STORE_DATA_OBJECT = 15;
-
- /**
- * The number of structural features of the 'Store Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int STORE_DATA_OBJECT_FEATURE_COUNT = DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.DynamicStoreDataObjectImpl Dynamic Store Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.DynamicStoreDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getDynamicStoreDataObject()
- * @generated
- */
- int DYNAMIC_STORE_DATA_OBJECT = 16;
-
- /**
- * The number of structural features of the 'Dynamic Store Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int DYNAMIC_STORE_DATA_OBJECT_FEATURE_COUNT = STORE_DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl Extensible Data Object}' class.
- *
- *
- * @see org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getExtensibleDataObject()
- * @generated
- */
- int EXTENSIBLE_DATA_OBJECT = 17;
-
- /**
- * The number of structural features of the 'Extensible Data Object' class.
- *
- *
- * @generated
- * @ordered
- */
- int EXTENSIBLE_DATA_OBJECT_FEATURE_COUNT = DATA_OBJECT_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the 'EJava List' data type.
- *
- *
- * @see java.util.List
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getEJavaList()
- * @generated
- */
- int EJAVA_LIST = 18;
-
- /**
- * The meta object id for the 'EObject Stream Exception' data type.
- *
- *
- * @see java.io.ObjectStreamException
- * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getEObjectStreamException()
- * @generated
- */
- int EOBJECT_STREAM_EXCEPTION = 19;
-
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.ChangeSummary Change Summary}'.
- *
- *
- * @return the meta object for class 'Change Summary'.
- * @see commonj.sdo.ChangeSummary
- * @model instanceClass="commonj.sdo.ChangeSummary"
- * @generated
- */
- EClass getChangeSummary();
-
- /**
- * Returns the meta object for the reference '{@link commonj.sdo.ChangeSummary#getEDataGraph EData Graph}'.
- *
- *
- * @return the meta object for the reference 'EData Graph'.
- * @see commonj.sdo.ChangeSummary#getEDataGraph()
- * @see #getChangeSummary()
- * @generated
- */
- EReference getChangeSummary_EDataGraph();
-
-// TODO T-153
-// /**
-// * Returns the meta object for the reference '{@link commonj.sdo.ChangeSummary#getEDataGraph EData Graph}'.
-// *
-// *
-// * @return the meta object for the reference 'EData Graph'.
-// * @see commonj.sdo.ChangeSummary#getEDataGraph()
-// * @see #getChangeSummary()
-// * *handcrafted but could be generated
-// */
-// EReference getChangeSummary_EDataObject();
-
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.ChangeSummary.Setting Change Summary Setting}'.
- *
- *
- * @return the meta object for class 'Change Summary Setting'.
- * @see commonj.sdo.ChangeSummary.Setting
- * @model instanceClass="commonj.sdo.ChangeSummary$Setting"
- * @generated
- */
- EClass getChangeSummarySetting();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataGraph Data Graph}'.
- *
- *
- * @return the meta object for class 'Data Graph'.
- * @see commonj.sdo.DataGraph
- * @model instanceClass="commonj.sdo.DataGraph"
- * @generated
- */
- EClass getDataGraph();
-
- /**
- * Returns the meta object for the attribute '{@link commonj.sdo.DataGraph#getResourceSet Resource Set}'.
- *
- *
- * @return the meta object for the attribute 'Resource Set'.
- * @see commonj.sdo.DataGraph#getResourceSet()
- * @see #getDataGraph()
- * @generated
- */
- EAttribute getDataGraph_ResourceSet();
-
- /**
- * Returns the meta object for the attribute '{@link commonj.sdo.DataGraph#getRootResource Root Resource}'.
- *
- *
- * @return the meta object for the attribute 'Root Resource'.
- * @see commonj.sdo.DataGraph#getRootResource()
- * @see #getDataGraph()
- * @generated
- */
- EAttribute getDataGraph_RootResource();
-
- /**
- * Returns the meta object for the reference '{@link commonj.sdo.DataGraph#getEChangeSummary EChange Summary}'.
- *
- *
- * @return the meta object for the reference 'EChange Summary'.
- * @see commonj.sdo.DataGraph#getEChangeSummary()
- * @see #getDataGraph()
- * @generated
- */
- EReference getDataGraph_EChangeSummary();
-
- /**
- * Returns the meta object for the reference '{@link commonj.sdo.DataGraph#getERootObject ERoot Object}'.
- *
- *
- * @return the meta object for the reference 'ERoot Object'.
- * @see commonj.sdo.DataGraph#getERootObject()
- * @see #getDataGraph()
- * @generated
- */
- EReference getDataGraph_ERootObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataObject Data Object}'.
- *
- *
- * @return the meta object for class 'Data Object'.
- * @see commonj.sdo.DataObject
- * @model instanceClass="commonj.sdo.DataObject"
- * @generated
- */
- EClass getDataObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Property Property}'.
- *
- *
- * @return the meta object for class 'Property'.
- * @see commonj.sdo.Property
- * @model instanceClass="commonj.sdo.Property"
- * @generated
- */
- EClass getProperty();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Sequence Sequence}'.
- *
- *
- * @return the meta object for class 'Sequence'.
- * @see commonj.sdo.Sequence
- * @model instanceClass="commonj.sdo.Sequence"
- * @generated
- */
- EClass getSequence();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Type Type}'.
- *
- *
- * @return the meta object for class 'Type'.
- * @see commonj.sdo.Type
- * @model instanceClass="commonj.sdo.Type"
- * @generated
- */
- EClass getType();
-
- /**
- * Returns the meta object for class '{@link org.apache.tuscany.sdo.AnyTypeDataObject Any Type Data Object}'.
- *
- *
- * @return the meta object for class 'Any Type Data Object'.
- * @see org.apache.tuscany.sdo.AnyTypeDataObject
- * @generated
- */
- EClass getAnyTypeDataObject();
-
- /**
- * Returns the meta object for class '{@link org.apache.tuscany.sdo.SimpleAnyTypeDataObject Simple Any Type Data Object}'.
- *
- *
- * @return the meta object for class 'Simple Any Type Data Object'.
- * @see org.apache.tuscany.sdo.SimpleAnyTypeDataObject
- * @generated
- */
- EClass getSimpleAnyTypeDataObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Type Class}'.
- *
- *
- * @return the meta object for class 'Class'.
- * @see commonj.sdo.Type
- * @model instanceClass="commonj.sdo.Type"
- * @generated
- */
- EClass getClass_();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Type Data Type}'.
- *
- *
- * @return the meta object for class 'Data Type'.
- * @see commonj.sdo.Type
- * @model instanceClass="commonj.sdo.Type"
- * @generated
- */
- EClass getDataType();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Property Attribute}'.
- *
- *
- * @return the meta object for class 'Attribute'.
- * @see commonj.sdo.Property
- * @model instanceClass="commonj.sdo.Property"
- * @generated
- */
- EClass getAttribute();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Property Reference}'.
- *
- *
- * @return the meta object for class 'Reference'.
- * @see commonj.sdo.Property
- * @model instanceClass="commonj.sdo.Property"
- * @generated
- */
- EClass getReference();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.Type Enum}'.
- *
- *
- * @return the meta object for class 'Enum'.
- * @see commonj.sdo.Type
- * @model instanceClass="commonj.sdo.Type"
- * @generated
- */
- EClass getEnum();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataObject Dynamic Data Object}'.
- *
- *
- * @return the meta object for class 'Dynamic Data Object'.
- * @see commonj.sdo.DataObject
- * @model instanceClass="commonj.sdo.DataObject"
- * @generated
- */
- EClass getDynamicDataObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataObject Store Data Object}'.
- *
- *
- * @return the meta object for class 'Store Data Object'.
- * @see commonj.sdo.DataObject
- * @model instanceClass="commonj.sdo.DataObject"
- * @generated
- */
- EClass getStoreDataObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataObject Dynamic Store Data Object}'.
- *
- *
- * @return the meta object for class 'Dynamic Store Data Object'.
- * @see commonj.sdo.DataObject
- * @model instanceClass="commonj.sdo.DataObject"
- * @generated
- */
- EClass getDynamicStoreDataObject();
-
- /**
- * Returns the meta object for class '{@link commonj.sdo.DataObject Extensible Data Object}'.
- *
- *
- * @return the meta object for class 'Extensible Data Object'.
- * @see commonj.sdo.DataObject
- * @model instanceClass="commonj.sdo.DataObject"
- * @generated
- */
- EClass getExtensibleDataObject();
-
- /**
- * Returns the meta object for data type '{@link java.util.List EJava List}'.
- *
- *
- * @return the meta object for data type 'EJava List'.
- * @see java.util.List
- * @model instanceClass="java.util.List" serializable="false"
- * @generated
- */
- EDataType getEJavaList();
-
- /**
- * Returns the meta object for data type '{@link java.io.ObjectStreamException EObject Stream Exception}'.
- *
- *
- * @return the meta object for data type 'EObject Stream Exception'.
- * @see java.io.ObjectStreamException
- * @model instanceClass="java.io.ObjectStreamException" serializable="false"
- * @generated
- */
- EDataType getEObjectStreamException();
-
- /**
- * Returns the factory that creates the instances of the model.
- *
- *
- * @return the factory that creates the instances of the model.
- * @generated
- */
- SDOFactory getSDOFactory();
-
-} //SDOPackage
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java
deleted file mode 100644
index 5d3640100c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java
+++ /dev/null
@@ -1,49 +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;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- * Visitor interface that allows applications to process SDO type metadata.
- *
- * @version $Rev$ $Date$
- */
-public interface SDOTypeVisitor {
- /**
- * Visit a type definition.
- *
- * @param type the type to visit
- */
- void visitType(Type type);
-
- /**
- * Visit a property definition.
- *
- * @param property the property to visit
- */
- void visitProperty(Property property);
-
- /**
- * Visit after all properties.
- */
- void visitEnd();
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java
deleted file mode 100644
index 93ff2ebf14..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.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 org.apache.tuscany.sdo;
-
-import org.eclipse.emf.ecore.xml.type.SimpleAnyType;
-
-/**
- *
- * A representation of the model object 'Simple Any Type Data Object'.
- *
- *
- *
- * @see org.apache.tuscany.sdo.SDOPackage#getSimpleAnyTypeDataObject()
- * @model extendedMetaData="kind='simple'"
- * @generated
- */
-public interface SimpleAnyTypeDataObject extends AnyTypeDataObject, SimpleAnyType {
-} // SimpleAnyTypeDataObject
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
deleted file mode 100644
index 3fe2cd952e..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
+++ /dev/null
@@ -1,98 +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.codegen;
-
-import java.util.List;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import org.objectweb.asm.ClassWriter;
-import org.objectweb.asm.Opcodes;
-
-import org.apache.tuscany.sdo.SDOTypeVisitor;
-
-/**
- * Implementation of a generator that will directly emit bytecode for an interface that
- * corresponds to the static properties of a SDO type.
- *
- * @version $Rev$ $Date$
- */
-public class BytecodeInterfaceGenerator implements SDOTypeVisitor {
- private final ClassWriter cw;
-
- public BytecodeInterfaceGenerator() {
- cw = new ClassWriter(false);
- }
-
- public void visitType(Type type) {
- String name = type.getName();
- int lastDot = name.lastIndexOf('.');
- if (lastDot != -1) {
- name = name.replace('.', '/');
- } else {
- name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
- }
-
- List baseTypes = type.getBaseTypes();
- String[] interfaces = new String[baseTypes.size()];
- for (int i = 0; i < baseTypes.size(); i++) {
- Type baseType = (Type) baseTypes.get(i);
- interfaces[i] = baseType.getInstanceClass().getName().replace('.', '/');
- }
-
- cw.visit(Opcodes.V1_4,
- Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT + Opcodes.ACC_INTERFACE,
- name, null, "java/lang/Object", interfaces);
- }
-
- public void visitProperty(Property property) {
- String name = property.getName();
- String propertyName = Character.toUpperCase(name.charAt(0)) + name.substring(1);
- Class javaType = property.getType().getInstanceClass();
- String desc = org.objectweb.asm.Type.getDescriptor(javaType);
-
- if (property.isMany()) {
- cw.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "get" + propertyName, "()Ljava/util/List;", null, null).visitEnd();
- } else {
- if (boolean.class.equals(javaType)) {
- cw.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "is" + propertyName, "()Z", null, null).visitEnd();
- } else {
- cw.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "get" + propertyName, "()" + desc, null, null).visitEnd();
- }
- if (!property.isReadOnly()) {
- cw.visitMethod(Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT, "set" + propertyName, '(' + desc + ")V", null, null).visitEnd();
- }
- }
- }
-
- public void visitEnd() {
- cw.visitEnd();
- }
-
- /**
- * Return the bytecode for the interface class in a form that can be written
- * to disk, added to a JAR file, or passed to a ClassLoader.
- *
- * @return the bytecode for the SDO Type's interface class
- */
- public byte[] getClassData() {
- return cw.toByteArray();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java
deleted file mode 100644
index 3d645be1da..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java
+++ /dev/null
@@ -1,42 +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.codegen;
-
-/**
- * Exception indicating there was a problem with code generation.
- *
- * @version $Rev$ $Date$
- */
-public abstract class GenerationException extends RuntimeException {
- public GenerationException() {
- }
-
- public GenerationException(String message) {
- super(message);
- }
-
- public GenerationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public GenerationException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
deleted file mode 100644
index dc88a0d60d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
+++ /dev/null
@@ -1,179 +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.codegen;
-
-import java.io.PrintWriter;
-import java.util.List;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.SDOTypeVisitor;
-
-/**
- * Implementation of a generator that will output the source code for a Java interface
- * that corresponds to the SDO Type's static properties.
- *
- * @version $Rev$ $Date$
- */
-public class JavaInterfaceGenerator implements SDOTypeVisitor {
-
- private static String canonicalize(String className) {
- if (className == null) {
- return "";
- }
- if (className.charAt(0) != '[') { // if not array
- return className;
- }
- // process array
- boolean invalidClassName = false;
- int nestLevel = 1;
- StringBuffer sb = new StringBuffer();
- try {
- while (className.charAt(nestLevel) == '[') {
- nestLevel++;
- }
- char typeChar = className.charAt(nestLevel);
- int end = nestLevel;
- switch (typeChar) {
- case 'L':
- end = className.length() - 1;
- if (className.charAt(end) != ';') {
- invalidClassName = true;
- } else {
- sb.append(className.substring(nestLevel+1, end));
- }
- break;
- case 'Z':
- sb.append("boolean");
- break;
- case 'B':
- sb.append("byte");
- break;
- case 'C':
- sb.append("char");
- break;
- case 'D':
- sb.append("double");
- break;
- case 'F':
- sb.append("float");
- break;
- case 'I':
- sb.append("int");
- break;
- case 'J':
- sb.append("long");
- break;
- case 'S':
- sb.append("short");
- break;
- default:
- invalidClassName = true;
- break;
- }
- if (end != (className.length() - 1)) {
- invalidClassName = true; // we have not used all the characters
- } else {
- for (int i=0; i 1))
- {
- if (groupName == null)
- {
- groupName = name + "Group";
- }
- eStructuralFeature =
- createFeature
- (eClass,
- groupName,
- ecorePackage.getEFeatureMapEntry(),
- xsdParticle,
- effectiveOccurrence.minOccurs,
- effectiveOccurrence.maxOccurs);
-
- eStructuralFeature.setChangeable(true);
-
- extendedMetaData.setFeatureKind(eStructuralFeature, ExtendedMetaData.GROUP_FEATURE);
- extendedMetaData.setName(eStructuralFeature, xsdElementDeclaration.getName() + ":group");
-
- if (group != null)
- {
- extendedMetaData.setGroup(eStructuralFeature, group);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- else if (isMixed)
- {
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- else if (globalGroup != null)
- {
- extendedMetaData.setGroup(eStructuralFeature, globalGroup);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
-
- group = eStructuralFeature;
- }
-
- eStructuralFeature =
- createFeature(eClass, xsdElementDeclaration, name, xsdParticle, effectiveOccurrence.minOccurs, effectiveOccurrence.maxOccurs);
- // 51210
- // particleMap.put(xsdParticle, eStructuralFeature);
-
- // If the group is turned off, we better make the feature changeable.
- //
- if (!eStructuralFeature.isChangeable() && group == null && getEcoreAttribute(xsdParticle, xsdElementDeclaration, "changeable") == null)
- {
- eStructuralFeature.setChangeable(true);
- }
- }
- }
-
- if (eStructuralFeature != null)
- {
- if (group != null)
- {
- extendedMetaData.setGroup(eStructuralFeature, group);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- else if (isMixed)
- {
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- else if (globalGroup != null)
- {
- extendedMetaData.setGroup(eStructuralFeature, globalGroup);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- }
- }
-
- // 51210
- // contentParticle = computeParticleConstraints(eClass, particleMap, (XSDParticle)xsdComplexTypeDefinition.getContent());
- }
- }
-
- // 51210
- // EAnnotation attributeParticle = null;
- // if (isRestriction)
- // {
- // attributeParticle = ecoreFactory.createEAnnotation();
- // attributeParticle.setSource("attributes");
- // }
-
- XSDWildcard baseXSDWildcard = null;
- Collection baseAttributeUses = Collections.EMPTY_LIST;
- Map baseAttributeURIs = new HashMap();
- if (baseTypeDefinition instanceof XSDComplexTypeDefinition)
- {
- XSDComplexTypeDefinition complexBaseTypeDefinition = (XSDComplexTypeDefinition)baseTypeDefinition;
- baseXSDWildcard = complexBaseTypeDefinition.getAttributeWildcard();
- baseAttributeUses = complexBaseTypeDefinition.getAttributeUses();
- for (Iterator i = baseAttributeUses.iterator(); i.hasNext(); )
- {
- XSDAttributeUse xsdAttributeUse = (XSDAttributeUse)i.next();
- baseAttributeURIs.put(xsdAttributeUse.getAttributeDeclaration().getURI(), xsdAttributeUse);
- }
- }
-
- for (Iterator i = getAttributeUses(xsdComplexTypeDefinition).iterator(); i.hasNext(); )
- {
- XSDAttributeUse xsdAttributeUse = (XSDAttributeUse)i.next();
- XSDAttributeDeclaration xsdAttributeDeclaration = xsdAttributeUse.getAttributeDeclaration();
- if (baseAttributeURIs.remove(xsdAttributeDeclaration.getURI()) == null)
- {
- String name = getEcoreAttribute(xsdAttributeUse, "name");
- if (name == null)
- {
- name = getEcoreAttribute(xsdAttributeDeclaration, "name");
- }
- if (name == null)
- {
- name = validName(xsdAttributeDeclaration.getName(), true);
- }
-
- EStructuralFeature eStructuralFeature =
- createFeature(eClass, xsdAttributeDeclaration, name, xsdAttributeUse, xsdAttributeUse.isRequired());
-
- if (isRestriction)
- {
- EStructuralFeature attributeWildcardEStructuralFeature =
- extendedMetaData.getAttributeWildcardAffiliation
- (baseClass, xsdAttributeDeclaration.getTargetNamespace(), xsdAttributeDeclaration.getName());
- if (attributeWildcardEStructuralFeature != null)
- {
- extendedMetaData.setGroup(eStructuralFeature, attributeWildcardEStructuralFeature);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- }
- }
- }
- /* 51210
- else if (isRestriction && !baseAttributeUses.contains(xsdAttributeUse))
- {
- EStructuralFeature eStructuralFeature =
- extendedMetaData.getAttribute(eClass, xsdAttributeDeclaration.getTargetNamespace(), xsdAttributeDeclaration.getName());
- if (eStructuralFeature != null)
- {
- EAnnotation attributeEAnnotation = ecoreFactory.createEAnnotation();
- if (xsdAttributeUse.isRequired())
- {
- attributeEAnnotation.getDetails().put("minOccurs", "1");
- }
- attributeEAnnotation.getReferences().add(eStructuralFeature);
-
- if (xsdAttributeDeclaration.getTypeDefinition() != null)
- {
- EClassifier type = getEClassifier(xsdAttributeDeclaration.getTypeDefinition());
- if (type != eStructuralFeature.getEType() && type != null)
- {
- attributeEAnnotation.getReferences().add(type);
- }
- }
-
- attributeParticle.getContents().add(attributeEAnnotation);
- }
- }
- */
- }
-
- /* 51210
- if (isRestriction && !baseAttributeURIs.isEmpty())
- {
- for (Iterator i = baseAttributeURIs.values().iterator(); i.hasNext(); )
- {
- XSDAttributeUse xsdAttributeUse = (XSDAttributeUse)i.next();
- XSDAttributeDeclaration xsdAttributeDeclaration = xsdAttributeUse.getAttributeDeclaration();
- EStructuralFeature eStructuralFeature =
- extendedMetaData.getAttribute(eClass, xsdAttributeDeclaration.getTargetNamespace(), xsdAttributeDeclaration.getName());
- if (eStructuralFeature != null)
- {
- EAnnotation attributeEAnnotation = ecoreFactory.createEAnnotation();
- attributeEAnnotation.getReferences().add(eStructuralFeature);
- attributeEAnnotation.getDetails().put("maxOccurs", "0");
- attributeParticle.getContents().add(attributeEAnnotation);
- }
- }
- }
- */
-
- XSDWildcard xsdWildcard = xsdComplexTypeDefinition.getAttributeWildcard();
- if (xsdWildcard != null && baseXSDWildcard != xsdWildcard || XSDConstants.isURType(xsdComplexTypeDefinition))
- {
- if (isRestriction && !XSDConstants.isURType(xsdComplexTypeDefinition))
- {
- // 51210
- // attributeParticle.getDetails().put
- // ("wildcard", BasicExtendedMetaData.getEncodedWildcards(xsdComplexTypeDefinition.getTargetNamespace(), getWildcards(xsdWildcard)));
- }
- else
- {
- String name = getEcoreAttribute(xsdWildcard, "name");
- if (name == null)
- {
- name = "anyAttribute";
- }
- createFeature
- (eClass,
- name,
- ecorePackage.getEFeatureMapEntry(),
- xsdWildcard,
- 0,
- -1);
- }
- }
-
- if (isRestriction)
- {
- // 51210
- // EAnnotation restrictionParticle = ecoreFactory.createEAnnotation();
- // restrictionParticle.setSource("restriction");
- // if (contentParticle != null)
- // {
- // restrictionParticle.getContents().add(contentParticle);
- // }
- // if (!attributeParticle.getContents().isEmpty() || !attributeParticle.getDetails().isEmpty())
- // {
- // restrictionParticle.getContents().add(attributeParticle);
- // }
- // contentParticle = restrictionParticle;
-
- int baseContentKind = extendedMetaData.getContentKind((EClass)eClass.getESuperTypes().get(0));
- if (baseContentKind == ExtendedMetaData.MIXED_CONTENT &&
- xsdComplexTypeDefinition.getContentTypeCategory() == XSDContentTypeCategory.SIMPLE_LITERAL)
- {
- extendedMetaData.setContentKind(eClass, ExtendedMetaData.SIMPLE_CONTENT);
- EStructuralFeature eStructuralFeature =
- createFeature
- (eClass,
- "rawValue",
- getBuiltInEClassifier(xsdComplexTypeDefinition.getSchema().getSchemaForSchemaNamespace(), "string"),
- null,
- 0,
- 1);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
-
- eStructuralFeature =
- createFeature
- (eClass,
- "value",
- getBuiltInEClassifier(xsdComplexTypeDefinition.getSchema().getSchemaForSchemaNamespace(), "anySimpleType"),
- null,
- 0,
- 1);
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
-
- if ("SimpleAnyType".equals(eClass.getName()) && XMLTypePackage.eNS_URI.equals(eClass.getEPackage().getNsURI()))
- {
- eStructuralFeature =
- createFeature
- (eClass,
- "instanceType",
- ecorePackage.getEDataType(),
- null,
- 1,
- 1);
-
- ((EReference)eStructuralFeature).setResolveProxies(false);
- }
- }
- else
- {
- extendedMetaData.setContentKind(eClass, baseContentKind);
- }
- }
-
- // 51210
- // extendedMetaData.setContent(eClass, contentParticle);
-
- XSDAnnotation xsdAnnotation = xsdComplexTypeDefinition.getAnnotation();
- if (xsdAnnotation != null)
- {
- List applicationInformationList = xsdAnnotation.getApplicationInformation(EcorePackage.eNS_URI);
- for (Iterator i = applicationInformationList.iterator(); i.hasNext(); )
- {
- Element applicationInformation = (Element)i.next();
- if ("operations".equals(applicationInformation.getAttributeNS(EcorePackage.eNS_URI, "key")))
- {
- for (Iterator j = getElements(applicationInformation, "operation").iterator(); j.hasNext(); )
- {
- EOperation eOperation = ecoreFactory.createEOperation();
- Element operation = (Element)j.next();
- String operationName = operation.getAttributeNS(null, "name");
- eOperation.setName(operationName);
- XSDTypeDefinition returnType = getEcoreTypeQNameAttribute(xsdComplexTypeDefinition, operation, null, "type");
- if (returnType != null)
- {
- EClassifier returnEType = getEClassifier(returnType);
- eOperation.setEType(returnEType);
- }
-
- List exceptions = getEcoreTypeQNamesAttribute(xsdComplexTypeDefinition, operation, null, "exceptions");
- for (Iterator k = exceptions.iterator(); k.hasNext(); )
- {
- XSDTypeDefinition exceptionTypeDefinition = (XSDTypeDefinition)k.next();
- eOperation.getEExceptions().add(getEClassifier(exceptionTypeDefinition));
- }
-
- for (Iterator k = getElements(operation, "parameter").iterator(); k.hasNext(); )
- {
- EParameter eParameter = ecoreFactory.createEParameter();
- Element parameter = (Element)k.next();
- String paramaterName = parameter.getAttributeNS(null, "name");
- XSDTypeDefinition parameterType = getEcoreTypeQNameAttribute(xsdComplexTypeDefinition, parameter, null, "type");
- EClassifier parameterEType = getEClassifier(parameterType);
- eParameter.setName(paramaterName);
- eParameter.setEType(parameterEType);
-
- populateETypedElement(eParameter, parameter);
- eOperation.getEParameters().add(eParameter);
- }
-
- List body = getElements(operation, "body");
- if (!body.isEmpty())
- {
- EcoreUtil.setAnnotation(eOperation, "http://www.eclipse.org/emf/2002/GenModel", "body", getText((Element)body.get(0)));
- }
-
- populateETypedElement(eOperation, operation);
- eClass.getEOperations().add(eOperation);
- }
- }
- }
- }
- return eClass;
- }
-
- private String getText(Element element)
- {
- StringBuffer text = new StringBuffer();
- for (Node node = element.getFirstChild(); node != null; node = node.getNextSibling())
- {
- switch (node.getNodeType())
- {
- case Node.TEXT_NODE:
- case Node.CDATA_SECTION_NODE:
- {
- text.append(node.getNodeValue());
- }
- }
- }
- return text.toString();
- }
-
- private List getElements(Element element, String localName)
- {
- List result = new ArrayList();
- for (Node node = element.getFirstChild(); node != null; node = node.getNextSibling())
- {
- if (node.getNodeType() == Node.ELEMENT_NODE)
- {
- Element child = (Element)node;
- if (localName.equals(child.getLocalName()) && child.getNamespaceURI() == null)
- {
- result.add(child);
- }
- }
- }
- return result;
- }
-
- protected EStructuralFeature createFeature
- (EClass eClass, String name, EClassifier type, XSDComponent xsdComponent, int minOccurs, int maxOccurs)
- {
- if (xsdComponent != null)
- {
- XSDSchema containingXSDSchema = xsdComponent.getSchema();
- if (containingXSDSchema != null && !xsdSchemas.contains(containingXSDSchema))
- {
- xsdSchemas.add(containingXSDSchema);
- addInput(containingXSDSchema);
- validate(containingXSDSchema);
- }
- }
- else if (extendedMetaData.getContentKind(eClass) == ExtendedMetaData.MIXED_CONTENT)
- {
- if (type == ecorePackage.getEFeatureMapEntry())
- {
- EAttribute eAttribute = ecoreFactory.createEAttribute();
- setAnnotations(eAttribute, xsdComponent);
- eAttribute.setName(Character.toLowerCase(name.charAt(0)) + name.substring(1));
- eAttribute.setUnique(false);
- eAttribute.setEType(type);
- eAttribute.setLowerBound(minOccurs);
- eAttribute.setUpperBound(maxOccurs);
- eClass.getEStructuralFeatures().add(eAttribute);
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
- extendedMetaData.setName(eAttribute, ":" + eAttribute.getName());
- return eAttribute;
- }
- else
- {
- EReference eReference = ecoreFactory.createEReference();
- setAnnotations(eReference, xsdComponent);
- eReference.setName(name);
- eReference.setEType(ecorePackage.getEStringToStringMapEntry());
- eReference.setLowerBound(0);
- eReference.setUpperBound(-1);
- eReference.setContainment(true);
- eReference.setResolveProxies(false);
- eReference.setTransient(true);
- eClass.getEStructuralFeatures().add(eReference);
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ATTRIBUTE_FEATURE);
- return eReference;
- }
- }
-
- if (type instanceof EClass)
- {
- EReference eReference = ecoreFactory.createEReference();
- setAnnotations(eReference, xsdComponent);
- eReference.setName(Character.toLowerCase(name.charAt(0)) + name.substring(1));
- eReference.setEType(type);
- eReference.setLowerBound(minOccurs);
- eReference.setUpperBound(maxOccurs);
-
- eClass.getEStructuralFeatures().add(eReference);
- if (xsdComponent == null || xsdComponent instanceof XSDSimpleTypeDefinition)
- {
- extendedMetaData.setName(eReference, ":" + eClass.getEAllStructuralFeatures().indexOf(eReference));
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.SIMPLE_FEATURE);
- eReference.setResolveProxies(!isLocalReferenceType((XSDSimpleTypeDefinition)xsdComponent));
- }
- else
- {
- map(xsdComponent, eReference);
- if (xsdComponent instanceof XSDParticle)
- {
- eReference.setContainment(true);
- eReference.setResolveProxies(false);
-
- XSDParticle xsdParticle = (XSDParticle)xsdComponent;
-
- XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
- if (xsdTerm instanceof XSDElementDeclaration)
- {
- XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdTerm;
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ELEMENT_FEATURE);
- extendedMetaData.setName(eReference, xsdElementDeclaration.getName());
- extendedMetaData.setNamespace(eReference, xsdElementDeclaration.getTargetNamespace());
-
- XSDTypeDefinition xsdType = getEffectiveTypeDefinition(xsdParticle, xsdElementDeclaration);
- if (xsdType instanceof XSDSimpleTypeDefinition)
- {
- eReference.setContainment(false);
- eReference.setResolveProxies(!isLocalReferenceType((XSDSimpleTypeDefinition)xsdType));
- }
-
- if (maxOccurs == 1 && xsdElementDeclaration.isNillable())
- {
- eReference.setUnsettable(true);
- }
-
- if (xsdElementDeclaration.isAbstract())
- {
- eReference.setChangeable(false);
- }
-
- String opposite = getEcoreAttribute(xsdParticle, "opposite");
- if (opposite != null)
- {
- eReferenceToOppositeNameMap.put(eReference, opposite);
- }
- }
- else if (xsdTerm instanceof XSDWildcard)
- {
- // EATM shouldn't happen
- XSDWildcard xsdWildcard = (XSDWildcard)xsdTerm;
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
- extendedMetaData.setWildcards(eReference, getWildcards(xsdWildcard));
- extendedMetaData.setProcessingKind(eReference, xsdWildcard.getProcessContents().getValue() + 1);
- extendedMetaData.setName(eReference, ":" + eClass.getEAllStructuralFeatures().indexOf(eReference));
- }
- else
- {
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.GROUP_FEATURE);
- extendedMetaData.setName(eReference, ":" + eClass.getEAllStructuralFeatures().indexOf(eReference));
- }
- }
- else if (xsdComponent instanceof XSDElementDeclaration)
- {
- XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdComponent;
- eReference.setContainment(true);
- eReference.setResolveProxies(false);
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ELEMENT_FEATURE);
- extendedMetaData.setName(eReference, xsdElementDeclaration.getName());
- extendedMetaData.setNamespace(eReference, xsdElementDeclaration.getTargetNamespace());
-
- XSDElementDeclaration substitutionGroupAffiliation = xsdElementDeclaration.getSubstitutionGroupAffiliation();
- if (substitutionGroupAffiliation != null)
- {
- EStructuralFeature affiliation = getEStructuralFeature(substitutionGroupAffiliation);
- extendedMetaData.setAffiliation(eReference, affiliation);
- }
- XSDTypeDefinition xsdType = getEffectiveTypeDefinition(null, xsdElementDeclaration);
- if (xsdType instanceof XSDSimpleTypeDefinition)
- {
- eReference.setResolveProxies(!isLocalReferenceType((XSDSimpleTypeDefinition)xsdType));
- }
-
- if (maxOccurs == 1 && xsdElementDeclaration.isNillable())
- {
- eReference.setUnsettable(true);
- }
-
- if (xsdElementDeclaration.isAbstract())
- {
- eReference.setChangeable(false);
- }
- }
- else if (xsdComponent instanceof XSDAttributeUse)
- {
- String opposite = getEcoreAttribute(xsdComponent, "opposite");
- if (opposite != null)
- {
- eReferenceToOppositeNameMap.put(eReference, opposite);
- }
-
- XSDAttributeUse xsdAttributeUse = (XSDAttributeUse)xsdComponent;
- XSDAttributeDeclaration xsdAttributeDeclaration = xsdAttributeUse.getAttributeDeclaration();
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ATTRIBUTE_FEATURE);
- extendedMetaData.setName(eReference, xsdAttributeDeclaration.getName());
- extendedMetaData.setNamespace(eReference, xsdAttributeDeclaration.getTargetNamespace());
- eReference.setResolveProxies
- (!isLocalReferenceType((XSDSimpleTypeDefinition)getEffectiveTypeDefinition(xsdAttributeUse, xsdAttributeDeclaration)));
- }
- else if (xsdComponent instanceof XSDAttributeDeclaration)
- {
- XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)xsdComponent;
- extendedMetaData.setFeatureKind(eReference, ExtendedMetaData.ATTRIBUTE_FEATURE);
- extendedMetaData.setName(eReference, xsdAttributeDeclaration.getName());
- extendedMetaData.setNamespace(eReference, xsdAttributeDeclaration.getTargetNamespace());
- eReference.setResolveProxies
- (!isLocalReferenceType((XSDSimpleTypeDefinition)getEffectiveTypeDefinition(null, xsdAttributeDeclaration)));
- }
- }
-
- return eReference;
- }
- else
- {
- EAttribute eAttribute = ecoreFactory.createEAttribute();
- setAnnotations(eAttribute, xsdComponent);
- eAttribute.setName(Character.toLowerCase(name.charAt(0)) + name.substring(1));
- eAttribute.setUnique(false);
- eAttribute.setEType(type);
- eAttribute.setLowerBound(minOccurs);
- eAttribute.setUpperBound(maxOccurs);
- eClass.getEStructuralFeatures().add(eAttribute);
-
- if (xsdComponent == null || xsdComponent instanceof XSDSimpleTypeDefinition)
- {
- extendedMetaData.setName(eAttribute, ":" + eClass.getEAllStructuralFeatures().indexOf(eAttribute));
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.SIMPLE_FEATURE);
- }
- else
- {
- map(xsdComponent, eAttribute);
- if (xsdComponent instanceof XSDAttributeUse)
- {
- XSDAttributeUse xsdAttributeUse = (XSDAttributeUse)xsdComponent;
- XSDAttributeDeclaration xsdAttributeDeclaration = xsdAttributeUse.getAttributeDeclaration();
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ATTRIBUTE_FEATURE);
- extendedMetaData.setName(eAttribute, xsdAttributeDeclaration.getName());
- extendedMetaData.setNamespace(eAttribute, xsdAttributeDeclaration.getTargetNamespace());
-
- String defaultValue = getEcoreAttribute(xsdComponent, "default");
- if (defaultValue == null)
- {
- defaultValue = xsdAttributeUse.getLexicalValue();
- }
- eAttribute.setDefaultValueLiteral(defaultValue);
- initialize(eAttribute, (XSDSimpleTypeDefinition)getEffectiveTypeDefinition(xsdAttributeUse, xsdAttributeDeclaration));
- }
- else if (xsdComponent instanceof XSDAttributeDeclaration)
- {
- XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)xsdComponent;
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ATTRIBUTE_FEATURE);
- extendedMetaData.setName(eAttribute, xsdAttributeDeclaration.getName());
- extendedMetaData.setNamespace(eAttribute, xsdAttributeDeclaration.getTargetNamespace());
-
- eAttribute.setDefaultValueLiteral(xsdAttributeDeclaration.getLexicalValue());
- initialize(eAttribute, (XSDSimpleTypeDefinition)getEffectiveTypeDefinition(null, xsdAttributeDeclaration));
- }
- else if (xsdComponent instanceof XSDParticle)
- {
- XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
- if (xsdTerm instanceof XSDElementDeclaration)
- {
- XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdTerm;
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_FEATURE);
- extendedMetaData.setName(eAttribute, xsdElementDeclaration.getName());
- extendedMetaData.setNamespace(eAttribute, xsdElementDeclaration.getTargetNamespace());
-
- eAttribute.setDefaultValueLiteral(xsdElementDeclaration.getLexicalValue());
- XSDTypeDefinition xsdType = getEffectiveTypeDefinition(xsdComponent, xsdElementDeclaration);
- if (xsdType instanceof XSDSimpleTypeDefinition)
- {
- initialize(eAttribute, (XSDSimpleTypeDefinition)xsdType);
- }
-
- if (xsdElementDeclaration.isNillable())
- {
- if (!canSupportNull((EDataType)type))
- {
- eAttribute.setEType(type = (EDataType)typeToTypeObjectMap.get(type));
- }
- if (maxOccurs == 1)
- {
- eAttribute.setUnsettable(true);
- }
- }
-
- if (xsdElementDeclaration.isAbstract())
- {
- eAttribute.setChangeable(false);
- }
- }
- else if (xsdTerm instanceof XSDWildcard)
- {
- XSDWildcard xsdWildcard = (XSDWildcard)xsdTerm;
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
- extendedMetaData.setWildcards(eAttribute, getWildcards(xsdWildcard));
- extendedMetaData.setProcessingKind(eAttribute, xsdWildcard.getProcessContents().getValue() + 1);
- extendedMetaData.setName(eAttribute, ":" + eClass.getEAllStructuralFeatures().indexOf(eAttribute));
- }
- else
- {
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.GROUP_FEATURE);
- }
- }
- else if (xsdComponent instanceof XSDWildcard)
- {
- XSDWildcard xsdWildcard = (XSDWildcard)xsdComponent;
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE);
- extendedMetaData.setWildcards(eAttribute, getWildcards(xsdWildcard));
- extendedMetaData.setProcessingKind(eAttribute, xsdWildcard.getProcessContents().getValue() + 1);
- extendedMetaData.setName(eAttribute, ":" + eClass.getEAllStructuralFeatures().indexOf(eAttribute));
- }
- else if (xsdComponent instanceof XSDElementDeclaration)
- {
- XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdComponent;
- extendedMetaData.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_FEATURE);
- extendedMetaData.setName(eAttribute, xsdElementDeclaration.getName());
- extendedMetaData.setNamespace(eAttribute, xsdElementDeclaration.getTargetNamespace());
-
- eAttribute.setDefaultValueLiteral(xsdElementDeclaration.getLexicalValue());
- XSDTypeDefinition xsdType = getEffectiveTypeDefinition(null, xsdElementDeclaration);
- if (xsdType instanceof XSDSimpleTypeDefinition)
- {
- initialize(eAttribute, (XSDSimpleTypeDefinition)xsdType);
- }
-
- XSDElementDeclaration substitutionGroupAffiliation = xsdElementDeclaration.getSubstitutionGroupAffiliation();
- if (substitutionGroupAffiliation != null)
- {
- EStructuralFeature affiliation = getEStructuralFeature(substitutionGroupAffiliation);
- extendedMetaData.setAffiliation(eAttribute, affiliation);
- }
-
- if (xsdElementDeclaration.isNillable() && !canSupportNull((EDataType)type))
- {
- eAttribute.setEType(type = (EDataType)typeToTypeObjectMap.get(type));
- if (maxOccurs == 1)
- {
- eAttribute.setUnsettable(true);
- }
- }
-
- if (xsdElementDeclaration.isAbstract())
- {
- eAttribute.setChangeable(false);
- }
- }
- }
-
- if (maxOccurs == 1 && (type.getDefaultValue() != null || eAttribute.getDefaultValueLiteral() != null))
- {
- eAttribute.setUnsettable(true);
- }
-
- return eAttribute;
- }
- }
-
- protected XSDTypeDefinition getEffectiveTypeDefinition(XSDComponent xsdComponent, XSDFeature xsdFeature)
- {
- return xsdFeature == null ?
- ((XSDComplexTypeDefinition)xsdComponent.eContainer()).getSimpleType() : xsdFeature.getType();
- }
-
- protected EStructuralFeature createFeature
- (EClass eClass, XSDElementDeclaration xsdElementDeclaration, String name, XSDComponent xsdComponent, int minOccurs, int maxOccurs)
- {
- XSDTypeDefinition elementTypeDefinition = getEffectiveTypeDefinition(xsdComponent, xsdElementDeclaration);
- EClassifier eClassifier = getEClassifier(elementTypeDefinition);
-
- XSDTypeDefinition referenceType = getEcoreTypeQNameAttribute(xsdComponent, "reference");
- if (referenceType == null)
- {
- referenceType = getEcoreTypeQNameAttribute(xsdElementDeclaration, "reference");
- }
- if (referenceType != null)
- {
- EClassifier referenceClassifier = getEClassifier(referenceType);
- boolean needsHolder = false;
- if (elementTypeDefinition instanceof XSDSimpleTypeDefinition)
- {
- XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition)elementTypeDefinition;
- if (xsdSimpleTypeDefinition.getVariety() == XSDVariety.LIST_LITERAL)
- {
- needsHolder = true;
-
- EPackage holderPackage = getEPackage(xsdElementDeclaration);
- String holderName = xsdElementDeclaration.getName() + ":holder";
- EClass holderClass = (EClass)extendedMetaData.getType(holderPackage, holderName);
- if (holderClass == null)
- {
- // Create a holder class like an anonymous complex type.
- //
- holderClass = ecoreFactory.createEClass();
- setAnnotations(holderClass, xsdElementDeclaration);
- holderClass.setName(validName(holderName, true));
- extendedMetaData.setName(holderClass, holderName);
- extendedMetaData.setContentKind(holderClass, ExtendedMetaData.SIMPLE_CONTENT);
-
- addToSortedList(holderPackage.getEClassifiers(), holderClass);
-
- EReference holderReference =
- (EReference)createFeature
- (holderClass,
- "value",
- referenceClassifier,
- null,
- 0,
- -1);
-
- holderReference.setResolveProxies(!isLocalReferenceType(xsdSimpleTypeDefinition));
- }
- referenceClassifier = holderClass;
- }
- }
- EStructuralFeature result =
- createFeature
- (eClass,
- name,
- referenceClassifier,
- xsdComponent,
- minOccurs,
- maxOccurs);
- ((EReference)result).setContainment(needsHolder);
- if (needsHolder)
- {
- ((EReference)result).setUnsettable(false);
- ((EReference)result).setResolveProxies(false);
- }
- initialize(result, xsdElementDeclaration, xsdComponent);
- return result;
- }
- else
- {
- EStructuralFeature result =
- createFeature
- (eClass,
- name,
- eClassifier,
- xsdComponent,
- minOccurs,
- maxOccurs);
- initialize(result, xsdElementDeclaration, xsdComponent);
- return result;
- }
- }
-
- protected EStructuralFeature createFeature
- (EClass eClass, XSDAttributeDeclaration xsdAttributeDeclaration, String name, XSDComponent xsdComponent, boolean isRequired)
- {
- XSDSimpleTypeDefinition attributeTypeDefinition = (XSDSimpleTypeDefinition)getEffectiveTypeDefinition(xsdComponent, xsdAttributeDeclaration);
- if (attributeTypeDefinition == null)
- {
- attributeTypeDefinition = xsdComponent.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("anySimpleType");
- }
-
- XSDTypeDefinition referenceType = getEcoreTypeQNameAttribute(xsdComponent, "reference");
- if (referenceType == null && xsdAttributeDeclaration != null)
- {
- referenceType = getEcoreTypeQNameAttribute(xsdAttributeDeclaration, "reference");
- }
- if (referenceType != null)
- {
- int lowerBound = isRequired ? 1 : 0;
- int upperBound = 1;
- if (attributeTypeDefinition.getVariety() == XSDVariety.LIST_LITERAL)
- {
- XSDLengthFacet xsdLengthFacet = attributeTypeDefinition.getEffectiveLengthFacet();
- if (isRequired)
- {
- if (xsdLengthFacet != null)
- {
- lowerBound = xsdLengthFacet.getValue();
- }
- else
- {
- XSDMinLengthFacet xsdMinLengthFacet = attributeTypeDefinition.getEffectiveMinLengthFacet();
- if (xsdMinLengthFacet != null)
- {
- lowerBound = xsdMinLengthFacet.getValue();
- }
- }
- }
- if (xsdLengthFacet != null)
- {
- upperBound = xsdLengthFacet.getValue();
- }
- else
- {
- XSDMaxLengthFacet xsdMaxLengthFacet = attributeTypeDefinition.getEffectiveMaxLengthFacet();
- if (xsdMaxLengthFacet != null)
- {
- upperBound = xsdMaxLengthFacet.getValue();
- }
- else
- {
- upperBound = -1;
- }
- }
- }
-
- EClassifier referenceClassifier = getEClassifier(referenceType);
- EStructuralFeature result =
- createFeature
- (eClass,
- name,
- referenceClassifier,
- xsdComponent,
- lowerBound,
- upperBound);
- initialize(result, xsdAttributeDeclaration, xsdComponent);
- return result;
- }
- else
- {
- boolean isMany =
- attributeTypeDefinition.getVariety() == XSDVariety.LIST_LITERAL &&
- xsdComponent instanceof XSDAttributeUse &&
- "true".equals(getEcoreAttribute(xsdComponent, "many"));
- if (isMany)
- {
- EDataType eDataType = getEDataType(attributeTypeDefinition.getItemTypeDefinition());
- XSDLengthFacet xsdLengthFacet = attributeTypeDefinition.getEffectiveLengthFacet();
- int lowerBound = isRequired ? 1 : 0;
- int upperBound = -1;
- if (isRequired)
- {
- if (xsdLengthFacet != null)
- {
- lowerBound = xsdLengthFacet.getValue();
- }
- else
- {
- XSDMinLengthFacet xsdMinLengthFacet = attributeTypeDefinition.getEffectiveMinLengthFacet();
- if (xsdMinLengthFacet != null)
- {
- lowerBound = xsdMinLengthFacet.getValue();
- }
- }
- }
- if (xsdLengthFacet != null)
- {
- upperBound = xsdLengthFacet.getValue();
- }
- else
- {
- XSDMaxLengthFacet xsdMaxLengthFacet = attributeTypeDefinition.getEffectiveMaxLengthFacet();
- if (xsdMaxLengthFacet != null)
- {
- upperBound = xsdMaxLengthFacet.getValue();
- }
- }
- EStructuralFeature result =
- createFeature
- (eClass,
- name,
- eDataType,
- xsdComponent,
- lowerBound,
- upperBound);
- initialize(result, xsdAttributeDeclaration, xsdComponent);
- return result;
- }
- else
- {
- EDataType eDataType = getEDataType(attributeTypeDefinition);
- EStructuralFeature result =
- createFeature
- (eClass,
- name,
- eDataType,
- xsdComponent,
- isRequired ? 1 : 0,
- 1);
- initialize(result, xsdAttributeDeclaration, xsdComponent);
- return result;
- }
- }
- }
-
- public EStructuralFeature getEStructuralFeature(XSDFeature xsdFeature)
- {
- if ("true".equals(getEcoreAttribute(xsdFeature, "ignore"))) return null;
- EStructuralFeature eStructuralFeature = (EStructuralFeature)xsdComponentToEModelElementMap.get(xsdFeature);
- if (eStructuralFeature == null)
- {
- EPackage ePackage = getEPackage(xsdFeature);
- EClass documentEClass = extendedMetaData.getDocumentRoot(ePackage);
- if (documentEClass == null)
- {
- createDocumentRoot(xsdFeature.getSchema(), ePackage);
- }
-
- String name = getEcoreAttribute(xsdFeature, "name");
- if (name == null)
- {
- name= validName(xsdFeature.getName(), true);
- }
-
- if (xsdFeature instanceof XSDElementDeclaration)
- {
- // Mark the bound as unspecified so that it won't be considered many
- // but can nevertheless be recognized as being unspecified and perhaps still be treat as many.
- //
- EStructuralFeature result =
- createFeature(documentEClass, (XSDElementDeclaration)xsdFeature, name, xsdFeature, 0, ETypedElement.UNSPECIFIED_MULTIPLICITY);
-
- result.setDerived(true);
- result.setTransient(true);
- result.setVolatile(true);
- return result;
- }
- else
- {
- EStructuralFeature result =
- createFeature(documentEClass, (XSDAttributeDeclaration)xsdFeature, name, xsdFeature, false);
- return result;
- }
- }
-
- return eStructuralFeature;
- }
-
- public void generate(XSDSchema xsdSchema)
- {
- this.rootSchema = xsdSchema;
- if (xsdSchemas.add(xsdSchema))
- {
- addInput(xsdSchema);
- validate(xsdSchema);
- }
-
- Collection visitedElementDeclarations = new ArrayList();
- Collection elementDeclarations = new ArrayList(xsdSchema.getElementDeclarations());
-
- Collection visitedAttributeDeclarations = new ArrayList();
- Collection attributeDeclarations = new ArrayList(xsdSchema.getAttributeDeclarations());
-
- Collection visitedTypeDefinitions = new ArrayList();
- Collection typeDefinitions = new ArrayList(xsdSchema.getTypeDefinitions());
-
- while (!elementDeclarations.isEmpty() || !attributeDeclarations.isEmpty() || !typeDefinitions.isEmpty())
- {
- for (Iterator i = elementDeclarations.iterator(); i.hasNext(); )
- {
- XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)i.next();
- getEStructuralFeature(xsdElementDeclaration);
- }
- visitedElementDeclarations.addAll(elementDeclarations);
- elementDeclarations = new ArrayList(xsdSchema.getElementDeclarations());
- elementDeclarations.removeAll(visitedElementDeclarations);
-
- for (Iterator i = attributeDeclarations.iterator(); i.hasNext(); )
- {
- XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)i.next();
- if (!XSDConstants.isSchemaInstanceNamespace(xsdAttributeDeclaration.getTargetNamespace()))
- {
- getEStructuralFeature(xsdAttributeDeclaration);
- }
- }
- visitedAttributeDeclarations.addAll(attributeDeclarations);
- attributeDeclarations = new ArrayList(xsdSchema.getAttributeDeclarations());
- attributeDeclarations.removeAll(visitedAttributeDeclarations);
-
- for (Iterator i = typeDefinitions.iterator(); i.hasNext(); )
- {
- XSDTypeDefinition xsdTypeDefinition = (XSDTypeDefinition)i.next();
- getEClassifier(xsdTypeDefinition);
- }
- visitedTypeDefinitions.addAll(typeDefinitions);
- typeDefinitions = new ArrayList(xsdSchema.getTypeDefinitions());
- typeDefinitions.removeAll(visitedTypeDefinitions);
- }
-
- resolveNameConflicts();
-
- for (Iterator i = xsdSchemas.iterator(); i.hasNext(); )
- {
- XSDSchema generatedXSDSchema = (XSDSchema)i.next();
- EPackage ePackage = (EPackage)targetNamespaceToEPackageMap.get(generatedXSDSchema.getTargetNamespace());
- if (ePackage != null)
- {
- String packageName= getEcoreAttribute(generatedXSDSchema, "package");
- if (packageName != null)
- {
- ePackage.setName(packageName);
- }
- String packageNsPrefix= getEcoreAttribute(generatedXSDSchema, "nsPrefix");
- if (packageNsPrefix != null)
- {
- ePackage.setNsPrefix(packageNsPrefix);
- }
- }
- }
-
- for (Iterator i = eReferenceToOppositeNameMap.entrySet().iterator(); i.hasNext(); )
- {
- Map.Entry entry = (Map.Entry)i.next();
- EReference eReference = (EReference)entry.getKey();
- String opposite = (String)entry.getValue();
- EClass oppositeEClass = eReference.getEReferenceType();
- if (eReference.getEOpposite() == null)
- {
- EStructuralFeature eOppositeFeature = oppositeEClass.getEStructuralFeature(opposite);
-
- // Match by XML name if this fails.
- if (eOppositeFeature == null)
- {
- for (Iterator j = oppositeEClass.getEAllStructuralFeatures().iterator(); j.hasNext(); )
- {
- EStructuralFeature feature = (EStructuralFeature)j.next();
- if (opposite.equals(extendedMetaData.getName(feature)))
- {
- eOppositeFeature = feature;
- break;
- }
- }
- }
-
- if (eOppositeFeature instanceof EReference)
- {
- EReference eOpposite = (EReference)eOppositeFeature;
- eOpposite.setEOpposite(eReference);
- eReference.setEOpposite(eOpposite);
- }
- }
-
- if (eReference.getEOpposite() == null && eReference.isContainment())
- {
- EReference eOpposite = ecoreFactory.createEReference();
- eOpposite.setName(opposite);
- eOpposite.setEType(eReference.getEContainingClass());
- eOpposite.setLowerBound(0);
- eOpposite.setEOpposite(eReference);
- eReference.setEOpposite(eOpposite);
- eOpposite.setTransient(true);
- oppositeEClass.getEStructuralFeatures().add(eOpposite);
- }
- }
-
- eReferenceToOppositeNameMap.clear();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CopyHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CopyHelperImpl.java
deleted file mode 100644
index d768076ecb..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CopyHelperImpl.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 org.apache.tuscany.sdo.helper;
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.CopyHelper;
-
-
-/**
- * A helper for copying DataObjects.
- */
-public class CopyHelperImpl implements CopyHelper
-{
- public DataObject copyShallow(DataObject dataObject)
- {
- Copier copier = new Copier()
- {
- protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
- {
- }
-
- protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
- if(("ChangeSummaryType".equals(eAttribute.getEType().getName()) && "commonj.sdo".equals(eAttribute.getEType().getEPackage().getNsURI()))) {
- boolean isLogging = ((ChangeSummary)eObject.eGet(eAttribute)).isLogging();
- ChangeSummary destSum = (ChangeSummary)copyEObject.eGet(eAttribute);
- if(isLogging) {
- if(!destSum.isLogging()) destSum.beginLogging();
- } else {
- if(destSum.isLogging()) destSum.endLogging();
- }
- } else {
- super.copyAttribute(eAttribute, eObject, copyEObject);
- }
- }
- };
- EObject result = copier.copy((EObject)dataObject);
- copier.copyReferences();
- return (DataObject)result;
- }
-
- public DataObject copy(DataObject dataObject)
- {
- Copier copier = new Copier()
- {
-
- protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
- if(("ChangeSummaryType".equals(eAttribute.getEType().getName()) && "commonj.sdo".equals(eAttribute.getEType().getEPackage().getNsURI()))) {
- throw new UnsupportedOperationException("This will be implemented when change summary serialization/deserialization is in place");
- } else {
- super.copyAttribute(eAttribute, eObject, copyEObject);
- }
- }
- };
- EObject result = copier.copy((EObject)dataObject);
- copier.copyReferences();
- return (DataObject)result;
- }
-
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CrossScopeCopyHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CrossScopeCopyHelperImpl.java
deleted file mode 100644
index 3f51876035..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/CrossScopeCopyHelperImpl.java
+++ /dev/null
@@ -1,255 +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.helper;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * A CopyHelper implementation that creates the copy objects in a specific metadata scope.
- * The target scope must contain a compatible version of the Types needed to create the copy objects.
- */
-public class CrossScopeCopyHelperImpl implements CopyHelper
-{
- protected TypeHelper scope;
-
- public CrossScopeCopyHelperImpl(TypeHelper targetScope)
- {
- scope = targetScope;
- }
-
- public DataObject copyShallow(DataObject dataObject)
- {
- Copier copier = new CrossScopeCopier()
- {
- protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject)
- {
- }
- protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject)
- {
- if (eObject.eIsSet(eAttribute) && !FeatureMapUtil.isFeatureMap(eAttribute))
- {
- super.copyAttribute(eAttribute,eObject,copyEObject);
- }
- }
- };
- EObject result = copier.copy((EObject)dataObject);
- copier.copyReferences();
- return (DataObject)result;
- }
-
- public DataObject copy(DataObject dataObject)
- {
- Copier copier = new CrossScopeCopier();
- DataObject result = (DataObject)copier.copy((EObject)dataObject);
- copier.copyReferences();
- return (DataObject)result;
- }
-
- protected class CrossScopeCopier extends EcoreUtil.Copier
- {
- protected boolean useOriginalReferences = false;
-
- protected EClass getTarget(EClass eClass)
- {
- EClass target = (EClass)get(eClass);
- if (target == null)
- {
- Type type = (Type)eClass;
- target = (EClass)scope.getType(type.getURI(), type.getName());
- }
- return target;
- }
-
- protected EStructuralFeature getTarget(EStructuralFeature eStructuralFeature)
- {
- EClass eClass = getTarget(eStructuralFeature.getEContainingClass());
- EStructuralFeature targetEf = eClass.getEStructuralFeature(eStructuralFeature.getName());
- return targetEf;
- }
-
- /**
- * This Method WILL BE REMOVED when EMF 3.0 is available
- */
- public void copyReferences()
- {
- for (Iterator i = entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- EObject eObject = (EObject)entry.getKey();
- EObject copyEObject = (EObject)entry.getValue();
- EClass eClass = eObject.eClass();
- for (int j = 0, size = eClass.getFeatureCount(); j < size; ++j)
- {
- EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(j);
- if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived())
- {
- if (eStructuralFeature instanceof EReference)
- {
- EReference eReference = (EReference)eStructuralFeature;
- if (!eReference.isContainment() && !eReference.isContainer())
- {
- copyReference(eReference, eObject, copyEObject);
- }
- }
- else if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
- {
- FeatureMap featureMap = (FeatureMap)eObject.eGet(eStructuralFeature);
- FeatureMap copyFeatureMap = (FeatureMap)copyEObject.eGet(getTarget(eStructuralFeature));
- int copyFeatureMapSize = copyFeatureMap.size();
- for (int k = 0, featureMapSize = featureMap.size(); k < featureMapSize; ++k)
- {
- EStructuralFeature feature = featureMap.getEStructuralFeature(k);
- if (feature instanceof EReference)
- {
- Object referencedEObject = featureMap.getValue(k);
- Object copyReferencedEObject = get(referencedEObject);
- if (copyReferencedEObject == null && referencedEObject != null)
- {
- EReference reference = (EReference)feature;
- if (!useOriginalReferences || reference.isContainment() || reference.getEOpposite() != null)
- {
- continue;
- }
- copyReferencedEObject = referencedEObject;
- }
- // If we can't add it, it must aleady be in the list so find it and move it to the end.
- //
- if (!copyFeatureMap.add(feature, copyReferencedEObject))
- {
- for (int l = 0; l < copyFeatureMapSize; ++l)
- {
- if (copyFeatureMap.getEStructuralFeature(l) == feature && copyFeatureMap.getValue(l) == copyReferencedEObject)
- {
- copyFeatureMap.move(copyFeatureMap.size() - 1, l);
- --copyFeatureMapSize;
- break;
- }
- }
- }
- }
- else
- {
- copyFeatureMap.add(featureMap.get(k));
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * This Method WILL BE REMOVED when EMF 3.0 is available
- */
- protected void copyReference(EReference eReference, EObject eObject, EObject copyEObject)
- {
- if (eObject.eIsSet(eReference))
- {
- if (eReference.isMany())
- {
- InternalEList source = (InternalEList)eObject.eGet(eReference);
- InternalEList target = (InternalEList)copyEObject.eGet(getTarget(eReference));
- if (source.isEmpty())
- {
- target.clear();
- }
- else
- {
- boolean isBidirectional = eReference.getEOpposite() != null;
- int index = 0;
- for (Iterator k = resolveProxies ? source.iterator() : source.basicIterator(); k.hasNext();)
- {
- Object referencedEObject = k.next();
- Object copyReferencedEObject = get(referencedEObject);
- if (copyReferencedEObject == null)
- {
- if (useOriginalReferences && !isBidirectional)
- {
- target.addUnique(index, referencedEObject);
- ++index;
- }
- }
- else
- {
- if (isBidirectional)
- {
- int position = target.indexOf(copyReferencedEObject);
- if (position == -1)
- {
- target.addUnique(index, copyReferencedEObject);
- }
- else if (index != position)
- {
- target.move(index, copyReferencedEObject);
- }
- }
- else
- {
- target.addUnique(index, copyReferencedEObject);
- }
- ++index;
- }
- }
- }
- }
- else
- {
- Object referencedEObject = eObject.eGet(eReference, resolveProxies);
- if (referencedEObject == null)
- {
- copyEObject.eSet(getTarget(eReference), null);
- }
- else
- {
- Object copyReferencedEObject = get(referencedEObject);
- if (copyReferencedEObject == null)
- {
- if (useOriginalReferences && eReference.getEOpposite() == null)
- {
- copyEObject.eSet(getTarget(eReference), referencedEObject);
- }
- }
- else
- {
- copyEObject.eSet(getTarget(eReference), copyReferencedEObject);
- }
- }
- }
- }
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java
deleted file mode 100644
index 774d296eae..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java
+++ /dev/null
@@ -1,59 +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.helper;
-
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * A Factory for creating DataObjects. The created DataObjects are not connected
- * to any other DataObjects.
- */
-public class DataFactoryImpl implements DataFactory {
- protected HelperContext helperContext;
-
- public DataFactoryImpl(HelperContext hc) {
- this.helperContext = hc;
- }
-
- public DataObject create(String uri, String typeName) {
- Type type = helperContext.getTypeHelper().getType(uri, typeName);
- return create(type);
- }
-
- public DataObject create(Class interfaceClass) {
- // TODO more efficient implementation ... this is a really bad one!
- Type type = helperContext.getTypeHelper().getType(interfaceClass);
- return create(type);
- }
-
- public DataObject create(Type type) {
- return DataObjectUtil.create(type);
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
deleted file mode 100644
index d30da1cc4a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java
+++ /dev/null
@@ -1,615 +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.helper;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataHelper;
-
-/**
- * Data helper methods.
- */
-public class DataHelperImpl implements DataHelper
-{
- /**
- * @param dateString - Must comply to the pattern of yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'
- * @return null if dataString couldn't be parsed
- */
- public synchronized Date toDate(String dateString)
- {
- if (dateString == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat format;
- Date result = null;
- boolean negative = false;
- String formatString;
- dateString = dateString.trim();
-
- // Determine if it is a negative Date, DateTime, or Duration
-
- if (dateString.length() > 2 && dateString.charAt(0) == '-' && dateString.charAt(1) != '-')
- {
- negative = true;
- dateString = dateString.substring(1);
- }
-
- // SDO Date Format ends with a Z
-
- if (dateString.endsWith("Z"))
- {
- if (dateString.indexOf('.') != -1)
- formatString = new String("yyyy-MM-dd'T'HH:mm:ss'.'S'Z'");
- else
- formatString = new String ("yyyy-MM-dd'T'HH:mm:ss'Z'");
-
- format = new SDOSimpleDateFormat(formatString);
- format.setTimeZone(TimeZone.getTimeZone("UTC"));
-
- result = checkFormat(dateString, format);
-
- // If no match, continue to try further possibilities
-
- if (result != null)
- {
- if (negative)
- return handleBCE(result);
- else
- return result;
- }
-
- }
-
- // Duration format begins with a P
-
- if (dateString.startsWith("P"))
- {
- // Remove any spaces in the dateString
-
- String durationString = dateString.replaceAll(" ", "");
-
- // Build the formatString based on the contents of dateString
-
- formatString = obtainDurationFormats(durationString);
- format = new SDOSimpleDateFormat(formatString);
- result = checkFormat(durationString, format);
- if (result != null)
- {
- if (negative)
- return handleNegative(result);
- else
- return result;
- }
- }
-
- formatString = obtainSpecificFormat(dateString);
-
- if (formatString != null)
- {
- format = new SDOSimpleDateFormat(formatString);
- result = checkFormat(dateString, format);
-
- if (result != null)
- {
- if (negative)
- return handleBCE(result);
- else
- return result;
- }
- }
-
- return null;
- }
-
- private synchronized Date checkFormat(String dateString, SDOSimpleDateFormat format)
- {
- String formatPattern = format.toPattern();
- StringBuffer addedFields = new StringBuffer();
- String fieldsString, parseString;
- SDOSimpleDateFormat compositeFormat;
- Date dateValue;
-
- // For certain permissable input strings (e.g. those resulting from toYear
- // toDay, toTime), there are fields missing which when converted to Date have
- // default values. (e.g. Year -> 1970). Because of this, there can be great
- // variation in how daylight savings time is accounted for. (e.g. In 1970 Britain
- // was on DST year round, and during the summer of 1944 was on double daylight time.)
- // Because these possible variations exist, it is assumed that the user would prefer
- // the current handling of daylight savings time. As such, the year, month and day
- // will default to their current values when absent. (The user should not be checking
- // for Year=1970 (etc.) as evidence of taking the default, as explicitly setting a
- // year to 1970 is valid and would then not be an instance of a default taken.)
-
- if (!(formatPattern.startsWith("P")))
- {
- if (formatPattern.indexOf('y') == -1)
- addedFields.append("yyyy ");
-
- if (formatPattern.indexOf('M') == -1)
- addedFields.append("MM ");
-
- if (formatPattern.indexOf('d') == -1)
- addedFields.append("dd ");
- }
-
- fieldsString = addedFields.toString();
-
- if (fieldsString.length() == 0)
- {
- parseString = dateString;
- compositeFormat = format;
- }
-
- else
- {
- compositeFormat = new SDOSimpleDateFormat(fieldsString);
- dateValue = new Date(System.currentTimeMillis());
- parseString = compositeFormat.format(dateValue) + dateString;
- compositeFormat.applyPattern(fieldsString + formatPattern);
- }
-
- try
- {
- return compositeFormat.parse(parseString);
- }
-
- catch (ParseException parseException)
- {
- }
-
- return null;
- }
-
- public synchronized String obtainSpecificFormat(String dateString)
- {
- StringBuffer formatBuffer = new StringBuffer();
- int colonIndex = dateString.indexOf(':');
- int hyphenIndex = dateString.indexOf('-');
-
- if (dateString.startsWith("--"))
- {
- if (dateString.charAt(2) == '-') // starts with ---
- formatBuffer.append("'---'dd");
- else if (dateString.substring(2).indexOf('-') == -1)
- formatBuffer.append("'--'MM");
- else
- formatBuffer.append("'--'MM'-'dd");
- }
-
- else if (colonIndex == 1 || colonIndex == 2)
- {
- if (dateString.indexOf('.') != -1)
- formatBuffer.append("HH:mm:ss'.'S");
- else if (dateString.substring(colonIndex + 1).indexOf(':') != -1)
- formatBuffer.append("HH:mm:ss");
- else
- formatBuffer.append("HH:mm");
- }
-
- else if (hyphenIndex != -1)
- {
- if (dateString.substring(hyphenIndex + 1).indexOf('-') == -1)
- formatBuffer.append("yyyy-MM");
- else if (colonIndex != -1)
- {
- if (dateString.indexOf('.') != -1)
- formatBuffer.append("yyyy-MM-dd'T'HH:mm:ss'.'S");
- else if (dateString.substring(colonIndex + 1).indexOf(':') != -1)
- formatBuffer.append("yyyy-MM-dd'T'HH:mm:ss");
- else
- formatBuffer.append("yyyy-MM-dd'T'HH:mm");
- }
- else
- formatBuffer.append ("yyyy-MM-dd");
- }
- else if (colonIndex == -1) // indexOf('-') == -1
- {
- formatBuffer.append("yyyy");
- }
- else
- return null;
-
- // Determine if a Time Zone is included and needs to be parsed.
- // ---------------------------------
- // The only letter allowed in the above formats is 'T'.
- // All times zones include at least one letter other than 'T'.
-
- int i = 0;
- boolean letterFound = false;
- char currentChar;
- while (i < dateString.length() && !letterFound)
- {
- currentChar = dateString.charAt(i);
- if (Character.isLetter(currentChar) && currentChar != 'T')
- letterFound = true;;
- i++;
- }
-
- if (letterFound)
- formatBuffer.append(" z");
-
- return formatBuffer.toString();
- }
-
- public synchronized String obtainDurationFormats(String dateString)
- {
- String firstPart, secondPart;
- StringBuffer formatBuffer = new StringBuffer("'P'");
-
- // Must divide it into two parts to distinguish between Months and Minutes
-
- int time_index = dateString.indexOf('T');
- if (time_index != -1)
- {
- firstPart = dateString.substring(0, time_index + 1);
- secondPart = dateString.substring(time_index);
- }
- else
- {
- firstPart = dateString;
- secondPart = null;
- }
-
- if (firstPart.indexOf('Y') != -1)
- formatBuffer.append("yyyy'Y'");
- if (firstPart.indexOf('M') != -1)
- formatBuffer.append("MM'M'");
- if (firstPart.indexOf('D') != -1)
- formatBuffer.append("dd'D'");
- if (time_index != -1)
- {
- formatBuffer.append("'T'");
-
- if (secondPart.indexOf('H') != -1)
- formatBuffer.append("HH'H'");
- if (secondPart.indexOf('M') != -1)
- formatBuffer.append("mm'M'");
- if (secondPart.indexOf("S.") != -1)
- formatBuffer.append("ss'S'.S");
- else if (secondPart.indexOf('S') != -1)
- formatBuffer.append("ss'S'");
- }
-
- return formatBuffer.toString().replaceAll("''", "");
- }
-
- // Return a negative Duration if a negative sign existed in dateString
- public synchronized Date handleNegative(Date output)
- {
- return new Date(0 - output.getTime());
- }
-
- // Return the date in BCE if a negative sign existed in dateString
-
- public synchronized Date handleBCE(Date output)
- {
- GregorianCalendar temp = new GregorianCalendar();
- temp.setTime(output);
- temp.set(GregorianCalendar.ERA, GregorianCalendar.BC);
-
- return temp.getTime();
- }
-
- public synchronized Calendar toCalendar(String dateString)
- {
- return toCalendar(dateString, null);
- }
-
- public synchronized Calendar toCalendar(String dateString, Locale locale)
- {
- if (dateString == null)
- {
- return null;
- }
-
- Date date = toDate(dateString);
- if (date == null)
- {
- return null;
- }
-
- Calendar calendar = locale != null ? new GregorianCalendar(locale) : new GregorianCalendar();
- calendar.setTime(date);
- return calendar;
- }
-
- public synchronized String toDateTime(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'");
- f.setTimeZone(TimeZone.getTimeZone("UTC"));
-
- return f.format(date);
- }
-
- public synchronized String toDuration(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("'P'yyyy'Y' MM'M' dd'D' 'T' HH'H' mm'M' ss'S.'SSS");
-
- return f.format(date);
- }
-
- public synchronized String toTime(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("HH:mm:ss'.'SSS zz");
-
- return f.format(date);
- }
-
- public synchronized String toDay(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("---dd zz");
-
- return f.format(date);
- }
-
- public synchronized String toMonth(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("--MM zz");
-
- return f.format(date);
- }
-
- public synchronized String toMonthDay(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("--MM-dd zz");
-
- return f.format(date);
- }
-
- public synchronized String toYear(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("yyyy zz");
-
- return f.format(date);
- }
-
- public synchronized String toYearMonth(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("yyyy-MM zz");
-
- return f.format(date);
- }
-
- public synchronized String toYearMonthDay(Date date)
- {
- if (date == null)
- {
- return null;
- }
-
- SDOSimpleDateFormat f = new SDOSimpleDateFormat("yyyy-MM-dd zz");
-
- return f.format(date);
- }
-
- public synchronized String toDateTime(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toDateTime(calendar.getTime());
- }
-
- public synchronized String toDuration(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toDuration(calendar.getTime());
- }
-
- public synchronized String toTime(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toTime(calendar.getTime());
- }
-
- public synchronized String toDay(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toDay(calendar.getTime());
- }
-
- public synchronized String toMonth(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toMonth(calendar.getTime());
- }
-
- public synchronized String toMonthDay(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toMonthDay(calendar.getTime());
- }
-
- public synchronized String toYear(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toYear(calendar.getTime());
- }
-
- public synchronized String toYearMonth(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toYearMonth(calendar.getTime());
- }
-
- public synchronized String toYearMonthDay(Calendar calendar)
- {
- if (calendar == null)
- {
- return null;
- }
-
- return toYearMonthDay(calendar.getTime());
- }
-
- public Object convert(Type type, Object value)
- {
- Class typeClass = type.getInstanceClass();
- if (typeClass.isInstance(value))
- return value;
-
- if (typeClass == BigDecimal.class) {
- return DataObjectUtil.getBigDecimal(value);
- }
- else if (typeClass == BigInteger.class) {
- return DataObjectUtil.getBigInteger(value);
- }
- else if (typeClass == boolean.class || typeClass == Boolean.class) {
- return new Boolean(DataObjectUtil.getBoolean(value));
- }
- else if (typeClass == byte.class || typeClass == Byte.class) {
- return new Byte(DataObjectUtil.getByte(value));
- }
- else if (typeClass == byte[].class) {
- return DataObjectUtil.getBytes(value);
- }
- else if (typeClass == char.class || typeClass == Character.class) {
- return new Character(DataObjectUtil.getChar(value));
- }
- else if (typeClass == Date.class) {
- return DataObjectUtil.getDate(value);
- }
- else if (typeClass == double.class || typeClass == Double.class) {
- return new Double(DataObjectUtil.getDouble(value));
- }
- else if (typeClass == float.class || typeClass == Float.class) {
- return new Float(DataObjectUtil.getFloat(value));
- }
- else if (typeClass == int.class || typeClass == Integer.class) {
- return new Integer(DataObjectUtil.getInt(value));
- }
- else if (typeClass == long.class || typeClass == Long.class) {
- return new Long(DataObjectUtil.getLong(value));
- }
- else if (typeClass == short.class || typeClass == Short.class) {
- return new Short(DataObjectUtil.getShort(value));
- }
- else if (typeClass == String.class) {
- return DataObjectUtil.getString(value);
- }
-
- throw new IllegalArgumentException();
- }
-
- public Object convert(Property property, Object value)
- {
- Type type = property.getType();
- if (!property.isMany())
- {
- return convert(type, value);
- }
- else
- {
- List listValue = (List)value;
- List listResult = new ArrayList();
- for (Iterator iter = listValue.iterator(); iter.hasNext(); ) {
- listResult.add(convert(type, iter.next()));
- }
- return listResult;
- }
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DefaultHelperContextImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DefaultHelperContextImpl.java
deleted file mode 100644
index f7ac22632a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/DefaultHelperContextImpl.java
+++ /dev/null
@@ -1,72 +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.helper;
-
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-
-public class DefaultHelperContextImpl extends HelperContextImpl {
- public DefaultHelperContextImpl(final boolean extensibleNamespaces) {
- super(new SDOExtendedMetaDataImpl(new SDOPackageRegistryDelegator()), extensibleNamespaces);
- }
-
- public DefaultHelperContextImpl(final boolean extensibleNamespaces, final Map options) {
- super(new SDOExtendedMetaDataImpl(new SDOPackageRegistryDelegator()), extensibleNamespaces, options);
- }
-
- protected static class SDOPackageRegistryDelegator extends EPackageRegistryImpl.Delegator {
- /**
- * A map from class loader to its associated registry.
- */
- protected Map classLoaderToRegistryMap = new WeakHashMap();
-
- /**
- * Returns the package registry associated with the given class loader.
- * @param classLoader the class loader.
- * @return the package registry associated with the given class loader.
- */
- public synchronized EPackage.Registry getRegistry(final ClassLoader classLoader)
- {
- EPackage.Registry result = (EPackage.Registry)classLoaderToRegistryMap.get(classLoader);
- if (result == null)
- {
- if (classLoader == null)
- {
- result = HelperContextImpl.getBuiltInModelRegistry();
- }
- else
- {
- result = new EPackageRegistryImpl(getRegistry(classLoader.getParent()));
- classLoaderToRegistryMap.put(classLoader, result);
- }
- }
- return result;
- }
-
- protected EPackage.Registry delegateRegistry(final ClassLoader classLoader)
- {
- return getRegistry(classLoader);
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/EqualityHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/EqualityHelperImpl.java
deleted file mode 100644
index 0d3d8ee5b7..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/EqualityHelperImpl.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.helper;
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.EqualityHelper;
-
-
-/**
- * A helper for comparing DataObjects.
- */
-public class EqualityHelperImpl implements EqualityHelper
-{
- public boolean equalShallow(DataObject dataObject1, DataObject dataObject2)
- {
- EcoreUtil.EqualityHelper equalityHelper = new EcoreUtil.EqualityHelper()
- {
- protected boolean haveEqualFeature(EObject eObject1, EObject eObject2, EStructuralFeature feature)
- {
- if (feature instanceof EAttribute)
- {
- if(!("ChangeSummaryType".equals(feature.getEType().getName()) && "commonj.sdo".equals(feature.getEType().getEPackage().getNsURI()))) {
- boolean eIsSet = eObject1.eIsSet(feature);
- if (eIsSet != eObject2.eIsSet(feature) || !haveEqualAttribute(eObject1, eObject2, (EAttribute)feature))
- {
- return false;
- }
- }
- }
- return true;
- }
-
- protected boolean equalFeatureMapValues(Object value1, Object value2, EStructuralFeature feature)
- {
- if (feature instanceof EAttribute)
- {
- return value1 == null ? value2 == null : value1.equals(value2);
- }
- return true;
- }
- };
- return equalityHelper.equals((EObject)dataObject1, (EObject)dataObject2);
- }
-
- public boolean equal(DataObject dataObject1, DataObject dataObject2)
- {
- EcoreUtil.EqualityHelper equalityHelper = new EcoreUtil.EqualityHelper()
- {
- protected boolean haveEqualAttribute(EObject eObject1, EObject eObject2, EAttribute attribute) {
- if(("ChangeSummaryType".equals(attribute.getEType().getName()) && "commonj.sdo".equals(attribute.getEType().getEPackage().getNsURI()))) {
- throw new UnsupportedOperationException("This will be implemented when change summary serialzation/deserialization is in place");
- }
- else if( "Bytes".equals(attribute.getEType().getName()) ) {
- try
- {
- byte [] value1 = (byte [])eObject1.eGet(attribute);
- byte [] value2 = (byte [])eObject2.eGet(attribute);
-
- return( java.util.Arrays.equals(value1,value2) );
- }
- catch(Exception ex)
- {
- // if any exception is thrown, assumption is they are not equal
- return false;
- }
- }
- else {
- return super.haveEqualAttribute(eObject1, eObject2, attribute);
- }
- }
- };
- return equalityHelper.equals((EObject)dataObject1, (EObject)dataObject2); }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperContextImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperContextImpl.java
deleted file mode 100644
index 64ee628693..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperContextImpl.java
+++ /dev/null
@@ -1,193 +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.helper;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.change.ChangePackage;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-
-public class HelperContextImpl implements HelperContext {
- /*
- * Relationship: HelperContext*Impl* ---1:1---> ExtendedMetaData ---1:1--->
- * Map (:defaultOption) <---1:1---> TypeHelper <---1:1---> XMLHelper
- * <---1:1---> XMLStreamHelper <---1:1---> XSDHelper <---1:1---> DataFactory
- */
-
- protected ExtendedMetaData extendedMetaData;
- protected DataFactory dataFactory;
- protected TypeHelper typeHelper;
- protected XMLHelper xmlHelper;
- protected XSDHelper xsdHelper;
- protected XMLStreamHelper xmlStreamHelper;
- protected Map defaultOptions = null;
-
- public HelperContextImpl(ExtendedMetaData extendedMetaData, boolean extensibleNamespaces) {
- this.defaultOptions = null;
- this.extendedMetaData = extendedMetaData;
- typeHelper = new TypeHelperImpl(this);
- dataFactory = new DataFactoryImpl(this);
- xmlHelper = new XMLHelperImpl(this);
- xsdHelper = new XSDHelperImpl(this, null, extensibleNamespaces);
- xmlStreamHelper = new XMLStreamHelperImpl(this);
- }
-
-
- public HelperContextImpl(ExtendedMetaData extendedMetaData, boolean extensibleNamespaces, Map options) {
- this.defaultOptions = options;
- this.extendedMetaData = extendedMetaData;
- typeHelper = new TypeHelperImpl(this);
- dataFactory = new DataFactoryImpl(this);
- xmlHelper = new XMLHelperImpl(this);
- xsdHelper = new XSDHelperImpl(this, null, extensibleNamespaces);
- xmlStreamHelper = new XMLStreamHelperImpl(this);
- }
-
- // many places this is called in existing code
- // This is used for supporting the deprecated util -
- // org.apache.tuscany.sdo.util.SDOUtil
- // Once we conpletely remove this deprecated util, we can remove the below
- // constructor
- public HelperContextImpl(TypeHelper scope) {
- this(scope, null);
- }
-
-
- public HelperContextImpl(TypeHelper scope, Map options) {
- this.defaultOptions = options;
- typeHelper = scope;
- this.extendedMetaData = ((TypeHelperImpl)scope).getExtendedMetaData();
- dataFactory = new DataFactoryImpl(this);
- xmlHelper = new XMLHelperImpl(this);
- xsdHelper = new XSDHelperImpl(this);
- xmlStreamHelper = new XMLStreamHelperImpl(this);
- }
-
- public HelperContextImpl(boolean extensibleNamespaces) {
- this(new SDOExtendedMetaDataImpl(new EPackageRegistryImpl(getBuiltInModelRegistry())), extensibleNamespaces);
- }
-
-
- public HelperContextImpl(boolean extensibleNamespaces, Map options) {
- this(new SDOExtendedMetaDataImpl(new EPackageRegistryImpl(getBuiltInModelRegistry())), extensibleNamespaces,
- options);
- }
-
- static protected EPackage.Registry builtInModelRegistry = null;
-
- static public EPackage.Registry getBuiltInModelRegistry() {
- if (builtInModelRegistry == null) {
- EPackageRegistryImpl registry = new EPackageRegistryImpl();
- for (Iterator iter = TypeHelperImpl.getBuiltInModels().iterator(); iter.hasNext();) {
- EPackage ePackage = (EPackage)iter.next();
- registry.put(ePackage.getNsURI(), ePackage);
- }
-
- registry.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE);
- registry.put(XMLTypePackage.eNS_URI, XMLTypePackage.eINSTANCE);
- registry.put(ChangePackage.eNS_URI, ChangePackage.eINSTANCE);
- registry.put(XMLNamespacePackage.eNS_URI, XMLNamespacePackage.eINSTANCE);
- registry.put(SDOPackage.eNS_URI, SDOPackage.eINSTANCE);
-
- builtInModelRegistry = registry;
- }
- return builtInModelRegistry;
- }
-
- public CopyHelper getCopyHelper() {
- return CopyHelper.INSTANCE;
- }
-
- public DataFactory getDataFactory() {
- return dataFactory;
- }
-
- public DataHelper getDataHelper() {
- return DataHelper.INSTANCE;
- }
-
- public EqualityHelper getEqualityHelper() {
- return EqualityHelper.INSTANCE;
- }
-
- public TypeHelper getTypeHelper() {
- return typeHelper;
- }
-
- public XMLHelper getXMLHelper() {
- return xmlHelper;
- }
-
- public XMLStreamHelper getXMLStreamHelper() {
- return xmlStreamHelper;
- }
-
- public XSDHelper getXSDHelper() {
- return xsdHelper;
- }
-
- public void setOptions(Map options) {
- this.defaultOptions = options;
- }
-
- public Map getOptions() {
- return this.defaultOptions;
- }
-
- public Map getMergedOption(Map options) {
- Map mergedOptions = null;// copy to be used for merge
-
- if (defaultOptions == null) {
- return options;
- }
-
- mergedOptions = new HashMap(defaultOptions);
- if (options == null) {
- return mergedOptions;
- }
- mergedOptions.putAll(options);
-
- return mergedOptions;
- }
-
- public ExtendedMetaData getExtendedMetaData() {
- return extendedMetaData;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperProviderImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperProviderImpl.java
deleted file mode 100644
index 360617bd20..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperProviderImpl.java
+++ /dev/null
@@ -1,50 +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.helper;
-
-
-import org.apache.tuscany.sdo.spi.HelperProviderBase;
-
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Create and manage all the default helper INSTANCEs
- */
-public class HelperProviderImpl extends HelperProviderBase
-{
- public HelperContext createDefaultHelpers()
- {
- //FB HelperContext hc = SDOUtil.createHelperContext();
- //FB The defulat HelperContext must use EMF's ClassLoader-delegating EPackage.Registry.INSTANCE, until we provide
- //FB another way to get (ClassLoader scope) support for HelperContext.
- HelperContext hc = new DefaultHelperContextImpl(false);
- typeHelper = hc.getTypeHelper();
- dataFactory = hc.getDataFactory();
- xmlHelper = hc.getXMLHelper();
- xsdHelper = hc.getXSDHelper();
- copyHelper = new CopyHelperImpl();
- equalityHelper = new EqualityHelperImpl();
- dataHelper = new DataHelperImpl();
- sdoHelper = new SDOHelperImpl();
- xmlStreamHelper = ((HelperContextImpl)hc).getXMLStreamHelper();
-
- return hc;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOAnnotations.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOAnnotations.java
deleted file mode 100644
index 816fb3bf9f..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOAnnotations.java
+++ /dev/null
@@ -1,51 +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.helper;
-
-public class SDOAnnotations
-{
- public static final String COLON = ":";
- public static final String COMMONJ_SDO_NS = "commonj.sdo";
- public static final String COMMONJ_SDO_NS_PREFIX = "sdo";
- public static final String SDO_JAVA_NS = "commonj.sdo/java";
- public static final String SDO_JAVA_NS_PREFIX = "sdoJava";
-
- public static final String JAVA_PACKAGE = SDO_JAVA_NS_PREFIX + COLON + "package";
- public static final String ALIAS_NAMES = COMMONJ_SDO_NS_PREFIX + COLON + "aliasName";
- public static final String READ_ONLY = COMMONJ_SDO_NS_PREFIX + COLON + "readOnly";
- public static final String INSTANCE_CLASS = SDO_JAVA_NS_PREFIX + COLON + "instanceClass";
- public static final String ABSTRACT_TYPE = "abstract";
- public static final String PROPERTY_TYPE = COMMONJ_SDO_NS_PREFIX + COLON + "propertyType";
- public static final String OPPOSITE_PROPERTY = COMMONJ_SDO_NS_PREFIX + COLON + "oppositeProperty";
-
-
- //used by the annotations map to uniquely identify schema elements that need to be annotated
- //and to store the corresponding annotations in a map
- public static final String SCHEMA = "schema";
- public static final String ELEMENT = "element";
- public static final String COMPLEX_TYPE = "complexType";
- public static final String SIMPLE_TYPE = "simpleType";
- public static final String ATTRIBUTE = "attribute";
-
- public static String makeAnnotationMapKey(String namespace, String schemaElementType, String nameAttrValue)
- {
- return namespace + schemaElementType + nameAttrValue;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java
deleted file mode 100644
index ba632a0523..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java
+++ /dev/null
@@ -1,305 +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.helper;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.apache.tuscany.sdo.SDOExtendedMetaData;
-import org.apache.tuscany.sdo.impl.SDOFactoryImpl.SDOEcoreFactory;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EPackage.Registry;
-
-/**
- * TODO make demand() methods synchronous?
- */
-public class SDOExtendedMetaDataImpl
- extends BaseSDOExtendedMetaDataImpl
- implements SDOExtendedMetaData
-{
-
- public SDOExtendedMetaDataImpl() {
- this(HelperContextImpl.getBuiltInModelRegistry());
- }
-
- public SDOExtendedMetaDataImpl(Registry registry) {
- super(registry);
- ecoreFactory = new SDOEcoreFactory();
- demandMetaData = new SDODemandMetaData();
- }
-
- public static class SDODemandMetaData extends DemandMetaData {
- EClassifier getEObject() { return (EClassifier)((ModelFactoryImpl)ModelFactory.INSTANCE).getDataObject(); }
- EClassifier getAnySimpleType() { return (EClassifier)((ModelFactoryImpl)ModelFactory.INSTANCE).getObject(); }
- }
-
- public EPackage getPackage(String namespace)
- {
- if ("".equals(namespace)) namespace = null; //FB
- EPackage result = registry.getEPackage(namespace);
- return result == null ? super.getPackage(namespace) : result;
- }
-
- /**
- * Returns the listing of alias names as specified by the sdo:aliasNames
- * property.
- */
- public List getAliasNames(EModelElement modelElement) {
- EAnnotation eAnnotation = getAnnotation(modelElement, false);
- List list = null;
- if (eAnnotation != null) {
- String aliasNames = (String)eAnnotation.getDetails().get("aliasNames");
- if (aliasNames != null) {
- list = new ArrayList();
- StringTokenizer st = new StringTokenizer(aliasNames, " ");
- while (st.hasMoreTokens()) {
- String t = st.nextToken();
- list.add(t);
- }
- }
- }
- return list;
- }
-
-
- public void setAliasNames(EModelElement modelElement, List aliasNames) {
- if (aliasNames == null || aliasNames.isEmpty()) {
- setAliasNames(modelElement, (String)null);
- } else {
- StringBuffer buf = new StringBuffer();
- for (int n = 0; n < aliasNames.size(); n++) {
- String name = (String) aliasNames.get(n);
- buf.append(name);
- buf.append(" ");
- }
- setAliasNames(modelElement, buf.toString());
- }
- }
-
- /**
- * Adds an alias name per sdo:aliasName
- */
- public void setAliasNames(EModelElement modelElement, String aliasNames) {
- EAnnotation eAnnotation = getAnnotation(modelElement, true);
- eAnnotation.getDetails().put("aliasNames", aliasNames);
- }
-
- public EPackage.Registry getRegistry()
- {
- return registry;
- }
-
- boolean featureNamespaceMatchingLax = true;
-
- public void setFeatureNamespaceMatchingLax(boolean b) {
- featureNamespaceMatchingLax = b;
- }
-
- protected boolean isFeatureNamespaceMatchingLax() {
- return featureNamespaceMatchingLax;
- }
-
- /*
- * (non-Javadoc)
- *
- * Eagerly pre-cache the "holder"s for static packages.
- *
- * @see org.eclipse.emf.ecore.util.BasicExtendedMetaData#putPackage(java.lang.String,
- * org.eclipse.emf.ecore.EPackage)
- */
- public void putPackage(String namespace, EPackage ePackage) {
- for (Iterator iterator = ePackage.eAllContents(); iterator.hasNext();) {
- Object object = iterator.next();
- if (object instanceof EClassifier) {
- this.getName((EClassifier) object);
- } else if (object instanceof EStructuralFeature) {
- this.getName((EStructuralFeature) object);
- }
- }
- super.putPackage(namespace, ePackage);
- }
-
- /******************************************************************************************************
- * Following methods, getLocalAttribute & getLocalElement, ARE TEMPORARY COPIES FROM THE BASE CLASS.
- * One line (the last line)in each method is changed to support lax namespace matching.
- * DO NOT EDIT THESE METHODS. THEY WILL BE REMOVED WHEN WE MOVE TO EMF 2.3, WHICH FIXES THE PROBLEM.
- ******************************************************************************************************/
-
- public EStructuralFeature getLocalAttribute(EClass eClass, String namespace, String name)
- {
- EStructuralFeature result = null;
- if (isFeatureKindSpecific())
- {
- List allAttributes = getAllAttributes(eClass);
- for (int i = 0, size = allAttributes.size(); i < size; ++i)
- {
- EStructuralFeature eStructuralFeature = (EStructuralFeature) allAttributes.get(i);
- if (name.equals(getName(eStructuralFeature)))
- {
- String featureNamespace = getNamespace(eStructuralFeature);
- if (namespace == null)
- {
- if (featureNamespace == null)
- {
- return eStructuralFeature;
- }
- else if (result == null)
- {
- result = eStructuralFeature;
- }
- }
- else if (namespace.equals(featureNamespace))
- {
- return eStructuralFeature;
- }
- else if (featureNamespace == null && result == null)
- {
- result = eStructuralFeature;
- }
- }
- }
- }
- else
- {
- for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
- {
- EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);
- switch (getFeatureKind(eStructuralFeature))
- {
- case UNSPECIFIED_FEATURE:
- case ATTRIBUTE_FEATURE:
- {
- if (name.equals(getName(eStructuralFeature)))
- {
- String featureNamespace = getNamespace(eStructuralFeature);
- if (namespace == null)
- {
- if (featureNamespace == null)
- {
- return eStructuralFeature;
- }
- else if (result == null)
- {
- result = eStructuralFeature;
- }
- }
- else if (namespace.equals(featureNamespace))
- {
- return eStructuralFeature;
- }
- else if (featureNamespace == null && result == null)
- {
- result = eStructuralFeature;
- }
- }
- break;
- }
- }
- }
- }
-
- return isFeatureNamespaceMatchingLax() ? result : null;
- }
-
- protected EStructuralFeature getLocalElement(EClass eClass, String namespace, String name)
- {
- EStructuralFeature result = null;
- if (isFeatureKindSpecific())
- {
- List allElements = getAllElements(eClass);
- for (int i = 0, size = allElements.size(); i < size; ++i)
- {
- EStructuralFeature eStructuralFeature = (EStructuralFeature) allElements.get(i);
- if (name.equals(getName(eStructuralFeature)))
- {
- String featureNamespace = getNamespace(eStructuralFeature);
- if (namespace == null)
- {
- if (featureNamespace == null)
- {
- return eStructuralFeature;
- }
- else if (result == null)
- {
- result = eStructuralFeature;
- }
- }
- else if (namespace.equals(featureNamespace))
- {
- return eStructuralFeature;
- }
- else if (featureNamespace == null && result == null)
- {
- result = eStructuralFeature;
- }
- }
- }
- }
- else
- {
- for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
- {
- EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);
- switch (getFeatureKind(eStructuralFeature))
- {
- case UNSPECIFIED_FEATURE:
- case ELEMENT_FEATURE:
- {
- if (name.equals(getName(eStructuralFeature)))
- {
- String featureNamespace = getNamespace(eStructuralFeature);
- if (namespace == null)
- {
- if (featureNamespace == null)
- {
- return eStructuralFeature;
- }
- else if (result == null)
- {
- result = eStructuralFeature;
- }
- }
- else if (namespace.equals(featureNamespace))
- {
- return eStructuralFeature;
- }
- else if (featureNamespace == null && result == null)
- {
- result = eStructuralFeature;
- }
- }
- break;
- }
- }
- }
- }
-
- return isFeatureNamespaceMatchingLax() ? result : null;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java
deleted file mode 100644
index 922f092845..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java
+++ /dev/null
@@ -1,530 +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.helper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.tuscany.sdo.SDOExtendedMetaData;
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.SimpleAnyTypeDataObject;
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.apache.tuscany.sdo.api.EventListener;
-import org.apache.tuscany.sdo.impl.ClassImpl;
-import org.apache.tuscany.sdo.impl.DataGraphImpl;
-import org.apache.tuscany.sdo.impl.DynamicDataObjectImpl;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.apache.tuscany.sdo.spi.SDOHelperBase;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.UniqueEList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.impl.HelperProvider;
-
-public class SDOHelperImpl extends SDOHelperBase implements SDOHelper, SDOHelper.MetaDataBuilder {
-
- public DataObject createDataTypeWrapper(Type dataType, Object value) {
- SimpleAnyTypeDataObject simpleAnyType = SDOFactory.eINSTANCE.createSimpleAnyTypeDataObject();
- simpleAnyType.setInstanceType((EDataType)dataType);
- simpleAnyType.setValue(value);
- return simpleAnyType;
- }
-
- public Object createFromString(Type dataType, String literal) {
- return EcoreUtil.createFromString((EDataType)dataType, literal);
- }
-
- public String convertToString(Type dataType, Object value) {
- return EcoreUtil.convertToString((EDataType)dataType, value);
- }
-
- public Type getXSDSDOType(String xsdType) {
- Type type = null;
- String name = (String)xsdToSdoMappings.get(xsdType);
- if (name != null)
- type = (Type)((ModelFactoryImpl)ModelFactory.INSTANCE).getEClassifier(name);
- return type;
- }
-
- public Sequence getSubstitutionValues(DataObject dataObject, Property head) {
- final EStructuralFeature group = ExtendedMetaData.INSTANCE.getGroup((EStructuralFeature)head);
- return null == group ? null : (Sequence)((FeatureMap.Internal)((EObject)dataObject).eGet(group)).getWrapper();
- }
-
- public Type getJavaSDOType(Class javaClass) {
- String name = (String)javaToSdoMappings.get(javaClass);
- if (name != null) {
- return (Type)((ModelFactoryImpl)ModelFactory.INSTANCE).getEClassifier(name);
- }
- return null;
- }
-
- public boolean isRequired(Property property) {
- return ((EStructuralFeature)property).isRequired();
- }
-
- public int getUpperBound(Property property) {
- return ((EStructuralFeature)property).getUpperBound();
- }
-
- public int getLowerBound(Property property) {
- return ((EStructuralFeature)property).getLowerBound();
- }
-
- public List getEnumerationFacet(Type type) {
- List instProps = type.getInstanceProperties();
- String propertyName = "enumeration";
- Property enumProperty = null;
-
- for (int i = 0; i < instProps.size(); i++)
- {
- Property prop = (Property)instProps.get(i);
- if (propertyName.equals(prop.getName()))
- enumProperty = prop;
- }
-
- return (List)DataObjectUtil.getMetaObjectInstanceProperty((EModelElement)type, enumProperty);
- }
-
- public List getPatternFacet(Type type) {
- List instProps = type.getInstanceProperties();
- String propertyName = "pattern";
- Property patternProperty = null;
-
- for (int i = 0; i < instProps.size(); i++)
- {
- Property prop = (Property)instProps.get(i);
- if (propertyName.equals(prop.getName()))
- patternProperty = prop;
- }
-
- return (List)DataObjectUtil.getMetaObjectInstanceProperty((EModelElement)type, patternProperty);
- }
-
- public boolean isMany(Property property, DataObject context) {
- return FeatureMapUtil.isMany((EObject)context, (EStructuralFeature)property);
- }
-
- public DataGraph createDataGraph() {
- return SDOFactory.eINSTANCE.createDataGraph();
- }
-
- public void setRootObject(DataGraph dataGraph, DataObject rootObject) {
- ((DataGraphImpl)dataGraph).setERootObject((EObject)rootObject);
- }
-
- public static DataGraph loadDataGraph(InputStream inputStream, Map options) throws IOException {
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
- Resource resource = resourceSet.createResource(URI.createURI("all.datagraph"));
- resource.load(inputStream, options);
- return (DataGraph)resource.getContents().get(0);
- }
-
- static final Object LOADING_SCOPE = XMLResource.OPTION_EXTENDED_META_DATA;
-
- protected void registerLoadingScope(Map options, TypeHelper scope) {
- Object extendedMetaData = ((TypeHelperImpl)scope).getExtendedMetaData();
- options.put(LOADING_SCOPE, extendedMetaData);
- }
-
- public DataGraph loadDataGraph(InputStream inputStream, Map options, HelperContext scope) throws IOException {
- if (scope == null) {
- scope = HelperProvider.getDefaultContext();
- }
- TypeHelper th = scope.getTypeHelper();
- DataGraph result = null;
- if (th == null || th == TypeHelper.INSTANCE) {
- result = loadDataGraph(inputStream, options);
- } else if (options == null) {
- options = new HashMap();
- registerLoadingScope(options, th);
- result = loadDataGraph(inputStream, options);
- } else if (options.containsKey(LOADING_SCOPE)) {
- Object restore = options.get(LOADING_SCOPE);
- registerLoadingScope(options, th);
- try {
- result = loadDataGraph(inputStream, options);
- } finally {
- options.put(LOADING_SCOPE, restore);
- }
- } else {
- registerLoadingScope(options, th);
- try {
- result = loadDataGraph(inputStream, options);
- } finally {
- options.remove(LOADING_SCOPE);
- }
- }
- return result;
- }
-
- public void saveDataGraph(DataGraph dataGraph, OutputStream outputStream, Map options) throws IOException {
- ((DataGraphImpl)dataGraph).getDataGraphResource().save(outputStream, options);
- }
-
- public void registerDataGraphTypes(DataGraph dataGraph, List/* Type */types) {
- // if (types == null)
- // types = SDOUtil.getDataGraphTypes(dataGraph);
-
- Set/* EPackage */packages = new HashSet();
- for (final Iterator iterator = types.iterator(); iterator.hasNext();) {
- EClassifier type = (EClassifier)iterator.next();
- packages.add(type.getEPackage());
- }
-
- ResourceSet resourceSet = ((DataGraphImpl)dataGraph).getResourceSet();
-
- for (Iterator iterator = packages.iterator(); iterator.hasNext();) {
- EPackage typePackage = (EPackage)iterator.next();
- Resource resource = typePackage.eResource();
- if (resource == null) {
- resource = resourceSet.createResource(URI.createURI(".ecore"));
- resource.setURI(URI.createURI(typePackage.getNsURI()));
- resource.getContents().add(typePackage);
- } else if (resource.getResourceSet() != resourceSet)
- resourceSet.getResources().add(resource);
- }
- }
-
- public HelperContext createHelperContext() {
- return new HelperContextImpl(false, null);
- }
-
- public HelperContext createHelperContext(boolean extensibleNamespaces) {
- return new HelperContextImpl(extensibleNamespaces);
- }
-
- public HelperContext createHelperContext(Map options) {
- return new HelperContextImpl(false, options);
- }
-
- public HelperContext createHelperContext(boolean extensibleNamespaces, Map options) {
- return new HelperContextImpl(extensibleNamespaces, options);
- }
-
-
- public CopyHelper createCrossScopeCopyHelper(HelperContext hc) {
- return new CrossScopeCopyHelperImpl(hc.getTypeHelper());
- }
-
-
- public XMLStreamHelper createXMLStreamHelper(HelperContext hc) {
- return ((HelperContextImpl)hc).getXMLStreamHelper();
- }
-
-
- public List getTypes(HelperContext hc, String uri) {
-
- EPackage ePackage = ((HelperContextImpl)hc).getExtendedMetaData().getPackage(uri);
- if (ePackage != null) {
- return new ArrayList(ePackage.getEClassifiers());
- }
- return null;
- }
-
- public List getOpenContentProperties(DataObject dataObject) {
- List result = new UniqueEList();
- ((ClassImpl)dataObject.getType()).addOpenProperties((EObject)dataObject, result);
- return result;
- }
-
- public boolean isDocumentRoot(Type type) {
- return "".equals(SDOExtendedMetaData.INSTANCE.getName((EClassifier)type));
- }
-
-
- public Type createType(HelperContext hc, String uri, String name, boolean isDataType) {
- ExtendedMetaData extendedMetaData = ((HelperContextImpl)hc).getExtendedMetaData();
- if ("".equals(uri))
- uri = null; // FB
-
- EPackage ePackage = extendedMetaData.getPackage(uri);
- if (ePackage == null) {
- ePackage = EcoreFactory.eINSTANCE.createEPackage();
- ePackage.setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl());
- ePackage.setNsURI(uri);
- String packagePrefix = uri != null ? URI.createURI(uri).trimFileExtension().lastSegment() : ""; // FB
- ePackage.setName(packagePrefix);
- ePackage.setNsPrefix(packagePrefix);
- extendedMetaData.putPackage(uri, ePackage);
- }
-
- EClassifier eClassifier = ePackage.getEClassifier(name);
- if (eClassifier != null) // already defined?
- {
- // throw new IllegalArgumentException();
- return null;
- }
-
- if (name != null) {
- eClassifier =
- isDataType ? (EClassifier)SDOFactory.eINSTANCE.createDataType() : (EClassifier)SDOFactory.eINSTANCE
- .createClass();
- eClassifier.setName(name);
- } else {
- eClassifier = DataObjectUtil.createDocumentRoot();
- }
-
- ePackage.getEClassifiers().add(eClassifier);
-
- return (Type)eClassifier;
- }
-
- public void addBaseType(Type type, Type baseType) {
- ((EClass)type).getESuperTypes().add(baseType);
- }
-
- public void addAliasName(Type type, String aliasName) {
- throw new UnsupportedOperationException(); // TODO: implement this
- // method properly
- // type.getAliasNames().add(aliasName);
- }
-
- public void setOpen(Type type, boolean isOpen) {
- if (isOpen == type.isOpen())
- return;
-
- if (isOpen) {
- EAttribute eAttribute = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
- ((EClass)type).getEStructuralFeatures().add(eAttribute);
-
- eAttribute.setName("any");
- eAttribute.setUnique(false);
- eAttribute.setUpperBound(ETypedElement.UNBOUNDED_MULTIPLICITY);
- eAttribute.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
- ExtendedMetaData.INSTANCE.setFeatureKind(eAttribute, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
- ExtendedMetaData.INSTANCE.setProcessingKind(eAttribute, ExtendedMetaData.LAX_PROCESSING);
- ExtendedMetaData.INSTANCE.setWildcards(eAttribute, Collections.singletonList("##any"));
-
- // FB TBD Add an "anyAttribute" EAttribute as well.
-
- if (ExtendedMetaData.INSTANCE.getMixedFeature((EClass)type) != null) {
- eAttribute.setDerived(true);
- eAttribute.setTransient(true);
- eAttribute.setVolatile(true);
- }
- } else {
- EClass eClass = (EClass)type;
- EAttribute any = (EAttribute)eClass.getEStructuralFeature("any");
- eClass.getEStructuralFeatures().remove(any);
- }
- }
-
- public void setSequenced(Type type, boolean isSequenced) {
- // currently, we require setSequenced to be called first, before
- // anything else is added to the type.
- if (type.isDataType() || !type.getProperties().isEmpty()) {
- if (type.getName() != "DocumentRoot") // document root is a
- // special case
- throw new IllegalArgumentException();
- }
-
- if (isSequenced) {
- EClass eClass = (EClass)type;
- ExtendedMetaData.INSTANCE.setContentKind(eClass, ExtendedMetaData.MIXED_CONTENT);
- EAttribute mixedFeature = (EAttribute)SDOFactory.eINSTANCE.createAttribute();
- mixedFeature.setName("mixed");
- mixedFeature.setUnique(false);
- mixedFeature.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry());
- mixedFeature.setLowerBound(0);
- mixedFeature.setUpperBound(-1);
- // eClass.getEStructuralFeatures().add(mixedFeature);
- ((ClassImpl)eClass).setSequenceFeature(mixedFeature);
- ExtendedMetaData.INSTANCE.setFeatureKind(mixedFeature, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE);
- ExtendedMetaData.INSTANCE.setName(mixedFeature, ":mixed");
- } else {
- // nothing to do, because of current restriction that setSequence
- // must be called first.
- }
- }
-
- public void setAbstract(Type type, boolean isAbstract) {
- ((EClass)type).setAbstract(isAbstract);
- }
-
- public void setJavaClassName(Type type, String javaClassName) {
- ((EClassifier)type).setInstanceClassName(javaClassName);
- }
-
- public Property createProperty(Type containingType, String name, Type propertyType) {
- EStructuralFeature eStructuralFeature =
- propertyType.isDataType() ? (EStructuralFeature)SDOFactory.eINSTANCE.createAttribute()
- : (EStructuralFeature)SDOFactory.eINSTANCE.createReference();
-
- eStructuralFeature.setName(name);
- eStructuralFeature.setEType((EClassifier)propertyType);
- ((EClass)containingType).getEStructuralFeatures().add(eStructuralFeature);
-
- if ("".equals(ExtendedMetaData.INSTANCE.getName((EClass)containingType))) // DocumentRoot
- // containingType?
- {
- ExtendedMetaData.INSTANCE.setNamespace(eStructuralFeature, containingType.getURI());
- //FB???eStructuralFeature.setUnique(false);
- //FB???eStructuralFeature.setUpperBound(ETypedElement.UNSPECIFIED_MULTIPLICITY);
- }
-
- if (ExtendedMetaData.INSTANCE.getMixedFeature((EClass)containingType) != null) {
- eStructuralFeature.setDerived(true);
- eStructuralFeature.setTransient(true);
- eStructuralFeature.setVolatile(true);
- ExtendedMetaData.INSTANCE.setFeatureKind(eStructuralFeature, ExtendedMetaData.ELEMENT_FEATURE);
- } else {
- // By default, a SDO property is an XSD element
- ExtendedMetaData.INSTANCE.setFeatureKind(eStructuralFeature, ExtendedMetaData.ELEMENT_FEATURE);
- }
-
- return (Property)eStructuralFeature;
- }
-
- public void setPropertyXMLKind(Property property, boolean isXmlElement) {
- if (isXmlElement) {
- ExtendedMetaData.INSTANCE.setFeatureKind((EStructuralFeature)property, ExtendedMetaData.ELEMENT_FEATURE);
- }
- else {
- ExtendedMetaData.INSTANCE.setFeatureKind((EStructuralFeature)property, ExtendedMetaData.ATTRIBUTE_FEATURE);
- }
- }
-
-
- public Property createOpenContentProperty(HelperContext hc, String uri, String name, Type type)
- {
- ExtendedMetaData extendedMetaData = ((HelperContextImpl)hc).getExtendedMetaData();
-
- // get/create document root
- EPackage ePackage = extendedMetaData.getPackage(uri);
- Type documentRoot = ePackage != null ? (Type)extendedMetaData.getType(ePackage, "") : null;
- if (documentRoot == null) {
- documentRoot = createType(hc, uri, null, false);
- }
-
- // Determine if property already exists
- Property newProperty = documentRoot.getProperty(name);
- if (newProperty == null) {
- // Create the new property 'under' the document root.....
- newProperty = createProperty(documentRoot, name, type);
- } else {
- // if property already exists, validate the expected type
- if (!newProperty.getType().equals(type))
- throw new IllegalArgumentException();
- }
- return newProperty;
- }
-
-
- public void addAliasName(Property property, String aliasName) {
- throw new UnsupportedOperationException(); // TODO: implement this
- // method properly
- // property.getAliasNames().add(aliasName);
- }
-
- public void setMany(Property property, boolean isMany) {
- ((EStructuralFeature)property).setUpperBound(isMany ? EStructuralFeature.UNBOUNDED_MULTIPLICITY : 1);
- }
-
- public void setContainment(Property property, boolean isContainment) {
- ((EReference)property).setContainment(isContainment);
- }
-
- public void setDefault(Property property, String defaultValue) {
- ((EStructuralFeature)property).setDefaultValueLiteral(defaultValue);
- }
-
- public void setReadOnly(Property property, boolean isReadOnly) {
- ((EStructuralFeature)property).setChangeable(!isReadOnly);
- }
-
- public void setOpposite(Property property, Property opposite) {
- ((EReference)property).setEOpposite((EReference)opposite);
- }
-
- public void addTypeInstanceProperty(Type definedType, Property instanceProperty, Object value) {
- addInstanceProperty((EModelElement)definedType, instanceProperty, value);
- }
-
- public void addPropertyInstanceProperty(Property definedProperty, Property instanceProperty, Object value) {
- addInstanceProperty((EModelElement)definedProperty, instanceProperty, value);
- }
-
- protected void addInstanceProperty(EModelElement metaObject, Property property, Object value) {
- String uri = property.getContainingType().getURI();
- EAnnotation eAnnotation = metaObject.getEAnnotation(uri);
- if (eAnnotation == null) {
- eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- eAnnotation.setSource(uri);
- metaObject.getEAnnotations().add(eAnnotation);
- }
- // TODO if (property.isMany()) ... // convert list of values
- String stringValue = convertToString(property.getType(), value);
- eAnnotation.getDetails().put(property.getName(), stringValue);
- }
-
-
- public void addChangeListener(DataObject dob, EventListener listener) {
- // Adapter l = (Adapter)listener;
- ((Notifier)dob).eAdapters().add(listener);
- }
-
- public void removeChangeListener(DataObject dob, EventListener listener) {
- ((Notifier)dob).eAdapters().remove(listener);
- }
-
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOSimpleDateFormat.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOSimpleDateFormat.java
deleted file mode 100644
index 9d14a264d8..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOSimpleDateFormat.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 org.apache.tuscany.sdo.helper;
-
-import java.text.DateFormatSymbols;
-import java.text.SimpleDateFormat;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * Fixes the bug reported at JIRA TUSCANY-1659
- * This class ensures the time zone will be formatted as the abbreviation format.
- */
-public class SDOSimpleDateFormat extends SimpleDateFormat {
-
- private static final long serialVersionUID = 2519728288048681529L;
-
- public SDOSimpleDateFormat() {
- super();
- setTimeZone(getTimeZone());
-
- }
-
- public SDOSimpleDateFormat(String pattern) {
- super(pattern);
- setTimeZone(getTimeZone());
-
- }
-
- public SDOSimpleDateFormat(String pattern, Locale locale) {
- super(pattern, locale);
- setTimeZone(getTimeZone());
-
- }
-
- public SDOSimpleDateFormat(String pattern, DateFormatSymbols formatSymbols) {
- super(pattern, formatSymbols);
- setTimeZone(getTimeZone());
-
- }
-
- /**
- * Overrides the SimpleDateFormat.setTimeZone(TimeZone) method.
- * It checks if the TimeZone to be set is in the abbreviation format.
- * If not, it looks for its abbreviation format and set it.
- *
- * @param timeZone the time zone to be set
- *
- */
- public void setTimeZone(TimeZone timeZone) {
-
- if (timeZone.getID().length() != 3) {
- String[] timeZoneNames = TimeZone.getAvailableIDs(timeZone.getRawOffset());
-
- for (int i = 0 ; i < timeZoneNames.length ; i++ ) {
- String actualTimeZoneName = timeZoneNames[i].trim();
-
- // if the time zone name has 3 letters and ends with a T character,
- // it's considered to be the abbreviation format
- if (actualTimeZoneName.length() == 3 && actualTimeZoneName.charAt(actualTimeZoneName.length() - 1) == 'T') {
- timeZone = TimeZone.getTimeZone(timeZoneNames[i]);
- break;
-
- }
-
- }
-
- }
-
- super.setTimeZone(timeZone);
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java
deleted file mode 100644
index 7a3a409479..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java
+++ /dev/null
@@ -1,789 +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.helper;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.xml.XMLConstants;
-
-import org.apache.tuscany.sdo.SDOExtendedMetaData;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.impl.AttributeImpl;
-import org.apache.tuscany.sdo.impl.SDOFactoryImpl.SDOEcoreFactory;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer;
-import org.eclipse.xsd.XSDComplexTypeDefinition;
-import org.eclipse.xsd.XSDComponent;
-import org.eclipse.xsd.XSDConcreteComponent;
-import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDFeature;
-import org.eclipse.xsd.XSDNamedComponent;
-import org.eclipse.xsd.XSDParticle;
-import org.eclipse.xsd.XSDSchema;
-import org.eclipse.xsd.XSDSimpleTypeDefinition;
-import org.eclipse.xsd.XSDTerm;
-import org.eclipse.xsd.XSDTypeDefinition;
-import org.eclipse.xsd.ecore.EcoreSchemaBuilder;
-import org.eclipse.xsd.util.XSDResourceFactoryImpl;
-import org.eclipse.xsd.util.XSDResourceImpl;
-import org.eclipse.xsd.util.XSDSchemaLocator;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class SDOXSDEcoreBuilder extends BaseSDOXSDEcoreBuilder
-{
- protected boolean replaceConflictingTypes = false;
-
- public SDOXSDEcoreBuilder(ExtendedMetaData extendedMetaData, boolean replaceConflictingTypes)
- {
- super(extendedMetaData);
- ecoreFactory = new SDOEcoreFactory();
- this.replaceConflictingTypes = replaceConflictingTypes;
- populateTypeToTypeObjectMap((EPackage)ModelFactory.INSTANCE);
- }
-
- /**
- * Overrides method in EMF. This will cause the SDO Properties to be in the
- * order in which the Attributes appeared in the XSD.
- */
- protected boolean useSortedAttributes()
- {
- return false;
- }
-
- /*
- * Required for Java 1.4.2 support
- * Node#lookupPrefix is only available since DOM Level 3 (Java 5)
- * and it doesn't return rebound prefix.
- * XSDConstants.lookupQualifier isn't supposed to return rebound prefix either.
- * This lookupPrefix returns any bound prefix no matter rebound to other NameSpace or not, for {@link #getEPackage}.
- */
- static protected String lookupPrefix(Node element, String namespaceURI) {
- String prefix = element.getPrefix();
- if (prefix != null && namespaceURI != null && namespaceURI.equals(element.getNamespaceURI()))
- return prefix;
- NamedNodeMap attributes = element.getAttributes();
- if (attributes != null)
- for (int index = attributes.getLength(); index != 0;) {
- Node attribute = attributes.item(--index);
- if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(attribute.getNamespaceURI()) && attribute.getNodeValue().equals(namespaceURI)
- && XMLConstants.XMLNS_ATTRIBUTE.equals(attribute.getPrefix()))
- return attribute.getLocalName();
- }
- for (Node parent; (parent = element.getParentNode()) != null; element = parent)
- if (parent.getNodeType() == Node.ELEMENT_NODE)
- return lookupPrefix(parent, namespaceURI);
- return null;
- }
-
- public EPackage getEPackage(XSDNamedComponent xsdNamedComponent) {
- XSDSchema containingXSDSchema = xsdNamedComponent.getSchema();
- String targetNamespace = containingXSDSchema == null ?
- xsdNamedComponent.getTargetNamespace() : containingXSDSchema.getTargetNamespace();
- EPackage ePackage = (EPackage) targetNamespaceToEPackageMap.get(targetNamespace);
- if (ePackage != null)
- return ePackage;
- ePackage = super.getEPackage(xsdNamedComponent);
- String nsPrefix = lookupPrefix(xsdNamedComponent.getElement(), targetNamespace);
- if (nsPrefix != null)
- ePackage.setNsPrefix(nsPrefix);
- return ePackage;
- }
-
- public EClassifier getEClassifier(XSDTypeDefinition xsdTypeDefinition) {
- EClassifier eClassifier = null;
- if (xsdTypeDefinition != null)
- {
- if (rootSchema.getSchemaForSchemaNamespace().equals(xsdTypeDefinition.getTargetNamespace())) {
- eClassifier =
- getBuiltInEClassifier(xsdTypeDefinition.getURI(), xsdTypeDefinition.getName());
- }
- else if (xsdTypeDefinition.getContainer() == null) {
- EPackage pkg = extendedMetaData.getPackage(xsdTypeDefinition.getTargetNamespace());
- if(pkg != null) {
- eClassifier = pkg.getEClassifier(xsdTypeDefinition.getName());
- }
- }
- }
- if (eClassifier == null) {
- eClassifier = super.getEClassifier(xsdTypeDefinition);
- }
- return eClassifier;
- }
-
- public EDataType getEDataType(XSDSimpleTypeDefinition xsdSimpleTypeDefinition) {
- EDataType eClassifier = null;
- if (xsdSimpleTypeDefinition != null && rootSchema.getSchemaForSchemaNamespace().equals(xsdSimpleTypeDefinition.getTargetNamespace())) {
- eClassifier =
- (EDataType)getBuiltInEClassifier(
- xsdSimpleTypeDefinition.getURI(),
- xsdSimpleTypeDefinition.getName());
- } else {
- eClassifier = super.getEDataType(xsdSimpleTypeDefinition);
- }
- return (EDataType)eClassifier;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.xsd.ecore.XSDEcoreBuilder#createResourceSet()
- */
- protected ResourceSet createResourceSet() {
- ResourceSet result = super.createResourceSet();
- result.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new XSDResourceFactoryImpl());
- result.getAdapterFactories().add(new XSDSchemaAdapterFactoryImpl());
- result.setPackageRegistry(new EPackageRegistryImpl(HelperContextImpl.getBuiltInModelRegistry()));
-
- return result;
- }
-
- protected EClassifier getBuiltInEClassifier(String namespace, String name)
- {
- EClassifier eClassifier = null;
- if ("base64Binary".equals(name)) {
- eClassifier = (EClassifier)AttributeImpl.INTERNAL_BASE64_BYTES;
- }
- else if ("QName".equals(name)) {
- eClassifier = (EClassifier)AttributeImpl.INTERNAL_QNAME;
- }
- else {
- eClassifier = (EClassifier)SDOUtil.getXSDSDOType(name);
- }
-
- if (eClassifier == null)
- eClassifier = super.getBuiltInEClassifier(namespace, name);
- return eClassifier;
- }
-
- private void updateReferences(EObject oldEObject, EObject newEObject)
- {
- Collection usages = UsageCrossReferencer.find(oldEObject, targetNamespaceToEPackageMap.values());
- for (Iterator iter = usages.iterator(); iter.hasNext(); )
- {
- EStructuralFeature.Setting setting = (EStructuralFeature.Setting)iter.next();
- EObject referencingEObject = setting.getEObject();
- EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
- if (eStructuralFeature.isChangeable())
- {
- if (eStructuralFeature.isMany())
- {
- List refList = (List)referencingEObject.eGet(eStructuralFeature);
- int refIndex = refList.indexOf(oldEObject);
- if (refIndex != -1) refList.set(refIndex, newEObject);
- }
- else
- {
- referencingEObject.eSet(eStructuralFeature, newEObject);
- }
- }
- }
- }
-
- private XSDTypeDefinition getXSDTypeDefinition(EClassifier eClassifier)
- {
- //TODO Maybe we should create a reverse (eModelElementToXSDComponentMap) for better performance.
- // Use a HashMap subclass for xsdComponentToEModelElementMap that overrides put() to also add the
- // reverse mapping in eModelElementToXSDComponentMap
- XSDTypeDefinition xsdTypeDefinition = null;
- for (Iterator i = xsdComponentToEModelElementMap.entrySet().iterator(); i.hasNext(); )
- {
- Entry e = (Entry) i.next();
- if (eClassifier == e.getValue())
- {
- xsdTypeDefinition = (XSDTypeDefinition)e.getKey();
- break;
- }
- }
- return xsdTypeDefinition;
- }
-
- private boolean sameType(XSDTypeDefinition t1, XSDTypeDefinition t2)
- {
- XSDConcreteComponent n1 = t1, n2 = t2;
- while (n1 != null && n2 != null)
- {
- if (n1.eClass() != n2.eClass()) break;
- if (n1 instanceof XSDNamedComponent /*&& n2 instanceof XSDNamedComponent*/)
- {
- String s1 = ((XSDNamedComponent)n1).getName();
- String s2 = ((XSDNamedComponent)n2).getName();
- if (s1 == null ? s1 != s2 : !s1.equals(s2)) break;
- }
- n1 = n1.getContainer();
- n2 = n2.getContainer();
- }
- return n1 == null && n2 == null;
- }
-
- protected void removeDuplicateEClassifier(EClassifier eClassifier, XSDTypeDefinition xsdTypeDefinition)
- {
- EPackage ePackage = eClassifier.getEPackage();
- List eClassifiers = ePackage.getEClassifiers();
- String name = eClassifier.getName();
- int size = eClassifiers.size();
- for (int index = eClassifiers.indexOf(eClassifier); ++index < size; )
- {
- EClassifier nextEClassifier = (EClassifier)eClassifiers.get(index);
- if (!name.equals(nextEClassifier.getName())) break;
- if (extendedMetaData.getName(eClassifier).equals(extendedMetaData.getName(nextEClassifier)))
- {
- XSDTypeDefinition nextXSDTypeDefinition = getXSDTypeDefinition(nextEClassifier);
- if (!sameType(nextXSDTypeDefinition, xsdTypeDefinition))
- {
- //System.out.println("###EClassifier mismatch: ");
- //System.out.println(" old: " + extendedMetaData.getName(nextEClassifier));
- //System.out.println(" new: " + extendedMetaData.getName(eClassifier));
- continue;
- }
- eClassifiers.remove(index);
- updateReferences(nextEClassifier, eClassifier);
- break;
- }
- }
- }
-
- protected void removeDuplicateDocumentRootFeature(EClass eClass, EStructuralFeature eStructuralFeature)
- {
- List eStructuralFeatures = eClass.getEStructuralFeatures();
- int last = eStructuralFeatures.size() - 1;
- String name = extendedMetaData.getName(eStructuralFeature);
- for (int index = 0; index < last; index++)
- {
- EStructuralFeature otherEStructuralFeature = (EStructuralFeature)eStructuralFeatures.get(index);
- if (name.equals(extendedMetaData.getName(otherEStructuralFeature)))
- {
- if (otherEStructuralFeature.eClass() != eStructuralFeature.eClass())
- {
- //System.out.println("###EStructuralFeature mismatch: ");
- //System.out.println(" old: " + extendedMetaData.getName(otherEStructuralFeature));
- //System.out.println(" new: " + extendedMetaData.getName(eStructuralFeature));
- continue;
- }
- eStructuralFeatures.remove(index);
- updateReferences(otherEStructuralFeature, eStructuralFeature);
- break;
- }
- }
- }
-
- public EClass computeEClass(XSDComplexTypeDefinition xsdComplexTypeDefinition) {
- if (xsdComplexTypeDefinition == null) return super.computeEClass(xsdComplexTypeDefinition);
- EPackage ePackage = (EPackage)targetNamespaceToEPackageMap.get(xsdComplexTypeDefinition.getTargetNamespace());
- if (ePackage != null && TypeHelperImpl.getBuiltInModels().contains(ePackage)) {
- EClassifier eclassifier = ePackage.getEClassifier(xsdComplexTypeDefinition.getName());
- if (eclassifier != null) return (EClass)eclassifier;
- }
- EClass eClass = super.computeEClass(xsdComplexTypeDefinition);
- if (replaceConflictingTypes) removeDuplicateEClassifier(eClass, xsdComplexTypeDefinition);
- String aliasNames = getEcoreAttribute(xsdComplexTypeDefinition.getElement(), "aliasName");
- if (aliasNames != null) {
- SDOExtendedMetaData.INSTANCE.setAliasNames(eClass, aliasNames);
- }
- return eClass;
- }
-
- protected EClassifier computeEClassifier(XSDTypeDefinition xsdTypeDefinition) {
- if (xsdTypeDefinition == null) return super.computeEClassifier(xsdTypeDefinition);
- EPackage ePackage = (EPackage)targetNamespaceToEPackageMap.get(xsdTypeDefinition.getTargetNamespace());
- if (ePackage != null && TypeHelperImpl.getBuiltInModels().contains(ePackage)) {
- EClassifier eclassifier = ePackage.getEClassifier(xsdTypeDefinition.getName());
- if (eclassifier != null) return eclassifier;
- }
- EClassifier eclassifier = super.computeEClassifier(xsdTypeDefinition);
- EClassifier etype = (EClassifier) typeToTypeObjectMap.get(eclassifier);
- String aliasNames = getEcoreAttribute(xsdTypeDefinition.getElement(), "aliasName");
- if (aliasNames != null) {
- SDOExtendedMetaData.INSTANCE.setAliasNames(eclassifier, aliasNames);
- if (etype != null) {
- SDOExtendedMetaData.INSTANCE.setAliasNames(etype, aliasNames);
- }
- }
- return eclassifier;
- }
-
- protected EDataType computeEDataType(XSDSimpleTypeDefinition xsdSimpleTypeDefinition) {
- if (xsdSimpleTypeDefinition == null) return super.computeEDataType(xsdSimpleTypeDefinition);
- EPackage ePackage = (EPackage)targetNamespaceToEPackageMap.get(xsdSimpleTypeDefinition.getTargetNamespace());
- if (ePackage != null && TypeHelperImpl.getBuiltInModels().contains(ePackage)) {
- EClassifier eclassifier = ePackage.getEClassifier(xsdSimpleTypeDefinition.getName());
- if (eclassifier != null) return (EDataType)eclassifier;
- }
- EDataType eDataType = super.computeEDataType(xsdSimpleTypeDefinition);
- if (replaceConflictingTypes) removeDuplicateEClassifier(eDataType, xsdSimpleTypeDefinition);
- String aliasNames = getEcoreAttribute(xsdSimpleTypeDefinition.getElement(), "aliasName");
- if (aliasNames != null) {
- SDOExtendedMetaData.INSTANCE.setAliasNames(eDataType, aliasNames);
- }
- return eDataType;
- }
-
- protected EEnum computeEEnum(XSDSimpleTypeDefinition xsdSimpleTypeDefinition) {
- return null;
- }
-
- protected EStructuralFeature createFeature(EClass eClass, String name, EClassifier type, XSDComponent xsdComponent, int minOccurs, int maxOccurs) {
- EStructuralFeature feature = super.createFeature(eClass, name, type, xsdComponent, minOccurs, maxOccurs);
-
- if (xsdComponent instanceof XSDParticle) {
- XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
- if (xsdTerm instanceof XSDElementDeclaration && ((XSDElementDeclaration)xsdTerm).isNillable())
- EcoreUtil.setAnnotation(feature, ExtendedMetaData.ANNOTATION_URI, "nillable", "true");
- }
-
- //FB What is the following for?
- if (feature instanceof EReference)
- {
- EReference eReference = (EReference)feature;
- if (xsdComponent != null && xsdComponent instanceof XSDParticle)
- {
- XSDTerm xsdTerm = ((XSDParticle)xsdComponent).getTerm();
- if (xsdTerm instanceof XSDElementDeclaration)
- {
- XSDTypeDefinition elementTypeDefinition = getEffectiveTypeDefinition(xsdComponent, (XSDElementDeclaration)xsdTerm);
- EClassifier eClassifier = getEClassifier(elementTypeDefinition);
- if (elementTypeDefinition instanceof XSDSimpleTypeDefinition && eClassifier instanceof EClass)
- {
- eReference.setContainment(true);
- }
- }
- }
- }
-
- feature.setName(name); // this is needed because super.createFeature() does EMF name mangling (toLower)
-
- if (replaceConflictingTypes && "".equals(extendedMetaData.getName(eClass)))
- removeDuplicateDocumentRootFeature(eClass, feature);
-
- if (xsdComponent != null)
- {
- String aliasNames = getEcoreAttribute(xsdComponent.getElement(), "aliasName");
- if (aliasNames != null)
- {
- SDOExtendedMetaData.INSTANCE.setAliasNames(feature, aliasNames);
- }
- }
- return feature;
- }
-
- protected String getInstanceClassName(XSDTypeDefinition typeDefinition, EDataType baseEDataType) {
- String name = getEcoreAttribute(typeDefinition, "extendedInstanceClass");
- return (name != null) ? name : super.getInstanceClassName(typeDefinition, baseEDataType);
- }
-
- protected String getEcoreAttribute(Element element, String attribute)
- {
- String sdoAttribute = null;
-
- if ("name".equals(attribute))
- sdoAttribute = "name";
- else if ("opposite".equals(attribute))
- sdoAttribute = "oppositeProperty";
- else if ("mixed".equals(attribute))
- sdoAttribute = "sequence";
- else if ("string".equals(attribute))
- sdoAttribute = "string";
- else if ("changeable".equals(attribute))
- sdoAttribute = "readOnly";
- else if ("aliasName".equals(attribute))
- sdoAttribute = "aliasName";
-
- if (sdoAttribute != null)
- {
- String value =
- element != null && element.hasAttributeNS("commonj.sdo/xml", sdoAttribute) ?
- element.getAttributeNS("commonj.sdo/xml", sdoAttribute) :
- null;
- if ("changeable".equals(attribute)) {
- if ("true".equals(value)) value = "false";
- else if ("false".equals(value)) value = "true";
- }
- return value;
- }
-
- if ("package".equals(attribute))
- sdoAttribute = "package";
- else if ("instanceClass".equals(attribute))
- sdoAttribute = "instanceClass";
- else if ("extendedInstanceClass".equals(attribute))
- sdoAttribute = "extendedInstanceClass";
- else if ("nestedInterfaces".equals(attribute))
- sdoAttribute = "nestedInterfaces";
-
- if (sdoAttribute != null)
- {
- return
- element != null && element.hasAttributeNS("commonj.sdo/java", sdoAttribute) ?
- element.getAttributeNS("commonj.sdo/java", sdoAttribute) :
- null;
- }
-
- return super.getEcoreAttribute(element, attribute);
- }
-
- /*
- protected String getEcoreAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
- {
- String value = super.getEcoreAttribute(xsdConcreteComponent, attribute);
- if ("package".equals(attribute) && value == null)
- {
- XSDSchema xsdSchema = (XSDSchema)xsdConcreteComponent;
- value = getDefaultPackageName(xsdSchema.getTargetNamespace());
- }
- return value;
- }
- */
-
- protected XSDTypeDefinition getEcoreTypeQNameAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
- {
- if (xsdConcreteComponent == null) return null;
- String sdoAttribute = null;
-
- if ("reference".equals(attribute)) sdoAttribute = "propertyType";
- if ("dataType".equals(attribute)) sdoAttribute = "dataType";
-
- if (sdoAttribute != null)
- {
- Element element = xsdConcreteComponent.getElement();
- return element == null ? null : getEcoreTypeQNameAttribute(xsdConcreteComponent, element, "commonj.sdo/xml", sdoAttribute);
- }
-
- return super.getEcoreTypeQNameAttribute(xsdConcreteComponent, attribute);
- }
-
- /**
- * Override default EMF behavior so that the name is not mangled.
- */
- protected String validName(String name, int casing, String prefix) {
- return name;
- }
-
- /**
- * Override default EMF name mangling for anonymous types (simple and complex)
- */
- protected String validAliasName(XSDTypeDefinition xsdTypeDefinition, boolean isUpperCase) {
- return getAliasName(xsdTypeDefinition);
- }
-
- protected String getAliasName(XSDNamedComponent xsdNamedComponent) {
- String result = xsdNamedComponent.getName();
- if (result == null)
- {
- XSDConcreteComponent container = xsdNamedComponent.getContainer();
- if (container instanceof XSDNamedComponent)
- {
- result = getAliasName((XSDNamedComponent)container);
- if (container instanceof XSDTypeDefinition)
- {
- result = "_" + result;
- }
- }
-
- }
- return result;
- }
-
- protected XSDTypeDefinition getEffectiveTypeDefinition(XSDComponent xsdComponent, XSDFeature xsdFeature)
- {
- if (xsdFeature == null)
- {
- return super.getEffectiveTypeDefinition(xsdComponent, xsdFeature);
- }
- XSDTypeDefinition typeDef = getEcoreTypeQNameAttribute(xsdComponent, "dataType");
-
- String isString = getEcoreAttribute(xsdComponent, xsdFeature, "string");
- if ("true".equalsIgnoreCase(isString)) {
- typeDef =
- xsdFeature.resolveSimpleTypeDefinition(rootSchema.getSchemaForSchemaNamespace(), "string");
- }
- if (typeDef == null)
- typeDef = xsdFeature.getType();
- return typeDef;
- }
-
- /**
- * Override EMF algorithm.
- */
- public String qualifiedPackageName(String namespace)
- {
- return getDefaultPackageName(namespace);
- }
-
- //Code below here to provide common URI to java packagname
-
- public static String uncapNameStatic(String name)
- {
- if (name.length() == 0)
- {
- return name;
- }
- else
- {
- String lowerName = name.toLowerCase();
- int i;
- for (i = 0; i < name.length(); i++)
- {
- if (name.charAt(i) == lowerName.charAt(i))
- {
- break;
- }
- }
- if (i > 1 && i < name.length() && !Character.isDigit(name.charAt(i)))
- {
- --i;
- }
- return name.substring(0, i).toLowerCase() + name.substring(i);
- }
- }
-
- protected static String validNameStatic(String name, int casing, String prefix)
- {
- List parsedName = parseNameStatic(name, '_');
- StringBuffer result = new StringBuffer();
- for (Iterator i = parsedName.iterator(); i.hasNext(); )
- {
- String nameComponent = (String)i.next();
- if (nameComponent.length() > 0)
- {
- if (result.length() > 0 || casing == UPPER_CASE)
- {
- result.append(Character.toUpperCase(nameComponent.charAt(0)));
- result.append(nameComponent.substring(1));
- }
- else
- {
- result.append(nameComponent);
- }
- }
- }
-
- return
- result.length() == 0 ?
- prefix :
- Character.isJavaIdentifierStart(result.charAt(0)) ?
- casing == LOWER_CASE ?
- uncapNameStatic(result.toString()) :
- result.toString() :
- prefix + result;
- }
-
- protected static List parseNameStatic(String sourceName, char separator)
- {
- List result = new ArrayList();
- if (sourceName != null)
- {
- StringBuffer currentWord = new StringBuffer();
- boolean lastIsLower = false;
- for (int index = 0, length = sourceName.length(); index < length; ++index)
- {
- char curChar = sourceName.charAt(index);
- if (!Character.isJavaIdentifierPart(curChar))
- {
- curChar = separator;
- }
- if (Character.isUpperCase(curChar) || (!lastIsLower && Character.isDigit(curChar)) || curChar == separator)
- {
- if (lastIsLower && currentWord.length() > 1 || curChar == separator && currentWord.length() > 0)
- {
- result.add(currentWord.toString());
- currentWord = new StringBuffer();
- }
- lastIsLower = false;
- }
- else
- {
- if (!lastIsLower)
- {
- int currentWordLength = currentWord.length();
- if (currentWordLength > 1)
- {
- char lastChar = currentWord.charAt(--currentWordLength);
- currentWord.setLength(currentWordLength);
- result.add(currentWord.toString());
- currentWord = new StringBuffer();
- currentWord.append(lastChar);
- }
- }
- lastIsLower = true;
- }
-
- if (curChar != separator)
- {
- currentWord.append(curChar);
- }
- }
-
- result.add(currentWord.toString());
- }
- return result;
- }
-
- public static String getDefaultPackageName(String targetNamespace)
- {
- if (targetNamespace == null)
- return null;
-
- URI uri = URI.createURI(targetNamespace);
- List parsedName;
- if (uri.isHierarchical())
- {
- String host = uri.host();
- if (host != null && host.startsWith("www."))
- {
- host = host.substring(4);
- }
- parsedName = parseNameStatic(host, '.');
- Collections.reverse(parsedName);
- if (!parsedName.isEmpty())
- {
- parsedName.set(0, ((String)parsedName.get(0)).toLowerCase());
- }
-
- parsedName.addAll(parseNameStatic(uri.trimFileExtension().path(), '/'));
- }
- else
- {
- String opaquePart = uri.opaquePart();
- int index = opaquePart.indexOf(":");
- if (index != -1 && "urn".equalsIgnoreCase(uri.scheme()))
- {
- parsedName = parseNameStatic(opaquePart.substring(0, index), '-');
- if (parsedName.size() > 0 && DOMAINS.contains(parsedName.get(parsedName.size() - 1)))
- {
- Collections.reverse(parsedName);
- parsedName.set(0, ((String)parsedName.get(0)).toLowerCase());
- }
- parsedName.addAll(parseNameStatic(opaquePart.substring(index + 1), '/'));
- }
- else
- {
- parsedName = parseNameStatic(opaquePart, '/');
- }
- }
-
- StringBuffer qualifiedPackageName = new StringBuffer();
- for (Iterator i = parsedName.iterator(); i.hasNext(); )
- {
- String packageName = (String)i.next();
- if (packageName.length() > 0)
- {
- if (qualifiedPackageName.length() > 0)
- {
- qualifiedPackageName.append('.');
- }
- qualifiedPackageName.append(validNameStatic(packageName, LOWER_CASE,"_"));
- }
- }
-
- return qualifiedPackageName.toString().toLowerCase(); //make sure it's lower case .. we can't work with Axis if not.
- }
-
- private XSDSchema loadEPackage(EPackage ePackage)
- {
- XSDSchema ePackageXSDSchema = null;
- XSDEcoreSchemaBuilder schemaBuilder = new XSDEcoreSchemaBuilder(extendedMetaData);
- ePackageXSDSchema = schemaBuilder.getSchema(ePackage);
- xsdComponentToEModelElementMap.putAll(schemaBuilder.getXSDComponentToEModelElementMap());
- targetNamespaceToEPackageMap.put(ePackage.getNsURI(), ePackage);
- populateTypeToTypeObjectMap(ePackage);
- xsdSchemas.add(ePackageXSDSchema);
- return ePackageXSDSchema;
- }
-
- private static class XSDEcoreSchemaBuilder extends EcoreSchemaBuilder
- {
- public XSDEcoreSchemaBuilder(ExtendedMetaData extendedMetaData)
- {
- super(extendedMetaData);
- }
-
- public Map getXSDComponentToEModelElementMap()
- {
- return xsdComponentToEModelElementMap;
- }
- }
-
- class XSDSchemaAdapterFactoryImpl extends AdapterFactoryImpl
- {
- protected SchemaLocator schemaLocator = new SchemaLocator();
-
- public boolean isFactoryForType(Object type)
- {
- return type == XSDSchemaLocator.class;
- }
-
- public Adapter adaptNew(Notifier target, Object type)
- {
- return schemaLocator;
- }
-
- class SchemaLocator extends XSDResourceImpl.SchemaLocator
- {
- public XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI,
- String rawSchemaLocationURI, String resolvedSchemaLocation)
- {
- if (targetNamespaceToEPackageMap.containsKey(namespaceURI))
- {
- for (Iterator iter = xsdSchemas.iterator(); iter.hasNext();) {
- XSDSchema schema = (XSDSchema)iter.next();
- String targetNamespace = schema.getTargetNamespace();
- if (targetNamespace != null && targetNamespace.equals(namespaceURI))
- {
- return schema;
- }
- }
- }
- if (namespaceURI != null && !namespaceURI.equals(xsdSchema.getTargetNamespace()))
- {
- EPackage ePackage = extendedMetaData.getPackage(namespaceURI);
- if (ePackage != null)
- {
- XSDSchema schema = loadEPackage(ePackage);
- return schema;
- }
- }
- return super.locateSchema(xsdSchema, namespaceURI, rawSchemaLocationURI, resolvedSchemaLocation);
- }
- }
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SchemaBuilder.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SchemaBuilder.java
deleted file mode 100644
index 8ff7769041..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SchemaBuilder.java
+++ /dev/null
@@ -1,786 +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.helper;
-
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-import org.eclipse.xsd.XSDAttributeDeclaration;
-import org.eclipse.xsd.XSDAttributeUse;
-import org.eclipse.xsd.XSDComplexTypeDefinition;
-import org.eclipse.xsd.XSDCompositor;
-import org.eclipse.xsd.XSDConstraint;
-import org.eclipse.xsd.XSDDerivationMethod;
-import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDFactory;
-import org.eclipse.xsd.XSDForm;
-import org.eclipse.xsd.XSDImport;
-import org.eclipse.xsd.XSDInclude;
-import org.eclipse.xsd.XSDModelGroup;
-import org.eclipse.xsd.XSDParticle;
-import org.eclipse.xsd.XSDProcessContents;
-import org.eclipse.xsd.XSDSchema;
-import org.eclipse.xsd.XSDSchemaContent;
-import org.eclipse.xsd.XSDSimpleTypeDefinition;
-import org.eclipse.xsd.XSDTypeDefinition;
-import org.eclipse.xsd.XSDWildcard;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.XSDHelper;
-
-public class SchemaBuilder extends SDOAnnotations
-{
- public static final String DEFAULT_SCHEMA_LOCATION = "";
- public static final String NAME_SPACE_PREFIX = "stn_";
- private static int prefixCount = 1;
-
- //public static final String MIXED = "mixed";
- //public static final String GROUP = "group";
- public static final String EFEATURE_MAP_ENTRY = "EFeatureMapEntry";
-
- private Map schemaMap = null;
- protected Map targetNamespacePrefixMap = new Hashtable();
- protected Map schemaLocationMap = null;
- protected TypeTable typeTable = null;
- protected XSDFactory xsdFactory = XSDFactory.eINSTANCE;
-
-
- protected SchemaBuilder(Map schemaMap,
- Map nsPrefixMap,
- TypeTable typeTable,
- Map schemaLocMap )
- {
- this.schemaMap = schemaMap;
- this.targetNamespacePrefixMap = nsPrefixMap;
- this.typeTable = typeTable;
- this.schemaLocationMap = schemaLocMap;
- }
-
-
-
-
- private QName addAttribute2ComplexType(String targetNamespace,
- XSDComplexTypeDefinition complexType,
- Property aProperty)
- {
- QName attributeSchemaType = null;
- String prefix = null;
-
- try
- {
- attributeSchemaType = buildSchema(aProperty.getType());
- }
- catch ( IllegalArgumentException e )
- {
- //schema cannot be generated for this type as there exists an xsd already
- //so include that original XSD
- attributeSchemaType = new QName(aProperty.getType().getURI(),
- aProperty.getType().getName(),
- generatePrefix());
- if ( aProperty.getType().isDataType() )
- {
- typeTable.addSimpleSchemaType(aProperty.getType().getName(), attributeSchemaType);
-
- XSDSimpleTypeDefinition simpleType = xsdFactory.createXSDSimpleTypeDefinition();
- simpleType.setName(aProperty.getType().getName());
- simpleType.setTargetNamespace(aProperty.getType().getURI());
- typeTable.addXSDTypeDef(attributeSchemaType.getNamespaceURI(),
- attributeSchemaType.getLocalPart(),
- simpleType);
- }
- else
- {
- typeTable.addComplexSchemaType(aProperty.getType().getURI(),
- aProperty.getType().getName(),
- attributeSchemaType);
-
- XSDComplexTypeDefinition extComplexType = xsdFactory.createXSDComplexTypeDefinition();
- extComplexType.setName(aProperty.getType().getName());
- extComplexType.setTargetNamespace(aProperty.getType().getURI());
- typeTable.addXSDTypeDef(attributeSchemaType.getNamespaceURI(),
- attributeSchemaType.getLocalPart(),
- extComplexType);
- }
- includeExtXSD(aProperty.getType());
- }
- //ensure than an import is done rightaway so that the right prefixes will be used by the
- //attribute whose type is set as 'this type'. Otherwise when setting the type for the attribute
- //there will be a duplicate prefix (like Q1 or Q2... ) that will be created
- prefix = addImports((XSDSchema)schemaMap.get(targetNamespace), attributeSchemaType);
-
- XSDAttributeDeclaration attribute = xsdFactory.createXSDAttributeDeclaration();
- attribute.setName(aProperty.getName());
- XSDAttributeUse orderDateAttributeUse = xsdFactory.createXSDAttributeUse();
- orderDateAttributeUse.setContent(attribute);
- complexType.getAttributeContents().add(orderDateAttributeUse);
- attribute.updateElement();
-
- if ( aProperty.getType().isDataType() )
- {
- attribute.setTypeDefinition((XSDSimpleTypeDefinition)typeTable.getXSDTypeDef(attributeSchemaType.getNamespaceURI(),
- attributeSchemaType.getLocalPart()));
-
- }
- else
- {
- attribute.setTypeDefinition((XSDSimpleTypeDefinition)typeTable.getXSDTypeDef(
- typeTable.getSimpleSchemaTypeName("URI").getNamespaceURI(),
- typeTable.getSimpleSchemaTypeName("URI").getLocalPart()));
-
- }
-
- if ( aProperty.getDefault() != null )
- {
- attribute.setConstraint(XSDConstraint.DEFAULT_LITERAL);
- attribute.setLexicalValue(aProperty.getDefault().toString());
- }
-
- addAnnotations(attribute, aProperty );
- if ( !aProperty.getType().isDataType() )
- {
- String value = prefix + COLON + attributeSchemaType.getLocalPart();
- attribute.getElement().setAttribute(PROPERTY_TYPE, value);
- }
-
- return attributeSchemaType;
- }
-
- private QName addElement2ComplexType(String targetNamespace,
- XSDComplexTypeDefinition complexType,
- Property aProperty)
- {
- String prefix = null;
- QName elementSchemaType = null;
- try
- {
- elementSchemaType = buildSchema(aProperty.getType());
- }
- catch ( IllegalArgumentException e )
- {
- //schema cannot be generated for this type as there exists an xsd already
- //so include that original XSD
- elementSchemaType = new QName(aProperty.getType().getURI(),
- aProperty.getType().getName(),
- generatePrefix());
- if ( aProperty.getType().isDataType() )
- {
- typeTable.addSimpleSchemaType(aProperty.getType().getName(), elementSchemaType);
-
- XSDSimpleTypeDefinition simpleType = xsdFactory.createXSDSimpleTypeDefinition();
- simpleType.setName(aProperty.getType().getName());
- simpleType.setTargetNamespace(aProperty.getType().getURI());
- typeTable.addXSDTypeDef(elementSchemaType.getNamespaceURI(),
- elementSchemaType.getLocalPart(),
- simpleType);
- }
- else
- {
- typeTable.addComplexSchemaType(aProperty.getType().getURI(),
- aProperty.getType().getName(),
- elementSchemaType);
- XSDComplexTypeDefinition extComplexType = xsdFactory.createXSDComplexTypeDefinition();
- extComplexType.setName(aProperty.getType().getName());
- extComplexType.setTargetNamespace(aProperty.getType().getURI());
- typeTable.addXSDTypeDef(elementSchemaType.getNamespaceURI(),
- elementSchemaType.getLocalPart(),
- extComplexType);
- }
- includeExtXSD(aProperty.getType());
- }
-
- //ensure than an import is done rightaway so that the right prefixes will be used by the
- //element whose type is set as 'this type'. Otherwise when setting the type for the element
- //there will be a duplicate prefix (like Q1 or Q2... ) that will be created
- prefix = addImports((XSDSchema)schemaMap.get(targetNamespace), elementSchemaType);
-
- //XmlSchemaElement element = new XmlSchemaElement();
- XSDElementDeclaration element = xsdFactory.createXSDElementDeclaration();
- element.setName(aProperty.getName());
-
- XSDParticle aParticle = xsdFactory.createXSDParticle();
- aParticle.setContent(element);
-
- ((XSDModelGroup)((XSDParticle)complexType.getContent()).getContent()).
- getContents().add(aParticle);
-
- element.updateElement();
-
- if ( aProperty.isMany() )
- {
- aParticle.setMaxOccurs(-1);
- aParticle.setMinOccurs(0);
-
- }
-
- if ( aProperty.isContainment() )
- {
- element.setTypeDefinition(typeTable.getXSDTypeDef(elementSchemaType.getNamespaceURI(),
- elementSchemaType.getLocalPart()));
- }
- else
- {
- if ( !aProperty.getType().isDataType() )
- {
- QName qName = typeTable.getSimpleSchemaTypeName("URI");
- element.setTypeDefinition(typeTable.getXSDTypeDef(qName.getNamespaceURI(),
- qName.getLocalPart()));
- }
- }
-
- addAnnotations(element, aProperty);
- if ( !aProperty.isContainment() && !aProperty.getType().isDataType() )
- {
- String value = prefix + COLON + elementSchemaType.getLocalPart();
- element.getElement().setAttribute(PROPERTY_TYPE, value);
- }
- return elementSchemaType;
-
- }
-
- private void addAnnotations(XSDSchemaContent xsdContent, Property aProperty)
- {
- if ( !aProperty.getAliasNames().isEmpty() )
- {
- addAliasNamesAnnotation(xsdContent, aProperty.getAliasNames());
- }
-
- if ( aProperty.isReadOnly() )
- {
- xsdContent.getElement().setAttribute(READ_ONLY, Boolean.toString(aProperty.isReadOnly()));
- }
-
- if ( aProperty.getOpposite() != null )
- {
- xsdContent.getElement().setAttribute(OPPOSITE_PROPERTY, aProperty.getOpposite().getName());
- }
- }
-
-
- private QName buildComplexSchemaTypeContents(String targetNamespace,
- XSDComplexTypeDefinition complexType,
- Type dataType)
- {
- //clipProperties(dataType);
- List properties = dataType.getDeclaredProperties();
- Iterator iterator = properties.iterator();
- Property aProperty;
- QName propertySchemaTypeName = null;
-
- while ( iterator.hasNext() )
- {
- aProperty = (Property)iterator.next();
- if ( aProperty.isContainment() || aProperty.isMany() || !aProperty.getType().isDataType() )
- {
- propertySchemaTypeName = addElement2ComplexType(targetNamespace, complexType, aProperty);
- }
- else
- {
- propertySchemaTypeName = addAttribute2ComplexType(targetNamespace, complexType, aProperty);
- }
-
- /*if ( !EFEATURE_MAP_ENTRY.equals(aProperty.getType().getName()) )
- {
- addContents2ComplexType(targetNamespace, complexType, aProperty);
- }*/
- }
-
- return propertySchemaTypeName;
-
- }
-
- public QName buildComplexSchemaType(Type dataType)
- {
- //this is called from buildSchema only if isXSD(dataType) is false
- QName complexSchemaTypeName = null ;
- if ( !dataType.isDataType() &&
- (complexSchemaTypeName = typeTable.getComplexSchemaTypeName(dataType.getURI(), dataType.getName())) == null )
- {
- XSDSchema xmlSchema = getXmlSchema(dataType);
- String targetNamespace = dataType.getURI();
- String targetNamespacePrefix = (String)targetNamespacePrefixMap.get(targetNamespace);
-
- complexSchemaTypeName = new QName(targetNamespace,
- dataType.getName(),
- targetNamespacePrefix);
-
- XSDComplexTypeDefinition complexType = xsdFactory.createXSDComplexTypeDefinition();
- complexType.setName(dataType.getName());
- complexType.setTargetNamespace(targetNamespace);
- complexType.setAbstract(dataType.isAbstract());
-
- xmlSchema.getTypeDefinitions().add(complexType);
- xmlSchema.getContents().add(complexType);
-
- complexType.updateElement();
-
- addAnnotations(complexType, dataType);
-
- handleBaseExtn(xmlSchema, dataType, complexType);
- handleSDOSequence(dataType, complexType);
- handleSDOOpenType(dataType, complexType);
-
- //add before constructing the contents because a content element could
- //possibly be of type 'complexType'.
- typeTable.addComplexSchemaType(dataType.getURI(), dataType.getName(), complexSchemaTypeName);
- typeTable.addXSDTypeDef(dataType.getURI(), dataType.getName(), complexType);
-
- //now compose the contents for this complex type
- buildComplexSchemaTypeContents(targetNamespace, complexType, dataType);
-
- //finally create a global element for this type
- createGlobalElement(xmlSchema, complexType, complexSchemaTypeName);
- }
-
- return complexSchemaTypeName;
- }
-
- private void addAnnotations(XSDTypeDefinition xsdType, Type dataType)
- {
- if ( dataType.isAbstract() )
- {
- if ( xsdType instanceof XSDComplexTypeDefinition )
- {
- ((XSDComplexTypeDefinition)xsdType).setAbstract(dataType.isAbstract());
- }
- else
- {
- xsdType.getElement().setAttribute(ABSTRACT_TYPE,
- Boolean.toString(dataType.isAbstract()));
- }
- }
-
- //add alias names if it exists
- addAliasNamesAnnotation(xsdType,
- dataType.getAliasNames());
-
- //add instanceClass annotation
- if ( dataType.getInstanceClass() != null )
- {
- xsdType.getElement().setAttribute(INSTANCE_CLASS, dataType.getInstanceClass().getName());
- }
- }
-
-
- private QName buildSimpleSchemaType(Type dataType)
- {
- QName simpleSchemaTypeName = null;
- if ( dataType.isDataType() &&
- (simpleSchemaTypeName = typeTable.getSimpleSchemaTypeName(dataType.getName()) ) == null )
- {
- XSDSchema xmlSchema = getXmlSchema(dataType);
- XSDSimpleTypeDefinition simpleType = xsdFactory.createXSDSimpleTypeDefinition();
- //set the name
- simpleType.setName(dataType.getName());
- simpleType.setTargetNamespace(dataType.getURI());
- //set abstract=true if abstract
- simpleSchemaTypeName = new QName(dataType.getURI(),
- dataType.getName(),
- (String)targetNamespacePrefixMap.get(dataType.getURI()));
- xmlSchema.getContents().add(simpleType);
- simpleType.updateElement();
-
- addAnnotations(simpleType, dataType);
-
- if ( !dataType.getBaseTypes().isEmpty() )
- {
- Type baseType = (Type)dataType.getBaseTypes().get(0);
-
- QName baseSchemaType = null;
-
- try
- {
- baseSchemaType = buildSchema(baseType);
- }
- catch ( IllegalArgumentException e )
- {
- //this means that the base type comes from a original xsd and hence not generated
- baseSchemaType = new QName(baseType.getURI(),
- baseType.getName(),
- generatePrefix());
-
- typeTable.addSimpleSchemaType(baseType.getName(), baseSchemaType);
-
- XSDSimpleTypeDefinition baseTypeDef = xsdFactory.createXSDSimpleTypeDefinition();
- baseTypeDef.setName(baseType.getName());
- baseTypeDef.setTargetNamespace(baseType.getURI());
- typeTable.addXSDTypeDef(baseType.getURI(), baseType.getName(), baseTypeDef);
-
- //include external XSD locations
- includeExtXSD(baseType);
- }
-
- simpleType.setBaseTypeDefinition((XSDSimpleTypeDefinition)typeTable.
- getXSDTypeDef(baseSchemaType.getNamespaceURI(),baseSchemaType.getLocalPart()));
- addImports(xmlSchema, baseSchemaType);
- }
-
-
- typeTable.addSimpleSchemaType(dataType.getName(), simpleSchemaTypeName);
- typeTable.addXSDTypeDef(dataType.getURI(), dataType.getName(), simpleType);
- }
- return simpleSchemaTypeName;
- }
-
- private void includeExtXSD(Type dataType)
- {
- //now we know there is a type for which the xsd must come from outside
- //create a schema for the namespace of this type and add an include in it for
- //the xsd that is defined externally
- XSDSchema xmlSchema = getXmlSchema(dataType);
-
- //ideally there could be more than one external schema defintions for a namespace
- //and hence schemalocations will be a list of locations
- //List schemaLocations = (List)schemaLocationMap.get(dataType.getURI());
-
- //since as per the specs the input to XSDHelper is a map of allowing
- //only one schemalocation for a namespace. So for now this single location will be
- //picked up and put into a list
- List schemaLocations = new Vector();
- if ( schemaLocationMap.get(dataType.getURI()) != null )
- {
- schemaLocations.add(schemaLocationMap.get(dataType.getURI()));
- }
-
- if ( schemaLocations.size() <= 0 )
- {
- schemaLocations.add(DEFAULT_SCHEMA_LOCATION);
- }
-
- Object schemaContent = null;
- Iterator includesIterator = xmlSchema.getContents().iterator();
- Iterator schemaLocIterator = schemaLocations.iterator();
- String aSchemaLocation = null;
- boolean includeExists = false;
- //include all external schema locations
- while ( schemaLocIterator.hasNext() )
- {
- aSchemaLocation = (String)schemaLocIterator.next();
- while ( includesIterator.hasNext() )
- {
- schemaContent = includesIterator.next();
- if ( schemaContent instanceof XSDInclude )
- {
- if ( !includeExists && aSchemaLocation.equals(
- ((XSDInclude)schemaContent).getSchemaLocation()
- ))
- {
- includeExists = true;
- }
- }
- }
-
- if ( !includeExists )
- {
- XSDInclude includeElement = xsdFactory.createXSDInclude();
- includeElement.setSchemaLocation(aSchemaLocation);
- xmlSchema.getContents().add(0, includeElement);
- }
- }
- }
-
- protected QName buildSchema(Type dataType) throws IllegalArgumentException
- {
- QName schemaTypeName = null;
-
- if ( dataType.isDataType() )
- {
- schemaTypeName = typeTable.getSimpleSchemaTypeName(dataType.getName());
- }
- else
- {
- schemaTypeName = typeTable.getComplexSchemaTypeName(dataType.getURI(), dataType.getName());
- }
-
- //attempt to generate only if we have not done it already..i.e the type is
- //not found in the typetable
- if ( schemaTypeName == null )
- {
- XSDHelper xsdHelper = SDOUtil.createHelperContext().getXSDHelper();
-
- if ( !xsdHelper.isXSD( dataType ) )
- {
- if ( dataType.isDataType() )
- {
- schemaTypeName = buildSimpleSchemaType(dataType);
- }
- else
- {
- schemaTypeName = buildComplexSchemaType(dataType);
- }
- }
- else
- {
- throw new IllegalArgumentException("Cannot generate XSD since SDO Type '" +
- dataType.getName() + "' was orginally generated from XSD. Use original XSD");
- }
- }
- return schemaTypeName;
- }
-
-
- private XSDSchema getXmlSchema(Type dataType)
- {
- XSDSchema xmlSchema = null;
-
- if ((xmlSchema = (XSDSchema) schemaMap.get(dataType.getURI())) == null)
- {
- String targetNamespacePrefix = generatePrefix();
-
- xmlSchema = xsdFactory.createXSDSchema();
- xmlSchema.setTargetNamespace(dataType.getURI());
- xmlSchema.setAttributeFormDefault(XSDForm.QUALIFIED_LITERAL);
- xmlSchema.setElementFormDefault(XSDForm.QUALIFIED_LITERAL);
-
- targetNamespacePrefixMap.put(dataType.getURI(), targetNamespacePrefix);
- schemaMap.put(dataType.getURI(), xmlSchema);
-
- xmlSchema.getQNamePrefixToNamespaceMap().put(TypeTable.XS_URI_PREFIX, TypeTable.XML_SCHEMA_URI);
- xmlSchema.setSchemaForSchemaQNamePrefix(TypeTable.XS_URI_PREFIX);
-
- xmlSchema.getQNamePrefixToNamespaceMap().put(targetNamespacePrefix, dataType.getURI());
- //xmlSchema.setSchemaForSchemaQNamePrefix(targetNamespacePrefix);
-
- addSDONamespaces(xmlSchema);
- addPackageAnnotation(xmlSchema, dataType);
- }
- return xmlSchema;
- }
-
-
- private void addSDONamespaces(XSDSchema xmlSchema)
- {
- xmlSchema.getQNamePrefixToNamespaceMap().put(COMMONJ_SDO_NS_PREFIX, COMMONJ_SDO_NS);
- //xmlSchema.setSchemaForSchemaQNamePrefix(COMMONJ_SDO_NS_PREFIX);
-
- xmlSchema.getQNamePrefixToNamespaceMap().put(SDO_JAVA_NS_PREFIX, SDO_JAVA_NS);
- //xmlSchema.setSchemaForSchemaQNamePrefix(SDO_JAVA_NS_PREFIX);
- }
-
-
- /**
- * JAM convert first name of an attribute into UpperCase as an example if
- * there is a instance variable called foo in a bean , then Jam give that as
- * Foo so this method is to correct that error
- *
- * @param wrongName
- * @return the right name, using english as the locale for case conversion
- */
- public static String getCorrectName(String wrongName)
- {
- if (wrongName.length() > 1) {
- return wrongName.substring(0, 1).toLowerCase(Locale.ENGLISH)
- + wrongName.substring(1, wrongName.length());
- } else {
- return wrongName.substring(0, 1).toLowerCase(Locale.ENGLISH);
- }
- }
-
- private String addImports(XSDSchema xmlSchema, QName schemaTypeName)
- {
- String prefix = null;
- Iterator iterator = xmlSchema.getQNamePrefixToNamespaceMap().keySet().iterator();
- while ( iterator.hasNext() )
- {
- prefix = (String)iterator.next();
-
- if ( schemaTypeName.getNamespaceURI().equals(
- xmlSchema.getQNamePrefixToNamespaceMap().get(prefix)) )
- {
- return prefix;
- }
- }
-
- //the following lines are executed only if a prefix was not found which implies that the
- //schemaTypeName was not imported earlier and also it does not belong to the targetnamespace
- XSDImport importElement = xsdFactory.createXSDImport();
- importElement.setNamespace(schemaTypeName.getNamespaceURI());
- xmlSchema.getContents().add(0, importElement);
- prefix = schemaTypeName.getPrefix();
- if ( prefix == null || prefix.length() <= 0 )
- {
- prefix = generatePrefix();
- }
- xmlSchema.getQNamePrefixToNamespaceMap().put(prefix, schemaTypeName.getNamespaceURI());
-
- return prefix;
- }
-
- private void handleSDOSequence(Type datatype, XSDComplexTypeDefinition complexType)
- {
- if ( datatype.isSequenced() )
- {
- complexType.setMixed(true);
- XSDModelGroup choice = xsdFactory.createXSDModelGroup();
- choice.setCompositor(XSDCompositor.CHOICE_LITERAL);
- XSDParticle aParticle = xsdFactory.createXSDParticle();
- aParticle.setContent(choice);
- aParticle.setMaxOccurs(-1);
- complexType.setContent(aParticle);
- }
- else
- {
- //hack to handle group property as choice
- /*if ( getPropertyStartsWithName(datatype.getDeclaredProperties(), GROUP).size() > 0 )
- {
- XmlSchemaChoice choice = new XmlSchemaChoice();
- choice.setMaxOccurs(Long.MAX_VALUE);
- complexType.setParticle(choice);
- }
- else*/
- {
- XSDModelGroup sequence = xsdFactory.createXSDModelGroup();
- sequence.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
- XSDParticle aParticle = xsdFactory.createXSDParticle();
- aParticle.setContent(sequence);
- complexType.setContent(aParticle);
- }
- }
- }
-
- private void handleSDOOpenType(Type datatype, XSDComplexTypeDefinition complexType)
- {
- if ( datatype.isOpen() /*&&
- getPropertyStartsWithName(datatype.getDeclaredProperties(), GROUP).size() <= 0 */)
- {
- XSDWildcard elementWildcard = xsdFactory.createXSDWildcard();
- elementWildcard.getLexicalNamespaceConstraint().add("##other");
- elementWildcard.setProcessContents(XSDProcessContents.LAX_LITERAL);
- // Create a particle to hold the wildcard.
- XSDParticle wildcardParticle = xsdFactory.createXSDParticle();
- wildcardParticle.setContent(elementWildcard);
- wildcardParticle.setMaxOccurs(-1);
- ((XSDModelGroup)((XSDParticle)complexType.getContent()).getContent()).
- getContents().add(wildcardParticle);
-
- XSDWildcard attributeWildcard = xsdFactory.createXSDWildcard();
- attributeWildcard.getLexicalNamespaceConstraint().add("##other");
- attributeWildcard.setProcessContents(XSDProcessContents.LAX_LITERAL);
- complexType.setAttributeWildcard(attributeWildcard);
- }
- }
-
- private void handleBaseExtn(XSDSchema xmlSchema,
- Type datatype,
- XSDComplexTypeDefinition complexType)
- {
- if ( datatype.getBaseTypes().size() > 0 )
- {
- Type baseType = (Type)datatype.getBaseTypes().get(0);
- QName baseSchemaType = null;
-
- try
- {
- baseSchemaType = buildSchema(baseType);
- }
- catch ( IllegalArgumentException e )
- {
- //schema cannot be generated for this type as there exists an xsd already
- //so include that original XSD
- baseSchemaType = new QName(baseType.getURI(),
- baseType.getName(),
- generatePrefix());
-
- XSDSimpleTypeDefinition baseTypeDef = xsdFactory.createXSDSimpleTypeDefinition();
- baseTypeDef.setName(baseType.getName());
- baseTypeDef.setTargetNamespace(baseType.getURI());
- typeTable.addXSDTypeDef(baseType.getURI(), baseType.getName(), baseTypeDef);
-
- includeExtXSD(baseType);
- }
-
- complexType.setDerivationMethod(XSDDerivationMethod.EXTENSION_LITERAL);
-
- if ( baseType.isDataType() )
- {
- XSDSimpleTypeDefinition anonymousSimpleTypeDefinition
- = xsdFactory.createXSDSimpleTypeDefinition();
- anonymousSimpleTypeDefinition.setBaseTypeDefinition((XSDSimpleTypeDefinition)typeTable.
- getXSDTypeDef(baseSchemaType.getNamespaceURI(),baseSchemaType.getLocalPart()));
- complexType.setContent(anonymousSimpleTypeDefinition);
- }
- else
- {
- complexType.setBaseTypeDefinition((XSDSimpleTypeDefinition)typeTable.
- getXSDTypeDef(baseSchemaType.getNamespaceURI(),baseSchemaType.getLocalPart()));
-
- }
-
- addImports(xmlSchema, baseSchemaType);
- }
- }
-
- private String formGlobalElementName(String typeName)
- {
- String firstChar = typeName.substring(0,1);
- return typeName.replaceFirst(firstChar, firstChar.toLowerCase());
- }
-
- private void createGlobalElement(XSDSchema xmlSchema,
- XSDComplexTypeDefinition complexType,
- QName schemaElementName )
- {
- XSDElementDeclaration globalElement = xsdFactory.createXSDElementDeclaration();
- globalElement.setTargetNamespace(xmlSchema.getTargetNamespace());
- globalElement.setName(formGlobalElementName(complexType.getName()));
- globalElement.setTypeDefinition
- (typeTable.getXSDTypeDef(schemaElementName.getNamespaceURI(),
- schemaElementName.getLocalPart()));
- xmlSchema.getContents().add(globalElement);
- xmlSchema.getElementDeclarations().add(globalElement);
- }
-
- private void addAliasNamesAnnotation(XSDSchemaContent typeDef,
- List aliasNames)
- {
- if ( !aliasNames.isEmpty() )
- {
- StringBuffer sb = new StringBuffer();
- Iterator iterator = aliasNames.iterator();
- while ( iterator.hasNext() )
- {
- sb.append(iterator.next());
- }
- typeDef.getElement().setAttribute(ALIAS_NAMES, sb.toString());
- }
- }
-
- private void addPackageAnnotation(XSDSchema xmlSchema, Type dataType)
- {
- if ( dataType.getInstanceClass() != null )
- {
- xmlSchema.updateElement();
- xmlSchema.getElement().setAttribute(JAVA_PACKAGE,
- dataType.getInstanceClass().getPackage().getName());
- }
- }
-
- private String generatePrefix()
- {
- return NAME_SPACE_PREFIX + prefixCount++;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java
deleted file mode 100644
index 1aa2ae466b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java
+++ /dev/null
@@ -1,317 +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.helper;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-import org.apache.tuscany.sdo.model.java.JavaFactory;
-import org.apache.tuscany.sdo.model.xml.XMLFactory;
-import org.apache.tuscany.sdo.model.xml.impl.XMLFactoryImpl;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * Look up a Type given the uri and typeName or interfaceClass. SDO Types are
- * available through the getType("commonj.sdo", typeName) method. Defines Types
- * from DataObjects.
- */
-public class TypeHelperImpl implements TypeHelper {
- protected HelperContext helperContext;
- private ExtendedMetaData extendedMetaData;
-
- static protected Set builtInModels = null;
-
- static public Set getBuiltInModels() {
- if (builtInModels == null) {
- builtInModels = new HashSet();
- builtInModels.add(ModelFactory.INSTANCE);
- builtInModels.add(JavaFactory.INSTANCE);
- builtInModels.add(XMLFactory.INSTANCE);
- builtInModels.add(InternalFactory.INSTANCE);
- }
- return TypeHelperImpl.builtInModels;
- }
-
- public ExtendedMetaData getExtendedMetaData() {
- return extendedMetaData;
- }
-
- // JIRA-helperContext
- public TypeHelperImpl(HelperContext hc) {
- this.helperContext = hc;
- this.extendedMetaData = ((HelperContextImpl)hc).extendedMetaData;
-
- // Register the standard (predefined) SDO types
- getBuiltInModels(); // Simply accessing EMF packages causes auto
- // registration in global registry
-
- // MetadataFactoryImpl.init(); //FB do we want to preregister this?
- }
-
-
- public Type getType(String uri, String typeName) {
- EPackage ePackage = extendedMetaData.getPackage(uri);
-
- if (ePackage != null) {
- EClassifier eClassifier = ePackage.getEClassifier(typeName);
- if (eClassifier == null) {
- eClassifier = extendedMetaData.getType(ePackage, typeName);
- }
- return (Type)eClassifier;
- }
- return null;
- }
-
- private Method getGetStaticTypeMethod(Class classObj) {
- try {
- Method method = classObj.getMethod("getStaticType", null);
- return method;
- }
- catch (Exception e) {
- return null;
- }
- }
-
- public Type getType(Class interfaceClass) {
- Type type = SDOUtil.getJavaSDOType(interfaceClass);
- if (type != null) {
- return type;
- }
-
- Class sdoTypeImplClass = interfaceClass;
- Method getStaticTypeMethod = getGetStaticTypeMethod(interfaceClass);
- if (getStaticTypeMethod == null) {
- String sdoTypeImplClassName = interfaceClass.getName();
- if (sdoTypeImplClassName.endsWith("Impl") == false) {
- sdoTypeImplClass = DataObjectUtil.getImplementationClass(interfaceClass, false);
- if (sdoTypeImplClass == null) {
- return null;
- }
-
- getStaticTypeMethod = getGetStaticTypeMethod(sdoTypeImplClass);
- if (getStaticTypeMethod == null) {
- return null;
- }
- }
- else {
- return null;
- }
- }
-
- try {
- Object implInstance = sdoTypeImplClass.newInstance();
- return (Type)getStaticTypeMethod.invoke(implInstance, null);
- }
- catch (Exception e) {
- return null;
- }
- }
-
- public Type define(DataObject type) {
- if (!(type instanceof org.apache.tuscany.sdo.model.Type))
- throw new IllegalArgumentException();
- org.apache.tuscany.sdo.model.Type modeledType = (org.apache.tuscany.sdo.model.Type)type;
-
- boolean isDataType = modeledType.isDataType();
- Type definedType = SDOUtil.createType(helperContext, modeledType.getUri(), modeledType.getName(), isDataType);
- if (definedType == null) {
- // If type already defined, return existing Type.
- return getType(modeledType.getUri(), modeledType.getName());
- }
-
- SDOUtil.setJavaClassName(definedType, modeledType.getInstanceClassName());
-
- if (!isDataType) {
- SDOUtil.setSequenced(definedType, modeledType.isSequenced());
- SDOUtil.setOpen(definedType, modeledType.isOpen());
- SDOUtil.setAbstract(definedType, modeledType.isAbstract());
-
- for (Iterator iter = modeledType.getBaseType().iterator(); iter.hasNext();) {
- Type baseType = getDefinedType((org.apache.tuscany.sdo.model.Type)iter.next());
- SDOUtil.addBaseType(definedType, baseType);
- }
-
- for (Iterator iter = modeledType.getAliasName().iterator(); iter.hasNext();) {
- String aliasName = (String)iter.next();
- SDOUtil.addAliasName(definedType, aliasName);
- }
-
- for (Iterator iter = modeledType.getProperty().iterator(); iter.hasNext();) {
- org.apache.tuscany.sdo.model.Property modeledProperty =
- (org.apache.tuscany.sdo.model.Property)iter.next();
-
- Type propertyType = getDefinedType(modeledProperty.getType_());
- Property definedProperty = SDOUtil.createProperty(definedType, modeledProperty.getName(), propertyType);
-
- initializeProperty(definedProperty, modeledProperty);
- }
-
- // define a global property to accompany the type definition
- if (!SDOUtil.isDocumentRoot(definedType)) {
- String propertyName = definedType.getName();
- if (!Character.isLowerCase(propertyName.charAt(0))) {
- propertyName = propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);
- }
- Property globalProperty =
- SDOUtil.createOpenContentProperty(helperContext, definedType.getURI(), propertyName, definedType);
- SDOUtil.setContainment(globalProperty, true);
- }
- } // if (!isDataType)
-
- addTypeInstanceProperties(definedType, (DataObject)modeledType);
-
- return definedType;
- }
-
- protected void addTypeInstanceProperties(Type definedType, DataObject modeledType) {
- List instanceProperties = SDOUtil.getOpenContentProperties(modeledType);
- for (Iterator iter = instanceProperties.iterator(); iter.hasNext();) {
- Property property = (Property)iter.next();
- SDOUtil.addTypeInstanceProperty(definedType, property, modeledType.get(property));
- }
- }
-
- protected void addPropertyInstanceProperties(Property definedProperty, DataObject modeledProperty) {
- List instanceProperties = SDOUtil.getOpenContentProperties(modeledProperty);
- for (Iterator iter = instanceProperties.iterator(); iter.hasNext();) {
- Property property = (Property)iter.next();
- SDOUtil.addPropertyInstanceProperty(definedProperty, property, modeledProperty.get(property));
- }
- }
-
- public List /* Type */define(List /* DataObject */types) {
- int count = types.size();
- List definedTypes = new ArrayList(count);
- for (int i = 0; i < count; i++) {
- definedTypes.add(define((DataObject)types.get(i)));
- }
- return definedTypes;
- }
-
- protected Type getDefinedType(org.apache.tuscany.sdo.model.Type modeledType) {
- if (modeledType instanceof Type) {
- return (Type)modeledType;
- } else {
- EClassifier eClassifier = extendedMetaData.getType(modeledType.getUri(), modeledType.getName());
- if (eClassifier != null) {
- return (Type)eClassifier;
- } else {
- return define((DataObject)modeledType);
- }
- }
- }
-
- protected Property getDefinedProperty(org.apache.tuscany.sdo.model.Property modeledProperty) {
- if (modeledProperty instanceof Property) {
- return (Property)modeledProperty;
- } else {
- DataObject modeledContainingType = ((DataObject)modeledProperty).getContainer();
-
- Type definedContainingType = getDefinedType((org.apache.tuscany.sdo.model.Type)modeledContainingType);
- String propertyName = modeledProperty.getName();
-
- return definedContainingType.getProperty(propertyName);
- }
- }
-
- protected void initializeProperty(Property newProperty, org.apache.tuscany.sdo.model.Property modeledProperty) {
- SDOUtil.setMany(newProperty, modeledProperty.isMany());
- SDOUtil.setDefault(newProperty, modeledProperty.getDefault_());
- SDOUtil.setReadOnly(newProperty, modeledProperty.isReadOnly());
- for (Iterator iter = modeledProperty.getAliasName().iterator(); iter.hasNext();) {
- String aliasName = (String)iter.next();
- SDOUtil.addAliasName(newProperty, aliasName);
- }
-
- if (newProperty.getType().isDataType()) {
- // Setting xmlElement to FALSE only makes sense here
- Boolean isXmlElement = Boolean.TRUE; // By default, a SDO property is an XSD element
- Sequence anyAttr = modeledProperty.getAnyAttribute();
- for (int i=0; i
- *
- *
- * created from this XML Schema fragment:
- *
- *
- *
- *
- * Upon loading this XMLDocument:
- * DataObject is an instance of Type PurchaseOrderType.
- * RootElementURI is null because the XSD has no targetNamespace URI.
- * RootElementName is purchaseOrder.
- * Encoding is null because the document did not specify an encoding.
- * XMLDeclaration is true because the document contained an XML declaration.
- * XMLVersion is 1.0
- * SchemaLocation and noNamespaceSchemaLocation are null because they are
- * not specified in the document.
- *
- * When saving the root element, if the type of the root dataObject is not the
- * type of global element specified by rootElementURI and rootElementName,
- * or if a global element does not exist for rootElementURI and rootElementName,
- * then an xsi:type declaration is written to record the root DataObject's Type.
- *
- * When loading the root element and an xsi:type declaration is found
- * it is used as the type of the root DataObject. In this case,
- * if validation is not being performed, it is not an error if the
- * rootElementName is not a global element.
- */
-public class XMLDocumentImpl implements XMLDocument
-{
- protected ExtendedMetaData extendedMetaData;
-
- protected EObject rootObject;
-
- protected XMLResource resource;
-
- protected EStructuralFeature rootElement;
-
- protected EObject documentRoot;
-
- protected final static String WHITESPACE_REGEX = "\\s";
-
- //TODO clean up the options thing
- protected XMLDocumentImpl(ExtendedMetaData extendedMetaData, Object options)
- {
- this.extendedMetaData = extendedMetaData;
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
-
- if (options instanceof Map)
- {
- Class resourceFactoryClass = (Class)((Map)options).get("GENERATED_LOADER");
- if (resourceFactoryClass != null)
- {
- try
- {
- Object resourceFactory = resourceFactoryClass.newInstance();
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", resourceFactory);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- resource = (XMLResource)resourceSet.createResource(URI.createURI("http:///temp.xml"));
- DataObjectUtil.configureXMLResource(resource, extendedMetaData);
- }
-
- protected XMLDocumentImpl(ExtendedMetaData extendedMetaData)
- {
- this(extendedMetaData, null);
- }
-
- protected XMLDocumentImpl(ExtendedMetaData extendedMetaData, DataObject dataObject, String rootElementURI, String rootElementName)
- {
- this(extendedMetaData);
-
- rootObject = (EObject)dataObject;
-
- rootElement = extendedMetaData.getElement(rootElementURI, rootElementName);
- if (rootElement == null)
- {
- rootElement = ExtendedMetaData.INSTANCE.demandFeature(rootElementURI, rootElementName, true);
- }
-
- EClass documentRootClass = rootElement.getEContainingClass();
- documentRoot = EcoreUtil.create(documentRootClass);
- resource.getContents().add(documentRoot);
- }
-
- protected void save(OutputStream outputStream, Object options) throws IOException
- {
- save(outputStream, null, options);
- }
-
- protected void save(Writer outputWriter, Object options) throws IOException
- {
- // TODO temporary brute-force implementation ... to be replaced
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- save(outputStream, options);
- outputWriter.write(new String(outputStream.toByteArray()));
- }
-
- protected void save(Node node, Object options) throws IOException
- {
- save(null, (Document)node, options);
- }
-
- protected void save(OutputStream outputStream, Document document, Object options) throws IOException
- {
- EObject oldContainer = null;
- Resource oldResource = null;
- EReference oldContainmentReference = null;
- int oldContainmentIndex = -1;
-
- if (documentRoot != null)
- {
- oldContainer = rootObject.eContainer();
- if (oldContainer != null)
- oldContainmentReference = rootObject.eContainmentFeature();
- else
- oldResource = rootObject.eResource();
- if (oldContainer != documentRoot || oldContainmentReference != rootElement)
- {
- if (oldResource != null)
- {
- oldContainmentIndex = oldResource.getContents().indexOf(rootObject);
- oldResource.getContents().remove(oldContainmentIndex);
- }
- else if (oldContainmentReference != null && FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
- oldContainmentIndex = ((List)oldContainer.eGet(oldContainmentReference)).indexOf(rootObject);
-
- Object rootValue =
- rootElement instanceof EAttribute && rootObject instanceof SimpleAnyTypeDataObject ?
- ((SimpleAnyTypeDataObject)rootObject).getValue() : rootObject;
-
- documentRoot.eSet(rootElement, rootValue);
- }
- }
-
- if (outputStream != null)
- resource.save(outputStream, (Map)options);
- else // if (document != null)
- resource.save(document, (Map)options, null);
-
- if (oldResource != null)
- {
- oldResource.getContents().add(oldContainmentIndex, rootObject);
- }
- if (rootElement instanceof EReference)
- {
- if (oldContainer != null)
- {
- if (oldContainer != documentRoot || oldContainmentReference != rootElement)
- {
- if (FeatureMapUtil.isMany(oldContainer, oldContainmentReference))
- ((List)oldContainer.eGet(oldContainmentReference)).add(oldContainmentIndex, rootObject);
- else
- oldContainer.eSet(oldContainmentReference, rootObject);
- }
- }
- else if (documentRoot != null)
- {
- documentRoot.eSet(rootElement, null);
- }
- }
- }
-
- protected void load(InputStream inputStream, String locationURI, Object options) throws IOException
- {
- InputSource inputSource = new InputSource(inputStream);
- load(inputSource, locationURI, options);
- }
-
- protected void load(Reader inputReader, String locationURI, Object options) throws IOException
- {
- InputSource inputSource = new InputSource(inputReader);
- load(inputSource, locationURI, options);
- }
-
- protected final void load(Node node, Object options) throws IOException {
- resource.load(node, (Map)options);
- initLoadedRoot();
- }
-
- protected final void load(XMLStreamReader reader, Map options) throws IOException
- {
- ((SDOXMLResourceImpl)resource).load(reader, options);
- initLoadedRoot();
- }
-
- protected void load(InputSource inputSource, String locationURI, Object options) throws IOException
- {
- if (locationURI != null)
- {
- inputSource.setSystemId(locationURI);
- resource.setURI(URI.createURI(locationURI));
- }
- resource.load(inputSource, (Map)options);
- initLoadedRoot();
- }
-
- /**
- * @return a Map object with key-value pair where key is the DataObject and value contains the info
- * about the unknown properties for the DataObject
- */
- public Map getUnknownProperties(){
- return resource.getEObjectToExtensionMap();
- }
-
- private void initLoadedRoot()
- {
- rootObject = null;
- rootElement = null;
- documentRoot = null;
-
- if (!resource.getContents().isEmpty())
- {
- documentRoot = (EObject)resource.getContents().get(0);
- EClass documentRootClass = documentRoot.eClass();
- if ("".equals(extendedMetaData.getName(documentRootClass))) //TODO efficient way to check this? Maybe DataObject.getContainer should also check this?
- {
- FeatureMap featureMap = (FeatureMap)documentRoot.eGet(documentRootClass.getEStructuralFeature(0)); // get mixed feature
- int size = featureMap.size();
- for (int index = 0; index < size; index++)
- {
- EStructuralFeature feature = featureMap.getEStructuralFeature(index);
- boolean isText =
- feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT ||
- feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA ||
- feature == XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT;
- if (!isText)
- {
- if (feature instanceof EReference)
- {
- rootObject = (EObject)featureMap.getValue(index);
- documentRoot.eUnset(feature);
- }
- else //EAttribute
- {
- rootObject = (EObject)SDOUtil.createDataTypeWrapper((Type)feature.getEType(), featureMap.getValue(index));
- }
- rootElement = feature;
- break;
- }
- } //for
- if (rootObject == null)
- rootObject = ((SDOXMLResourceImpl) resource).root;
- }
- else
- {
- rootObject = documentRoot;
- documentRoot = null;
- }
- }
- }
-
- public DataObject getRootObject()
- {
- return (DataObject)rootObject;
- }
-
- public String getRootElementURI()
- {
- if (rootElement != null)
- {
- return extendedMetaData.getNamespace(rootElement);
- }
- else if (rootObject != null)
- {
- return extendedMetaData.getNamespace(rootObject.eClass());
- }
- return null;
- }
-
- public String getRootElementName()
- {
- if (rootElement != null)
- {
- return extendedMetaData.getName(rootElement);
- }
- else if (rootObject != null)
- {
- return extendedMetaData.getName(rootObject.eClass());
- }
- return null;
- }
-
- public String getEncoding()
- {
- return resource.getEncoding();
- }
-
- public void setEncoding(String encoding)
- {
- resource.setEncoding(encoding);
- }
-
- public boolean isXMLDeclaration()
- {
- return Boolean.FALSE.equals(resource.getDefaultSaveOptions().get(XMLResource.OPTION_DECLARE_XML));
- }
-
- public void setXMLDeclaration(boolean xmlDeclaration)
- {
- resource.getDefaultSaveOptions().put(XMLResource.OPTION_DECLARE_XML, xmlDeclaration ? Boolean.TRUE : Boolean.FALSE);
- }
-
- public String getXMLVersion()
- {
- return resource.getXMLVersion();
- }
-
- public void setXMLVersion(String xmlVersion)
- {
- resource.setXMLVersion(xmlVersion);
- }
-
- /**
- * @return an EMap containing the schema locations or null when no map
- */
- protected EMap getSchemaLocationMap()
- {
- EMap result = null;
- if ((documentRoot != null) && (extendedMetaData != null))
- {
- EReference xsiSchemaLocationMapFeature = extendedMetaData
- .getXSISchemaLocationMapFeature(documentRoot.eClass());
- if (xsiSchemaLocationMapFeature != null)
- {
- result = (EMap) documentRoot.eGet(xsiSchemaLocationMapFeature);
- }
- }
- return result;
- }
-
- /**
- * @param value
- * from schema location map.
- * @return string form of URI from provided value, deresolved if appropriate.
- */
- protected String deresolve(String value)
- {
- URI location = URI.createURI(value);
- URI resourceURI = resource.getURI();
- boolean shouldDeresolve = resourceURI != null && !resourceURI.isRelative()
- && resourceURI.isHierarchical();
- if (shouldDeresolve && !location.isRelative())
- {
- URI deresolvedURI = location.deresolve(resourceURI, true, true, false);
- if (deresolvedURI.hasRelativePath())
- {
- location = deresolvedURI;
- }
- }
- return location.toString();
- }
-
- /**
- * @param value
- * for schema location from input parameter.
- * @return string form of URI from provided value, resolved if appropriate.
- */
- protected String resolve(String value)
- {
- URI location = URI.createURI(value);
- URI resourceURI = resource.getURI();
- boolean shouldResolve = resourceURI != null && resourceURI.isHierarchical()
- && !resourceURI.isRelative();
- if (shouldResolve && location.isRelative() && location.hasRelativePath())
- {
- location = location.resolve(resourceURI, false);
- }
- return location.toString();
- }
-
- public String getSchemaLocation()
- {
- EMap xsiSchemaLocationMap = getSchemaLocationMap();
- if (xsiSchemaLocationMap != null)
- {
- if (!xsiSchemaLocationMap.isEmpty())
- {
- StringBuffer xsiSchemaLocation = new StringBuffer();
- for (Iterator i = xsiSchemaLocationMap.entrySet().iterator(); i
- .hasNext();)
- {
- Map.Entry entry = (Map.Entry) i.next();
- String namespace = (String) entry.getKey();
- if (namespace != null)
- {
- if (xsiSchemaLocation.length() > 0)
- {
- xsiSchemaLocation.append(' ');
- }
- xsiSchemaLocation.append(namespace);
- xsiSchemaLocation.append(' ');
- String value = entry.getValue().toString();
- xsiSchemaLocation.append(deresolve(value));
- }
- }
- return xsiSchemaLocation.toString().equals("") ? null
- : xsiSchemaLocation.toString();
- }
- }
- return null;
- }
-
- public void setSchemaLocation(String schemaLocation)
- {
- EMap xsiSchemaLocationMap = getSchemaLocationMap();
- if (xsiSchemaLocationMap != null)
- {
- // only remove the entries from xsiSchemaLocationMap that contain a
- // non-null key
- for (Iterator i = xsiSchemaLocationMap.entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry) i.next();
- if (entry.getKey() != null)
- {
- i.remove();
- }
- }
- if (xsiSchemaLocationMap.size() == 0)
- {
- resource.getDefaultSaveOptions().put(
- XMLResource.OPTION_SCHEMA_LOCATION, Boolean.FALSE);
- }
- if (schemaLocation != null)
- {
- String[] values = schemaLocation.split(WHITESPACE_REGEX);
- for (int i = 0; i < values.length; i++) // note: also incremented in
- // loop
- {
- String key = values[i++];
- if (i < values.length)
- {
- xsiSchemaLocationMap.put(key, resolve(values[i]));
- }
- }
- if (xsiSchemaLocationMap.size() != 0)
- {
- resource.getDefaultSaveOptions().put(
- XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
- }
- }
- }
- }
-
- public String getNoNamespaceSchemaLocation()
- {
- EMap xsiSchemaLocationMap = getSchemaLocationMap();
- if (xsiSchemaLocationMap != null)
- {
- StringBuffer xsiSchemaLocation = new StringBuffer();
- if (!xsiSchemaLocationMap.isEmpty())
- {
- Object valueObject = xsiSchemaLocationMap.get(null);
- if (valueObject != null)
- {
- String valueString = (String) valueObject;
- String[] values = valueString.split(WHITESPACE_REGEX);
- for (int i = 0; i < values.length; i++)
- {
- if (xsiSchemaLocation.length() > 0)
- {
- xsiSchemaLocation.append(' ');
- }
- xsiSchemaLocation.append(deresolve(values[i]));
- }
- }
- String result = xsiSchemaLocation.toString();
- return result.equals("") ? null : result;
- }
- }
- return null;
- }
-
- public void setNoNamespaceSchemaLocation(String schemaLocation)
- {
- EMap xsiSchemaLocationMap = getSchemaLocationMap();
- if (xsiSchemaLocationMap != null)
- {
- // only remove the entries from xsiSchemaLocationMap that contain a null
- // key
- xsiSchemaLocationMap.removeKey(null);
- if (xsiSchemaLocationMap.size() == 0)
- {
- resource.getDefaultSaveOptions().put(
- XMLResource.OPTION_SCHEMA_LOCATION, Boolean.FALSE);
- }
- if (schemaLocation != null)
- {
- String[] values = schemaLocation.split(WHITESPACE_REGEX);
- for (int i = 0; i < values.length; i++)
- {
- xsiSchemaLocationMap.put(null, resolve(values[i]));
- }
- if (xsiSchemaLocationMap.size() != 0)
- {
- resource.getDefaultSaveOptions().put(
- XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
- }
- }
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java
deleted file mode 100644
index 4d0f3d7de8..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java
+++ /dev/null
@@ -1,193 +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.helper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Map;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.xml.sax.InputSource;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-
-/**
- * A helper to convert XML documents into DataObects and DataObjects into XML
- * documnets.
- */
-public class XMLHelperImpl implements XMLHelper {
- protected HelperContext helperContext;
- private ExtendedMetaData extendedMetaData;
-
-
- public XMLHelperImpl(HelperContext hc) {
- this.helperContext = hc;
- this.extendedMetaData = ((HelperContextImpl)hc).extendedMetaData;
- }
-
- public XMLDocument load(String inputString) {
- try {
- return load(new StringReader(inputString), null, null);
- } catch (IOException e) {
- throw new RuntimeException(e); // should never happen
- }
- }
-
- public XMLDocument load(String inputString, Object options) {
- try {
- return load(new StringReader(inputString), null, options);
- } catch (IOException e) {
- throw new RuntimeException(e); // should never happen
- }
- }
-
- public XMLDocument load(InputStream inputStream) throws IOException {
- return load(inputStream, null, null);
- }
-
- private Object checkSetOptions(Object options) throws IOException {
- if (options != null && !(options instanceof Map)) {
- throw new IOException("Invalid load options!");
- }
-
- if (helperContext != null) {
- return ((HelperContextImpl)helperContext).getMergedOption((Map)options);
- } else {// null is acceptable as it will be ignored
- return options;
- }
- }
-
- public XMLDocument load(InputStream inputStream, String locationURI, Object options) throws IOException {
- options = checkSetOptions(options);
- XMLDocumentImpl document = new XMLDocumentImpl(extendedMetaData, options);
- document.load(inputStream, locationURI, options);
- return document;
- }
-
- public XMLDocument load(Reader inputReader, String locationURI, Object options) throws IOException {
- XMLDocumentImpl document = new XMLDocumentImpl(extendedMetaData, options);
- options = checkSetOptions(options);
- document.load(inputReader, locationURI, options);
- return document;
- }
-
- public XMLDocument load(Source source, String locationURI, Object options) throws IOException {
- options = checkSetOptions(options);
- if (source instanceof DOMSource) {
- DOMSource domSource = (DOMSource)source;
- XMLDocumentImpl document = new XMLDocumentImpl(extendedMetaData, options);
- document.load(domSource.getNode(), options);
- return document;
- } else if (source instanceof SAXSource) {
- XMLDocumentImpl document = new XMLDocumentImpl(extendedMetaData, options);
- InputSource inputSource = SAXSource.sourceToInputSource(source);
- document.load(inputSource, locationURI, options);
- return document;
- } else if (source instanceof StreamSource) {
- return load(((StreamSource)source).getInputStream(), locationURI, options);
- } else {
- throw new UnsupportedOperationException();
- }
- }
-
- public String save(DataObject dataObject, String rootElementURI, String rootElementName) {
- StringWriter stringWriter = new StringWriter();
- try {
- save(createDocument(dataObject, rootElementURI, rootElementName), stringWriter, null);
- return stringWriter.toString();
- } catch (IOException e) {
- throw new RuntimeException(e); // should never happen
- }
- }
-
- public String save(DataObject dataObject, String rootElementURI, String rootElementName, Object options) {
- StringWriter stringWriter = new StringWriter();
- try {
- save(createDocument(dataObject, rootElementURI, rootElementName), stringWriter, options);
- return stringWriter.toString();
- } catch (IOException e) {
- throw new RuntimeException(e); // should never happen
- }
- }
-
- public void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream)
- throws IOException {
- save(createDocument(dataObject, rootElementURI, rootElementName), outputStream, null);
- }
-
-
- public void save(DataObject dataObject,
- String rootElementURI,
- String rootElementName,
- OutputStream outputStream,
- Object options) throws IOException {
- save(createDocument(dataObject, rootElementURI, rootElementName), outputStream, null);
- }
-
- public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException {
- options = checkSetOptions(options);
- ((XMLDocumentImpl)xmlDocument).save(outputStream, options);
- }
-
- public void save(XMLDocument xmlDocument, Writer outputWriter, Object options) throws IOException {
- options = checkSetOptions(options);
- ((XMLDocumentImpl)xmlDocument).save(outputWriter, options);
- }
-
- public void save(XMLDocument xmlDocument, Result outputResult, Object options) throws IOException {
- options = checkSetOptions(options);
- if (outputResult instanceof DOMResult) {
- ((XMLDocumentImpl)xmlDocument).save(((DOMResult)outputResult).getNode(), options);
- } else if (outputResult instanceof SAXResult) {
- throw new UnsupportedOperationException();
- } else if (outputResult instanceof StreamResult) {
- save(xmlDocument, ((StreamResult)outputResult).getOutputStream(), options);
- } else {
- throw new UnsupportedOperationException();
- }
- }
-
- public XMLDocument createDocument(DataObject dataObject, String rootElementURI, String rootElementName) {
- XMLDocument xmlDocument = new XMLDocumentImpl(extendedMetaData, dataObject, rootElementURI, rootElementName);
- xmlDocument.setEncoding("UTF-8");
- return xmlDocument;
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java
deleted file mode 100644
index 851c7d93dd..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java
+++ /dev/null
@@ -1,26 +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.helper;
-
-/**
- * @deprecated
- */
-public interface XMLStreamHelper extends org.apache.tuscany.sdo.api.XMLStreamHelper {
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java
deleted file mode 100644
index a07b9b6a71..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java
+++ /dev/null
@@ -1,151 +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.helper;
-
-import java.util.Map;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sdo.util.resource.DataObjectXMLStreamReader;
-import org.apache.tuscany.sdo.util.resource.XMLDocumentStreamReader;
-import org.apache.tuscany.sdo.util.resource.XMLStreamSerializer;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- * @version $Rev$ $Date$
- */
-public class XMLStreamHelperImpl implements XMLStreamHelper {
- protected HelperContext helperContext;
-
- public XMLStreamHelperImpl(HelperContext hc) {
- this.helperContext = hc;
- }
-
- private Map checkSetOptions(Map options) {
- if (helperContext != null) {
- return ((HelperContextImpl)helperContext).getMergedOption(options);
- } else {// null is acceptable as it will be ignored
- return options;
- }
- }
-
- public XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException {
- if (reader.getEventType() != XMLStreamConstants.START_DOCUMENT)
- throw new IllegalStateException();
-
- return loadDocument(reader, null);
- }
-
- public void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException {
- XMLStreamReader reader = createXMLStreamReader(document);
- new XMLStreamSerializer().serialize(reader, writer);
- }
-
- public void save(XMLDocument document, XMLStreamWriter writer, Map options) throws XMLStreamException {
- XMLStreamReader reader = createXMLStreamReader(document);
- options = checkSetOptions(options);
- new XMLStreamSerializer().serialize(reader, writer, options);
- }
-
- public XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException {
- XMLStreamReader reader =
- new DataObjectXMLStreamReader(document.getRootObject(), document.getRootElementURI(), document
- .getRootElementName(), helperContext.getTypeHelper());
- // Wrap the reader so that its position will be START_ELEMENT
- return new XMLDocumentStreamReader(reader);
-
- }
-
- public final DataObject loadObject(XMLStreamReader reader, Map options) throws XMLStreamException,
- IllegalStateException {
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT)
- throw new IllegalStateException();
-
- // StAX2SAXAdapter won't produce START_DOCUMENT if the reader is
- // posisitioned at START_ELEMENT and the EMF loader will fail
- // Wrap the reader so it represents a document
- reader = new XMLDocumentStreamReader(reader);
-
- return loadDocument(reader, options).getRootObject();
- }
-
- public DataObject loadObject(XMLStreamReader reader) throws XMLStreamException, IllegalStateException {
- return loadObject(reader, null);
- }
-
- public void saveObject(DataObject sdo, XMLStreamWriter writer) throws XMLStreamException {
- XMLStreamReader reader = createXMLStreamReader(sdo);
- new XMLStreamSerializer().serialize(new XMLDocumentStreamReader(reader), writer);
- }
-
- public void saveObject(DataObject sdo, XMLStreamWriter writer, Map options) throws XMLStreamException {
- XMLStreamReader reader = createXMLStreamReader(sdo);
- options = checkSetOptions(options);
- new XMLStreamSerializer().serialize(new XMLDocumentStreamReader(reader), writer, options);
- }
-
- public XMLStreamReader createXMLStreamReader(DataObject dataObject) {
- if (dataObject == null) {
- return null;
- }
- String rootElementURI;
- String rootElementName;
-
- Property property = dataObject.getContainmentProperty();
- if (property != null) {
- rootElementName = property.getName();
- rootElementURI = property.getType().getURI();
- } else {
- rootElementName = dataObject.getType().getName();
- rootElementURI = dataObject.getType().getURI();
- }
-
- return new DataObjectXMLStreamReader(dataObject, rootElementURI, rootElementName, helperContext.getTypeHelper());
- }
-
- protected XMLDocument loadDocument(XMLStreamReader reader, Map options) throws XMLStreamException {
- try {
- XMLDocumentImpl document = new XMLDocumentImpl(((HelperContextImpl)helperContext).extendedMetaData, null);
- options = checkSetOptions(options);
- document.load(reader, options);
- return document;
- } catch (Exception e) {
- if (e instanceof Resource.IOWrappedException) {
- Resource.IOWrappedException ioe = (Resource.IOWrappedException)e;
- if (ioe.getWrappedException() instanceof XMLStreamException) {
- throw (XMLStreamException)ioe.getWrappedException();
- }
- }
- throw new RuntimeException(e); // ????
- }
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
deleted file mode 100644
index 829acd38f4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
+++ /dev/null
@@ -1,327 +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.helper;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.tuscany.sdo.impl.DynamicDataObjectImpl;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EModelElement;
-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.EcoreUtil;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.xsd.XSDSchema;
-import org.eclipse.xsd.ecore.XSDEcoreBuilder;
-import org.eclipse.xsd.util.XSDResourceFactoryImpl;
-import org.eclipse.xsd.util.XSDResourceImpl;
-import org.xml.sax.InputSource;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * Provides access to additional information when the Type or Property is
- * defined by an XML Schema (XSD). Methods return null/false otherwise or if the
- * information is unavailable. Defines Types from an XSD.
- */
-public class XSDHelperImpl implements XSDHelper {
- protected boolean extensibleNamespaces = false;
- protected HelperContext helperContext;
- protected SDOXSDEcoreBuilder nondelegatingEcoreBuilder = null;
- protected HashMap tcclToEcoreBuilderMap = null;
- private ExtendedMetaData extendedMetaData;
-
- public XSDHelperImpl(HelperContext hc, String redefineBuiltIn, boolean extensibleNamespaces) {
- this.helperContext = hc;
- this.extensibleNamespaces = extensibleNamespaces;
- extendedMetaData = ((HelperContextImpl)helperContext).extendedMetaData;
-
- SDOXSDEcoreBuilder ecoreBuilder = createEcoreBuilder();
-
- if (extendedMetaData instanceof SDOExtendedMetaDataImpl && ((SDOExtendedMetaDataImpl)extendedMetaData)
- .getRegistry() instanceof EPackageRegistryImpl.Delegator) {
- tcclToEcoreBuilderMap = new HashMap();
- putTCCLEcoreBuilder(ecoreBuilder);
- } else {
- nondelegatingEcoreBuilder = ecoreBuilder;
- }
-
- if (redefineBuiltIn != null) { // Redefining/regenerating this built-in
- // model
- ecoreBuilder.getTargetNamespaceToEPackageMap().remove(redefineBuiltIn);
- }
- }
-
- public XSDHelperImpl(HelperContext hc) {
- this(hc, null, false);
- }
-
- /**
- * Redefine/regenerating the built-in model
- * @param redefineBuiltIn
- */
- public void setRedefineBuiltIn(String redefineBuiltIn) {
- if (redefineBuiltIn != null) {
- getEcoreBuilder().getTargetNamespaceToEPackageMap().remove(redefineBuiltIn);
- }
- }
-
- public void setExtensibleNamespaces(boolean extensibleNamespaces) {
- this.extensibleNamespaces = extensibleNamespaces;
- }
-
- protected SDOXSDEcoreBuilder createEcoreBuilder() {
- SDOXSDEcoreBuilder ecoreBuilder = new SDOXSDEcoreBuilder(extendedMetaData, extensibleNamespaces);
-
- // Add the built-in models to the targetNamespaceToEPackageMap so they
- // can't be (re)defined/overridden
- for (Iterator iter = TypeHelperImpl.getBuiltInModels().iterator(); iter.hasNext();) {
- EPackage ePackage = (EPackage)iter.next();
- ecoreBuilder.getTargetNamespaceToEPackageMap().put(ePackage.getNsURI(), ePackage);
- }
-
- return ecoreBuilder;
- }
-
- protected void putTCCLEcoreBuilder(XSDEcoreBuilder ecoreBuilder) {
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- if (tcclToEcoreBuilderMap.get(tccl) == null) {
- tcclToEcoreBuilderMap.put(tccl, ecoreBuilder);
- }
- }
-
- protected SDOXSDEcoreBuilder getEcoreBuilder() {
- if (nondelegatingEcoreBuilder != null)
- return nondelegatingEcoreBuilder;
-
- SDOXSDEcoreBuilder result = null;
- try {
- for (ClassLoader tccl = Thread.currentThread().getContextClassLoader(); tccl != null; tccl =
- tccl.getParent()) {
- result = (SDOXSDEcoreBuilder)tcclToEcoreBuilderMap.get(tccl);
- if (result != null)
- return result;
- } // for
- } catch (SecurityException exception) {
- // exception.printStackTrace();
- }
-
- result = createEcoreBuilder();
- putTCCLEcoreBuilder(result);
-
- return result;
- }
-
- public String getLocalName(Type type) {
- return extendedMetaData.getName((EClassifier)type);
- }
-
- public String getLocalName(Property property) {
- return extendedMetaData.getName((EStructuralFeature)property);
- }
-
- public String getNamespaceURI(Property property) {
- return extendedMetaData.getNamespace((EStructuralFeature)property);
- }
-
- public boolean isAttribute(Property property) {
- return extendedMetaData.getFeatureKind((EStructuralFeature)property) == ExtendedMetaData.ATTRIBUTE_FEATURE;
- }
-
- public boolean isElement(Property property) {
- return extendedMetaData.getFeatureKind((EStructuralFeature)property) == ExtendedMetaData.ELEMENT_FEATURE;
- }
-
- public boolean isMixed(Type type) {
- if (type instanceof EClass) {
- return extendedMetaData.getContentKind((EClass)type) == ExtendedMetaData.MIXED_CONTENT;
- } else {
- return false;
- }
- }
-
- public boolean isXSD(Type type) {
- return ((EModelElement)type).getEAnnotation(ExtendedMetaData.ANNOTATION_URI) != null;
- }
-
- public Property getGlobalProperty(String uri, String propertyName, boolean isElement) {
- if (isElement) {
- return (Property)extendedMetaData.getElement(uri, propertyName);
- } else {
- return (Property)extendedMetaData.getAttribute(uri, propertyName);
- }
- }
-
- public String getAppinfo(Type type, String source) {
- return getAppinfo((EModelElement)type, source);
- }
-
- public String getAppinfo(Property property, String source) {
- return getAppinfo((EModelElement)property, source);
- }
-
- protected String getAppinfo(EModelElement eModelElement, String source) {
- return (String)eModelElement.getEAnnotation(source).getDetails().get("appinfo");
- }
-
- public List /* Type */define(String xsd) {
- InputStream inputStream = new ByteArrayInputStream(xsd.getBytes());
- return define(inputStream, "*.xsd");
- }
-
- public List /* Type */define(Reader xsdReader, String schemaLocation) {
- InputSource inputSource = new InputSource(xsdReader);
- return define(inputSource, schemaLocation);
-
- }
-
- public List /* Type */define(InputStream xsdInputStream, String schemaLocation) {
- InputSource inputSource = new InputSource(xsdInputStream);
- return define(inputSource, schemaLocation);
- }
-
- protected List /* Type */define(InputSource inputSource, String schemaLocation) {
- try {
- SDOXSDEcoreBuilder ecoreBuilder = getEcoreBuilder();
- ResourceSet resourceSet = ecoreBuilder.createResourceSet();
- Resource model =
- resourceSet.createResource(URI.createURI(schemaLocation != null ? schemaLocation : "null.xsd"));
- ((XSDResourceImpl)model).load(inputSource, null);
-
- List newTypes = new ArrayList();
- for (Iterator schemaIter = model.getContents().iterator(); schemaIter.hasNext();) {
- XSDSchema schema = (XSDSchema)schemaIter.next();
-
- String targetNamespace = schema.getTargetNamespace();
- EPackage ePackage = extendedMetaData.getPackage(targetNamespace);
- if (extensibleNamespaces || ePackage == null || TypeHelperImpl.getBuiltInModels().contains(ePackage)) {
- Map targetNamespaceToEPackageMap = ecoreBuilder.getTargetNamespaceToEPackageMap();
- targetNamespaceToEPackageMap.remove(targetNamespace);
-
- Collection originalEPackages = new HashSet(targetNamespaceToEPackageMap.values());
- ecoreBuilder.generate(schema);
- Collection newEPackages = ecoreBuilder.getTargetNamespaceToEPackageMap().values();
-
- for (Iterator iter = newEPackages.iterator(); iter.hasNext();) {
- EPackage currentPackage = (EPackage)iter.next();
- if (!originalEPackages.contains(currentPackage)) {
- currentPackage.setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl());
- EcoreUtil.freeze(currentPackage);
- newTypes.addAll(currentPackage.getEClassifiers());
- }
- }
- }
- }
-
- return newTypes;
- } catch (Exception e) {
- e.printStackTrace();
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- public String generate(List /* Type */types) throws IllegalArgumentException {
- return generate(types, new Hashtable());
- }
-
- public String generate(List /* Type */types, Map /* String, String */namespaceToSchemaLocation)
- throws IllegalArgumentException {
- if (types != null && !types.isEmpty()) {
- Hashtable schemaMap = new Hashtable();
- Hashtable nsPrefixMap = new Hashtable();
- TypeTable typeTable = new TypeTable();
-
- SchemaBuilder schemaBuilder =
- new SchemaBuilder(schemaMap, nsPrefixMap, typeTable, namespaceToSchemaLocation);
-
- Iterator iterator = types.iterator();
- Type dataType = null;
-
- try {
- while (iterator.hasNext()) {
- dataType = (Type)iterator.next();
- schemaBuilder.buildSchema(dataType);
- }
-
- XSDSchema xmlSchema = null;
- iterator = schemaMap.values().iterator();
- StringWriter writer = new StringWriter();
-
- TransformerFactory transformerFactory = TransformerFactory.newInstance();
- Transformer transformer = transformerFactory.newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-
- while (iterator.hasNext()) {
- xmlSchema = (XSDSchema)iterator.next();
-
- if (xmlSchema.getElement() == null) {
- xmlSchema.updateElement();
- }
-
- transformer.transform(new DOMSource(xmlSchema.getElement().getOwnerDocument()),
- new StreamResult(writer));
- }
- writer.close();
- return writer.getBuffer().toString();
- } catch (Exception e) {
- // System.out.println("Unable to generate schema due to ..." +
- // e);
- // e.printStackTrace();
- throw new IllegalArgumentException(e.getMessage());
- }
- } else {
- // System.out.println("No SDO Types to generate schema ...");
- return "";
- }
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java
deleted file mode 100644
index b7d22c3be0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java
+++ /dev/null
@@ -1,299 +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.impl;
-
-import org.apache.tuscany.sdo.AnyTypeDataObject;
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.util.BasicSequence;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-/**
- *
- * An implementation of the model object 'EData Object Any Type'.
- *
- *
- *
- * @generated
- */
-public class DataTypeImpl extends EDataTypeImpl implements Type, org.apache.tuscany.sdo.model.Type/*, DataObject*/
-{
- /**
- *
- *
- * @generated
- */
- protected DataTypeImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- protected EClass eStaticClass()
- {
- return SDOPackage.eINSTANCE.getDataType();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public String getURI()
- {
- return getEPackage().getNsURI();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isDataType()
- {
- return true;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isOpen()
- {
- return false;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isSequenced()
- {
- return false;
- }
-
- protected List aliasNames = null;
-
- /**
- *
- *
- * @generated NOT
- */
- public List getAliasNames()
- {
- if (aliasNames == null)
- {
- aliasNames = DataObjectUtil.getAliasNames(this);
- }
- return aliasNames;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getDeclaredProperties()
- {
- return Collections.EMPTY_LIST;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getProperties()
- {
- return Collections.EMPTY_LIST;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getBaseTypes()
- {
- EDataType dataType = ExtendedMetaData.INSTANCE.getBaseType(this);
- if (dataType == null)
- {
- return Collections.EMPTY_LIST;
- }
- else
- {
- return Collections.singletonList(dataType);
- }
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Property getProperty(String propertyName)
- {
- return null;
- }
-
- public List getInstanceProperties() {
- return DataObjectUtil.getMetaObjectInstanceProperties(this);
- }
-
- public Object get(Property property) {
- return DataObjectUtil.getMetaObjectInstanceProperty(this, property);
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- // org.apache.tuscany.sdo.model.Type method implementations
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- public List getBaseType() {
- return this.getBaseTypes();
- }
-
- public List getProperty() {
- return this.getProperties();
- }
-
- public List getAliasName() {
- return this.getAliasNames();
- }
-
- public Sequence getAny() {
- throw new UnsupportedOperationException();
- }
-
- public Sequence getAnyAttribute() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isAbstract()
- {
- return false;
- }
-
- public void setAbstract(boolean value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetAbstract() {
- return false;
- }
-
- public void unsetAbstract() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public void setDataType(boolean value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public void unsetDataType() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetDataType() {
- return true;
- }
-
- public void setOpen(boolean value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public void unsetOpen() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetOpen() {
- return false;
- }
-
- public void setSequenced(boolean value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public void unsetSequenced() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetSequenced() {
- return false;
- }
-
- public void unsetName()
- {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetName()
- {
- return true;
- }
-
- public void unsetUri()
- {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSetUri()
- {
- return true;
- }
-
- public void setUri(String value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public String getUri() {
- return getURI();
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- // DataObject method implementations
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- /*
- public Object get(int propertyIndex) {
- Object ret = DataObjectUtil.get(this, propertyIndex);
- return (ret != null) ?
- ret : eGet(propertyIndex, true, false);
- }
-
- public void set(int propertyIndex, Object value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSet(int propertyIndex) {
- return eIsSet(propertyIndex);
- }
-
- public void unset(int propertyIndex) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public Object get(Property property) {
- Object ret = DataObjectUtil.get(this, ((EStructuralFeature)property).getFeatureID());
- return (ret != null) ?
- ret : eGet((EStructuralFeature)property, true, false);
- }
-
- public void set(Property property, Object value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSet(Property property) {
- return eIsSet((EStructuralFeature)property);
- }
-
- public void unset(Property property) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject getContainer() {
- return (DataObject)eContainer();
- }
-
- public Property getContainmentProperty() {
- return (Property)eContainmentFeature();
- }
-
- public Type getType() {
- return (Type)ModelPackageImpl.eINSTANCE.getType();
- }
-
- // Remaining DataObject methods are (will be) implemented as straight delegation to DataObjectUtil
-
- public Object get(String path) {
- return DataObjectUtil.get(this, path);
- }
-
- public void set(String path, Object value) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean isSet(String path) {
- return DataObjectUtil.isSet(this, path);
- }
-
- public void unset(String path) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public boolean getBoolean(String path) {
- return DataObjectUtil.getBoolean(get(path));
- }
-
- public byte getByte(String path) {
- return DataObjectUtil.getByte(get(path));
- }
-
- public char getChar(String path) {
- return DataObjectUtil.getChar(get(path));
- }
-
- public double getDouble(String path) {
- return DataObjectUtil.getDouble(get(path));
- }
-
- public float getFloat(String path) {
- return DataObjectUtil.getFloat(get(path));
- }
-
- public int getInt(String path) {
- return DataObjectUtil.getInt(get(path));
- }
-
- public long getLong(String path) {
- return DataObjectUtil.getLong(get(path));
- }
-
- public short getShort(String path) {
- return DataObjectUtil.getShort(get(path));
- }
-
- public byte[] getBytes(String path) {
- return DataObjectUtil.getBytes(get(path));
- }
-
- public BigDecimal getBigDecimal(String path) {
- return DataObjectUtil.getBigDecimal(get(path));
- }
-
- public BigInteger getBigInteger(String path) {
- return DataObjectUtil.getBigInteger(get(path));
- }
-
- public DataObject getDataObject(String path) {
- return (DataObject)get(path);
- }
-
- public Date getDate(String path) {
- return DataObjectUtil.getDate(get(path));
- }
-
- public String getString(String path) {
- return DataObjectUtil.getString(get(path));
- }
-
- public List getList(String path) {
- return (List)get(path);
- }
-
- public Sequence getSequence(String path) {
- return (Sequence)get(path);
- }
-
- public void setBoolean(String path, boolean value) {
- set(path, new Boolean(value));
- }
-
- public void setByte(String path, byte value) {
- set(path, new Byte(value));
- }
-
- public void setChar(String path, char value) {
- set(path, new Character(value));
- }
-
- public void setDouble(String path, double value) {
- set(path, new Double(value));
- }
-
- public void setFloat(String path, float value) {
- set(path, new Float(value));
- }
-
- public void setInt(String path, int value) {
- set(path, new Integer(value));
- }
-
- public void setLong(String path, long value) {
- set(path, new Long(value));
- }
-
- public void setShort(String path, short value) {
- set(path, new Short(value));
- }
-
- public void setBytes(String path, byte[] value) {
- set(path, value);
- }
-
- public void setBigDecimal(String path, BigDecimal value) {
- set(path, value);
- }
-
- public void setBigInteger(String path, BigInteger value) {
- set(path, value);
- }
-
- public void setDataObject(String path, DataObject value) {
- set(path, value);
- }
-
- public void setDate(String path, Date value) {
- set(path, value);
- }
-
- public void setString(String path, String value) {
- set(path, value);
- }
-
- public void setList(String path, List value) {
- set(path, value);
- }
-
- public boolean getBoolean(int propertyIndex) {
- return DataObjectUtil.getBoolean(this, propertyIndex);
- }
-
- public byte getByte(int propertyIndex) {
- return DataObjectUtil.getByte(this, propertyIndex);
- }
-
- public char getChar(int propertyIndex) {
- return DataObjectUtil.getChar(this, propertyIndex);
- }
-
- public double getDouble(int propertyIndex) {
- return DataObjectUtil.getDouble(this, propertyIndex);
- }
-
- public float getFloat(int propertyIndex) {
- return DataObjectUtil.getFloat(this, propertyIndex);
- }
-
- public int getInt(int propertyIndex) {
- return DataObjectUtil.getInt(this, propertyIndex);
- }
-
- public long getLong(int propertyIndex) {
- return DataObjectUtil.getLong(this, propertyIndex);
- }
-
- public short getShort(int propertyIndex) {
- return DataObjectUtil.getShort(this, propertyIndex);
- }
-
- public byte[] getBytes(int propertyIndex) {
- return DataObjectUtil.getBytes(this, propertyIndex);
- }
-
- public BigDecimal getBigDecimal(int propertyIndex) {
- return DataObjectUtil.getBigDecimal(this, propertyIndex);
- }
-
- public BigInteger getBigInteger(int propertyIndex) {
- return DataObjectUtil.getBigInteger(this, propertyIndex);
- }
-
- public DataObject getDataObject(int propertyIndex) {
- return DataObjectUtil.getDataObject(this, propertyIndex);
- }
-
- public Date getDate(int propertyIndex) {
- return DataObjectUtil.getDate(this, propertyIndex);
- }
-
- public String getString(int propertyIndex) {
- return DataObjectUtil.getString(this, propertyIndex);
- }
-
- public List getList(int propertyIndex) {
- return DataObjectUtil.getList(this, propertyIndex);
- }
-
- public Sequence getSequence(int propertyIndex) {
- return DataObjectUtil.getSequence(this, propertyIndex);
- }
-
- public void setBoolean(int propertyIndex, boolean value) {
- set(propertyIndex, new Boolean(value));
- }
-
- public void setByte(int propertyIndex, byte value) {
- set(propertyIndex, new Byte(value));
- }
-
- public void setChar(int propertyIndex, char value) {
- set(propertyIndex, new Character(value));
- }
-
- public void setDouble(int propertyIndex, double value) {
- set(propertyIndex, new Double(value));
- }
-
- public void setFloat(int propertyIndex, float value) {
- set(propertyIndex, new Float(value));
- }
-
- public void setInt(int propertyIndex, int value) {
- set(propertyIndex, new Integer(value));
- }
-
- public void setLong(int propertyIndex, long value) {
- set(propertyIndex, new Long(value));
- }
-
- public void setShort(int propertyIndex, short value) {
- set(propertyIndex, new Short(value));
- }
-
- public void setBytes(int propertyIndex, byte[] value) {
- set(propertyIndex, value);
- }
-
- public void setBigDecimal(int propertyIndex, BigDecimal value) {
- set(propertyIndex, value);
- }
-
- public void setBigInteger(int propertyIndex, BigInteger value) {
- set(propertyIndex, value);
- }
-
- public void setDataObject(int propertyIndex, DataObject value) {
- set(propertyIndex, value);
- }
-
- public void setDate(int propertyIndex, Date value) {
- set(propertyIndex, value);
- }
-
- public void setString(int propertyIndex, String value) {
- set(propertyIndex, value);
- }
-
- public void setList(int propertyIndex, List value) {
- set(propertyIndex, value);
- }
-
- public boolean getBoolean(Property property) {
- return DataObjectUtil.getBoolean(this, property);
- }
-
- public byte getByte(Property property) {
- return DataObjectUtil.getByte(this, property);
- }
-
- public char getChar(Property property) {
- return DataObjectUtil.getChar(this, property);
- }
-
- public double getDouble(Property property) {
- return DataObjectUtil.getDouble(this, property);
- }
-
- public float getFloat(Property property) {
- return DataObjectUtil.getFloat(this, property);
- }
-
- public int getInt(Property property) {
- return DataObjectUtil.getInt(this, property);
- }
-
- public long getLong(Property property) {
- return DataObjectUtil.getLong(this, property);
- }
-
- public short getShort(Property property) {
- return DataObjectUtil.getShort(this, property);
- }
-
- public byte[] getBytes(Property property) {
- return DataObjectUtil.getBytes(this, property);
- }
-
- public BigDecimal getBigDecimal(Property property) {
- return DataObjectUtil.getBigDecimal(this, property);
- }
-
- public BigInteger getBigInteger(Property property) {
- return DataObjectUtil.getBigInteger(this, property);
- }
-
- public DataObject getDataObject(Property property) {
- return DataObjectUtil.getDataObject(this, property);
- }
-
- public Date getDate(Property property) {
- return DataObjectUtil.getDate(this, property);
- }
-
- public String getString(Property property) {
- return DataObjectUtil.getString(this, property);
- }
-
- public List getList(Property property) {
- return DataObjectUtil.getList(this, property);
- }
-
- public Sequence getSequence(Property property) {
- return DataObjectUtil.getSequence(this, property);
- }
-
- public void setBoolean(Property property, boolean value) {
- set(property, new Boolean(value));
- }
-
- public void setByte(Property property, byte value) {
- set(property, new Byte(value));
- }
-
- public void setChar(Property property, char value) {
- set(property, new Character(value));
- }
-
- public void setDouble(Property property, double value) {
- set(property, new Double(value));
- }
-
- public void setFloat(Property property, float value) {
- set(property, new Float(value));
- }
-
- public void setInt(Property property, int value) {
- set(property, new Integer(value));
- }
-
- public void setLong(Property property, long value) {
- set(property, new Long(value));
- }
-
- public void setShort(Property property, short value) {
- set(property, new Short(value));
- }
-
- public void setBytes(Property property, byte[] value) {
- set(property, value);
- }
-
- public void setBigDecimal(Property property, BigDecimal value) {
- set(property, value);
- }
-
- public void setBigInteger(Property property, BigInteger value) {
- set(property, value);
- }
-
- public void setDataObject(Property property, DataObject value) {
- set(property, value);
- }
-
- public void setDate(Property property, Date value) {
- set(property, value);
- }
-
- public void setString(Property property, String value) {
- set(property, value);
- }
-
- public void setList(Property property, List value) {
- set(property, value);
- }
-
- public DataObject createDataObject(String propertyName) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(int propertyIndex) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(Property property) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(String propertyName, String namespaceURI, String typeName) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(Property property, Type type) {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public void delete() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
-
- public DataGraph getDataGraph() {
- return DataObjectUtil.getDataGraph(this);
- }
-
- public Sequence getSequence() {
- EAttribute mixedFeature = BasicExtendedMetaData.INSTANCE.getMixedFeature(eClass());
- return mixedFeature != null ? (Sequence)eGet(mixedFeature, true, false) : null;
- }
-
- public List getInstanceProperties() {
- return DataObjectUtil.getInstanceProperties(this);
- }
-
- public DataObject getRootObject() {
- return DataObjectUtil.getRootObject(this);
- }
-
- public ChangeSummary getChangeSummary() {
- // TODO: implement this method
- throw new UnsupportedOperationException();
- }
-
- public void detach() {
- throw new UnsupportedOperationException("Type is frozen and cannot be modified");
- }
- */
-
-} //DataTypeImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java
deleted file mode 100644
index 153ef18444..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java
+++ /dev/null
@@ -1,216 +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.impl;
-
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.SDOPackage;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-
-/**
- *
- * An implementation of the model object 'Dynamic Data Object'.
- * @extends EStructuralFeature.Internal.DynamicValueHolder
- *
- *
- *
- *
- * @generated
- */
-public class DynamicDataObjectImpl extends DataObjectImpl implements DataObject, EStructuralFeature.Internal.DynamicValueHolder
-{
- protected EClass eClass;
- protected Object [] eSettings;
-
- protected static final Object [] ENO_SETTINGS = new Object [0];
-
- /**
- *
- *
- * @generated
- */
- protected DynamicDataObjectImpl()
- {
- super();
- }
-
- /**
- * Creates a dynamic DataObject.
- */
- public DynamicDataObjectImpl(EClass eClass)
- {
- super();
- eSetClass(eClass);
- Property csp = ((ClassImpl)eClass).getChangeSummaryProperty();
- if (csp != null)
- {
- ChangeSummaryImpl changeSummary = (ChangeSummaryImpl)SDOFactory.eINSTANCE.createChangeSummary();
- set(csp, changeSummary);
- changeSummary.setDataObject(this);
- }
- }
-
- /**
- *
- *
- * @generated
- */
- protected EClass eStaticClass()
- {
- return SDOPackage.eINSTANCE.getDynamicDataObject();
- }
-
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- public int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature)
- {
- return eClass().getFeatureID(eStructuralFeature);
- }
-
- protected boolean eHasSettings()
- {
- return eSettings != null;
- }
-
- protected EStructuralFeature.Internal.DynamicValueHolder eSettings()
- {
- if (eSettings == null)
- {
- int size = eClass().getFeatureCount() - eStaticFeatureCount();
- eSettings = size == 0 ? ENO_SETTINGS : new Object [size];
- }
-
- return this;
- }
-
- protected EClass eDynamicClass()
- {
- return eClass;
- }
-
- public EClass eClass()
- {
- return eClass;
- }
-
- public void eSetClass(EClass eClass)
- {
- this.eClass = eClass;
- }
-
- public Object dynamicGet(int dynamicFeatureID)
- {
- return eSettings[dynamicFeatureID];
- }
-
- public void dynamicSet(int dynamicFeatureID, Object value)
- {
- eSettings[dynamicFeatureID] = value;
- }
-
- public void dynamicUnset(int dynamicFeatureID)
- {
- eSettings[dynamicFeatureID] = null;
- }
-
- public Object eDynamicGet(int featureID, boolean resolve, boolean coreType)
- {
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- return eSettingDelegate(eFeature).dynamicGet(this, eSettings(), featureID, resolve, coreType);
- }
- else
- {
- return super.eDynamicGet(featureID, resolve, coreType);
- }
- }
-
- public void eDynamicSet(int featureID, Object newValue)
- {
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- try {
- eDynamicSet(featureID, eFeature, newValue);
- } catch (IllegalArgumentException e) {
- throw new UnsupportedOperationException(e.getMessage());
- }
- }
- else
- {
- super.eDynamicSet(featureID, newValue);
- }
- }
-
- public void eDynamicUnset(int featureID)
- {
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- try {
- eDynamicUnset(featureID, eFeature);
- } catch (IllegalArgumentException e) {
- throw new UnsupportedOperationException(e.getMessage());
- }
- }
- else
- {
- super.eDynamicUnset(featureID);
- }
- }
-
- public boolean eDynamicIsSet(int featureID)
- {
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- return eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), featureID);
- }
- else
- {
- return super.eDynamicIsSet(featureID);
- }
- }
-
- /**
- * An EFactoryImpl that creates DynamicEDataObjectImpl instances.
- */
- public static class FactoryImpl extends EFactoryImpl
- {
- public FactoryImpl()
- {
- }
-
- public EObject basicCreate(EClass eClass)
- {
- return new DynamicDataObjectImpl(eClass);
- }
- }
-
-} //DynamicDataObjectImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java
deleted file mode 100644
index d9d39bad49..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.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 org.apache.tuscany.sdo.impl;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import commonj.sdo.DataObject;
-
-/**
- *
- * An implementation of the model object 'Dynamic Store Data Object'.
- *
- *
- *
- *
- * @generated
- */
-public class DynamicStoreDataObjectImpl extends StoreDataObjectImpl implements DataObject
-{
- protected EClass eClass;
-
- /**
- *
- *
- * @generated
- */
- protected DynamicStoreDataObjectImpl()
- {
- super();
- }
-
- public DynamicStoreDataObjectImpl(InternalEObject.EStore eStore)
- {
- super(eStore);
- }
-
- public DynamicStoreDataObjectImpl(EClass eClass)
- {
- super(eClass);
- }
-
- public DynamicStoreDataObjectImpl(EClass eClass, InternalEObject.EStore eStore)
- {
- super(eClass, eStore);
- }
-
- /**
- *
- *
- * @generated
- */
- protected EClass eStaticClass()
- {
- return SDOPackage.eINSTANCE.getDynamicStoreDataObject();
- }
-
- protected EClass eDynamicClass()
- {
- return eClass;
- }
-
- public EClass eClass()
- {
- return eClass;
- }
-
- public void eSetClass(EClass eClass)
- {
- this.eClass = eClass;
- }
-
-} //DynamicStoreDataObjectImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java
deleted file mode 100644
index 54f642d8cf..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java
+++ /dev/null
@@ -1,183 +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.impl;
-
-import java.util.Collections;
-import java.util.List;
-
-//import org.apache.tuscany.sdo.SDOPackage;
-
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EEnumImpl;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- *
- * An implementation of the model object 'Enum'.
- *
- *
- *
- *
- * @generated
- * @deprecated SDO doesn't support Enum types
- */
-public class EnumImpl extends EEnumImpl implements Type
-{
- /**
- *
- *
- * @generated
- */
- protected EnumImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- protected EClass eStaticClass()
- {
- return EcorePackage.eINSTANCE.getEEnum();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public String getURI()
- {
- return getEPackage().getNsURI();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isDataType()
- {
- return true;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isOpen()
- {
- return false;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isSequenced()
- {
- return false;
- }
-
- protected List aliasNames = null;
-
- /**
- *
- *
- * @generated NOT
- */
- public List getAliasNames()
- {
- if (aliasNames == null)
- {
- aliasNames = DataObjectUtil.getAliasNames(this);
- }
- return aliasNames;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getDeclaredProperties()
- {
- return Collections.EMPTY_LIST;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getProperties()
- {
- return Collections.EMPTY_LIST;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public List getBaseTypes()
- {
- return Collections.EMPTY_LIST;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Property getProperty(String propertyName)
- {
- return null;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isAbstract()
- {
- return false;
- }
-
- public List getInstanceProperties()
- {
- throw new UnsupportedOperationException();
- }
-
- public Object get(Property property)
- {
- throw new UnsupportedOperationException();
- }
-
-} //EnumTypeImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EventImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EventImpl.java
deleted file mode 100644
index 206a3c1fbf..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/EventImpl.java
+++ /dev/null
@@ -1,78 +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.impl;
-
-import org.apache.tuscany.sdo.api.Event;
-import org.eclipse.emf.common.notify.Notification;
-
-import commonj.sdo.Property;
-
-
-public class EventImpl implements Event {
-
- protected Notification emfEvent;
- protected Object notifier;
-
- public EventImpl(Notification notification)
- {
- this.emfEvent = notification;
- }
-
- public Object getNotifier()
- {
- return notifier == null ? emfEvent.getNotifier() : notifier;
- }
-
- public int getEventType()
- {
- return emfEvent.getEventType();
- }
-
-
- public Property getProperty()
- {
- return (Property)emfEvent.getFeature();
- }
-
- public Object getOldValue()
- {
- return emfEvent.getOldValue();
- }
-
- public Object getNewValue()
- {
- return emfEvent.getNewValue();
- }
-
- public boolean wasSet()
- {
- return emfEvent.wasSet();
- }
-
- public boolean isTouch()
- {
- return emfEvent.isTouch();
- }
-
- public int getPosition()
- {
- return emfEvent.getPosition();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ExtensibleDataObjectImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ExtensibleDataObjectImpl.java
deleted file mode 100644
index 93825f7873..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ExtensibleDataObjectImpl.java
+++ /dev/null
@@ -1,267 +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.impl;
-
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.SDOPackage;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-
-/**
- *
- * An implementation of the model object 'Extensible Data Object'.
- * @extends EStructuralFeature.Internal.DynamicValueHolder
- *
- *
- *
- *
- * @generated
- */
-public class ExtensibleDataObjectImpl extends DataObjectImpl implements DataObject, EStructuralFeature.Internal.DynamicValueHolder
-{
- protected EClass eClass;
- protected Object [] eSettings;
-
- protected static final Object [] ENO_SETTINGS = new Object [0];
-
- /**
- *
- *
- * @generated
- */
- protected ExtensibleDataObjectImpl()
- {
- super();
- }
-
- /**
- * Creates an extensible DataObject.
- */
- public ExtensibleDataObjectImpl(EClass eClass)
- {
- super();
- eSetClass(eClass);
- Property csp = ((ClassImpl)eClass).getChangeSummaryProperty();
- if (csp != null)
- {
- ChangeSummaryImpl changeSummary = (ChangeSummaryImpl)SDOFactory.eINSTANCE.createChangeSummary();
- set(csp, changeSummary);
- changeSummary.setDataObject(this);
- }
- }
-
- /**
- *
- *
- * @generated
- */
- protected EClass eStaticClass()
- {
- return SDOPackage.eINSTANCE.getExtensibleDataObject();
- }
-
- public int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature)
- {
- return eClass().getFeatureID(eStructuralFeature);
- }
-
- protected boolean eHasSettings()
- {
- return eSettings != null;
- }
-
- protected EStructuralFeature.Internal.DynamicValueHolder eSettings()
- {
- if (eSettings == null)
- {
- int size = eClass().getFeatureCount() - eStaticFeatureCount();
- eSettings = size == 0 ? ENO_SETTINGS : new Object [size];
- }
-
- return this;
- }
-
- protected EClass eDynamicClass()
- {
- return eClass;
- }
-
- protected boolean isDynamic()
- {
- return (eClass != null);
- }
-
- public Object get(int featureID, boolean resolve)
- {
- return get(featureID, resolve, true);
- }
-
- public Object get(int featureID, boolean resolve, boolean coreType)
- {
- Object result = null;
- if (isDynamic() || featureID >= eStaticFeatureCount())
- {
- result = super.eGet(featureID, resolve, coreType);
- }
- else
- {
- result = super.get(featureID);
- }
- return result;
- }
-
- public void set(int featureID, Object newValue)
- {
- if (isDynamic() || featureID >= eStaticFeatureCount())
- {
- super.eSet(featureID, newValue);
- }
- else
- {
- super.set(featureID, newValue);
- }
- }
-
- public void unset(int featureID)
- {
- if (isDynamic() || featureID >= eStaticFeatureCount())
- {
- super.eUnset(featureID);
- }
- else
- {
- super.unset(featureID);
- }
- }
-
- public boolean isSet(int featureID)
- {
- if (isDynamic() || featureID >= eStaticFeatureCount())
- {
- return super.eIsSet(featureID);
- }
- else
- {
- return super.isSet(featureID);
- }
- }
-
- public EClass eClass()
- {
- return isDynamic() ? eClass : eStaticClass();
- }
-
- public void eSetClass(EClass eClass)
- {
- this.eClass = eClass;
- }
-
- public Object dynamicGet(int dynamicFeatureID)
- {
- return eSettings[dynamicFeatureID];
- }
-
- public void dynamicSet(int dynamicFeatureID, Object value)
- {
- eSettings[dynamicFeatureID] = value;
- }
-
- public void dynamicUnset(int dynamicFeatureID)
- {
- eSettings[dynamicFeatureID] = null;
- }
-
- public Object eDynamicGet(int featureID, boolean resolve, boolean coreType)
- {
- int dynamicFeatureID = featureID - eStaticFeatureCount();
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- return eSettingDelegate(eFeature).dynamicGet(this, eSettings(), dynamicFeatureID, resolve, coreType);
- }
- else
- {
- return super.eDynamicGet(dynamicFeatureID, resolve, coreType);
- }
- }
-
- public void eDynamicSet(int featureID, Object newValue)
- {
- int dynamicFeatureID = featureID - eStaticFeatureCount();
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- eDynamicSet(dynamicFeatureID, eFeature, newValue);
- }
- else
- {
- super.eDynamicSet(dynamicFeatureID, newValue);
- }
- }
-
- public void eDynamicUnset(int featureID)
- {
- int dynamicFeatureID = featureID - eStaticFeatureCount();
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- eDynamicUnset(dynamicFeatureID, eFeature);
- }
- else
- {
- super.eDynamicUnset(dynamicFeatureID);
- }
- }
-
- public boolean eDynamicIsSet(int featureID)
- {
- int dynamicFeatureID = featureID - eStaticFeatureCount();
- if (featureID < eClass().getFeatureCount())
- {
- EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID);
- return eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), dynamicFeatureID);
- }
- else
- {
- return super.eDynamicIsSet(dynamicFeatureID);
- }
- }
-
- /**
- * An EFactoryImpl that creates ExtensibleDataObjectImpl instances.
- */
- public static class FactoryImpl extends EFactoryImpl
- {
- public FactoryImpl()
- {
- }
-
- public EObject basicCreate(EClass eClass)
- {
- return new ExtensibleDataObjectImpl(eClass);
- }
- }
-
-} //ExtensibleDataObjectImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java
deleted file mode 100644
index e344a6ffde..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.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 org.apache.tuscany.sdo.impl;
-
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.impl.SDOFactoryImpl.SDOEcoreFactory;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EClassImpl;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- * Base class for generated (static) SDO factories
- */
-public class FactoryBase extends EPackageImpl
-{
-
- public static final boolean IS_ATTRIBUTE = true;
-
- protected FactoryBase(String namespaceURI, String namespacePrefix)
- {
- super(new SDOEFactoryImpl());
- ecoreFactory = new SDOEcoreFactory();
-
- int index = namespacePrefix.lastIndexOf(".");
- setName(index != -1 ? namespacePrefix.substring(index + 1) : namespacePrefix);
- setNsPrefix(namespacePrefix);
-
- createResource(namespaceURI);
- setNsURI(namespaceURI);
-
- ((SDOEFactoryImpl)getEFactoryInstance()).sdoFactory = this;
- }
-
- protected FactoryBase(String namespaceURI, String namespacePrefix, String interfacePackage)
- {
- super(new SDOEFactoryImpl());
- ecoreFactory = new SDOEcoreFactory();
-
- int index = interfacePackage.lastIndexOf(".");
- setName(index != -1 ? interfacePackage.substring(index + 1) : interfacePackage);
- setNsPrefix(namespacePrefix);
-
- createResource(namespaceURI);
- setNsURI(namespaceURI);
-
- ((SDOEFactoryImpl)getEFactoryInstance()).sdoFactory = this;
- }
-
-
-
- public DataObject create(int typeNumber)
- {
- return null;
- }
-
- public Object createFromString(int typeNumber, String stringValue)
- {
- return ((SDOEFactoryImpl)getEFactoryInstance()).createFromString(typeNumber, stringValue);
- }
-
- public String convertToString(int typeNumber, Object objectValue)
- {
- return ((SDOEFactoryImpl)getEFactoryInstance()).convertToString(typeNumber, objectValue);
- }
-
- protected Type createType(boolean isDataType, int typeNumber)
- {
- if (isDataType)
- return (Type)createEDataType(typeNumber);
- else
- return (Type)createEClass(typeNumber);
- }
-
- protected void createProperty(boolean isDataType, Type containingType, int internalPropertyNumber)
- {
- if (isDataType)
- createEAttribute((EClass)containingType, internalPropertyNumber);
- else
- createEReference((EClass)containingType, internalPropertyNumber);
- }
-
- /**
- * @deprecated - use getLocalProperty instead, since getProperty causes
- * caching of structural features.
- */
- protected Property getProperty(Type type, int internalPropertyNumber)
- {
- return (Property)((EClass)type).getEAllStructuralFeatures().get(internalPropertyNumber);
- }
-
- protected Property getLocalProperty(Type type, int localPropertyIndex)
- {
- return (Property)((EClass)type).getEStructuralFeatures().get(localPropertyIndex);
- }
-
-
- protected void initializeType(Type type, Class instanceClass, String name)
- {
- initEClass((EClass)type, instanceClass, name, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- }
-
- protected void initializeType(Type type, Class instanceClass, String name, boolean isAbstract)
- {
- initEClass((EClass)type, instanceClass, name, isAbstract, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- }
-
- protected void initializeType(Type type, Class instanceClass, String name, boolean isSerializable, boolean isGenerated)
- {
- initEDataType((EDataType)type, instanceClass, name, isSerializable, isGenerated);
- }
-
- protected void initializeProperty(Property property, Type type, String name, String defaultValue, int lower, int upper, Class containerClass, boolean isReadonly, boolean isUnsettable, boolean isDerived)
- {
- initEAttribute((EAttribute)property, type != sequence ? (EClassifier)type : ecorePackage.getEFeatureMapEntry(), name, defaultValue, lower, upper, containerClass, isDerived, isDerived, !isReadonly, isUnsettable, !IS_ID, !IS_UNIQUE, isDerived, IS_ORDERED);
- }
-
- protected void initializeProperty(Property property, Type type, String name, String defaultValue, int lower, int upper, Class containerClass, boolean isReadonly, boolean isUnsettable, boolean isDerived, boolean isComposite, Property oppositeProperty)
- {
- initEReference((EReference)property, (EClassifier)type, (EReference)oppositeProperty, name, defaultValue, lower, upper, containerClass, isDerived, isDerived, !isReadonly, isComposite, !isComposite /*resolve*/, isUnsettable, IS_UNIQUE, isDerived, IS_ORDERED);
- }
-
- protected void initXSD()
- {
- createDocumentRoot();
- }
-
- protected void addXSDMapping(String[] xsdMappings, String annotationSource)
- {
- addAnnotation((ENamedElement)this, annotationSource, xsdMappings);
- }
-
- protected void addXSDMapping(Type type, String[] xsdMappings)
- {
- addAnnotation((ENamedElement)type, ANNOTATION_SOURCE, xsdMappings);
- }
-
- protected void addXSDMapping(Property property, String[] xsdMappings)
- {
- addAnnotation((ENamedElement)property, ANNOTATION_SOURCE, xsdMappings);
- }
-
- protected void setInstanceProperty(Type type, String namespaceURI, String propertyName, String propertyValue)
- {
- setInstanceProperty((ENamedElement)type, namespaceURI, propertyName, propertyValue);
- }
-
- protected void setInstanceProperty(Property property, String namespaceURI, String propertyName, String propertyValue)
- {
- setInstanceProperty((ENamedElement)property, namespaceURI, propertyName, propertyValue);
- }
-
- private void setInstanceProperty(ENamedElement eNamedElement, String namespaceURI, String propertyName, String propertyValue)
- {
- EAnnotation annotation = eNamedElement.getEAnnotation(namespaceURI);
- if (annotation == null)
- {
- addAnnotation(eNamedElement, namespaceURI, new String[]{propertyName, propertyValue});
- } else
- {
- annotation.getDetails().put(propertyName, propertyValue);
- }
- }
-
- protected Property createGlobalProperty(String name, Type type, String[] xsdMappings)
- {
- return createGlobalProperty(name, type, xsdMappings, false);
- }
-
- protected Property createGlobalProperty(String name, Type type, String[] xsdMappings, boolean asAttribute)
- {
- return createGlobalProperty(name, type, xsdMappings, asAttribute, ANNOTATION_SOURCE);
- }
-
- protected Property createGlobalProperty(String name, Type type, String[] xsdMappings, boolean asAttribute, String annotationSource)
- {
- int propertyNumber = documentRootEClass.getEStructuralFeatures().size();
-
- EStructuralFeature globalProperty;
- if(asAttribute) {
- createEAttribute(documentRootEClass, propertyNumber);
- EAttribute gatt = (EAttribute)documentRootEClass.getEStructuralFeatures().get(propertyNumber);
- initEAttribute(gatt, (EDataType)type, name, null, 0, -2, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- globalProperty = gatt;
- } else {
- createEReference(documentRootEClass, propertyNumber);
- EReference gref = (EReference)documentRootEClass.getEStructuralFeatures().get(propertyNumber);
- initEReference(gref, (EClass)type, null, name, null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- globalProperty = gref;
- }
- addAnnotation((ENamedElement)globalProperty, annotationSource, xsdMappings);
- return (Property) globalProperty;
- }
-
- private static final Type sequence = SDOFactory.eINSTANCE.createDataType(); // dummy type
-
- protected Type getSequence()
- {
- return sequence;
- }
-
- protected void addSuperType(Type subType, Type superType)
- {
- ((EClass)subType).getESuperTypes().add((EClass)superType);
- }
-
- /***
- * @param namespaceURI
- * @return Static factory (from the global scope) for the provided URI
- *
- * @deprecated - Use of the global scope is no longer encouraged. This method uses the
- * global scope for retrieving the URI's factory. Instead, it is now possible to simply
- * access SomeFactoryInterface.INSTANCE object directly.
- *
- */
- public static Object getStaticFactory(String namespaceURI)
- {
- EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(namespaceURI);
- //return (FactoryBase)ePackage;
- return ePackage instanceof FactoryBase ? (Object)ePackage : (Object)ePackage.getEFactoryInstance();
- }
-
- // private EMF-specific methods
-
- private static class SDOEFactoryImpl extends DynamicDataObjectImpl.FactoryImpl
- {
- protected FactoryBase sdoFactory;
-
- public SDOEFactoryImpl()
- {
- super();
- }
-
- public EObject create(EClass eClass)
- {
- DataObject result = sdoFactory.create(eClass.getClassifierID());
- if (result == null) {
- if (eClass.isAbstract()) {
- Class instanceClass = eClass.getInstanceClass();
- try {
- Class concreteInstanceClass = DataObjectUtil.getImplementationClass(instanceClass, true);
- return (EObject)concreteInstanceClass.newInstance();
- }
- catch (Exception e)
- {
- //System.out.println("Error: " + e);
- }
- }
- return super.create(eClass);
- }
- return (EObject)result;
- }
-
- public Object createFromString(EDataType eDataType, String stringValue)
- {
- return sdoFactory.createFromString(eDataType.getClassifierID(), stringValue);
- }
-
- public String convertToString(EDataType eDataType, Object objectValue)
- {
- return sdoFactory.convertToString(eDataType.getClassifierID(), objectValue);
- }
-
- protected Object createFromString(int typeNumber, String stringValue)
- {
- return super.createFromString((EDataType)sdoFactory.getEClassifiers().get(typeNumber), stringValue);
- }
-
- protected String convertToString(int typeNumber, Object objectValue)
- {
- return super.convertToString((EDataType)sdoFactory.getEClassifiers().get(typeNumber), objectValue);
- }
- }
-
- private static final int DOCUMENT_ROOT = 0;
- private static final int DOCUMENT_ROOT__MIXED = 0;
- private static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
- private static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
- private static final String ANNOTATION_SOURCE = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
- private EClass documentRootEClass = null;
-
- private void createDocumentRoot()
- {
- documentRootEClass = ecoreFactory.createEClass();
- ((EClassImpl)documentRootEClass).setClassifierID(DOCUMENT_ROOT);
- getEClassifiers().add(DOCUMENT_ROOT, documentRootEClass);
-
- createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
- createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
- createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
-
- initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
- initEAttribute((EAttribute)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__MIXED), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference((EReference)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__XMLNS_PREFIX_MAP), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference((EReference)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__XSI_SCHEMA_LOCATION), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- addAnnotation
- (documentRootEClass,
- ANNOTATION_SOURCE,
- new String[]
- {
- "name", "",
- "kind", "mixed"
- });
- addAnnotation
- ((EAttribute)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__MIXED),
- ANNOTATION_SOURCE,
- new String[]
- {
- "kind", "elementWildcard",
- "name", ":mixed"
- });
- addAnnotation
- ((EReference)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__XMLNS_PREFIX_MAP),
- ANNOTATION_SOURCE,
- new String[]
- {
- "kind", "attribute",
- "name", "xmlns:prefix"
- });
- addAnnotation
- ((EReference)documentRootEClass.getEStructuralFeatures().get(DOCUMENT_ROOT__XSI_SCHEMA_LOCATION),
- ANNOTATION_SOURCE,
- new String[]
- {
- "kind", "attribute",
- "name", "xsi:schemaLocation"
- });
- }
-
- /**
- * Initialize SDO runtime.
- */
- static
- {
- DataObjectUtil.initRuntime();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ListenerBase.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ListenerBase.java
deleted file mode 100644
index 986628bbc9..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ListenerBase.java
+++ /dev/null
@@ -1,33 +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.impl;
-
-import org.apache.tuscany.sdo.api.Event;
-import org.apache.tuscany.sdo.api.EventListener;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-
-public abstract class ListenerBase extends AdapterImpl implements EventListener {
-
- public void notifyChanged(Notification msg) {
- Event e = new EventImpl(msg);
- eventNotification(e);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
deleted file mode 100644
index 19fb89bbd3..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java
+++ /dev/null
@@ -1,785 +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.impl;
-
-import java.util.List;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.apache.tuscany.sdo.util.SDOUtil;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.EReferenceImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-/**
- *
- * An implementation of the model object 'Reference'.
- *
- *
- *
- *
- * @generated
- */
-public class ReferenceImpl extends EReferenceImpl implements Property,/* DataObject,*/ org.apache.tuscany.sdo.model.Property
-{
- /**
- *
- *
- * @generated
- */
- protected ReferenceImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- protected EClass eStaticClass()
- {
- return SDOPackage.eINSTANCE.getReference();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Object getDefault()
- {
- return getDefaultValue();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public boolean isReadOnly()
- {
- //return "true".equals(EcoreUtil.getAnnotation(this, "commonj.sdo", "readOnly"));
- return !isChangeable(); //TODO semantics don't exactly match?
- }
-
- /**
- * Single-valued SDO properties behave as EMF unsettable, multi-valued properties as EMF !unsettable
- */
- public boolean isUnsettable()
- {
- return !isMany();
- }
-
- protected List aliasNames = null;
-
- /**
- *
- *
- * @generated NOT
- */
- public List getAliasNames()
- {
- if (aliasNames == null)
- {
- aliasNames = DataObjectUtil.getAliasNames(this);
- }
- return aliasNames;
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Type getType()
- {
- return (Type)getEType();
- /*
- EClassifier eType = getEType();
- //FB More temporary hacks
- return eType instanceof Type ? (Type)getEType() : null;
- */
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Type getContainingType()
- {
- return (Type)getEContainingClass();
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public Property getOpposite()
- {
- return (Property)getEOpposite();
- }
-
- public boolean isNullable()
- {
- String isNillable = EcoreUtil.getAnnotation(this, ExtendedMetaData.ANNOTATION_URI, "nillable");
- return isNillable != null && "true".equals(isNillable);
- }
-
- public boolean isOpenContent()
- {
- return SDOUtil.isDocumentRoot(getContainingType());
- }
-
- public List getInstanceProperties() {
- return DataObjectUtil.getMetaObjectInstanceProperties(this);
- }
-
- public Object get(Property property) {
- return DataObjectUtil.getMetaObjectInstanceProperty(this, property);
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- // org.apache.tuscany.sdo.model.Property methods
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- public List getAliasName() {
- return this.getAliasNames();
- }
-
- public Sequence getAny() {
- throw new UnsupportedOperationException();
- }
-
- public void setMany(boolean value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public void unsetMany() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetMany() {
- return isMany();
- }
-
- public void setReadOnly(boolean value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public void unsetReadOnly() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetReadOnly() {
- return isReadOnly();
- }
-
- public org.apache.tuscany.sdo.model.Type getType_() {
- return (org.apache.tuscany.sdo.model.Type)getType();
- }
-
- public void setType(org.apache.tuscany.sdo.model.Type value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public Sequence getAnyAttribute() {
- throw new UnsupportedOperationException();
- }
-
- public String getDefault_() {
- return (String) this.getDefault();
- }
-
- public void setDefault_(String value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public org.apache.tuscany.sdo.model.Property getOpposite_() {
- return (org.apache.tuscany.sdo.model.Property) getOpposite();
- }
-
- public void setOpposite_(org.apache.tuscany.sdo.model.Property value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public void unsetContainment() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetContainment() {
- return isContainment();
- }
-
- public void setNullable(boolean value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public void unsetNullable() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetNullable() {
- return isNullable();
- }
-
- public void unsetName()
- {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetName()
- {
- return true;
- }
-
- public void unsetOpposite()
- {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetOpposite()
- {
- return getOpposite() != null;
- }
-
- public void unsetType()
- {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetType()
- {
- return true;
- }
-
- public void unsetDefault()
- {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSetDefault()
- {
- return getDefault() != null;
- }
-
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- // DataObject method implementations
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- /*
- public Object get(int propertyIndex) {
- return DataObjectUtil.get(this, propertyIndex);
- }
-
- public void set(int propertyIndex, Object value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSet(int propertyIndex) {
- return DataObjectUtil.isSet(this, propertyIndex);
- }
-
- public void unset(int propertyIndex) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public Object get(Property property) {
- return DataObjectUtil.get(this, ((EStructuralFeature)property).getFeatureID());
- }
-
- public void set(Property property, Object value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSet(Property property) {
- return DataObjectUtil.isSet(this, ((EStructuralFeature)property).getFeatureID());
- }
-
- public void unset(Property property) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject getContainer() {
- return (DataObject)eContainer();
- }
-
- public Property getContainmentProperty() {
- return (Property)eContainmentFeature();
- }
-
- // Remaining DataObject methods are (will be) implemented as straight delegation to DataObjectUtil
-
- public Object get(String path) {
- return DataObjectUtil.get(this, path);
- }
-
- public void set(String path, Object value) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean isSet(String path) {
- return DataObjectUtil.isSet(this, path);
- }
-
- public void unset(String path) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public boolean getBoolean(String path) {
- return DataObjectUtil.getBoolean(get(path));
- }
-
- public byte getByte(String path) {
- return DataObjectUtil.getByte(get(path));
- }
-
- public char getChar(String path) {
- return DataObjectUtil.getChar(get(path));
- }
-
- public double getDouble(String path) {
- return DataObjectUtil.getDouble(get(path));
- }
-
- public float getFloat(String path) {
- return DataObjectUtil.getFloat(get(path));
- }
-
- public int getInt(String path) {
- return DataObjectUtil.getInt(get(path));
- }
-
- public long getLong(String path) {
- return DataObjectUtil.getLong(get(path));
- }
-
- public short getShort(String path) {
- return DataObjectUtil.getShort(get(path));
- }
-
- public byte[] getBytes(String path) {
- return DataObjectUtil.getBytes(get(path));
- }
-
- public BigDecimal getBigDecimal(String path) {
- return DataObjectUtil.getBigDecimal(get(path));
- }
-
- public BigInteger getBigInteger(String path) {
- return DataObjectUtil.getBigInteger(get(path));
- }
-
- public DataObject getDataObject(String path) {
- return (DataObject)get(path);
- }
-
- public Date getDate(String path) {
- return DataObjectUtil.getDate(get(path));
- }
-
- public String getString(String path) {
- return DataObjectUtil.getString(get(path));
- }
-
- public List getList(String path) {
- return (List)get(path);
- }
-
- public Sequence getSequence(String path) {
- return (Sequence)get(path);
- }
-
- public void setBoolean(String path, boolean value) {
- set(path, new Boolean(value));
- }
-
- public void setByte(String path, byte value) {
- set(path, new Byte(value));
- }
-
- public void setChar(String path, char value) {
- set(path, new Character(value));
- }
-
- public void setDouble(String path, double value) {
- set(path, new Double(value));
- }
-
- public void setFloat(String path, float value) {
- set(path, new Float(value));
- }
-
- public void setInt(String path, int value) {
- set(path, new Integer(value));
- }
-
- public void setLong(String path, long value) {
- set(path, new Long(value));
- }
-
- public void setShort(String path, short value) {
- set(path, new Short(value));
- }
-
- public void setBytes(String path, byte[] value) {
- set(path, value);
- }
-
- public void setBigDecimal(String path, BigDecimal value) {
- set(path, value);
- }
-
- public void setBigInteger(String path, BigInteger value) {
- set(path, value);
- }
-
- public void setDataObject(String path, DataObject value) {
- set(path, value);
- }
-
- public void setDate(String path, Date value) {
- set(path, value);
- }
-
- public void setString(String path, String value) {
- set(path, value);
- }
-
- public void setList(String path, List value) {
- set(path, value);
- }
-
- public boolean getBoolean(int propertyIndex) {
- return DataObjectUtil.getBoolean(this, propertyIndex);
- }
-
- public byte getByte(int propertyIndex) {
- return DataObjectUtil.getByte(this, propertyIndex);
- }
-
- public char getChar(int propertyIndex) {
- return DataObjectUtil.getChar(this, propertyIndex);
- }
-
- public double getDouble(int propertyIndex) {
- return DataObjectUtil.getDouble(this, propertyIndex);
- }
-
- public float getFloat(int propertyIndex) {
- return DataObjectUtil.getFloat(this, propertyIndex);
- }
-
- public int getInt(int propertyIndex) {
- return DataObjectUtil.getInt(this, propertyIndex);
- }
-
- public long getLong(int propertyIndex) {
- return DataObjectUtil.getLong(this, propertyIndex);
- }
-
- public short getShort(int propertyIndex) {
- return DataObjectUtil.getShort(this, propertyIndex);
- }
-
- public byte[] getBytes(int propertyIndex) {
- return DataObjectUtil.getBytes(this, propertyIndex);
- }
-
- public BigDecimal getBigDecimal(int propertyIndex) {
- return DataObjectUtil.getBigDecimal(this, propertyIndex);
- }
-
- public BigInteger getBigInteger(int propertyIndex) {
- return DataObjectUtil.getBigInteger(this, propertyIndex);
- }
-
- public DataObject getDataObject(int propertyIndex) {
- return DataObjectUtil.getDataObject(this, propertyIndex);
- }
-
- public Date getDate(int propertyIndex) {
- return DataObjectUtil.getDate(this, propertyIndex);
- }
-
- public String getString(int propertyIndex) {
- return DataObjectUtil.getString(this, propertyIndex);
- }
-
- public List getList(int propertyIndex) {
- return DataObjectUtil.getList(this, propertyIndex);
- }
-
- public Sequence getSequence(int propertyIndex) {
- return DataObjectUtil.getSequence(this, propertyIndex);
- }
-
- public void setBoolean(int propertyIndex, boolean value) {
- set(propertyIndex, new Boolean(value));
- }
-
- public void setByte(int propertyIndex, byte value) {
- set(propertyIndex, new Byte(value));
- }
-
- public void setChar(int propertyIndex, char value) {
- set(propertyIndex, new Character(value));
- }
-
- public void setDouble(int propertyIndex, double value) {
- set(propertyIndex, new Double(value));
- }
-
- public void setFloat(int propertyIndex, float value) {
- set(propertyIndex, new Float(value));
- }
-
- public void setInt(int propertyIndex, int value) {
- set(propertyIndex, new Integer(value));
- }
-
- public void setLong(int propertyIndex, long value) {
- set(propertyIndex, new Long(value));
- }
-
- public void setShort(int propertyIndex, short value) {
- set(propertyIndex, new Short(value));
- }
-
- public void setBytes(int propertyIndex, byte[] value) {
- set(propertyIndex, value);
- }
-
- public void setBigDecimal(int propertyIndex, BigDecimal value) {
- set(propertyIndex, value);
- }
-
- public void setBigInteger(int propertyIndex, BigInteger value) {
- set(propertyIndex, value);
- }
-
- public void setDataObject(int propertyIndex, DataObject value) {
- set(propertyIndex, value);
- }
-
- public void setDate(int propertyIndex, Date value) {
- set(propertyIndex, value);
- }
-
- public void setString(int propertyIndex, String value) {
- set(propertyIndex, value);
- }
-
- public void setList(int propertyIndex, List value) {
- set(propertyIndex, value);
- }
-
- public boolean getBoolean(Property property) {
- return DataObjectUtil.getBoolean(this, property);
- }
-
- public byte getByte(Property property) {
- return DataObjectUtil.getByte(this, property);
- }
-
- public char getChar(Property property) {
- return DataObjectUtil.getChar(this, property);
- }
-
- public double getDouble(Property property) {
- return DataObjectUtil.getDouble(this, property);
- }
-
- public float getFloat(Property property) {
- return DataObjectUtil.getFloat(this, property);
- }
-
- public int getInt(Property property) {
- return DataObjectUtil.getInt(this, property);
- }
-
- public long getLong(Property property) {
- return DataObjectUtil.getLong(this, property);
- }
-
- public short getShort(Property property) {
- return DataObjectUtil.getShort(this, property);
- }
-
- public byte[] getBytes(Property property) {
- return DataObjectUtil.getBytes(this, property);
- }
-
- public BigDecimal getBigDecimal(Property property) {
- return DataObjectUtil.getBigDecimal(this, property);
- }
-
- public BigInteger getBigInteger(Property property) {
- return DataObjectUtil.getBigInteger(this, property);
- }
-
- public DataObject getDataObject(Property property) {
- return DataObjectUtil.getDataObject(this, property);
- }
-
- public Date getDate(Property property) {
- return DataObjectUtil.getDate(this, property);
- }
-
- public String getString(Property property) {
- return DataObjectUtil.getString(this, property);
- }
-
- public List getList(Property property) {
- return DataObjectUtil.getList(this, property);
- }
-
- public Sequence getSequence(Property property) {
- return DataObjectUtil.getSequence(this, property);
- }
-
- public void setBoolean(Property property, boolean value) {
- set(property, new Boolean(value));
- }
-
- public void setByte(Property property, byte value) {
- set(property, new Byte(value));
- }
-
- public void setChar(Property property, char value) {
- set(property, new Character(value));
- }
-
- public void setDouble(Property property, double value) {
- set(property, new Double(value));
- }
-
- public void setFloat(Property property, float value) {
- set(property, new Float(value));
- }
-
- public void setInt(Property property, int value) {
- set(property, new Integer(value));
- }
-
- public void setLong(Property property, long value) {
- set(property, new Long(value));
- }
-
- public void setShort(Property property, short value) {
- set(property, new Short(value));
- }
-
- public void setBytes(Property property, byte[] value) {
- set(property, value);
- }
-
- public void setBigDecimal(Property property, BigDecimal value) {
- set(property, value);
- }
-
- public void setBigInteger(Property property, BigInteger value) {
- set(property, value);
- }
-
- public void setDataObject(Property property, DataObject value) {
- set(property, value);
- }
-
- public void setDate(Property property, Date value) {
- set(property, value);
- }
-
- public void setString(Property property, String value) {
- set(property, value);
- }
-
- public void setList(Property property, List value) {
- set(property, value);
- }
-
- public DataObject createDataObject(String propertyName) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(int propertyIndex) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(Property property) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(String propertyName, String namespaceURI, String typeName) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataObject createDataObject(Property property, Type type) {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public void delete() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- }
-
- public DataGraph getDataGraph() {
- return DataObjectUtil.getDataGraph(this);
- }
-
- public Sequence getSequence() {
- EAttribute mixedFeature = BasicExtendedMetaData.INSTANCE.getMixedFeature(eClass());
- return mixedFeature != null ? (Sequence)eGet(mixedFeature, true, false) : null;
- }
-
- public List getInstanceProperties() {
- return DataObjectUtil.getInstanceProperties(this);
- }
-
- public DataObject getRootObject() {
- return DataObjectUtil.getRootObject(this);
- }
-
- public ChangeSummary getChangeSummary() {
- // TODO: implement this method
- throw new UnsupportedOperationException();
- }
-
- public void detach() {
- throw new UnsupportedOperationException("Property is frozen and cannot be modified");
- //DataObjectUtil.detach(this);
- }
-
- public Property getProperty(String propertyName) {
- return DataObjectUtil.getProperty(this, propertyName);
- }
- */
-
-} //ReferenceImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
deleted file mode 100644
index bb0f5ccd2a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java
+++ /dev/null
@@ -1,337 +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.impl;
-
-import org.apache.tuscany.sdo.AnyTypeDataObject;
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.SimpleAnyTypeDataObject;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.impl.EcoreFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- *
- * An implementation of the model Factory.
- *
- * @generated
- */
-public class SDOFactoryImpl extends EFactoryImpl implements SDOFactory
-{
- /**
- * Creates the default factory implementation.
- *
- *
- * @generated NOT
- */
- public static SDOFactory init()
- {
- try
- {
- SDOFactory theSDOFactory = (SDOFactory)EPackage.Registry.INSTANCE.getEFactory(SDOPackage.eNS_URI);
- if (theSDOFactory != null)
- {
- return theSDOFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new SDOFactoryImpl();
- }
-
- public static class SDOEcoreFactory extends EcoreFactoryImpl
- {
- public EClass createEClass() { return new ClassImpl(); }
- public EDataType createEDataType() { return new DataTypeImpl(); }
- //public EEnum createEEnum() { return new EnumImpl(); }
- public EAttribute createEAttribute() { return new AttributeImpl(); }
- public EReference createEReference() { return new ReferenceImpl(); }
-
-// public EFactory createEFactory()
-// {
-// EFactoryImpl eFactory = new EFactoryImpl() { OVERRIDE basicCreate(); } // TODO think about doing this
-// return eFactory;
-// }
- }
-
- /**
- * Creates an instance of the factory.
- *
- *
- * @generated
- */
- public SDOFactoryImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated
- */
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case SDOPackage.CHANGE_SUMMARY: return (EObject)createChangeSummary();
- case SDOPackage.CHANGE_SUMMARY_SETTING: return (EObject)createChangeSummarySetting();
- case SDOPackage.DATA_GRAPH: return (EObject)createDataGraph();
- case SDOPackage.ANY_TYPE_DATA_OBJECT: return createAnyTypeDataObject();
- case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT: return createSimpleAnyTypeDataObject();
- case SDOPackage.CLASS: return (EObject)createClass();
- case SDOPackage.DATA_TYPE: return (EObject)createDataType();
- case SDOPackage.ATTRIBUTE: return (EObject)createAttribute();
- case SDOPackage.REFERENCE: return (EObject)createReference();
- case SDOPackage.ENUM: return (EObject)createEnum();
- case SDOPackage.DYNAMIC_DATA_OBJECT: return (EObject)createDynamicDataObject();
- case SDOPackage.STORE_DATA_OBJECT: return (EObject)createStoreDataObject();
- case SDOPackage.DYNAMIC_STORE_DATA_OBJECT: return (EObject)createDynamicStoreDataObject();
- case SDOPackage.EXTENSIBLE_DATA_OBJECT: return (EObject)createExtensibleDataObject();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public ChangeSummary createChangeSummary()
- {
- ChangeSummaryImpl changeSummary = new ChangeSummaryImpl();
- return changeSummary;
- }
-
- /**
- *
- *
- * @generated
- */
- public ChangeSummary.Setting createChangeSummarySetting()
- {
- ChangeSummarySettingImpl changeSummarySetting = new ChangeSummarySettingImpl();
- return changeSummarySetting;
- }
-
- /**
- *
- *
- * @generated
- */
- public DataGraph createDataGraph()
- {
- DataGraphImpl dataGraph = new DataGraphImpl();
- return dataGraph;
- }
-
- /**
- *
- *
- * @generated
- */
- public AnyTypeDataObject createAnyTypeDataObject()
- {
- AnyTypeDataObjectImpl anyTypeDataObject = new AnyTypeDataObjectImpl();
- return anyTypeDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public SimpleAnyTypeDataObject createSimpleAnyTypeDataObject()
- {
- SimpleAnyTypeDataObjectImpl simpleAnyTypeDataObject = new SimpleAnyTypeDataObjectImpl();
- return simpleAnyTypeDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public Type createClass()
- {
- ClassImpl class_ = new ClassImpl();
- return class_;
- }
-
- /**
- *
- *
- * @generated
- */
- public Type createDataType()
- {
- DataTypeImpl dataType = new DataTypeImpl();
- return dataType;
- }
-
- /**
- *
- *
- * @generated
- */
- public Property createAttribute()
- {
- AttributeImpl attribute = new AttributeImpl();
- return attribute;
- }
-
- /**
- *
- *
- * @generated
- */
- public Property createReference()
- {
- ReferenceImpl reference = new ReferenceImpl();
- return reference;
- }
-
- /**
- *
- *
- * @generated
- */
- public Type createEnum()
- {
- EnumImpl enum_ = new EnumImpl();
- return enum_;
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject createDynamicDataObject()
- {
- DynamicDataObjectImpl dynamicDataObject = new DynamicDataObjectImpl();
- return dynamicDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject createStoreDataObject()
- {
- StoreDataObjectImpl storeDataObject = new StoreDataObjectImpl();
- return storeDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject createDynamicStoreDataObject()
- {
- DynamicStoreDataObjectImpl dynamicStoreDataObject = new DynamicStoreDataObjectImpl();
- return dynamicStoreDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject createExtensibleDataObject()
- {
- ExtensibleDataObjectImpl extensibleDataObject = new ExtensibleDataObjectImpl();
- return extensibleDataObject;
- }
-
- /**
- *
- *
- * @generated
- */
- public SDOPackage getSDOPackage()
- {
- return (SDOPackage)getEPackage();
- }
-
- /**
- *
- *
- * @deprecated
- * @generated
- */
- public static SDOPackage getPackage()
- {
- return SDOPackage.eINSTANCE;
- }
-
- public ChangeSummary.Setting createChangeSummarySetting(EStructuralFeature eStructuralFeature, Object value, boolean isSet)
- {
- ChangeSummarySettingImpl eChangeSummarySetting = new ChangeSummarySettingImpl(eStructuralFeature, value, isSet);
- return eChangeSummarySetting;
- }
-
-} //SDOFactoryImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java
deleted file mode 100644
index 25bdab16fe..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java
+++ /dev/null
@@ -1,2207 +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.impl;
-
-import java.io.ObjectStreamException;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.tuscany.sdo.AnyTypeDataObject;
-import org.apache.tuscany.sdo.SDOFactory;
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.SimpleAnyTypeDataObject;
-import org.apache.tuscany.sdo.impl.SDOFactoryImpl.SDOEcoreFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EOperation;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.change.ChangePackage;
-import org.eclipse.emf.ecore.change.impl.ChangePackageImpl;
-import org.eclipse.emf.ecore.impl.EClassImpl;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.impl.EcorePackageImpl;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-/**
- *
- * An implementation of the model Package.
- *
- * @generated
- */
-public class SDOPackageImpl extends EPackageImpl implements SDOPackage
-{
- /**
- *
- *
- * @generated
- */
- private EClass changeSummaryEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass changeSummarySettingEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass dataGraphEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass dataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass propertyEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass sequenceEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass typeEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass anyTypeDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass simpleAnyTypeDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass classEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass dataTypeEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass attributeEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass referenceEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass enumEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass dynamicDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass storeDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass dynamicStoreDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass extensibleDataObjectEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EDataType eJavaListEDataType = null;
-
- /**
- *
- *
- * @generated
- */
- private EDataType eObjectStreamExceptionEDataType = null;
-
- /**
- * Creates an instance of the model Package, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- *
Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- *
- *
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.apache.tuscany.sdo.SDOPackage#eNS_URI
- * @see #init()
- * @generated NOT
- */
- private SDOPackageImpl()
- {
- super(eNS_URI, SDOFactory.eINSTANCE);
- ecoreFactory = new SDOEcoreFactory();
- }
-
- /**
- *
- *
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the Package for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- *
Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- *
{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getAnyAttribute Any Attribute}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface BaseDataGraphType extends Serializable
-{
- /**
- * Returns the value of the 'Models' containment reference.
- *
- *
- * If the meaning of the 'Models' containment reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Models' containment reference.
- * @see #isSetModels()
- * @see #unsetModels()
- * @see #setModels(ModelsType)
- * @generated
- */
- ModelsType getModels();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels Models}' containment reference.
- *
- *
- * @param value the new value of the 'Models' containment reference.
- * @see #isSetModels()
- * @see #unsetModels()
- * @see #getModels()
- * @generated
- */
- void setModels(ModelsType value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels Models}' containment reference.
- *
- *
- * @see #isSetModels()
- * @see #getModels()
- * @see #setModels(ModelsType)
- * @generated
- */
- void unsetModels();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels Models}' containment reference is set.
- *
- *
- * @return whether the value of the 'Models' containment reference is set.
- * @see #unsetModels()
- * @see #getModels()
- * @see #setModels(ModelsType)
- * @generated
- */
- boolean isSetModels();
-
- /**
- * Returns the value of the 'Xsd' containment reference.
- *
- *
- * If the meaning of the 'Xsd' containment reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Xsd' containment reference.
- * @see #isSetXsd()
- * @see #unsetXsd()
- * @see #setXsd(XSDType)
- * @generated
- */
- XSDType getXsd();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd Xsd}' containment reference.
- *
- *
- * @param value the new value of the 'Xsd' containment reference.
- * @see #isSetXsd()
- * @see #unsetXsd()
- * @see #getXsd()
- * @generated
- */
- void setXsd(XSDType value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd Xsd}' containment reference.
- *
- *
- * @see #isSetXsd()
- * @see #getXsd()
- * @see #setXsd(XSDType)
- * @generated
- */
- void unsetXsd();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd Xsd}' containment reference is set.
- *
- *
- * @return whether the value of the 'Xsd' containment reference is set.
- * @see #unsetXsd()
- * @see #getXsd()
- * @see #setXsd(XSDType)
- * @generated
- */
- boolean isSetXsd();
-
- /**
- * Returns the value of the 'Change Summary' attribute.
- *
- *
- * If the meaning of the 'Change Summary' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Change Summary' attribute.
- * @see #isSetChangeSummary()
- * @see #unsetChangeSummary()
- * @see #setChangeSummary(ChangeSummary)
- * @generated
- */
- ChangeSummary getChangeSummary();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}' attribute.
- *
- *
- * @param value the new value of the 'Change Summary' attribute.
- * @see #isSetChangeSummary()
- * @see #unsetChangeSummary()
- * @see #getChangeSummary()
- * @generated
- */
- void setChangeSummary(ChangeSummary value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}' attribute.
- *
- *
- * @see #isSetChangeSummary()
- * @see #getChangeSummary()
- * @see #setChangeSummary(ChangeSummary)
- * @generated
- */
- void unsetChangeSummary();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}' attribute is set.
- *
- *
- * @return whether the value of the 'Change Summary' attribute is set.
- * @see #unsetChangeSummary()
- * @see #getChangeSummary()
- * @see #setChangeSummary(ChangeSummary)
- * @generated
- */
- boolean isSetChangeSummary();
-
- /**
- * Returns the value of the 'Any Attribute' attribute list.
- *
- *
- * If the meaning of the 'Any Attribute' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any Attribute' attribute list.
- * @generated
- */
- Sequence getAnyAttribute();
-
-} // BaseDataGraphType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java
deleted file mode 100644
index 2c83244789..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.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.model;
-
-import commonj.sdo.Sequence;
-
-/**
- *
- * A representation of the model object 'Data Graph Type'.
- *
- *
- *
- *
- *
- * @generated
- */
-public interface DataGraphType extends BaseDataGraphType
-{
- /**
- * Returns the value of the 'Any' attribute list.
- *
- *
- * If the meaning of the 'Any' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any' attribute list.
- * @generated
- */
- Sequence getAny();
-
-} // DataGraphType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java
deleted file mode 100644
index 9e3b2a1386..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.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 org.apache.tuscany.sdo.model;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'Data Object'.
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface DataObject extends Serializable
-{
-} // DataObject
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java
deleted file mode 100644
index c8fe69167e..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java
+++ /dev/null
@@ -1,106 +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.model;
-
-import commonj.sdo.helper.HelperContext;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface ModelFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- ModelFactory INSTANCE = org.apache.tuscany.sdo.model.impl.ModelFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Data Graph Type'.
- *
- *
- * @return a new object of class 'Data Graph Type'.
- * @generated
- */
- DataGraphType createDataGraphType();
-
- /**
- * Returns a new object of class 'Models Type'.
- *
- *
- * @return a new object of class 'Models Type'.
- * @generated
- */
- ModelsType createModelsType();
-
- /**
- * Returns a new object of class 'Property'.
- *
- *
- * @return a new object of class 'Property'.
- * @generated
- */
- Property createProperty();
-
- /**
- * Returns a new object of class 'Type'.
- *
- *
- * @return a new object of class 'Type'.
- * @generated
- */
- Type createType();
-
- /**
- * Returns a new object of class 'Types'.
- *
- *
- * @return a new object of class 'Types'.
- * @generated
- */
- Types createTypes();
-
- /**
- * Returns a new object of class 'XSD Type'.
- *
- *
- * @return a new object of class 'XSD Type'.
- * @generated
- */
- XSDType createXSDType();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @param scope an instance of HelperContext used to manage the scoping of types.
- * @generated
- */
- public void register(HelperContext scope);
-
-} //ModelFactory
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java
deleted file mode 100644
index 4159ac9dc1..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java
+++ /dev/null
@@ -1,62 +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.model;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'Models Type'.
- *
- *
- *
- *
- * Expected type is emof:Package.
- *
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface ModelsType extends Serializable
-{
- /**
- * Returns the value of the 'Any' attribute list.
- *
- *
- * If the meaning of the 'Any' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any' attribute list.
- * @generated
- */
- Sequence getAny();
-
-} // ModelsType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java
deleted file mode 100644
index 15ee4c2f99..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java
+++ /dev/null
@@ -1,503 +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.model;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- *
- * A representation of the model object 'Property'.
- *
- *
- *
- * The following features are supported:
- *
- *
{@link org.apache.tuscany.sdo.model.Property#getAliasName Alias Name}
{@link org.apache.tuscany.sdo.model.Property#getAnyAttribute Any Attribute}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface Property extends Serializable
-{
- /**
- * Returns the value of the 'Alias Name' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'Alias Name' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Alias Name' attribute list.
- * @generated
- */
- List getAliasName();
-
- /**
- * Returns the value of the 'Any' attribute list.
- *
- *
- * If the meaning of the 'Any' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any' attribute list.
- * @generated
- */
- Sequence getAny();
-
- /**
- * Returns the value of the 'Name' attribute.
- *
- *
- * If the meaning of the 'Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #setName(String)
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getName Name}' attribute.
- *
- *
- * @param value the new value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getName Name}' attribute.
- *
- *
- * @see #isSetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- void unsetName();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getName Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Name' attribute is set.
- * @see #unsetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- boolean isSetName();
-
- /**
- * Returns the value of the 'Many' attribute.
- *
- *
- * If the meaning of the 'Many' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Many' attribute.
- * @see #isSetMany()
- * @see #unsetMany()
- * @see #setMany(boolean)
- * @generated
- */
- boolean isMany();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany Many}' attribute.
- *
- *
- * @param value the new value of the 'Many' attribute.
- * @see #isSetMany()
- * @see #unsetMany()
- * @see #isMany()
- * @generated
- */
- void setMany(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany Many}' attribute.
- *
- *
- * @see #isSetMany()
- * @see #isMany()
- * @see #setMany(boolean)
- * @generated
- */
- void unsetMany();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isMany Many}' attribute is set.
- *
- *
- * @return whether the value of the 'Many' attribute is set.
- * @see #unsetMany()
- * @see #isMany()
- * @see #setMany(boolean)
- * @generated
- */
- boolean isSetMany();
-
- /**
- * Returns the value of the 'Containment' attribute.
- *
- *
- * If the meaning of the 'Containment' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Containment' attribute.
- * @see #isSetContainment()
- * @see #unsetContainment()
- * @see #setContainment(boolean)
- * @generated
- */
- boolean isContainment();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment Containment}' attribute.
- *
- *
- * @param value the new value of the 'Containment' attribute.
- * @see #isSetContainment()
- * @see #unsetContainment()
- * @see #isContainment()
- * @generated
- */
- void setContainment(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment Containment}' attribute.
- *
- *
- * @see #isSetContainment()
- * @see #isContainment()
- * @see #setContainment(boolean)
- * @generated
- */
- void unsetContainment();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isContainment Containment}' attribute is set.
- *
- *
- * @return whether the value of the 'Containment' attribute is set.
- * @see #unsetContainment()
- * @see #isContainment()
- * @see #setContainment(boolean)
- * @generated
- */
- boolean isSetContainment();
-
- /**
- * Returns the value of the 'Default' attribute.
- *
- *
- * If the meaning of the 'Default' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Default' attribute.
- * @see #isSetDefault()
- * @see #unsetDefault()
- * @see #setDefault_(String)
- * @generated
- */
- String getDefault_();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault Default}' attribute.
- *
- *
- * @param value the new value of the 'Default' attribute.
- * @see #isSetDefault()
- * @see #unsetDefault()
- * @see #getDefault_()
- * @generated
- */
- void setDefault_(String value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault Default}' attribute.
- *
- *
- * @see #isSetDefault()
- * @see #getDefault_()
- * @see #setDefault_(String)
- * @generated
- */
- void unsetDefault();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getDefault Default}' attribute is set.
- *
- *
- * @return whether the value of the 'Default' attribute is set.
- * @see #unsetDefault()
- * @see #getDefault_()
- * @see #setDefault_(String)
- * @generated
- */
- boolean isSetDefault();
-
- /**
- * Returns the value of the 'Read Only' attribute.
- *
- *
- * If the meaning of the 'Read Only' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Read Only' attribute.
- * @see #isSetReadOnly()
- * @see #unsetReadOnly()
- * @see #setReadOnly(boolean)
- * @generated
- */
- boolean isReadOnly();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly Read Only}' attribute.
- *
- *
- * @param value the new value of the 'Read Only' attribute.
- * @see #isSetReadOnly()
- * @see #unsetReadOnly()
- * @see #isReadOnly()
- * @generated
- */
- void setReadOnly(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly Read Only}' attribute.
- *
- *
- * @see #isSetReadOnly()
- * @see #isReadOnly()
- * @see #setReadOnly(boolean)
- * @generated
- */
- void unsetReadOnly();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isReadOnly Read Only}' attribute is set.
- *
- *
- * @return whether the value of the 'Read Only' attribute is set.
- * @see #unsetReadOnly()
- * @see #isReadOnly()
- * @see #setReadOnly(boolean)
- * @generated
- */
- boolean isSetReadOnly();
-
- /**
- * Returns the value of the 'Type' reference.
- *
- *
- * If the meaning of the 'Type' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type' reference.
- * @see #isSetType()
- * @see #unsetType()
- * @see #setType(Type)
- * @generated
- */
- Type getType_();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ Type}' reference.
- *
- *
- * @param value the new value of the 'Type' reference.
- * @see #isSetType()
- * @see #unsetType()
- * @see #getType_()
- * @generated
- */
- void setType(Type value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ Type}' reference.
- *
- *
- * @see #isSetType()
- * @see #getType_()
- * @see #setType(Type)
- * @generated
- */
- void unsetType();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getType_ Type}' reference is set.
- *
- *
- * @return whether the value of the 'Type' reference is set.
- * @see #unsetType()
- * @see #getType_()
- * @see #setType(Type)
- * @generated
- */
- boolean isSetType();
-
- /**
- * Returns the value of the 'Opposite' reference.
- *
- *
- * If the meaning of the 'Opposite' reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Opposite' reference.
- * @see #isSetOpposite()
- * @see #unsetOpposite()
- * @see #setOpposite_(Property)
- * @generated
- */
- Property getOpposite_();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite Opposite}' reference.
- *
- *
- * @param value the new value of the 'Opposite' reference.
- * @see #isSetOpposite()
- * @see #unsetOpposite()
- * @see #getOpposite_()
- * @generated
- */
- void setOpposite_(Property value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite Opposite}' reference.
- *
- *
- * @see #isSetOpposite()
- * @see #getOpposite_()
- * @see #setOpposite_(Property)
- * @generated
- */
- void unsetOpposite();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#getOpposite Opposite}' reference is set.
- *
- *
- * @return whether the value of the 'Opposite' reference is set.
- * @see #unsetOpposite()
- * @see #getOpposite_()
- * @see #setOpposite_(Property)
- * @generated
- */
- boolean isSetOpposite();
-
- /**
- * Returns the value of the 'Nullable' attribute.
- *
- *
- * If the meaning of the 'Nullable' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Nullable' attribute.
- * @see #isSetNullable()
- * @see #unsetNullable()
- * @see #setNullable(boolean)
- * @generated
- */
- boolean isNullable();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable Nullable}' attribute.
- *
- *
- * @param value the new value of the 'Nullable' attribute.
- * @see #isSetNullable()
- * @see #unsetNullable()
- * @see #isNullable()
- * @generated
- */
- void setNullable(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable Nullable}' attribute.
- *
- *
- * @see #isSetNullable()
- * @see #isNullable()
- * @see #setNullable(boolean)
- * @generated
- */
- void unsetNullable();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Property#isNullable Nullable}' attribute is set.
- *
- *
- * @return whether the value of the 'Nullable' attribute is set.
- * @see #unsetNullable()
- * @see #isNullable()
- * @see #setNullable(boolean)
- * @generated
- */
- boolean isSetNullable();
-
- /**
- * Returns the value of the 'Any Attribute' attribute list.
- *
- *
- * If the meaning of the 'Any Attribute' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any Attribute' attribute list.
- * @generated
- */
- Sequence getAnyAttribute();
-
-} // Property
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java
deleted file mode 100644
index 741343e5a8..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.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 org.apache.tuscany.sdo.model;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- *
- * A representation of the model object 'Text Type'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface TextType extends Serializable
-{
- /**
- * Returns the value of the 'Text' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'Text' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Text' attribute list.
- * @generated
- */
- List getText();
-
-} // TextType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java
deleted file mode 100644
index 26a02f7cc0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java
+++ /dev/null
@@ -1,431 +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.model;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- *
- * A representation of the model object 'Type'.
- *
- *
- *
- * The following features are supported:
- *
- *
{@link org.apache.tuscany.sdo.model.Type#getBaseType Base Type}
{@link org.apache.tuscany.sdo.model.Type#getAnyAttribute Any Attribute}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface Type extends Serializable
-{
- /**
- * Returns the value of the 'Base Type' reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.model.Type}.
- *
- *
- * If the meaning of the 'Base Type' reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Base Type' reference list.
- * @generated
- */
- List getBaseType();
-
- /**
- * Returns the value of the 'Property' containment reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.model.Property}.
- *
- *
- * If the meaning of the 'Property' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Property' containment reference list.
- * @generated
- */
- List getProperty();
-
- /**
- * Returns the value of the 'Alias Name' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'Alias Name' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Alias Name' attribute list.
- * @generated
- */
- List getAliasName();
-
- /**
- * Returns the value of the 'Any' attribute list.
- *
- *
- * If the meaning of the 'Any' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any' attribute list.
- * @generated
- */
- Sequence getAny();
-
- /**
- * Returns the value of the 'Name' attribute.
- *
- *
- * If the meaning of the 'Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #setName(String)
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#getName Name}' attribute.
- *
- *
- * @param value the new value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#getName Name}' attribute.
- *
- *
- * @see #isSetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- void unsetName();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#getName Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Name' attribute is set.
- * @see #unsetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- boolean isSetName();
-
- /**
- * Returns the value of the 'Uri' attribute.
- *
- *
- * If the meaning of the 'Uri' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Uri' attribute.
- * @see #isSetUri()
- * @see #unsetUri()
- * @see #setUri(String)
- * @generated
- */
- String getUri();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri Uri}' attribute.
- *
- *
- * @param value the new value of the 'Uri' attribute.
- * @see #isSetUri()
- * @see #unsetUri()
- * @see #getUri()
- * @generated
- */
- void setUri(String value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri Uri}' attribute.
- *
- *
- * @see #isSetUri()
- * @see #getUri()
- * @see #setUri(String)
- * @generated
- */
- void unsetUri();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#getUri Uri}' attribute is set.
- *
- *
- * @return whether the value of the 'Uri' attribute is set.
- * @see #unsetUri()
- * @see #getUri()
- * @see #setUri(String)
- * @generated
- */
- boolean isSetUri();
-
- /**
- * Returns the value of the 'Data Type' attribute.
- *
- *
- * If the meaning of the 'Data Type' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Data Type' attribute.
- * @see #isSetDataType()
- * @see #unsetDataType()
- * @see #setDataType(boolean)
- * @generated
- */
- boolean isDataType();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType Data Type}' attribute.
- *
- *
- * @param value the new value of the 'Data Type' attribute.
- * @see #isSetDataType()
- * @see #unsetDataType()
- * @see #isDataType()
- * @generated
- */
- void setDataType(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType Data Type}' attribute.
- *
- *
- * @see #isSetDataType()
- * @see #isDataType()
- * @see #setDataType(boolean)
- * @generated
- */
- void unsetDataType();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isDataType Data Type}' attribute is set.
- *
- *
- * @return whether the value of the 'Data Type' attribute is set.
- * @see #unsetDataType()
- * @see #isDataType()
- * @see #setDataType(boolean)
- * @generated
- */
- boolean isSetDataType();
-
- /**
- * Returns the value of the 'Open' attribute.
- *
- *
- * If the meaning of the 'Open' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Open' attribute.
- * @see #isSetOpen()
- * @see #unsetOpen()
- * @see #setOpen(boolean)
- * @generated
- */
- boolean isOpen();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen Open}' attribute.
- *
- *
- * @param value the new value of the 'Open' attribute.
- * @see #isSetOpen()
- * @see #unsetOpen()
- * @see #isOpen()
- * @generated
- */
- void setOpen(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen Open}' attribute.
- *
- *
- * @see #isSetOpen()
- * @see #isOpen()
- * @see #setOpen(boolean)
- * @generated
- */
- void unsetOpen();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isOpen Open}' attribute is set.
- *
- *
- * @return whether the value of the 'Open' attribute is set.
- * @see #unsetOpen()
- * @see #isOpen()
- * @see #setOpen(boolean)
- * @generated
- */
- boolean isSetOpen();
-
- /**
- * Returns the value of the 'Sequenced' attribute.
- *
- *
- * If the meaning of the 'Sequenced' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Sequenced' attribute.
- * @see #isSetSequenced()
- * @see #unsetSequenced()
- * @see #setSequenced(boolean)
- * @generated
- */
- boolean isSequenced();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced Sequenced}' attribute.
- *
- *
- * @param value the new value of the 'Sequenced' attribute.
- * @see #isSetSequenced()
- * @see #unsetSequenced()
- * @see #isSequenced()
- * @generated
- */
- void setSequenced(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced Sequenced}' attribute.
- *
- *
- * @see #isSetSequenced()
- * @see #isSequenced()
- * @see #setSequenced(boolean)
- * @generated
- */
- void unsetSequenced();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isSequenced Sequenced}' attribute is set.
- *
- *
- * @return whether the value of the 'Sequenced' attribute is set.
- * @see #unsetSequenced()
- * @see #isSequenced()
- * @see #setSequenced(boolean)
- * @generated
- */
- boolean isSetSequenced();
-
- /**
- * Returns the value of the 'Abstract' attribute.
- *
- *
- * If the meaning of the 'Abstract' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Abstract' attribute.
- * @see #isSetAbstract()
- * @see #unsetAbstract()
- * @see #setAbstract(boolean)
- * @generated
- */
- boolean isAbstract();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract Abstract}' attribute.
- *
- *
- * @param value the new value of the 'Abstract' attribute.
- * @see #isSetAbstract()
- * @see #unsetAbstract()
- * @see #isAbstract()
- * @generated
- */
- void setAbstract(boolean value);
-
- /**
- * Unsets the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract Abstract}' attribute.
- *
- *
- * @see #isSetAbstract()
- * @see #isAbstract()
- * @see #setAbstract(boolean)
- * @generated
- */
- void unsetAbstract();
-
- /**
- * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.Type#isAbstract Abstract}' attribute is set.
- *
- *
- * @return whether the value of the 'Abstract' attribute is set.
- * @see #unsetAbstract()
- * @see #isAbstract()
- * @see #setAbstract(boolean)
- * @generated
- */
- boolean isSetAbstract();
-
- /**
- * Returns the value of the 'Any Attribute' attribute list.
- *
- *
- * If the meaning of the 'Any Attribute' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any Attribute' attribute list.
- * @generated
- */
- Sequence getAnyAttribute();
-
- String getInstanceClassName();
-
-} // Type
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java
deleted file mode 100644
index 26fb9c57ce..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java
+++ /dev/null
@@ -1,59 +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.model;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- *
- * A representation of the model object 'Types'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface Types extends Serializable
-{
- /**
- * Returns the value of the 'Type' containment reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.model.Type}.
- *
- *
- * If the meaning of the 'Type' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type' containment reference list.
- * @generated
- */
- List getType_();
-
- List getTypeList();
-
-} // Types
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java
deleted file mode 100644
index 32cde02086..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java
+++ /dev/null
@@ -1,62 +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.model;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'XSD Type'.
- *
- *
- *
- *
- * Expected type is xsd:schema.
- *
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface XSDType extends Serializable
-{
- /**
- * Returns the value of the 'Any' attribute list.
- *
- *
- * If the meaning of the 'Any' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Any' attribute list.
- * @generated
- */
- Sequence getAny();
-
-} // XSDType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java
deleted file mode 100644
index e8824974a0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java
+++ /dev/null
@@ -1,625 +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.model.impl;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-import org.apache.tuscany.sdo.model.BaseDataGraphType;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.ModelsType;
-import org.apache.tuscany.sdo.model.XSDType;
-
-/**
- *
- * An implementation of the model object 'Base Data Graph Type'.
- *
- *
- *
- *
- * @generated
- */
-public class XSDTypeImpl extends DataObjectBase implements XSDType
-{
-
- public final static int ANY = -1;
-
- public final static int SDO_PROPERTY_COUNT = 0;
-
- public final static int EXTENDED_PROPERTY_COUNT = -1;
-
-
- /**
- * The internal feature id for the 'Any' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_ANY = 0;
-
- /**
- * The number of properties for this type.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 1;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_ANY: return ANY;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The cached value of the '{@link #getAny() Any}' attribute list.
- *
- *
- * @see #getAny()
- * @generated
- * @ordered
- */
-
- protected Sequence any = null;
-
- /**
- *
- *
- * @generated
- */
- public XSDTypeImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated
- */
- public Type getStaticType()
- {
- return ((ModelFactoryImpl)ModelFactory.INSTANCE).getXSDType();
- }
-
- /**
- *
- *
- * @generated
- */
- public Sequence getAny()
- {
- if (any == null)
- {
- any = createSequence(INTERNAL_ANY);
- }
- return any;
- }
- /**
- *
- *
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case ANY:
- return removeFromSequence(getAny(), otherEnd, changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- *
- *
- * @generated
- */
- public Object get(int propertyIndex, boolean resolve)
- {
- switch (propertyIndex)
- {
- case ANY:
- // 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 getAny();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- *
- *
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case ANY:
- setSequence(getAny(), newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ANY:
- unsetSequence(getAny());
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- *
- *
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case ANY:
- return any != null && !isSequenceEmpty(getAny());
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- *
- *
- * @generated
- */
- public String toString()
- {
- if (isProxy(this)) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (any: ");
- result.append(any);
- result.append(')');
- return result.toString();
- }
-
-} //XSDTypeImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.java
deleted file mode 100644
index 061d082b1d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/InternalFactory.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.model.internal;
-
-import commonj.sdo.helper.HelperContext;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface InternalFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- InternalFactory INSTANCE = org.apache.tuscany.sdo.model.internal.impl.InternalFactoryImpl.init();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @param scope an instance of HelperContext used to manage the scoping of types.
- * @generated
- */
- public void register(HelperContext scope);
-
-} //InternalFactory
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.java
deleted file mode 100644
index 06d002ea74..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/internal/impl/InternalFactoryImpl.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 org.apache.tuscany.sdo.model.internal.impl;
-
-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.internal.*;
-import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
-
-/**
- *
- * An implementation of the commonj.sdo.internal model factory.
- * This model is generated from sdoInternal.xsd, in the tuscany-sdo-impl project.
- * Until the SDO code generator supports regen/merge, follow the following steps to regenerate this model:
- * 1. Regenerate the model into a temporary directory:
- * XSD2JavaGenerator -generateBuiltIn http://www.apache.org/tuscany/commonj.sdo.internal -targetDirectory -javaPackage org.apache.tuscany.sdo.model.internal /src/main/resources/xml/sdoInternal.xsd
- * 2. Delete all the createXXXFromString() and convertXXXToString() methods in the newly generated InternalFactoryImpl and
- * replace them with the ones from this file (resolve any missing imports).
- * 3. Comment out all simple depedencies (SDOUtil.registerStaticTypes calls) in the init() method.
- * 4. Make sure the top of each generated file contains the ASF License.
- * 5. Move this JavaDoc comment into the newly generated ModelFactoryImpl class.
- *
- * @generated
- */
-public class InternalFactoryImpl extends FactoryBase implements InternalFactory
-{
-
- /**
- * The package namespace URI.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.apache.org/tuscany/commonj.sdo.internal";
-
- /**
- * The package namespace name.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "internal";
-
- /**
- * The version of the generator pattern used to generate this class.
- *
- *
- * @generated
- */
- public static final String PATTERN_VERSION = "1.2";
-
- public static final int BASE64_BYTES = 1;
- public static final int QNAME = 2;
-
- /**
- * Creates an instance of the factory.
- *
- *
- * @generated
- */
- public InternalFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "org.apache.tuscany.sdo.model.internal");
- }
-
- /**
- * 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.
- *
- *
- * @generated
- */
- public void register(HelperContext scope)
- {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
-
- //Register dependent packages with provided scope
-
- // Initialize this package
- TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
- th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject create(int typeNumber)
- {
- switch (typeNumber)
- {
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public Object createFromString(int typeNumber, String initialValue)
- {
- switch (typeNumber)
- {
- case BASE64_BYTES:
- return createBase64BytesFromString(initialValue);
- case QNAME:
- return createQNameFromString(initialValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertToString(int typeNumber, Object instanceValue)
- {
- switch (typeNumber)
- {
- case BASE64_BYTES:
- return convertBase64BytesToString(instanceValue);
- case QNAME:
- return convertQNameToString(instanceValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type base64BytesType = null;
-
- public Type getBase64Bytes()
- {
- return base64BytesType;
- }
-
- protected Type qNameType = null;
-
- public Type getQName()
- {
- return qNameType;
- }
-
-
- private static InternalFactoryImpl instance = null;
- public static InternalFactoryImpl init()
- {
- if (instance != null ) return instance;
- instance = new InternalFactoryImpl();
-
- // Initialize dependent packages
-
- // Create package meta-data objects
- instance.createMetaData();
-
- // Initialize created meta-data
- instance.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //theInternalFactoryImpl.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 data types
- base64BytesType = createType(true, BASE64_BYTES );
- qNameType = createType(true, QNAME );
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- // Initialize data types
- initializeType(base64BytesType, byte[].class, "Base64Bytes", true, false);
- setInstanceProperty (base64BytesType, "commonj.sdo/java", "instanceClass", "byte[]");
-
- initializeType(qNameType, String.class, "QName", true, false);
- setInstanceProperty (qNameType, "commonj.sdo/java", "instanceClass", "java.lang.String");
-
- createXSDMetaData();
- }
-
- protected void createXSDMetaData()
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (base64BytesType,
- new String[]
- {
- "name", "Base64Bytes"
- });
-
- addXSDMapping
- (qNameType,
- new String[]
- {
- "name", "QName"
- });
-
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public byte[] createBase64BytesFromString(String initialValue)
- {
- return XMLTypeFactory.eINSTANCE.createBase64Binary(initialValue);
- }
-
- /**
- *
- *
- * @generated NOT
- */
- public String convertBase64BytesToString(Object instanceValue)
- {
- if (instanceValue instanceof byte[]) {
- return XMLTypeFactory.eINSTANCE.convertBase64Binary((byte[])instanceValue);
- } else {
- return XMLTypeFactory.eINSTANCE.convertBase64Binary(instanceValue.toString().getBytes());
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public String createQNameFromString(String initialValue)
- {
- return (String)super.createFromString(QNAME, initialValue);
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertQNameToString(Object instanceValue)
- {
- return super.convertToString(QNAME, instanceValue);
- }
-
-} //InternalFactoryImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java
deleted file mode 100644
index 50be023db5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.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 org.apache.tuscany.sdo.model.java;
-
-import commonj.sdo.helper.HelperContext;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface JavaFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- JavaFactory INSTANCE = org.apache.tuscany.sdo.model.java.impl.JavaFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Info'.
- *
- *
- * @return a new object of class 'Info'.
- * @generated
- */
- JavaInfo createJavaInfo();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @param scope an instance of HelperContext used to manage the scoping of types.
- * @generated
- */
- public void register(HelperContext scope);
-
-} //JavaFactory
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java
deleted file mode 100644
index b5eabb0f4a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.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 org.apache.tuscany.sdo.model.java;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'Info'.
- *
- *
- *
{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface Type Interface}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface JavaMetaData extends Serializable
-{
- /**
- * Returns the value of the 'Factory Interface' attribute.
- *
- *
- * If the meaning of the 'Factory Interface' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Factory Interface' attribute.
- * @see #setFactoryInterface(String)
- * @generated
- */
- String getFactoryInterface();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface Factory Interface}' attribute.
- *
- *
- * @param value the new value of the 'Factory Interface' attribute.
- * @see #getFactoryInterface()
- * @generated
- */
- void setFactoryInterface(String value);
-
- /**
- * Returns the value of the 'Type Interface' attribute.
- *
- *
- * If the meaning of the 'Type Interface' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type Interface' attribute.
- * @see #setTypeInterface(String)
- * @generated
- */
- String getTypeInterface();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface Type Interface}' attribute.
- *
- *
- * @param value the new value of the 'Type Interface' attribute.
- * @see #getTypeInterface()
- * @generated
- */
- void setTypeInterface(String value);
-
-} // JavaMetaData
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java
deleted file mode 100644
index 1f540afa2c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java
+++ /dev/null
@@ -1,77 +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.util.metadata;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface MetadataFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- MetadataFactory INSTANCE = org.apache.tuscany.sdo.util.metadata.impl.MetadataFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Java Meta Data'.
- *
- *
- * @return a new object of class 'Java Meta Data'.
- * @generated
- */
- JavaMetaData createJavaMetaData();
-
- /**
- * Returns a new object of class 'SDO Meta Data Group'.
- *
- *
- * @return a new object of class 'SDO Meta Data Group'.
- * @generated
- */
- SDOMetaDataGroup createSDOMetaDataGroup();
-
- /**
- * Returns a new object of class 'Type Meta Data'.
- *
- *
- * @return a new object of class 'Type Meta Data'.
- * @generated
- */
- TypeMetaData createTypeMetaData();
-
- /**
- * Returns a new object of class 'XSD Meta Data'.
- *
- *
- * @return a new object of class 'XSD Meta Data'.
- * @generated
- */
- XSDMetaData createXSDMetaData();
-
-} //MetadataFactory
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java
deleted file mode 100644
index 5657f26ca5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java
+++ /dev/null
@@ -1,87 +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.util.metadata;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-/**
- *
- * A representation of the model object 'SDO Meta Data Group'.
- *
- *
- *
- * The following features are supported:
- *
- *
{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData Java Meta Data}
- *
{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData Xsd Meta Data}
- *
{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData Type Meta Data}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface SDOMetaDataGroup extends Serializable
-{
- /**
- * Returns the value of the 'Java Meta Data' containment reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.JavaMetaData}.
- *
- *
- * If the meaning of the 'Java Meta Data' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Java Meta Data' containment reference list.
- * @generated
- */
- List getJavaMetaData();
-
- /**
- * Returns the value of the 'Xsd Meta Data' containment reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.XSDMetaData}.
- *
- *
- * If the meaning of the 'Xsd Meta Data' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Xsd Meta Data' containment reference list.
- * @generated
- */
- List getXsdMetaData();
-
- /**
- * Returns the value of the 'Type Meta Data' containment reference list.
- * The list contents are of type {@link org.apache.tuscany.sdo.util.metadata.TypeMetaData}.
- *
- *
- * If the meaning of the 'Type Meta Data' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Type Meta Data' containment reference list.
- * @generated
- */
- List getTypeMetaData();
-
-} // SDOMetaDataGroup
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java
deleted file mode 100644
index c3d67a8318..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java
+++ /dev/null
@@ -1,65 +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.util.metadata;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'Type Meta Data'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface TypeMetaData extends Serializable
-{
- /**
- * Returns the value of the 'Location' attribute.
- *
- *
- * If the meaning of the 'Location' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Location' attribute.
- * @see #setLocation(String)
- * @generated
- */
- String getLocation();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation Location}' attribute.
- *
- *
- * @param value the new value of the 'Location' attribute.
- * @see #getLocation()
- * @generated
- */
- void setLocation(String value);
-
-} // TypeMetaData
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java
deleted file mode 100644
index 09bffece71..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java
+++ /dev/null
@@ -1,66 +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.util.metadata;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'XSD Meta Data'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface XSDMetaData extends Serializable
-{
- /**
- * Returns the value of the 'Location' attribute.
- *
- *
- * If the meaning of the 'Location' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Location' attribute.
- * @see #setLocation(String)
- * @generated
- */
- String getLocation();
-
- /**
- * Sets the value of the '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation Location}' attribute.
- *
- *
- * @param value the new value of the 'Location' attribute.
- * @see #getLocation()
- * @generated
- */
- void setLocation(String value);
-
-} // XSDMetaData
diff --git a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java b/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java
deleted file mode 100644
index 8a6dce6161..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java
+++ /dev/null
@@ -1,267 +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.util.metadata.impl;
-
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-import org.apache.tuscany.sdo.util.metadata.JavaMetaData;
-import org.apache.tuscany.sdo.util.metadata.MetadataFactory;
-
-/**
- *
- * An implementation of the model object 'Java Meta Data'.
- *
- *
{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyVal Read Only Val}
- *
{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyListVal Read Only List Val}
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface ExpectedExceptionType extends Serializable
-{
- /**
- * Returns the value of the 'String Val' attribute.
- *
- *
- * If the meaning of the 'String Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'String Val' attribute.
- * @see #isSetStringVal()
- * @see #unsetStringVal()
- * @see #setStringVal(String)
- * @generated
- */
- String getStringVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal String Val}' attribute.
- *
- *
- * @param value the new value of the 'String Val' attribute.
- * @see #isSetStringVal()
- * @see #unsetStringVal()
- * @see #getStringVal()
- * @generated
- */
- void setStringVal(String value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal String Val}' attribute.
- *
- *
- * @see #isSetStringVal()
- * @see #getStringVal()
- * @see #setStringVal(String)
- * @generated
- */
- void unsetStringVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getStringVal String Val}' attribute is set.
- *
- *
- * @return whether the value of the 'String Val' attribute is set.
- * @see #unsetStringVal()
- * @see #getStringVal()
- * @see #setStringVal(String)
- * @generated
- */
- boolean isSetStringVal();
-
- /**
- * Returns the value of the 'Boolean Val' attribute.
- *
- *
- * If the meaning of the 'Boolean Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Boolean Val' attribute.
- * @see #isSetBooleanVal()
- * @see #unsetBooleanVal()
- * @see #setBooleanVal(boolean)
- * @generated
- */
- boolean isBooleanVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal Boolean Val}' attribute.
- *
- *
- * @param value the new value of the 'Boolean Val' attribute.
- * @see #isSetBooleanVal()
- * @see #unsetBooleanVal()
- * @see #isBooleanVal()
- * @generated
- */
- void setBooleanVal(boolean value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal Boolean Val}' attribute.
- *
- *
- * @see #isSetBooleanVal()
- * @see #isBooleanVal()
- * @see #setBooleanVal(boolean)
- * @generated
- */
- void unsetBooleanVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#isBooleanVal Boolean Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Boolean Val' attribute is set.
- * @see #unsetBooleanVal()
- * @see #isBooleanVal()
- * @see #setBooleanVal(boolean)
- * @generated
- */
- boolean isSetBooleanVal();
-
- /**
- * Returns the value of the 'Byte Val' attribute.
- *
- *
- * If the meaning of the 'Byte Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Byte Val' attribute.
- * @see #isSetByteVal()
- * @see #unsetByteVal()
- * @see #setByteVal(byte)
- * @generated
- */
- byte getByteVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal Byte Val}' attribute.
- *
- *
- * @param value the new value of the 'Byte Val' attribute.
- * @see #isSetByteVal()
- * @see #unsetByteVal()
- * @see #getByteVal()
- * @generated
- */
- void setByteVal(byte value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal Byte Val}' attribute.
- *
- *
- * @see #isSetByteVal()
- * @see #getByteVal()
- * @see #setByteVal(byte)
- * @generated
- */
- void unsetByteVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getByteVal Byte Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Byte Val' attribute is set.
- * @see #unsetByteVal()
- * @see #getByteVal()
- * @see #setByteVal(byte)
- * @generated
- */
- boolean isSetByteVal();
-
- /**
- * Returns the value of the 'Decimal Val' attribute.
- *
- *
- * If the meaning of the 'Decimal Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Decimal Val' attribute.
- * @see #isSetDecimalVal()
- * @see #unsetDecimalVal()
- * @see #setDecimalVal(BigDecimal)
- * @generated
- */
- BigDecimal getDecimalVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal Decimal Val}' attribute.
- *
- *
- * @param value the new value of the 'Decimal Val' attribute.
- * @see #isSetDecimalVal()
- * @see #unsetDecimalVal()
- * @see #getDecimalVal()
- * @generated
- */
- void setDecimalVal(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal Decimal Val}' attribute.
- *
- *
- * @see #isSetDecimalVal()
- * @see #getDecimalVal()
- * @see #setDecimalVal(BigDecimal)
- * @generated
- */
- void unsetDecimalVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDecimalVal Decimal Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Decimal Val' attribute is set.
- * @see #unsetDecimalVal()
- * @see #getDecimalVal()
- * @see #setDecimalVal(BigDecimal)
- * @generated
- */
- boolean isSetDecimalVal();
-
- /**
- * Returns the value of the 'Int Val' attribute.
- *
- *
- * If the meaning of the 'Int Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Int Val' attribute.
- * @see #isSetIntVal()
- * @see #unsetIntVal()
- * @see #setIntVal(int)
- * @generated
- */
- int getIntVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal Int Val}' attribute.
- *
- *
- * @param value the new value of the 'Int Val' attribute.
- * @see #isSetIntVal()
- * @see #unsetIntVal()
- * @see #getIntVal()
- * @generated
- */
- void setIntVal(int value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal Int Val}' attribute.
- *
- *
- * @see #isSetIntVal()
- * @see #getIntVal()
- * @see #setIntVal(int)
- * @generated
- */
- void unsetIntVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntVal Int Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Int Val' attribute is set.
- * @see #unsetIntVal()
- * @see #getIntVal()
- * @see #setIntVal(int)
- * @generated
- */
- boolean isSetIntVal();
-
- /**
- * Returns the value of the 'Float Val' attribute.
- *
- *
- * If the meaning of the 'Float Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Float Val' attribute.
- * @see #isSetFloatVal()
- * @see #unsetFloatVal()
- * @see #setFloatVal(float)
- * @generated
- */
- float getFloatVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal Float Val}' attribute.
- *
- *
- * @param value the new value of the 'Float Val' attribute.
- * @see #isSetFloatVal()
- * @see #unsetFloatVal()
- * @see #getFloatVal()
- * @generated
- */
- void setFloatVal(float value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal Float Val}' attribute.
- *
- *
- * @see #isSetFloatVal()
- * @see #getFloatVal()
- * @see #setFloatVal(float)
- * @generated
- */
- void unsetFloatVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getFloatVal Float Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Float Val' attribute is set.
- * @see #unsetFloatVal()
- * @see #getFloatVal()
- * @see #setFloatVal(float)
- * @generated
- */
- boolean isSetFloatVal();
-
- /**
- * Returns the value of the 'Double Val' attribute.
- *
- *
- * If the meaning of the 'Double Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Double Val' attribute.
- * @see #isSetDoubleVal()
- * @see #unsetDoubleVal()
- * @see #setDoubleVal(double)
- * @generated
- */
- double getDoubleVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal Double Val}' attribute.
- *
- *
- * @param value the new value of the 'Double Val' attribute.
- * @see #isSetDoubleVal()
- * @see #unsetDoubleVal()
- * @see #getDoubleVal()
- * @generated
- */
- void setDoubleVal(double value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal Double Val}' attribute.
- *
- *
- * @see #isSetDoubleVal()
- * @see #getDoubleVal()
- * @see #setDoubleVal(double)
- * @generated
- */
- void unsetDoubleVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDoubleVal Double Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Double Val' attribute is set.
- * @see #unsetDoubleVal()
- * @see #getDoubleVal()
- * @see #setDoubleVal(double)
- * @generated
- */
- boolean isSetDoubleVal();
-
- /**
- * Returns the value of the 'Date Val' attribute.
- *
- *
- * If the meaning of the 'Date Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Date Val' attribute.
- * @see #isSetDateVal()
- * @see #unsetDateVal()
- * @see #setDateVal(String)
- * @generated
- */
- String getDateVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal Date Val}' attribute.
- *
- *
- * @param value the new value of the 'Date Val' attribute.
- * @see #isSetDateVal()
- * @see #unsetDateVal()
- * @see #getDateVal()
- * @generated
- */
- void setDateVal(String value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal Date Val}' attribute.
- *
- *
- * @see #isSetDateVal()
- * @see #getDateVal()
- * @see #setDateVal(String)
- * @generated
- */
- void unsetDateVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getDateVal Date Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Date Val' attribute is set.
- * @see #unsetDateVal()
- * @see #getDateVal()
- * @see #setDateVal(String)
- * @generated
- */
- boolean isSetDateVal();
-
- /**
- * Returns the value of the 'Short Val' attribute.
- *
- *
- * If the meaning of the 'Short Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Short Val' attribute.
- * @see #isSetShortVal()
- * @see #unsetShortVal()
- * @see #setShortVal(short)
- * @generated
- */
- short getShortVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal Short Val}' attribute.
- *
- *
- * @param value the new value of the 'Short Val' attribute.
- * @see #isSetShortVal()
- * @see #unsetShortVal()
- * @see #getShortVal()
- * @generated
- */
- void setShortVal(short value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal Short Val}' attribute.
- *
- *
- * @see #isSetShortVal()
- * @see #getShortVal()
- * @see #setShortVal(short)
- * @generated
- */
- void unsetShortVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getShortVal Short Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Short Val' attribute is set.
- * @see #unsetShortVal()
- * @see #getShortVal()
- * @see #setShortVal(short)
- * @generated
- */
- boolean isSetShortVal();
-
- /**
- * Returns the value of the 'Long Val' attribute.
- *
- *
- * If the meaning of the 'Long Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Long Val' attribute.
- * @see #isSetLongVal()
- * @see #unsetLongVal()
- * @see #setLongVal(long)
- * @generated
- */
- long getLongVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal Long Val}' attribute.
- *
- *
- * @param value the new value of the 'Long Val' attribute.
- * @see #isSetLongVal()
- * @see #unsetLongVal()
- * @see #getLongVal()
- * @generated
- */
- void setLongVal(long value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal Long Val}' attribute.
- *
- *
- * @see #isSetLongVal()
- * @see #getLongVal()
- * @see #setLongVal(long)
- * @generated
- */
- void unsetLongVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getLongVal Long Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Long Val' attribute is set.
- * @see #unsetLongVal()
- * @see #getLongVal()
- * @see #setLongVal(long)
- * @generated
- */
- boolean isSetLongVal();
-
- /**
- * Returns the value of the 'List Val' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'List Val' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'List Val' attribute list.
- * @generated
- */
- List getListVal();
-
- /**
- * Returns the value of the 'Bytes Val' attribute.
- *
- *
- * If the meaning of the 'Bytes Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Bytes Val' attribute.
- * @see #isSetBytesVal()
- * @see #unsetBytesVal()
- * @see #setBytesVal(byte[])
- * @generated
- */
- byte[] getBytesVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal Bytes Val}' attribute.
- *
- *
- * @param value the new value of the 'Bytes Val' attribute.
- * @see #isSetBytesVal()
- * @see #unsetBytesVal()
- * @see #getBytesVal()
- * @generated
- */
- void setBytesVal(byte[] value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal Bytes Val}' attribute.
- *
- *
- * @see #isSetBytesVal()
- * @see #getBytesVal()
- * @see #setBytesVal(byte[])
- * @generated
- */
- void unsetBytesVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getBytesVal Bytes Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Bytes Val' attribute is set.
- * @see #unsetBytesVal()
- * @see #getBytesVal()
- * @see #setBytesVal(byte[])
- * @generated
- */
- boolean isSetBytesVal();
-
- /**
- * Returns the value of the 'Integer Val' attribute.
- *
- *
- * If the meaning of the 'Integer Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Integer Val' attribute.
- * @see #isSetIntegerVal()
- * @see #unsetIntegerVal()
- * @see #setIntegerVal(BigInteger)
- * @generated
- */
- BigInteger getIntegerVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal Integer Val}' attribute.
- *
- *
- * @param value the new value of the 'Integer Val' attribute.
- * @see #isSetIntegerVal()
- * @see #unsetIntegerVal()
- * @see #getIntegerVal()
- * @generated
- */
- void setIntegerVal(BigInteger value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal Integer Val}' attribute.
- *
- *
- * @see #isSetIntegerVal()
- * @see #getIntegerVal()
- * @see #setIntegerVal(BigInteger)
- * @generated
- */
- void unsetIntegerVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getIntegerVal Integer Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Integer Val' attribute is set.
- * @see #unsetIntegerVal()
- * @see #getIntegerVal()
- * @see #setIntegerVal(BigInteger)
- * @generated
- */
- boolean isSetIntegerVal();
-
- /**
- * Returns the value of the 'Char Val' attribute.
- *
- *
- * If the meaning of the 'Char Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Char Val' attribute.
- * @see #isSetCharVal()
- * @see #unsetCharVal()
- * @see #setCharVal(String)
- * @generated
- */
- String getCharVal();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal Char Val}' attribute.
- *
- *
- * @param value the new value of the 'Char Val' attribute.
- * @see #isSetCharVal()
- * @see #unsetCharVal()
- * @see #getCharVal()
- * @generated
- */
- void setCharVal(String value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal Char Val}' attribute.
- *
- *
- * @see #isSetCharVal()
- * @see #getCharVal()
- * @see #setCharVal(String)
- * @generated
- */
- void unsetCharVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getCharVal Char Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Char Val' attribute is set.
- * @see #unsetCharVal()
- * @see #getCharVal()
- * @see #setCharVal(String)
- * @generated
- */
- boolean isSetCharVal();
-
- /**
- * Returns the value of the 'Read Only Val' attribute.
- *
- *
- * If the meaning of the 'Read Only Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Read Only Val' attribute.
- * @see #isSetReadOnlyVal()
- * @generated
- */
- String getReadOnlyVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyVal Read Only Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Read Only Val' attribute is set.
- * @see #getReadOnlyVal()
- * @generated
- */
- boolean isSetReadOnlyVal();
-
- /**
- * Returns the value of the 'Read Only List Val' attribute.
- *
- *
- * If the meaning of the 'Read Only List Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Read Only List Val' attribute.
- * @see #isSetReadOnlyListVal()
- * @generated
- */
- String getReadOnlyListVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.ExpectedExceptionType#getReadOnlyListVal Read Only List Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Read Only List Val' attribute is set.
- * @see #getReadOnlyListVal()
- * @generated
- */
- boolean isSetReadOnlyListVal();
-
-} // ExpectedExceptionType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java
deleted file mode 100644
index a87511df28..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/SequenceReadOnlyType.java
+++ /dev/null
@@ -1,158 +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.ExpectedException;
-
-import commonj.sdo.Sequence;
-
-import java.io.Serializable;
-
-/**
- *
- * A representation of the model object 'Sequence Read Only Type'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface SequenceReadOnlyType extends Serializable
-{
- /**
- * Returns the value of the 'Mixed' attribute list.
- *
- *
- * If the meaning of the 'Mixed' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Mixed' attribute list.
- * @generated
- */
- Sequence getMixed();
-
- /**
- * Returns the value of the 'Read Only Val' attribute.
- *
- *
- * If the meaning of the 'Read Only Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Read Only Val' attribute.
- * @see #isSetReadOnlyVal()
- * @generated
- */
- String getReadOnlyVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyVal Read Only Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Read Only Val' attribute is set.
- * @see #getReadOnlyVal()
- * @generated
- */
- boolean isSetReadOnlyVal();
-
- /**
- * Returns the value of the 'Read Only List Val' attribute.
- *
- *
- * If the meaning of the 'Read Only List Val' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Read Only List Val' attribute.
- * @see #isSetReadOnlyListVal()
- * @generated
- */
- String getReadOnlyListVal();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getReadOnlyListVal Read Only List Val}' attribute is set.
- *
- *
- * @return whether the value of the 'Read Only List Val' attribute is set.
- * @see #getReadOnlyListVal()
- * @generated
- */
- boolean isSetReadOnlyListVal();
-
- /**
- * Returns the value of the 'Unique Name' attribute.
- *
- *
- * If the meaning of the 'Unique Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Unique Name' attribute.
- * @see #isSetUniqueName()
- * @see #unsetUniqueName()
- * @see #setUniqueName(String)
- * @generated
- */
- String getUniqueName();
-
- /**
- * Sets the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName Unique Name}' attribute.
- *
- *
- * @param value the new value of the 'Unique Name' attribute.
- * @see #isSetUniqueName()
- * @see #unsetUniqueName()
- * @see #getUniqueName()
- * @generated
- */
- void setUniqueName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName Unique Name}' attribute.
- *
- *
- * @see #isSetUniqueName()
- * @see #getUniqueName()
- * @see #setUniqueName(String)
- * @generated
- */
- void unsetUniqueName();
-
- /**
- * Returns whether the value of the '{@link com.example.ExpectedException.SequenceReadOnlyType#getUniqueName Unique Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Unique Name' attribute is set.
- * @see #unsetUniqueName()
- * @see #getUniqueName()
- * @see #setUniqueName(String)
- * @generated
- */
- boolean isSetUniqueName();
-
-} // SequenceReadOnlyType
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java
deleted file mode 100644
index 68280749c4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionFactoryImpl.java
+++ /dev/null
@@ -1,579 +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.ExpectedException.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.ExpectedException.*;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.SDOFactory;
-
-import org.apache.tuscany.sdo.impl.FactoryBase;
-
-import org.apache.tuscany.sdo.model.ModelFactory;
-
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-/**
- *
- * An implementation of the model Factory.
- * Generator information:
- * patternVersion=1.2; -prefix ExpectedException
- *
- * @generated
- */
-public class ExpectedExceptionFactoryImpl extends FactoryBase implements ExpectedExceptionFactory
-{
-
- /**
- * The package namespace URI.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_URI = "http://example.com/ExpectedException";
-
- /**
- * The package namespace name.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "expect";
-
- /**
- * The version of the generator pattern used to generate this class.
- *
- *
- * @generated
- */
- public static final String PATTERN_VERSION = "1.2";
-
- public static final int EXPECTED_EXCEPTION_TYPE = 1;
- public static final int SEQUENCE_READ_ONLY_TYPE = 2;
- public static final int CHAR = 3;
-
- /**
- * Creates an instance of the factory.
- *
- *
- * @generated
- */
- public ExpectedExceptionFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.sdo.test.ExpectedException");
- }
-
- /**
- * 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.
- *
- *
- * @generated
- */
- public void register(HelperContext scope) {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
- TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
- th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject create(int typeNumber)
- {
- switch (typeNumber)
- {
- case EXPECTED_EXCEPTION_TYPE: return (DataObject)createExpectedExceptionType();
- case SEQUENCE_READ_ONLY_TYPE: return (DataObject)createSequenceReadOnlyType();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public Object createFromString(int typeNumber, String initialValue)
- {
- switch (typeNumber)
- {
- case CHAR:
- return createcharFromString(initialValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertToString(int typeNumber, Object instanceValue)
- {
- switch (typeNumber)
- {
- case CHAR:
- return convertcharToString(instanceValue);
- default:
- throw new IllegalArgumentException("The type number '" + typeNumber + "' is not a valid datatype");
- }
- }
- /**
- *
- *
- * @generated
- */
- public ExpectedExceptionType createExpectedExceptionType()
- {
- ExpectedExceptionTypeImpl expectedExceptionType = new ExpectedExceptionTypeImpl();
- return expectedExceptionType;
- }
- /**
- *
- *
- * @generated
- */
- public SequenceReadOnlyType createSequenceReadOnlyType()
- {
- SequenceReadOnlyTypeImpl sequenceReadOnlyType = new SequenceReadOnlyTypeImpl();
- return sequenceReadOnlyType;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type expectedExceptionTypeType = null;
-
- public Type getExpectedExceptionType()
- {
- return expectedExceptionTypeType;
- }
-
- protected Type sequenceReadOnlyTypeType = null;
-
- public Type getSequenceReadOnlyType()
- {
- return sequenceReadOnlyTypeType;
- }
-
- protected Type char_Type = null;
-
- public Type getchar()
- {
- return char_Type;
- }
-
-
- private static boolean isInited = false;
-
- public static ExpectedExceptionFactoryImpl init()
- {
- if (isInited) return (ExpectedExceptionFactoryImpl)FactoryBase.getStaticFactory(ExpectedExceptionFactoryImpl.NAMESPACE_URI);
- ExpectedExceptionFactoryImpl theExpectedExceptionFactoryImpl = new ExpectedExceptionFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
-
- // Create package meta-data objects
- theExpectedExceptionFactoryImpl.createMetaData();
-
- // Initialize created meta-data
- theExpectedExceptionFactoryImpl.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //theExpectedExceptionFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
-
- return theExpectedExceptionFactoryImpl;
- }
-
- private boolean isCreated = false;
-
- public void createMetaData()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create types and their properties
- expectedExceptionTypeType = createType(false, EXPECTED_EXCEPTION_TYPE);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_STRING_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BOOLEAN_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BYTE_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DECIMAL_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_INT_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_FLOAT_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DOUBLE_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_DATE_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_SHORT_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_LONG_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_LIST_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_BYTES_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_INTEGER_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_CHAR_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_VAL);
- createProperty(true, expectedExceptionTypeType,ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_LIST_VAL);
- sequenceReadOnlyTypeType = createType(false, SEQUENCE_READ_ONLY_TYPE);
- createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_MIXED);
- createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_VAL);
- createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_LIST_VAL);
- createProperty(true, sequenceReadOnlyTypeType,SequenceReadOnlyTypeImpl.INTERNAL_UNIQUE_NAME);
-
- // Create data types
- char_Type = createType(true, CHAR );
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- initializeType(expectedExceptionTypeType, ExpectedExceptionType.class, "ExpectedExceptionType", false);
- property = getLocalProperty(expectedExceptionTypeType, 0);
- initializeProperty(property, theModelPackageImpl.getString(), "stringVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 1);
- initializeProperty(property, theModelPackageImpl.getBoolean(), "booleanVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 2);
- initializeProperty(property, theModelPackageImpl.getByte(), "byteVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 3);
- initializeProperty(property, theModelPackageImpl.getDecimal(), "decimalVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 4);
- initializeProperty(property, theModelPackageImpl.getInt(), "intVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 5);
- initializeProperty(property, theModelPackageImpl.getFloat(), "floatVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 6);
- initializeProperty(property, theModelPackageImpl.getDouble(), "doubleVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 7);
- initializeProperty(property, theModelPackageImpl.getDateTime(), "dateVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 8);
- initializeProperty(property, theModelPackageImpl.getShort(), "shortVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 9);
- initializeProperty(property, theModelPackageImpl.getLong(), "longVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 10);
- initializeProperty(property, theModelPackageImpl.getString(), "listVal", null, 0, -1, ExpectedExceptionType.class, false, false, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 11);
- initializeProperty(property, theModelPackageImpl.getBytes(), "bytesVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 12);
- initializeProperty(property, theModelPackageImpl.getInteger(), "integerVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 13);
- initializeProperty(property, this.getchar(), "charVal", null, 1, 1, ExpectedExceptionType.class, false, true, false);
-
- property = getLocalProperty(expectedExceptionTypeType, 14);
- initializeProperty(property, theModelPackageImpl.getString(), "readOnlyVal", null, 1, 1, ExpectedExceptionType.class, true, true, false);
- setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
-
- property = getLocalProperty(expectedExceptionTypeType, 15);
- initializeProperty(property, theModelPackageImpl.getString(), "readOnlyListVal", null, 1, 1, ExpectedExceptionType.class, true, true, false);
- setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
-
- initializeType(sequenceReadOnlyTypeType, SequenceReadOnlyType.class, "SequenceReadOnlyType", false);
- property = getLocalProperty(sequenceReadOnlyTypeType, 0);
- initializeProperty(property, getSequence(), "mixed", null, 0, -1, SequenceReadOnlyType.class, false, false, false);
-
- property = getLocalProperty(sequenceReadOnlyTypeType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "readOnlyVal", null, 1, 1, SequenceReadOnlyType.class, true, true, true);
- setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
-
- property = getLocalProperty(sequenceReadOnlyTypeType, 2);
- initializeProperty(property, theModelPackageImpl.getString(), "readOnlyListVal", null, 1, 1, SequenceReadOnlyType.class, true, true, true);
- setInstanceProperty (property, "commonj.sdo/xml", "readOnly", "true");
-
- property = getLocalProperty(sequenceReadOnlyTypeType, 3);
- initializeProperty(property, theModelPackageImpl.getString(), "uniqueName", null, 1, 1, SequenceReadOnlyType.class, false, true, true);
-
- // Initialize data types
- initializeType(char_Type, String.class, "char", true, false);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- property = createGlobalProperty
- ("expectedExceptionsElem",
- this.getExpectedExceptionType(),
- new String[]
- {
- "kind", "element",
- "name", "expectedExceptionsElem",
- "namespace", "##targetNamespace"
- });
-
- property = createGlobalProperty
- ("sequencedReadOnlyElem",
- this.getSequenceReadOnlyType(),
- new String[]
- {
- "kind", "element",
- "name", "sequencedReadOnlyElem",
- "namespace", "##targetNamespace"
- });
-
- addXSDMapping
- (expectedExceptionTypeType,
- new String[]
- {
- "name", "ExpectedExceptionType",
- "kind", "elementOnly"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_STRING_VAL),
- new String[]
- {
- "kind", "element",
- "name", "stringVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BOOLEAN_VAL),
- new String[]
- {
- "kind", "element",
- "name", "booleanVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BYTE_VAL),
- new String[]
- {
- "kind", "element",
- "name", "byteVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DECIMAL_VAL),
- new String[]
- {
- "kind", "element",
- "name", "decimalVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_INT_VAL),
- new String[]
- {
- "kind", "element",
- "name", "intVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_FLOAT_VAL),
- new String[]
- {
- "kind", "element",
- "name", "floatVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DOUBLE_VAL),
- new String[]
- {
- "kind", "element",
- "name", "doubleVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_DATE_VAL),
- new String[]
- {
- "kind", "element",
- "name", "dateVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_SHORT_VAL),
- new String[]
- {
- "kind", "element",
- "name", "shortVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_LONG_VAL),
- new String[]
- {
- "kind", "element",
- "name", "longVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_LIST_VAL),
- new String[]
- {
- "kind", "element",
- "name", "listVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_BYTES_VAL),
- new String[]
- {
- "kind", "element",
- "name", "bytesVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_INTEGER_VAL),
- new String[]
- {
- "kind", "element",
- "name", "integerVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_CHAR_VAL),
- new String[]
- {
- "kind", "element",
- "name", "charVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_VAL),
- new String[]
- {
- "kind", "element",
- "name", "readOnlyVal"
- });
-
- addXSDMapping
- (getProperty(expectedExceptionTypeType, ExpectedExceptionTypeImpl.INTERNAL_READ_ONLY_LIST_VAL),
- new String[]
- {
- "kind", "element",
- "name", "readOnlyListVal"
- });
-
- addXSDMapping
- (sequenceReadOnlyTypeType,
- new String[]
- {
- "name", "SequenceReadOnlyType",
- "kind", "mixed"
- });
-
- addXSDMapping
- (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_MIXED),
- new String[]
- {
- "kind", "elementWildcard",
- "name", ":mixed"
- });
-
- addXSDMapping
- (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_VAL),
- new String[]
- {
- "kind", "element",
- "name", "readOnlyVal"
- });
-
- addXSDMapping
- (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_READ_ONLY_LIST_VAL),
- new String[]
- {
- "kind", "element",
- "name", "readOnlyListVal"
- });
-
- addXSDMapping
- (getProperty(sequenceReadOnlyTypeType, SequenceReadOnlyTypeImpl.INTERNAL_UNIQUE_NAME),
- new String[]
- {
- "kind", "element",
- "name", "uniqueName"
- });
-
- addXSDMapping
- (char_Type,
- new String[]
- {
- "name", "char",
- "baseType", "commonj.sdo#String",
- "length", "1"
- });
-
- }
-
- /**
- *
- *
- * @generated
- */
- public String createcharFromString(String initialValue)
- {
- return (String)((ModelFactoryImpl)ModelFactory.INSTANCE).createStringFromString(initialValue);
- }
-
- /**
- *
- *
- * @generated
- */
- public String convertcharToString(Object instanceValue)
- {
- return ((ModelFactoryImpl)ModelFactory.INSTANCE).convertStringToString(instanceValue);
- }
-
-} //ExpectedExceptionFactoryImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionTypeImpl.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionTypeImpl.java
deleted file mode 100644
index df7bdbd66e..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/ExpectedException/impl/ExpectedExceptionTypeImpl.java
+++ /dev/null
@@ -1,1682 +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.ExpectedException.impl;
-
-import com.example.ExpectedException.ExpectedExceptionFactory;
-import com.example.ExpectedException.ExpectedExceptionType;
-
-import commonj.sdo.Type;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- *
- * An implementation of the model object 'Type'.
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface Quote extends Serializable
-{
- /**
- * Returns the value of the 'Symbol' attribute.
- *
- *
- * If the meaning of the 'Symbol' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Symbol' attribute.
- * @see #isSetSymbol()
- * @see #unsetSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- String getSymbol();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getSymbol Symbol}' attribute.
- *
- *
- * @param value the new value of the 'Symbol' attribute.
- * @see #isSetSymbol()
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @generated
- */
- void setSymbol(String value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getSymbol Symbol}' attribute.
- *
- *
- * @see #isSetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- void unsetSymbol();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getSymbol Symbol}' attribute is set.
- *
- *
- * @return whether the value of the 'Symbol' attribute is set.
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- boolean isSetSymbol();
-
- /**
- * Returns the value of the 'Company Name' attribute.
- *
- *
- * If the meaning of the 'Company Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Company Name' attribute.
- * @see #isSetCompanyName()
- * @see #unsetCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- String getCompanyName();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getCompanyName Company Name}' attribute.
- *
- *
- * @param value the new value of the 'Company Name' attribute.
- * @see #isSetCompanyName()
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @generated
- */
- void setCompanyName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getCompanyName Company Name}' attribute.
- *
- *
- * @see #isSetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- void unsetCompanyName();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getCompanyName Company Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Company Name' attribute is set.
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- boolean isSetCompanyName();
-
- /**
- * Returns the value of the 'Price' attribute.
- *
- *
- * If the meaning of the 'Price' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Price' attribute.
- * @see #isSetPrice()
- * @see #unsetPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- BigDecimal getPrice();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getPrice Price}' attribute.
- *
- *
- * @param value the new value of the 'Price' attribute.
- * @see #isSetPrice()
- * @see #unsetPrice()
- * @see #getPrice()
- * @generated
- */
- void setPrice(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getPrice Price}' attribute.
- *
- *
- * @see #isSetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- void unsetPrice();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getPrice Price}' attribute is set.
- *
- *
- * @return whether the value of the 'Price' attribute is set.
- * @see #unsetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- boolean isSetPrice();
-
- /**
- * Returns the value of the 'Open1' attribute.
- *
- *
- * If the meaning of the 'Open1' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Open1' attribute.
- * @see #isSetOpen1()
- * @see #unsetOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- BigDecimal getOpen1();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getOpen1 Open1}' attribute.
- *
- *
- * @param value the new value of the 'Open1' attribute.
- * @see #isSetOpen1()
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @generated
- */
- void setOpen1(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getOpen1 Open1}' attribute.
- *
- *
- * @see #isSetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- void unsetOpen1();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getOpen1 Open1}' attribute is set.
- *
- *
- * @return whether the value of the 'Open1' attribute is set.
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- boolean isSetOpen1();
-
- /**
- * Returns the value of the 'High' attribute.
- *
- *
- * If the meaning of the 'High' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'High' attribute.
- * @see #isSetHigh()
- * @see #unsetHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- BigDecimal getHigh();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getHigh High}' attribute.
- *
- *
- * @param value the new value of the 'High' attribute.
- * @see #isSetHigh()
- * @see #unsetHigh()
- * @see #getHigh()
- * @generated
- */
- void setHigh(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getHigh High}' attribute.
- *
- *
- * @see #isSetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- void unsetHigh();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getHigh High}' attribute is set.
- *
- *
- * @return whether the value of the 'High' attribute is set.
- * @see #unsetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- boolean isSetHigh();
-
- /**
- * Returns the value of the 'Low' attribute.
- *
- *
- * If the meaning of the 'Low' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Low' attribute.
- * @see #isSetLow()
- * @see #unsetLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- BigDecimal getLow();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getLow Low}' attribute.
- *
- *
- * @param value the new value of the 'Low' attribute.
- * @see #isSetLow()
- * @see #unsetLow()
- * @see #getLow()
- * @generated
- */
- void setLow(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getLow Low}' attribute.
- *
- *
- * @see #isSetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- void unsetLow();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getLow Low}' attribute is set.
- *
- *
- * @return whether the value of the 'Low' attribute is set.
- * @see #unsetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- boolean isSetLow();
-
- /**
- * Returns the value of the 'Volume' attribute.
- *
- *
- * If the meaning of the 'Volume' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Volume' attribute.
- * @see #isSetVolume()
- * @see #unsetVolume()
- * @see #setVolume(double)
- * @generated
- */
- double getVolume();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute.
- *
- *
- * @param value the new value of the 'Volume' attribute.
- * @see #isSetVolume()
- * @see #unsetVolume()
- * @see #getVolume()
- * @generated
- */
- void setVolume(double value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute.
- *
- *
- * @see #isSetVolume()
- * @see #getVolume()
- * @see #setVolume(double)
- * @generated
- */
- void unsetVolume();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getVolume Volume}' attribute is set.
- *
- *
- * @return whether the value of the 'Volume' attribute is set.
- * @see #unsetVolume()
- * @see #getVolume()
- * @see #setVolume(double)
- * @generated
- */
- boolean isSetVolume();
-
- /**
- * Returns the value of the 'Change1' attribute.
- *
- *
- * If the meaning of the 'Change1' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Change1' attribute.
- * @see #isSetChange1()
- * @see #unsetChange1()
- * @see #setChange1(double)
- * @generated
- */
- double getChange1();
-
- /**
- * Sets the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute.
- *
- *
- * @param value the new value of the 'Change1' attribute.
- * @see #isSetChange1()
- * @see #unsetChange1()
- * @see #getChange1()
- * @generated
- */
- void setChange1(double value);
-
- /**
- * Unsets the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute.
- *
- *
- * @see #isSetChange1()
- * @see #getChange1()
- * @see #setChange1(double)
- * @generated
- */
- void unsetChange1();
-
- /**
- * Returns whether the value of the '{@link com.example.simple.Quote#getChange1 Change1}' attribute is set.
- *
- *
- * @return whether the value of the 'Change1' attribute is set.
- * @see #unsetChange1()
- * @see #getChange1()
- * @see #setChange1(double)
- * @generated
- */
- boolean isSetChange1();
-
- /**
- * Returns the value of the 'Quotes' containment reference list.
- * The list contents are of type {@link com.example.simple.Quote}.
- *
- *
- * If the meaning of the 'Quotes' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Quotes' containment reference list.
- * @generated
- */
- List getQuotes();
-
-} // Quote
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/SimpleFactory.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/SimpleFactory.java
deleted file mode 100644
index 98dc01d69a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/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;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface SimpleFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- SimpleFactory INSTANCE = com.example.simple.impl.SimpleFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Quote'.
- *
- *
- * @return a new object of class 'Quote'.
- * @generated
- */
- Quote createQuote();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @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.1.1-incubating/impl/src/test/java/com/example/simple/impl/QuoteImpl.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/simple/impl/QuoteImpl.java
deleted file mode 100644
index 39af3bbdb2..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/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;
-
-/**
- *
- * An implementation of the model object 'Quote'.
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface ContainmentTest extends Serializable
-{
- /**
- * Returns the value of the 'Mixed' attribute list.
- *
- *
- * If the meaning of the 'Mixed' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Mixed' attribute list.
- * @generated
- */
- Sequence getMixed();
-
- /**
- * Returns the value of the 'Name' attribute.
- *
- *
- * If the meaning of the 'Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #setName(String)
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link com.example.test.Containment.ContainmentTest#getName Name}' attribute.
- *
- *
- * @param value the new value of the 'Name' attribute.
- * @see #isSetName()
- * @see #unsetName()
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.test.Containment.ContainmentTest#getName Name}' attribute.
- *
- *
- * @see #isSetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- void unsetName();
-
- /**
- * Returns whether the value of the '{@link com.example.test.Containment.ContainmentTest#getName Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Name' attribute is set.
- * @see #unsetName()
- * @see #getName()
- * @see #setName(String)
- * @generated
- */
- boolean isSetName();
-
- /**
- * Returns the value of the 'Contain' containment reference.
- *
- *
- * If the meaning of the 'Contain' containment reference isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Contain' containment reference.
- * @see #isSetContain()
- * @see #unsetContain()
- * @see #setContain(ContainmentTest)
- * @generated
- */
- ContainmentTest getContain();
-
- /**
- * Sets the value of the '{@link com.example.test.Containment.ContainmentTest#getContain Contain}' containment reference.
- *
- *
- * @param value the new value of the 'Contain' containment reference.
- * @see #isSetContain()
- * @see #unsetContain()
- * @see #getContain()
- * @generated
- */
- void setContain(ContainmentTest value);
-
- /**
- * Unsets the value of the '{@link com.example.test.Containment.ContainmentTest#getContain Contain}' containment reference.
- *
- *
- * @see #isSetContain()
- * @see #getContain()
- * @see #setContain(ContainmentTest)
- * @generated
- */
- void unsetContain();
-
- /**
- * Returns whether the value of the '{@link com.example.test.Containment.ContainmentTest#getContain Contain}' containment reference is set.
- *
- *
- * @return whether the value of the 'Contain' containment reference is set.
- * @see #unsetContain()
- * @see #getContain()
- * @see #setContain(ContainmentTest)
- * @generated
- */
- boolean isSetContain();
-
- /**
- * Returns the value of the 'Contain Many' containment reference list.
- * The list contents are of type {@link com.example.test.Containment.ContainmentTest}.
- *
- *
- * If the meaning of the 'Contain Many' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Contain Many' containment reference list.
- * @generated
- */
- List getContainMany();
-
-} // ContainmentTest
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentFactoryImpl.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentFactoryImpl.java
deleted file mode 100644
index 9f51d02590..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentFactoryImpl.java
+++ /dev/null
@@ -1,270 +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.test.Containment.impl;
-
-import commonj.sdo.helper.HelperContext;
-import org.apache.tuscany.sdo.helper.TypeHelperImpl;
-
-import com.example.test.Containment.*;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-import org.apache.tuscany.sdo.SDOFactory;
-
-import org.apache.tuscany.sdo.impl.FactoryBase;
-
-import org.apache.tuscany.sdo.model.ModelFactory;
-
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-/**
- *
- * An implementation of the model Factory.
- * Generator information:
- * patternVersion=1.2; -prefix Containment
- *
- * @generated
- */
-public class ContainmentFactoryImpl extends FactoryBase implements ContainmentFactory
-{
-
- /**
- * The package namespace URI.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_URI = "http://www.example.com/ContainmentTest";
-
- /**
- * The package namespace name.
- *
- *
- * @generated
- */
- public static final String NAMESPACE_PREFIX = "contain";
-
- /**
- * The version of the generator pattern used to generate this class.
- *
- *
- * @generated
- */
- public static final String PATTERN_VERSION = "1.2";
-
- public static final int CONTAINMENT_TEST = 1;
-
- /**
- * Creates an instance of the factory.
- *
- *
- * @generated
- */
- public ContainmentFactoryImpl()
- {
- super(NAMESPACE_URI, NAMESPACE_PREFIX, "com.example.test.Containment");
- }
-
- /**
- * 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.
- *
- *
- * @generated
- */
- public void register(HelperContext scope) {
- if(scope == null) {
- throw new IllegalArgumentException("Scope can not be null");
- }
- TypeHelperImpl th = (TypeHelperImpl)scope.getTypeHelper();
- th.getExtendedMetaData().putPackage(NAMESPACE_URI, this);
- }
-
- /**
- *
- *
- * @generated
- */
- public DataObject create(int typeNumber)
- {
- switch (typeNumber)
- {
- case CONTAINMENT_TEST: return (DataObject)createContainmentTest();
- default:
- return super.create(typeNumber);
- }
- }
-
- /**
- *
- *
- * @generated
- */
- public ContainmentTest createContainmentTest()
- {
- ContainmentTestImpl containmentTest = new ContainmentTestImpl();
- return containmentTest;
- }
-
- // Following creates and initializes SDO metadata for the supported types.
- protected Type containmentTestType = null;
-
- public Type getContainmentTest()
- {
- return containmentTestType;
- }
-
-
- private static boolean isInited = false;
-
- public static ContainmentFactoryImpl init()
- {
- if (isInited) return (ContainmentFactoryImpl)FactoryBase.getStaticFactory(ContainmentFactoryImpl.NAMESPACE_URI);
- ContainmentFactoryImpl theContainmentFactoryImpl = new ContainmentFactoryImpl();
- isInited = true;
-
- // Initialize dependencies
- SDOUtil.registerStaticTypes(SDOFactory.class);
- SDOUtil.registerStaticTypes(ModelFactory.class);
- SDOUtil.registerStaticTypes(InternalFactory.class);
-
- // Create package meta-data objects
- theContainmentFactoryImpl.createMetaData();
-
- // Initialize created meta-data
- theContainmentFactoryImpl.initializeMetaData();
-
- // Mark meta-data to indicate it can't be changed
- //theContainmentFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ????
-
- return theContainmentFactoryImpl;
- }
-
- private boolean isCreated = false;
-
- public void createMetaData()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create types and their properties
- containmentTestType = createType(false, CONTAINMENT_TEST);
- createProperty(true, containmentTestType,ContainmentTestImpl.INTERNAL_MIXED);
- createProperty(true, containmentTestType,ContainmentTestImpl.INTERNAL_NAME);
- createProperty(false, containmentTestType,ContainmentTestImpl.INTERNAL_CONTAIN);
- createProperty(false, containmentTestType,ContainmentTestImpl.INTERNAL_CONTAIN_MANY);
- }
-
- private boolean isInitialized = false;
-
- public void initializeMetaData()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Obtain other dependent packages
- ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI);
- Property property = null;
-
- // Add supertypes to types
-
- // Initialize types and properties
- initializeType(containmentTestType, ContainmentTest.class, "ContainmentTest", false);
- property = getLocalProperty(containmentTestType, 0);
- initializeProperty(property, getSequence(), "mixed", null, 0, -1, ContainmentTest.class, false, false, false);
-
- property = getLocalProperty(containmentTestType, 1);
- initializeProperty(property, theModelPackageImpl.getString(), "Name", null, 1, 1, ContainmentTest.class, false, true, true);
-
- property = getLocalProperty(containmentTestType, 2);
- initializeProperty(property, this.getContainmentTest(), "Contain", null, 1, 1, ContainmentTest.class, false, true, true, true , null);
-
- property = getLocalProperty(containmentTestType, 3);
- initializeProperty(property, this.getContainmentTest(), "ContainMany", null, 0, -1, ContainmentTest.class, false, false, true, true , null);
-
- createXSDMetaData(theModelPackageImpl);
- }
-
- protected void createXSDMetaData(ModelFactoryImpl theModelPackageImpl)
- {
- super.initXSD();
-
- Property property = null;
-
-
- addXSDMapping
- (containmentTestType,
- new String[]
- {
- "name", "ContainmentTest",
- "kind", "mixed"
- });
-
- addXSDMapping
- (getProperty(containmentTestType, ContainmentTestImpl.INTERNAL_MIXED),
- new String[]
- {
- "kind", "elementWildcard",
- "name", ":mixed"
- });
-
- addXSDMapping
- (getProperty(containmentTestType, ContainmentTestImpl.INTERNAL_NAME),
- new String[]
- {
- "kind", "element",
- "name", "Name"
- });
-
- addXSDMapping
- (getProperty(containmentTestType, ContainmentTestImpl.INTERNAL_CONTAIN),
- new String[]
- {
- "kind", "element",
- "name", "Contain"
- });
-
- addXSDMapping
- (getProperty(containmentTestType, ContainmentTestImpl.INTERNAL_CONTAIN_MANY),
- new String[]
- {
- "kind", "element",
- "name", "ContainMany"
- });
-
- property = createGlobalProperty
- ("containTestInstance",
- this.getContainmentTest(),
- new String[]
- {
- "kind", "element",
- "name", "containTestInstance",
- "namespace", "##targetNamespace"
- });
-
- }
-
-} //ContainmentFactoryImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentTestImpl.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentTestImpl.java
deleted file mode 100644
index 14d4678d2d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/com/example/test/Containment/impl/ContainmentTestImpl.java
+++ /dev/null
@@ -1,409 +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.test.Containment.impl;
-
-import com.example.test.Containment.ContainmentFactory;
-import com.example.test.Containment.ContainmentTest;
-
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.tuscany.sdo.impl.DataObjectBase;
-
-/**
- *
- * An implementation of the model object 'Test'.
- *
- *
- *
- *
- * @generated
- */
-public class ContainmentTestImpl extends DataObjectBase implements ContainmentTest
-{
-
- public final static int MIXED = -1;
-
- public final static int NAME = 0;
-
- public final static int CONTAIN = 1;
-
- public final static int CONTAIN_MANY = 2;
-
- public final static int SDO_PROPERTY_COUNT = 3;
-
- public final static int EXTENDED_PROPERTY_COUNT = -1;
-
-
- /**
- * The internal feature id for the 'Mixed' attribute list.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_MIXED = 0;
-
- /**
- * The internal feature id for the 'Name' attribute.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_NAME = 1;
-
- /**
- * The internal feature id for the 'Contain' containment reference.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_CONTAIN = 2;
-
- /**
- * The internal feature id for the 'Contain Many' containment reference list.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_CONTAIN_MANY = 3;
-
- /**
- * The number of properties for this type.
- *
- *
- * @generated
- * @ordered
- */
- public final static int INTERNAL_PROPERTY_COUNT = 4;
-
- protected int internalConvertIndex(int internalIndex)
- {
- switch (internalIndex)
- {
- case INTERNAL_MIXED: return MIXED;
- case INTERNAL_NAME: return NAME;
- case INTERNAL_CONTAIN: return CONTAIN;
- case INTERNAL_CONTAIN_MANY: return CONTAIN_MANY;
- }
- return super.internalConvertIndex(internalIndex);
- }
-
-
- /**
- * The cached value of the '{@link #getMixed() Mixed}' attribute list.
- *
- *
- * @see #getMixed()
- * @generated
- * @ordered
- */
-
- protected Sequence mixed = null;
-
- /**
- *
- *
- * @generated
- */
- public ContainmentTestImpl()
- {
- super();
- }
-
- /**
- *
- *
- * @generated
- */
- public Type getStaticType()
- {
- return ((ContainmentFactoryImpl)ContainmentFactory.INSTANCE).getContainmentTest();
- }
-
- /**
- *
- *
- * @generated
- */
- public Sequence getMixed()
- {
- if (mixed == null)
- {
- mixed = createSequence(INTERNAL_MIXED);
- }
- return mixed;
- }
- /**
- *
- *
- * @generated
- */
- public String getName()
- {
- return (String)get(getMixed(), getType(), INTERNAL_NAME);
- }
- /**
- *
- *
- * @generated
- */
- public void setName(String newName)
- {
- set(getMixed(), getType(), INTERNAL_NAME, newName);
- }
-
- /**
- *
- *
- * @generated
- */
- public void unsetName()
- {
- unset(getMixed(), getType(), INTERNAL_NAME);
- }
-
- /**
- *
- *
- * @generated
- */
- public boolean isSetName()
- {
- return isSet(getMixed(), getType(), INTERNAL_NAME);
- }
-
- /**
- *
- *
- * @generated
- */
- public ContainmentTest getContain()
- {
- return (ContainmentTest)get(getMixed(), getType(), INTERNAL_CONTAIN);
- }
- /**
- *
- *
- * @generated
- */
- public ChangeContext basicSetContain(ContainmentTest newContain, ChangeContext changeContext)
- {
- return basicAdd(getMixed(), getType(), INTERNAL_CONTAIN, newContain, changeContext);
- }
-
- /**
- *
- *
- * @generated
- */
- public void setContain(ContainmentTest newContain)
- {
- set(getMixed(), getType(), INTERNAL_CONTAIN, newContain);
- }
-
- /**
- *
- *
- * @generated
- */
- public ChangeContext basicUnsetContain(ChangeContext changeContext)
- {
- // TODO: implement this method to unset the contained 'Contain' 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();
- }
-
- /**
- *
- *
- * @generated
- */
- public void unsetContain()
- {
- unset(getMixed(), getType(), INTERNAL_CONTAIN);
- }
-
- /**
- *
- *
- * @generated
- */
- public boolean isSetContain()
- {
- return isSet(getMixed(), getType(), INTERNAL_CONTAIN);
- }
-
- /**
- *
- *
- * @generated
- */
- public List getContainMany()
- {
- return getList(getMixed(), getType(), INTERNAL_CONTAIN_MANY);
- }
- /**
- *
- *
- * @generated
- */
- public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext)
- {
- switch (propertyIndex)
- {
- case MIXED:
- return removeFromSequence(getMixed(), otherEnd, changeContext);
- case CONTAIN:
- return basicUnsetContain(changeContext);
- case CONTAIN_MANY:
- return removeFromList(getContainMany(), otherEnd, changeContext);
- }
- return super.inverseRemove(otherEnd, propertyIndex, changeContext);
- }
-
- /**
- *
- *
- * @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 NAME:
- return getName();
- case CONTAIN:
- return getContain();
- case CONTAIN_MANY:
- return getContainMany();
- }
- return super.get(propertyIndex, resolve);
- }
-
- /**
- *
- *
- * @generated
- */
- public void set(int propertyIndex, Object newValue)
- {
- switch (propertyIndex)
- {
- case MIXED:
- setSequence(getMixed(), newValue);
- return;
- case NAME:
- setName((String)newValue);
- return;
- case CONTAIN:
- setContain((ContainmentTest)newValue);
- return;
- case CONTAIN_MANY:
- getContainMany().clear();
- getContainMany().addAll((Collection)newValue);
- return;
- }
- super.set(propertyIndex, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- public void unset(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case MIXED:
- unsetSequence(getMixed());
- return;
- case NAME:
- unsetName();
- return;
- case CONTAIN:
- unsetContain();
- return;
- case CONTAIN_MANY:
- getContainMany().clear();
- return;
- }
- super.unset(propertyIndex);
- }
-
- /**
- *
- *
- * @generated
- */
- public boolean isSet(int propertyIndex)
- {
- switch (propertyIndex)
- {
- case MIXED:
- return mixed != null && !isSequenceEmpty(getMixed());
- case NAME:
- return isSetName();
- case CONTAIN:
- return isSetContain();
- case CONTAIN_MANY:
- return !getContainMany().isEmpty();
- }
- return super.isSet(propertyIndex);
- }
-
- /**
- *
- *
- * @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();
- }
-
-} //ContainmentTestImpl
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/AllTests.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/AllTests.java
deleted file mode 100644
index 7d91456137..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/AllTests.java
+++ /dev/null
@@ -1,41 +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;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
-
- TestSuite suite = new TestSuite();
-
- suite.addTest(org.apache.tuscany.sdo.codegen.AllTests.suite());
- suite.addTest(org.apache.tuscany.sdo.test.AllTests.suite());
-
- return suite;
- }
-
-
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-}
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java
deleted file mode 100644
index d67b53fb7c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/AllTests.java
+++ /dev/null
@@ -1,47 +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.codegen;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
-
- public static TestSuite suite() {
-
- TestSuite suite = new TestSuite();
-
- suite.addTestSuite(BytecodeInterfaceGeneratorTestCase.class);
- suite.addTestSuite(JavaInterfaceGeneratorTestCase.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.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java
deleted file mode 100644
index 4a51310cd0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java
+++ /dev/null
@@ -1,26 +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.codegen;
-
-/**
- * @version $Rev$ $Date$
- */
-public interface Bar1 {
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java
deleted file mode 100644
index e9151b9d46..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java
+++ /dev/null
@@ -1,26 +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.codegen;
-
-/**
- * @version $Rev$ $Date$
- */
-public interface Bar2 {
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
deleted file mode 100644
index 218a725226..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
+++ /dev/null
@@ -1,167 +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.codegen;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Rev$ $Date$
- */
-public class BytecodeInterfaceGeneratorTestCase extends TestCase {
- private MockType foo;
- private BytecodeInterfaceGenerator gen;
- private TestClassLoader cl;
-
- public void testHeaderNoBaseClass() {
- gen.visitType(foo);
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals("Foo", c.getName());
- assertTrue(c.isInterface());
- assertEquals(0, c.getInterfaces().length);
- assertEquals(0, c.getMethods().length);
- }
-
- public void testHeaderWithPackage() {
- gen.visitType(new MockType("org.apache.Foo", null));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals("org.apache.Foo", c.getName());
- assertEquals(0, c.getInterfaces().length);
- assertEquals(0, c.getMethods().length);
- }
-
- public void testHeaderOneBaseClass() throws NoJavaImplementationException {
- foo.addBaseType(new MockType("bar1", Bar1.class));
- gen.visitType(foo);
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals("Foo", c.getName());
- assertEquals(1, c.getInterfaces().length);
- assertEquals(Bar1.class, c.getInterfaces()[0]);
- assertEquals(0, c.getMethods().length);
- }
-
- public void testHeaderMultipleBaseClass() throws NoJavaImplementationException {
- foo.addBaseType(new MockType("bar1", Bar1.class));
- foo.addBaseType(new MockType("bar2", Bar2.class));
- gen.visitType(foo);
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals("Foo", c.getName());
- assertEquals(2, c.getInterfaces().length);
- assertEquals(Bar1.class, c.getInterfaces()[0]);
- assertEquals(Bar2.class, c.getInterfaces()[1]);
- assertEquals(0, c.getMethods().length);
- }
-
- public void testBooleanProperty() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("true", Boolean.TYPE, false, false));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(2, c.getMethods().length);
- Method getter = c.getMethod("isTrue", new Class[0]);
- assertEquals(boolean.class, getter.getReturnType());
- Method setter = c.getMethod("setTrue", new Class[] {boolean.class});
- assertEquals(void.class, setter.getReturnType());
- }
-
- public void testByteArrayProperty() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("bytes", byte[].class, false, false));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(2, c.getMethods().length);
- Method getter = c.getMethod("getBytes", new Class[0]);
- assertEquals(byte[].class, getter.getReturnType());
- Method setter = c.getMethod("setBytes", new Class[] {byte[].class});
- assertEquals(void.class, setter.getReturnType());
- }
-
- public void testObjectProperty() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("bar", Bar1.class, false, false));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(2, c.getMethods().length);
- Method getter = c.getMethod("getBar", new Class[0]);
- assertEquals(Bar1.class, getter.getReturnType());
- Method setter = c.getMethod("setBar", new Class[] {Bar1.class});
- assertEquals(void.class, setter.getReturnType());
- }
-
- public void testReadOnlyProperty() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("int", Integer.TYPE, false, true));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(1, c.getMethods().length);
- Method getter = c.getMethod("getInt", new Class[0]);
- assertEquals(int.class, getter.getReturnType());
- }
-
- public void testManyProperty() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("list", Integer.TYPE, true, false));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(1, c.getMethods().length);
- Method getter = c.getMethod("getList", new Class[0]);
- assertEquals(List.class, getter.getReturnType());
- }
-
- public void testTwoProperties() throws NoJavaImplementationException, NoSuchMethodException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("true", Boolean.TYPE, false, false));
- gen.visitProperty(new MockProperty("int", Integer.TYPE, false, false));
- gen.visitEnd();
- Class c = cl.addClass(gen.getClassData());
- assertEquals(4, c.getMethods().length);
- Method getter = c.getMethod("isTrue", new Class[0]);
- assertEquals(boolean.class, getter.getReturnType());
- Method setter = c.getMethod("setTrue", new Class[] {boolean.class});
- assertEquals(void.class, setter.getReturnType());
- getter = c.getMethod("getInt", new Class[0]);
- assertEquals(int.class, getter.getReturnType());
- setter = c.getMethod("setInt", new Class[] {int.class});
- assertEquals(void.class, setter.getReturnType());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- foo = new MockType("foo", null);
- gen = new BytecodeInterfaceGenerator();
- cl = new TestClassLoader();
- }
-
- private class TestClassLoader extends ClassLoader {
- public TestClassLoader() {
- super(TestClassLoader.class.getClassLoader());
- }
-
- Class addClass(byte[] bytes) {
- return defineClass(null, bytes, 0, bytes.length);
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java
deleted file mode 100644
index 56bf6af9b4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java
+++ /dev/null
@@ -1,26 +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.codegen;
-
-/**
- * @version $Rev$ $Date$
- */
-public interface Foo {
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
deleted file mode 100644
index 6cc0529c5f..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
+++ /dev/null
@@ -1,129 +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.codegen;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import junit.framework.TestCase;
-
-/**
- * @version $Rev$ $Date$
- */
-public class JavaInterfaceGeneratorTestCase extends TestCase {
- private static final String SEP = System.getProperty("line.separator");
-
- private JavaInterfaceGenerator gen;
- private StringWriter writer;
- private MockType foo;
-
- public void testHeaderNoBaseClass() {
- gen.visitType(foo);
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n}\n"), writer.toString());
- }
-
- public void testHeaderWithPackage() {
- gen.visitType(new MockType("org.apache.Foo", null));
- gen.visitEnd();
- assertEquals(localize("package org.apache;\n\npublic interface Foo {\n}\n"), writer.toString());
- }
-
- public void testHeaderOneBaseClass() throws NoJavaImplementationException {
- foo.addBaseType(new MockType("bar1", Bar1.class));
- gen.visitType(foo);
- gen.visitEnd();
- assertEquals(localize("public interface Foo extends org.apache.tuscany.sdo.codegen.Bar1 {\n}\n"), writer.toString());
- }
-
- public void testHeaderMultipleBaseClass() throws NoJavaImplementationException {
- foo.addBaseType(new MockType("bar1", Bar1.class));
- foo.addBaseType(new MockType("bar2", Bar2.class));
- gen.visitType(foo);
- gen.visitEnd();
- assertEquals(localize("public interface Foo extends org.apache.tuscany.sdo.codegen.Bar1, org.apache.tuscany.sdo.codegen.Bar2 {\n}\n"), writer.toString());
- }
-
- public void testBooleanProperty() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("true", Boolean.TYPE, false, false));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\tboolean isTrue();\n\tvoid setTrue(boolean value);\n}\n"), writer.toString());
- }
-
- public void testByteArrayProperty() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("bytes", byte[].class, false, false));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\tbyte[] getBytes();\n\tvoid setBytes(byte[] value);\n}\n"), writer.toString());
- }
-
- public void testObjectProperty() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("bar", Bar1.class, false, false));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\torg.apache.tuscany.sdo.codegen.Bar1 getBar();\n\tvoid setBar(org.apache.tuscany.sdo.codegen.Bar1 value);\n}\n"), writer.toString());
- }
-
- public void testReadOnlyProperty() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("int", Integer.TYPE, false, true));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\tint getInt();\n}\n"), writer.toString());
- }
-
- public void testManyProperty() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("list", Integer.TYPE, true, false));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\tjava.util.List getList();\n}\n"), writer.toString());
- }
-
- public void testTwoProperties() throws NoJavaImplementationException {
- gen.visitType(foo);
- gen.visitProperty(new MockProperty("true", Boolean.TYPE, false, false));
- gen.visitProperty(new MockProperty("int", Integer.TYPE, false, false));
- gen.visitEnd();
- assertEquals(localize("public interface Foo {\n\tboolean isTrue();\n\tvoid setTrue(boolean value);\n\tint getInt();\n\tvoid setInt(int value);\n}\n"), writer.toString());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- writer = new StringWriter();
- gen = new JavaInterfaceGenerator(new PrintWriter(writer));
- foo = new MockType("foo", null);
- }
-
- private String localize(String s) {
- StringBuffer b = new StringBuffer(s.length() + s.length()/10);
- for (int i = 0; i < s.length(); i++) {
- char ch = s.charAt(i);
- if (ch == '\t') {
- b.append(" ");
- } else if (ch == '\n') {
- b.append(SEP);
- } else {
- b.append(ch);
- }
- }
- return b.toString();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java
deleted file mode 100644
index 3e3e87e47b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java
+++ /dev/null
@@ -1,94 +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.codegen;
-
-import java.util.List;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-
-/**
- * @version $Rev$ $Date$
- */
-class MockProperty implements Property {
- private final String name;
- private final Type type;
- private final boolean many;
- private final boolean readOnly;
-
- public MockProperty(String name, Class type, boolean many, boolean readOnly) {
- this.name = name;
- this.type = new MockType(null, type);
- this.many = many;
- this.readOnly = readOnly;
- }
-
- public String getName() {
- return name;
- }
-
- public Type getType() {
- return type;
- }
-
- public boolean isMany() {
- return many;
- }
-
- public boolean isContainment() {
- throw new UnsupportedOperationException();
- }
-
- public Type getContainingType() {
- throw new UnsupportedOperationException();
- }
-
- public Object getDefault() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isReadOnly() {
- return readOnly;
- }
-
- public Property getOpposite() {
- throw new UnsupportedOperationException();
- }
-
- public List /*String*/ getAliasNames() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isNullable() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isOpenContent() {
- throw new UnsupportedOperationException();
- }
-
- public List getInstanceProperties() {
- throw new UnsupportedOperationException();
- }
-
- public Object get(Property property) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java
deleted file mode 100644
index ec848de4fa..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java
+++ /dev/null
@@ -1,104 +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.codegen;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import commonj.sdo.Type;
-import commonj.sdo.Property;
-
-/**
- * @version $Rev$ $Date$
- */
-class MockType implements Type {
- private final String name;
- private final Class javaClass;
- private final List baseTypes = new ArrayList();
-
- public MockType(String name, Class javaClass) {
- this.javaClass = javaClass;
- this.name = name;
- }
-
- public void addBaseType(Type baseType) {
- baseTypes.add(baseType);
- }
-
- public String getName() {
- return name;
- }
-
- public String getURI() {
- throw new UnsupportedOperationException();
- }
-
- public Class getInstanceClass() {
- return javaClass;
- }
-
- public boolean isInstance(Object object) {
- throw new UnsupportedOperationException();
- }
-
- public List /*Property*/ getProperties() {
- throw new UnsupportedOperationException();
- }
-
- public Property getProperty(String propertyName) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isDataType() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isOpen() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isSequenced() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isAbstract() {
- throw new UnsupportedOperationException();
- }
-
- public List /*Type*/ getBaseTypes() {
- return baseTypes;
- }
-
- public List /*Property*/ getDeclaredProperties() {
- throw new UnsupportedOperationException();
- }
-
- public List /*String*/ getAliasNames() {
- throw new UnsupportedOperationException();
- }
-
- public List getInstanceProperties() {
- throw new UnsupportedOperationException();
- }
-
- public Object get(Property property) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
deleted file mode 100644
index 1bdef4b1ef..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
+++ /dev/null
@@ -1,87 +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(ChangeSummaryOnDataObjectTestCase.class);
- suite.addTestSuite(ChangeSummaryPropertyTestCase.class);
- suite.addTestSuite(ChangeSummaryTestCase.class);
- suite.addTestSuite(ContainmentCycleTestCase.class);
- suite.addTestSuite(CrossScopeCopyTestCase.class);
- suite.addTestSuite(DataGraphTestCase.class);
- suite.addTestSuite(DataTypeBaseTypeTestCase.class);
- suite.addTestSuite(DateConversionTestCase.class);
- suite.addTestSuite(DefineOpenContentPropertyTestCase.class);
- suite.addTestSuite(DefineTypeTestCase.class);
- suite.addTestSuite(FormTestCase.class);
- suite.addTestSuite(HelperContextTestCase.class);
- suite.addTestSuite(IsManyTestCase.class);
- suite.addTestSuite(BoundsTestCase.class);
- suite.addTestSuite(JavaSerializeDeserializeTestCase.class);
- suite.addTestSuite(MixedTypeTestCase.class);
- suite.addTestSuite(NeverStaleChangeSummaryTestCase.class);
- suite.addTestSuite(OpenTypeTestCase.class);
- suite.addTestSuite(SchemaLocationTestCase.class);
- suite.addTestSuite(SerializeTypesTestCase.class);
- suite.addTestSuite(SimpleCopyTestCase.class);
- suite.addTestSuite(SimpleDynamicTestCase.class);
- suite.addTestSuite(SimpleEqualityTestCase.class);
- suite.addTestSuite(SubstitutionValuesTestCase.class);
- suite.addTestSuite(TypeConversionTestCase.class);
- suite.addTestSuite(TypeRoundTripTestCase.class);
- suite.addTestSuite(XMLDocumentTestCase.class);
- suite.addTestSuite(XMLHelperTestCase.class);
- suite.addTestSuite(XMLStreamHelperTestCase.class);
- suite.addTestSuite(XPathTestCase.class);
- suite.addTestSuite(XSDHelperTestCase.class);
- suite.addTestSuite(XSDQNameTestCase.class);
- suite.addTestSuite(XMLLoadOptionsTestCase.class);
- suite.addTestSuite(XMLSaveOptionsTestCase.class);
- suite.addTestSuite(XMLUnknownPropertiesTestCase.class);
- suite.addTestSuite(ExpectedExceptionsTestCase.class);
- suite.addTestSuite(TypeHelperTestCase.class);
- suite.addTestSuite(NotificationTestCase.class);
- suite.addTestSuite(ImplSpecificTestCase.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.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java
deleted file mode 100644
index 4d085eae28..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/AnyTypeTest.java
+++ /dev/null
@@ -1,112 +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.InputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URL;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XSDHelper;
-
-public class AnyTypeTest extends TestCase {
- private static TypeHelper typeHelper;
- private static DataFactory dataFactory;
- private static XMLStreamHelper streamHelper;
- private static XSDHelper xsdHelper;
-
- private static final String TEST_MODEL = "/anytype.xsd";
- private static final String TEST_NAMESPACE = "http://www.example.com/anytype";
-
- public void testAnySimpleType() throws Exception {
- final Property property = typeHelper.getOpenContentProperty(TEST_NAMESPACE, "globalElement");
- final Type propertyType = property.getType();
-
- DataObject dataObject = dataFactory.create(TEST_NAMESPACE, "Person");
- dataObject.set("firstName", "Fuhwei");
-
- DataObject rootObject = dataFactory.create(propertyType);
- rootObject.set("anyTypeElement", dataObject);
-
- dataObject = dataFactory.create(TEST_NAMESPACE, "Person");
- dataObject.set("firstName", "Mindy");
- rootObject.set("personElement", dataObject);
-
- // XMLStreamHelper.saveObject has a problem to serialize the any type
- final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
- streamHelper.saveObject(rootObject, streamWriter);
- streamWriter.flush();
- // System.out.println(writer.toString());
-
- final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
- final StringReader reader = new StringReader(writer.toString());
- final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(reader);
- final XMLDocument doc = streamHelper.load(streamReader);
- rootObject = doc.getRootObject();
- DataObject testObject = rootObject.getDataObject("anyTypeElement");
- // System.out.println("anyTypeElement dataobject: " + testObject);
- testObject = rootObject.getDataObject("personElement");
- // System.out.println("personElement dataobject: " + testObject);
- }
-
- public void testAbstractTypeFails() {
- try {
- final DataObject abstractObj = dataFactory.create("commonj.sdo","DataObject");
- assertTrue("Should not succeed", false);
- }
- catch ( final IllegalArgumentException e) {
- // expected result
- }
- }
-
- protected void setUp() throws Exception {
- final HelperContext hc = SDOUtil.createHelperContext();
- typeHelper = hc.getTypeHelper();
- dataFactory = hc.getDataFactory();
- xsdHelper = hc.getXSDHelper();
- streamHelper = SDOUtil.createXMLStreamHelper(hc);
-
- // Populate the meta data for the test (Stock Quote) model
- final URL url = getClass().getResource(TEST_MODEL);
- final InputStream inputStream = url.openStream();
- xsdHelper.define(inputStream, url.toString());
- inputStream.close();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/BoundsTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/BoundsTestCase.java
deleted file mode 100644
index 7f176fe033..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/BoundsTestCase.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 org.apache.tuscany.sdo.test;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.SDOHelper;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.*;
-import commonj.sdo.helper.*;
-
-public class BoundsTestCase extends TestCase {
- private final String TEST_MODEL = "/bounds.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/bounds";
-
- private TypeHelper typeHelper;
- private XSDHelper xsdHelper;
- private DataFactory dataFactory;
-
- public void testBounds() {
- Property priceProperty = typeHelper.getOpenContentProperty(TEST_NAMESPACE, "price");
- assertTrue(priceProperty.isOpenContent());
- assertEquals(SDOHelper.UNSPECIFIED, SDOUtil.getUpperBound(priceProperty));
- assertEquals(0, SDOUtil.getLowerBound(priceProperty));
-
- Type quoteType = typeHelper.getType(TEST_NAMESPACE, "OpenQuote");
- DataObject quote = dataFactory.create(quoteType);
- assertEquals(2, SDOUtil.getUpperBound(quote.getInstanceProperty("symbol")));
- assertEquals(0, SDOUtil.getLowerBound(quote.getInstanceProperty("symbol")));
-
- //XSD default value of maxOccurs and minOccurs is 1, unbounded returns -1 for maxOccurs
- Type quoteType2 = typeHelper.getType(TEST_NAMESPACE, "OpenQuote2");
- DataObject quote2 = dataFactory.create(quoteType2);
- assertEquals(SDOHelper.UNBOUNDED, SDOUtil.getUpperBound(quote2.getInstanceProperty("symbol")));
- assertEquals(1, SDOUtil.getLowerBound(quote2.getInstanceProperty("symbol")));
-
- //XSD default value of maxOccurs and minOccurs is 1
- Type quoteType3 = typeHelper.getType(TEST_NAMESPACE, "OpenQuote3");
- DataObject quote3 = dataFactory.create(quoteType3);
- assertEquals(1, SDOUtil.getUpperBound(quote3.getInstanceProperty("symbol")));
- assertEquals(1, SDOUtil.getLowerBound(quote3.getInstanceProperty("symbol")));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- HelperContext hc = SDOUtil.createHelperContext();
- typeHelper = hc.getTypeHelper();
- dataFactory = hc.getDataFactory();
- xsdHelper = hc.getXSDHelper();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- xsdHelper.define(inputStream, url.toString());
- inputStream.close();
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryOnDataObjectTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryOnDataObjectTestCase.java
deleted file mode 100644
index b9b9c0f2ea..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryOnDataObjectTestCase.java
+++ /dev/null
@@ -1,216 +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.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-
-public class ChangeSummaryOnDataObjectTestCase extends TestCase {
-
-
- private final String TEST_DATA = "/simplechangesummary.xml";
- HelperContext hc;
- XSDHelper xh;
- TypeHelper th;
-
- public void testBasicsDO() {
- Type cst = th.getType("commonj.sdo","ChangeSummaryType");
- Type strt = th.getType("commonj.sdo", "String");
-
- Type newt = SDOUtil.createType(hc, "testcases.changesummary", "simpleCS", false);
- Property strProp = SDOUtil.createProperty(newt, "strElem", strt);
- SDOUtil.createProperty(newt, "changeSummary", cst);
-
- DataObject iNewt = hc.getDataFactory().create(newt);
-
- testBasicsBody(strProp, iNewt);
-}
-
- public void testBasicsDG() {
-
- Type strt = th.getType("commonj.sdo", "String");
-
-
- Type newt = SDOUtil.createType(hc, "testcases.changesummary", "simpleNOCS", false);
- Property strProp = SDOUtil.createProperty(newt, "strElem", strt);
-
- DataGraph graph = SDOUtil.createDataGraph();
- DataObject iNewt = graph.createRootObject(newt);
-
- testBasicsBody(strProp, iNewt);
-}
-
-
- /**
- * @param strProp
- * @param iNewt
- */
- private void testBasicsBody(Property strProp, DataObject iNewt) {
- ChangeSummary cs = iNewt.getChangeSummary();
- cs.beginLogging();
-
- List co = cs.getChangedDataObjects();
- assertEquals(0, co.size());
- iNewt.set(strProp, "some text");
- assertEquals(0, co.size());
- co = cs.getChangedDataObjects();
- assertEquals(1, co.size());
-
- List oldValues = cs.getOldValues((DataObject)co.get(0));
-
- ChangeSummary.Setting ov1 = (ChangeSummary.Setting)oldValues.get(0);
- Property p = ov1.getProperty();
- assertEquals("strElem", p.getName());
- Object v = ov1.getValue();
- assertEquals(null, v);
-
- assertTrue(cs.isLogging());
- cs.endLogging();
- assertFalse(cs.isLogging());
-
- }
-
-
-
- public void testDynamicNestedDataObjectsDG() throws Exception {
- DataGraph dataGraph = SDOUtil.createDataGraph();
- DataObject quote = dataGraph.createRootObject(th.getType("http://www.example.com/simple", "Quote"));
-
- testDynamicNestedDOBody(quote);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dataGraph, baos, null);
- // SDOUtil.saveDataGraph(dataGraph, System.out, null);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
-
-
- assertEquals(1, quote.getList("quotes").size());
- assertEquals("fbnt", quote.getString("symbol"));
- dataGraph.getChangeSummary().undoChanges();
- // SDOUtil.saveDataGraph(dataGraph, System.out, null);
- assertEquals(0, quote.getList("quotes").size());
- assertNull(quote.getString("symbol"));
-
-
- }
-
- public void testDynamicNestedDataObjectsDO() throws Exception {
- Type quoteType = th.getType("http://www.example.com/simpleCS", "RootQuote");
- DataObject quote = hc.getDataFactory().create(quoteType);
-
- testDynamicNestedDOBody(quote);
- //hc.getXMLHelper().save(quote, "http://www.example.com/simpleCS", "stockQuote", System.out);
- assertEquals(1, quote.getList("quotes").size());
- assertEquals("fbnt", quote.getString("symbol"));
-
- quote.getChangeSummary().undoChanges();
-
- assertEquals(0, quote.getList("quotes").size());
- assertNull(quote.getString("symbol"));
-
-
-
- }
-
- /**
- * @param quote
- */
- private void testDynamicNestedDOBody(DataObject quote) {
- // Begin logging changes
- //
- ChangeSummary changeSummary = quote.getChangeSummary();
- assertNotNull(changeSummary);
- assertFalse(changeSummary.isLogging());
- changeSummary.beginLogging();
-
-
- // Modify the data graph in various fun and interesting ways
- //
- quote.setString("symbol", "fbnt");
- quote.setString("companyName", "FlyByNightTechnology");
- quote.setBigDecimal("price", new BigDecimal("1000.0"));
- quote.setBigDecimal("open1", new BigDecimal("1000.0"));
- quote.setBigDecimal("high", new BigDecimal("1000.0"));
- quote.setBigDecimal("low", new BigDecimal("1000.0"));
- quote.setDouble("volume", 1000);
- quote.setDouble("change1", 1000);
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- changeSummary.endLogging();
- assertEquals(2, changeSummary.getChangedDataObjects().size()); // 2 DataObjects
- assertTrue(changeSummary.getChangedDataObjects().contains(quote));
- assertTrue(changeSummary.getChangedDataObjects().contains(child));
- assertFalse(changeSummary.isCreated(quote));
- assertTrue(changeSummary.isCreated(child));
-
- ChangeSummary.Setting ov = changeSummary.getOldValue(quote, quote.getType().getProperty("symbol"));
- assertNull(ov.getValue());
-
-
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
-// uncomment these lines for sending aspect trace to a file
-// tracing.lib.TraceMyClasses tmc = (TraceMyClasses)Aspects.aspectOf(TraceMyClasses.class);
-// tmc.initStream(new PrintStream("c:\\temp\\trace.log"));
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource("/simple.xsd");
- InputStream inputStream = url.openStream();
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
- xh = hc.getXSDHelper();
- xh.define(inputStream, url.toString());
- inputStream.close();
-
- URL url2 = getClass().getResource("/simpleWithChangeSummary.xsd");
- InputStream inputStream2 = url2.openStream();
- xh.define(inputStream2, url2.toString());
- inputStream.close();
-
-
-
-}
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
deleted file mode 100644
index ace509d1b4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
+++ /dev/null
@@ -1,219 +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.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class ChangeSummaryPropertyTestCase extends TestCase {
- private final String TEST_MODEL = "/simpleWithChangeSummary.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/simpleCS";
-
- private final String TEST_DATA_BEFORE_UNDO = "/simpleWithChangeSummary.xml";
- private final String TEST_DATA_AFTER_UNDO = "/simpleWithChangeSummaryUndone.xml";
-
- HelperContext hc;
- DataFactory dataFactory;
- XMLHelper xmlHelper;
-
- void verify(ChangeSummary cs, DataObject quote, String nameSpace, String element, String beforeUndo, String afterUndo) throws IOException {
- // Stop logging changes and serialize the resulting data graph
- //
- cs.endLogging();
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(quote, nameSpace, element, baos);
- //xmlHelper.save(quote, nameSpace, element, System.out);
-
- byte[] bytes = baos.toByteArray();
- URL url = getClass().getResource(beforeUndo);
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(bytes), url));
-
- DataObject loaded = xmlHelper.load(new ByteArrayInputStream(bytes)).getRootObject();
- baos.reset();
- xmlHelper.save(loaded, nameSpace, element, baos);
- //xmlHelper.save(loaded, nameSpace, element, System.out);
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), url));
-
- // Undo all changes and then serialize the resulting data graph again
- //
- cs.undoChanges();
-
- baos.reset();
- xmlHelper.save(quote, nameSpace, element, baos);
- //xmlHelper.save(quote, nameSpace, element, System.out);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(afterUndo)));
- }
-
- /**
- * ChangeSummary property test.
- */
- protected final void change(String nameSpace, String beforeUndo, String afterUndo) throws Exception {
- Type quoteType = hc.getTypeHelper().getType(nameSpace, "RootQuote");
- DataObject quote = dataFactory.create(quoteType);
-
- ChangeSummary cs = quote.getChangeSummary();
- ChangeSummary csp = (ChangeSummary)quote.get("changes");
-
- assertSame(cs, csp);
-
- quote.setString("symbol", "fbnt");
- quote.setString("companyName", "FlyByNightTechnology");
- quote.setBigDecimal("price", new BigDecimal("1000.0"));
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("1500.0"));
- child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
- child = child.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.99"));
- child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2500.0"));
-
- // Begin logging changes
- //
- cs.beginLogging();
-
- // Modify the data graph in various ways
- //
- quote.setString("symbol", "FBNT");
- quote.setBigDecimal("price", new BigDecimal("999.0"));
- quote.setDouble("volume", 1000);
-
- child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("3000.0"));
- child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("4000.0"));
-
- quote.getDataObject("quotes[2]").delete();
-
- verify(cs, quote, nameSpace, "stockQuote", beforeUndo, afterUndo);
- }
-
- /**
- * Simple ChangeSummary property test.
- */
- public void testChangeSummary() throws Exception {
- change(TEST_NAMESPACE, TEST_DATA_BEFORE_UNDO, TEST_DATA_AFTER_UNDO);
- }
-
- static final String SequenceTest_NameSpace = "http://www.example.com/sequenceCS";
-
- /**
- * Mixed ChangeSummary property test.
- */
- public void testMixedChangeSummary() throws Exception {
- change(SequenceTest_NameSpace, "/mixedChangeSummary.xml", "/mixedChangeSummaryUndone.xml");
- }
-
- protected final DataObject createDataObject(Type quoteType, Object value, Sequence sequence, Property property) {
- DataObject child = dataFactory.create(quoteType);
- child.set("symbol", value);
- sequence.add(property, child);
- return child;
- }
-
- static final String SequenceTest_ELEMENT = "openQuote";
-
- private XSDHelper xsdHelper;
-
- /**
- * Open/any ChangeSummary property test.
- */
- public void testOpenChangeSummary() throws Exception {
- DataObject quote = dataFactory.create(xsdHelper.getGlobalProperty(SequenceTest_NameSpace, SequenceTest_ELEMENT, true).getType());
-
- ChangeSummary cs = quote.getChangeSummary();
- ChangeSummary csp = (ChangeSummary)quote.get("changes");
-
- assertSame(cs, csp);
-
- quote.set("symbol", "fbnt");
- Property property = xsdHelper.getGlobalProperty("http://www.example.com/open", "openStockQuote", true);
- Type quoteType = property.getType();
- List openStockQuotes = ((DataObject)quote).getList(property);
-
- addQuote(openStockQuotes, quoteType, "1500.0");
- DataObject osq2 = addQuote(openStockQuotes, quoteType, "2000.0");
- addQuote(osq2.getList(property), quoteType, "2000.99");
- addQuote(openStockQuotes, quoteType, "2500.0");
-
- // Begin logging changes
- //
- cs.beginLogging();
-
- // Modify the data graph in various ways
- //
- quote.set("symbol", "FBNT");
-
- addQuote(openStockQuotes, quoteType, "3000.0");
- addQuote(openStockQuotes, quoteType, "4000.0");
-
- openStockQuotes.remove(osq2);
-
-
- verify(cs, quote, SequenceTest_NameSpace, SequenceTest_ELEMENT, "/openChangeSummary.xml", "/openChangeSummaryUndone.xml");
- }
-
- private DataObject addQuote(List openStockQuotes, Type quoteType,
- Object value) {
- DataObject osq = dataFactory.create(quoteType);
- osq.set("symbol", value);
- openStockQuotes.add(osq);
- return osq;
- }
-
- void define(String model) throws Exception {
- // Populate the meta data for the test model
- URL url = getClass().getResource(model);
- xsdHelper.define(url.openStream(), url.toString());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- xsdHelper = hc.getXSDHelper();
- dataFactory = hc.getDataFactory();
- xmlHelper = hc.getXMLHelper();
-
- // Populate the meta data for the test (Stock Quote) model
- define(TEST_MODEL);
-
- define("/SequenceChangeSummary.xsd");
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java
deleted file mode 100644
index e956720117..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.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 org.apache.tuscany.sdo.test;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.XSDHelper;
-
-
-public class ChangeSummaryTestCase extends TestCase {
- private final String TEST_MODEL = "/simple.xsd";
- private final String TEST_DATA = "/simplechangesummary.xml";
-
- /**
- * Simple ChangeSummary test.
- */
- public void testChangeSummary() throws IOException {
- // Create an empty data graph and add a root object, an instance of type Quote
- //
-
- DataGraph dataGraph = SDOUtil.createDataGraph();
- DataObject quote = dataGraph.createRootObject("http://www.example.com/simple", "Quote");
-
- // Begin logging changes
- //
- ChangeSummary changeSummary = dataGraph.getChangeSummary();
- changeSummary.beginLogging();
-
- // Modify the data graph in various fun and interesting ways
- //
- quote.setString("symbol", "fbnt");
- quote.setString("companyName", "FlyByNightTechnology");
- quote.setBigDecimal("price", new BigDecimal("1000.0"));
- quote.setBigDecimal("open1", new BigDecimal("1000.0"));
- quote.setBigDecimal("high", new BigDecimal("1000.0"));
- quote.setBigDecimal("low", new BigDecimal("1000.0"));
- quote.setDouble("volume", 1000);
- quote.setDouble("change1", 1000);
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- // Stop logging changes and print the resulting data graph to stdout
- //
- changeSummary.endLogging();
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dataGraph, baos, null);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentCycleTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentCycleTestCase.java
deleted file mode 100644
index 843ab9b982..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentCycleTestCase.java
+++ /dev/null
@@ -1,866 +0,0 @@
-/**
- *
- * Copyright 2005 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import junit.framework.TestCase;
-import commonj.sdo.DataObject;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import com.example.test.Containment.ContainmentFactory;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Tests serialization of containment cycles. For JavaSerialization, the test case
- * passes if an IllegalStateException is thrown. For XMLHelper and XMLStreamHelper
- * serialization, serization should complete without throwing an Exception. In all
- * cases, the actual structure of the DataObject should not be changed by the
- * method call to serialize the DO.
- *
- * The same test is run for a static model (Type created using XSD2JavaGenerator), a
- * dynamic model (Type created using TypeHelper), and a 'mixed' model (Type created
- * using XSDHelper - dynamic Type creation using static resources).
- */
-public class ContainmentCycleTestCase extends TestCase {
-
- private static final String CONTAIN_URI = "http://www.example.com/ContainmentTest";
- private static final String CONTAIN_TYPE = "ContainmentTest";
- private static HelperContext staticScope;
- private static HelperContext dynamicScope;
- private static HelperContext mixedScope;
- private static boolean initialized = false;
- private static boolean mixedCreated = false;
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the static version of this test case.
- */
- // Note: Static test cases are prevented due to a JVM Error in ObjectOutputStream.
- // The IllegalStateException thrown by Java serialization is caught, which in turn allows
- // the StackOverflowException to occur. The catcher is catching RuntimeException, so it does
- // not matter which Exception is thrown by the SDO code.
- public void atestStaticOneMemberSingleValueSetDataObject() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
-
- setSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the static version of this test case.
- */
- public void atestStaticNMemberSingleValueSetDataObject() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the static version of this test case.
- */
- public void atestStaticOneMemberMultiValueSetDataObject() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the static version of this test case.
- */
- public void atestStaticNMemberMultiValueSetDataObject() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the static version
- * of this test case.
- */
- public void atestStaticOneMemberReturnedList() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
-
- returnedListOneMember(dataObj1);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the static version
- * of this test case.
- */
- public void atestStaticNMemberReturnedList() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- returnedListNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the static version of this test case.
- */
- public void atestStaticOneMemberSingleValueSequence() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
-
- sequenceSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the static version of this test case.
- */
- public void atestStaticNMemberSingleValueSequence() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of
- * serialization. This is the static version of this test case.
- */
- public void atestStaticOneMemberMultiValueSequence() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of
- * serialization. This is the static version of this test case.
- */
- public void atestStaticNMemberMultiValueSequence() {
- final DataObject dataObj1 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj2 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
- final DataObject dataObj3 = (DataObject) ContainmentFactory.INSTANCE.createContainmentTest();
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, staticScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the hybrid version of this test case.
- */
- public void testHybridOneMemberSingleValueSetDataObject() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- setSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the hybrid version of this test case.
- */
- public void testHybridNMemberSingleValueSetDataObject() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the hybrid version of this test case.
- */
- public void testHybridOneMemberMultiValueSetDataObject() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
-
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the hybrid version of this test case.
- */
- public void testHybridNMemberMultiValueSetDataObject() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the hybrid version
- * of this test case.
- */
- public void testHybridOneMemberReturnedList() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- returnedListOneMember(dataObj1);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the hybrid version
- * of this test case.
- */
- public void testHybridNMemberReturnedList() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- returnedListNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the hybrid version of this test case.
- */
- public void testHybridOneMemberSingleValueSequence() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- sequenceSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the hybrid version of this test case.
- */
- public void testHybridNMemberSingleValueSequence() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of serialization.
- * This is the hybrid version of this test case.
- */
- public void testHybridOneMemberMultiValueSequence() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of serialization.
- * This is the hybrid version of this test case.
- */
- public void testHybridNMemberMultiValueSequence() {
- assertTrue("Test case cannot proceed due to error creating Type.", mixedCreated);
-
- final DataObject dataObj1 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = mixedScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, mixedScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the dynamic version of this test case.
- */
- public void testDynamicOneMemberSingleValueSetDataObject() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI,
- CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- setSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a single valued property
- * and verify the behavior of serialization. This is the dynamic version of this test case.
- */
- public void testDynamicNMemberSingleValueSetDataObject() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the dynamic version of this test case.
- */
- public void testDynamicOneMemberMultiValueSetDataObject() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using set____ on a multi valued property
- * and verify the behavior of serialization. This is the dynamic version of this test case.
- */
- public void testDynamicNMemberMultiValueSetDataObject() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- setManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the dynamic version
- * of this test case.
- */
- public void testDynamicOneMemberReturnedList() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- returnedListOneMember(dataObj1);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle by making updates to a List returned
- * from the DataObject and verify the behavior of serialization. This is the dynamic version
- * of this test case.
- */
- public void testDynamicNMemberReturnedList() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- returnedListNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the dynamic version of this test case.
- */
- public void testDynamicOneMemberSingleValueSequence() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
-
- sequenceSingleValueOneMember(dataObj1);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a single valued property, and verify the behavior of
- * serialization. This is the dynamic version of this test case.
- */
- public void testDynamicNMemberSingleValueSequence() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceSingleValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create a 1-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of
- * serialization. This is the dynamic version of this test case.
- */
- public void testDynamicOneMemberMultiValueSequence() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceMultiValueOneMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to create an n-Member Containment Cycle using by using a Sequence to make updates
- * to the DataObject, affecting a multi valued property, and verify the behavior of
- * serialization. This is the dynamic version of this test case.
- */
- public void testDynamicNMemberMultiValueSequence() {
- final DataObject dataObj1 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj2 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- final DataObject dataObj3 = dynamicScope.getDataFactory().create(CONTAIN_URI, CONTAIN_TYPE);
- dataObj1.setString("Name", "dataObj1");
- dataObj2.setString("Name", "dataObj2");
- dataObj3.setString("Name", "dataObj3");
-
- sequenceManyValueNMember(dataObj1, dataObj2, dataObj3);
- attemptSerialization(dataObj1, dynamicScope);
- }
-
- /**
- * Attempt to serialize the DataObject in via XML, XMLStreamHelper,
- * and Java serialization.
- * @param dataObj
- */
- private void attemptSerialization(final DataObject dataObj, final HelperContext scope) {
-
- assertTrue("Containment cycle was not established.",
- containmentCycleExists(dataObj));
-
- try {
- serializeDataObjectXML(dataObj, scope);
- } catch (final Exception e) {
- fail("XML serialization of a containment cycle resulted in a(n) " + e.getClass().getName() + ".");
- e.printStackTrace();
- }
-
- assertTrue("Containment cycle was affected by XMLHelper serialization.",
- containmentCycleExists(dataObj));
-
- try {
- serializeDataObjectJava(dataObj);
- fail("Java serialization of a containment cycle should result in an IllegalStateException.");
- } catch (final Exception e) {
- // Do nothing. An Exception is expected in this case.
- }
-
- assertTrue("Containment cycle was affected by Java serialization.",
- containmentCycleExists(dataObj));
-
- try {
- serializeDataObjectStream(dataObj, scope);
- } catch (final Exception e) {
- fail("XMLStreamHelper serialization of a containment cycle resulted in a(n) " + e.getClass().getName() + ".");
- e.printStackTrace();
- }
- assertTrue("Containment cycle was affected by XMLStreamHelper serialization.",
- containmentCycleExists(dataObj));
- }
- /**
- * Uses the XMLHelper to serialize the input DataObject
- *
- * @param dataObject
- * @param fileName
- * @throws IOException
- */
- private static void serializeDataObjectXML(final DataObject dataObject, final HelperContext scope) {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- final Type type = dataObject.getType();
-
- try {
- scope.getXMLHelper().save(dataObject, type.getURI(), type.getName(), baos);
- }
- catch (final IOException e) {
- fail("Could not complete test case due to IOException.");
- }
- }
-
- /**
- * Uses Java serialization to serialize the input DataObject
- *
- * @param dataObject
- * @param fileName
- * @throws IOException
- */
- private static void serializeDataObjectStream(final DataObject dataObject, final HelperContext scope) {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- final XMLOutputFactory factory = XMLOutputFactory.newInstance();
- XMLStreamWriter serializer;
- final XMLStreamHelper xmlStreamHelper = SDOUtil.createXMLStreamHelper(scope);
- try {
- serializer = factory.createXMLStreamWriter(baos);
- xmlStreamHelper.saveObject(dataObject, serializer);
- serializer.flush();
- }
- catch (final XMLStreamException e) {
- fail("Exception encountered during XMLStreamHelper serialization.");
- e.printStackTrace();
- }
- }
-
- /**
- * Uses Java serialization to serialize the input DataObject
- *
- * @param dataObject
- * @param fileName
- * @throws IOException
- */
- private static void serializeDataObjectJava(final DataObject dataObject) {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- try {
- final ObjectOutputStream out = new ObjectOutputStream(baos);
- out.writeObject(dataObject);
- out.close();
- }
- catch (final IOException e) {
- fail("Could not complete test case due to IOException.");
- }
- }
-
- /**
- * Returns true if input DataObject root is part of a containment cycle,
- * false otherwise.
- * @param root
- * @return
- */
- private static boolean containmentCycleExists (final DataObject root)
- {
- DataObject curr = root.getContainer();
-
- while (curr != null)
- {
- if (curr == root) {
- return true;
- }
-
- curr = curr.getContainer();
- }
- return false;
- }
-
- /**
- * Use setDataObject to create a one member containment cycle.
- * @param dataObj1
- */
- private void setSingleValueOneMember(final DataObject dataObj1) {
- dataObj1.setDataObject("Contain", dataObj1);
- }
-
- /**
- * Use setDataObject to create an N-member containment cycle.
- * @param dataObj1
- * @param dataObj2
- * @param dataobj3
- */
- private void setSingleValueNMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- dataObj1.setDataObject("Contain", dataObj2);
- dataObj2.setDataObject("Contain", dataObj3);
- dataObj3.setDataObject("Contain", dataObj1);
- }
-
- /**
- * Use setList to create a one member containment cycle.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void setMultiValueOneMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- final List addList = new ArrayList();
-
- addList.add(dataObj2);
- addList.add(dataObj1);
- addList.add(dataObj3);
- dataObj1.setList("ContainMany", addList);
- }
-
- /**
- * Use setList to create an N-member containment cycle.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void setManyValueNMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- final List addList = new ArrayList();
-
- dataObj1.setDataObject("Contain", dataObj2);
- dataObj2.setDataObject("Contain", dataObj3);
- addList.add(dataObj1);
- dataObj3.setList("ContainMany", addList);
- }
-
- /**
- * Create a 1-member containment cycle by making updates to a returned List.
- * @param dataObj1
- */
- private void returnedListOneMember(final DataObject dataObj1) {
- final List returnedList = dataObj1.getList("ContainMany");
-
- returnedList.add(dataObj1);
- }
-
- /**
- * Create an n-member containment cycle by making updates to a returned List.
- * @param dataObj1
- * @param dataObj2
- * @param dataobj3
- */
- private void returnedListNMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- dataObj1.setDataObject("Contain", dataObj2);
- dataObj2.setDataObject("Contain", dataObj3);
-
- final List returnedList = dataObj3.getList("ContainMany");
-
- returnedList.add(dataObj1);
- }
-
- /**
- * Create a 1-member containment cycle by making updates to a Sequence.
- * The data member in this case is single valued.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void sequenceSingleValueOneMember(final DataObject dataObj1) {
- assertTrue("DataObject is not Sequenced. Test case may not proceed.", dataObj1.getType().isSequenced());
-
- final Sequence sequence = dataObj1.getSequence();
-
- sequence.add("Contain", dataObj1);
- }
-
- /**
- * Create an n-member containment cycle by making updates to a Sequence.
- * The data member in this case is single valued.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void sequenceSingleValueNMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- assertTrue("DataObject is not Sequenced. Test case may not proceed.", dataObj1.getType().isSequenced());
-
- final Sequence sequence1 = dataObj1.getSequence();
- final Sequence sequence2 = dataObj2.getSequence();
- final Sequence sequence3 = dataObj3.getSequence();
-
- sequence1.add("Contain", (Object) dataObj2);
- sequence2.add("Contain", (Object) dataObj3);
-
- sequence3.add("Contain", (Object) dataObj1);
- }
-
- /**
- * Create a 1-member containment cycle by making updates to a Sequence.
- * The data member in this case is many valued.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void sequenceMultiValueOneMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- assertTrue("DataObject is not Sequenced. Test case may not proceed.", dataObj1.getType().isSequenced());
-
- final Sequence sequence = dataObj1.getSequence();
-
- sequence.add("ContainMany", dataObj2);
- sequence.add("ContainMany", dataObj3);
- sequence.add("ContainMany", dataObj1);
- }
-
- /**
- * Create an n-member containment cycle by making updates to a Sequence.
- * The data member in this case is many valued.
- * @param dataObj1
- * @param dataObj2
- * @param dataObj3
- */
- private void sequenceManyValueNMember(final DataObject dataObj1, final DataObject dataObj2, final DataObject dataObj3) {
- assertTrue("DataObject is not Sequenced. Test case may not proceed.", dataObj1.getType().isSequenced());
-
- final List addList = new ArrayList();
-
- addList.add(dataObj2);
- dataObj1.setList("ContainMany", addList);
-
- addList.clear();
- addList.add(dataObj3);
- dataObj2.setList("ContainMany", addList);
-
- final Sequence sequence = dataObj3.getSequence();
-
- sequence.add("ContainMany", dataObj1);
- }
-
- public void setUp() {
- if (!initialized) {
- staticScope = SDOUtil.createHelperContext();
- ContainmentFactory.INSTANCE.register(staticScope);
-
- dynamicScope = SDOUtil.createHelperContext();
- ContainmentTypeUtil.createDynamically(dynamicScope);
-
- mixedScope = SDOUtil.createHelperContext();
- mixedCreated = ContainmentTypeUtil.createDynamicWithStaticResources(mixedScope);
-
- initialized = true;
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentTypeUtil.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentTypeUtil.java
deleted file mode 100644
index f602555fa6..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ContainmentTypeUtil.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- *
- * Copyright 2005 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * Provides methods to dynamically create the ContainemntTest Type using the XSDHelper
- * and the TypeHelper.
- */
-public class ContainmentTypeUtil {
-
- /**
- * createDynamicWithStaticResources creates the DataObject type from an existing
- * XSD. The same XSD is used to create the Types statically using the XSD2JavaGenerator.
- * The XSD should be kept in synch with the createDynamically method in this class.
- * @throws IOException
- * @return true if
- */
- public static boolean createDynamicWithStaticResources(HelperContext hc) {
- try {
- // Populate the meta data for the test model (ContainTest)
- URL url = ContainmentCycleTestCase.class.getResource("/containmenttest.xsd");
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- } catch(IOException e) {
- e.printStackTrace();
- return false;
- }
- return true;
- }
-
- /**
- * createDynamically() creates the SDO Types using the TypeHelper. This method should be kept in
- * synch with the XSD used for createDynamicallyWithStaticResources. The same XSD is used for
- * the static generation of SDO Types using XSD2JavaGenerator.
- */
- public static void createDynamically(HelperContext hc) {
- TypeHelper types = hc.getTypeHelper();
- Type stringType = types.getType("commonj.sdo", "String");
-
- DataObject testType = hc.getDataFactory().create("commonj.sdo", "Type");
- testType.set("uri", "http://www.example.com/ContainmentTest");
- testType.set("name", "ContainmentTest");
- testType.setBoolean("sequenced", true);
-
- DataObject nameProperty = testType.createDataObject("property");
- nameProperty.set("name", "Name");
- nameProperty.set("type", stringType);
-
- DataObject containProperty = testType.createDataObject("property");
- containProperty.set("name", "Contain");
- containProperty.setBoolean("containment", true);
- containProperty.set("type", testType);
-
- DataObject containManyProperty = testType.createDataObject("property");
- containManyProperty.set("name", "ContainMany");
- containManyProperty.setBoolean("many", true);
- containManyProperty.setBoolean("containment", true);
- containManyProperty.set("type", testType);
-
- types.define(testType);
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/CrossScopeCopyTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/CrossScopeCopyTestCase.java
deleted file mode 100644
index 4a8ed34477..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/CrossScopeCopyTestCase.java
+++ /dev/null
@@ -1,474 +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.math.BigDecimal;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Vector;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-public class CrossScopeCopyTestCase extends TestCase
-{
- // Literals
- private static final String TEST_NAMESPACE = "http://www.example.com/bank";
- private static final String BANK_MODEL = "/bank.xsd";
- private static final String BANK_TYPE = "bankType";
- private static final String BRANCH_TYPE = "branchType";
- private static final String SERVICE_TYPE = "serviceType";
- private static final String ACCOUNT_TYPE = "accountType";
- private static final String CUSTOMER_TYPE = "customerType";
- private static final String ADDRESS_TYPE = "addressType";
- private static final String DYNAMIC_TYPE = "dynamicType";
-
- // SDO model objects
- private HelperContext hca;
- private HelperContext hcb;
- private TypeHelper scopeA;
- private TypeHelper scopeB;
-
- // SDO instance objects
- private DataObject bankSDO;
- private DataObject branchSDO1;
- private DataObject branchSDO2;
- private DataObject serviceSDO1;
- private DataObject serviceSDO2;
- private DataObject serviceSDO3;
- private DataObject customerSDO1;
- private DataObject customerSDO2;
- private DataObject customerSDO3;
- private DataObject customerSDO4;
-
- private int indent = 0;
-
- public void testCrossScopeCopy() throws IOException
- {
- CopyHelper copyHelperB = SDOUtil.createCrossScopeCopyHelper(hcb);
-
- // Perform Shallow Copy Test
- DataObject copiedSDO = copyHelperB.copyShallow(bankSDO);
- shallowCopyAssertions(bankSDO, copiedSDO);
-
- // Perform Deep Copy Test
- copiedSDO = copyHelperB.copy(bankSDO);
- deepCopyAssertions(bankSDO, copiedSDO);
-
- // Inter-Reference Copy
- copiedSDO = copyHelperB.copy(customerSDO1);
- DataObject prop = (DataObject)copiedSDO.get("HomeBranch");
- assertTrue(prop==null);
-
- // Perform invalid namespace test
- DataObject sdo = hca.getDataFactory().create(TEST_NAMESPACE, DYNAMIC_TYPE );
- sdo.set("custNum", "099" );
- sdo.set("firstName", "John");
- sdo.set("lastName", "Doe");
- boolean failed = false;
- try
- {
- // In this case, we are copying an object to a scope
- // where the object's type has not been defined. That
- // will generate a null pointer exception what we will
- // catch.
- copyHelperB.copy(sdo);
- }
- catch(java.lang.NullPointerException ex)
- {
- failed = true;
- }
- assertTrue(failed);
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // Create Two Scopes
- hca = SDOUtil.createHelperContext();
- hcb = SDOUtil.createHelperContext();
- scopeA = hca.getTypeHelper();
- scopeB = hcb.getTypeHelper();
-
- // Populate scopes with bank model now
- URL url = getClass().getResource(BANK_MODEL);
- InputStream inputStream = url.openStream();
- hca.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- inputStream = url.openStream();
- hcb.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
- // Now Populate scopeA with some dynamic models
- populateScopeWithDynamicTypes(scopeA);
-
- // Construct Source Tree
- constructSourceTree(hca.getDataFactory());
- }
-
- private void shallowCopyAssertions(DataObject sdo, DataObject copiedSdo)
- {
- assertEquals(sdo.getType().getName(), copiedSdo.getType().getName());
- assertEquals(sdo.getType().getURI(), copiedSdo.getType().getURI());
- assertNotSame(sdo.getType(), copiedSdo.getType());
- assertEquals(sdo.getInstanceProperties().size(), copiedSdo
- .getInstanceProperties().size());
-
- for(Iterator it = sdo.getInstanceProperties().iterator(), it2 = copiedSdo
- .getInstanceProperties().iterator(); it.hasNext();)
- {
- Property p1 = (Property) it.next(), p2 = (Property) it2.next();
- assertEquals(p1.getName(), p2.getName());
- Object o1 = sdo.get(p1), o2 = copiedSdo.get(p2);
- if(p1.getType().isDataType())
- {
- assertEquals(o1, o2);
- // TODO is there a way I can distinguish between mutable and
- // immutable types
- // so that I can do some "same object" tests
- }
- else
- {
- assertNotSame(p1, p2);
- if(p2.isMany())
- {
- assertEquals(copiedSdo.getList(p2).size(), 0);
- }
- else
- {
- assertNull(copiedSdo.get(p2));
- }
- }
- try
- {
- sdo.get(p2);
- assertTrue(false);
- }
- catch(Exception e)
- {
- // expected route
- }
- try
- {
- copiedSdo.get(p1);
- assertTrue(false);
- }
- catch(Exception e2)
- {
- // expected route
- }
- }
- }
-
- private void deepCopyAssertions(DataObject sdo, DataObject copiedSdo)
- {
- //indent();
-
- //System.out.println("checking objects of types: "
- // + sdo.getType().getName() + ", "
- // + copiedSdo.getType().getName());
- indent++;
-
- assertEquals(sdo.getType().getName(), copiedSdo.getType().getName());
- assertEquals(sdo.getType().getURI(), copiedSdo.getType().getURI());
- assertNotSame(sdo.getType(), copiedSdo.getType());
- assertEquals(sdo.getInstanceProperties().size(), copiedSdo
- .getInstanceProperties().size());
-
- for(Iterator it = sdo.getInstanceProperties().iterator(), it2 = copiedSdo
- .getInstanceProperties().iterator(); it.hasNext();)
- {
- Property p1 = (Property) it.next(), p2 = (Property) it2.next();
- assertEquals(p1.getName(), p2.getName());
- Object o1 = sdo.get(p1), o2 = copiedSdo.get(p2);
- if(p1.getType().isDataType())
- {
- assertEquals(o1, o2);
- // TODO is there a way I can distinguish between mutable and
- // immutable types
- // so that I can do some "same object" tests
- }
- else
- {
- assertNotSame(p1, p2);
- if(p2.isMany())
- {
- assertEquals(sdo.getList(p1).size(), copiedSdo.getList(p2)
- .size());
- for(Iterator it3 = sdo.getList(p1).iterator(), it4 = copiedSdo
- .getList(p2).iterator(); it3.hasNext();)
- {
- deepCopyAssertions((DataObject) it3.next(),
- (DataObject) it4.next());
- }
- }
- else
- {
- deepCopyAssertions(sdo.getDataObject(p1), copiedSdo
- .getDataObject(p2));
- }
- }
- try
- {
- sdo.get(p2);
- assertTrue(false);
- }
- catch(Exception e)
- {
- // expected route
- }
- try
- {
- copiedSdo.get(p1);
- assertTrue(false);
- }
- catch(Exception e2)
- {
- // expected route
- }
- }
-
- indent--;
- }
-
- /*
- private void indent()
- {
- for(int i=0; i " +
-
- "" +
- "" +
-
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
-
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
-
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
-
- "";
-
- /**
- * Test DataObject.getList() on open type
- */
- public void testUnknownPropertyOnOpenType() throws IOException {
- String companyName = companyDataObject.getString("openCompany/company");
- assertEquals(companyName, "OpenCompany");
- List unknownProperty = companyDataObject.getList("openCompany/unknownProperty");
- assertNotNull(unknownProperty);
- assertTrue(unknownProperty instanceof List);
-
- List unknownProperty2 = companyDataObject.getList("openCompany/unknownProperty");
- assertNotNull(unknownProperty2);
- assertTrue(unknownProperty2 instanceof List);
-
- // unknownProperty and unknownProperty2 are in fact the same value for the same property
-
- unknownProperty.add("employee1");
- assertTrue(unknownProperty.size() == 1);
-
- unknownProperty2.add("employee2");
- assertTrue(unknownProperty2.size() == 2);
-
- unknownProperty.remove(0);
- assertTrue(unknownProperty.size() == 1);
-
- assertEquals(unknownProperty.get(0), "employee2");
- }
-
- /**
- * Test DataObject.getList() on non-open type
- */
- public void testUnknownPropertyOnClosedType() throws IOException {
- String companyName = companyDataObject.getString("closeCompany/company");
- assertEquals(companyName, "CloseCompany");
- List unknownProperty = companyDataObject.getList("closeCompany/unknownProperty");
- assertNotNull(unknownProperty);
- assertTrue(unknownProperty instanceof List);
-
- try {
- unknownProperty.add("employee1");
- fail("An exception should have been thrown.");
- }
- catch (Exception e) {
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- hc.getXSDHelper().define(xsdString);
-
- companyDataObject = hc.getDataFactory().create(TEST_NAMESPACE, "Company");
- DataObject openCompany = companyDataObject.createDataObject("openCompany");
- openCompany.setString("company", "OpenCompany");
- DataObject closeCompany = companyDataObject.createDataObject("closeCompany");
- closeCompany.setString("company", "CloseCompany");
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java
deleted file mode 100644
index a49b165386..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java
+++ /dev/null
@@ -1,68 +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.List;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.Type;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-
-public class DataTypeBaseTypeTestCase extends TestCase {
- private final String TEST_MODEL = "/datatype.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/datatype";
-
- public void testSimpleSDOType() throws IOException
- {
- Type type = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "SimpleSDOType");
- List baseTypes = type.getBaseTypes();
- assertTrue(baseTypes.size() == 1);
- }
-
- public void testSimpleSDOTypeInstanceClass() throws IOException
- {
- Type type = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "SimpleSDOTypeInstanceClass");
- List baseTypes = type.getBaseTypes();
- assertTrue(baseTypes.size() == 0);
- }
-
- public void testSimpleSDOTypeExtendedInstanceClass() throws IOException
- {
- Type type = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "SimpleSDOTypeExtendedInstanceClass");
- List baseTypes = type.getBaseTypes();
- assertTrue(baseTypes.size() == 1);
- }
-
- public void setUp() throws Exception
- {
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DateConversionTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DateConversionTestCase.java
deleted file mode 100644
index 86808f3b56..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DateConversionTestCase.java
+++ /dev/null
@@ -1,380 +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.lang.reflect.Method;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.helper.DataHelper;
-
-// DateConversionTestCase insures that the DataHelper conversions accurately
-// retain the information in the specified fields (e.g. month, day or year).
-// It also provides coverage for the DataHelper API.
-// Note that toDate is called each time Test.initialize() is called.
-
-public class DateConversionTestCase extends TestCase
-{
- private static Calendar test_calendar;
- private static Date test_date;
- private static DataHelper data_helper;
-
- private static final TestType TO_DATE_TIME = new TestType("toDateTime", new int [] {Calendar.YEAR, Calendar.MONTH,
- Calendar.DAY_OF_MONTH, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND});
- private static final TestType TO_DURATION = new TestType("toDuration", new int [] {Calendar.YEAR, Calendar.MONTH,
- Calendar.DAY_OF_MONTH, Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND});
- private static final TestType TO_TIME = new TestType("toTime", new int [] {Calendar.HOUR_OF_DAY, Calendar.MINUTE,
- Calendar.SECOND, Calendar.MILLISECOND});
- private static final TestType TO_DAY = new TestType("toDay", new int[] {Calendar.DAY_OF_MONTH});
- private static final TestType TO_MONTH = new TestType("toMonth", new int[] {Calendar.MONTH});
- private static final TestType TO_MONTH_DAY = new TestType("toMonthDay", new int[] {Calendar.MONTH, Calendar.DAY_OF_MONTH});
- private static final TestType TO_YEAR = new TestType("toYear", new int[] {Calendar.YEAR});
- private static final TestType TO_YEAR_MONTH= new TestType("toYearMonth", new int[] {Calendar.YEAR, Calendar.MONTH});
- private static final TestType TO_YEAR_MONTH_DAY = new TestType("toYearMonthDay", new int[] {Calendar.YEAR,
- Calendar.MONTH, Calendar.DAY_OF_MONTH});
-
- public DateConversionTestCase() throws Exception
- {
- data_helper = DataHelper.INSTANCE;
- test_calendar = new GregorianCalendar();
- test_calendar.setTime(new Date(System.currentTimeMillis()));
- test_date = test_calendar.getTime();
- }
-
- //Test for TUSCANY-1514
- public void testNullStringToDate() throws Exception {
- Date result = data_helper.toDate(null);
- assertEquals(null, result);
- }
-
- private static class TestType
- {
- private static final Class[] DATE_CLASS_ARRAY = {Date.class};
- private static final Class[] CALENDAR_CLASS_ARRAY = {Calendar.class};
-
- Method date_method;
- Method calendar_method;
- int [] compare_fields;
-
- public TestType (String method_name, int [] compare_fields)
- {
- try
- {
- this.date_method = DataHelper.class.getMethod(method_name, DATE_CLASS_ARRAY);
- }
- catch (NoSuchMethodException e)
- {
- this.date_method = null;
- }
-
- this.compare_fields = compare_fields;
- try
- {
- this.calendar_method = DataHelper.class.getMethod(method_name, CALENDAR_CLASS_ARRAY);
- }
- catch (NoSuchMethodException e)
- {
- this.calendar_method = null;
- }
-
- }
-
- public Method getDateMethod()
- {
- return this.date_method;
- }
-
- public Method getCalendarMethod()
- {
- return this.calendar_method;
- }
- }
-
- private static class Test
- {
- String from_type;
- Date from_date;
- Calendar from_calendar;
- Class expected_exception;
-
- public Test ()
- {
- this.from_date = null;
- this.from_calendar = null;
- expected_exception = null;
- }
-
- public void initialize (TestType from_type)
- {
- this.from_type = from_type.getDateMethod().getName();
-
- try
- {
- String date_string = (String) from_type.getDateMethod().invoke(data_helper, new Object[] {test_date});
-
- this.from_date = data_helper.toDate(date_string);
- date_string = (String) from_type.getCalendarMethod().invoke(data_helper, new Object[] {test_calendar});
- this.from_calendar = data_helper.toCalendar(date_string);
- }
- catch (Exception e)
- {
- this.from_date = null;
- this.from_calendar = null;
- }
-
- }
-
- // This method is needed because there is not a toDate(Date) method in DataHelper.
-
- public void initializeToDate()
- {
- this.from_calendar = test_calendar;
- this.from_date = test_date;
- this.from_type = "toDate";
- }
-
- public void attemptConversion (TestType to_type) throws Exception
- {
- executeConversion(to_type.getDateMethod(), new Object[] {this.from_date}, to_type.compare_fields);
- executeConversion(to_type.getCalendarMethod(), new Object[] {this.from_calendar}, to_type.compare_fields);
- }
-
- private void executeConversion (Method conversion, Object[] parm, int [] compare_fields) throws Exception
- {
- String result;
-
- try
- {
- result = (String) conversion.invoke(data_helper, parm);
- }
- catch (Exception e)
- {
- System.err.println("An unexpected exception was thrown while calling " + conversion.getName() +
- " after initializing with " + this.from_type + ".");
- throw e;
- }
-
- assertTrue("The expected value did not result when calling " + conversion.getName() +
- " after initializing with " + this.from_type + ".", compareFields(parm[0], result, compare_fields));
- }
-
- private boolean compareFields(Object compare_to, String output, int [] compare_fields)
- {
- Calendar result = data_helper.toCalendar(output);
- Calendar expected;
-
- if (compare_to instanceof Calendar)
- expected = (GregorianCalendar) test_calendar;
- else
- {
- expected = new GregorianCalendar();
- expected.setTime((Date) test_date);
- }
-
- for (int i = 0; i < compare_fields.length; i++)
- {
- if (expected.get(compare_fields[i]) != result.get(compare_fields[i]))
- {
- System.err.println("Failed: - expected '" + expected.get(compare_fields[i]) + "' got '" + result.get(compare_fields[i]) + "' for output: " + output);
- return false;
- }
- }
- return true;
- }
-
- }
-
- public void testConversionsFromDay() throws Exception
- {
- Test FromDay = new Test();
-
- FromDay.initialize(TO_DAY);
-
- FromDay.attemptConversion(TO_DAY);
- }
-
- public void testConversionsFromDate() throws Exception
- {
- Test FromDate = new Test();
-
- FromDate.initializeToDate();
-
- FromDate.attemptConversion(TO_DATE_TIME);
- FromDate.attemptConversion(TO_DURATION);
- FromDate.attemptConversion(TO_TIME);
- FromDate.attemptConversion(TO_DAY);
- FromDate.attemptConversion(TO_MONTH);
- FromDate.attemptConversion(TO_MONTH_DAY);
- FromDate.attemptConversion(TO_YEAR);
- FromDate.attemptConversion(TO_YEAR_MONTH);
- FromDate.attemptConversion(TO_YEAR_MONTH_DAY);
- }
-
- public void testConversionsFromDateTime() throws Exception
- {
- Test FromDateTime = new Test();
-
- FromDateTime.initialize(TO_DATE_TIME);
-
- FromDateTime.attemptConversion(TO_DATE_TIME);
- FromDateTime.attemptConversion(TO_DURATION);
- FromDateTime.attemptConversion(TO_TIME);
- FromDateTime.attemptConversion(TO_DAY);
- FromDateTime.attemptConversion(TO_MONTH);
- FromDateTime.attemptConversion(TO_MONTH_DAY);
- FromDateTime.attemptConversion(TO_YEAR);
- FromDateTime.attemptConversion(TO_YEAR_MONTH);
- FromDateTime.attemptConversion(TO_YEAR_MONTH_DAY);
- }
-
- public void testConversionsFromDuration() throws Exception
- {
- Test FromDuration = new Test();
-
- FromDuration.initialize(TO_DURATION);
-
- FromDuration.attemptConversion(TO_DURATION);
- FromDuration.attemptConversion(TO_DATE_TIME);
- FromDuration.attemptConversion(TO_TIME);
- FromDuration.attemptConversion(TO_DAY);
- FromDuration.attemptConversion(TO_MONTH);
- FromDuration.attemptConversion(TO_MONTH_DAY);
- FromDuration.attemptConversion(TO_YEAR);
- FromDuration.attemptConversion(TO_YEAR_MONTH);
- FromDuration.attemptConversion(TO_YEAR_MONTH_DAY);
- }
-
- public void testConversionsFromMonth() throws Exception
- {
- Test FromMonth = new Test();
-
- FromMonth.initialize(TO_MONTH);
-
- FromMonth.attemptConversion(TO_MONTH);
- }
-
- public void testConversionsFromMonthDay() throws Exception
- {
- Test FromMonthDay = new Test();
-
- FromMonthDay.initialize(TO_MONTH_DAY);
- FromMonthDay.attemptConversion(TO_MONTH_DAY);
- FromMonthDay.attemptConversion(TO_MONTH);
- FromMonthDay.attemptConversion(TO_DAY);
- }
-
- public void testConversionsFromTime() throws Exception
- {
- Test FromTime = new Test();
-
- FromTime.initialize(TO_TIME);
-
- FromTime.attemptConversion(TO_TIME);
- }
-
- public void testConversionsFromYear() throws Exception
- {
- Test FromYear = new Test();
-
- FromYear.initialize(TO_YEAR);
-
- FromYear.attemptConversion(TO_YEAR);
- }
-
- public void testConversionsFromYearMonth() throws Exception
- {
- Test FromYearMonth = new Test();
-
- FromYearMonth.initialize(TO_YEAR_MONTH);
-
- FromYearMonth.attemptConversion(TO_YEAR_MONTH);
- FromYearMonth.attemptConversion(TO_MONTH);
- FromYearMonth.attemptConversion(TO_YEAR);
- }
-
- public void testConversionsFromYearMonthDay() throws Exception
- {
- Test FromYearMonthDay = new Test();
-
- FromYearMonthDay.initialize(TO_YEAR_MONTH_DAY);
-
- FromYearMonthDay.attemptConversion(TO_YEAR_MONTH_DAY);
- FromYearMonthDay.attemptConversion(TO_YEAR_MONTH);
- FromYearMonthDay.attemptConversion(TO_MONTH_DAY);
- FromYearMonthDay.attemptConversion(TO_YEAR);
- FromYearMonthDay.attemptConversion(TO_MONTH);
- FromYearMonthDay.attemptConversion(TO_DAY);
- }
-
- // Ensure that strings that should be recognized by toDate do not
- // result in a null Date value.
-
- public void testToDateFormats() throws Exception
- {
- String[] validStrings =
- {
- "2006-03-31T03:30:45.123Z",
- "-2006-03-31T03:30:45.1Z",
- "2006-03-31T03:30:45Z",
- "2006-03-31T03:30:45.123",
- "2006-03-31T03:30:45.1",
- "-2006-03-31T03:30:45",
- "2006-03-31T03:30:45.123 EDT",
- "2006-03-31T03:30:45.1 EDT",
- "2006-03-31T03:30:45 EDT",
- "---05 PST",
- "---04",
- "--12 GMT",
- "--12",
- "--08-08 EST",
- "--08-08",
- "1976-08-08 PDT",
- "1976-08-08",
- "88-12 CST",
- "1988-12",
- "2005 CDT",
- "1999",
- "P2006Y 08M 10D T 12H 24M 07S",
- "P2006Y 10D T 12H",
- "-P2006Y 08M 10D T 07S.2",
- "P08M 10D T 07H",
- "-P 04M 10DT12H 24S.88",
- "PT12H"
- };
-
- for (int i = 0; i < validStrings.length; i++)
- {
- assertNotNull("DataHelper.toData() should not return null for '" + validStrings[i] + "'.",
- data_helper.toDate(validStrings[i]));
- }
-
- }
-
- public void testDateTime(){
- // a small bolt on test case resulting from a fix for JIRA TUSCANY-1044
- String date = DataHelper.INSTANCE.toDateTime(DataHelper.INSTANCE.toCalendar("2007-02-04T00:00:00.200Z"));
- assertEquals("2007-02-04T00:00:00.200Z", date);
- }
-
-}
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineOpenContentPropertyTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineOpenContentPropertyTestCase.java
deleted file mode 100644
index f6afd5c458..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineOpenContentPropertyTestCase.java
+++ /dev/null
@@ -1,133 +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.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import junit.framework.TestCase;
-
-
-public class DefineOpenContentPropertyTestCase extends TestCase {
- private final String TEST_MODEL = "/open.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/open";
- private final String TEST_DATA = "/openContentProperty.xml";
-
- private TypeHelper typeHelper;
- private XSDHelper xsdHelper;
- private XMLHelper xmlHelper;
- private DataFactory dataFactory;
-
- public void testDefineOpenContentProperty() throws IOException {
- Type quoteType = typeHelper.getType(TEST_NAMESPACE, "OpenQuote");
- DataObject quote = dataFactory.create(quoteType);
-
- Property symbolProperty = quoteType.getProperty("symbol");
- assertFalse(symbolProperty.isOpenContent());
-
- quote.setString(symbolProperty, "s1");
-
- Property companyProperty = typeHelper.getOpenContentProperty(TEST_NAMESPACE, "company");
- assertTrue(companyProperty.isOpenContent());
-
- DataObject company = quote.createDataObject(companyProperty);
- company.setString("name", "FlyByNightTechnology");
-
- Property priceProperty = typeHelper.getOpenContentProperty(TEST_NAMESPACE, "price");
- assertTrue(priceProperty.isOpenContent());
-
- quote.getList(priceProperty).add(new BigDecimal("1000.0"));
-
- // Define a new SDO open content property with simple type
- DataObject p = dataFactory.create("commonj.sdo", "Property");
- p.set("type", typeHelper.getType("commonj.sdo", "Decimal"));
- p.set("name", "highPrice");
- Property highPrice = typeHelper.defineOpenContentProperty(TEST_NAMESPACE, p);
- assertTrue(highPrice.isOpenContent());
-
- quote.setBigDecimal(highPrice, new BigDecimal("1100.0"));
-
- // Define a new SDO open content property with complex type
- DataObject mutualFundQuotePropertyDef = dataFactory.create("commonj.sdo", "Property");
- mutualFundQuotePropertyDef.set("type", quoteType);
- mutualFundQuotePropertyDef.set("name", "mutualFundQuote");
- mutualFundQuotePropertyDef.setBoolean("containment", true);
- Property mutualFundQuoteProperty = typeHelper.defineOpenContentProperty(TEST_NAMESPACE, mutualFundQuotePropertyDef);
- assertTrue(mutualFundQuoteProperty.isOpenContent());
-
- DataObject mutualFundQuote = quote.createDataObject(mutualFundQuoteProperty);
- mutualFundQuote.setString("symbol", "mutual-1");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(quote, TEST_NAMESPACE, "openStockQuote", baos);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
-
- // validate existing property condition
- Property duplicateProp = typeHelper.defineOpenContentProperty(TEST_NAMESPACE, p);
- assertTrue(highPrice.equals(duplicateProp));
-
- // validate error condition, where new property exists with different type
- boolean errorCondition = false;
- try
- {
- p = dataFactory.create("commonj.sdo", "Property");
- p.set("type", typeHelper.getType("commonj.sdo", "String"));
- p.set("name", "highPrice");
- highPrice = typeHelper.defineOpenContentProperty(TEST_NAMESPACE, p);
- }
- catch( IllegalArgumentException ex )
- {
- errorCondition = true;
- }
- assertTrue(errorCondition);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- HelperContext hc = SDOUtil.createHelperContext();
- typeHelper = hc.getTypeHelper();
- dataFactory = hc.getDataFactory();
- xsdHelper = hc.getXSDHelper();
- xmlHelper = hc.getXMLHelper();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- xsdHelper.define(inputStream, url.toString());
- inputStream.close();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java
deleted file mode 100644
index 5b3e814f69..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java
+++ /dev/null
@@ -1,704 +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.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class DefineTypeTestCase extends TestCase
-{
- private static final String CUSTOMER1_XML = "/customer1.xml";
- private static final String CUSTOMER2_XML = "/customer2.xml";
- private static final String OPEN_XML = "/open2.xml";
- private static final String MIXED_XML = "/mixed2.xml";
- private static final String MIXEDOPEN_XML = "/mixedopen.xml";
-
- HelperContext hc;
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- }
-
- public void testDefineTypeRoundTrip() throws Exception {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type intType = types.getType("commonj.sdo", "Int");
- Type stringType = types.getType("commonj.sdo", "String");
-
- Property xmlElementProp = hc.getXSDHelper().getGlobalProperty("commonj.sdo/xml", "xmlElement", false);
-
- // create a new Type for Customers
- DataObject customerType = factory.create("commonj.sdo",
- "Type");
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- // create a customer number property as an XSD attribute
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
- custNumProperty.setBoolean(xmlElementProp, false);
-
- // create a first name property as an XSD attribute
- DataObject firstNameProperty =
- customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
- firstNameProperty.setBoolean(xmlElementProp, false);
-
- // create a last name property as an XSD attribute
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
- lastNameProperty.setBoolean(xmlElementProp, false);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(customerType, "commonj.sdo", "type", baos);
-
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- XMLDocument xdoc = xmlHelper.load(bais);
-
- customerType = xdoc.getRootObject();
-
- // now define the Customer type so that customers can be made
- types.define(customerType);
-
- DataObject customer1 = factory.create("http://example.com/customer",
- "Customer");
-
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
- DataObject customer2 = factory.create("http://example.com/customer",
- "Customer");
- customer2.setInt("custNum", 2);
- customer2.set("firstName", "Jeremy");
- customer2.set("lastName", "Pavick");
-
- assertNotNull(customer1);
- Type type = customer1.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- assertNotNull(customer2);
- type = customer2.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer1,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER1_XML)));
-
- baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer2,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER2_XML)));
- }
-
- public void testDefineType() throws Exception
- {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type intType = types.getType("commonj.sdo", "Int");
- Type stringType = types.getType("commonj.sdo", "String");
-
- Property xmlElementProp = hc.getXSDHelper().getGlobalProperty("commonj.sdo/xml", "xmlElement", false);
-
- // create a new Type for Customers
- DataObject customerType = factory.create("commonj.sdo",
- "Type");
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- // create a customer number property
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
- custNumProperty.setBoolean(xmlElementProp, false);
-
- // create a first name property
- DataObject firstNameProperty =
- customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
- firstNameProperty.setBoolean(xmlElementProp, false);
-
- // create a last name property
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
- lastNameProperty.setBoolean(xmlElementProp, false);
-
- // now define the Customer type so that customers can be made
- types.define(customerType);
-
- DataObject customer1 = factory.create("http://example.com/customer",
- "Customer");
-
- customer1.setInt("custNum", 0);
- assertTrue(customer1.isSet("custNum"));
-
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
- DataObject customer2 = factory.create("http://example.com/customer",
- "Customer");
- customer2.setInt("custNum", 2);
- customer2.set("firstName", "Jeremy");
- customer2.set("lastName", "Pavick");
-
- assertNotNull(customer1);
- Type type = customer1.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- assertNotNull(customer2);
- assertNotNull(types.getOpenContentProperty("http://example.com/customer", "customer"));
-
- type = customer2.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer1,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER1_XML)));
-
- baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer2,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER2_XML)));
- }
-
- public void testDefineDataType() throws Exception
- {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
- XSDHelper xsdHelper = hc.getXSDHelper();
-
- Property xmlElementProp = hc.getXSDHelper().getGlobalProperty("commonj.sdo/xml", "xmlElement", false);
- Property javaClassProperty = xsdHelper.getGlobalProperty("commonj.sdo/java", "javaClass", false);
-
- // create a data types
- DataObject intType = factory.create("commonj.sdo", "Type");
- intType.set("uri", "http://example.com/customer");
- intType.set("name", "MyIntType");
- intType.setBoolean("dataType", true);
- intType.set(javaClassProperty, "int");
-
- DataObject stringType = factory.create("commonj.sdo", "Type");
- stringType.set("uri", "http://example.com/customer");
- stringType.set("name", "MyStringType");
- stringType.setBoolean("dataType", true);
- stringType.set(javaClassProperty, "java.lang.String");
-
- // create a new Type for Customers
- DataObject customerType = factory.create("commonj.sdo",
- "Type");
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- // create a customer number property
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
- custNumProperty.setBoolean(xmlElementProp, false);
-
- // create a first name property
- DataObject firstNameProperty =
- customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
- firstNameProperty.setBoolean(xmlElementProp, false);
-
- // create a last name property
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
- lastNameProperty.setBoolean(xmlElementProp, false);
-
- // now define the Customer type so that customers can be made
- types.define(customerType);
-
- DataObject customer1 = factory.create("http://example.com/customer",
- "Customer");
-
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
- DataObject customer2 = factory.create("http://example.com/customer",
- "Customer");
- customer2.setInt("custNum", 2);
- customer2.set("firstName", "Jeremy");
- customer2.set("lastName", "Pavick");
-
- assertNotNull(customer1);
- Type type = customer1.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
-
- type = type.getProperty("custNum").getType();
- assertEquals(type.getURI(), "http://example.com/customer");
- assertEquals(type.getName(), "MyIntType");
- assertTrue(type.isDataType());
-
- assertNotNull(customer2);
- assertNotNull(types.getOpenContentProperty("http://example.com/customer", "customer"));
-
- type = customer2.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer1,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER1_XML)));
-
- baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer2,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER2_XML)));
- }
-
- public void testFastDefineType() throws Exception
- {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type intType = types.getType("commonj.sdo", "Int");
- Type stringType = types.getType("commonj.sdo", "String");
-
- // create a new Type for Customers
- Type customerType = SDOUtil.createType(hc, "http://example.com/customer", "Customer", false);
-
- // create a customer number property
- Property custNumProperty = SDOUtil.createProperty(customerType, "custNum", intType);
- SDOUtil.setPropertyXMLKind(custNumProperty, false);
-
- // create a first name property
- Property firstNameProperty = SDOUtil.createProperty(customerType, "firstName", stringType);
- SDOUtil.setPropertyXMLKind(firstNameProperty, false);
-
- // create a last name property
- Property lastNameProperty = SDOUtil.createProperty(customerType, "lastName", stringType);
- SDOUtil.setPropertyXMLKind(lastNameProperty, false);
-
- DataObject customer1 = factory.create("http://example.com/customer",
- "Customer");
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
- DataObject customer2 = factory.create("http://example.com/customer",
- "Customer");
- customer2.setInt("custNum", 2);
- customer2.set("firstName", "Jeremy");
- customer2.set("lastName", "Pavick");
-
- assertNotNull(customer1);
- Type type = customer1.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- assertNotNull(customer2);
- type = customer2.getType();
- assertNotNull(type.getProperty("custNum"));
- assertNotNull(type.getProperty("firstName"));
- assertNotNull(type.getProperty("lastName"));
- assertEquals(type.getProperty("custNum").getType(), intType);
- assertEquals(type.getProperty("firstName").getType(), stringType);
- assertEquals(type.getProperty("lastName").getType(), stringType);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer1,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER1_XML)));
-
- baos = new ByteArrayOutputStream();
- xmlHelper.save(
- customer2,
- "http://example.com/customer",
- "Customer", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(CUSTOMER2_XML)));
- }
-
- public void testDefineSequencedType() throws Exception
- {
-
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type stringType = types.getType("commonj.sdo", "String");
- Type decimalType = types.getType("commonj.sdo", "Decimal");
-
- // Define a new mixed type - MixedQuote
- DataObject mixedQuoteType = factory.create("commonj.sdo", "Type");
- mixedQuoteType.set("uri", "http://www.example.com/mixed");
- mixedQuoteType.set("name", "MixedQuote");
- mixedQuoteType.set("sequenced", Boolean.TRUE);
-
- DataObject symbolProperty = mixedQuoteType.createDataObject("property");
- symbolProperty.set("name", "symbol");
- symbolProperty.set("type", stringType);
-
- DataObject companyNameProperty = mixedQuoteType.createDataObject("property");
- companyNameProperty.set("name", "companyName");
- companyNameProperty.set("type", stringType);
-
- DataObject priceProperty = mixedQuoteType.createDataObject("property");
- priceProperty.set("name", "price");
- priceProperty.set("type", decimalType);
-
- DataObject quotesProperty = mixedQuoteType.createDataObject("property");
- quotesProperty.set("name", "quotes");
- quotesProperty.set("type", mixedQuoteType);
- quotesProperty.set("many", Boolean.TRUE);
- quotesProperty.set("containment", Boolean.TRUE);
-
- types.define(mixedQuoteType);
-
- DataObject quote = factory.create("http://www.example.com/mixed", "MixedQuote");
-
- assertTrue(quote.getType().isSequenced());
-
- Sequence sequence = quote.getSequence();
-
- sequence.addText("\n ");
-
- quote.setString("symbol", "fbnt");
-
- sequence.addText("\n ");
-
- quote.setString("companyName", "FlyByNightTechnology");
-
- sequence.addText("\n some text\n ");
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- sequence.addText("\n more text\n ");
-
- // quote.setBigDecimal("price", new BigDecimal("1000.0"));
- sequence.add("price", new BigDecimal("1000.0"));
-
- sequence.addText("\n");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(quote, "http://www.example.com/mixed", "mixedStockQuote", baos);
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MIXED_XML)));
- }
-
- public void testDefineSequencedOpenType() throws Exception
- {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type stringType = types.getType("commonj.sdo", "String");
- Type decimalType = types.getType("commonj.sdo", "Decimal");
-
- // Define a new mixed type - MixedQuote
- DataObject mixedQuoteType = factory.create("commonj.sdo", "Type");
- mixedQuoteType.set("uri", "http://www.example.com/mixed");
- mixedQuoteType.set("name", "MixedOpenQuote");
- mixedQuoteType.set("sequenced", Boolean.TRUE);
- mixedQuoteType.set("open", Boolean.TRUE);
-
-// DataObject symbolProperty = mixedQuoteType.createDataObject("property");
-// symbolProperty.set("name", "symbol");
-// symbolProperty.set("type", stringType);
-
- DataObject companyNameProperty = mixedQuoteType.createDataObject("property");
- companyNameProperty.set("name", "companyName");
- companyNameProperty.set("type", stringType);
-
- DataObject priceProperty = mixedQuoteType.createDataObject("property");
- priceProperty.set("name", "price");
- priceProperty.set("type", decimalType);
-
- DataObject quotesProperty = mixedQuoteType.createDataObject("property");
- quotesProperty.set("name", "quotes");
- quotesProperty.set("type", mixedQuoteType);
- quotesProperty.set("many", Boolean.TRUE);
- quotesProperty.set("containment", Boolean.TRUE);
-
- types.define(mixedQuoteType);
-
- // Define a global type
- DataObject globalType = factory.create("commonj.sdo", "Type");
- globalType.set("uri", "http://www.example.com/open");
- // Don't set the type's name - null is used for types containing global properties.
-
- DataObject symbolProperty = globalType.createDataObject("property");
- symbolProperty.set("name", "symbol");
- symbolProperty.set("type", stringType);
- symbolProperty.set("containment", Boolean.TRUE);
-
- types.define(globalType);
-
- DataObject quote = factory.create("http://www.example.com/mixed", "MixedOpenQuote");
-
- assertTrue(quote.getType().isSequenced());
-
- Sequence sequence = quote.getSequence();
-
- sequence.addText("\n ");
-
- Type definedGlobalType = types.getType("http://www.example.com/open", "DocumentRoot");
-
- Property definedSymbolProperty = definedGlobalType.getProperty("symbol");
- quote.setString(definedSymbolProperty, "fbnt");
-
- sequence.addText("\n ");
-
- quote.setString("companyName", "FlyByNightTechnology");
-
- sequence.addText("\n some text\n ");
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- sequence.addText("\n more text\n ");
-
- // quote.setBigDecimal("price", new BigDecimal("1000.0"));
- sequence.add("price", new BigDecimal("1000.0"));
-
- sequence.addText("\n");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(quote, "http://www.example.com/mixed", "mixedOpenStockQuote", baos);
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MIXEDOPEN_XML)));
- }
-
-
- public void testDefineOpenType() throws Exception
- {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- Type stringType = types.getType("commonj.sdo", "String");
- Type decimalType = types.getType("commonj.sdo", "Decimal");
-
- Property xmlElementProp = hc.getXSDHelper().getGlobalProperty("commonj.sdo/xml", "xmlElement", false);
-
- // Define a new open type - OpenQuote
- DataObject openQuoteType = factory.create("commonj.sdo", "Type");
- openQuoteType.set("uri", "http://www.example.com/open");
- openQuoteType.set("name", "OpenQuote");
- openQuoteType.set("open", Boolean.TRUE);
- openQuoteType.setBoolean("open", true);
-
- types.define(openQuoteType);
-
- // Define new type - CompanyType
- DataObject companyType = factory.create("commonj.sdo", "Type");
- companyType.set("uri", "http://www.example.com/open");
- companyType.set("name", "CompanyType");
-
- // Create CompanyType property - "name" as an XSD attribute
- DataObject nameProperty = companyType.createDataObject("property");
- nameProperty.set("name", "name");
- nameProperty.set("type", stringType);
- nameProperty.set("containment", Boolean.TRUE);
- nameProperty.setBoolean(xmlElementProp, false);
-
- types.define(companyType);
-
- // Define open content property - company
- DataObject symbolProperty = factory.create("commonj.sdo", "Property");
- symbolProperty.set("name", "symbol");
- symbolProperty.set("type", stringType);
- types.defineOpenContentProperty("http://www.example.com/open", symbolProperty);
-
- // Define open content property - company
- DataObject companyProperty = factory.create("commonj.sdo", "Property");
- companyProperty.set("name", "company");
- companyProperty.set("type", companyType);
- companyProperty.set("containment", Boolean.TRUE);
- types.defineOpenContentProperty("http://www.example.com/open", companyProperty);
-
- // Define open content property - price
- DataObject priceProperty = factory.create("commonj.sdo", "Property");
- priceProperty.set("name", "price");
- priceProperty.set("type", decimalType);
- types.defineOpenContentProperty("http://www.example.com/open", priceProperty);
-
- // Create DataObject instances
- DataObject openQuote = factory.create("http://www.example.com/open", "OpenQuote");
- assertTrue(openQuote.getType().isOpen());
-
- Property definedSymbolProperty = types.getOpenContentProperty("http://www.example.com/open", "symbol");
- openQuote.set(definedSymbolProperty, "s1");
-
- Property definedCompanyProperty = types.getOpenContentProperty("http://www.example.com/open", "company");
- DataObject company = openQuote.createDataObject(definedCompanyProperty);
- company.setString("name", "FlyByNightTechnology");
-
- Property definedPriceProperty = types.getOpenContentProperty("http://www.example.com/open", "price");
- openQuote.setBigDecimal(definedPriceProperty, new BigDecimal("1000.0"));
-
- assertEquals(definedPriceProperty.getType(), decimalType);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlHelper.save(
- openQuote,
- "http://www.example.com/open",
- "openStockQuote", baos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(baos.toByteArray()),
- getClass().getResource(OPEN_XML)));
- }
-
-/**
- * Type T1 has property t1p of type T2, type T2 has property t2p of type T1.
- * Ensure that the typehelper can handle this circularity
- */
-public void testInterdependentTypes()
- {
- DataObject t1 = DataFactory.INSTANCE.create("commonj.sdo", "Type");
- DataObject t1p = DataFactory.INSTANCE.create("commonj.sdo", "Property");
- DataObject t2 = DataFactory.INSTANCE.create("commonj.sdo", "Type");
- DataObject t2p = DataFactory.INSTANCE.create("commonj.sdo", "Property");
-
- t1.set("name", "T1");
- t1.set("uri", "foo");
- t2.set("name", "T2");
- t2.set("uri", "foo");
-
- t1.getList("property").add(t1p);
- t2.getList("property").add(t2p);
- t1p.set("name", "t1p");
- t1p.set("type", t2);
- t2p.set("name", "t2p");
- t2p.set("type", t1);
-
- List ts = new ArrayList();
- ts.add(t1);
- ts.add(t2);
- List types = hc.getTypeHelper().define(ts);
-
- Type first = (Type)types.get(0);
- Type second = (Type)types.get(1);
-
- Type firstsPropsType = ((Property)first.getProperties().get(0)).getType();
- Type secondPropsType = ((Property)second.getProperties().get(0)).getType();
-
- assertNotNull(first);
- assertNotNull(second);
- assertEquals(first, secondPropsType);
- assertEquals(second, firstsPropsType);
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DeserializationNoSchemaTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DeserializationNoSchemaTestCase.java
deleted file mode 100644
index 65a838bb52..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DeserializationNoSchemaTestCase.java
+++ /dev/null
@@ -1,124 +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.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-
-
-public class DeserializationNoSchemaTestCase extends TestCase
-{
- HelperContext hc;
-
- TypeHelper th;
-
- private final String xmlStr =
- " " +
- " " +
- "fbnt " +
- "FlyByNightTechnology " +
- "1000.0 " +
- "1000.0 " +
- "1000.0 " +
- "1000.0 " +
- "1000.0 " +
- "1000.0 " +
- " " +
- "2000.0 " +
- " " +
- "";
-
- public void testLoadQuoteXMLDoc() throws IOException
- {
- XMLHelper xmlHelper = hc.getXMLHelper();
-/* URL url = getClass().getResource("/quote.xml");
- InputStream inputStream = url.openStream();*/
- XMLDocument doc = xmlHelper.load(xmlStr);
- DataObject root = doc.getRootObject();
-
- List symbols = root.getList("symbol");
- DataObject symbol = (DataObject)symbols.get(0);
-
- String seqValue = (String)symbol.getSequence().getValue(0);
- assertEquals(seqValue, "fbnt");
-
- //String symbol = root.getString("symbol");
- //System.out.println("symbol: " + symbol);
- }
-
- public void testAnyTypeContainer() throws Exception
- {
- HelperContext hc = SDOUtil.createHelperContext();
-
- URL url = getClass().getResource("/simple.xsd");
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
-
- XMLHelper xmlHelper = hc.getXMLHelper();
- url = getClass().getResource("/quoteInSOAP.xml");
- inputStream = url.openStream();
- XMLDocument doc = xmlHelper.load(inputStream);
- DataObject root = doc.getRootObject();
- DataObject body = (DataObject)root.getList("Body").get(0);
- DataObject stockQuote = (DataObject)body.getList("stockQuote").get(0);
-
- //xmlHelper.save(stockQuote, stockQuote.getType().getURI(), "stockQuote", System.out);
-
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = SDOUtil.createObjectOutputStream(bos, hc);
- oos.writeObject(stockQuote);
- oos.close();
- bos.close();
-
- ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
- ObjectInputStream ois = SDOUtil.createObjectInputStream(bis, hc);
- DataObject objectCopy = (DataObject)ois.readObject();
- ois.close();
- bis.close();
-
- assertEquals(objectCopy.getString("symbol"), "fbnt");
-
- //xmlHelper.save(objectCopy, stockQuote.getType().getURI(), "stockQuote", System.out);
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DotNameTest.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DotNameTest.java
deleted file mode 100644
index 476f34c328..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DotNameTest.java
+++ /dev/null
@@ -1,78 +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.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-
-public class DotNameTest extends TestCase {
- private final String TEST_MODEL = "/dotNames.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/dotNames";
- private HelperContext hc;
- private TypeHelper th;
- private DataFactory df;
-
- /**
- * Simple Dynamic SDO 2 test.
- */
- public void testDynamic() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "DotNameType");
- DataObject quote = df.create(quoteType);
-
-
- quote.getList("property.2.1").add(TEST_NAMESPACE);
- assertTrue(quote.isSet("property.2.1"));
- assertSame(quote.get("property.2.1.0"), TEST_NAMESPACE);
- quote.getList("foo.bar").add(TEST_NAMESPACE);
- assertTrue(quote.isSet("foo.bar"));
- assertSame(quote.get("foo.bar.0"), TEST_NAMESPACE);
- }
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
- df = hc.getDataFactory();
-
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
-
- }
-
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DupElementTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DupElementTestCase.java
deleted file mode 100644
index 9c4f487b6a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DupElementTestCase.java
+++ /dev/null
@@ -1,99 +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.InputStream;
-import java.net.URL;
-import java.util.List;
-//import java.util.regex.MatchResult;
-//import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-
-public class DupElementTestCase extends TestCase {
- HelperContext hc;
-
- private final String TEST_MODEL = "/dupelement.xsd";
- private final String TEST_URI = "http://www.example.com/dupelement";
-
- protected void setUp() throws Exception {
- super.setUp();
-
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
-
- hc = SDOUtil.createHelperContext();
-
- hc.getXSDHelper().define(inputStream, url.toString());
-
- inputStream.close();
- }
-
-
- public void test() {
- Type quoteType = hc.getTypeHelper().getType(TEST_URI, "Quote");
-
- DataObject quote = hc.getDataFactory().create(quoteType);
- quote.set("symbol", "ACME");
- quote.set("companyName", "ACME Corp.");
-
- DataObject quote2 = hc.getDataFactory().create(quoteType);
-
- List quotes = quote.getList("quotes");
- quotes.add(quote2);
-
- try {
- quote.set("quotes.0/symbol", "ACME-CHILD");
- quote.set("quotes.0/companyName", "ACME subsidiary corp.");
- quote.setInt("quotes.0/companyNameInInt", 99);
- quote.setInt("quotes.0/symbolInInt", 55);
- }
- catch (Exception e) {
- fail("Set value on the wrong properties with the same name");
- }
- assert(quote.get("quotes.0/companyName") instanceof String);
- assert(quote.get("quotes.0/symbol") instanceof String);
- assert(quote.get("quotes.0/companyNameInInt") instanceof Integer);
- assert(quote.get("quotes.0/symbolInInt") instanceof Integer);
-
- String doc = hc.getXMLHelper().save(quote, "http://www.example.com/dupelement", "stockQuote");
- //System.out.println(doc);
- assertTrue(
- Pattern.matches("[\\s\\S]*[\\s]*ACME Corp.[\\s]*[\\s\\S]*",
- doc));
- assertTrue(
- Pattern.matches("[\\s\\S]*[\\s]*99[\\s]*[\\s\\S]*",
- doc));
- assertTrue(
- Pattern.matches("[\\s\\S]*symbol[\\s]*=[\\s]*\"55\"[\\s\\S]*",
- doc));
- assertTrue(
- Pattern.matches("[\\s\\S]*[\\s]*ACME-CHILD[\\s]*[\\s\\S]*",
- doc));
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DynamicTypesComparisonTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DynamicTypesComparisonTestCase.java
deleted file mode 100644
index 4c347867e0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/DynamicTypesComparisonTestCase.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 org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * Test to compare data objects created with SDO API with one created from XML
- */
-public class DynamicTypesComparisonTestCase extends TestCase {
- private final String COMMONJ_SDO = "commonj.sdo";
-
- private final String DYNAMIC_ROOT_TYPE_0 = "TestType0";
-
- private final String DYNAMIC_TYPES_SCHEMA_STRING = "\n" + "\n" + " \n"
- + " \n" + " \n"
- + " \n"
- + " \n"
- + " \n"
- + " \n" + " \n" + " \n"
- + " \n" + " \n" + "\n";
-
- private final String DYNAMIC_TYPES_URI = "http://www.example.com/dynamicTypesFromSchemaSimple";
-
- private final String SDO_FROM_API_AND_DYN = "object created with API with dynamic type ";
-
- private final String SDO_FROM_API_AND_REF = "object created with API with type from XSD";
-
- private final String SDO_FROM_XML_AND_REF = "object created with XML with type from XSD";
-
- private final String TEST_XML_DOC_0_STRING = "\n"
- + "\n"
- + " This is a repeated string.\n" + " This is a repeated string.\n"
- + " true\n" + " false\n" + " true\n"
- + " 1\n" + " 0\n" + " 0\n"
- + " 12.5\n" + " 0\n" + "\n";
-
- private void comparePropertyObjects(String propName, String name1, String name2, Object propObj1, Object propObj2) {
- if (propObj1 == null) {
- if (propObj2 != null) {
- localFail("property " + propName + " for " + name1 + " was null but " + name2 + " was '" + propObj2
- + "'");
- }
- } else if (propObj2 == null) {
- localFail("property " + propName + " for " + name2 + " was null but " + name1 + " was '" + propObj1 + "'");
- } else {
- if (!propObj1.equals(propObj2)) {
- localFail("property " + propName + " for " + name1 + " was '" + propObj1 + "' but " + name2 + " was '"
- + propObj2 + "'");
- }
- }
- }
-
- private void compareSequencesIgnoringWhitespace(String name1, String name2, Sequence sequence1, Sequence sequence2) {
- if (sequence1 == null) {
- if (sequence2 != null) {
- localFail("sequence for " + name1 + " was null but " + name2 + " was not null");
- }
- } else if (sequence2 == null) {
- localFail("sequence for " + name2 + " was null but " + name1 + " was not null");
- } else {
- List trimmedSeq1 = new ArrayList();
- List trimmedSeq2 = new ArrayList();
- trimWhitespaceFromSequence(trimmedSeq1, sequence1);
- trimWhitespaceFromSequence(trimmedSeq2, sequence2);
- int size1 = trimmedSeq1.size();
- int size2 = trimmedSeq2.size();
- if (size1 != size2) {
- localFail("lengths of trimmed sequences differ: " + name1 + " was " + size1 + ", " + name2 + " was "
- + size2);
- } else {
- Object[] objArr1 = trimmedSeq1.toArray();
- Object[] objArr2 = trimmedSeq2.toArray();
- for (int i = 0; i < size1; i++) {
- Object obj1 = objArr1[i];
- Object obj2 = objArr2[i];
- if (obj1 == null) {
- if (obj2 != null) {
- localFail("sequence for " + name1 + " had null element for which " + name2 + " had '" + obj2
- + "'");
- }
- } else if (obj2 == null) {
- localFail("sequence for " + name2 + " had null element for which " + name1 + " had '" + obj1 + "'");
- } else {
- if (!obj1.equals(obj2)) {
- localFail("sequences did not match: " + name1 + " had '" + obj1 + "' but " + name2 + " had '"
- + obj2 + "'");
- }
- }
- }
- }
- }
- }
-
- private void getAndCompareProperties(String propName, DataObject xmlAndRefTypDO, DataObject apiAndDynTypDO,
- DataObject apiAndRefTypDO) {
- Object xmlRefProperty = xmlAndRefTypDO.get(propName);
- Object apiDynProperty = apiAndDynTypDO.get(propName);
- Object apiRefProperty = apiAndRefTypDO.get(propName);
- comparePropertyObjects(propName, SDO_FROM_XML_AND_REF, SDO_FROM_API_AND_DYN, xmlRefProperty, apiDynProperty);
- comparePropertyObjects(propName, SDO_FROM_XML_AND_REF, SDO_FROM_API_AND_REF, xmlRefProperty, apiRefProperty);
- }
-
- private void localFail(String message) {
- // System.err.println(message);
- fail(message);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- private void specifyProperty(DataObject containingTypeDO, String nameString, Type typ, boolean isMany) {
- DataObject subordinateProperty = containingTypeDO.createDataObject("property");
- subordinateProperty.set("name", nameString);
- subordinateProperty.set("type", typ);
- subordinateProperty.setBoolean("many", isMany);
- }
-
- /**
- * test #0 of Data Object primitive datatypes
- */
- public void testDynamicTypesGroup0DO() throws IOException {
- HelperContext hcDO = SDOUtil.createHelperContext();
-
- TypeHelper thDO = hcDO.getTypeHelper();
- DataFactory dfDO = hcDO.getDataFactory();
-
- // create a container object type
- DataObject containerTypeDO = dfDO.create("commonj.sdo", "Type");
- containerTypeDO.set("uri", DYNAMIC_TYPES_URI);
- containerTypeDO.set("name", DYNAMIC_ROOT_TYPE_0);
- containerTypeDO.set("sequenced", Boolean.TRUE);
-
- specifyProperty(containerTypeDO, "aString", thDO.getType(COMMONJ_SDO, "String"), true);
- specifyProperty(containerTypeDO, "aBoolean", thDO.getType(COMMONJ_SDO, "Boolean"), true);
- specifyProperty(containerTypeDO, "aFloat", thDO.getType(COMMONJ_SDO, "Float"), true);
-
- Type containerType = thDO.define(containerTypeDO);
- assertNotNull(containerType);
-
- DataObject doFromApiAndDynTyp = dfDO.create(containerType);
- assertNotNull(doFromApiAndDynTyp);
- doFromApiAndDynTyp.getList("aString").add("This is a repeated string.");
- doFromApiAndDynTyp.getList("aString").add("This is a repeated string.");
- doFromApiAndDynTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndDynTyp.getList("aBoolean").add(new Boolean(false));
- doFromApiAndDynTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndDynTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndDynTyp.getList("aBoolean").add(new Boolean(false));
- doFromApiAndDynTyp.getList("aFloat").add(new Float(0));
- doFromApiAndDynTyp.getList("aFloat").add(new Float(12.5));
- doFromApiAndDynTyp.getList("aFloat").add(new Float(0));
-
- Type rootType = thDO.getType(DYNAMIC_TYPES_URI, DYNAMIC_ROOT_TYPE_0);
- assertNotNull(rootType);
- assertSame(containerType, rootType);
-
- // now load xml to get a reference data object using schema
- HelperContext hcRef = SDOUtil.createHelperContext();
- XSDHelper xsdHelper = hcRef.getXSDHelper();
- List typeList = xsdHelper.define(DYNAMIC_TYPES_SCHEMA_STRING);
- assertNotNull(typeList);
- TypeHelper thRef = hcRef.getTypeHelper();
- Type rootTypeRef = thRef.getType(DYNAMIC_TYPES_URI, DYNAMIC_ROOT_TYPE_0);
-
- assertNotNull(rootTypeRef);
-
- XMLHelper xhRef = hcRef.getXMLHelper();
- // XMLDocument docRef =
- // xhRef.load(getClass().getResourceAsStream(TEST_XML_DOC_0));
- XMLDocument docRef = xhRef.load(TEST_XML_DOC_0_STRING);
- DataObject doFromXmlAndRefTyp = docRef.getRootObject();
-
- assertNotNull(doFromXmlAndRefTyp);
-
- // create a data object using dynamic API from reference type
- DataFactory dfRef = hcRef.getDataFactory();
- DataObject doFromApiAndRefTyp = dfRef.create(rootTypeRef);
- assertNotNull(doFromApiAndRefTyp);
- doFromApiAndRefTyp.getList("aString").add("This is a repeated string.");
- doFromApiAndRefTyp.getList("aString").add("This is a repeated string.");
- doFromApiAndRefTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndRefTyp.getList("aBoolean").add(new Boolean(false));
- doFromApiAndRefTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndRefTyp.getList("aBoolean").add(new Boolean(true));
- doFromApiAndRefTyp.getList("aBoolean").add(new Boolean(false));
- doFromApiAndRefTyp.getList("aFloat").add(new Float(0));
- doFromApiAndRefTyp.getList("aFloat").add(new Float(12.5));
- doFromApiAndRefTyp.getList("aFloat").add(new Float(0));
-
- getAndCompareProperties("aString", doFromXmlAndRefTyp, doFromApiAndDynTyp, doFromApiAndRefTyp);
- getAndCompareProperties("aBoolean", doFromXmlAndRefTyp, doFromApiAndDynTyp, doFromApiAndRefTyp);
- getAndCompareProperties("aFloat", doFromXmlAndRefTyp, doFromApiAndDynTyp, doFromApiAndRefTyp);
- Sequence seqFromXmlAndRefTyp = doFromXmlAndRefTyp.getSequence();
- Sequence seqFromApiAndDynTyp = doFromApiAndDynTyp.getSequence();
- Sequence seqFromApiAndRefTyp = doFromApiAndRefTyp.getSequence();
- compareSequencesIgnoringWhitespace(SDO_FROM_XML_AND_REF, SDO_FROM_API_AND_DYN, seqFromXmlAndRefTyp,
- seqFromApiAndDynTyp);
- compareSequencesIgnoringWhitespace(SDO_FROM_XML_AND_REF, SDO_FROM_API_AND_REF, seqFromXmlAndRefTyp,
- seqFromApiAndRefTyp);
- }
-
- private void trimWhitespaceFromSequence(List trimmedSeq, Sequence sequence) {
- if (sequence != null) {
- for (int i = 0; i < sequence.size(); i++) {
- Object obj = sequence.getValue(i);
- if (obj instanceof String) {
- String str = ((String) obj).trim();
- if (str.length() > 0) {
- trimmedSeq.add(str);
- }
- } else {
- trimmedSeq.add(obj);
- }
- }
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ExpectedExceptionsTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ExpectedExceptionsTestCase.java
deleted file mode 100644
index af4bb4d928..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ExpectedExceptionsTestCase.java
+++ /dev/null
@@ -1,1878 +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.List;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.ExpectedException.ExpectedExceptionFactory;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-import junit.framework.TestCase;
-
-/**
- * Verifies the Exception related behavior which is explicitly identified in
- * the 2.1 SDO Specification.
- */
-public class ExpectedExceptionsTestCase extends TestCase {
-
- private static final String TEST_URI = "http://example.com/ExpectedException";
- private static final String TEST_TYPE_NAME = "ExpectedExceptionType";
- private static final String SEQ_TYPE_NAME = "SequenceReadOnlyType";
- private static boolean typeDefined = false;
- private static HelperContext helperContext;
- private static DataObject testDO;
- private static DataObject seqDO;
-
- /**
- * Verifies the following statement.
- * Get(String path) will not throw exceptions other than ClassCastException
- * if it is impossible to convert between the actual and expected types.
- * Note: This test case will not be implmented because it is already covered
- * by testCannnotConvertClassCastException.
- */
-
- public void testGetTStringClassCastExceptionOnly() {
- // This test case will not be implemented.
- }
-
- /**
- * Verifies the following statement.
- * get(Property property) throws an IllegalArgumentException when
- * getInstanceProperties().contains(property) == false.
- */
- public void testGetViaPropertyIllegalArgumentException() {
- DataObject invalidPropDO = helperContext.getDataFactory().create(TEST_URI, SEQ_TYPE_NAME);
- Property invalidProp = invalidPropDO.getInstanceProperty("uniqueName");
-
- try {
- testDO.get(invalidProp);
- fail("get(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("get(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBoolean(invalidProp);
- fail("getBoolean(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte(invalidProp);
- fail("getByte(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar(invalidProp);
- fail("getChar(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble(invalidProp);
- fail("getDouble(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat(invalidProp);
- fail("getFloat(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt(invalidProp);
- fail("getInt(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong(invalidProp);
- fail("getLong(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort(invalidProp);
- fail("getShort(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes(invalidProp);
- fail("getBytes(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal(invalidProp);
- fail("getBigDecimal(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger(invalidProp);
- fail("getBigInteger(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject(invalidProp);
- fail("getDataObject(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate(invalidProp);
- fail("getDate(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString(invalidProp);
- fail("getString(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getList(invalidProp);
- fail("getList(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(propert)== false. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(Property property) should throw an IllegalArgumentException when getInstanceProperties().contains(property)== false. " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Verfies the following statement.
- * get(int propertyIndex) throws an IllegalArgumentException when
- * propertIndex <0 or >= getInstanceProerties().size()
- */
- public void testGetViaIndexIllegalArgumentException() {
- int numProps = testDO.getInstanceProperties().size();
-
- try {
- testDO.get(-1);
- fail("get(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("get(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBoolean(-1);
- fail("getBoolean(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte(-1);
- fail("getByte(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar(-1);
- fail("getChar(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble(-1);
- fail("getDouble(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat(-1);
- fail("getFloat(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt(-1);
- fail("getInt(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong(-1);
- fail("getLong(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort(-1);
- fail("getShort(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes(-1);
- fail("getBytes(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal(-1);
- fail("getBigDecimal(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger(-1);
- fail("getBigInteger(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject(-1);
- fail("getDataObject(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate(-1);
- fail("getDate(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString(-1);
- fail("getString(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getList(-1);
- fail("getList(-1) should throw an IllegalArgumentException. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(-1) should throw an IllegalArgumentException. " + e.getClass().getName() + " was thrown.");
- }
-
- try {
- testDO.get(numProps);
- fail("get(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("get(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBoolean(numProps);
- fail("getBoolean(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte(numProps);
- fail("getByte(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar(numProps);
- fail("getChar(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble(numProps);
- fail("getDouble(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat(numProps);
- fail("getFloat(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt(numProps);
- fail("getInt(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong(numProps);
- fail("getLong(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort(numProps);
- fail("getShort(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes(numProps);
- fail("getBytes(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal(numProps);
- fail("getBigDecimal(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger(numProps);
- fail("getBigInteger(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject(numProps);
- fail("getDataObject(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate(numProps);
- fail("getDate(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString(numProps);
- fail("getString(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getList(numProps);
- fail("getList(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(int) should throw an IllegalArgumentException when int >= getInstanceProperties.size(). " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Verifies the following statement.
- * Using an Index out of range (index < 0 or >= getList(Property property).size())
- * will result in an IndexOutOfBoundsException.
- */
- public void testListIndexOutOfBoundsException() {
- List list = testDO.getList("listVal");
-
-// Not fixed in TUSCANY-578
-// try {
-// list.get(-1);
-// fail("list.get(-1) should throw an IndexOutOfBoundsException. No Exception was thrown.");
-// } catch (IndexOutOfBoundsException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("list.get(-1) should throw an IndexOutOfBoundsException. " + e.getClass().getName() + " was thrown.");
-// }
-// try {
-// list.get(list.size());
-// fail("list.get(int) should throw an IndexOutOfBoundsException when int >= list.size(). No Exception was thrown.");
-// } catch (IndexOutOfBoundsException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("list.get(int) should throw an IndexOutOfBoundsException when int >= list.size(). " + e.getClass().getName() + " was thrown.");
-// }
-// try {
-// list.remove(-1);
-// fail("list.remove(-1) should throw an IndexOutOfBoundsException. No Exception was thrown.");
-// } catch (IndexOutOfBoundsException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("list.remove(-1) should throw an IndexOutOfBoundsException. " + e.getClass().getName() + " was thrown.");
-// }
- try {
- list.remove(list.size());
- fail("list.remove(int) should throw an IndexOutOfBoundsException when int >= list.size(). No Exception was thrown.");
- } catch (IndexOutOfBoundsException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("list.remove(int) should throw an IndexOutOfBoundsException when int >= list.size(). " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Verifies the following statement.
- * Modification of a read-only property results in UnsupportedOperationException.
- * This test case is for modifications done through the DataObject API.
- */
- public void testModifyReadOnlyUnsupportedOperationException() {
- Property readOnlyProp = testDO.getInstanceProperty("readOnlyVal");
- List properties = testDO.getInstanceProperties();
- Property currProp;
- int readOnlyIndex = -1, i = 0, size = properties.size();
-
- // Verify the precondition
- assertTrue("readOnlyVal should be read-only.", readOnlyProp.isReadOnly());
-
- while (readOnlyIndex < 0 && i < size) {
- currProp = (Property) properties.get(i);
- if (currProp.equals(readOnlyProp))
- readOnlyIndex = i;
- i++;
- }
-
- try {
- testDO.set("readOnlyVal", "NewValue");
- fail("DataObject.set(string, value) should throw an UnsupportedOperationException when the Property represented by string is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.set(string, value) should throw an UnsupportedOperationException when the Property represented by string is read-only. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.set(readOnlyProp, "NewValue");
- System.out.println("propname =" + readOnlyProp.getName());
- fail("DataObject.set(property, value) should throw an UnsupportedOperationException when the Property represented by property is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.set(property, value) should throw an UnsupportedOperationException when the Property represented by property is read-only. " + e.getClass().getName() + " was thrown.");
- }
- assertTrue("The test case could not procede because the index of the read only Property was not found.", readOnlyIndex > -1);
- try {
- testDO.set(readOnlyIndex, "NewValue");
- fail("DataObject.set(index, value) should throw an UnsupportedOperationException when the Property represented by index is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.set(index, value) should throw an UnsupportedOperationException when the Property represented by index is read-only. " + e.getClass().getName() + " was thrown.");
- }
-
- try {
- testDO.unset("readOnlyVal");
- fail("DataObject.unset(string) should throw an UnsupportedOperationException when the Property represented by string is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.unset(string) should throw an UnsupportedOperationException when the Property represented by string is read-only. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.unset(readOnlyProp);
- fail("DataObject.unset(property) should throw an UnsupportedOperationException when the Property represented by property is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.unset(property) should throw an UnsupportedOperationException when the Property represented by property is read-only. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.unset(readOnlyIndex);
- fail("DataObject.unset(index) should throw an UnsupportedOperationException when the Property represented by index is read-only. No Exception was thrown.");
- } catch (UnsupportedOperationException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataObject.unset(index) should throw an UnsupportedOperationException when the Property represented by index is read-only. " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Verifies the following statement.
- * Modification of a read-only property results in UnsupportedOperationException.
- * This test case is for modification done through the List API.
- */
- public void testModifyReadOnlyUnsupportedOperationExceptionList() {
- Property readOnlyProp = testDO.getInstanceProperty("readOnlyVal");
- List properties = testDO.getInstanceProperties();
- Property currProp;
- int readOnlyIndex = -1, i = 0, size = properties.size();
-
- while (readOnlyIndex < 0 && i < size) {
- currProp = (Property) properties.get(i);
- if (currProp.equals(readOnlyProp))
- readOnlyIndex = i;
- i++;
- }
-
-// Not fixed in TUSCANY-578
-// try {
-// List temp = testDO.getList("readOnlyListVal");
-// temp.add("String to add.");
-// fail("DataObject.getList(path).add(value) should throw an UnsupportedOperationException when the Property represented by path is read-only. No Exception was thrown.");
-// } catch (UnsupportedOperationException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("DataObject.getList(path).add(value) should throw an IllegalArgumentException when the Property represented by path is read-only. " + e.getClass().getName() + " was thrown.");
-// }
-// try {
-// Sequence temp = testDO.getSequence();
-// temp.add("readOnlyListVal", "String to add.");
-// fail("DataObject.getSequence().add(path, value) should throw an UnsupportedOperationException when the Property represtend by path is read-only. No Exception was thrown.");
-// } catch (UnsupportedOperationException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("DataObject.getSequence().add(path, value) should throw an UnsupportedOperationException when the Property represtend by path is read-only. " + e.getClass().getName() + " was thrown.");
-// }
- }
-
- /**
- * Verifies the following statement.
- * Modification of a read-only property results in UnsupportedOperationException.
- * This test case is for modification done through the List API.
- */
- public void testModifyReadOnlyUnsupportedOperationExceptionSequence() {
- Property readOnlyProp = seqDO.getInstanceProperty("readOnlyVal");
- List properties = seqDO.getInstanceProperties();
- Property currProp;
- int readOnlyIndex = -1, i = 0, size = properties.size();
-
- while (readOnlyIndex < 0 && i < size) {
- currProp = (Property) properties.get(i);
- if (currProp.equals(readOnlyProp))
- readOnlyIndex = i;
- i++;
- }
-
-// Not fixed in TUSCANY-578
-// try {
-// Sequence sequence = seqDO.getSequence();
-// sequence.add(readOnlyProp, "New Value");
-// fail("Sequence.add(property, value) should throw an UnsupportedOperationException when the Property represented by property is read-only. No Exception was thrown.");
-// } catch (UnsupportedOperationException e) {
-// // Success - do nothing
-// } catch (Exception e) {
-// fail("Sequence.add(property, value) should throw an UnsupportedOperationException when the Property represented by property is read-only. " + e.getClass().getName() + " was thrown.");
-// }
- }
-
- /**
- * Verifies the following statement.
- * A ClassCastException results when cannot convert between value and requested Type.
- */
-
- public void testCannotConvertClassCastException() {
- // Attempt conversion from boolean
-
- try {
- testDO.getByte("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDouble("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getFloat("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getInt("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getLong("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigInteger("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("booleanVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
- // Attempt conversion from byte
- try {
- testDO.getBoolean("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigInteger("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("byteVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- // Attempt conversion from character
- try {
- testDO.getBoolean("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getByte("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDouble("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getFloat("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getInt("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getLong("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigInteger("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("charVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from double
- try {
- testDO.getBoolean("doubleVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("doubleVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("doubleVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("doubleVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from float
- try {
- testDO.getBoolean("floatVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("floatVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("floatVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("floatVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from int
- try {
- testDO.getBoolean("intVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("intVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("intVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("intVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from long
- try {
- testDO.getBoolean("longVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("longVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("longVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from short
- try {
- testDO.getBoolean("shortVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("shortVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("shortVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("shortVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigInteger("shortVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("shortVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from bytes
- try {
- testDO.getBoolean("bytesVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getByte("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDouble("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getFloat("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getInt("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getLong("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("bytesVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from decimal
- try {
- testDO.getBoolean("decimalVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getByte("decimalVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("decimalVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("decimalVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("decimalVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("decimalVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from BigInteger
- try {
- testDO.getBoolean("integerVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getByte("integerVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("integerVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("integerVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDate("integerVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
-
-// Attempt conversion from date
- try {
- testDO.getBoolean("dateVal");
- } catch (ClassCastException e) {
- // success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getByte("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getChar("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getDouble("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getFloat("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getInt("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getShort("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBytes("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigDecimal("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- try {
- testDO.getBigInteger("dateVal");
- } catch (ClassCastException e) {
-// success - do nothing
- } catch (Exception e) {
- fail("Attempted implicit unsupported conversion did not throw the correct Exception. Expected: ClassCastException. Received: " + e.getClass().getName());
- }
- }
-
-
- /**
- * Verifies the following statement.
- * Mixing single-valued and multi-valued Property access results in
- * ClassCastException.
- */
- public void testMixSingleMultiValueClassCastException() {
- Property testedProp = testDO.getInstanceProperty("intVal");
- List properties = testDO.getInstanceProperties();
- Property currProp;
- int testedIndex = -1, i = 0, size = properties.size();
-
- while (testedIndex < 0 && i < size) {
- currProp = (Property) properties.get(i);
-
- if (currProp.equals(testedProp))
- testedIndex = i;
- i++;
- }
-
- try {
- testDO.getList("intVal");
- fail("getList(string) should throw a ClassCastException when the property represented by string is single-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(string) should throw a ClassCastException when the property represented by string is single-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getList(testedProp);
- fail("getList(property) should throw a ClassCastException when the property represented by property is single-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(property) should throw a ClassCastException when the property represented by property is single-valued. " + e.getClass().getName() + " was thrown.");
- }
-
- assertTrue("The test case could not procede because the index of the single-valued Property was not found.", testedIndex > -1);
-
- try {
- testDO.getList(testedIndex);
- fail("getList(index) should throw a ClassCastException when the property represented by index is single-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getList(index) should throw a ClassCastException when the property represented by index is single-valued. " + e.getClass().getName() + " was thrown.");
- }
-
- testedProp = testDO.getInstanceProperty("listVal");
- testedIndex = -1;
- i = 0;
- while (testedIndex < 0 && i < size) {
- currProp = (Property) properties.get(i);
- if (currProp.equals(testedProp))
- testedIndex = i;
- i++;
- }
-
- try {
- testDO.getBoolean("listVal");
- fail("getBoolean(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte("listVal");
- fail("getByte(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar("listVal");
- fail("getChar(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble("listVal");
- fail("getDouble(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat("listVal");
- fail("getFloat(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt("listVal");
- fail("getInt(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong("listVal");
- fail("getLong(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort("listVal");
- fail("getShort(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes("listVal");
- fail("getBytes(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal("listVal");
- fail("getBigDecimal(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger("listVal");
- fail("getBigInteger(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject("listVal");
- fail("getDataObject(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate("listVal");
- fail("getDate(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString("listVal");
- fail("getString(string) should throw a ClassCastException when the property represented by string is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(string) should throw a ClassCastException when the property represented by string is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
-
- try {
- testDO.getBoolean(testedProp);
- fail("getBoolean(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte(testedProp);
- fail("getByte(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar(testedProp);
- fail("getChar(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble(testedProp);
- fail("getDouble(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat(testedProp);
- fail("getFloat(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt(testedProp);
- fail("getInt(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong(testedProp);
- fail("getLong(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort(testedProp);
- fail("getShort(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes(testedProp);
- fail("getBytes(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal(testedProp);
- fail("getBigDecimal(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger(testedProp);
- fail("getBigInteger(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject(testedProp);
- fail("getDataObject(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate(testedProp);
- fail("getDate(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString(testedProp);
- fail("getString(property) should throw a ClassCastException when the property represented by property is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(property) should throw a ClassCastException when the property represented by property is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
-
- assertTrue("The test case could not procede because the index of the multi-valued Property was not found.", testedIndex > -1);
-
- try {
- testDO.getBoolean(testedIndex);
- fail("getBoolean(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBoolean(index) should throw a ClassCastException when the property represented by is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getByte(testedIndex);
- fail("getByte(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getByte(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getChar(testedIndex);
- fail("getChar(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getChar(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDouble(testedIndex);
- fail("getDouble(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDouble(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getFloat(testedIndex);
- fail("getFloat(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getFloat(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getInt(testedIndex);
- fail("getInt(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getInt(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getLong(testedIndex);
- fail("getLong(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getLong(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getShort(testedIndex);
- fail("getShort(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getShort(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBytes(testedIndex);
- fail("getBytes(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBytes(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigDecimal(testedIndex);
- fail("getBigDecimal(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigDecimal(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getBigInteger(testedIndex);
- fail("getBigInteger(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getBigInteger(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDataObject(testedIndex);
- fail("getDataObject(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDataObject(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getDate(testedIndex);
- fail("getDate(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getDate(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- try {
- testDO.getString(testedIndex);
- fail("getString(index) should throw a ClassCastException when the property represented by index is multi-valued. No Exception was thrown.");
- } catch (ClassCastException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("getString(index) should throw a ClassCastException when the property represented by index is multi-valued. " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /*
- /**
- * Verifies the following statement.
- * Establishing circular containment results in an IllegalArgumentException.
- * Note: This test case will not be implemented because it has been determined
- * that the statement will be removed from the spec.
- */
- /*
- public void testContainmentCycleIllegalArgumentException() {
- // This test case will not be implemented.
- }
- */
-
- /**
- * Verifies the following statement.
- * An empty DataGraph can have a root assigned by the createRootObject() methods.
- * However, if a previous root DataObject exists than an IllegalStateException is
- * thrown.
- */
- public void testCreateRootObjectAgainIllegalStateException() {
- DataGraph dataGraph = SDOUtil.createDataGraph();
- Type type = testDO.getType();
-
- // verify the initial condition
- assertNull("The DataGraph should have been created without a root DataObject.", dataGraph.getRootObject());
- assertNotNull("DataObject.getType() returned null.", type);
-
- dataGraph.createRootObject(type);
-
- // verify the pre-condition
- assertNotNull("The DataGraph.createRootObject() should have created a root DataObject for the DataGraph.", dataGraph.getRootObject());
-
- try {
- dataGraph.createRootObject(type);
- fail("DataGraph.createRootObject(Type) should throw an IllegalStateException a root Object already exists for the DataGraph. No Exception was thrown.");
- } catch (IllegalStateException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataGraph.createRootObject(Type) should throw an IllegalStateException a root Object already exists for the DataGraph. " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Verifies the following statement.
- * DataFactory.create() throws an IllegalArgumentException if the instanceClass does
- * not correspond to a Type this factory can instantiate.
- */
- public void testDataFactoryCreateIllegalArgumentException() {
- try {
- helperContext.getDataFactory().create(java.lang.Object.class);
- fail("DataFactory.create(Object) should throw an IllegalArgumentException when it cannot instantiate the Type specified. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataFactory.create(Object) should throw an IllegalArgumentException when it cannot instantiate the Type specified. " + e.getClass().getName() + " was thrown.");
- }
-
- try {
- helperContext.getDataFactory().create(commonj.sdo.DataObject.class);
- fail("DataFactory.create(DataObject) should throw an IllegalArgumentException when it cannot instantiate the Type specified. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataFactory.create(DataObject) should throw an IllegalArgumentException when it cannot instantiate the Type specified. " + e.getClass().getName() + " was thrown.");
- }
-
- try {
- helperContext.getDataFactory().create(commonj.sdo.ChangeSummary.class);
- fail("DataFactory.create(ChangeSummary) should throw an IllegalArgumentException when it cannot instantiate the Type specified. No Exception was thrown.");
- } catch (IllegalArgumentException e) {
- // Success - do nothing
- } catch (Exception e) {
- fail("DataFactory.create(ChangeSummary) should throw an IllegalArgumentException when it cannot instantiate the Type specified. " + e.getClass().getName() + " was thrown.");
- }
- }
-
- /**
- * Defines the Type the first time through.
- */
- public void setUp() {
- if (!typeDefined) {
- helperContext = SDOUtil.createHelperContext();
-// createWithXSD(helperContext);
-// createDynamically(helperContext);
- createStatically(helperContext);
- typeDefined = true;
- }
-// testDO = helperContext.getDataFactory().create(TEST_URI, TEST_TYPE_NAME);
-// seqDO = helperContext.getDataFactory().create(TEST_URI, SEQ_TYPE_NAME);
- testDO = (DataObject) ExpectedExceptionFactory.INSTANCE.createExpectedExceptionType();
- seqDO = (DataObject) ExpectedExceptionFactory.INSTANCE.createSequenceReadOnlyType();
- }
-
- public static void createStatically(HelperContext hc) {
- ExpectedExceptionFactory.INSTANCE.register(hc);
- }
-
- public static void createWithXSD(HelperContext hc) {
- // Populate the meta data for the test model
- URL url = ExpectedExceptionsTestCase.class.getResource("/expectedExceptions.xsd");
- try {
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- } catch(IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * createDynamically() creates the SDO Types using the TypeHelper. This
- * method should be kept in synch with the XSD used for
- * createDynamicallyWithStaticResources. The same XSD is used for the static
- * generation of SDO Types using XSD2JavaGenerator.
- */
- public static void createDynamically(HelperContext hc) {
-
- TypeHelper types = hc.getTypeHelper();
- Type stringType = types.getType("commonj.sdo", "String");
- Type intType = types.getType("commonj.sdo", "Int");
- Type booleanType = types.getType("commonj.sdo", "Boolean");
- Type byteType = types.getType("commonj.sdo", "Byte");
- Type decimalType = types.getType("commonj.sdo", "Decimal");
- Type floatType = types.getType("commonj.sdo", "Float");
- Type doubleType = types.getType("commonj.sdo", "Double");
- Type dateType = types.getType("commonj.sdo", "Date");
- Type shortType = types.getType("commonj.sdo", "Short");
- Type longType = types.getType("commonj.sdo", "Long");
- Type bytesType = types.getType("commonj.sdo", "Bytes");
- Type integerType = types.getType("commonj.sdo", "Integer");
- Type charType = types.getType("commonj.sdo", "Character");
-
- DataObject testType = hc.getDataFactory().create("commonj.sdo", "Type");
- testType.set("uri", TEST_URI);
- testType.set("name", TEST_TYPE_NAME);
-
- DataObject stringProperty = testType.createDataObject("property");
- stringProperty.set("name", "stringVal");
- stringProperty.set("type", stringType);
-
- DataObject booleanProperty = testType.createDataObject("property");
- booleanProperty.set("name", "booleanVal");
- booleanProperty.set("type", booleanType);
-
- DataObject byteProperty = testType.createDataObject("property");
- byteProperty.set("name", "byteVal");
- byteProperty.set("type", byteType);
-
- DataObject decimalProperty = testType.createDataObject("property");
- decimalProperty.set("name", "decimalVal");
- decimalProperty.set("type", decimalType);
-
- DataObject intProperty = testType.createDataObject("property");
- intProperty.set("name", "intVal");
- intProperty.set("type", intType);
-
- DataObject floatProperty = testType.createDataObject("property");
- floatProperty.set("name", "floatVal");
- floatProperty.set("type", floatType);
-
- DataObject doubleProperty = testType.createDataObject("property");
- doubleProperty.set("name", "doubleVal");
- doubleProperty.set("type", doubleType);
-
- DataObject dateProperty = testType.createDataObject("property");
- dateProperty.set("name", "dateVal");
- dateProperty.set("type", dateType);
-
- DataObject shortProperty = testType.createDataObject("property");
- shortProperty.set("name", "shortVal");
- shortProperty.set("type", shortType);
-
- DataObject longProperty = testType.createDataObject("property");
- longProperty.set("name", "longVal");
- longProperty.set("type", longType);
-
- DataObject childrenProperty = testType.createDataObject("property");
- childrenProperty.set("name", "listVal");
- childrenProperty.setBoolean("many", true);
- childrenProperty.set("type", stringType);
-
- DataObject bytesProperty = testType.createDataObject("property");
- bytesProperty.set("name", "bytesVal");
- bytesProperty.set("type", bytesType);
-
- DataObject integerProperty = testType.createDataObject("property");
- integerProperty.set("name", "integerVal");
- integerProperty.set("type", integerType);
-
- DataObject charProperty = testType.createDataObject("property");
- charProperty.set("name", "charVal");
- charProperty.set("type", charType);
-
- DataObject readOnlyProperty = testType.createDataObject("property");
- readOnlyProperty.set("name", "readOnlyVal");
- readOnlyProperty.set("type", stringType);
- readOnlyProperty.setBoolean("readOnly", true);
-
- DataObject readOnlyListProperty = testType.createDataObject("property");
- readOnlyListProperty.set("name", "readOnlyListVal");
- readOnlyListProperty.set("type", stringType);
- readOnlyListProperty.setBoolean("readOnly", true);
- readOnlyListProperty.setBoolean("many", true);
-
- types.define(testType);
-
- DataObject seqType = hc.getDataFactory().create("commonj.sdo", "Type");
- seqType.set("uri", TEST_URI);
- seqType.set("name", SEQ_TYPE_NAME);
- seqType.setBoolean("sequenced", true);
-
- DataObject seqROProperty = seqType.createDataObject("property");
- seqROProperty.set("name", "readOnlyVal");
- seqROProperty.set("type", stringType);
- seqROProperty.setBoolean("readOnly", true);
-
- DataObject seqROListProperty = seqType.createDataObject("property");
- seqROListProperty.set("name", "readOnlyListVal");
- seqROListProperty.set("type", stringType);
- seqROListProperty.setBoolean("readOnly", true);
- seqROListProperty.setBoolean("many", true);
-
- DataObject uniqueNameProperty = seqType.createDataObject("property");
- uniqueNameProperty.set("name", "uniqueName");
- uniqueNameProperty.set("type", stringType);
-
- types.define(seqType);
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/FormTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/FormTestCase.java
deleted file mode 100644
index e630a8f903..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/FormTestCase.java
+++ /dev/null
@@ -1,112 +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.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-
-public class FormTestCase extends TestCase {
- XMLHelper xmlHelper;
- Map options;
-
- protected void setUp() throws Exception {
- super.setUp();
- HelperContext hc = SDOUtil.createHelperContext();
- hc.getXSDHelper().define(
-""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
-"");
- xmlHelper = hc.getXMLHelper();
- options = new HashMap();
- /*
- * turn off default behaviour of tolerating malformed xml
- * tests using this option and bad xml should demonstrate failure to load
- */
- options.put(SDOUtil.XML_LOAD_LaxForm, new Integer(0));
- }
-
- void load(String xml, Object options) throws IOException {
- assertNotNull(xmlHelper.load(new StringReader(xml), null, options).getRootObject());
- }
-
- /*
- * this malformed xml will load, as it uses the default lax approach
- */
- public void testLaxForm() throws IOException {
- load(
-""+
- ""+
- ""+
-"", null);
- }
-
- /*
- * any malformed xml through this method will fail to load
- * since the options instance member disables lax processing
- */
- protected final void load(String xml) throws IOException {
- try {
- load(xml, options);
- fail();
- } catch (Resource.IOWrappedException featureNotFound) {
- }
- }
-
- public void testUnqualifiedAttribute() throws IOException {
- load("");
- }
-
- public void testQualifiedAttribute() throws IOException {
- load("");
- }
-
- public void testUnqualifiedElement() throws IOException {
- load(
-""+
- ""+
-"");
- }
-
- public void testQualifiedElement() throws IOException {
- load(
-""+
- ""+
-"");
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/HelperContextTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/HelperContextTestCase.java
deleted file mode 100644
index 14e81b6a32..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/HelperContextTestCase.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 junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-
-public class HelperContextTestCase extends TestCase {
-
- public void testDefaultHelperContext() {
- HelperContext defaultHelperContext = HelperProvider.getDefaultContext();
-
- assertNotNull(defaultHelperContext.getCopyHelper());
- assertEquals(defaultHelperContext.getCopyHelper(), CopyHelper.INSTANCE);
- assertNotNull(defaultHelperContext.getDataFactory());
- assertEquals(defaultHelperContext.getDataFactory(), DataFactory.INSTANCE);
- assertNotNull(defaultHelperContext.getDataHelper());
- assertEquals(defaultHelperContext.getDataHelper(), DataHelper.INSTANCE);
- assertNotNull(defaultHelperContext.getEqualityHelper());
- assertEquals(defaultHelperContext.getEqualityHelper(), EqualityHelper.INSTANCE);
- assertNotNull(defaultHelperContext.getTypeHelper());
- assertEquals(defaultHelperContext.getTypeHelper(), TypeHelper.INSTANCE);
- assertNotNull(defaultHelperContext.getXMLHelper());
- assertEquals(defaultHelperContext.getXMLHelper(), XMLHelper.INSTANCE);
- assertNotNull(defaultHelperContext.getXSDHelper());
- assertEquals(defaultHelperContext.getXSDHelper(), XSDHelper.INSTANCE);
-
- }
-
- public void testCreateHelperContext() {
- HelperContext hc = SDOUtil.createHelperContext();
- assertNotNull(hc.getCopyHelper());
- assertNotNull(hc.getDataFactory());
- assertNotNull(hc.getDataHelper());
- assertNotNull(hc.getEqualityHelper());
- assertNotNull(hc.getTypeHelper());
- assertNotNull(hc.getXMLHelper());
- assertNotNull(hc.getXSDHelper());
-
- assertNotSame(hc.getDataFactory(), DataFactory.INSTANCE);
- assertNotSame(hc.getTypeHelper(), TypeHelper.INSTANCE);
- assertNotSame(hc.getXMLHelper(), XMLHelper.INSTANCE);
- assertNotSame(hc.getXSDHelper(), XSDHelper.INSTANCE);
- // the other "stateless" helpers may be the same as the singletons
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ImplSpecificTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ImplSpecificTestCase.java
deleted file mode 100644
index d5117c3fed..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/ImplSpecificTestCase.java
+++ /dev/null
@@ -1,74 +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;
-
-public class ImplSpecificTestCase extends TestCase {
-
- public void testThreadSafeHashmapIsAvailable() {
- // this will fail if using Java 1.4.x and the backport library has been removed from the classpath.
- // It is here because ChangeSummaryImpl contains the same logic for finding a threadsafe hashmap implementation
- // but it will fallback to a synchronized hashmap
- // if no threadsafe hashmap is available, hence no test failure will occur, but a performance hit
- // will. This test is here top show a failure with java 1.4 to ensure that no-one removes the backport
- // dependency introduced for TUSCANY-1006.
- assertNotNull(loadConcurrentHashMapClazz());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- }
-
- private static String[] concurrentHashMapClazzNames = new String[] {
- "java.util.concurrent.ConcurrentHashMap",
- "edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap"};
-
- private static Class loadConcurrentHashMapClazz()
- {
- Class mapClazz = null;
- for (int i = 0; i < concurrentHashMapClazzNames.length; i++)
- {
- String concurrentHashMapClazzName = concurrentHashMapClazzNames[i];
- try
- {
- mapClazz = Class.forName(concurrentHashMapClazzName, true, Thread.currentThread().getContextClassLoader());
- }
- catch (Exception ignored) {}
- if (mapClazz != null)
- {
- break;
- }
- try
- {
- mapClazz = Class.forName(concurrentHashMapClazzName);
- }
- catch (Exception ignored) {}
- if (mapClazz != null)
- {
- break;
- }
- }
- // System.out.println("threadsafe hashmap = " + mapClazz.getName());
- return mapClazz;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/IsManyTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/IsManyTestCase.java
deleted file mode 100644
index 1eef4ea657..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/IsManyTestCase.java
+++ /dev/null
@@ -1,65 +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.InputStream;
-import java.net.URL;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.*;
-import commonj.sdo.helper.*;
-
-public class IsManyTestCase extends TestCase {
- private final String TEST_MODEL = "/open.xsd";
- private final String TEST_MODEL1ANY = "/open1any.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/open";
- private final String TEST_NAMESPACE1ANY = "http://www.example.com/open1any";
-
- public void testIsMany() {
- Property priceProperty = XSDHelper.INSTANCE.getGlobalProperty(TEST_NAMESPACE, "price", true);
-
- Type quoteType = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "OpenQuote");
- DataObject quote = DataFactory.INSTANCE.create(quoteType);
- assertTrue( SDOUtil.isMany(priceProperty, quote));
-
- quoteType = TypeHelper.INSTANCE.getType(TEST_NAMESPACE1ANY, "OpenQuote");
- quote = DataFactory.INSTANCE.create(quoteType);
- assertFalse( SDOUtil.isMany(priceProperty, quote));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
-
- // Populate the meta data for the test (Stock Quote) model with maxOccurs=1
- url = getClass().getResource(TEST_MODEL1ANY);
- inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JavaSerializeDeserializeTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JavaSerializeDeserializeTestCase.java
deleted file mode 100644
index df69555d76..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JavaSerializeDeserializeTestCase.java
+++ /dev/null
@@ -1,297 +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.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-public class JavaSerializeDeserializeTestCase extends TestCase
-{
-
- public void testScopeDefinedSerializeDeserializeOfDataObject()
- {
- HelperContext hc = SDOUtil.createHelperContext();
- Object originalDataObject = createDynamically(hc,true);
-
- runSerializeDeserialize((DataObject)originalDataObject, hc);
- }
-
- public void testScopeDefinedSerializeDeserializeOfDataGraph()
- {
- HelperContext hc = SDOUtil.createHelperContext();
- DataGraph testDO = (DataGraph)createDynamically(hc,false);
-
- runSerializeDeserializeWithDataGraph(testDO, hc);
- }
-
- private String xsdString = "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
-
- "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "";
-
- public void testLargePayload()
- {
- HelperContext hc = SDOUtil.createHelperContext();
- hc.getXSDHelper().define(xsdString);
- DataObject company = hc.getDataFactory().create("http://www.example.com/simple", "Company");
- company.setString("symbol", "EXAMPLE");
- company.setString("companyName", "Example Inc.");
- List employees = company.getList("employees");
- DataObject employee;
- for (int i=0; i<1000; i++) {
- employee = hc.getDataFactory().create("http://www.example.com/simple", "Employee");
- employee.setString("employeeID", "ID #" + i);
- employee.setString("employeeName", "Empoyee #" + i);
- employees.add(employee);
- }
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = SDOUtil.createObjectOutputStream(bos, hc);
- oos.writeObject(company);
- oos.flush();
- byte[] bytes = bos.toByteArray();
- oos.close();
- bos.close();
-
- ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
- ObjectInputStream ois = SDOUtil.createObjectInputStream(bis, hc);
- ois.readObject();
- ois.close();
- bis.close();
- }
- catch (Exception e) {
- e.printStackTrace();
- fail("An Exception occurred while deserializing the output of the serialization: " + e.toString());
- }
- }
-
-
- /**
- * Serialize the DataObject then Deserialize the output.
- * to testDO.
- * @param testDO
- * @param scope
- */
-
- public void runSerializeDeserialize(DataObject originalDataObject, HelperContext hc)
- {
-
- populateFields(originalDataObject);
- DataObject tempDO = null;
- ByteArrayOutputStream baos = null;
-
- try
- {
- baos = serialize(originalDataObject, hc);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("An Exception occurred while serializing the DataObject: " + e.toString());
- }
-
- try
- {
- tempDO = deserialize(baos, hc);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("An Exception occurred while deserializing the output of the serialization: " + e.toString());
- }
-
- assertNotNull("Deserialization returned a null value.", tempDO);
-
- assertSame(tempDO.getType(), originalDataObject.getType());
-
-
- }
-
- /**
- * Serialize the DataGraph
- * @param dataGraph
- * @param scope
- */
- public void runSerializeDeserializeWithDataGraph(DataGraph dataGraph, HelperContext hc)
- {
- DataObject originalDataObject = dataGraph.getRootObject();
- populateFields(originalDataObject);
- DataObject tempDO = null;
- ByteArrayOutputStream baos = null;
-
- try
- {
- baos = serialize(dataGraph, hc);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("An Exception occurred while serializing the DataObject: " + e.toString());
- }
-
- try
- {
- tempDO = deserialize(baos, hc);
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- fail("An Exception occurred while deserializing the output of the serialization: " + e.toString());
- }
-
- assertNotNull("Deserialization returned a null value.", tempDO);
-
- assertSame(tempDO.getType(), originalDataObject.getType());
-
-
-
- }
-
- /**
- * serializeDataObject is a private method to be called by the other methods
- * in the ScrenarioLibrary
- *
- * @param dataObject
- * @param fileName
- * @throws IOException
- */
- public ByteArrayOutputStream serialize(Object object, HelperContext hc) throws IOException
- {
- //FileOutputStream fos = new FileOutputStream("temp");
- ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
- ObjectOutputStream out = SDOUtil.createObjectOutputStream(byteArrayOutput, hc);
- out.writeObject(object);
- out.close();
- return byteArrayOutput;
- }
-
- /**
- * deserializeDataObject is a private method to be called by the other
- * methods in the ScrenarioLibrary
- *
- * @param fileName
- * @return
- * @throws IOException
- * @throws ClassNotFoundException
- */
- public DataObject deserialize(ByteArrayOutputStream baos, HelperContext hc) throws IOException, ClassNotFoundException
- {
- //FileInputStream fis = new FileInputStream("temp");
- ObjectInputStream input = null;
- ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(baos.toByteArray());
-
- input = SDOUtil.createObjectInputStream(byteArrayInput, hc);
-
- Object object = input.readObject();
- input.close();
- if(object instanceof DataGraph)
- return ((DataGraph)object).getRootObject();
- else
- return (DataObject)object;
- }
-
- /**
- * populateFields uses set to set each of the fields in the
- * DataObject. It is used to ensure a known set of expected values that are
- * not other than the default values for the various fields.
- *
- * @param testDO
- * @throws ExpectedConditionError
- */
- public static void populateFields(DataObject testDO)
- {
-
- testDO.setString("stringVal", "Testing");
-
- }
- /**
- * createDynamically() creates the SDO Types using the TypeHelper. This method should be kept in
- * synch with the XSD used for createDynamicallyWithStaticResources. The same XSD is used for
- * the static generation of SDO Types using XSD2JavaGenerator.
- */
- public Object createDynamically(HelperContext hc, boolean createDataObject)
- {
-
- TypeHelper types = hc.getTypeHelper();
- DataFactory dataFactory = hc.getDataFactory();
-
- Type stringType = types.getType("commonj.sdo", "String");
-
- DataObject testType = dataFactory.create("commonj.sdo", "Type");
- testType.set("uri", "http://www.example.com/api_test");
- testType.set("name", "APITest");
-
- DataObject stringProperty = testType.createDataObject("property");
- stringProperty.set("name", "stringVal");
- stringProperty.set("type", stringType);
-
-
- List types2Define = new ArrayList();
- types2Define.add(testType);
- List apiXSD = types.define(types2Define);
- Type apiXSDType = (Type) apiXSD.get(0);
-
- if(createDataObject)
- return dataFactory.create(apiXSDType);;
-
- // Create an empty DataGraph and attach the document root to it. Otherwise, where is the documentRoot ?
- DataGraph dataGraph = SDOUtil.createDataGraph();
- /*DataObject testDO =*/ dataGraph.createRootObject(apiXSDType);
-
-
- return dataGraph;
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JiraTestCases.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JiraTestCases.java
deleted file mode 100644
index bd66949c89..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/JiraTestCases.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 org.apache.tuscany.sdo.test;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-import commonj.sdo.*;
-import commonj.sdo.helper.*;
-import commonj.sdo.impl.HelperProvider;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import java.util.HashMap;
-
-/**
- * The follow test cases are based upon code snipets in the SDO specification.
- * They are also implemented as working samples in the sample-sdo artifact
- *
- */
-public class JiraTestCases extends TestCase {
-
- /**
- * Bogus company namespace
- */
- public static final String COMPANY_NAMESPACE = "company.xsd";
-
- /**
- * previously defined XSD file used
- */
- public static final String COMPANY_XSD = "/company.xsd";
-
- /**
- * XML file containing DataGraph representing a company. This xml file
- * conforms to the company model defined in 'Complete DataGraph for Company
- * Example' section of the SDO specification
- */
- public static final String COMPANY_DATAGRAPH_XML = "/companyDataGraphGenerated.xml";
-
- /**
- * Generated DataGraph
- * {@link org.apache.tuscany.samples.sdo.company.CreateCompany}
- */
- public static final String COMPANY_DATAOBJECT_XML = "/companyGenerated.xml";
-
- /**
- * Defines xsd resource contained within jar file for PurchaseOrder
- * DataObject
- */
- public static final String PO_XSD_RESOURCE = "/po.xsd";
-
- /**
- * Defines xml resource contained within jar file that is used to populate
- * PurchaseOrder DataObjects
- */
- public static final String PO_XML_RESOURCE = "/po.xml";
-
- /**
- * previously created XSD file used
- */
- public static final String LETTER_XSD = "/letter.xsd";
-
- /**
- * JIRA Details : Add a method to SDOUtil to return all Types associated
- * with a specific URI
- */
- public void test_TUSCANY583() {
- HelperContext hc = HelperProvider.getDefaultContext();
- XSDHelper xsdHelper = hc.getXSDHelper();
- // define some types
- try {
- xsdHelper.define(getClass().getResourceAsStream(
- PO_XSD_RESOURCE), null);
-
- xsdHelper.define(getClass().getResourceAsStream(
- COMPANY_XSD), null);
-
- createDynamicType();
-
- String[] expectedPoTypeNames = {"item", "Items",
- "PurchaseOrderType", "quantity", "SKU", "USAddress"};
-
- String[] expectedCompanyTypeNames = {"EmployeeType", "DepartmentType", "CompanyType"};
-
- String[] expectedCustomerTypeNames = {"Customer"};
-
- confirmTypes("http://www.example.com/PO", expectedPoTypeNames);
- confirmTypes("company.xsd", expectedCompanyTypeNames);
- confirmTypes("http://example.com/customer",
- expectedCustomerTypeNames);
-
- } catch (Exception e) {
- fail("Unexpected error " + e.toString());
- e.printStackTrace();
- }
-
- }
-
- /**
- * Dynamically define customer Type
- */
- public static void createDynamicType() {
- // get an instance of the type helper
- TypeHelper typeH = TypeHelper.INSTANCE;
- Type intType = typeH.getType("commonj.sdo", "Int");
- Type stringType = typeH.getType("commonj.sdo", "String");
-
- // create a new Type for Customers
- DataObject customerType = DataFactory.INSTANCE.create("commonj.sdo",
- "Type");
-
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- // create a customer number property
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
-
- // create a last name property
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
-
- // create a first name property
- DataObject firstNameProperty = customerType
- .createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
-
- // now define the Customer type so that customers can be made
- typeH.define(customerType);
- }
-
- private void confirmTypes(String uri, String[] expectedTypeNames) {
- HelperContext hc = HelperProvider.getDefaultContext();
- try {
-
- List actualTypes = SDOUtil.getTypes(hc, uri);
- assertNotNull("Testing that list of types for " + uri
- + " is not null", actualTypes);
-
- // test the number of Types
- assertEquals("Testing number of types for " + uri,
- expectedTypeNames.length, actualTypes.size());
-
- // put into a HashMap for easy lookup
- HashMap typeLookup = new HashMap();
- for (int i = 0; i < actualTypes.size(); i++) {
- Type type = (Type) actualTypes.get(i);
- typeLookup.put(type.getName(), type);
- }
-
- // check that we have the same types
- for (int i = 0; i < expectedTypeNames.length; i++) {
- assertTrue("testing that type " + expectedTypeNames[i]
- + "was returned for " + uri, typeLookup
- .containsKey(expectedTypeNames[i]));
- }
-
- } catch (Exception e) {
- fail("Exception caught comparing expected types to actual types for uri "
- + uri + ":" + e.toString());
- e.printStackTrace();
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MetadataInstancePropertiesTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MetadataInstancePropertiesTestCase.java
deleted file mode 100644
index 885153b62e..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MetadataInstancePropertiesTestCase.java
+++ /dev/null
@@ -1,243 +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.InputStream;
-import java.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-
-public class MetadataInstancePropertiesTestCase extends TestCase
-{
- private final String TEST_MODEL = "/TypePropertyMetadataInfo.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/metadata/retrievaltest";
- private final String DYNAMIC_TEST_NAMESPACE = "http://www.example.com/metadata/dynamicmetadata";
-
- private HelperContext helperContext;
- private TypeHelper typeHelper;
- private XSDHelper xsdHelper;
- private DataFactory dataFactory;
-
- public void testXSDTypeProperties()
- {
- // Note: We won't check the actual value of XSD instance properties yet since they're not defined
- // in the SDO spec yet.
-
- //displayInstanceProperties(TEST_NAMESPACE);
-
- Type type = typeHelper.getType(TEST_NAMESPACE, "Example");
- assertTrue(getInstanceProperty(type, "appinfo") != null);
- assertTrue(getInstanceProperty(type, "foo") == null);
-
- Property property = type.getProperty("number");
- assertTrue(getInstanceProperty(property, "appinfo") != null);
- assertTrue(getInstanceProperty(property, "foo") == null);
-
- property = type.getProperty("Exampletype");
- assertTrue(getInstanceProperty(property, "appinfo") != null);
- assertTrue(getInstanceProperty(property, "foo") == null);
-
- type = typeHelper.getType(TEST_NAMESPACE, "ExampleNumber");
- assertTrue(getInstanceProperty(type, "appinfo") != null);
- assertTrue(getInstanceProperty(type, "minInclusive") != null);
- assertTrue(getInstanceProperty(type, "maxInclusive") != null);
- assertTrue(getInstanceProperty(type, "foo") == null);
-
- type = typeHelper.getType(TEST_NAMESPACE, "ExampleRating");
- assertTrue(getInstanceProperty(type, "enumeration") != null);
- assertTrue(getInstanceProperty(type, "foo") == null);
-
- type = typeHelper.getType(TEST_NAMESPACE, "PhoneNumber");
- assertTrue(getInstanceProperty(type, "appinfo") != null);
- assertTrue(getInstanceProperty(type, "length") != null);
- assertTrue(getInstanceProperty(type, "pattern") != null);
- assertTrue(getInstanceProperty(type, "foo") == null);
- }
-
- public void testDynamicTypeProperties()
- {
- // Create dynamic model
- Type intType = typeHelper.getType("commonj.sdo", "Int");
- Type stringType = typeHelper.getType("commonj.sdo", "String");
-
- Property openContentProperty = typeHelper.getOpenContentProperty("commonj.sdo/xml", "xmlElement");
-
- // create a new Type for Customers
- DataObject customerType = dataFactory.create("commonj.sdo", "Type");
- customerType.set("uri", DYNAMIC_TEST_NAMESPACE);
- customerType.set("name", "Customer");
- customerType.set(openContentProperty, Boolean.TRUE);
-
- // create a customer number property
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
-
- // create a first name property
- DataObject firstNameProperty =
- customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
- firstNameProperty.set(openContentProperty, Boolean.FALSE);
-
- // create a last name property
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
-
- // now define the Customer type so that customers can be made
- typeHelper.define(customerType);
-
- //displayInstanceProperties(DYNAMIC_TEST_NAMESPACE);
-
- Type type = typeHelper.getType(DYNAMIC_TEST_NAMESPACE, "Customer");
- assertTrue(getInstanceProperty(type, "xmlElement") == openContentProperty);
- assertTrue(type.get(openContentProperty) == Boolean.TRUE);
- assertTrue(getInstanceProperty(type, "foo") == null);
-
- Property property = type.getProperty("custNum");
- assertTrue(getInstanceProperty(property, "xmlElement") == null);
- assertTrue(getInstanceProperty(property, "foo") == null);
-
- property = type.getProperty("firstName");
- assertTrue(getInstanceProperty(property, "xmlElement") == openContentProperty);
- assertTrue(property.get(openContentProperty) == Boolean.FALSE);
- assertTrue(getInstanceProperty(property, "foo") == null);
-
- property = type.getProperty("lastName");
- assertTrue(getInstanceProperty(property, "xmlElement") == null);
- assertTrue(getInstanceProperty(property, "foo") == null);
- }
-
- //Amita
- public void testEnumProperty()
- {
- Type type = typeHelper.getType(TEST_NAMESPACE, "ExampleRating");
- assertTrue(getInstanceProperty(type, "enumeration") != null);
- List enumFacet = SDOUtil.getEnumerationFacet(type);
- assertEquals(3, enumFacet.size());
- assertEquals("", enumFacet.get(0));
- assertEquals("Good", enumFacet.get(1));
- assertEquals("Bad", enumFacet.get(2));
- }
-
- //Amita
- public void testPatternProperty()
- {
- Type type = typeHelper.getType(TEST_NAMESPACE, "PhoneNumber");
- assertTrue(getInstanceProperty(type, "pattern") != null);
- List patternFacet = SDOUtil.getPatternFacet(type);
- assertEquals(2, patternFacet.size());
- assertEquals("\\d{3}-\\d{4}", patternFacet.get(0));
- assertEquals("\\d{6}-\\d{8}", patternFacet.get(1));
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
-
- helperContext = SDOUtil.createHelperContext();
-
- typeHelper = helperContext.getTypeHelper();
- xsdHelper = helperContext.getXSDHelper();
- dataFactory = helperContext.getDataFactory();
-
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
-
- xsdHelper.define(inputStream, url.toString());
- inputStream.close();
- }
-
- public Property getInstanceProperty(Type type, String propertyName)
- {
- return getInstanceProperty(type.getInstanceProperties(), propertyName);
- }
-
- public Property getInstanceProperty(Property property, String propertyName)
- {
- return getInstanceProperty(property.getInstanceProperties(), propertyName);
- }
-
- private Property getInstanceProperty(List instProps, String propertyName)
- {
- for (int i = 0; i < instProps.size(); i++)
- {
- Property prop = (Property)instProps.get(i);
- if (propertyName.equals(prop.getName()))
- return prop;
- }
- return null;
- }
-
- private void displayInstanceProperties(Type type)
- {
- System.out.println("Type's name: " + type.getName());
- List instProps = type.getInstanceProperties();
- for (int i = 0; i < instProps.size(); i++)
- {
- Property prop = (Property)instProps.get(i);
- System.out.println("\tType's instance property name: " + prop.getName());
- System.out.println("\tType's instance property value: \"" + type.get(prop) + "\"");
- }
- }
-
- private void displayInstanceProperties(Property prop)
- {
- System.out.println("\tProperty's name: " + prop.getName());
- List propsInstProps = prop.getInstanceProperties();
- for (int j = 0; j < propsInstProps.size(); j++)
- {
- Property propsInstProp = (Property)propsInstProps.get(j);
- System.out.println("\t\tProperty's instance property name: " + propsInstProp.getName());
- System.out.println("\t\tProperty's instance property value: \"" + prop.get(propsInstProp) + "\"");
- }
- }
-
- public void displayInstanceProperties(String namespace)
- {
- List types = SDOUtil.getTypes(helperContext, namespace);
- for (int i = 0; i < types.size(); i++)
- {
- Type type = (Type)types.get(i);
- displayInstanceProperties(type);
- List properties = type.getProperties();
- for (int j = 0; j < properties.size(); j++)
- {
- Property property = (Property)properties.get(j);
- displayInstanceProperties(property);
- }
- System.out.println("**************************************");
- }
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java
deleted file mode 100644
index 806662a83c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java
+++ /dev/null
@@ -1,89 +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.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import junit.framework.TestCase;
-
-
-public class MixedTypeTestCase extends TestCase {
- private final String TEST_MODEL = "/mixed.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/mixed";
- private final String TEST_DATA = "/mixed.xml";
-
- /**
- * Sequenced type SDO 2 test.
- */
- public void testSequencedType() throws IOException {
- Type quoteType = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "MixedQuote");
- DataObject quote = DataFactory.INSTANCE.create(quoteType);
-
- Sequence sequence = quote.getSequence();
-
- sequence.add("\n ");
-
- quote.setString("symbol", "fbnt");
-
- sequence.add("\n ");
-
- quote.setString("companyName", "FlyByNightTechnology");
-
- sequence.add("\n some text\n ");
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- sequence.add("\n more text\n ");
-
- // quote.setBigDecimal("price", new BigDecimal("1000.0"));
- sequence.add("price", new BigDecimal("1000.0"));
-
- sequence.add("\n");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLHelper.INSTANCE.save(quote, TEST_NAMESPACE, "mixedStockQuote", baos);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NeverStaleChangeSummaryTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NeverStaleChangeSummaryTestCase.java
deleted file mode 100644
index 544672a8b1..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NeverStaleChangeSummaryTestCase.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.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class NeverStaleChangeSummaryTestCase extends TestCase {
- private final String TEST_MODEL = "/simpleWithChangeSummary.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/simpleCS";
-
- /**
- * Simple ChangeSummary test.
- */
- public void testChangeSummary() throws Exception {
- Type quoteType = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "RootQuote");
- DataObject quote = DataFactory.INSTANCE.create(quoteType);
-
- ChangeSummary cs = quote.getChangeSummary();
-
- // Begin logging changes
- //
- cs.beginLogging();
-
- DataObject child = quote.createDataObject("quotes");
- cs.isCreated(child);
- child = quote.createDataObject("quotes");
- assertTrue(cs.isCreated(child));
-
- // Stop logging changes and print the resulting data graph to stdout
- //
- cs.endLogging();
-
- cs.isCreated(child);
-
- cs.undoChanges();
-
- assertFalse(cs.isCreated(child));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NotificationTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NotificationTestCase.java
deleted file mode 100644
index 5d1637865b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/NotificationTestCase.java
+++ /dev/null
@@ -1,186 +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 junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.Event;
-import org.apache.tuscany.sdo.impl.ListenerBase;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * Test DataObject Property value change notification
- */
-public class NotificationTestCase extends TestCase {
-
- HelperContext hc;
- TypeHelper th;
-
- private class Observer extends ListenerBase {
-
- private int notificationCount;
- private Event lastEvent;
-
- public int getNotificationCount() {
- return notificationCount;
- }
-
- public Event getLastEvent() {
- return lastEvent;
- }
-
- public Observer() {
- notificationCount = 0;
- }
-
- public void eventNotification(Event e) {
-
- if (e.getEventType() != Event.REMOVE_LISTENER) {
- notificationCount++;
- lastEvent = e;
- }
- }
-
- }
-
- public void testTransitions() throws IOException {
- final String TEST_MODEL = "/simple.xsd";
- final String TEST_NAMESPACE = "http://www.example.com/simple";
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
- Type quoteType = th.getType(TEST_NAMESPACE, "Quote");
- DataObject quote = hc.getDataFactory().create(quoteType);
- Observer o = new Observer();
- SDOUtil.addChangeListener(quote, o);
-
- Event e;
-
- String firstName = "FlyByNightTechnology";
-
- int changeCount = 0;
-
- quote.setString("companyName", firstName);
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertEquals(Event.SET, e.getEventType());
- assertEquals(null, e.getOldValue());
- assertFalse(e.wasSet());
-
- quote.setString("companyName", "FBNT");
- e = o.getLastEvent();
- assertTrue(e.wasSet());
-
- assertEquals(firstName, e.getOldValue());
- assertEquals(++changeCount, o.getNotificationCount());
- assertEquals("companyName", e.getProperty().getName());
-
- SDOUtil.removeChangeListener(quote, o);
-
- quote.setString("companyName", "3rdValue");
- e = o.getLastEvent();
-
- assertEquals(firstName, e.getOldValue());
- assertEquals(changeCount /* no ++ */, o.getNotificationCount());
-
- SDOUtil.addChangeListener(quote, o);
-
- quote.setString("companyName", "3rdValue");
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertTrue(e.isTouch());
- assertTrue(e.wasSet());
-
- quote.unset("companyName");
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertTrue(e.wasSet());
-
-
- quote.set("companyName", "4thValue");
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertFalse(e.wasSet());
-
- assertEquals(Event.NO_INDEX, e.getPosition());
-
- DataObject child = quote.createDataObject("quotes");
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertFalse(e.wasSet());
- assertEquals(0, e.getPosition());
- assertEquals(Event.ADD, e.getEventType());
-
- DataObject child2 = quote.createDataObject("quotes");
- assertEquals(++changeCount, o.getNotificationCount());
- e = o.getLastEvent();
- assertTrue(e.wasSet()); // the quotes property was previously set to a non empty list
- assertEquals(1, e.getPosition());
-
- child2.setString("companyName", "subsidiary");
-
- assertEquals(changeCount /* no ++ */, o.getNotificationCount()); // not monitoring the child
-
- quote.getList("quotes").clear();
- e = o.getLastEvent();
- assertEquals(++changeCount, o.getNotificationCount());
- assertEquals(Event.REMOVE_MANY, e.getEventType());
-
- List newList = new ArrayList();
-
- newList.add(hc.getDataFactory().create(quoteType));
- newList.add(hc.getDataFactory().create(quoteType));
-
- quote.getList("quotes").addAll(newList);
- e = o.getLastEvent();
- assertEquals(++changeCount, o.getNotificationCount());
- assertEquals(Event.ADD_MANY, e.getEventType());
-
-
-
-
- }
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java
deleted file mode 100644
index 3e5a410aa3..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java
+++ /dev/null
@@ -1,139 +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.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.util.Iterator;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import junit.framework.TestCase;
-
-
-public class OpenTypeTestCase extends TestCase {
- private HelperContext hc;
- private TypeHelper th;
- private XSDHelper xsdh;
- private XMLHelper xmlh;
- private DataFactory df;
- private final String TEST_MODEL = "/open.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/open";
- private final String TEST_DATA = "/open.xml";
-
- /**
- * Open content SDO 2 test.
- */
- public void testOpenType() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "OpenQuote");
- DataObject quote = df.create(quoteType);
-
- quote.setString("symbol", "s1");
-
- for (Iterator iter = quote.getInstanceProperties().iterator(); iter.hasNext();) {
- iter.next();
- }
-
- Property companyProperty = xsdh.getGlobalProperty(TEST_NAMESPACE, "company", true);
- DataObject company = quote.createDataObject(companyProperty);
- company.setString("name", "FlyByNightTechnology");
-
- Property priceProperty = xsdh.getGlobalProperty(TEST_NAMESPACE, "price", true);
- quote.getList(priceProperty).add(new BigDecimal("1000.0"));
-
- for (Iterator iter = quote.getInstanceProperties().iterator(); iter.hasNext();) {
- iter.next();
- }
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlh.save(quote, TEST_NAMESPACE, "openStockQuote", baos);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA)));
- }
-
-
- public void testOpenType_Tuscany_396() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "OpenQuote2");
- DataObject quote = df.create(quoteType);
-
- Property priceProperty = xsdh.getGlobalProperty(TEST_NAMESPACE, "price", true);
- // the importance of this is that the maxOccurs=1 attribute on the xsd:any
- // allows is to use the !isMany getters and setters for open content
- quote.set(priceProperty, new BigDecimal("1000.0"));
-
- }
-
- /**
- * Although this behavior is not mandated by the SDO 2.1 specification it should be possible
- * to demand-create DataObject properties by calling createDataObject(String name).
- * The behavior should be the same as that specified in section 9.10 for parsing XML that has
- * no types defined e.g. the property should be created as an open, sequenced type with many=true.
- *
- * See https://issues.apache.org/jira/browse/TUSCANY-1397 for more information.
- *
- * @throws Exception
- */
- public void testOnDemandCreateDataObject() throws Exception {
- // define an open type with no properties
- DataObject typeDef = df.create( "commonj.sdo", "Type" );
- typeDef.set( "uri", TEST_NAMESPACE );
- typeDef.set( "name", "testOnDemandCreateDataObjectType" );
- typeDef.setBoolean( "open", true );
- Type t = th.define( typeDef );
-
- // create a DataObject that uses this type
- DataObject testDO = df.create(t);
-
- // create an on-demand property
- DataObject foo = testDO.createDataObject( "foo" );
- assertNotNull( "createDataObject() demand created a DataObject", foo );
- assertTrue( "DataObject is open", foo.getType().isOpen() );
- assertTrue( "DataObject is sequenced", foo.getType().isSequenced() );
- }
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
- xsdh = hc.getXSDHelper();
- df = hc.getDataFactory();
- xmlh = hc.getXMLHelper();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SchemaLocationTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SchemaLocationTestCase.java
deleted file mode 100644
index eaec327007..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SchemaLocationTestCase.java
+++ /dev/null
@@ -1,48 +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.util.*;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.helper.*;
-
-public class SchemaLocationTestCase extends TestCase {
- private final String TEST_XML_DOCUMENT = "/SchemaLocationTestCase.xml";
-
- /**
- * This method will load an xml document consisting of a xsi:schemaLocation and xsi:noNamespaceSchemaLocation defined. It will then use the
- * XMLDocument API to get and set the schemaLocation property.
- *
- * @throws IOException
- */
- public void testSchemaLocation() throws IOException {
- // load the xml document which has xsi:noNamespaceSchemaLocation and xsi:schemaLocation defined
- Map options = new HashMap();
- options.put(SDOUtil.XML_LOAD_SCHEMA, Boolean.TRUE);
- XMLDocument doc = XMLHelper.INSTANCE.load(getClass().getResourceAsStream(TEST_XML_DOCUMENT), "whatever", options);
- assertNotSame(doc.getRootObject().getType(), SDOPackage.eINSTANCE.getAnyTypeDataObject());
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SequenceTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SequenceTestCase.java
deleted file mode 100644
index e02ace5d2a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SequenceTestCase.java
+++ /dev/null
@@ -1,100 +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.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XSDHelper;
-
-public class SequenceTestCase extends TestCase {
- HelperContext hc;
- Type type;
- Property localA, choiceX, choiceY, localB, open;
-
- String xml = ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- "";
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- hc.getXSDHelper().define(xml);
- type = hc.getTypeHelper().getType("testNS", "Sequenced");
- localA = type.getProperty("localA");
- choiceX = type.getProperty("choiceX");
- choiceY = type.getProperty("choiceY");
- localB = type.getProperty("localB");
- XSDHelper xsdHelper = hc.getXSDHelper();
- open = xsdHelper.getGlobalProperty("testNS", "open", true);
- }
-
- public void testSequenced() {
- DataObject dataObject = hc.getDataFactory().create(type);
- Sequence sequence = dataObject.getSequence();
-
- sequence.add(choiceX, "x1");
- sequence.add(0, localA, "a");
- sequence.add(choiceY, "y1");
- sequence.add(choiceX, "x2");
- sequence.add(localB, "b");
- sequence.add(open, "open");
-
- List list = dataObject.getList(localA);
- assertEquals(list.size(), 1);
- assertEquals(list.get(0), "a");
-
- assertEquals(dataObject.getString(localB), "b");
-
- list = dataObject.getList(choiceX);
- assertEquals(list.size(), 2);
- assertEquals(list.get(0), "x1");
- assertEquals(list.get(1), "x2");
-
- list = dataObject.getList(choiceY);
- assertEquals(list.size(), 1);
- assertEquals(list.get(0), "y1");
-
- list = dataObject.getList(open);
- assertEquals(list.size(), 1);
- assertEquals(list.get(0), "open");
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SerializeTypesTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SerializeTypesTestCase.java
deleted file mode 100644
index a8e00d5eb2..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SerializeTypesTestCase.java
+++ /dev/null
@@ -1,190 +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.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-
-public class SerializeTypesTestCase extends TestCase {
-
- HelperContext hc;
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- }
-
- public void testSerializeTypesRoundTrip() throws Exception {
- TypeHelper types = hc.getTypeHelper();
- DataFactory factory = hc.getDataFactory();
-
- Type intType = types.getType("commonj.sdo", "Int");
- Type stringType = types.getType("commonj.sdo", "String");
-
- // create a new Type for Addresses
- DataObject addressType = factory.create("commonj.sdo", "Type");
- addressType.set("uri", "http://example.com/address");
- addressType.set("name", "Address");
-
- // create a address street property
- DataObject addrStProperty = addressType.createDataObject("property");
- addrStProperty.set("name", "addrSt");
- addrStProperty.set("type", stringType);
-
- // create a new Type for Customers
- DataObject customerType = factory.create("commonj.sdo", "Type");
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- // create a customer number property
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
-
- // create a first name property
- DataObject firstNameProperty = customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
-
- // create a last name property
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
-
- // create an address property
- DataObject addressProperty = customerType.createDataObject("property");
- addressProperty.set("name", "address");
- addressProperty.set("type", addressType);
- addressProperty.setBoolean("containment", true);
-
- // now define the Address and Customer type so that addresses and customers can be made
- List types2define = new ArrayList();
- types2define.add(addressType);
- types2define.add(customerType);
- List typesDefined = types.define(types2define);
-
- // Create an empty data graph and add a root object, an instance of customerType
- //
-
- DataGraph dataGraph = SDOUtil.createDataGraph();
- Type customerTypeDefined = (Type) typesDefined.get(1);
- DataObject customer1 = dataGraph.createRootObject(customerTypeDefined);
-
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
- DataObject address = customer1.createDataObject("address");
- address.set("addrSt", "577 Airport Blvd");
-
- SDOUtil.registerDataGraphTypes(dataGraph, typesDefined);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dataGraph, baos, null);
- //SDOUtil.saveDataGraph(dataGraph, System.out, null);
-
- byte[] serialized = baos.toByteArray();
- ByteArrayInputStream bais = new ByteArrayInputStream(serialized);
- DataGraph loadedDataGraph = SDOUtil.loadDataGraph(bais, null, hc);
-
- DataObject loadedRootObject = loadedDataGraph.getRootObject();
- assertNotSame(loadedRootObject.getType(), customer1.getType());
-
- // EqualityHelper requires same Type
- assertEquals(loadedRootObject.getInt("custNum"), customer1.getInt("custNum"));
- assertEquals(loadedRootObject.get("firstName"), customer1.get("firstName"));
- assertEquals(loadedRootObject.get("lastName"), customer1.get("lastName"));
- DataObject loadedAddress = loadedRootObject.getDataObject("address");
- assertEquals(loadedAddress.get("addrSt"), address.get("addrSt"));
- }
-
- private String xsdString =
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- "";
-
-
- private String testString = "Hello World";
- private String testStringInBase64 = "SGVsbG8gV29ybGQ=";
- private String testStringInHex = "48656C6C6F20576F726C64";
-
- public void testSerializeXSDBase64BinaryRoundTrip() throws Exception {
- hc.getXSDHelper().define(xsdString);
-
- DataObject typeTest = hc.getDataFactory().create("http://www.example.com/simple", "BytesTypeTest");
- typeTest.setBytes("base64Binary", testString.getBytes());
-
- String output = hc.getXMLHelper().save(typeTest, typeTest.getType().getURI(), "bytesTypeTest");
-
- String startTag = "";
- String endTag = "";
- int start = output.indexOf(startTag) + startTag.length();
- int end = output.indexOf(endTag);
-
- String value = output.substring(start, end);
- assertEquals(testStringInBase64, value);
-
- XMLDocument xmlDoc = hc.getXMLHelper().load(output);
- typeTest = xmlDoc.getRootObject();
- assertEquals(testString, new String(typeTest.getBytes("base64Binary")));
- }
-
- public void testSerializeXSDHexBinaryRoundTrip() throws Exception {
- hc.getXSDHelper().define(xsdString);
-
- DataObject typeTest = hc.getDataFactory().create("http://www.example.com/simple", "BytesTypeTest");
- typeTest.setBytes("hexBinary", testString.getBytes());
-
- String output = hc.getXMLHelper().save(typeTest, typeTest.getType().getURI(), "bytesTypeTest");
-
- String startTag = "";
- String endTag = "";
- int start = output.indexOf(startTag) + startTag.length();
- int end = output.indexOf(endTag);
-
- String value = output.substring(start, end);
- assertEquals(testStringInHex, value);
-
- XMLDocument xmlDoc = hc.getXMLHelper().load(output);
- typeTest = xmlDoc.getRootObject();
- assertEquals(testString, new String(typeTest.getBytes("hexBinary")));
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java
deleted file mode 100644
index 36f038d779..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java
+++ /dev/null
@@ -1,71 +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.io.InputStream;
-import java.net.URL;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import junit.framework.TestCase;
-
-public class SimpleCopyTestCase extends TestCase {
-
- private final String TEST_MODEL = "/simple.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/simple";
- private final String QUOTE_XML = "/quote.xml";
- private final String SHALLOW_QUOTE_XML = "/shallowquote.xml";
-
- public void testSimpleCopy() throws IOException {
- XMLDocument doc = XMLHelper.INSTANCE.load(getClass().getResourceAsStream(QUOTE_XML));
- DataObject sdo = doc.getRootObject();
-
- DataObject copiedSdo = CopyHelper.INSTANCE.copyShallow(sdo);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLHelper.INSTANCE.save(copiedSdo, TEST_NAMESPACE, "stockQuote", baos);
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(SHALLOW_QUOTE_XML)));
- assertFalse(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(QUOTE_XML)));
-
- copiedSdo = CopyHelper.INSTANCE.copy(sdo);
-
- baos.reset();
- XMLHelper.INSTANCE.save(copiedSdo, TEST_NAMESPACE, "stockQuote", baos);
- assertFalse(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(SHALLOW_QUOTE_XML)));
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(QUOTE_XML)));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java
deleted file mode 100644
index 55aae9d396..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java
+++ /dev/null
@@ -1,123 +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.io.InputStream;
-import java.math.BigDecimal;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-
-public class SimpleDynamicTestCase extends TestCase {
- private final String TEST_MODEL = "/simple.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/simple";
- private final String QUOTE_XML = "/quote.xml";
-
- //private final String TEST_MODEL2 = "/simple2.xsd";
- //private final String TEST_NAMESPACE2 = "http://www.example.com/simple2";
- //private final String QUOTE_XML2 = "/quote2.xml";
-
- HelperContext hc;
- TypeHelper th;
-
- /**
- * Simple Dynamic SDO 2 test.
- */
- public void testDynamic() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "Quote");
- DataObject quote = hc.getDataFactory().create(quoteType);
-
- quote.setString("symbol", "fbnt");
- quote.setString("companyName", "FlyByNightTechnology");
- quote.setBigDecimal("price", new BigDecimal("1000.0"));
- quote.setBigDecimal("open1", new BigDecimal("1000.0"));
- quote.setBigDecimal("high", new BigDecimal("1000.0"));
- quote.setBigDecimal("low", new BigDecimal("1000.0"));
- quote.setDouble("volume", 1000);
- quote.setDouble("change1", 1000);
-
- DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- hc.getXMLHelper().save(quote, TEST_NAMESPACE, "stockQuote", baos);
-
- assertFalse(quote.isSet("undefined"));
- assertSame(quote.get("undefined"), null);
-
- assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(QUOTE_XML)));
- }
-
- /*
- public void dontTestResolveXSDWithoutSchemaLocation() throws IOException {
-
- URL url = getClass().getResource(TEST_MODEL2);
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, null);
- inputStream.close();
-
- Type quote2Type = th.getType(TEST_NAMESPACE2, "Quote2");
- DataObject quote2 = hc.getDataFactory().create(quote2Type);
-
- quote2.setString("symbol", "fbnt");
- quote2.setString("companyName", "FlyByNightTechnology");
- quote2.setBigDecimal("price", new BigDecimal("1000.0"));
- quote2.setBigDecimal("open1", new BigDecimal("1000.0"));
- quote2.setBigDecimal("high", new BigDecimal("1000.0"));
- quote2.setBigDecimal("low", new BigDecimal("1000.0"));
- quote2.setDouble("volume", 1000);
- quote2.setDouble("change1", 1000);
-
- DataObject child = quote2.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- hc.getXMLHelper().save(quote2, TEST_NAMESPACE2, "stockQuote", System.out);
- }
- */
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java
deleted file mode 100644
index 8db9ba9d04..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.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 org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-import junit.framework.TestCase;
-
-public class SimpleEqualityTestCase extends TestCase {
- private static final String TEST_MODEL = "/simple.xsd";
- private static final String QUOTE_XML = "/quote.xml";
- private static final String SHALLOW_QUOTE_XML = "/shallowquote.xml";
-
- public void testEquality() throws IOException {
-
- XMLDocument doc = XMLHelper.INSTANCE.load(getClass().getResourceAsStream(QUOTE_XML));
- DataObject sdo = doc.getRootObject();
-
- doc = XMLHelper.INSTANCE.load(getClass().getResourceAsStream(SHALLOW_QUOTE_XML));
- DataObject shallowSdo = doc.getRootObject();
-
- boolean result = EqualityHelper.INSTANCE.equalShallow(sdo, shallowSdo);
- assertTrue(result);
-
- result = EqualityHelper.INSTANCE.equal(sdo, shallowSdo);
- assertFalse(result);
- }
-
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // Populate the meta data for the test (Stock Quote) model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
- }
-
- public void testBytesEquality() {
- // Dynamically create a type
- HelperContext scope = HelperProvider.getDefaultContext();
- TypeHelper types = scope.getTypeHelper();
- Type BytesType = types.getType("commonj.sdo", "Bytes");
- DataObject customerType = DataFactory.INSTANCE.create("commonj.sdo", "Type");
- customerType.set("uri", "http://example.com/simple");
- customerType.set("name", "Simple");
- DataObject BytesProperty = customerType.createDataObject("property");
- BytesProperty.set("name", "BytesVal");
- BytesProperty.set("type", BytesType);
- types.define(customerType);
-
- // Create two instances
- DataObject obj1 = DataFactory.INSTANCE.create("http://example.com/simple", "Simple");
- DataObject obj2 = DataFactory.INSTANCE.create("http://example.com/simple", "Simple");
-
- obj1.setBytes("BytesVal", new byte[] {120, 80, -40});
- obj2.setBytes("BytesVal", new byte[] {120, 80, -40});
-
- assertTrue( scope.getEqualityHelper().equal(obj1, obj2) );
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValuesTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValuesTestCase.java
deleted file mode 100644
index fb729ea125..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValuesTestCase.java
+++ /dev/null
@@ -1,83 +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.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public final class SubstitutionValuesTestCase extends TestCase
-{
- public void test() throws IOException
- {
- HelperContext hc = SDOUtil.createHelperContext();
- URL url = getClass().getResource("/SubstitutionValues.xsd");
- XSDHelper xsdHelper = hc.getXSDHelper();
- xsdHelper.define(url.openStream(), url.toString());
-
- XMLHelper xmlHelper = hc.getXMLHelper();
- DataObject loadedObject =
- xmlHelper.load(getClass().getResourceAsStream("/substitutionValues1.xml")).getRootObject();
- Type type = loadedObject.getType();
- Sequence groupHeadSubstitutionValues = SDOUtil.getSubstitutionValues(loadedObject, type.getProperty("groupHead"));
- assertNotNull(groupHeadSubstitutionValues);
- assertNull(SDOUtil.getSubstitutionValues(loadedObject, type.getProperty("nonGroupHead")));
-
- String nsURI = "http://www.apache.org/tuscany/SubstitutionValues";
- DataObject createdObject = hc.getDataFactory().create(nsURI, "TestObject");
- Property groupMemberProperty = xsdHelper.getGlobalProperty(nsURI, "groupMember", true);
- createdObject.set(groupMemberProperty, groupHeadSubstitutionValues.getValue(0));
- createdObject.setString("nonGroupHead", loadedObject.getString("nonGroupHead"));
-
- assertTrue(hc.getEqualityHelper().equal(loadedObject, createdObject));
-
- ByteArrayOutputStream loadedBaos = new ByteArrayOutputStream();
- xmlHelper.save(loadedObject, nsURI, "testObject", loadedBaos);
- ByteArrayOutputStream createdBaos = new ByteArrayOutputStream();
- xmlHelper.save(createdObject, nsURI, "testObject", createdBaos);
- assertTrue(
- TestUtil.equalXmlFiles(
- new ByteArrayInputStream(loadedBaos.toByteArray()),
- new ByteArrayInputStream(createdBaos.toByteArray())));
-
- loadedObject =
- xmlHelper.load(getClass().getResourceAsStream("/substitutionValues2.xml")).getRootObject();
- groupHeadSubstitutionValues = SDOUtil.getSubstitutionValues(loadedObject, type.getProperty("groupHead"));
-
- createdObject = hc.getDataFactory().create(nsURI, "TestObject");
- createdObject.set("groupHead", groupHeadSubstitutionValues.getValue(0));
- createdObject.setString("nonGroupHead", loadedObject.getString("nonGroupHead"));
-
- assertTrue(hc.getEqualityHelper().equal(loadedObject, createdObject));
- }
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
deleted file mode 100644
index a7ab3f954a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
+++ /dev/null
@@ -1,285 +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, but within
- // the array exist the get(index), get(property), and get(path). Rather than
- // referring to each of the three in every circumstance, the more compact array appears.
- private static ConversionType TO_BOOLEAN = new ConversionType("Boolean", boolean.class );
- private static ConversionType TO_BYTE = new ConversionType("Byte", byte.class );
- private static ConversionType TO_CHAR = new ConversionType("Char", char.class );
- private static ConversionType TO_DOUBLE = new ConversionType("Double", double.class );
- private static ConversionType TO_FLOAT = new ConversionType("Float", float.class );
- private static ConversionType TO_INT = new ConversionType("Int", int.class );
- private static ConversionType TO_LONG = new ConversionType("Long", long.class );
- private static ConversionType TO_SHORT = new ConversionType("Short", short.class );
- private static ConversionType TO_BYTES = new ConversionType("Bytes", byte[].class );
- private static ConversionType TO_BIGDECIMAL = new ConversionType("BigDecimal", java.math.BigDecimal.class );
- private static ConversionType TO_BIGINTEGER = new ConversionType("BigInteger", java.math.BigInteger.class );
- private static ConversionType TO_DATAOBJECT = new ConversionType("DataObject", commonj.sdo.DataObject.class );
- private static ConversionType TO_DATE = new ConversionType("Date", java.util.Date.class );
- private static ConversionType TO_STRING = new ConversionType("String", java.lang.String.class );
- private static ConversionType TO_LIST = new ConversionType("List", java.util.List.class );
- // There is no setXXXX methods for sequence...
- private static ConversionType TO_SEQUENCE = new ConversionType("Sequence", null );
-
- private static GeneralComparator COMPARE_ANY;
-
- // There will be several instances where a Property must be passed as a parameter. Have available the Type
- // to call getProperty() as needed.
-
- private static Type API_TEST_TYPE;
-
- // The default constructor establishes each of the Method and Method[] variables.
-
- public TypeConversionTestCase() throws Exception
- {
- COMPARE_ANY = new GeneralComparator();
-
- // Populate the meta data for the test model
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- XSDHelper.INSTANCE.define(inputStream, url.toString());
- inputStream.close();
-
- API_TEST_TYPE = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "APITest");
-
- }
-
- private static class ConversionType
- {
- // The following constants are used because the getMethod function requires an Class
- // array describing the parameters to the functions.
-
- private static final Class[] GET_INT_CLASS_ARRAY = {int.class};
- private static final Class[] GET_PROPERTY_CLASS_ARRAY = {Property.class};
- private static final Class[] GET_STRING_CLASS_ARRAY = {String.class};
- private static final Class[] SET_INT_CLASS_ARRAY = {int.class, Class.class};
- private static final Class[] SET_PROPERTY_CLASS_ARRAY = {Property.class, Class.class};
- private static final Class[] SET_STRING_CLASS_ARRAY = {String.class, Class.class};
-
- Method get_index_method;
- Method get_property_method;
- Method get_path_method;
- Method set_index_method;
- Method set_property_method;
- Method set_path_method;
-
- public ConversionType (String method_name, Class type )
- {
- try
- {
- this.get_index_method = DataObject.class.getMethod("get"+method_name, GET_INT_CLASS_ARRAY);
- this.get_property_method = DataObject.class.getMethod("get"+method_name, GET_PROPERTY_CLASS_ARRAY);
- this.get_path_method = DataObject.class.getMethod("get"+method_name, GET_STRING_CLASS_ARRAY);
- if( type != null )
- {
- SET_INT_CLASS_ARRAY[1] = type;
- this.set_index_method = DataObject.class.getMethod("set"+method_name, SET_INT_CLASS_ARRAY);
- SET_PROPERTY_CLASS_ARRAY[1] = type;
- this.set_property_method = DataObject.class.getMethod("set"+method_name, SET_PROPERTY_CLASS_ARRAY);
- SET_STRING_CLASS_ARRAY[1] = type;
- this.set_path_method = DataObject.class.getMethod("set"+method_name, SET_STRING_CLASS_ARRAY);
- }
- else
- {
- this.set_index_method = null;
- this.set_property_method = null;
- this.set_path_method = null;
- }
- }
- catch (NoSuchMethodException e)
- {
- this.get_index_method = null;
- this.get_property_method = null;
- this.get_path_method = null;
- this.set_index_method = null;
- this.set_property_method = null;
- this.set_path_method = null;
- }
- }
-
- public Method getIndexGetMethod()
- {
- return this.get_index_method;
- }
-
- public Method getPropertyGetMethod()
- {
- return this.get_property_method;
- }
-
- public Method getPathGetMethod()
- {
- return this.get_path_method;
- }
- public Method getIndexSetMethod()
- {
- return this.set_index_method;
- }
-
- public Method getPropertySetMethod()
- {
- return this.set_property_method;
- }
-
- public Method getPathSetMethod()
- {
- return this.set_path_method;
- }
- }
-
- // Each instance of Test describes a convert-from type. The index, property and path parms
- // will refer to the same field, which is a field of the convert-from type.
-
- private static class Test
- {
- DataObject test_obj;
- Object[] get_index_parm;
- Object[] get_property_parm;
- Object[] get_path_parm;
- Object[] set_index_parm;
- Object[] set_property_parm;
- Object[] set_path_parm;
- Object expected_value;
- String from_type;
- Class from_type_class;
-
- // The constructor prepares a test DataObject and determines how to access the field
- // in three different ways - index, property, and path.
-
- Test(String path, int index)
- {
- this.test_obj = DataFactory.INSTANCE.create(API_TEST_TYPE);
- this.get_index_parm = new Object[] {new Integer(index)};
- this.get_property_parm = new Object[] {API_TEST_TYPE.getProperty(path)};
- this.get_path_parm = new Object[] {path};
- this.set_index_parm = new Object[] {new Integer(index), null};
- this.set_property_parm = new Object[] {API_TEST_TYPE.getProperty(path), null};
- this.set_path_parm = new Object[] {path, null};
- this.expected_value = null;
- }
-
- // The initialize() function establishes the initial value of the test field.
-
- public void initialize(Class type, String type_name, Object initial_value) throws Exception
- {
- this.expected_value = initial_value;
- this.from_type = type_name;
- this.from_type_class = type;
-
- setDefaultValue();
- }
-
- private void setDefaultValue() throws Exception
- {
- Class[] classArray = {int.class, from_type_class};
- Object[] initValueArray = new Object[] {this.get_index_parm[0], expected_value};
- Method setter = DataObject.class.getMethod("set" + from_type, classArray);
- setter.invoke(test_obj, initValueArray);
- }
-
- // Attempts the conversion to the specified type, using DataObject.get____().
- // The get___() function can be called with an index, path, and property. attemptConversion()
- // calls each of those three.
-
- public void attemptConversion(ConversionType to_type) throws Exception
- {
- performConversion(to_type.getIndexGetMethod(), this.get_index_parm, to_type.getIndexSetMethod(), this.set_index_parm);
- performConversion(to_type.getPathGetMethod(), this.get_path_parm, to_type.getPathSetMethod(), this.set_path_parm );
- performConversion(to_type.getPropertyGetMethod(), this.get_property_parm, to_type.getPropertySetMethod(), this.set_property_parm );
- }
-
- public void checkConversionException(ConversionType to_type, Class expected_exception) throws Exception
- {
- boolean index_err, path_err, property_err, consistency_err = false;
-
- index_err = executeExceptionCase(to_type.getIndexGetMethod(), this.get_index_parm, expected_exception);
- path_err = executeExceptionCase(to_type.getPathGetMethod(), this.get_path_parm, expected_exception);
- property_err = executeExceptionCase(to_type.getPropertyGetMethod(), this.get_property_parm, expected_exception);
-
- if (index_err != path_err || path_err != property_err)
- consistency_err = true;
- else if (index_err == false)
- attemptConversion(to_type);
-
- assertFalse("An exception inconsistency exists for " + to_type.getPathGetMethod().getName() + " when called "
- + "for a " + this.from_type + " property.", consistency_err);
- }
-
- private void performConversion (Method getMeth, Object[] getParm, Method setMeth, Object[] setParm ) throws Exception
- {
- // First use the set
- try
- {
- // get the set value
- setParm[1] = getMeth.invoke(test_obj, getParm);;
- // now set it...
- setMeth.invoke(test_obj, setParm);
- }
- catch (Exception e)
- {
- Throwable cause = e.getCause();
- if (cause == null)
- {
- System.err.println("An exception of type " + e.getClass() + " occurred while performing " + setMeth.getName()
- + " on a " + this.from_type + " property.");
- }
- else
- {
- System.err.println("An exception of type " + cause.getClass() + " occurred while performing " + setMeth.getName()
- + " on a " + this.from_type + " property.");
- }
-
- throw e;
- }
-
- try
- {
-
- assertTrue("Conversion did not yield expected value for get" + getMeth.getName() + " on a " + this.from_type + " property.",
- COMPARE_ANY.compare(getMeth.invoke(test_obj, getParm), this.expected_value) == 0);
- }
- catch (Exception e)
- {
- Throwable cause = e.getCause();
- if (cause == null)
- {
- System.err.println("An exception of type " + e.getClass() + " occurred while performing " + getMeth.getName()
- + " on a " + this.from_type + " property.");
- }
- else
- {
- System.err.println("An exception of type " + cause.getClass() + " occurred while performing " + getMeth.getName()
- + " on a " + this.from_type + " property.");
- }
-
- throw e;
- }
-
- // reset to default
- setDefaultValue();
- }
-
-
-
- private boolean executeExceptionCase (Method convert, Object[] parm, Class expected_exception) throws Exception
- {
- boolean exception_thrown = false;
- try
- {
- convert.invoke(test_obj, parm);
- }
- catch (Exception e)
- {
- exception_thrown = true;
- Throwable cause = e.getCause();
- if (cause == null)
- {
- assertEquals("An unexpected exception occurred while performing " + convert.getName()
- + " on a " + this.from_type + " property.", expected_exception, e.getClass());
- }
- else
- {
- assertEquals("An unexpected exception occurred while performing " + convert.getName()
- + " on a " + this.from_type + " property.", expected_exception, cause.getClass());
- }
- }
-
- return exception_thrown;
- }
- }
-
- private static class GeneralComparator implements Comparator
- {
- public int compare(Object obj1, Object obj2)
- {
- if (obj1.getClass() == obj2.getClass())
- {
- if (obj1.equals(obj2))
- return 0;
- else
- return 1;
- }
-
- else if ( (obj1.getClass() == byte[].class && obj2.getClass() == String.class) ||
- (obj2.getClass() == byte[].class && obj1.getClass() == String.class) )
- {
- String strVal;
- byte [] byteVal;
-
- if( obj1.getClass() == String.class )
- {
- strVal = (String)obj1;
- byteVal = (byte [])obj2;
- }
- else
- {
- strVal = (String)obj2;
- byteVal = (byte [])obj1;
- }
-
- if( strVal.length()/2 != byteVal.length )
- return -1;
-
- for( int i=0; i" +LINE_BREAK+
-MARGIN+ "" +LINE_BREAK+
-MARGIN+INDENT+ "FBNT" +LINE_BREAK+
-MARGIN+INDENT+ "FlyByNightTechnology" +LINE_BREAK+
-MARGIN+INDENT+ "999.0" +LINE_BREAK+
-MARGIN+INDENT+ "1000.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "1500.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "2500.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "3000.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "4000.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "fbnt" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "1000.0" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "2000.02000.99" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+ "");
- }
-
- public void notestSaveMixedOutputStreamObject() throws IOException {
- format("/mixedChangeSummary.xml",
-MARGIN+ "" +LINE_BREAK+
-MARGIN+ "" +LINE_BREAK+
-INDENT+ "" +LINE_BREAK+
-INDENT+INDENT+ "fbnt" +LINE_BREAK+
-INDENT+INDENT+ "FlyByNightTechnology" +LINE_BREAK+
-INDENT+INDENT+ "1000.0" +LINE_BREAK+
-INDENT+INDENT+ "" +LINE_BREAK+
-INDENT+INDENT+ "2000.02000.99" +LINE_BREAK+
-INDENT+INDENT+ "" +LINE_BREAK+
-INDENT+ "" +LINE_BREAK+
-"FBNTFlyByNightTechnology999.01500.02500.01000.03000.04000.0");
- }
-
- public void notestOpenMixedOutputStreamObject() throws IOException {
- format("/openChangeSummary.xml",
-MARGIN+ "" +LINE_BREAK+
-MARGIN+ "" +LINE_BREAK+
-MARGIN+INDENT+ "FBNT" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "1500.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "2500.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "3000.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "4000.0" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "fbnt" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "2000.02000.99" +LINE_BREAK+
-MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
-MARGIN+INDENT+ "" +LINE_BREAK+
-MARGIN+ "");
- }
-
- private String quoteXML =
- "" +
- "" +
- "fbnt" +
- "FlyByNightTechnology" +
- "1000.0" +
- "1000.0" +
- "1000.0" +
- "1000.0" +
- "1000.0" +
- "1000.0" +
- "" +
- "2000.0" +
- "" +
- "";
-
- public void testLoadDOMSource() throws IOException, ParserConfigurationException, SAXException
- {
- DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
- dFactory.setNamespaceAware(true);
-
- DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
- Document document = dBuilder.parse(new ByteArrayInputStream(quoteXML.getBytes()));
-
- DOMSource domSource = new DOMSource(document);
-
- XMLDocument xmlDocument = hc.getXMLHelper().load(domSource, null, null);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- Map options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_SAVE_INDENT, "");
- options.put(SDOHelper.XMLOptions.XML_SAVE_MARGIN, "");
- options.put(SDOHelper.XMLOptions.XML_SAVE_LINE_BREAK, "");
-
- hc.getXMLHelper().save(xmlDocument, baos, options);
-
- boolean isEqual = TestUtil.equalXmlFiles(new ByteArrayInputStream(quoteXML.getBytes()), new ByteArrayInputStream(baos.toByteArray()));
- assertTrue(isEqual);
- }
-
- private String xsdStr =
- "" +
- "" +
-// "" +
- "" +
- "" +
- "" +
- "" +
- "" +
- "";
-
- /**
- * Test the scenario of serializing and deserializing an SDO with an undefined global SDO property
- * In this scenario, the target XSD namespace doesn't have any global element defined
- *
- */
- public void testDemandCreateRootObject() {
- HelperContext hc = SDOUtil.createHelperContext();
- hc.getXSDHelper().define(xsdStr);
- DataObject quote = hc.getDataFactory().create("http://www.example.com/simple", "Quote");
- quote.set("symbol", "abc");
-
- String xmlStr = hc.getXMLHelper().save(quote, quote.getType().getURI(), "demandcreate");
-
- XMLDocument doc = hc.getXMLHelper().load(xmlStr);
- try {
- doc.getRootObject();
- }
- catch (ClassCastException e) {
- fail(e.toString());
- }
- }
-
- /**
- * This test case is similar to the testDemandCreateRootObject above. The only difference is
- * the data model was created using SDO APIs instead of XSD.
- *
- */
- public void testDemandCreateRootObject2() {
- HelperContext hc1 = SDOUtil.createHelperContext();
- Type stringType = hc1.getTypeHelper().getType("commonj.sdo", "String");
-
- DataObject quoteTypeDef = hc1.getDataFactory().create("commonj.sdo", "Type");
- quoteTypeDef.set("uri", "http://www.example.com/simple");
- quoteTypeDef.set("name", "Quote");
-
- DataObject symbolPropDef = quoteTypeDef.createDataObject("property");
- symbolPropDef.set("name", "symbol");
- symbolPropDef.set("type", stringType);
-
- hc1.getTypeHelper().define(quoteTypeDef);
-
- DataObject quote = hc1.getDataFactory().create("http://www.example.com/simple", "Quote");
- quote.set("symbol", "abc");
-
- String xmlStr = hc1.getXMLHelper().save(quote, quote.getType().getURI(), "demandcreate");
-
- HelperContext hc2 = SDOUtil.createHelperContext();
- hc2.getXSDHelper().define(xsdStr);
-
- XMLDocument doc = hc2.getXMLHelper().load(xmlStr);
- try {
- doc.getRootObject();
- }
- catch (ClassCastException e) {
- fail(e.toString());
- }
- }
-
- public void testEncoding() throws IOException
- {
- TypeHelper types = hc.getTypeHelper();
- Type stringType = types.getType("commonj.sdo", "String");
- DataObject customerType = hc.getDataFactory().create("commonj.sdo", "Type");
- customerType.set("uri", "http://example.com/simple");
- customerType.set("name", "Simple");
- DataObject multiProperty = customerType.createDataObject("property");
- multiProperty.set("name", "name");
- multiProperty.set("type", stringType);
- types.define(customerType);
- DataObject obj = hc.getDataFactory().create("http://example.com/simple",
- "Simple");
- obj.set("name", "John Smith");
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- hc.getXMLHelper().save(obj, "http://www.example.com/company" , "company", baos);
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toString().getBytes());
- XMLDocument xmlDoc = hc.getXMLHelper().load(bais);
- if( !"UTF-8".equals(xmlDoc.getEncoding()) )
- {
- fail("Encoding ('" + xmlDoc.getEncoding() +"' is not correct. UTF-8 is the expected encoding.");
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLLoadOptionsTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLLoadOptionsTestCase.java
deleted file mode 100644
index d58b070a90..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLLoadOptionsTestCase.java
+++ /dev/null
@@ -1,192 +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.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.eclipse.emf.ecore.resource.Resource;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-
-public class XMLLoadOptionsTestCase extends TestCase {
- XMLHelper xmlHelper;
- Map options;
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- //SDOUtil->SDOHelper->SDOHelperImpl->HelperContextImpl->XMLHelperImpl
- public void testXMLOptionsSchema1() throws IOException{
- final String TEST_XML_DOCUMENT = "/SchemaLocationTestCase.xml";
-
- options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_LOAD_SCHEMA, Boolean.TRUE);
-
- final XMLHelper xmlHelper = SDOUtil.createHelperContext(true, options).getXMLHelper();
-
- final XMLDocument xmlDoc = xmlHelper.load(getClass().getResourceAsStream(TEST_XML_DOCUMENT), "whatever", null);
- final DataObject root = xmlDoc.getRootObject();
- assertNotSame(root.getType(), SDOPackage.eINSTANCE.getAnyTypeDataObject());
- }
-
-// SDOUtil->SDOHelper->SDOHelperImpl->HelperContextImpl->XMLHelperImpl
- public void testXMLOptionsSchema2() throws IOException{
- final String TEST_XML_DOCUMENT = "/SchemaLocationTestCase.xml";
-
- options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_LOAD_SCHEMA, Boolean.FALSE);
- final XMLHelper xmlHelper = SDOUtil.createHelperContext(true, options).getXMLHelper();
- final XMLDocument xmlDoc = xmlHelper.load(getClass().getResourceAsStream(TEST_XML_DOCUMENT), "whatever", null);
- final DataObject root = xmlDoc.getRootObject();
- assertSame(root.getType(), SDOPackage.eINSTANCE.getAnyTypeDataObject());
- }
-
- public void testXMLOptionsLax1() throws IOException{
- options = new HashMap();
- /*
- * turn off default behaviour of tolerating malformed xml
- * tests using this option and bad xml should demonstrate failure to load
- */
- options.put(SDOHelper.XMLOptions.XML_LOAD_LAX_FORM, new Integer(0));
- final HelperContext hc = SDOUtil.createHelperContext(true, options);
- hc.getXSDHelper().define(
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- "");
-
- final String xml=""+
- ""+
-"";
-
- /*
- * this malformed xml will not load, as lax is forced OFF
- * changing p:unqualifiedElement to unqualifiedElement
- * will work */
- try{
- hc.getXMLHelper().load(new StringReader(xml), null, null);
- fail();
- } catch (final Resource.IOWrappedException featureNotFound) {
- assertTrue(true);
- }
-
- }
-
- public void testXMLOptionsLax2() throws IOException{
- options = new HashMap();
- /*
- * turn on default behaviour of tolerating malformed xml
- * tests using this option and bad xml will load
- */
- options.put(SDOHelper.XMLOptions.XML_LOAD_LAX_FORM, new Integer(1));
- final HelperContext hc = SDOUtil.createHelperContext(true, options);
- hc.getXSDHelper().define(
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- "");
-
- final String xml=""+
- ""+
- ""+
- "";
-
- /*
- * this malformed xml will load, as lax is forced ON
- */
- assertNotNull(hc.getXMLHelper().load(new StringReader(xml), null, null).getRootObject());
- }
-
- //SDOUtil->SDOHelper->SDOHelperImpl->XMLStreamHelperImpl->XMLDocumentImpl
- public void testXMLStreamHelper() throws IOException, XMLStreamException{
- options = new HashMap();
- /*
- * turn off default behaviour of tolerating malformed xml
- * tests using this option and bad xml will load
- */
- options.put(SDOHelper.XMLOptions.XML_LOAD_LAX_FORM, new Integer(1));
- final HelperContext hc = SDOUtil.createHelperContext(false, options);
- final XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(hc);
- hc.getXSDHelper().define(
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- "");
-
- final String xml=""+
- ""+
- ""+
- "";
-
- final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
- final XMLStreamReader reader1 = inputFactory.createXMLStreamReader(new StringReader(xml));
- int event = reader1.getEventType();
- while (!(event == XMLStreamConstants.START_ELEMENT)){
- event = reader1.next();
- }
- final DataObject dataObject = streamHelper.loadObject(reader1);
- /*
- * this malformed xml will load, as lax is forced ON
- */
- assertNotNull(dataObject);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLSaveOptionsTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLSaveOptionsTestCase.java
deleted file mode 100644
index 27b750b0ff..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLSaveOptionsTestCase.java
+++ /dev/null
@@ -1,147 +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.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.HashMap;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamWriter;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class XMLSaveOptionsTestCase extends TestCase {
- HelperContext hc;
- private XSDHelper xsdHelper;
- XMLHelper xmlh;
- XMLStreamHelper xmlStreamHelper;
- static final String INDENT = " ", MARGIN = " ", LINE_BREAK = "\n";
- String formatted1 = MARGIN+ "" +LINE_BREAK+
- MARGIN+ "" +LINE_BREAK+
- MARGIN+INDENT+ "FBNT" +LINE_BREAK+
- MARGIN+INDENT+ "FlyByNightTechnology" +LINE_BREAK+
- MARGIN+INDENT+ "999.0" +LINE_BREAK+
- MARGIN+INDENT+ "1000.0" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "1500.0" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "2500.0" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "3000.0" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "4000.0" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+INDENT+ "fbnt" +LINE_BREAK+
- MARGIN+INDENT+INDENT+INDENT+ "1000.0" +LINE_BREAK+
- MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+INDENT+ "2000.02000.99" +LINE_BREAK+
- MARGIN+INDENT+INDENT+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+INDENT+ "" +LINE_BREAK+
- MARGIN+INDENT+ "" +LINE_BREAK+
- MARGIN+ "";
-
- String formatted2 =
- //MARGIN+ "" +LINE_BREAK+
- MARGIN+ "" +LINE_BREAK+
- MARGIN+INDENT+"fbnt" +LINE_BREAK+
- MARGIN+INDENT+"FlyByNightTechnology" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+INDENT+"1000.0" +LINE_BREAK+
- MARGIN+"" +LINE_BREAK;
-
- void define(final String model) throws IOException {
- // Populate the meta data for the test model
- final URL url = getClass().getResource(model);
- xsdHelper.define(url.openStream(), url.toString());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- //use XMLHelper
- public void testSaveXMLDocumentXMLHelper() throws IOException {
- final HashMap options = new HashMap();
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_INDENT, INDENT);
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_MARGIN, MARGIN);
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_LINE_BREAK, LINE_BREAK);
- hc = SDOUtil.createHelperContext(false,options);
- xsdHelper = hc.getXSDHelper();
- xmlh = hc.getXMLHelper();
-
- // Populate the meta data for the test (Stock Quote) model
- define("/simpleWithChangeSummary.xsd");
- final XMLDocument doc = xmlh.load(getClass().getResource("/simpleWithChangeSummary.xml").openStream());
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- xmlh.save(xmlh.createDocument(doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName()), baos, null);
- assertEquals(formatted1, baos.toString());
- }
-
- //use XMLStreamHelper
- public void testSaveXMLDocumentXMLStreamHelper() throws Exception {
- final HashMap options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_LOAD_SCHEMA, Boolean.FALSE);
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_INDENT, INDENT);
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_MARGIN, MARGIN);
- options.put(org.apache.tuscany.sdo.api.SDOHelper.XMLOptions.XML_SAVE_LINE_BREAK, LINE_BREAK);
- final HelperContext hc = SDOUtil.createHelperContext(false, options);
- xmlStreamHelper = SDOUtil.createXMLStreamHelper(hc);
-
- xsdHelper = hc.getXSDHelper();
- define("/simple.xsd");
-
- final InputStream inStrm = getClass().getResourceAsStream("/shallowquote.xml");
- final XMLDocument document = hc.getXMLHelper().load(inStrm, null, null);
-
- final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
-
- xmlStreamHelper.save(document, streamWriter, null);
- streamWriter.flush();
- assertEquals(formatted2, writer.toString());
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperPerformanceTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperPerformanceTestCase.java
deleted file mode 100644
index ef701059c4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperPerformanceTestCase.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 org.apache.tuscany.sdo.test;
-
-
-import java.io.*;
-import java.math.BigDecimal;
-import java.net.URL;
-
-import javax.xml.stream.*;
-
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.*;
-import commonj.sdo.helper.*;
-
-
-public class XMLStreamHelperPerformanceTestCase extends TestCase {
- private final String TEST_MODEL = "/XMLStreamHelper.xsd";
- private final String TEST_NAMESPACE = "http://www.example.com/simple";
-
- HelperContext hc;
-
- /**
- * Simple Dynamic SDO 2 test.
- */
- public void testDynamic() throws Exception {
- final TypeHelper typeHelper = hc.getTypeHelper();
- final Type quoteType = typeHelper.getType(TEST_NAMESPACE, "Quote");
- final DataObject quote = hc.getDataFactory().create(quoteType);
-
- quote.setString("symbol", "fbnt");
- quote.setString("companyName", "FlyByNightTechnology");
- quote.setBigDecimal("price", new BigDecimal("1000.0"));
- quote.setBigDecimal("open1", new BigDecimal("1000.0"));
- quote.setBigDecimal("high", new BigDecimal("1000.0"));
- quote.setBigDecimal("low", new BigDecimal("1000.0"));
- quote.setDouble("volume", 1000);
- quote.setDouble("change1", 1000);
-
- final DataObject child = quote.createDataObject("quotes");
- child.setBigDecimal("price", new BigDecimal("2000.0"));
-
- final DataObject quote3 = quote.createDataObject("quotes3");
- quote3.setString("symbol3", "IBM");
- quote3.setString("company3", "IBM Corp.");
-
- final XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(hc);
- final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
-
- final XMLDocument doc = hc.getXMLHelper().createDocument(quote, TEST_NAMESPACE, "stockQuote");
- streamHelper.save(doc, streamWriter);
- streamWriter.flush();
- assertEquals("fbntFlyByNightTechnology1000.01000.01000.01000.01000.01000.02000.0IBMIBM Corp.",writer.toString());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
-
- // Populate the meta data for the test (Stock Quote) model
- final URL url = getClass().getResource(TEST_MODEL);
- final InputStream inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperTestCase.java
deleted file mode 100644
index d63d63b5fb..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperTestCase.java
+++ /dev/null
@@ -1,195 +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.InputStreamReader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-public class XMLStreamHelperTestCase extends TestCase {
-
- private HelperContext hc;
-
- private XMLStreamHelper streamHelper;
-
- private XMLInputFactory inputFactory;
-
- private XMLOutputFactory outputFactory;
-
- private final QName module = new QName("http://foo", "module");
-
- private final QName name = new QName("http://bar", "implementation.mock");
-
- private final String testName = "foo-ext";
- // private String testName = "complex";
-
- private String xml;
-
- // = "1Dummy2";
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- streamHelper = SDOUtil.createXMLStreamHelper(hc);
-
- URL url = getClass().getClassLoader().getResource(testName + ".xsd");
- hc.getXSDHelper().define(url.openStream(), url.toExternalForm());
- url = getClass().getResource("/mixed.xsd");
- hc.getXSDHelper().define(url.openStream(), url.toString());
-
- inputFactory = XMLInputFactory.newInstance();
- outputFactory = XMLOutputFactory.newInstance();
-
- url = getClass().getClassLoader().getResource(testName + ".xml");
- final InputStreamReader reader = new InputStreamReader(url.openStream());
- final StringBuffer stringBuffer = new StringBuffer();
- final char buf[] = new char[1024];
- int size;
- while ((size = reader.read(buf)) != -1) {
- stringBuffer.append(buf, 0, size);
- }
- xml = stringBuffer.toString();
- reader.close();
- }
-
- public void testLoadObject() throws Exception {
- final XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(xml));
- int event = reader.getEventType();
- while (!((event == XMLStreamConstants.START_ELEMENT) && reader.getName().equals(name)) && reader.hasNext()) {
- event = reader.next();
- }
- final DataObject dataObject = streamHelper.loadObject(reader);
- Assert.assertNotNull(dataObject);
- Assert.assertTrue(dataObject.getString("myAttr").equals("helloworld.HelloWorldImpl"));
- }
-
- public void testLoadUnqualifiedObject() throws Exception {
- final XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(xml.replaceAll("bar:", "")));
- int event = reader.getEventType();
- while (!((event == XMLStreamConstants.START_ELEMENT) && reader.getName().getLocalPart().equals(name.getLocalPart())) && reader.hasNext()) {
- event = reader.next();
- }
- final Map options = new HashMap();
- options.put(XMLStreamHelper.OPTION_DEFAULT_ROOT_TYPE, hc.getTypeHelper().getType(name.getNamespaceURI(), "MockImplementation"));
- final DataObject dataObject = streamHelper.loadObject(reader, options);
- Assert.assertNotNull(dataObject);
- Assert.assertTrue(dataObject.getString("myAttr").equals("helloworld.HelloWorldImpl"));
- }
-
- public void testLoad() throws Exception {
- final XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(xml));
- final XMLDocument document = streamHelper.load(reader);
- Assert.assertNotNull(document);
- Assert.assertEquals(document.getRootElementURI(), module.getNamespaceURI());
- Assert.assertEquals(document.getRootElementName(), module.getLocalPart());
- final DataObject moduleObject = document.getRootObject();
- final List components = moduleObject.getList("component");
- final DataObject componentObject = (DataObject) components.get(0);
- final DataObject implObject = componentObject.getDataObject("implementation.mock");
- Assert.assertTrue(implObject.getString("myAttr").equals("helloworld.HelloWorldImpl"));
- }
-
- public void testSave() throws XMLStreamException {
- final XMLDocument document = hc.getXMLHelper().load(xml);
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
- streamHelper.save(document, streamWriter);
- streamWriter.flush();
- final String xmlStr = writer.toString();
- //System.out.println(xmlStr);
- Assert.assertTrue(xmlStr.indexOf("myAttr=\"helloworld.HelloWorldImpl\"")!=-1);
- }
-
- public void testSaveObject() throws XMLStreamException {
- final XMLDocument document = hc.getXMLHelper().load(xml);
- final DataObject moduleObject = document.getRootObject();
- final List components = moduleObject.getList("component");
- final DataObject componentObject = (DataObject) components.get(0);
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
- streamHelper.saveObject(componentObject, streamWriter);
- streamWriter.flush();
- Assert.assertTrue(writer.toString().indexOf("myAttr=\"helloworld.HelloWorldImpl\"")!=-1);
- }
-
- public void testSaveSequence() throws IOException, XMLStreamException {
- final DataObject quote = hc.getDataFactory().create("http://www.example.com/mixed", "MixedQuote");
- quote.setString("symbol", "fbnt");
- quote.getSequence().addText(0, "testing");
- quote.getSequence().addText("more testing");
-
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer);
- streamHelper.saveObject(quote, streamWriter);
- streamWriter.flush();
- //System.out.println(writer);
- assertTrue(writer.toString().indexOf("fbnt") != -1);
- }
-
- // Test case for TUSCANY-1788
- public void testXSIType() throws Exception {
- URL ipo = getClass().getResource("/ipo.xsd");
- hc.getXSDHelper().define(ipo.openStream(), ipo.toString());
- DataObject d = hc.getDataFactory().create("http://www.example.com/IPO", "PurchaseOrderType");
- DataObject billTo = hc.getDataFactory().create("http://www.example.com/IPO", "USAddress");
- billTo.setString("city", "San Jose");
- billTo.setString("state", "CA");
- d.setDataObject("billTo", billTo);
- XMLDocument ipoDoc = hc.getXMLHelper().createDocument(d, "http://www.example.com/IPO", "purchaseOrder");
- final StringWriter writer = new StringWriter();
- final XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(writer);
- streamHelper.save(ipoDoc, xmlWriter, null);
- xmlWriter.close();
- String xml = writer.toString();
- assertTrue(xml.indexOf("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"") != -1);
- assertTrue(xml.indexOf("xsi:type") != -1);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLUnknownPropertiesTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLUnknownPropertiesTestCase.java
deleted file mode 100644
index 8824ae7f13..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XMLUnknownPropertiesTestCase.java
+++ /dev/null
@@ -1,132 +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.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.SDOPackage;
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-
-public class XMLUnknownPropertiesTestCase extends TestCase {
- XMLHelper xmlHelper;
- Map options;
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- // SDOUtil->SDOHelper->SDOHelperImpl->HelperContextImpl->XMLHelperImpl
- public void testOptionUnknownProperties() throws IOException {
- options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_LOAD_UNKNOWN_PROPERTIES, Boolean.TRUE);
-
- final HelperContext hc = SDOUtil.createHelperContext(true);
- hc
- .getXSDHelper()
- .define("" + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + "");
-
- final String xml =
- "" + ""
- + "my test data0"
- + "my test data1"
- + "";
-
- try {
- final XMLDocument xmlDoc = hc.getXMLHelper().load(new StringReader(xml), null, options);// pass
- // during
- // invoke
-
- final DataObject root = xmlDoc.getRootObject();
- assertNotSame(root.getType(), SDOPackage.eINSTANCE.getAnyTypeDataObject());
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- hc.getXMLHelper().save(xmlDoc, baos, null);
- assertTrue(baos.toString().indexOf("my test data0") != -1);
- assertTrue(baos.toString().indexOf("my test data1") != -1);
- } catch (final Exception e) {// (Resource.IOWrappedException featureNotFound)
- e.printStackTrace();
- }
- }
-
- public void testOptionUnknownProperties2() throws IOException {
- options = new HashMap();
- options.put(SDOHelper.XMLOptions.XML_LOAD_UNKNOWN_PROPERTIES, Boolean.FALSE);
-
- final HelperContext hc = SDOUtil.createHelperContext(true);
- hc
- .getXSDHelper()
- .define("" + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + ""
- + "");
-
- final String xml =
- "" + ""
- + "my test data"
- + "my test data"
- + "";
-
- try {
- final XMLDocument xmlDoc = hc.getXMLHelper().load(new StringReader(xml), null, options);// pass
- // on
- // invokation
- final DataObject root = xmlDoc.getRootObject();
- assertNotSame(root.getType(), SDOPackage.eINSTANCE.getAnyTypeDataObject());
- fail();
- } catch (final Exception e) {// (Resource.IOWrappedException featureNotFound)
- // e.printStackTrace();
- if (e.getMessage().indexOf("telem") != -1) {
- Assert.assertTrue(true);
- }
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java
deleted file mode 100644
index 45f92a73b2..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java
+++ /dev/null
@@ -1,125 +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.util.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-public class XPathTestCase extends TestCase {
-
- HelperContext hc;
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- }
-
- private final String TEST_MODEL = "/xpath.xsd";
- private final String XPATH_XML = "/xpath.xml";
-
- /**
- * The presence or absence of the @ sign in a path has no meaning.
- * Properties are always matched by name independent of their XML representation.
- * @throws IOException
- */
- public void testAtSignProperty() throws IOException {
- XSDHelper xsdHelper = hc.getXSDHelper();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- xsdHelper.define(inputStream, url.toString());
-
- inputStream.close();
-
- XMLDocument doc = xmlHelper.load(getClass().getResourceAsStream(XPATH_XML));
-
- DataObject drive = doc.getRootObject();
- DataObject folder1 = (DataObject) drive.get("Folder.1");
- String value = folder1.getString("@creation_date");
-
- assertEquals(value, "2000-03-23");
- }
-
- public void testListIndexing() throws Exception {
- XSDHelper xsdHelper = hc.getXSDHelper();
- XMLHelper xmlHelper = hc.getXMLHelper();
-
- URL url = getClass().getResource(TEST_MODEL);
- InputStream inputStream = url.openStream();
- xsdHelper.define(inputStream, url.toString());
-
- inputStream.close();
-
- XMLDocument doc = xmlHelper.load(getClass().getResourceAsStream(XPATH_XML));
-
- DataObject root = doc.getRootObject();
- DataObject folder1 = root.getDataObject("Folder[1]");
- assertNotNull(folder1);
- DataObject folder1a = root.getDataObject("Folder.0");
- assertEquals(folder1, folder1a);
- folder1a = root.getDataObject("Folder[FolderName=Folder00000000000]");
- assertEquals(folder1, folder1a);
-
- DataObject noFolder = null;
-
- try {
- noFolder = root.getDataObject("Folder[3]");
- assertNull(noFolder);
- } catch (Exception e) {
- assertFalse("bad indexing generated exception" + e, true);
- }
-
- try {
- noFolder = root.getDataObject("Folder[0]");
- assertNull(noFolder);
- } catch (Exception e) {
- assertFalse("bad indexing generated exception" + e, true);
- }
-
- try {
- noFolder = root.getDataObject("Folder.2");
- assertNull(noFolder);
- } catch (Exception e) {
- assertFalse("bad indexing generated exception" + e, true);
- }
-
- try {
- noFolder = root.getDataObject("Folder.-1");
- assertNull(noFolder);
- } catch (Exception e) {
- assertFalse("bad indexing generated exception" + e, true);
- }
-
- noFolder = root.getDataObject("Folder[FolderName=foo]");
- assertNull(noFolder);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
deleted file mode 100644
index b8d3402172..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
+++ /dev/null
@@ -1,224 +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.net.URL;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import com.example.simple.SimpleFactory;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * @version $Rev$ $Date$
- */
-public class XSDHelperTestCase extends TestCase {
- private static final String TEST_MODEL = "/simple.xsd";
- private static final String TEST_MODEL2 = "/xsdCorners.xsd";
- private URL modelURL;
- private URL xsdCornersURL;
-
- HelperContext hc;
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = SDOUtil.createHelperContext();
- modelURL = getClass().getResource(TEST_MODEL);
- xsdCornersURL = getClass().getResource(TEST_MODEL2);
- }
-
- public void testDefineWithLocation() throws IOException {
- XSDHelper xsdHelper = hc.getXSDHelper();
- List types = xsdHelper.define(modelURL.openStream(), modelURL.toString());
- assertEquals(2, types.size());
- }
-
- public void testDefineWithNoLocation() {
- XSDHelper xsdHelper = hc.getXSDHelper();
- List types = xsdHelper.define(getClass().getResourceAsStream(TEST_MODEL), null);
- assertEquals(2, types.size());
- }
-
- public void testDuplicateDefineWithLocation() throws IOException {
- XSDHelper xsdHelper = hc.getXSDHelper();
- List types = xsdHelper.define(modelURL.openStream(), modelURL.toString());
- assertEquals(2, types.size());
-
- List types2 = xsdHelper.define(modelURL.openStream(), modelURL.toString());
- assertEquals(0, types2.size());
- }
-
- public void testXSDGeneration_staticSDOType() throws IOException
- {
- //test for static sdo type. The test succeeds if the IllegalArgumentException is thrown
- //by XSDHelper.generate method in which case the string xsd must be null;
-
- SimpleFactory.INSTANCE.register(hc);
- XSDHelper xsdHelper = hc.getXSDHelper();
- DataObject quoteSDO = (DataObject)SimpleFactory.INSTANCE.createQuote();
- List typeList = new Vector();
- typeList.add(quoteSDO.getType());
- String xsd = null;
-
- try
- {
- xsd = xsdHelper.generate(typeList);
- xsd = "";
- }
- catch ( IllegalArgumentException e )
- {
- }
- assertNull(xsd);
- }
-
- public void testXSDGeneration_DynamicSDOType() throws IOException
- {
- //test for dynamic SDOs that have no XSD model. Here the testcase succeeds only if the
- //xsd is generated by XSDHelper in which case xsd must not be null
- XSDHelper xsdHelper = hc.getXSDHelper();
- DataObject quoteType = DataFactory.INSTANCE.create("commonj.sdo", "Type");
- quoteType.set("uri", "http://www.example.com/dynamic");
- quoteType.set("name", "DynamicQuote");
-
- DataObject aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "symbol");
- aProperty.set("type", TypeHelper.INSTANCE.getType("commonj.sdo", "String"));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "price");
- aProperty.set("type", TypeHelper.INSTANCE.getType("commonj.sdo", "Decimal"));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "volume");
- aProperty.set("type", TypeHelper.INSTANCE.getType("commonj.sdo", "Double"));
-
- TypeHelper.INSTANCE.define(quoteType);
-
- Type dynamicQuoteType =
- TypeHelper.INSTANCE.getType("http://www.example.com/dynamic", "DynamicQuote");
-
- Vector types = new Vector();
- types.add(dynamicQuoteType);
- String xsd = null;
-
- try
- {
- xsd = xsdHelper.generate(types);
- //System.out.println(xsd);
- }
- catch ( IllegalArgumentException e )
- {
- }
- assertNotNull(xsd);
-
- }
-
- public void testXSDGeneration_DynamicWithNestedStaticSDOType() throws IOException
- {
- //testing static SDO with XSD Model being contained in a Dynamic SDO not having an XSD Model.
- //the schema must be generated with imports / includes for the XSD corresponding to the static
- //sdo types.
- TypeHelper typeHelper = hc.getTypeHelper();
- XSDHelper xsdHelper = hc.getXSDHelper();
-
- SimpleFactory.INSTANCE.register(hc);
- DataObject quoteSDO = (DataObject)SimpleFactory.INSTANCE.createQuote();
-
-
- DataObject quoteType = DataFactory.INSTANCE.create("commonj.sdo", "Type");
- quoteType.set("uri", "http://www.example.com/dynamic");
- quoteType.set("name", "DynamicQuote");
-
- DataObject aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "symbol");
- aProperty.set("type", typeHelper.getType("commonj.sdo", "String"));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "price");
- aProperty.set("type", typeHelper.getType("commonj.sdo", "Decimal"));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "volume");
- aProperty.set("type", typeHelper.getType("commonj.sdo", "Double"));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "containedQuotes");
- aProperty.set("type", typeHelper.getType(quoteSDO.getType().getURI(), quoteSDO.getType().getName()));
- aProperty.set("containment", new Boolean(true));
-
- aProperty = quoteType.createDataObject("property");
- aProperty.set("name", "referredQuotes");
- aProperty.set("type", typeHelper.getType(quoteSDO.getType().getURI(), quoteSDO.getType().getName()));
-
- typeHelper.define(quoteType);
-
- Type dynamicQuoteType =
- typeHelper.getType("http://www.example.com/dynamic", "DynamicQuote");
- Vector types = new Vector();
- types.add(dynamicQuoteType);
- String xsd = null;
-
- try
- {
- Hashtable schemaLocationMap = new Hashtable();
- schemaLocationMap.put("http://www.example.com/simple", "http://www.example.com/simple/xsd");
- xsd = xsdHelper.generate(types, schemaLocationMap);
- //System.out.println(xsd);
- }
- catch ( IllegalArgumentException e )
- {
- }
- assertNotNull(xsd);
-
- }
-
- public void testPrefixFromNSWithHyphenNumber() throws IOException {
- XSDHelper xsdHelper = hc.getXSDHelper();
- xsdHelper.define(xsdCornersURL.openStream(), xsdCornersURL.toString());
- DataFactory df = hc.getDataFactory();
- DataObject root = df.create("http://www.example.com/simple-1", "A");
- root.setString("a1", "a1s");
- root.setString("a2", "a2s");
-
- String doc = hc.getXMLHelper().save(root, "http://www.example.com/simple-1", "a");
- assertTrue(doc.indexOf("xmlns:s1=\"http://www.example.com/simple-1\"") != -1);
- }
-
- public void testShortPrefix() throws IOException {
- XSDHelper xsdHelper = hc.getXSDHelper();
- URL url = getClass().getResource("/prefix.xsd");
- xsdHelper.define(url.openStream(), url.toString());
- DataObject cmd = hc.getDataFactory().create("http://soaassureservice.soabench.ibm.com", "CreateClaim");
- cmd.setString("requestInfo", "cost");
- String doc = hc.getXMLHelper().save(cmd, "http://soaassureservice.soabench.ibm.com", "createClaim");
- assertTrue(doc.indexOf("xmlns:as=\"http://soaassureservice.soabench.ibm.com\"") != -1);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDQNameTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDQNameTestCase.java
deleted file mode 100644
index f369b340ed..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/XSDQNameTestCase.java
+++ /dev/null
@@ -1,123 +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.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import junit.framework.TestCase;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-public class XSDQNameTestCase extends TestCase {
- private final String xsdString =
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- " " +
- "";
-
- private final String xmlString =
- " " +
- " " +
- "fbnt " +
- "simple:stockQuote " +
- "";
-
- private final String TEST_NAMESPACE = "http://www.example.com/simple";
-
- HelperContext hc;
- TypeHelper th;
-
- /**
- * Based on Spec 2.1, section 9.4.1, the return value of DataObject.get() on XSD QName property
- * should be http://www.example.com/simple#stockQuote
- * TODO add this to the CTS
- *
- * @throws IOException
- */
- public void testLoad() throws IOException {
- XMLDocument doc = hc.getXMLHelper().load(xmlString);
- DataObject root = doc.getRootObject();
- assertEquals("http://www.example.com/simple#stockQuote", root.get("policy"));
- }
-
- /**
- * After serialization, the value of XSD QName property in XML should be :stockQuote
- */
- public void testSave() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "Quote");
- DataObject quote = hc.getDataFactory().create(quoteType);
-
- quote.setString("symbol", "fbnt");
- quote.set("policy", "http://www.example.com/simple#stockQuote");
-
- String str = hc.getXMLHelper().save(quote, TEST_NAMESPACE, "stockQuote");
- int start = str.indexOf("");
- int end = str.indexOf("");
- assertTrue(start != -1 && end != -1);
-
- String policyValue = str.substring(start + "".length(), end);
-
- Pattern pattern = Pattern.compile(".*:stockQuote"); // prefix can be anything
-
- Matcher matcher = pattern.matcher(policyValue);
- assertTrue(matcher.find());
- }
-
- /**
- * Test the scenario that the xsd:QName property value contains non-existent namespace
- */
- public void testSave2() throws IOException {
- Type quoteType = th.getType(TEST_NAMESPACE, "Quote");
- DataObject quote = hc.getDataFactory().create(quoteType);
-
- quote.setString("symbol", "fbnt");
- quote.set("policy", "http://www.example.com/simple2#stockQuote");
-
- String str = hc.getXMLHelper().save(quote, TEST_NAMESPACE, "stockQuote");
-
- // Make sure the non-existent namespace was serialized
- Pattern pattern = Pattern.compile(".*xmlns:.*=\"http://www.example.com/simple2\"");
- Matcher matcher = pattern.matcher(str);
- assertTrue(matcher.find());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- th = hc.getTypeHelper();
-
- hc.getXSDHelper().define(xsdString);
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/ClassLoaderTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/ClassLoaderTestCase.java
deleted file mode 100644
index 8fbd74ac0d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/ClassLoaderTestCase.java
+++ /dev/null
@@ -1,192 +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.osgi;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.HashSet;
-
-import org.apache.tuscany.sdo.test.AllTests;
-import commonj.sdo.impl.HelperProvider;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-/*
- * This test runs the SDO implementation test suite in a multi-classloader environment
- */
-public class ClassLoaderTestCase extends TestCase {
-
- private ClassLoader contextClassLoader;
-
- protected void setUp() throws Exception {
-
- contextClassLoader = Thread.currentThread().getContextClassLoader();
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- Thread.currentThread().setContextClassLoader(contextClassLoader);
- }
-
- // Load the test class using a separate test classloader which
- // loads SDO API, LIB and IMPL using different classloaders
- // Run the SDO test suite under this multi-classloader environment
- // Third party libraries and test classes/resources are available
- // on the thread context classloader when this test is run
- public void test() throws Exception {
- ClassLoader testClassLoader = createTestClassLoader();
-
- Class testClass = testClassLoader.loadClass(this.getClass().getName());
- Method testMethod = testClass.getMethod("runSDOTest", null);
- Object testObj = testClass.newInstance();
- testMethod.invoke(testObj, null);
-
-
- }
-
-
- public void runSDOTest() throws Exception {
-
- HelperProvider.setDefaultInstance(this.getClass().getClassLoader());
-
- TestSuite allTests = AllTests.suite();
- TestResult testResult = new TestResult();
- allTests.run(testResult);
- Assert.assertEquals(0, testResult.errorCount());
- }
-
-
- // Get all the URLs for a classloader, remove these from dependentJars
- private URL[] getClassLoaderURLs(
- URL[] classPathEntries,
- HashSet dependentJars,
- String[] jarList)
- throws IOException {
-
- String pathSeparator = "/";
- HashSet classPathEntrySet;
-
- classPathEntrySet = new HashSet();
-
- for (int i = 0; i < classPathEntries.length; i++) {
-
- URL classPathEntry = classPathEntries[i];
- String classPathEntryStr = classPathEntry.getPath();
- if (jarList != null) {
- for (int k = 0; k < jarList.length; k++) {
- String jarName = "tuscany-" + jarList[k];
- String alternateJarName = "tuscany-sdo-" + jarList[k];
- String folderName = pathSeparator + jarList[k] + pathSeparator;
- if (classPathEntryStr.indexOf(jarName) >= 0 ||
- classPathEntryStr.indexOf(alternateJarName) >=0 ||
- classPathEntryStr.indexOf(folderName) >=0) {
-
- classPathEntrySet.add(classPathEntry);
- dependentJars.remove(classPathEntry);
- }
- }
- }
- }
- return (URL [])classPathEntrySet.toArray(new URL[classPathEntrySet.size()]);
- }
-
-
- // Create the test classloader. It uses separate classloaders to load SDO API, SDO LIB,
- // SDO IMPL and 3rd part libraries
- private ClassLoader createTestClassLoader() throws Exception {
-
- String[] sdoApiJars = {"sdo-api"};
- String[] sdoLibJars = {"lib"};
- String[] sdoImplJars = {"impl"};
-
- URL[] sdoApiUrls;
- URL[] sdoLibUrls;
- URL[] sdoImplUrls;
- URL[] dependencyUrls;
-
- if (!(this.getClass().getClassLoader() instanceof URLClassLoader))
- return this.getClass().getClassLoader();
-
- HashSet dependentJars = new HashSet();
- URL[] classPathEntries = ((URLClassLoader)this.getClass().getClassLoader()).getURLs();
- for (int i = 0; i < classPathEntries.length; i++) {
- dependentJars.add(classPathEntries[i]);
- }
- sdoApiUrls = getClassLoaderURLs(classPathEntries, dependentJars, sdoApiJars);
- sdoLibUrls = getClassLoaderURLs(classPathEntries, dependentJars, sdoLibJars);
- sdoImplUrls = getClassLoaderURLs(classPathEntries, dependentJars, sdoImplJars);
- dependencyUrls = (URL [])dependentJars.toArray(new URL[dependentJars.size()]);
-
- ClassLoader dependencyLoader = new URLClassLoader(dependencyUrls, null);
- ClassLoader sdoApiLoader = new URLClassLoader(sdoApiUrls, dependencyLoader);
- ClassLoader sdoLibClassLoader = new URLClassLoader(sdoLibUrls, sdoApiLoader);
- ClassLoader sdoImplClassLoader = new URLClassLoader(sdoImplUrls, sdoLibClassLoader);
-
-
- TestClassLoader testClassLoader = new TestClassLoader(
- new ClassLoader[] {sdoApiLoader, sdoLibClassLoader, sdoImplClassLoader, dependencyLoader}
- );
-
-
- // Test classes and 3rd party libraries should be on the context classloader
- URL testUrl = new File("./target/test-classes").toURL();
- ClassLoader contextClassLoader = new URLClassLoader(new URL[]{testUrl}, dependencyLoader);
- Thread.currentThread().setContextClassLoader(contextClassLoader);
-
- return testClassLoader;
- }
-
-
-
- private class TestClassLoader extends ClassLoader {
-
- ClassLoader[] parentLoaders;
-
- private TestClassLoader(ClassLoader[] parentLoaders) {
- this.parentLoaders = parentLoaders;
- }
-
- public Class loadClass(String className) throws ClassNotFoundException {
-
- Class clazz = findLoadedClass(className);
- if (clazz != null)
- return clazz;
-
- for (int i = 0; i < parentLoaders.length; i++) {
- try {
- return parentLoaders[i].loadClass(className);
- } catch (Exception e) {
- // speculative load using parent class loader failed, but that's OK
- }
- }
- return super.loadClass(className);
- }
-
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/OSGiTestCase.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/OSGiTestCase.java
deleted file mode 100644
index 5a67fc41c5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/OSGiTestCase.java
+++ /dev/null
@@ -1,354 +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.osgi;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FilenameFilter;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-
-import org.apache.felix.framework.Felix;
-import org.apache.felix.main.Main;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-import junit.framework.TestCase;
-
-/*
- * This test runs the SDO implementation test suite under a Felix OSGi runtime
- */
-public class OSGiTestCase extends TestCase {
-
- private Felix felix;
- private BundleContext bundleContext;
- private ClassLoader contextClassLoader;
-
- protected void setUp() throws Exception {
-
- contextClassLoader = Thread.currentThread().getContextClassLoader();
-
- super.setUp();
-
- // Start a Felix OSGi runtime
- File profileDir = new File(".felix");
- if (profileDir.isDirectory())
- deleteDirectory(profileDir);
- else
- profileDir.delete();
- profileDir.mkdir();
-
- Properties props = Main.loadConfigProperties();
- props.put("felix.cache.profiledir", profileDir.getAbsolutePath());
- props.put("felix.embedded.execution", "true");
- props.put("org.osgi.framework.system.packages",
- "org.osgi.framework; version=1.3.0,"
- + "org.osgi.service.packageadmin; version=1.2.0, "
- + "org.osgi.service.startlevel; version=1.0.0, "
- + "org.osgi.service.url; version=1.0.0, " + "javax.xml, "
- + "javax.xml.parsers, " + "javax.xml.namespace, "
- + "org.xml.sax, " + "org.xml.sax.helpers, " + "org.xml.sax.ext, "
- + "org.w3c.dom, " + "org.w3c.dom.events, " + "javax.xml.stream, "
- + "javax.xml.transform, " + "javax.xml.transform.dom, "
- + "javax.xml.transform.stream, " + "org.objectweb.asm, "
- + "junit.framework");
-
- List activators = new ArrayList();
- Felix felix = new Felix(props, activators);
- felix.start();
- bundleContext = felix.getBundleContext();
- }
-
- protected void tearDown() throws Exception {
-
- super.tearDown();
- Thread.currentThread().setContextClassLoader(contextClassLoader);
-
- if (felix != null) {
- felix.stop();
- felix = null;
- }
- }
-
- // Install SDO spec, SDO lib, SDO impl, and its EMF dependencies
- // Create a test bundle containing all the SDO tests, and run the entire
- // test suite inside an OSGi container
- public void test() throws Exception {
-
- ArrayList bundles = new ArrayList();
- FilenameFilter jarFileFilter = new JarFileFilter();
-
- File apiDir = new File("../sdo-api/target");
- File[] apiJars = apiDir.listFiles(jarFileFilter);
- for (int i = 0; i < apiJars.length; i++) {
- Bundle bundle = bundleContext
- .installBundle(apiJars[i].toURL().toString());
- bundles.add(bundle);
- }
-
- File libDir = new File("../lib/target");
- File[] libJars = libDir.listFiles(jarFileFilter);
- for (int i = 0; i < libJars.length; i++) {
- Bundle bundle = bundleContext
- .installBundle(libJars[i].toURL().toString());
- bundles.add(bundle);
- }
-
- if (!(contextClassLoader instanceof URLClassLoader))
- return;
-
- URL[] classPathURLs = ((URLClassLoader) contextClassLoader).getURLs();
- for (int i = 0; i < classPathURLs.length; i++) {
- String url = classPathURLs[i].toString();
- if (url.indexOf("eclipse") > 0 && url.endsWith(".jar")) {
- Bundle bundle = installEclipseBundle(classPathURLs[i]);
- if (bundle != null)
- bundles.add(bundle);
- }
- }
-
- // When this test is run during the build, sdo.impl.jar would not yet have
- // been created
- // Create this bundle - use the manifest file provided in the test
- // directory, which works
- // with Felix.
- Bundle implBundle = installBundle("file:sdo.impl",
- "../impl/target/test-classes/osgi/sdo.impl.mf",
- new String[] { "../impl/target/classes" });
- bundles.add(implBundle);
-
- // Start all the installed bundles
- for (int i = 0; i < bundles.size(); i++) {
- Bundle bundle = (Bundle) bundles.get(i);
- try {
- bundle.start();
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println("Could not start bundle " + bundle);
- // don't stop on first failure, so we document all failures
- // any failure will be re-triggered by the testBundle.start() call below
- }
- }
-
- // Install the test bundle - it contains all the test classes. The bundle
- // activator for
- // this class runs the entire test suite
- Bundle testBundle = installBundle("file:sdo.osgi.test",
- "../impl/target/test-classes/osgi/sdo.osgi.test.mf",
- new String[] { "../impl/target/test-classes" });
-
- TestClassLoader testClassLoader = new TestClassLoader(testBundle,
- contextClassLoader);
- Thread.currentThread().setContextClassLoader(testClassLoader);
-
- // The test suite is run inside an OSGi container by this call.
- testBundle.start();
- }
-
- // Delete any old Felix configuration files left over from previous runs
- private static void deleteDirectory(File dir) {
-
- File[] files = dir.listFiles();
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory())
- deleteDirectory(files[i]);
- else
- files[i].delete();
- }
- dir.delete();
-
- }
-
- // Create and install a bundle with the specified manifest file
- // The bundle contains all files from the list of directories specified
- public Bundle installBundle(String bundleLocation, String manifestFileName,
- String[] dirNames) throws Exception {
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- File manifestFile = new File(manifestFileName);
- Manifest manifest = new Manifest();
- manifest.read(new FileInputStream(manifestFile));
-
- JarOutputStream jarOut = new JarOutputStream(out, manifest);
-
- for (int i = 0; i < dirNames.length; i++) {
- File dir = new File(dirNames[i]);
- addFilesToJar(dir, dirNames[i], jarOut);
- }
-
- jarOut.close();
- out.close();
-
- ByteArrayInputStream inStream = new ByteArrayInputStream(out.toByteArray());
- return bundleContext.installBundle(bundleLocation, inStream);
-
- }
-
- // Add all the files from a build directory into a jar file
- // This method is used to create bundles on the fly
- private void addFilesToJar(File dir, String rootDirName,
- JarOutputStream jarOut) throws Exception {
-
- if (dir.getName().equals(".svn"))
- return;
-
- File[] files = dir.listFiles();
-
- for (int i = 0; i < files.length; i++) {
-
- if (files[i].isDirectory()) {
- addFilesToJar(files[i], rootDirName, jarOut);
- continue;
- }
- if (files[i].getName().endsWith("MANIFEST.MF"))
- continue;
-
- String entryName = files[i].getPath().substring(rootDirName.length() + 1);
- entryName = entryName.replaceAll("\\\\", "/");
- ZipEntry ze = new ZipEntry(entryName);
-
- jarOut.putNextEntry(ze);
- FileInputStream file = new FileInputStream(files[i]);
- byte[] fileContents = new byte[file.available()];
- file.read(fileContents);
- jarOut.write(fileContents);
- }
- }
-
- // Install a bundle corresponding to an jar file from Eclipse (eg. EMF jars)
- // These bundle manifest entries use Require-Bundle of
- // eclipse core runtime. The Plugin class from the Eclipse runtime
- // is loaded by the bundle activator of some of these bundles.
- // Since this test is run under Felix, remove the dependency on
- // Eclipse runtime by removing the Require-Bundle and
- // Bundle-Activator entries from the manifest
- private Bundle installEclipseBundle(URL jarURL) throws Exception {
-
- JarInputStream jarInput = new JarInputStream(jarURL.openStream());
-
- Manifest manifest = jarInput.getManifest();
- if (manifest == null) {
- manifest = new Manifest();
- ZipEntry entry;
- while ((entry = jarInput.getNextEntry()) != null) {
- if (entry.getName().equals("META-INF/MANIFEST.MF")) {
- byte bytes[] = new byte[(int) entry.getSize()];
- jarInput.read(bytes);
- manifest.read(new ByteArrayInputStream(bytes));
- }
- }
- jarInput.close();
- jarInput = new JarInputStream(jarURL.openStream());
- }
- if (manifest == null
- || manifest.getMainAttributes() == null
- || !manifest.getMainAttributes().containsKey(
- new Attributes.Name("Bundle-SymbolicName"))) {
-
- return null;
- }
- manifest.getMainAttributes().remove(new Attributes.Name("Require-Bundle"));
- manifest.getMainAttributes()
- .remove(new Attributes.Name("Bundle-Activator"));
- manifest.getMainAttributes().put(
- new Attributes.Name("DynamicImport-Package"), "*");
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- JarOutputStream jarOut = new JarOutputStream(out, manifest);
- ZipEntry entry;
- byte bytes[] = new byte[1024];
- while ((entry = jarInput.getNextEntry()) != null) {
- if (!entry.getName().equals("META-INF/MANIFEST.MF")) {
- jarOut.putNextEntry((JarEntry) entry);
- int len;
- while ((len = jarInput.read(bytes)) != -1) {
- jarOut.write(bytes, 0, len);
- }
- jarOut.closeEntry();
- }
- jarInput.closeEntry();
- }
- jarOut.close();
- out.close();
- jarInput.close();
-
- ByteArrayInputStream byteStream = new ByteArrayInputStream(out
- .toByteArray());
-
- return bundleContext.installBundle(jarURL.toString(), byteStream);
-
- }
-
- // Filter used to list jar files from a directory
- private class JarFileFilter implements FilenameFilter {
-
- public boolean accept(File dir, String name) {
- if (name.endsWith(".jar") && !name.endsWith("javadoc.jar"))
- return true;
- else
- return false;
- }
-
- }
-
- // Test classloader - used as context classloader
- private static class TestClassLoader extends ClassLoader {
-
- Bundle testBundle;
-
- private TestClassLoader(Bundle testBundle, ClassLoader parentClassLoader) {
- super(parentClassLoader);
- this.testBundle = testBundle;
- }
-
- public Class loadClass(String className) throws ClassNotFoundException {
- Class clazz = findLoadedClass(className);
- if (clazz != null)
- return clazz;
-
- try {
- return testBundle.loadClass(className);
- } catch (Exception e) {
- }
- return super.loadClass(className);
- }
-
- public URL getResource(String resName) {
- URL resource = testBundle.getResource(resName);
- if (resource == null)
- resource = super.getResource(resName);
- return resource;
- }
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/TestBundleActivator.java b/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/TestBundleActivator.java
deleted file mode 100644
index 4458a13959..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/java/org/apache/tuscany/sdo/test/osgi/TestBundleActivator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.apache.tuscany.sdo.test.osgi;
-/**
- *
- * 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.
- */
-import java.util.Enumeration;
-
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestFailure;
-import junit.framework.TestResult;
-
-import org.apache.tuscany.sdo.AllTests;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-
-/*
- * Bundle activator for running the SDO test suite under OSGi
- * The SDO test suite is run inside an OSGi container when the bundle is started.
- */
-public class TestBundleActivator implements BundleActivator {
-
- public void start(BundleContext bundleContext) throws Exception {
- runSDOTests();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
-
- }
-
-
- public void runSDOTests() throws Exception {
-
- Test allTests = AllTests.suite();
- TestResult testResult = new TestResult();
- allTests.run(testResult);
- System.out.println("Runs " + testResult.runCount() + ", Errors: "
- + testResult.errorCount());
-
- Enumeration e = testResult.errors();
- while (e.hasMoreElements()) {
- TestFailure f = (TestFailure) e.nextElement();
- System.out.println(f);
- System.out.println(f.exceptionMessage());
- }
-
- Assert.assertEquals(0, testResult.errorCount());
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SchemaLocationTestCase.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/SchemaLocationTestCase.xml
deleted file mode 100644
index e13f45a877..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SchemaLocationTestCase.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- some string
-
- another string
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SequenceChangeSummary.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/SequenceChangeSummary.xsd
deleted file mode 100644
index dd3c2bc2dc..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SequenceChangeSummary.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SubstitutionValues.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/SubstitutionValues.xsd
deleted file mode 100644
index e977e6e631..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/SubstitutionValues.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/TypePropertyMetadataInfo.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/TypePropertyMetadataInfo.xsd
deleted file mode 100644
index 7a78772733..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/TypePropertyMetadataInfo.xsd
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- forest.jpg
-
-
-
-
-
-
-
-
-
- getNumber
- setNumber
-
-
-
-
-
-
-
-
-
- getPhonetype
- setPhonetype
-
-
-
-
-
-
-
-
-
-
- This is the metadata for defining the ExampleNumber type.
-
-
-
-
-
-
-
-
-
-
-
- This is the metadata for defining the PhoneNumber type.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd
deleted file mode 100644
index c2beb7708d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentSchemaLocation.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentSchemaLocation.xsd
deleted file mode 100644
index 0561eb555b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentSchemaLocation.xsd
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentTestCase.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentTestCase.xml
deleted file mode 100644
index de22090908..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLDocumentTestCase.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- some string
-
- another string
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLStreamHelper.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLStreamHelper.xsd
deleted file mode 100644
index 492f61b1d2..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/XMLStreamHelper.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/anytype.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/anytype.xsd
deleted file mode 100644
index db10376360..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/anytype.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/api_test.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/api_test.xsd
deleted file mode 100644
index 5238c72605..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/api_test.xsd
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/bank.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/bank.xsd
deleted file mode 100644
index a0cb7970b0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/bank.xsd
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/bounds.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/bounds.xsd
deleted file mode 100644
index 4d92d6e1fe..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/bounds.xsd
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/company.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/company.xsd
deleted file mode 100644
index 18e99352be..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/company.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/containmenttest.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/containmenttest.xsd
deleted file mode 100644
index e576bc9b41..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/containmenttest.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer1.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer1.xml
deleted file mode 100644
index 5a29e30a3c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer1.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer2.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer2.xml
deleted file mode 100644
index e9ebb92677..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/customer2.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/datatype.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/datatype.xsd
deleted file mode 100644
index 05f55e0502..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/datatype.xsd
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/dotNames.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/dotNames.xsd
deleted file mode 100644
index a788b7b4f4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/dotNames.xsd
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/dupelement.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/dupelement.xsd
deleted file mode 100644
index da2f6920d4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/dupelement.xsd
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/expectedExceptions.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/expectedExceptions.xsd
deleted file mode 100644
index cd12447cd9..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/expectedExceptions.xsd
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xml
deleted file mode 100644
index f8c9bc4702..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- 1Dummy2
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xsd
deleted file mode 100644
index 4cdfd1bcd6..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo-ext.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo.xsd
deleted file mode 100644
index f50002ec3d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/foo.xsd
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/ipo.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/ipo.xsd
deleted file mode 100644
index 241ec15d36..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/ipo.xsd
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
-
- International Purchase order schema for Example.com
- Copyright 2000 Example.com. All rights reserved.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xml
deleted file mode 100644
index 42ff3a3a5b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- some text
- 2000.0
- more text
- 1000.0
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xsd
deleted file mode 100644
index deee92e9c1..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed2.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed2.xml
deleted file mode 100644
index d95d179478..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixed2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- some text
- 2000.0
- more text
- 1000.0
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummary.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummary.xml
deleted file mode 100644
index 49dbb89f38..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummary.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
-
- 2000.02000.99
-
-
-FBNTFlyByNightTechnology999.01500.02500.01000.03000.04000.0
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummaryUndone.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummaryUndone.xml
deleted file mode 100644
index d8097ace8b..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedChangeSummaryUndone.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-fbntFlyByNightTechnology1000.01500.02000.02000.992500.0
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedopen.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedopen.xml
deleted file mode 100644
index 21a62ef2d0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/mixedopen.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- some text
- 2000.0
- more text
- 1000.0
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/names.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/names.xsd
deleted file mode 100644
index 9096b2d62f..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/names.xsd
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xml
deleted file mode 100644
index d4a5b92e0c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- s1
-
- FlyByNightTechnology
-
- 1000.0
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xsd
deleted file mode 100644
index 803c0a9cee..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open.xsd
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open1any.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/open1any.xsd
deleted file mode 100644
index 00efaef5e0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open1any.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open2.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/open2.xml
deleted file mode 100644
index ab992ccf74..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/open2.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- s1
-
- 1000.0
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummary.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummary.xml
deleted file mode 100644
index 4ef2dc5948..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummary.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- FBNT
-
- 1500.0
-
-
- 2500.0
-
-
- 3000.0
-
-
- 4000.0
-
-
-
- fbnt
-
- 2000.02000.99
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummaryUndone.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummaryUndone.xml
deleted file mode 100644
index 9883a3824a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openChangeSummaryUndone.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- fbnt
-
- 1500.0
-
-
- 2000.0
-
- 2000.99
-
-
-
- 2500.0
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openContentProperty.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/openContentProperty.xml
deleted file mode 100644
index 68f4c116eb..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/openContentProperty.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- s1
-
- FlyByNightTechnology
-
- 1000.0
- 1100.0
-
- mutual-1
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.impl.mf b/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.impl.mf
deleted file mode 100644
index dfc58b624a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.impl.mf
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Extension-Name: tuscany-sdo-impl
-Specification-Title: Tuscany SDO Implementation
-Specification-Vendor: Apache Software Foundation
-Implementation-Vendor: Apache Software Foundation
-Implementation-Vendor-Id: org.apache
-Implementation-Title: tuscany-sdo-impl
-Implementation-Version: incubating-M3
-Bundle-ManifestVersion: 2
-Bundle-Name: Tuscany SDO Implementation
-Bundle-SymbolicName: org.apache.tuscany.sdo.impl
-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.lib;visibility:=reexport,
- org.apache.tuscany.sdo.spec;visibility:=reexport
-Import-Package: org.osgi.framework,
- org.xml.sax,
- org.xml.sax.helpers,
- org.xml.sax.ext,
- org.w3c.dom,
- org.w3c.dom.events,
- javax.xml,
- javax.xml.parsers,
- javax.xml.stream,
- javax.xml.transform,
- javax.xml.transform.dom,
- javax.xml.transform.stream,
- javax.xml.namespace,
- org.objectweb.asm
-Export-Package:
- org.apache.tuscany.sdo,
- org.apache.tuscany.sdo.helper,
- org.apache.tuscany.sdo.impl,
- org.apache.tuscany.sdo.util,
- org.apache.tuscany.sdo.codegen,
- org.apache.tuscany.sdo.model,
- org.apache.tuscany.sdo.model.impl,
- org.apache.tuscany.sdo.model.internal
-Bundle-Activator: org.apache.tuscany.sdo.osgi.SdoBundleActivator
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.osgi.test.mf b/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.osgi.test.mf
deleted file mode 100644
index d63e3244d5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/osgi/sdo.osgi.test.mf
+++ /dev/null
@@ -1,40 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tuscany SDO OSGi Tests
-Bundle-SymbolicName: org.apache.tuscany.sdo.osgi.test
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache Software Foundation
-Import-Package: org.osgi.framework,
- junit.framework,
- javax.xml,
- javax.xml.parsers,
- org.xml.sax,
- org.xml.sax.helpers,
- org.xml.sax.ext,
- org.w3c.dom,
- org.w3c.dom.events,
- javax.xml.stream,
- javax.xml.transform,
- javax.xml.transform.dom,
- javax.xml.transform.stream,
- javax.xml.namespace,
- org.eclipse.emf.common,
- org.eclipse.emf.common.archive,
- org.eclipse.emf.common.command,
- org.eclipse.emf.common.notify,
- org.eclipse.emf.common.util,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.impl,
- org.eclipse.emf.ecore.plugin,
- org.eclipse.emf.ecore.resource,
- org.eclipse.emf.ecore.util,
- org.eclipse.emf.ecore.xml.namespace,
- org.eclipse.emf.ecore.xml.namespace.util,
- org.eclipse.emf.ecore.xml.type,
- org.eclipse.emf.ecore.xml.type.util,
- org.eclipse.xsd
-Export-Package: org.apache.tuscany.sdo.osgi
-Require-Bundle: org.apache.tuscany.sdo.lib;visibility:=reexport,
- org.apache.tuscany.sdo.impl;visibility:=reexport,
- org.apache.tuscany.sdo.spec;visibility:=reexport
-Bundle-Activator: org.apache.tuscany.sdo.test.osgi.TestBundleActivator
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/po.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/po.xsd
deleted file mode 100644
index d158dcf448..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/po.xsd
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/prefix.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/prefix.xsd
deleted file mode 100644
index af3d3283f5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/prefix.xsd
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/quote.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/quote.xml
deleted file mode 100644
index d7b5969e23..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/quote.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
-
- 2000.0
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/quoteInSOAP.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/quoteInSOAP.xml
deleted file mode 100644
index 348b61047e..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/quoteInSOAP.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
-
- 2000.0
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoModel.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoModel.xsd
deleted file mode 100644
index 6b596c5b36..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoModel.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoannotations.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoannotations.xsd
deleted file mode 100644
index acdde2896a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdoannotations.xsd
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdotypes.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdotypes.xsd
deleted file mode 100644
index 09c05bb671..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/sdotypes.xsd
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote.xml
deleted file mode 100644
index a56f2fe2b7..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote1.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote1.xml
deleted file mode 100644
index a9bb2bf330..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/shallowquote1.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple.xsd
deleted file mode 100644
index 661259e57a..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple2.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple2.xsd
deleted file mode 100644
index 53bace49b5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple2.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple3.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple3.xsd
deleted file mode 100644
index 6ff14a85d2..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simple3.xsd
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xml
deleted file mode 100644
index 2f29fc00f0..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- FBNT
- FlyByNightTechnology
- 999.0
- 1000.0
-
- 1500.0
-
-
- 2500.0
-
-
- 3000.0
-
-
- 4000.0
-
-
-
- fbnt
- 1000.0
-
- 2000.02000.99
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xsd
deleted file mode 100644
index 1df0f69196..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummary.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummaryUndone.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummaryUndone.xml
deleted file mode 100644
index a9c675b6c3..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simpleWithChangeSummaryUndone.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
-
- 1500.0
-
-
- 2000.0
-
- 2000.99
-
-
-
- 2500.0
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simplechangesummary.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/simplechangesummary.xml
deleted file mode 100644
index 134e2f7de5..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/simplechangesummary.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fbnt
- FlyByNightTechnology
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
- 1000.0
-
- 2000.0
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues1.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues1.xml
deleted file mode 100644
index c534eb9370..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- gm
- ngh
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues2.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues2.xml
deleted file mode 100644
index d90d0f3a0c..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/substitutionValues2.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- gh
- ngh
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xml b/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xml
deleted file mode 100644
index 3b3e2ffbb4..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
- Folder00000000000
- marries inflamed apprehended beseeming bustle
-
-
-
- Brian
- rw
-
-
- Fuhwei
- r
-
-
-
-
- Hasan
-
-
- Frank
-
-
-
-
-
- Folder00000000011
- Mumbling Jumblin Pink Panther goofs it up
-
-
-
- Imad
- x
-
-
- Robbie
- rwx
-
-
-
-
- Yang
-
-
- Art
-
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xsd
deleted file mode 100644
index 0b817d425d..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xpath.xsd
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xsdCorners.xsd b/branches/sdo-1.1.1-incubating/impl/src/test/resources/xsdCorners.xsd
deleted file mode 100644
index b62bfcae56..0000000000
--- a/branches/sdo-1.1.1-incubating/impl/src/test/resources/xsdCorners.xsd
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/java5tools/pom.xml b/branches/sdo-1.1.1-incubating/java5tools/pom.xml
deleted file mode 100644
index e21ab37839..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
-
-
- 4.0.0
- tuscany-sdo-java5tools
- Tuscany SDO Java5 Tools
- SDO Java5 Tools.
- 1.1.1-incubating-SNAPSHOT
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.5
- 1.5
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- **/*TestCase.java
-
-
-
-
-
-
-
-
- eclipse.emf
- http://download.eclipse.org/tools/emf/maven2
-
- true
-
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-impl
- ${sdo.version}
- compile
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-tools
- ${sdo.version}
- compile
-
-
-
- org.eclipse.emf
- codegen
- ${emfVersion}
- compile
-
-
-
- org.eclipse.emf
- codegen-ecore
- ${emfVersion}
- compile
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/java5tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java b/branches/sdo-1.1.1-incubating/java5tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java
deleted file mode 100644
index 4d09c2da8b..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/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 ]
- * [ -javaPackage ]
- * [ -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 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 ]");
- System.out.println(" [ -javaPackage ]");
- System.out.println(" [ -prefix ]");
- System.out.println(" [ -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");
- }
-
-}
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/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.1.1-incubating/java5tools/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/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.1.1-incubating/java5tools/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9f9572a167..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/java5tools/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/lib/pom.xml b/branches/sdo-1.1.1-incubating/lib/pom.xml
deleted file mode 100644
index ead86a2b24..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
-
- 4.0.0
- tuscany-sdo-lib
- Tuscany SDO Library
- Tuscany SDO implementation library.
- jar
-
-
-
- codehaus
- Codehaus maven repository
- http://repository.codehaus.org/
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- ${sdo.version}
-
-
-
-
- stax
- stax-api
- 1.0.1
- provided
- true
-
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
- ${project.build.outputDirectory}/META-INF/MANIFEST.MF
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
- ${basedir}/src/main/java/org/apache/tuscany/sdo/api/overview.html
- 2.0
- 1.4
- org.apache.tuscany.sdo.lib:org.apache.tuscany.sdo.spi
-
-
-
- package
- package
-
- jar
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/Event.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/Event.java
deleted file mode 100644
index 4b4d0c4050..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/Event.java
+++ /dev/null
@@ -1,63 +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.api;
-
-import commonj.sdo.Property;
-
-/**
- * An experimental Tuscany API interface, subject to possible change,
- * to permit notification of change events on a DataObject instance
- */
-public interface Event {
-
- Object getNotifier();
-
- /**
- * constants returned from getEventType()
- */
- int SET = 1;
- int UNSET = 2;
- int ADD = 3;
- int REMOVE = 4;
- int ADD_MANY = 5;
- int REMOVE_MANY = 6;
- int MOVE = 7;
- int REMOVE_LISTENER = 8;
-
- int getEventType();
-
- /**
- * get the Property for which the value changed
- */
- Property getProperty();
- Object getOldValue();
- Object getNewValue();
-
- /*
- * returns true if the Property value was in state "set" before this change occurred.
- */
- boolean wasSet();
- boolean isTouch();
-
- int NO_INDEX = -1;
- int getPosition();
-
- }
-
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/EventListener.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/EventListener.java
deleted file mode 100644
index cfb534eaf0..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/EventListener.java
+++ /dev/null
@@ -1,33 +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.api;
-
-/**
- * An experimental Tuscany API interface, subject to possible change.
- * Can be registered with a DataObject instance to permit change
- * notifications for Property values of the DataObject.
- * @see SDOHelper#addChangeListener(commonj.sdo.DataObject, EventListener)
- *
- */
-public interface EventListener {
-
- public void eventNotification(Event e);
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java
deleted file mode 100644
index 17d9a08a87..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java
+++ /dev/null
@@ -1,452 +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.api;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-import commonj.sdo.helper.XSDHelper;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * This interface provides helper functions which are not included in the SDO specification itself.
- * Use of the functions in this interface is recommended, instead of resorting to low-level
- * implementation-specific APIs.
- */
-public interface SDOHelper
-{
- final int UNBOUNDED = -1; //return value from getUpperBound() when maxOccurs="unbounded"
- final int UNSPECIFIED = -2; //return value from getUpperBound() for global property
-
- /**
- * Create a non-extensible HelperContext to provide access to a consistent set of Helpers which make use
- * of a new TypeHelper instance to provide scope for type definitions.
- * @return the new HelperContext
- * @see #createHelperContext(boolean)
- */
- public HelperContext createHelperContext();
-
- /**
- * Create a non-extensible HelperContext to provide access to a consistent set of Helpers which make use
- * of a new TypeHelper instance to provide scope for type definitions.
- * @param options Map of default XMLOptions
- * @return the new HelperContext
- * @see #createHelperContext(boolean)
- */
- public HelperContext createHelperContext(boolean extensibleNamespaces, Map options);
-
- /**
- * Create a HelperContext to provide access to a consistent set of Helpers which make use of a new
- * TypeHelper instance to provide scope for type definitions.
- * @param extensibleNamespaces true if the contents of a namespaces should be incrementally modifiable over time
- * @return the new HelperContext
- */
- public HelperContext createHelperContext(boolean extensibleNamespaces);
-
- /**
- * create a non-extensible HelperContext with default load/save options
- * @param options default load/save options from XMLOptions
- * @return the new HelperContext
- */
- public HelperContext createHelperContext(Map options);
-
- /**
- * Creates an instance of a data type from the specified string.
- * @param dataType a Type, for which isDataType() returns true, to instantiate.
- * @param literal the string value of the dataType.
- * @return an instance of the dataType.
- * @see #convertToString(Type, Object)
- */
- public Object createFromString(Type dataType, String literal);
-
- /**
- * Converts an instance of a data type to a string literal representation.
- * @param dataType the Type, for which isDataType() returns true, of the value to convert.
- * @param value a value of the dataType.
- * @return the string literal representation of the value.
- * @see #createFromString(Type, String)
- */
- public String convertToString(Type dataType, Object value);
-
- /**
- * Create a DataObject wrapper for an instance of the specified dataType.
- * This method is typically used to create a root object that can be passed to the XMLHelper.save()
- * method when the root element to be serialized is an XMLSchema simpleType.
- * @param dataType a Type for which isDataType() returns true.
- * @param value the instance value.
- * @return a DataObject wrapper for the specified value.
- */
- public DataObject createDataTypeWrapper(Type dataType, Object value);
-
- /**
- * Get the SDO built-in type corresponding to the specified XSD type in the XML Schema
- * namespace ("http://www.w3.org/2001/XMLSchema").
- * @param xsdType a type name in the XML Schema namespace.
- * @return the SDO built-in Type corresponding to the specified XSD type.
- */
- public Type getXSDSDOType(String xsdType);
-
- /**
- * Gets the Sequence corresponding to the specified substitutable Property of the specified DataObject.
- * @param dataObject the data object.
- * @param head a substitution group head property.
- * @return the Sequence corresponding to the specified substitutable Property of the specified DataObject or
- * null if the specified Property isn't a substitution head.
- */
- public Sequence getSubstitutionValues(DataObject dataObject, Property head);
-
- /**
- * Get the SDO built-in type corresponding to the specified Java instanceClass.
- * @param javaClass the Java instanceClass of the type.
- * @return the SDO built-in Type corresponding to the specified instanceClass.
- */
- public Type getJavaSDOType(Class javaClass);
-
- /**
- * Return whether at least one value is required for a valid instance of the specified property.
- * @param the property in question.
- * @return true if the property is required.
- */
- public boolean isRequired(Property property);
-
- /**
- * Return the upper bound of the specified property or -1 if unbounded.
- * @param the property in question.
- * @return the upper bound.
- */
- public int getUpperBound(Property property);
-
- /**
- * Return the lower bound of the specified property or 1 by default
- * @param the property in question.
- * @return the lower bound.
- */
- public int getLowerBound(Property property);
-
- /**
- * Return Enumeration facet
- * @param type
- * @return List of enum facets in a Type
- *///Amita
- public List getEnumerationFacet(Type type);
-
- /**
- * Return Pattern facet
- * @param type
- * @return List of pattern facets in a Type
- *///Amita
- public List getPatternFacet(Type type);
-
- /**
- * Returns whether the Property is many-valued given the specified context.
- * @param property The Property in question
- * @param context The context to check whether the specified Property is many-valued
- * @return true if the Property is many-valued given the specified context.
- */
- public boolean isMany(Property property, DataObject context);
-
- /**
- * Create an empty data graph.
- * @return the new data graph instance.
- */
- public DataGraph createDataGraph();
-
- /**
- * Set the root object of a data graph.
- * @param dataGraph the data graph in which to set the root object.
- * @param rootObject the root object.
- */
- public void setRootObject(DataGraph dataGraph, DataObject rootObject);
-
- /**
- * Load a serialized data graph from the specified insputStream.
- *
- * @param inputStream the inputStream of the data graph.
- * @param options loader control options, or null.
- * @param hc the HelperContext in which to register deserialized Types and to find Types when
- * creating DataObject instances, or null for default HelperContext.
- * @return the de-serialized data graph.
- * @throws IOException
- */
- public DataGraph loadDataGraph(InputStream inputStream, Map options, HelperContext hc) throws IOException;
-
- /**
- * Serialize the specified data graph to the specified outputStream.
- * @param dataGraph the data graph to save.
- * @param outputStream the outputStream for the data graph.
- * @param options serializer control options, or null.
- * @throws IOException
- */
- public void saveDataGraph(DataGraph dataGraph, OutputStream outputStream, Map options) throws IOException;
-
- /**
- * Registers the specified {@link Type type}(s) to be serialized along with
- * the {@link DataObject data object}(s) in the graph. For example, the list of types returned from
- * {@link TypeHelper#define} can be registered with this method, allowing deserialization of
- * instances of a dynamically defined model.
- * @param dataGraph the DataGraph in which to register the specified type(s).
- * @param types a list containing the type(s) to be registered (TBD or null to automatically register all
- * types used by the objects in the DataGraph).
- */
- public void registerDataGraphTypes(DataGraph dataGraph, List/*Type*/types);
-
- /**
- * Create a new cross scope CopyHelper.
- * @param hc the HelperContext containing the Types to use to create the copy objects.
- * @return the new CopyHelper.
- */
- public CopyHelper createCrossScopeCopyHelper(HelperContext targetScope);
-
-
- /**
- * Create a new XMLStreamHelper, with visibility to types in the specified HelperContext scope.
- * @param hc the HelperContext to use for locating types.
- * @return the new XMLStreamHelper.
- */
- public XMLStreamHelper createXMLStreamHelper(HelperContext hc);
-
- /**
- * Create a new ObjectInputStream in the specifice HelperContext scope.
- * @param inputStream the inputStream with which to create the ObjectInputStream.
- * @param helperContext the HelperContext scope.
- * @return the new ObjectInputStream.
- */
- public ObjectInputStream createObjectInputStream(InputStream inputStream, HelperContext helperContext) throws IOException;
-
- /**
- * Create a new ObjectOutputStream in the specifice HelperContext scope.
- * @param outputStream the outputStream with which to create the ObjectOutputStream.
- * @param helperContext the HelperContext scope.
- * @return the new ObjectOutputStream.
- */
- public ObjectOutputStream createObjectOutputStream(OutputStream outputStream, HelperContext helperContext) throws IOException;
-
- /**
- * Gets all of the types associated with a uri.
- * @param hc the HelperContext to use for locating types.
- * @param uri the URI of the Types
- * @return a List containing instances of Type, null if uri is not found.
- */
- public List getTypes(HelperContext hc, String uri);
-
- /**
- * Gets the open content subset of the specified DataObject's instance properties.
- * @param dataObject the DataObject instance
- * @return a List containing any open content properties of the DataObject
- */
- public List getOpenContentProperties(DataObject dataObject);
-
- /**
- * Return true if the specified type is a special DocumentRoot Type.
- * @param type the Type in question
- * @return true if type is a DocumentRoot
- */
- public boolean isDocumentRoot(Type type);
-
- /**
- * Return an XPath from the containment root to the specified DataObject.
- * @param dataObject a DataObject
- * @return the XPath from the containment root.
- */
- public String getXPath(DataObject dataObject);
-
- /**
- * Gets a MetaDataBuilder which can be used to programatically create SDO Types and Properties.
- * @return a MetaDataBuilder instance
- */
- public MetaDataBuilder getMetaDataBuilder();
-
- /**
- * An experimental interface, subject to possible change that permits
- * registration of an event listener with a DataObject instance
- * @param dob DataObject
- * @param listener EventListener
- */
- public void addChangeListener(DataObject dob, EventListener listener);
-
- /**
- * An experimental interface, subject to possible change that permits
- * deregistration of an event listener with a DataObject instance
- * @param dob DataObject
- * @param listener EventListener
- */
- public void removeChangeListener(DataObject dob, EventListener listener);
-
- /**
- * This interface provides methods which can be used to programatically create SDO Types and Properties.
- * It provides a lower level and more efficient API then the DataObject-based one of TypeHelper.define().
- */
-
- public interface MetaDataBuilder
- {
-
- /**
- * Create a Type in the specified TypeHelper scope.
- * @return the new Type.
- */
- public Type createType(HelperContext hc, String uri, String name, boolean isDataType);
-
- /**
- * Add a baseType to the specified type.
- */
- public void addBaseType(Type type, Type baseType);
-
- /**
- * Add an aliasName to the specified type.
- */
- public void addAliasName(Type type, String aliasName);
-
- /**
- * Set the isOpen value of the specified type.
- */
- public void setOpen(Type type, boolean isOpen);
-
- /**
- * Set the isSequenced value of the specified type.
- */
- public void setSequenced(Type type, boolean isSequenced);
-
- /**
- * Set the isAbstract value of the specified type.
- */
- public void setAbstract(Type type, boolean isAbstract);
-
- /**
- * Set the isAbstract value of the specified type.
- */
- public void setJavaClassName(Type type, String javaClassName);
-
- /**
- * Create a new property in the specified containingType.
- */
- public Property createProperty(Type containingType, String name, Type propertyType);
-
- /**
- * Set a SDO property to become an XSD element or attribute
- */
- public void setPropertyXMLKind(Property property, boolean isXmlElement);
-
- /**
- * Create a new open content property in the specified TypeHelper scope.
- */
- public Property createOpenContentProperty(HelperContext hc, String uri, String name, Type type);
-
- /**
- * Add an aliasName to the specified property.
- */
- public void addAliasName(Property property, String aliasName);
-
- /**
- * Set the isMany value of the specified property.
- */
- public void setMany(Property property, boolean isMany);
-
- /**
- * Set the isContainment value of the specified property.
- */
- public void setContainment(Property property, boolean isContainment);
-
- /**
- * Set the default value of the specified property.
- */
- public void setDefault(Property property, String defaultValue);
-
- /**
- * Set the isReadOnly value of the specified property.
- */
- public void setReadOnly(Property property, boolean isReadOnly);
-
- /**
- * Set the opposite value of the specified property.
- */
- public void setOpposite(Property property, Property opposite);
-
- /**
- * Add an instance property to the specified type.
- */
- public void addTypeInstanceProperty(Type definedType, Property instanceProperty, Object value);
-
- /**
- * Add anf instance property to the specified property.
- */
- public void addPropertyInstanceProperty(Property definedProperty, Property instanceProperty, Object value);
- }
-
- /**
- * This interface contains options that can be passed to the XMLHelper load() and save() methods.
- */
- public interface XMLOptions
- {
- /**
- * Line Break String such as "\n", "\r\n", "\r" and "", absence/null is the default (line.separator System Property)
- */
- final String XML_SAVE_LINE_BREAK = "LineBreak";
-
- /**
- * Indent String such as "\t", "", etc. absence/null is the default (" ")
- */
- final String XML_SAVE_INDENT = "indent";
-
- /**
- * Margin String such as " ", "\t\t", etc. Absence/null/"" is the default (no margin)
- */
- final String XML_SAVE_MARGIN = "margin";
-
- /**
- * Attribute formatting that exceeds the specified width as Integer will cause a line break so that formatting will continue indented on the next line
- */
- final String XML_SAVE_LINE_WIDTH = "LINE_WIDTH";
-
- /**
- * Boolean to save a doctype declaration
- */
- final String XML_SAVE_DOCTYPE = "SAVE_DOCTYPE";
-
- /**
- * Boolean to process the schemaLocation/noNamespaceSchemaLocation attributes occurring in the instance document to {@link XSDHelper#define convert XSD(s) to Types}
- */
- final String XML_LOAD_SCHEMA = "ProcessSchemaLocations";
-
- /**
- * To tolerate malformed elements and attributes (default unless set by System property XML.load.form.lax). 0 not to.
- */
- final String XML_LOAD_LAX_FORM = "load malform";
-
- /**
- * Allows you to record unknown features during deserialization/loading.
- * The default is Boolean.FALSE unless set to Boolean.TRUE explicitly.
- */
- final String XML_LOAD_UNKNOWN_PROPERTIES = "load unknown properties";
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOUtil.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOUtil.java
deleted file mode 100644
index 54f86aafbd..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOUtil.java
+++ /dev/null
@@ -1,445 +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.api;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.sdo.api.EventListener;
-import org.apache.tuscany.sdo.spi.HelperProviderBase;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * This class provides convenient static utility functions for calling the default SDOHelper.
- */
-public final class SDOUtil
-{
- protected static SDOHelper defaultSDOHelper = ((HelperProviderBase)HelperProvider.INSTANCE).sdoHelper();
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createDataTypeWrapper(Type, Object)}.
- */
- public static DataObject createDataTypeWrapper(Type dataType, Object value)
- {
- return defaultSDOHelper.createDataTypeWrapper(dataType, value);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createFromString(Type, String)}.
- */
- public static Object createFromString(Type dataType, String literal)
- {
- return defaultSDOHelper.createFromString(dataType, literal);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#convertToString(Type, Object)}.
- */
- public static String convertToString(Type dataType, Object value)
- {
- return defaultSDOHelper.convertToString(dataType, value);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getXSDSDOType(String)}.
- */
- public static Type getXSDSDOType(String xsdType)
- {
- return defaultSDOHelper.getXSDSDOType(xsdType);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getSubstitutionValues(DataObject, Property)}.
- */
- public static Sequence getSubstitutionValues(DataObject dataObject, Property head)
- {
- return defaultSDOHelper.getSubstitutionValues(dataObject, head);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getJavaSDOType(Class)}.
- */
- public static Type getJavaSDOType(Class javaClass)
- {
- return defaultSDOHelper.getJavaSDOType(javaClass);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#isRequired(Property)}.
- */
- public static boolean isRequired(Property property)
- {
- return defaultSDOHelper.isRequired(property);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getUpperBound(Property)}.
- */
- public static int getUpperBound(Property property)
- {
- return defaultSDOHelper.getUpperBound(property);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getLowerBound(Property)}.
- */
- public static int getLowerBound(Property property)
- {
- return defaultSDOHelper.getLowerBound(property);
- }
-
- public static List getEnumerationFacet(Type type) {
- return defaultSDOHelper.getEnumerationFacet(type);
- }
-
- public static List getPatternFacet(Type type) {
- return defaultSDOHelper.getPatternFacet(type);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#isMany(Property, DataObject)}.
- */
- public static boolean isMany(Property property, DataObject context)
- {
- return defaultSDOHelper.isMany(property, context);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createDataGraph}.
- */
- public static DataGraph createDataGraph()
- {
- return defaultSDOHelper.createDataGraph();
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#setRootObject(DataGraph, DataObject)}.
- */
- public static void setRootObject(DataGraph dataGraph, DataObject rootObject)
- {
- defaultSDOHelper.setRootObject(dataGraph, rootObject);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#loadDataGraph(InputStream, Map, TypeHelper)}.
- */
- public static DataGraph loadDataGraph(InputStream inputStream, Map options) throws IOException
- {
- return defaultSDOHelper.loadDataGraph(inputStream, options, (HelperContext)null);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#loadDataGraph(InputStream, Map, HelperContext)}.
- */
- public static DataGraph loadDataGraph(InputStream inputStream, Map options, HelperContext hc) throws IOException
- {
- return defaultSDOHelper.loadDataGraph(inputStream, options, hc);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#saveDataGraph(DataGraph, OutputStream, Map)}.
- */
- public static void saveDataGraph(DataGraph dataGraph, OutputStream outputStream, Map options) throws IOException
- {
- defaultSDOHelper.saveDataGraph(dataGraph, outputStream, options);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#registerDataGraphTypes(DataGraph, List)}.
- */
- public static void registerDataGraphTypes(DataGraph dataGraph, List/*Type*/ types)
- {
- defaultSDOHelper.registerDataGraphTypes(dataGraph, types);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createHelperContext(boolean,Map)}.
- */
- public static HelperContext createHelperContext(boolean extensibleNamespaces,Map options){
- return defaultSDOHelper.createHelperContext(extensibleNamespaces, options);
- }
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createHelperContext(boolean)}.
- */
- public static HelperContext createHelperContext(boolean extensibleNamespaces)
- {
- return defaultSDOHelper.createHelperContext(extensibleNamespaces);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createHelperContext}.
- */
- public static HelperContext createHelperContext(Map options)
- {
- return defaultSDOHelper.createHelperContext(options);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createHelperContext}.
- */
- public static HelperContext createHelperContext()
- {
- return defaultSDOHelper.createHelperContext();
- }
-
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createCrossScopeCopyHelper(HelperContext)}.
- */
- public static CopyHelper createCrossScopeCopyHelper(HelperContext hc)
- {
- return defaultSDOHelper.createCrossScopeCopyHelper(hc);
- }
-
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createXMLStreamHelper(HelperContext)}.
- */
- public static XMLStreamHelper createXMLStreamHelper(HelperContext hc)
- {
- return defaultSDOHelper.createXMLStreamHelper(hc);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createObjectInputStream(InputStream, HelperContext)}.
- */
- public static ObjectInputStream createObjectInputStream(InputStream inputStream, HelperContext helperContext) throws IOException
- {
- return defaultSDOHelper.createObjectInputStream(inputStream, helperContext);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#createObjectOutputStream(OutputStream, HelperContext)}.
- */
- public static ObjectOutputStream createObjectOutputStream(OutputStream outputStream, HelperContext helperContext) throws IOException
- {
- return defaultSDOHelper.createObjectOutputStream(outputStream, helperContext);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getTypes(HelperContext, String)}.
- */
- public static List getTypes(HelperContext hc, String uri) {
-
- return defaultSDOHelper.getTypes(hc, uri);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getOpenContentProperties(DataObject)}.
- */
- public static List getOpenContentProperties(DataObject dataObject)
- {
- return defaultSDOHelper.getOpenContentProperties(dataObject);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#isDocumentRoot(Type)}.
- */
- public static boolean isDocumentRoot(Type type)
- {
- return defaultSDOHelper.isDocumentRoot(type);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper#getXPath(DataObject)}.
- */
- public static String getXPath(DataObject dataObject)
- {
- return defaultSDOHelper.getXPath(dataObject);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#createType(HelperContext, String, String, boolean)}.
- */
- public static Type createType(HelperContext hc, String uri, String name, boolean isDataType)
- {
- return defaultSDOHelper.getMetaDataBuilder().createType(hc, uri, name, isDataType);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#addBaseType(Type, Type)}.
- */
- public static void addBaseType(Type type, Type baseType)
- {
- defaultSDOHelper.getMetaDataBuilder().addBaseType(type, baseType);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#addAliasName(Type, String)}.
- */
- public static void addAliasName(Type type, String aliasName)
- {
- defaultSDOHelper.getMetaDataBuilder().addAliasName(type, aliasName);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setOpen(Type, boolean)}.
- */
- public static void setOpen(Type type, boolean isOpen)
- {
- defaultSDOHelper.getMetaDataBuilder().setOpen(type, isOpen);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setSequenced(Type, boolean)}.
- */
- public static void setSequenced(Type type, boolean isSequenced)
- {
- defaultSDOHelper.getMetaDataBuilder().setSequenced(type, isSequenced);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setAbstract(Type, boolean)}.
- */
- public static void setAbstract(Type type, boolean isAbstract)
- {
- defaultSDOHelper.getMetaDataBuilder().setAbstract(type, isAbstract);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setJavaClassName(Type, String)}.
- */
- public static void setJavaClassName(Type type, String javaClassName)
- {
- defaultSDOHelper.getMetaDataBuilder().setJavaClassName(type, javaClassName);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#createProperty(Type, String, Type)}.
- */
- public static Property createProperty(Type containingType, String name, Type propertyType)
- {
- return defaultSDOHelper.getMetaDataBuilder().createProperty(containingType, name, propertyType);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setPropertyXMLKind(Property, boolean)}.
- */
- public static void setPropertyXMLKind(Property property, boolean isXmlElement) {
- defaultSDOHelper.getMetaDataBuilder().setPropertyXMLKind(property, isXmlElement);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#createOpenContentProperty(TypeHelper, String, String, Type)}.
- */
- public static Property createOpenContentProperty(HelperContext hc, String uri, String name, Type type)
- {
- return defaultSDOHelper.getMetaDataBuilder().createOpenContentProperty(hc, uri, name, type);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#addAliasName(Property, String)}.
- */
- public static void addAliasName(Property property, String aliasName)
- {
- defaultSDOHelper.getMetaDataBuilder().addAliasName(property, aliasName);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setMany(Property, boolean)}.
- */
- public static void setMany(Property property, boolean isMany)
- {
- defaultSDOHelper.getMetaDataBuilder().setMany(property, isMany);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setContainment(Property, boolean)}.
- */
- public static void setContainment(Property property, boolean isContainment)
- {
- defaultSDOHelper.getMetaDataBuilder().setContainment(property, isContainment);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setDefault(Property, String)}.
- */
- public static void setDefault(Property property, String defaultValue)
- {
- defaultSDOHelper.getMetaDataBuilder().setDefault(property, defaultValue);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setReadOnly(Property, boolean)}.
- */
- public static void setReadOnly(Property property, boolean isReadOnly)
- {
- defaultSDOHelper.getMetaDataBuilder().setReadOnly(property, isReadOnly);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#setOpposite(Property, Property)}.
- */
- public static void setOpposite(Property property, Property opposite)
- {
- defaultSDOHelper.getMetaDataBuilder().setOpposite(property, opposite);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#addTypeInstanceProperty(Type, Property, Object)}.
- */
- public static void addTypeInstanceProperty(Type definedType, Property property, Object value)
- {
- defaultSDOHelper.getMetaDataBuilder().addTypeInstanceProperty(definedType, property, value);
- }
-
- /**
- * @see {@link org.apache.tuscany.sdo.api.SDOHelper.MetaDataBuilder#addPropertyInstanceProperty(Property, Property, Object)}.
- */
- public static void addPropertyInstanceProperty(Property definedProperty, Property property, Object value)
- {
- defaultSDOHelper.getMetaDataBuilder().addPropertyInstanceProperty(definedProperty, property, value);
- }
-
-
- /**
- * @see SDOHelper#addChangeListener(DataObject, EventListener)
- * @param dob
- * @param l
- */
- public static void addChangeListener(DataObject dob, EventListener l) {
- defaultSDOHelper.addChangeListener(dob, l);
- }
-
- /**
- * @see SDOHelper#addChangeListener(DataObject, EventListener)
- * @param dob
- * @param l
- */
- public static void removeChangeListener(DataObject dob, EventListener l) {
- defaultSDOHelper.removeChangeListener(dob, l);
- }
-
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/XMLStreamHelper.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/XMLStreamHelper.java
deleted file mode 100644
index bf283256fe..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/XMLStreamHelper.java
+++ /dev/null
@@ -1,125 +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.api;
-
-import java.util.Map;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- * Helper interface for reading and writing SDO DataObjects from XML streams
- * (StAX).
- *
- * @version $Rev: 503913 $ $Date: 2007-02-05 17:53:34 -0500 (Mon, 05 Feb 2007) $
- */
-public interface XMLStreamHelper {
- /**
- * Creates and returns an XMLDocument from an XML input stream. The reader
- * must be positioned on a START_DOCUMENT event.
- *
- * @param reader the stream to read
- * @return an XMLDocument created from the stream
- * @throws XMLStreamException if there was a problem reading the stream
- * @throws IllegalStateException if the reader is not positioned on a
- * START_DOCUMENT event
- */
- XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;
-
- /**
- * Save a XMLDocument to an XML stream.
- *
- * @param document the document to be written
- * @param writer the stream to write to
- * @throws XMLStreamException if there was a problem writing to the stream
- */
- void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException;
-
- void save(XMLDocument document, XMLStreamWriter writer, Map options) throws XMLStreamException;
-
- /**
- * Creates and returns a XMLStreamReader that can be used to read an
- * XMLDocument as a XML event stream. The reader will be positioned on a
- * START_DOCUMENT event.
- *
- * @param document the XMLDocument to be read
- * @return an XMLStreamReader that can be used to read the document
- */
- XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException;
-
- /**
- * Create a DataObject from an element in a XML stream. The reader must be
- * positioned on a START_ELEMENT event.
- *
- * @param reader the stream to read
- * @return a DataObject created from the element in the stream
- * @throws XMLStreamException if there was a problem reading the stream
- * @throws IllegalStateException if the reader is not positioned on a
- * START_ELEMENT event
- */
- DataObject loadObject(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;
-
- /**
- * Default Type to load DataObject if the element is unqualified/local
- * without xsi:type or the qualified/global element or xsi:type fail to
- * resolve. Can be null.
- */
- String OPTION_DEFAULT_ROOT_TYPE = "default root type";
-
- /**
- * Create a DataObject from an element in a XML stream. The reader must be
- * positioned on a START_ELEMENT event.
- *
- * @param reader the stream to read
- * @param options {@link OPTION_DEFAULT_ROOT_TYPE}; can be null or empty
- * @return a DataObject created from the element in the stream
- * @throws XMLStreamException if there was a problem reading the stream
- * @throws IllegalStateException if the reader is not positioned on a
- * START_ELEMENT event
- */
- DataObject loadObject(XMLStreamReader reader, Map options) throws XMLStreamException, IllegalStateException;
-
- /**
- * Save a DataObject to an XML stream.
- *
- * @param sdo the DataObject to be written
- * @param writer the stream to write to
- * @throws XMLStreamException if there was a problem writing to the stream
- */
- void saveObject(DataObject sdo, XMLStreamWriter writer) throws XMLStreamException;
-
- void saveObject(DataObject sdo, XMLStreamWriter writer, Map options) throws XMLStreamException;
-
- /**
- * Creates and returns a XMLStreamReader that can be used to read a
- * DataObject as a XML event stream. The reader will be positioned on a
- * START_ELEMENT event.
- *
- * @param sdo the DataObject to be read
- * @return an XMLStreamReader that can be used to read the DataObject
- */
- XMLStreamReader createXMLStreamReader(DataObject sdo);
-
- HelperContext getHelperContext();
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/overview.html b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/overview.html
deleted file mode 100644
index c6bd255b8f..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/overview.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
- Tuscany API extensions to Service Data Objects (SDO)
-
-
-
Tuscany API extensions to Service Data Objects (SDO)
-
Overview
-
-The "org.apache.tuscany.sdo.api" package represents Tuscany API for SDO Java
-above and beyond what is offered by the SDO API itself. The contents of this
-project provide a means to achieve operations that are not currently addressed
-by the SDO API.
-
-
-The SDOUtil class simply provides a set of static convenince methods for
-exercising the methods of a default instance of the SDOHelper interface.
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectInputStream.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectInputStream.java
deleted file mode 100644
index 606b4c8fc3..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectInputStream.java
+++ /dev/null
@@ -1,49 +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.lib;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-
-import commonj.sdo.helper.HelperContext;
-
-/**
- * This subclass of ObjectInputStream provides a place to store the scope in which
- * it was created.
- */
-public class SDOObjectInputStream extends ObjectInputStream {
-
- private HelperContext helperContext;
-
- public SDOObjectInputStream(InputStream in, HelperContext helperContext) throws IOException{
- super(in);
- this.helperContext = helperContext;
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-
- public void setHelperContext(HelperContext helperContext) {
- this.helperContext = helperContext;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectOutputStream.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectOutputStream.java
deleted file mode 100644
index 05f2105b97..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/SDOObjectOutputStream.java
+++ /dev/null
@@ -1,49 +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.lib;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-
-import commonj.sdo.helper.HelperContext;
-
-/**
- * This subclass of ObjectOutputStream provides a place to store the scope in which
- * it was created.
- */
-public class SDOObjectOutputStream extends ObjectOutputStream {
-
- private HelperContext helperContext;
-
- public SDOObjectOutputStream(OutputStream os, HelperContext helperContext) throws IOException{
- super(os);
- this.helperContext = helperContext;
- }
-
- public HelperContext getHelperContext() {
- return helperContext;
- }
-
- public void setHelperContext(HelperContext helperContext) {
- this.helperContext = helperContext;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/UnknownPropertyList.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/UnknownPropertyList.java
deleted file mode 100644
index 95eabd4b82..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/lib/UnknownPropertyList.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 org.apache.tuscany.sdo.lib;
-
-import java.util.AbstractList;
-import java.util.Collections;
-import java.util.List;
-
-import commonj.sdo.DataObject;
-
-public class UnknownPropertyList extends AbstractList {
- protected List delegateList = Collections.EMPTY_LIST;
- protected DataObject dataObject;
- protected String path;
-
- public UnknownPropertyList(DataObject dataObject, String path) {
- this.dataObject = dataObject;
- this.path = path;
- }
-
- public Object get(int index) {
- return getDelegateList().get(index);
- }
-
- public int size() {
- return getDelegateList().size();
- }
-
- public Object remove(int index) {
- return getDelegateList().remove(index);
- }
- public Object set(int index, Object element) {
- return getDelegateList().set(index, element);
- }
-
- public void add(int index, Object element) {
- if (getDelegateList() == Collections.EMPTY_LIST && index == 0) {
- dataObject.set(path, Collections.singletonList(element));
- delegateList = (List)dataObject.get(path);
- }
- else {
- delegateList.add(index, element);
- }
- }
-
- protected List getDelegateList() {
- if (delegateList == Collections.EMPTY_LIST) {
- List propertyList = (List)dataObject.get(path);
- if (propertyList != null) delegateList = propertyList;
- }
- return delegateList;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/HelperProviderBase.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/HelperProviderBase.java
deleted file mode 100644
index 375552497b..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/HelperProviderBase.java
+++ /dev/null
@@ -1,246 +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.spi;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.ObjectStreamException;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.api.XMLStreamHelper;
-import org.apache.tuscany.sdo.lib.SDOObjectInputStream;
-import org.apache.tuscany.sdo.lib.SDOObjectOutputStream;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-import commonj.sdo.impl.ExternalizableDelegator.Resolvable;
-
-
-/**
- * Create and manage all the default helpers
- */
-public abstract class HelperProviderBase extends HelperProvider
-{
- protected CopyHelper copyHelper;
-
- protected DataFactory dataFactory;
-
- protected DataHelper dataHelper;
-
- protected EqualityHelper equalityHelper;
-
- protected TypeHelper typeHelper;
-
- protected XMLHelper xmlHelper;
-
- protected XSDHelper xsdHelper;
-
- protected SDOHelper sdoHelper; // Tuscany extension APIs
-
- protected XMLStreamHelper xmlStreamHelper;
- /**
- * Subclasses must implement this method to initialize the above Helper instance variables
- */
- protected abstract HelperContext createDefaultHelpers();
-
- public HelperProviderBase()
- {
- defaultContext = createDefaultHelpers();
- }
-
- public SDOHelper sdoHelper()
- {
- return sdoHelper;
- }
-
- public CopyHelper copyHelper()
- {
- return copyHelper;
- }
-
- public DataFactory dataFactory()
- {
- return dataFactory;
- }
-
- public DataHelper dataHelper()
- {
- return dataHelper;
- }
-
- public EqualityHelper equalityHelper()
- {
- return equalityHelper;
- }
-
- public TypeHelper typeHelper()
- {
- return typeHelper;
- }
-
- public XMLHelper xmlHelper()
- {
- return xmlHelper;
- }
-
- public XMLStreamHelper xmlStreamHelper()
- {
- return xmlStreamHelper;
- }
- public XSDHelper xsdHelper()
- {
- return xsdHelper;
- }
-
- public Resolvable resolvable()
- {
- return new ResolvableImpl();
- }
-
- public Resolvable resolvable(Object target)
- {
- return new ResolvableImpl(target);
- }
-
- protected class ResolvableImpl implements Resolvable
- {
- protected Object target;
-
- public ResolvableImpl(Object target) { this.target = target; }
-
- public ResolvableImpl() { this.target = null; }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- if (target instanceof DataObject)
- {
- writeDataObject((DataObject)target, out);
- }
- else
- {
- throw new NotSerializableException(); // should never happen
- }
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- target = readDataObject(in);
- }
-
- public Object readResolve() throws ObjectStreamException
- {
- return target;
- }
-
- protected void writeDataObject(DataObject dataObject, ObjectOutput objectOutput) throws IOException
- {
- DataGraph dataGraph = dataObject.getDataGraph();
- if (dataGraph != null)
- {
- objectOutput.writeByte(0);
- objectOutput.writeUTF(SDOUtil.getXPath(dataObject));
- objectOutput.writeObject(dataGraph);
- }
- else if (dataObject.getContainer() != null)
- {
- objectOutput.writeByte(0);
- objectOutput.writeUTF(SDOUtil.getXPath(dataObject));
- objectOutput.writeObject(dataObject.getRootObject());
- }
- else
- {
- // Root object
- objectOutput.writeByte(1);
-
- ByteArrayOutputStream compressedByteArrayOutputStream = new ByteArrayOutputStream();
- GZIPOutputStream gzipOutputStream = new GZIPOutputStream(compressedByteArrayOutputStream);
- XMLHelper xmlHelperLocal = xmlHelper;
- if(objectOutput instanceof SDOObjectOutputStream)
- {
- xmlHelperLocal = ((SDOObjectOutputStream)objectOutput).getHelperContext().getXMLHelper();
- }
- xmlHelperLocal.save(dataObject, "commonj.sdo", "dataObject", gzipOutputStream);
- gzipOutputStream.close(); // Flush the contents
-
- byte[] byteArray = compressedByteArrayOutputStream.toByteArray();
- objectOutput.writeInt(byteArray.length);
- objectOutput.write(byteArray);
- }
- }
-
- protected DataObject readDataObject(ObjectInput objectInput) throws IOException, ClassNotFoundException
- {
- boolean isRoot = objectInput.readByte() == 1;
- if (isRoot)
- {
- // Root object: [rootXML] = length + XML contents
- int length = objectInput.readInt();
- byte[] compressedBytes = new byte [length];
-
- int index = 0;
- int bytesRead;
- while (index < length) {
- if ((bytesRead = objectInput.read(compressedBytes, index, length-index)) == -1) {
- break;
- }
- index += bytesRead;
- }
-
- GZIPInputStream gzipInputStream = new GZIPInputStream(new ByteArrayInputStream(compressedBytes));
- XMLHelper xmlHelperLocal = xmlHelper;
- if (objectInput instanceof SDOObjectInputStream)
- {
- xmlHelperLocal = ((SDOObjectInputStream)objectInput).getHelperContext().getXMLHelper();
- }
- XMLDocument doc = xmlHelperLocal.load(gzipInputStream);
- gzipInputStream.close();
-
- return doc.getRootObject();
- }
- else
- {
- // Non root object: [path] [root]
- String xpath = objectInput.readUTF();
- Object object = objectInput.readObject();
-
- DataObject root = object instanceof DataGraph ? ((DataGraph)object).getRootObject() : (DataObject)object;
- return xpath.equals("") ? root : root.getDataObject(xpath);
- }
- }
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/SDOHelperBase.java b/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/SDOHelperBase.java
deleted file mode 100644
index ce3678d81f..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/java/org/apache/tuscany/sdo/spi/SDOHelperBase.java
+++ /dev/null
@@ -1,176 +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.spi;
-
-/**
- * Base class for an implementation of the SDOHelper and SDOHelper.MetaDataBuilder interfaces.
- */
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.sdo.api.SDOHelper;
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.lib.SDOObjectInputStream;
-import org.apache.tuscany.sdo.lib.SDOObjectOutputStream;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.helper.HelperContext;
-
-public abstract class SDOHelperBase implements SDOHelper, SDOHelper.MetaDataBuilder
-{
- public HelperContext createHelperContext()
- {
- return createHelperContext(false);
- }
-
- public ObjectInputStream createObjectInputStream(InputStream inputStream, HelperContext helperContext) throws IOException
- {
- return new SDOObjectInputStream(inputStream, helperContext);
- }
-
- public ObjectOutputStream createObjectOutputStream(OutputStream outputStream, HelperContext helperContext) throws IOException
- {
- return new SDOObjectOutputStream(outputStream, helperContext);
- }
-
- public String getXPath(DataObject dataObject)
- {
- StringBuffer path = getXPath(dataObject, new StringBuffer(), dataObject);
- return path.toString();
- }
-
- protected StringBuffer getXPath(DataObject dataObject, StringBuffer path, DataObject root)
- {
- DataObject container = dataObject.getContainer();
- if (container == null)
- return path;
-
- if (container == root)
- throw new IllegalStateException("There is a cycle in the containment hierarchy of " + root);
-
- boolean first = path.length() == 0;
- Property property = dataObject.getContainmentProperty();
- if (SDOUtil.isMany(property, dataObject))
- {
- List list = container.getList(property);
- int pos = list.indexOf(dataObject);
- path.insert(0, property.getName() + "." + pos + (first ? "" : "/"));
- }
- else
- {
- path.insert(0, property.getName() + (first ? "" : "/"));
- }
-
- return getXPath(container, path, root);
- }
-
- public MetaDataBuilder getMetaDataBuilder()
- {
- return this;
- }
-
- //Java instance class to SDO mappings (section 8.1 of the SDO spec)
- protected static Map javaToSdoMappings = new HashMap();
- static {
- javaToSdoMappings.put(boolean.class, "Boolean");
- javaToSdoMappings.put(byte.class, "Byte");
- javaToSdoMappings.put(char.class, "Character");
- javaToSdoMappings.put(Date.class, "Date");
- javaToSdoMappings.put(BigDecimal.class, "Decimal");
- javaToSdoMappings.put(double.class, "Double");
- javaToSdoMappings.put(float.class, "Float");
- javaToSdoMappings.put(int.class, "Int");
- javaToSdoMappings.put(BigInteger.class, "Integer");
- javaToSdoMappings.put(long.class, "Long");
- javaToSdoMappings.put(Object.class, "Object");
- javaToSdoMappings.put(short.class, "Short");
- javaToSdoMappings.put(String.class, "String");
- javaToSdoMappings.put(Boolean.class, "BooleanObject");
- javaToSdoMappings.put(Byte.class, "ByteObject");
- javaToSdoMappings.put(Character.class, "CharacterObject");
- javaToSdoMappings.put(Double.class, "DoubleObject");
- javaToSdoMappings.put(Float.class, "FloatObject");
- javaToSdoMappings.put(Integer.class, "IntObject");
- javaToSdoMappings.put(Long.class, "LongObject");
- javaToSdoMappings.put(Short.class, "ShortObject");
- }
-
- //XSD to SDO mappings (section 9.4 of the SDO spec)
- protected static Map xsdToSdoMappings = new HashMap();
- static {
- xsdToSdoMappings.put("anySimpleType", "Object");
- xsdToSdoMappings.put("anyType", "DataObject");
- xsdToSdoMappings.put("anyURI", "URI");
- xsdToSdoMappings.put("base64Binary", "Bytes");
- xsdToSdoMappings.put("boolean", "Boolean");
- xsdToSdoMappings.put("byte", "Byte");
- xsdToSdoMappings.put("date", "YearMonthDay");
- xsdToSdoMappings.put("dateTime", "DateTime");
- xsdToSdoMappings.put("decimal", "Decimal");
- xsdToSdoMappings.put("double", "Double");
- xsdToSdoMappings.put("duration", "Duration");
- xsdToSdoMappings.put("ENTITIES", "Strings");
- xsdToSdoMappings.put("ENTITY", "String");
- xsdToSdoMappings.put("float", "Float");
- xsdToSdoMappings.put("gDay", "Day");
- xsdToSdoMappings.put("gMonth", "Month");
- xsdToSdoMappings.put("gMonthDay", "MonthDay");
- xsdToSdoMappings.put("gYear", "Year");
- xsdToSdoMappings.put("gYearMonth", "YearMonth");
- xsdToSdoMappings.put("hexBinary", "Bytes");
- xsdToSdoMappings.put("ID","String");
- xsdToSdoMappings.put("IDREF","String");
- xsdToSdoMappings.put("IDREFS","Strings");
- xsdToSdoMappings.put("int","Int");
- xsdToSdoMappings.put("integer","Integer");
- xsdToSdoMappings.put("language","String");
- xsdToSdoMappings.put("long","Long");
- xsdToSdoMappings.put("Name","String");
- xsdToSdoMappings.put("NCName","String");
- xsdToSdoMappings.put("negativeInteger","Integer");
- xsdToSdoMappings.put("NMTOKEN","String");
- xsdToSdoMappings.put("NMTOKENS","Strings");
- xsdToSdoMappings.put("nonNegativeInteger","Integer");
- xsdToSdoMappings.put("nonPositiveInteger","Integer");
- xsdToSdoMappings.put("normalizedString","String");
- xsdToSdoMappings.put("NOTATION","String");
- xsdToSdoMappings.put("positiveInteger","Integer");
- xsdToSdoMappings.put("QName","URI");
- xsdToSdoMappings.put("short","Short");
- xsdToSdoMappings.put("string","String");
- xsdToSdoMappings.put("time","Time");
- xsdToSdoMappings.put("token","String");
- xsdToSdoMappings.put("unsignedByte","Short");
- xsdToSdoMappings.put("unsignedInt","Long");
- xsdToSdoMappings.put("unsignedLong","Integer");
- xsdToSdoMappings.put("unsignedShort","Int");
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/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.1.1-incubating/lib/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/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.1.1-incubating/lib/src/main/resources/META-INF/MANIFEST.MF b/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index aa077ed9d1..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Extension-Name: tuscany-sdo-lib
-Specification-Title: Tuscany SDO Implementation Library
-Specification-Vendor: Apache Software Foundation
-Implementation-Vendor: Apache Software Foundation
-Implementation-Vendor-Id: org.apache
-Implementation-Title: tuscany-sdo-lib
-Implementation-Version: ${pom.version}
-Bundle-ManifestVersion: 2
-Bundle-Name: Tuscany SDO Implementation Library
-Bundle-SymbolicName: org.apache.tuscany.sdo.lib
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache Software Foundation
-Require-Bundle: org.apache.tuscany.sdo.spec;visibility:=reexport
-Export-Package: org.apache.tuscany.sdo.api,
- org.apache.tuscany.sdo.spi,
- org.apache.tuscany.sdo.lib
-X-Compile-Source-JDK: 1.4
-X-Compile-Target-JDK: 1.4
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9f9572a167..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/lib/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/plugin/pom.xml b/branches/sdo-1.1.1-incubating/plugin/pom.xml
deleted file mode 100644
index 6adda49119..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/pom.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1-incubating
-
- 4.0.0
- tuscany-sdo-plugin
- maven-plugin
- Tuscany SDO Maven Plugin
-
-
-
- org.apache.maven
- maven-plugin-api
- 2.0.4
- compile
-
-
- org.apache.maven
- maven-model
- 2.0.4
-
-
- org.apache.maven
- maven-project
- 2.0.4
- compile
-
-
- org.apache.maven
- maven-plugin-descriptor
- 2.0.4
- compile
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- 1.1-incubating
- compile
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-tools
- ${sdo.version}
- compile
-
-
-
-
-
-
- maven-jar-plugin
-
-
-
- 1.4
- 1.4
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.1
-
-
-
- ${project.artifactId}
- ${project.name}
- ${project.organization.name}
- ${version}
- ${project.artifactId}
- ${project.organization.name}
- org.apache
- ${project.version}
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java b/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
deleted file mode 100644
index 87323cb495..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.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 org.apache.tuscany.sdo.plugin;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginExecution;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.project.MavenProject;
-import org.apache.tuscany.sdo.generate.JavaGenerator;
-import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
-
-/**
- * @version $Rev$ $Date$
- * @goal generate
- * @phase generate-sources
- * @description Generate SDO interface classes from an XML Schema
- */
-public class GeneratorMojo extends AbstractMojo {
- /**
- * The directory containing schema files; defaults to
- * ${basedir}/src/main/xsd
- *
- * @parameter expression="${basedir}/src/main/xsd"
- */
- private String schemaDir;
-
- /**
- * Name of the schema file; if omitted all files in the directory are
- * processed
- *
- * @parameter
- */
- private File schemaFile;
-
- /**
- * The Java package to generate into. By default the value is derived from
- * the schema URI.
- *
- * @parameter
- */
- private String javaPackage;
-
- /**
- * The directory to generate into; defaults to
- * ${project.build.directory}/sdo-source
- *
- * @parameter expression="${project.build.directory}/sdo-source"
- */
- private String targetDirectory;
-
- /**
- * Specifies the prefix string to use for naming the generated factory.
- *
- * @parameter
- */
- private String prefix;
-
- /**
- * This option can be used to eliminate the generated interface and to
- * generate only an implementation class.
- *
- * @parameter
- */
- private Boolean noInterfaces;
-
- /**
- * Turns off container management for containment properties.
- *
- * @parameter
- */
- private Boolean noContainment;
-
- /**
- * This option eliminates all change notification overhead in the generated
- * classes.
- *
- * @parameter
- */
- private Boolean noNotification;
-
- /**
- * With this option, all generated properties will not record their unset
- * state.
- *
- * @parameter
- */
- private Boolean noUnsettable;
-
- /**
- * Generate a fast XML parser/loader for instances of the model.
- *
- * @parameter
- */
- private Boolean generateLoader;
-
- /**
- * Generate a Switch class for the model.
- *
- * @parameter
- */
- private Boolean generateSwitch;
-
- /**
- * @parameter expression="${project}"
- * @required
- */
- private MavenProject project;
-
- /**
- * @parameter expression="${plugin.mojos}"
- */
- private List mojos;
-
- /**
- * With this option, generated interfaces will extend
- * commonj.sdo.DataObject.
- *
- * @parameter
- */
- private Boolean interfaceDataObject;
-
- /**
- * Support for generating multiple schema files.
- *
- * @parameter
- */
- private SchemaFileOption[] schemaFiles;
-
- /**
- * The namespace to generate Java codes from.
- * Setting to "all" will generate all namespaces.
- *
- * @parameter
- */
- private String schemaNamespace;
-
- public void execute() throws MojoExecutionException {
-
- // check for schemaFiles parameter first, if properties are not set, use
- // global property
- if (null != schemaFiles) {
- for (int i = 0; i < schemaFiles.length; ++i) {
- SchemaFileOption sf = schemaFiles[i];
-
- if (null == sf.getTargetDirectory()) {
- sf.setTargetDirectory(targetDirectory);
- }
- if (null == sf.getJavaPackage()) {
- sf.setJavaPackage(javaPackage);
- }
- if (null == sf.getSchemaNamespace()) {
- sf.setSchemaNamespace(schemaNamespace);
- }
- if (null == sf.isNoInterfaces()) {
- sf.setNoInterfaces(noInterfaces);
- }
- if (null == sf.isNoContainment()) {
- sf.setNoContainment(noContainment);
- }
- if (null == sf.isNoNotification()) {
- sf.setNoNotification(noNotification);
- }
- if (null == sf.isNoUnsettable()) {
- sf.setNoUnsettable(noUnsettable);
- }
- if (null == sf.isGenerateLoader()) {
- sf.setGenerateLoader(generateLoader);
- }
- if (null == sf.isGenerateSwitch()) {
- sf.setGenerateSwitch(generateSwitch);
- }
- // if (null == sf.getCompilerSourceRoots()) {
- // sf.setCompilerSourceRoots(compileSourceRoots);
- // }
- if (null == sf.isInterfaceDataObject()) {
- sf.setInterfaceDataObject(interfaceDataObject);
- }
- if (sf.getFileName() == null || sf.getFileName().length() == 0) {
- throw new MojoExecutionException("no fileName specfied for schema.");
- }
- if (!sf.getFileName().canRead() || !sf.getFileName().isFile()) {
-
- throw new MojoExecutionException("file can not be read:" + sf.getFileName());
- }
- }
- } else {
-
- if (schemaFile == null) {
- File[] files = new File(schemaDir).listFiles(FILTER);
- schemaFiles = new SchemaFileOption[files.length];
- for (int i = files.length - 1; i > -1; --i) {
- schemaFiles[i] = new SchemaFileOption();
- schemaFiles[i].setFileName(files[i]);
- schemaFiles[i].setJavaPackage(javaPackage);
- // schemaFiles[i].setCompilerSourceRoots(compileSourceRoots);
- schemaFiles[i].setGenerateLoader(generateLoader);
- schemaFiles[i].setGenerateSwitch(generateSwitch);
- schemaFiles[i].setNoContainment(noContainment);
- schemaFiles[i].setInterfaceDataObject(interfaceDataObject);
- schemaFiles[i].setNoInterfaces(noInterfaces);
- schemaFiles[i].setNoNotification(noNotification);
- schemaFiles[i].setNoUnsettable(noUnsettable);
- schemaFiles[i].setPrefix(prefix);
- schemaFiles[i].setTargetDirectory(targetDirectory);
- schemaFiles[i].setSchemaNamespace(schemaNamespace);
- }
- } else {
- schemaFiles = new SchemaFileOption[] {new SchemaFileOption()};
- schemaFiles[0].setFileName(schemaFile);
- schemaFiles[0].setJavaPackage(javaPackage);
- // schemaFiles[0].setCompilerSourceRoots(compileSourceRoots);
- schemaFiles[0].setGenerateLoader(generateLoader);
- schemaFiles[0].setGenerateSwitch(generateSwitch);
- schemaFiles[0].setNoContainment(noContainment);
- schemaFiles[0].setInterfaceDataObject(interfaceDataObject);
- schemaFiles[0].setNoInterfaces(noInterfaces);
- schemaFiles[0].setNoNotification(noNotification);
- schemaFiles[0].setNoUnsettable(noUnsettable);
- schemaFiles[0].setPrefix(prefix);
- schemaFiles[0].setTargetDirectory(targetDirectory);
- schemaFiles[0].setSchemaNamespace(schemaNamespace);
- }
- }
-
- for (int i = 0; i < schemaFiles.length; i++) {
- File file = schemaFiles[i].getFileName();
- File marker = new File(schemaFiles[i].getTargetDirectory(), ".gen#" + file.getName());
- if (file.lastModified() > marker.lastModified()) {
- getLog().info("Generating SDO interfaces from " + file);
-
- int genOptions = 0;
-
- if (schemaFiles[i].isNoInterfaces() != null && schemaFiles[i].isNoInterfaces().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_NO_INTERFACES;
- }
- if (schemaFiles[i].isNoContainment() != null && schemaFiles[i].isNoContainment().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_NO_CONTAINMENT;
- }
- if (schemaFiles[i].isNoNotification() != null && schemaFiles[i].isNoNotification().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_NO_NOTIFICATION;
- }
- if (schemaFiles[i].isGenerateLoader() != null && schemaFiles[i].isGenerateLoader().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_GENERATE_LOADER;
- }
- if (schemaFiles[i].isNoUnsettable() != null && schemaFiles[i].isNoUnsettable().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_NO_UNSETTABLE;
- }
- if (schemaFiles[i].isGenerateSwitch() != null && schemaFiles[i].isGenerateSwitch().booleanValue()) {
- genOptions |= JavaGenerator.OPTION_GENERATE_SWITCH;
- }
- if (schemaFiles[i].isInterfaceDataObject() != null && schemaFiles[i].isInterfaceDataObject()
- .booleanValue()) {
- genOptions |= JavaGenerator.OPTION_INTERFACE_DO;
- }
-
- XSD2JavaGenerator.generateFromXMLSchema(file.toString(),
- schemaFiles[i].getSchemaNamespace(),
- schemaFiles[i].getTargetDirectory(),
- schemaFiles[i].getJavaPackage(),
- schemaFiles[i].getPrefix(),
- genOptions);
- }
- try {
- marker.createNewFile();
- } catch (IOException e) {
- throw new MojoExecutionException(e.getMessage() + "'" + marker.getAbsolutePath() + "'", e);
- }
- marker.setLastModified(System.currentTimeMillis());
- }
-
- targetDirectory = targetDirectory.replace('/', File.separatorChar);
-
- // FIXME: [rfeng] Workaround to figure out the current execution phase
- MojoDescriptor descriptor = (MojoDescriptor)mojos.get(0);
- PluginDescriptor pluginDescriptor = descriptor.getPluginDescriptor();
- Map pluginMap = project.getBuild().getPluginsAsMap();
- Plugin plugin = (Plugin)pluginMap.get(pluginDescriptor.getGroupId() + ":" + pluginDescriptor.getArtifactId());
- // How to get the current execution id?
- for (Iterator i = plugin.getExecutions().iterator(); i.hasNext();) {
- PluginExecution execution = (PluginExecution)i.next();
- String phase = execution.getPhase();
- if (phase != null && phase.indexOf("-test-") != -1) {
- project.addTestCompileSourceRoot(targetDirectory);
- } else {
- project.addCompileSourceRoot(targetDirectory);
- }
- }
- }
-
- private static final FileFilter FILTER = new FileFilter() {
- public boolean accept(File pathname) {
- return (pathname.isFile() || !pathname.isHidden());
- }
- };
-}
diff --git a/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java b/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java
deleted file mode 100644
index ff3db1145f..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java
+++ /dev/null
@@ -1,208 +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.plugin;
-
-import java.io.File;
-
-public class SchemaFileOption {
-
- /**
- * Name of the schema file
- *
- * @parameter
- */
- private File fileName;
-
- /**
- * The Java package to generate into. By default the value is derived from the schema URI.
- *
- * @parameter
- */
- private String javaPackage;
-
- /**
- * The directory to generate into; defaults to ${project.build.directory}/sdo-source
- *
- * @parameter expression="${project.build.directory}/sdo-source"
- */
- private String targetDirectory;
-
- /**
- * Specifies the prefix string to use for naming the generated factory.
- *
- * @parameter
- */
- private String prefix;
-
- /**
- * This option can be used to eliminate the generated interface and to generate only an implementation class.
- *
- * @parameter
- */
- private Boolean noInterfaces;
-
- /**
- * Turns off container management for containment properties.
- *
- * @parameter
- */
- private Boolean noContainment;
-
- /**
- * This option eliminates all change notification overhead in the generated classes.
- *
- * @parameter
- */
- private Boolean noNotification;
-
- /**
- * With this option, all generated properties will not record their unset state.
- *
- * @parameter
- */
- private Boolean noUnsettable;
-
- /**
- * Generate a fast XML parser/loader for instances of the model.
- *
- * @parameter
- */
- private Boolean generateLoader;
-
- /**
- * Generate a Switch class for the model.
- *
- * @parameter
- */
- private Boolean generateSwitch;
-
- /**
- * With this option, generated interfaces will extend commonj.sdo.DataObject.
- *
- * @parameter
- */
- private Boolean interfaceDataObject;
-
- /**
- * The namespace to generate Java codes from.
- * Setting to "all" will generate all namespaces.
- */
- private String schemaNamespace;
-
- public SchemaFileOption() {
- }
-
- public Boolean isGenerateLoader() {
- return generateLoader;
- }
-
- public void setGenerateLoader(Boolean generateLoader) {
- this.generateLoader = generateLoader;
- }
-
- public Boolean isGenerateSwitch() {
- return generateSwitch;
- }
-
- public void setGenerateSwitch(Boolean generateSwitch) {
- this.generateSwitch = generateSwitch;
- }
-
- public String getJavaPackage() {
- return javaPackage;
- }
-
- public void setJavaPackage(String javaPackage) {
- this.javaPackage = javaPackage;
- }
-
- public Boolean isNoContainment() {
- return noContainment;
- }
-
- public void setNoContainment(Boolean noContainment) {
- this.noContainment = noContainment;
- }
-
- public Boolean isNoInterfaces() {
- return noInterfaces;
- }
-
- public void setNoInterfaces(Boolean noInterfaces) {
- this.noInterfaces = noInterfaces;
- }
-
- public Boolean isNoNotification() {
- return noNotification;
- }
-
- public void setNoNotification(Boolean noNotification) {
- this.noNotification = noNotification;
- }
-
- public Boolean isNoUnsettable() {
- return noUnsettable;
- }
-
- public void setNoUnsettable(Boolean noUnsettable) {
- this.noUnsettable = noUnsettable;
- }
-
- public String getPrefix() {
- return prefix;
- }
-
- public void setPrefix(String prefix) {
- this.prefix = prefix;
- }
-
- public String getTargetDirectory() {
- return targetDirectory;
- }
-
- public void setTargetDirectory(String targetDirectory) {
- this.targetDirectory = targetDirectory;
- }
-
- public File getFileName() {
- return fileName;
- }
-
- public void setFileName(File fileName) {
- this.fileName = fileName;
- }
-
- public Boolean isInterfaceDataObject() {
- return interfaceDataObject;
- }
-
- public void setInterfaceDataObject(Boolean interfaceDataObject) {
- this.interfaceDataObject = interfaceDataObject;
- }
-
- public String getSchemaNamespace() {
- return schemaNamespace;
- }
-
- public void setSchemaNamespace(String schemaNamespace) {
- this.schemaNamespace = schemaNamespace;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/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.1.1-incubating/plugin/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/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.1.1-incubating/plugin/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9f9572a167..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/plugin/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/pom.xml b/branches/sdo-1.1.1-incubating/pom.xml
deleted file mode 100644
index c8f72c197e..0000000000
--- a/branches/sdo-1.1.1-incubating/pom.xml
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
- 4.0.0
-
- org.apache.tuscany
- parent
- 2-incubating
-
- org.apache.tuscany.sdo
- tuscany-sdo
- pom
- Apache Tuscany SDO Implementation Project
- 1.1.1-incubating-SNAPSHOT
-
-
- scm:svn:http://svn.apache.org/repos/asf/incubator/tuscany/java/sdo
- scm:svn:https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo
- http://svn.apache.org/repos/asf/incubator/tuscany/java/sdo
-
-
-
-
- apache.snapshots
- Apache Snapshot Repository
- http://people.apache.org/repo/m2-snapshot-repository
-
- false
-
-
- true
-
-
-
- apache.incubator
- Apache Incubator Repository
- http://people.apache.org/repo/m2-incubating-repository/
-
- true
-
-
- false
-
-
-
-
-
-
- indiana
- http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/maven2/
-
- true
-
-
-
-
-
- 2.1
- 2.2.3
- 1.1.1-incubating-SNAPSHOT
-
-
-
-
- default
-
- true
-
-
- sdo-api
- lib
- impl
- tools
- plugin
- sample
- java5tools
-
-
-
-
- distribution
-
- sdo-api
- lib
- impl
- tools
- plugin
- sample
- distribution
- java5tools
-
-
-
-
- eclipse
-
- sdo-api
- lib
- impl
- plugin
- tools
- sample
- java5tools
-
-
-
-
- java_1_4_maven
-
- 1.4
-
-
-
- sdo-api
- lib
- impl
- tools
- plugin
- sample
- distribution
-
-
-
-
-
- install
-
-
-
- src/main/resources
- true
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.4
- 1.4
-
-
-
- org.apache.maven.plugins
- 2.3
- maven-surefire-plugin
-
- -Djava.endorsed.dirs=${endorsed.dirs}
-
- **/*TestCase.java
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- 2.2-beta-2
-
-
- sdo.xml
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
- true
- 2.0
- 1.4
-
-
-
-
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- ${version}
- compile
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/pom.xml b/branches/sdo-1.1.1-incubating/sample/pom.xml
deleted file mode 100644
index 397fd30d58..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/pom.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
-
-
- 4.0.0
- sample-sdo
- jar
- Tuscany SDO Sample
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- ${sdo.version}
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-impl
- ${sdo.version}
- compile
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-lib
- ${sdo.version}
- compile
-
-
-
- stax
- stax-api
- 1.0.1
-
-
-
- org.codehaus.woodstox
- wstx-asl
- 3.2.1
- test
-
-
-
-
-
- src/main/java
-
-
- src/main/java
-
-
- src/main/resources
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
- ${basedir}/src/main/java/org/apache/tuscany/samples/sdo/overview.html
- *.internal
- 2.0
-
-
-
- package
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- org.apache.tuscany.samples.sdo.ExecuteSamples
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java
deleted file mode 100644
index 02bce0efe6..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/ExecuteSamples.java
+++ /dev/null
@@ -1,100 +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.samples.sdo;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-
-/**
- * A program to execute a sequence of SDO sample programs. The program executes
- * the sample programs listed in the {@link SampleInfrastructure#sampleClasses sample classes}
- * static constant. These samples are executed in roughly increasing order of complexity.
- * You can edit the {@link #pauseBetweenSamples}, {@link #runSamplesUpToLevel} and
- * {@link #constructorArgs} variables to change the way this program executes the samples.
- *
- *
- * Each of the samples creates text output to the console. If the commentary
- * level in {@link #constructorArgs the sample program constructor arguments}
- * used to construct each sample is set to
- * {@link SampleInfrastructure#COMMENTARY_FOR_NOVICE COMMENTARY_FOR_NOVICE} then there
- * will be much more output than if set to one of the other values.
- *
- */
-public class ExecuteSamples extends SampleBase {
-
- /**
- * Edit this value to cause the program to pause between each sample program
- * and wait for the user to hit the enter key.
- */
- private static final boolean pauseBetweenSamples = true;
-
- /**
- * By default run all samples from novice level right up to advanced level.
- * Edit this to run fewer samples.
- */
- private static final int runSamplesUpToLevel = SampleInfrastructure.SAMPLE_LEVEL_ADVANCED.intValue();
-
- /**
- * Edit the value of this argument to one of COMMENTARY_FOR_NOVICE, COMMENTARY_FOR_INTERMEDIATE or COMMENTARY_FOR_ADVANCED to see
- * more or less commentary. Note, this value only controls the level of commentary,
- * not which samples are executed. Use it to filter out the noise if you have already
- * understood the more basic commentary.
- */
- private static final Object[] constructorArgs = { SampleInfrastructure.COMMENTARY_FOR_NOVICE };
-
-
- public static void main(String [] args) throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, IOException {
- ExecuteSamples sample = new ExecuteSamples(COMMENTARY_FOR_NOVICE);
- sample.run();
- }
-
- public ExecuteSamples(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_BASIC);
- }
-
- public void runSample() throws Exception {
- Class[] constructorArgTypes = { Integer.class };
-
-
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
-
- int sampleCount = 0;
- for (int i=0; i < SampleInfrastructure.sampleClasses.length; i++) {
- Constructor c = SampleInfrastructure.sampleClasses[i].getConstructor(constructorArgTypes);
- SampleBase sample = (SampleBase)c.newInstance(constructorArgs);
- if(sample.getSampleComplexityLevel() <= runSamplesUpToLevel) {
- sample.run();
- sampleCount++;
- if(pauseBetweenSamples) {
- System.out.println(">>>Press Enter to continue");
- in.readLine();
- }
- }
- }
- System.out.println("Ran " + sampleCount + " samples");
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleBase.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleBase.java
deleted file mode 100644
index 3b4aba2b42..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/SampleBase.java
+++ /dev/null
@@ -1,192 +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.samples.sdo;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * the base function for samples is split into two classes. This one is intended
- * to house all the interesting SDO utility methods, and the superclass houses
- * all the infrastructure that the SDO user isn't interested in inspecting.
- */
-public abstract class SampleBase extends SampleInfrastructure {
-
-
- public SampleBase()
- {
- super(COMMENTARY_FOR_NOVICE);
- }
-
-
- public SampleBase(Integer commentaryLevel, Integer sampLevel) {
- super(commentaryLevel, sampLevel);
- }
-
- protected HelperContext createScopeForTypes() {
- commentary(
- COMMENTARY_FOR_NOVICE,
- "All MetaData for SDO types can be viewed as being scoped within an instance of HelperContext\n" +
- "The Helper Context instance provides access to a collection of other helpers\n" +
- "that you will see exercised in the SDO samples\n" +
- "All the Helpers related to a given helper context instance know about the same set of types\n\n" +
- "The SDO specification doesn't state how an SDO implementation should create a HelperContext\n" +
- "So we use a Tuscany specific API to do this ...\n\n" +
- "HelperContext scope = SDOUtil.createHelperContext();",
-
- "Creating a new HelperContext scope for types for the next sample run as we did in previous samples"
- );
-
- HelperContext scope = SDOUtil.createHelperContext();
- return scope;
- }
-
- protected HelperContext useDefaultScopeForTypes() {
- commentary(
- COMMENTARY_FOR_NOVICE,
- "All MetaData for SDO types can be viewed as being held in an instance of HelperContext\n" +
- "The Helper Context instance provides access to a collection of other helpers\n" +
- "that you will see exercised in the SDO samples\n" +
- "All the Helpers related to a given helper context instance know about the same set of types\n\n" +
- "For most cases it's best to take control of the type scope by creating a new HelperContext,\n" +
- "but a default helper context is provided and can be accessed using ...\n\n" +
- "HelperContext scope = HelperProvider.getDefaultContext();\n\n" +
- "A case in point where the default scope must be used is when using some of the DataGraph APIs\n" +
- "which don't all support the type scoping extensions which were introduced in the SDO 2.1 specification",
-
- "Retrieving the default HelperContext scope for types for the next sample run as we saw in a previous sample"
- );
-
- HelperContext scope = HelperProvider.getDefaultContext();
- return scope;
- }
-
-
- protected void loadTypesFromXMLSchemaFile(HelperContext scope, String fileName) {
- commentary(COMMENTARY_FOR_NOVICE,
- "If you want to create types dynamically by loading an XML schema you\n" +
- "use an instance of XSDHelper. You get that helper from a HelperContext.\n" +
- "After successful loading of a schema, the new types are available to every\n" +
- "other helper belonging to the HelperContext instance\n\n" +
- "XSDHelper xsdHelper = scope.getXSDHelper();\n"+
- "xsdHelper.define(inputStream, null);",
-
- "Using an XSDHelper again to create types from an XML schema file as we saw in a previous sample"
- );
-
- XSDHelper xsdHelper = scope.getXSDHelper();
-
- InputStream is = null;
- try {
-
- URL url = getClass().getResource("/"+fileName);
- is = url.openStream();
- xsdHelper.define(is, url.toString());
-
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- } finally {
- try {
- is.close();
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- }
- }
- }
-
- public DataObject getDataObjectFromFile(HelperContext scope, String filename)
- throws Exception {
-
-
- XMLDocument xmlDoc = getXMLDocumentFromFile(scope, filename);
- commentary(COMMENTARY_FOR_NOVICE,
- "An XMLDocument instance provides a wrapper for the root DataObject of a data graph\n" +
- "along with other aspects of the XML nature of the document\n\n"+
- "DataObject result = xmlDoc.getRootObject();",
-
- "Getting the root object from an XMLDocument as seen in previous samples"
- );
- DataObject result = xmlDoc.getRootObject();
-
- return result;
- }
-
- public XMLDocument getXMLDocumentFromFile(HelperContext scope,
- String filename) throws Exception {
-
- XMLDocument result = null;
- InputStream is = null;
-
- try {
- commentary(COMMENTARY_FOR_NOVICE,
- "The XMLHelper can be used to create an SDO XMLDocument instance from a file\n\n"+
- "inputStream = ClassLoader.getSystemResourceAsStream(filename);\n"+
- "result = scope.getXMLHelper().load(is);",
-
- "Getting an XMLDocument instance from an XML file as seen in previous samples"
- );
- is = ClassLoader.getSystemResourceAsStream(filename);
- result = scope.getXMLHelper().load(is);
-
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- } finally {
- try {
- is.close();
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- }
- }
-
- return result;
- }
-
- protected XMLDocument getXMLDocumentFromString(HelperContext scope, String xmlDoc) throws IOException {
- XMLDocument result = null;
- InputStream is = null;
-
-
- commentary(COMMENTARY_FOR_NOVICE,
- "The XMLHelper can be used to create an SDO XMLDocument instance from an\n\n"+
- "inputStream = new ByteArrayInputStream(xmlDoc.getBytes());\n"+
- "result = scope.getXMLHelper().load(is);",
-
- "Getting an XMLDocument instance from an XML file as seen in previous samples"
- );
-
- is = new ByteArrayInputStream(xmlDoc.getBytes());
- result = scope.getXMLHelper().load(is);
-
- return result;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java
deleted file mode 100644
index 916fe9405c..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenario.java
+++ /dev/null
@@ -1,424 +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.samples.sdo.advanced;
-
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * This sample is based on a 2 part article by Kelvin Goodson and Geoffrey Winn.
- * See Part1 and Part 2 of the article.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class MedicalScenario extends SampleBase {
-
- private static final String sdoApiUri = "commonj.sdo";
-
- private static final String peopleURI = "www.example.org/people";
-
- private static final String medicalURI = "www.example.org/MedicalTest";
-
- boolean typesViaAPI = false;
-
- private static final String usage = " [-api |-xsd]\n"
- + " -api : define the types using the SDO API\n"
- + " -xsd : define the types using an XML schema file";
-
- public MedicalScenario(String[] args, Integer userLevel) {
-
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
-
- if (args.length > 1) {
- printUsage(args);
- System.exit(-1);
- }
- if (args.length == 1) {
- if (args[0].equals("-xsd")) {
- typesViaAPI = false;
- } else if (args[0].equals("-api")) {
- typesViaAPI = true;
- } else {
- printUsage(args);
- System.exit(-1);
- }
- }
- }
-
- public MedicalScenario(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
- }
-
-
- private void printUsage(String[] args) {
- System.out.println("Usage: " + this.getClass().getName() + usage);
- }
-
- /**
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) throws Exception {
-
- MedicalScenario s = new MedicalScenario(args, COMMENTARY_FOR_NOVICE);
- s.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.CONTAINMENT,
- SDOFacets.CREATE_TYPES_USING_THE_SDO_API,
- SDOFacets.CREATE_TYPES_USING_XML_SCHEMA,
- SDOFacets.OPEN_CONTENT,
- SDOFacets.NON_CONTAINMENT
- };
-
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.CREATE_DATAOBJECTS_BY_NAME,
- SDOFacets.ISMANY_PROPERTIES,
- SDOFacets.GENERIC_DATA_GRAPH_TRAVERSAL,
- SDOFacets.SAVING_DATA_TO_XML
- };
-
- public void runSample() throws Exception {
-
- HelperContext scope = SDOUtil.createHelperContext();
-
- if (typesViaAPI) {
-
- commentary("In this execution of the sample we use Types created\n"
- + "using the SDO API");
-
- createTypesViaAPI(scope);
-
- } else {
-
- commentary("In this execution of the sample we use Types created\n"
- + "by loading an XMLSchema");
-
- loadTypesFromXMLSchemaFile(scope, "MedicalTest.xsd");
-
- }
-
- commentary(
- COMMENTARY_FOR_NOVICE,
- "The DataFactory associated with the scope that the types were created within\n"
- + "can be used to create an instance of the Person Type\n\n"
- + "DataFactory dataFactory = scope.getDataFactory();\n"
- + "DataObject person1 = dataFactory.create(\"www.example.org/people\", \"Person\");");
-
- DataFactory dataFactory = scope.getDataFactory();
- DataObject person1 = dataFactory.create("www.example.org/people", "Person");
-
- commentary("The setString() of dataObject method is used to set the properties of the\n"
- + "new Person DataObject, including a unique identifier reference value\n"
- + "for the Person instance.\n\n"
- + "person1.setString(\"id\", \"1\");\n"
- + "person1.setString(\"name\", \"Joe Johnson Snr.\");\n"
- + "person1.setString(\"gender\", \"male\"););");
-
- person1.setString("id", "1");
- person1.setString("name", "Joe Johnson Snr.");
- person1.setString("gender", "male");
-
- commentary("An alternative approach to using the DataFactory directly to create\n"
- + "all DataObjects is to use a top-down approach, where we create the\n"
- + "root object for a data graph, and then use the createDataObject(String propertyName)\n"
- + "method to create the contained DataObjects. Here we create the overall\n"
- + "medical test DataObject, and then create the contained \"referrals\" DataObject\n\n"
- + "DataObject test = dataFactory.create(\"www.example.org/MedicalTest\", \"Test\");\n"
- + "DataObject referrals = test.createDataObject(\"referrals\");");
-
- DataObject test = dataFactory.create("www.example.org/MedicalTest", "Test");
- DataObject referrals = test.createDataObject("referrals");
-
- commentary("Now we can add the person we created earlier into the set of people who have\n"
- + "been referred for this medical test.\n\n"
- + "test.set(\"referrals\", referrals);\n"
- + "referrals.getList(\"person\").add(person1);");
-
- test.set("referrals", referrals);
- referrals.getList("person").add(person1);
-
- commentary("Let's take a look at how the current state of the data"
- + "graph is rendered in XML ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The scenario unfolds and the Joe Johnson Snr. becomes a patient\n\n"
- + "DataObject patients = test.createDataObject(\"patients\");\n"
- + "patients.getList(\"person\").add(person1);");
-
- DataObject patients = test.createDataObject("patients");
-
- patients.getList("person").add(person1);
-
- commentary("Having added Joe Johnson Snr. to the set of patients we can see\n"
- + "the way that SDO preserves a single containment hierarchy within a\n"
- + "datagraph. If we look at the XML rendering of the graph again, we will\n"
- + "see that by adding him to the set of patients he has been removed from the\n"
- + "containment property associated with the referrals set ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The 'Person' Type we are making use of here has been designed to be\n"
- + "multi-purpose, in that the type has been declared to be 'Open'.\n"
- + "That means that we can make use of 'Open Content' Properties\n"
- + "(If the type system has been defined using an XML schema\n"
- + "then these properties will derive from global elements)\n"
- + "We can look up open content Properties using the TypeHelper\n\n"
- + "Property conditionProperty = scope.getTypeHelper().getOpenContentProperty(\n"
- + " \"www.example.org/MedicalTest\", \"condition\");");
-
- Property conditionProperty = scope.getTypeHelper().getOpenContentProperty(
- "www.example.org/MedicalTest", "condition");
-
- commentary("We can create a value of the appropriate Type for this open\n"
- + "content Property\n\n"
- + "DataObject condition = dataFactory.create(conditionProperty.getType());\n"
- + "condition.setString(\"name\", \"Panar Syndrome\");");
-
- DataObject condition = dataFactory.create(conditionProperty.getType());
- condition.setString("name", "Panar Syndrome");
-
- commentary("If you ask a DataObject that has an 'Open' Type for its list of\n"
- + "values associated with an open content Property, and the DataObject\n"
- + "doesn't currently have any values for the Property, it will return\n"
- + "an empty list. We can use the list to add values for the Property\n\n"
- + "List conditions = person1.getList(conditionProperty);\n"
- + "conditions.add(condition);");
-
- List conditions = person1.getList(conditionProperty);
- conditions.add(condition);
-
- commentary("A further look at the data graph in XML form shows\n"
- + "the presence of the new condition Property's value ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("Having looked at the way SDO handles Open content\n"
- + "We now turn our attention to 'non-containment' relationships.\n"
- + "To do this we first create the set of people in the test that\n"
- + "constitute the blood relatives of patients -- 'relatives'\n"
- + "and define a new person to be Joe Johnson Snr's child.\n\n"
- + "DataObject relatives = test.createDataObject(\"relatives\");\n"
- + "DataObject person2 = relatives.createDataObject(\"person\");\n"
- + "person2.setString(\"id\", \"2\");\n"
- + "person2.setString(\"name\", \"Joe Johnson Jnr.\");\n"
- + "person2.setString(\"gender\", \"male\");");
-
- DataObject relatives = test.createDataObject("relatives");
- DataObject person2 = relatives.createDataObject("person");
-
- person2.setString("id", "2");
- person2.setString("name", "Joe Johnson Jnr.");
- person2.setString("gender", "male");
-
- commentary("Another quick look at the XML rendering of the graph confirms that\n"
- + "the set of relatives now includes Joe Johnson Jnr, but we haven't yet\n"
- + "defined who he is related to, or how.");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The Person type has a Property 'relative'\n"
- + "so we create a relative for Joe Johnson Snr.\n\n"
- + "DataObject relation = person1.createDataObject(\"relative\");\n"
- + "relation.set(\"target\", person2);\n"
- + "relation.set(\"relationship\", \"child\");");
-
- DataObject relation = person1.createDataObject("relative");
- relation.set("target", person2);
- relation.set("relationship", "child");
-
- commentary("Now when we look at the XML rendering of the data graph\n"
- + "we can see that the action of setting the 'target' of the\n"
- + "relationship to Joe Johnson Jnr didn't displace him from the\n"
- + "set of 'relatives', because the 'target' Property is a\n"
- + "non-containment Property. This non-containment relationship\n"
- + "is reflected in the XML by a reference to the Person DataObject\n"
- + "describing Joe Johnson Jnr, \"2\" ...\n"
- + "If the Type system has been created from an XML schema then the\n"
- + "unique ID of the target can be used in the serialization.\n"
- + "If however the type system was defined dynamically, then the reference\n"
- + "will be represented as an XPath from the root of the data graph.");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("Now that the graph is complete we can use the PrintDataGraph sample utility\n" +
- "to reveal the full SDO nature of the final data graph\n\n" +
- "");
-
- PrintDataGraph printer = new PrintDataGraph(COMMENTARY_FOR_ADVANCED);
- printer.printDataObject(test);
- System.out.println(printer.getBuf());
- }
-
- /**
- * @throws Exception
- * @throws FileNotFoundException
- */
- private void createTypesViaAPI(HelperContext scope) throws Exception {
-
- List typeDeclarations = new ArrayList();
-
- TypeHelper typeHelper = scope.getTypeHelper();
-
- Type stringType = typeHelper.getType(sdoApiUri, "String");
- Type dateType = typeHelper.getType(sdoApiUri, "Date");
- Type booleanType = typeHelper.getType(sdoApiUri, "Boolean");
-
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
- DataObject personTypeDesc = createTypeDescription(scope, peopleURI,
- "Person");
- typeDeclarations.add(personTypeDesc);
-
- addPropertyDescription(personTypeDesc, stringType, "name");
- addPropertyDescription(personTypeDesc, dateType, "dob");
- addPropertyDescription(personTypeDesc, stringType, "id"); // set to unique
- // identifier?
- addPropertyDescription(personTypeDesc, stringType, "gender"); // restrict?
-
- DataObject relativeType = createTypeDescription(scope, peopleURI,
- "Relative"); // forward declare the Relative type
- typeDeclarations.add(relativeType);
-
- DataObject rp = addPropertyDescription(personTypeDesc, relativeType,
- "relative");
- rp.setBoolean("many", true);
- personTypeDesc.set("open", Boolean.TRUE);
-
- //
- //
- //
- //
- //
-
- addPropertyDescription(relativeType, stringType, "relationship");
- addPropertyDescription(relativeType, booleanType, "genetic");
- DataObject targetPersonProp = addPropertyDescription(relativeType,
- personTypeDesc, "target");
- targetPersonProp.setBoolean("containment", false);
-
- //
- //
- //
- //
- //
-
- DataObject pSet = createTypeDescription(scope, peopleURI, "PersonSet");
- typeDeclarations.add(pSet);
- DataObject pSetProperty = addPropertyDescription(pSet, personTypeDesc,
- "person");
- pSetProperty.setBoolean("many", true);
-
- //
- //
- //
- //
- //
- //
-
- DataObject condition = createTypeDescription(scope, medicalURI, "Condition");
- typeDeclarations.add(condition);
- addPropertyDescription(condition, booleanType, "diagnosed");
- addPropertyDescription(condition, stringType, "name"); // constrain?
-
- //
- //
- //
- //
- //
- //
- //
-
- DataObject testType = createTypeDescription(scope, medicalURI, "Test");
- typeDeclarations.add(testType);
- addPropertyDescription(testType, pSet, "referrals");
- addPropertyDescription(testType, pSet, "patients");
- addPropertyDescription(testType, pSet, "relatives");
-
- List types = typeHelper.define(typeDeclarations);
-
- DataObject p = scope.getDataFactory().create("commonj.sdo", "Property");
- p.set("type", typeHelper.getType(medicalURI, "Condition"));
- p.set("name", "condition");
- p.setBoolean("many", true);
- p.setBoolean("containment", true); // why is this not the default?
-
- typeHelper.defineOpenContentProperty(medicalURI, p);
-
- }
-
- /**
- * @param uri
- * @param name
- * @return
- */
- private DataObject createTypeDescription(HelperContext scope, String uri,
- String name) {
- DataObject typeDesc = scope.getDataFactory().create(sdoApiUri, "Type");
- typeDesc.set("name", name);
- typeDesc.set("uri", uri);
- return typeDesc;
- }
-
- private DataObject addPropertyDescription(
- DataObject containerTypeDescription, Object propertyType,
- String propertyName) {
- DataObject property = containerTypeDescription.createDataObject("property");
- property.set("type", propertyType);
- property.setString("name", propertyName);
- property.setBoolean("containment", true);
- return property;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenarioWithChangeMonitoring.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenarioWithChangeMonitoring.java
deleted file mode 100644
index 32d63f4335..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/MedicalScenarioWithChangeMonitoring.java
+++ /dev/null
@@ -1,449 +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.samples.sdo.advanced;
-
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * This sample is based on a 2 part article by Kelvin Goodson and Geoffrey Winn.
- * In this variant of the sample the model for the test includes change monitoring.
- * The facility for undoing changes on the basis of the change monitoring is
- * demonstrated.
- * See Part1 and Part 2 of the article.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class MedicalScenarioWithChangeMonitoring extends SampleBase {
-
- private static final String sdoApiUri = "commonj.sdo";
-
- private static final String peopleURI = "www.example.org/people";
-
- private static final String medicalURI = "www.example.org/MedicalTest";
-
- boolean typesViaAPI = false;
-
- private static final String usage = " [-api |-xsd]\n"
- + " -api : define the types using the SDO API\n"
- + " -xsd : define the types using an XML schema file";
-
- public MedicalScenarioWithChangeMonitoring(String[] args, Integer userLevel) {
-
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
-
- if (args.length > 1) {
- printUsage(args);
- System.exit(-1);
- }
- if (args.length == 1) {
- if (args[0].equals("-xsd")) {
- typesViaAPI = false;
- } else if (args[0].equals("-api")) {
- typesViaAPI = true;
- } else {
- printUsage(args);
- System.exit(-1);
- }
- }
- }
-
- public MedicalScenarioWithChangeMonitoring(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
- }
-
-
- private void printUsage(String[] args) {
- System.out.println("Usage: " + this.getClass().getName() + usage);
- }
-
- /**
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) throws Exception {
-
- MedicalScenarioWithChangeMonitoring s = new MedicalScenarioWithChangeMonitoring(args, COMMENTARY_FOR_NOVICE);
- s.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.CONTAINMENT,
- SDOFacets.CREATE_TYPES_USING_THE_SDO_API,
- SDOFacets.CREATE_TYPES_USING_XML_SCHEMA,
- SDOFacets.OPEN_CONTENT,
- SDOFacets.NON_CONTAINMENT,
- SDOFacets.CHANGE_MONITORING_USING_A_CHANGESUMMARY_PROPERTY_ON_A_DATAOBJECT
- };
-
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.CREATE_DATAOBJECTS_BY_NAME,
- SDOFacets.ISMANY_PROPERTIES,
- SDOFacets.GENERIC_DATA_GRAPH_TRAVERSAL,
- SDOFacets.SAVING_DATA_TO_XML
- };
-
- public void runSample() throws Exception {
-
- HelperContext scope = SDOUtil.createHelperContext();
-
- if (typesViaAPI) {
-
- commentary("In this execution of the sample we use Types created\n"
- + "using the SDO API");
-
- createTypesViaAPI(scope);
-
- } else {
-
- commentary("In this execution of the sample we use Types created\n"
- + "by loading a variant of the XMLSchema that includes a change summary Property");
-
- loadTypesFromXMLSchemaFile(scope, "MedicalTest_CS.xsd");
-
- }
-
- commentary(
- COMMENTARY_FOR_NOVICE,
- "The DataFactory associated with the scope that the types were created within\n"
- + "can be used to create an instance of the Person Type\n\n"
- + "DataFactory dataFactory = scope.getDataFactory();\n"
- + "DataObject person1 = dataFactory.create(\"www.example.org/people\", \"Person\");");
-
- DataFactory dataFactory = scope.getDataFactory();
- DataObject person1 = dataFactory.create("www.example.org/people", "Person");
-
- commentary("The setString() of dataObject method is used to set the properties of the\n"
- + "new Person DataObject, including a unique identifier reference value\n"
- + "for the Person instance.\n\n"
- + "person1.setString(\"id\", \"1\");\n"
- + "person1.setString(\"name\", \"Joe Johnson Snr.\");\n"
- + "person1.setString(\"gender\", \"male\"););");
-
- person1.setString("id", "1");
- person1.setString("name", "Joe Johnson Snr.");
- person1.setString("gender", "male");
-
- commentary("An alternative approach to using the DataFactory directly to create\n"
- + "all DataObjects is to use a top-down approach, where we create the\n"
- + "root object for a data graph, and then use the createDataObject(String propertyName)\n"
- + "method to create the contained DataObjects. Here we create the overall\n"
- + "medical test DataObject, and then create the contained \"referrals\" DataObject\n\n"
- + "DataObject test = dataFactory.create(\"www.example.org/MedicalTest\", \"Test\");\n"
- + "DataObject referrals = test.createDataObject(\"referrals\");");
-
- DataObject test = dataFactory.create("www.example.org/MedicalTest", "Test");
-
- DataObject referrals = test.createDataObject("referrals");
-
- commentary("The default state for monitoring changes for the DataObject when created in this\n" +
- "way is the monitoring is switched off, so we switch it on. (Note that if you\n" +
- "get your data graphs from a data Access Service then this service may turn on\n" +
- "change monitoring be default\n\n" +
- "test.getChangeSummary().beginLogging();");
- test.getChangeSummary().beginLogging();
-
- commentary("We'll repeat the whole of the MedicalScenario sample, but then at the \n" +
- "last minute we'll decide it was all wrong and roll back the changes......");
-
- commentary("Now we can add the person we created earlier into the set of people who have\n"
- + "been referred for this medical test.\n\n"
- + "test.set(\"referrals\", referrals);\n"
- + "referrals.getList(\"person\").add(person1);");
-
- test.set("referrals", referrals);
- referrals.getList("person").add(person1);
-
- commentary("Let's take a look at how the current state of the data"
- + "graph is rendered in XML ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The scenario unfolds and the Joe Johnson Snr. becomes a patient\n\n"
- + "DataObject patients = test.createDataObject(\"patients\");\n"
- + "patients.getList(\"person\").add(person1);");
-
- DataObject patients = test.createDataObject("patients");
-
- patients.getList("person").add(person1);
-
- commentary("Having added Joe Johnson Snr. to the set of patients we can see\n"
- + "the way that SDO preserves a single containment hierarchy within a\n"
- + "datagraph. If we look at the XML rendering of the graph again, we will\n"
- + "see that by adding him to the set of patients he has been removed from the\n"
- + "containment property associated with the referrals set ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The 'Person' Type we are making use of here has been designed to be\n"
- + "multi-purpose, in that the type has been declared to be 'Open'.\n"
- + "That means that we can make use of 'Open Content' Properties\n"
- + "(If the type system has been defined using an XML schema\n"
- + "then these properties will derive from global elements)\n"
- + "We can look up open content Properties using the TypeHelper\n\n"
- + "Property conditionProperty = scope.getTypeHelper().getOpenContentProperty(\n"
- + " \"www.example.org/MedicalTest\", \"condition\");");
-
- Property conditionProperty = scope.getTypeHelper().getOpenContentProperty(
- "www.example.org/MedicalTest", "condition");
-
- commentary("We can create a value of the appropriate Type for this open\n"
- + "content Property\n\n"
- + "DataObject condition = dataFactory.create(conditionProperty.getType());\n"
- + "condition.setString(\"name\", \"Panar Syndrome\");");
-
- DataObject condition = dataFactory.create(conditionProperty.getType());
- condition.setString("name", "Panar Syndrome");
-
- commentary("If you ask a DataObject that has an 'Open' Type for its list of\n"
- + "values associated with an open content Property, and the DataObject\n"
- + "doesn't currently have any values for the Property, it will return\n"
- + "an empty list. We can use the list to add values for the Property\n\n"
- + "List conditions = person1.getList(conditionProperty);\n"
- + "conditions.add(condition);");
-
- List conditions = person1.getList(conditionProperty);
- conditions.add(condition);
-
- commentary("A further look at the data graph in XML form shows\n"
- + "the presence of the new condition Property's value ...");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("Having looked at the way SDO handles Open content\n"
- + "We now turn our attention to 'non-containment' relationships.\n"
- + "To do this we first create the set of people in the test that\n"
- + "constitute the blood relatives of patients -- 'relatives'\n"
- + "and define a new person to be Joe Johnson Snr's child.\n\n"
- + "DataObject relatives = test.createDataObject(\"relatives\");\n"
- + "DataObject person2 = relatives.createDataObject(\"person\");\n"
- + "person2.setString(\"id\", \"2\");\n"
- + "person2.setString(\"name\", \"Joe Johnson Jnr.\");\n"
- + "person2.setString(\"gender\", \"male\");");
-
- DataObject relatives = test.createDataObject("relatives");
- DataObject person2 = relatives.createDataObject("person");
-
- person2.setString("id", "2");
- person2.setString("name", "Joe Johnson Jnr.");
- person2.setString("gender", "male");
-
- commentary("Another quick look at the XML rendering of the graph confirms that\n"
- + "the set of relatives now includes Joe Johnson Jnr, but we haven't yet\n"
- + "defined who he is related to, or how.");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("The Person type has a Property 'relative'\n"
- + "so we create a relative for Joe Johnson Snr.\n\n"
- + "DataObject relation = person1.createDataObject(\"relative\");\n"
- + "relation.set(\"target\", person2);\n"
- + "relation.set(\"relationship\", \"child\");");
-
- DataObject relation = person1.createDataObject("relative");
- relation.set("target", person2);
- relation.set("relationship", "child");
-
- commentary("Now when we look at the XML rendering of the data graph\n"
- + "we can see that the action of setting the 'target' of the\n"
- + "relationship to Joe Johnson Jnr didn't displace him from the\n"
- + "set of 'relatives', because the 'target' Property is a\n"
- + "non-containment Property. This non-containment relationship\n"
- + "is reflected in the XML by a reference to the Person DataObject\n"
- + "describing Joe Johnson Jnr, \"2\" ...\n"
- + "If the Type system has been created from an XML schema then the\n"
- + "unique ID of the target can be used in the serialization.\n"
- + "If however the type system was defined dynamically, then the reference\n"
- + "will be represented as an XPath from the root of the data graph.");
-
- System.out.println(scope.getXMLHelper().save(test,
- "www.example.org/MedicalTest", "test"));
-
- commentary("Now that the graph is complete we can use the PrintDataGraph sample utility\n" +
- "to reveal the full SDO nature of the final data graph\n\n" +
- "");
-
- PrintDataGraph printer = new PrintDataGraph(COMMENTARY_FOR_ADVANCED);
- printer.printDataObject(test);
- System.out.println(printer.getBuf());
-
- commentary("But Wait! it's all wrong. Let's go back to our checkpoint where we started monitoring changes\n\n" +
- "test.getChangeSummary().undoChanges();");
-
- test.getChangeSummary().undoChanges();
-
- printer.reset();
- printer.printDataObject(test);
- System.out.println(printer.getBuf());
-
- }
-
- /**
- * @throws Exception
- * @throws FileNotFoundException
- */
- private void createTypesViaAPI(HelperContext scope) throws Exception {
-
- List typeDeclarations = new ArrayList();
-
- TypeHelper typeHelper = scope.getTypeHelper();
-
- Type stringType = typeHelper.getType(sdoApiUri, "String");
- Type dateType = typeHelper.getType(sdoApiUri, "Date");
- Type booleanType = typeHelper.getType(sdoApiUri, "Boolean");
-
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
- DataObject personTypeDesc = createTypeDescription(scope, peopleURI,
- "Person");
- typeDeclarations.add(personTypeDesc);
-
- addPropertyDescription(personTypeDesc, stringType, "name");
- addPropertyDescription(personTypeDesc, dateType, "dob");
- addPropertyDescription(personTypeDesc, stringType, "id"); // set to unique
- // identifier?
- addPropertyDescription(personTypeDesc, stringType, "gender"); // restrict?
-
- DataObject relativeType = createTypeDescription(scope, peopleURI,
- "Relative"); // forward declare the Relative type
- typeDeclarations.add(relativeType);
-
- DataObject rp = addPropertyDescription(personTypeDesc, relativeType,
- "relative");
- rp.setBoolean("many", true);
- personTypeDesc.set("open", Boolean.TRUE);
-
- //
- //
- //
- //
- //
-
- addPropertyDescription(relativeType, stringType, "relationship");
- addPropertyDescription(relativeType, booleanType, "genetic");
- DataObject targetPersonProp = addPropertyDescription(relativeType,
- personTypeDesc, "target");
- targetPersonProp.setBoolean("containment", false);
-
- //
- //
- //
- //
- //
-
- DataObject pSet = createTypeDescription(scope, peopleURI, "PersonSet");
- typeDeclarations.add(pSet);
- DataObject pSetProperty = addPropertyDescription(pSet, personTypeDesc,
- "person");
- pSetProperty.setBoolean("many", true);
-
- //
- //
- //
- //
- //
- //
-
- DataObject condition = createTypeDescription(scope, medicalURI, "Condition");
- typeDeclarations.add(condition);
- addPropertyDescription(condition, booleanType, "diagnosed");
- addPropertyDescription(condition, stringType, "name"); // constrain?
-
- //
- //
- //
- //
- //
- //
- //
-
- DataObject testType = createTypeDescription(scope, medicalURI, "Test");
- typeDeclarations.add(testType);
- addPropertyDescription(testType, pSet, "referrals");
- addPropertyDescription(testType, pSet, "patients");
- addPropertyDescription(testType, pSet, "relatives");
-
- List types = typeHelper.define(typeDeclarations);
-
- DataObject p = scope.getDataFactory().create("commonj.sdo", "Property");
- p.set("type", typeHelper.getType(medicalURI, "Condition"));
- p.set("name", "condition");
- p.setBoolean("many", true);
- p.setBoolean("containment", true); // why is this not the default?
-
- typeHelper.defineOpenContentProperty(medicalURI, p);
-
- }
-
- /**
- * @param uri
- * @param name
- * @return
- */
- private DataObject createTypeDescription(HelperContext scope, String uri,
- String name) {
- DataObject typeDesc = scope.getDataFactory().create(sdoApiUri, "Type");
- typeDesc.set("name", name);
- typeDesc.set("uri", uri);
- return typeDesc;
- }
-
- private DataObject addPropertyDescription(
- DataObject containerTypeDescription, Object propertyType,
- String propertyName) {
- DataObject property = containerTypeDescription.createDataObject("property");
- property.set("type", propertyType);
- property.setString("name", propertyName);
- property.setBoolean("containment", true);
- return property;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java
deleted file mode 100644
index 6d8ac0ab31..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/ObtainingDataGraphFromXml.java
+++ /dev/null
@@ -1,201 +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.samples.sdo.advanced;
-
-import java.io.InputStream;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- * This sample program demonstrates a variety of methods available to obtain the root DataObject
- * contained within an xml representation of a DataGraph. This is currently a grey
- * area of the specification and this sample demonstrates spec compliant methods, as
- * well as utility methods that have been added to Tuscany to address issues within
- * the specification.
- *
- * The following sample is from the Apache Tuscany project. It was written to help users
- * understand and experiment with SDO. It is based upon example code contained
- * within, and is meant for use with, and reference to the SDO Specification. This sample attempts to clarify aspects of
- * the the AccessDataObjectsUsingXPath example from the Examples section of the SDO
- * specification.
- *
- * To define the correct Types for each DataObject ( CompanyType, DepartmentType etc )
- * this sample relies upon
- * {@link org.apache.tuscany.samples.sdo.internal.SampleInfrastructure#COMPANY_XSD} which is
- * provided in the resources directory of these samples. The xml file
- * {@link org.apache.tuscany.samples.sdo.internal.SampleInfrastructure#COMPANY_DATAGRAPH_XML} is
- * used to load the DataGraph and is also located in this resources directory.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-
-public class ObtainingDataGraphFromXml extends SampleBase {
-
- HelperContext scope;
-
-
-
- public ObtainingDataGraphFromXml(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
- }
-
- public static void main(String[] args) {
-
- /*
- * Create an instance of the sample program. Edit the "commentaryLevel" argument to suit
- * your experience, COMMENTARY_FOR_NOVICE, COMMENTARY_FOR_INTERMEDIATE or COMMENTARY_FOR_ADVANCED
- */
- ObtainingDataGraphFromXml sample =
- new ObtainingDataGraphFromXml(COMMENTARY_FOR_ADVANCED);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.WRAPPING_DATA_GRAPH_IN_A_DATAGRAPH_INSTANCE
- };
-
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.USING_BUILT_IN_TYPES
- };
-
-
- public void runSample () {
- banner('*',
- "SDO Sample " + this.getClass().getName() + "\n\n" +
-
- "This sample touches an area of the SDO API where the emphasis has changed over the various\n"+
- "version of the specification, and so it's important to be clear what's going on\n"+
- "First off lets be sure of our terminology ...\n"+
- "1) A \"data graph\" is a just collection of DataObjects, all contained within a single\n"+
- "containment hierarchy, with a single root object, and possibly having some non-containment\n"+
- "references\n"+
- "2) A \"DataGraph\" is an instance of the SDO DataGraph class, used as a container for the root\n"+
- "DataObject of a data graph, and providing a means to access a change summary for the data graph.\n\n"+
- "More recent versions of the SDO specification have provided alternative means of containment\n"+
- "of a data graph ...\n"+
- "3) The graph can be contained in a DataObject of a built-in SDO Type with namespace URI \"commonj.sdo\"\n" +
- "and name \"DataGraph\": so this is a modeled version of the special DataGraph class.\n"+
- "4) The Graph can be contained in an XMLDocument instance, which provides for things such as\n"+
- "naming the root element of an XML instance document"
- );
-
- scope = useDefaultScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.COMPANY_XSD);
-
-
-
- try {
-
-
-
-
- DataObject company = null;
-
- commentary(
- "Here we see the specification's example for obtaining dealing with\n"+
- "loading a data graph which uses a method, XMLHelper.load(). This loads an XML instance document\n"+
- "into an instance of XMLDocument ...\n\n"+
- "XMLDocument doc = scope.getXMLHelper().load(\n"+
- "ClassLoader.getSystemResourceAsStream(SampleInfrastructure.COMPANY_DATAGRAPH_XML));"
- );
-
- InputStream is = ClassLoader.getSystemResourceAsStream(SampleInfrastructure.COMPANY_DATAGRAPH_XML);
- int x= is.available();
- byte b[]= new byte[x];
- is.read(b);
- String instanceDoc = new String(b);
-
- System.out.println(instanceDoc);
-
- XMLDocument doc = scope.getXMLHelper().load(
- ClassLoader.getSystemResourceAsStream(SampleInfrastructure.COMPANY_DATAGRAPH_XML));
-
- commentary(
- "Now we can get the wrapper for the data graph, which in this case is the DataObject\n"+
- "of type commonj.sdo#DataGraph. Note how there's no magic here; no special class for\n"+
- "DataGraph, no special handling, this is just a standard pattern of using a built in SDO Type.\n"+
- "The wrapper is there purely because it was serialized\n"+
- "into the XML document, using the standard serialization technique.\n\n" +
- "DataObject dataObjectRepresentingDataGraph = doc.getRootObject();");
-
- DataObject dataObjectRepresentingDataGraph = doc.getRootObject();
-
- System.out.println(dataObjectRepresentingDataGraph);
-
- commentary(
- "If you are confused by the fact that what we really get is an instance of DataGraphTypeImpl\n"+
- "This really is a DataObject, but it is a generated class extending DataObjectImpl\n+"+
- "representing the DataGraph model.");
-
- company = dataObjectRepresentingDataGraph.getDataObject("company");
-
- commentary(
- "We've obtained a DataObject representing the data graph, and from that we have obtained\n"+
- "the true root object of the business data");
-
- System.out.println(company);
- System.out.println();
-
- commentary(
- "Using an instance of DataGraph can perhaps be seen as an older style pattern of wrapping a data graph\n"+
- "and the first approach is likely to get more emphasis and attention in future revisions of the spec.\n"+
- "The SDO API has some limitations in the area of saving and loading instances of the\n"+
- "Java DataGraph type, so Tuscany has an API for doing this ...\n\n"+
- "DataGraph datagraph = SDOUtil.loadDataGraph(\n"+
- " ClassLoader.getSystemResourceAsStream(SampleInfrastructure.COMPANY_DATAGRAPH_XML), null);"
-
- );
-
- DataGraph datagraph = SDOUtil.loadDataGraph(ClassLoader.getSystemResourceAsStream(SampleInfrastructure.COMPANY_DATAGRAPH_XML), null);
-
- System.out.println(datagraph);
-
- commentary(
- "In this case we directly receive an instance of DataGraph and can retrieve the root\n"+
- "business object from the DataGraph\n\n"+
- "DataObject company = datagraph.getRootObject();");
-
- company = datagraph.getRootObject();
- System.out.println(company);
- System.out.println();
-
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- }
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java
deleted file mode 100644
index 7458eef76c..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/PrintDataGraph.java
+++ /dev/null
@@ -1,498 +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.samples.sdo.advanced;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.helper.XSDHelper;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- *
- * This sample program traverses data graphs and builds up a text representation of the
- * data graph. As it traverses a graph it outputs commentary to the console
- * about what it has encountered and how it intends to process what it finds. At
- * the end of each traversal the text representation of the graph is printed to
- * the console.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class PrintDataGraph extends SampleBase {
-
- StringBuffer buf = null;
- HelperContext scope = HelperProvider.getDefaultContext();
-
- private int indent;
-
- private int indentIncrement = 2;
-
- public PrintDataGraph(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_ADVANCED);
- buf = new StringBuffer();
- }
-
- public static void main(String[] args) {
- PrintDataGraph sample = new PrintDataGraph(COMMENTARY_FOR_NOVICE);
- sample.run();
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.GENERIC_DATA_GRAPH_TRAVERSAL
- };
-
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.GET_SET_PROPERTIES_BY_INSTANCE_PROPERTIES,
- SDOFacets.ISMANY_PROPERTIES,
- SDOFacets.CREATE_TYPES_USING_THE_SDO_API,
- SDOFacets.ACCESSING_VALUES_IN_A_SEQUENCE,
- SDOFacets.NON_CONTAINMENT
- };
-
- public void runSample() throws Exception {
- commentary("This sample demonstrates a common pattern of traversing a data graph\n"
- + "and printing the values of its Properties. As the sample traverses a couple of\n"
- + "graphs it provides commentary about what it has found and what actions it\n"
- + "is taking, whilst building up a text representation of the graph. It then\n"
- + "shows you the results of its labours.");
-
- HelperContext scope = createScopeForTypes();
-
- commentary(
- COMMENTARY_ALWAYS,
- "First we look at a data graph of a Purchase Order which has a fairly simple XML schema\n"
- + "and the graph's containment hierarchy has a couple of levels of depth");
-
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.PO_XSD_RESOURCE);
-
- XMLDocument purchaseOrder = getXMLDocumentFromFile(scope,
- SampleInfrastructure.PO_XML_RESOURCE);
-
- printXMLDocument(purchaseOrder);
-
- commentary(COMMENTARY_ALWAYS,
- "And here is the resultant view of the data graph\n\n");
- System.out.println(getBuf().toString());
-
- commentary(COMMENTARY_ALWAYS,
- "Next we look at a graph representing a form letter, where the Type of the\n"
- + "root data object is 'Sequenced'");
-
- loadTypesFromXMLSchemaFile(scope, "letter.xsd");
- DataObject letter = getDataObjectFromFile(scope, "letter.xml");
-
- reset();
- print(letter);
-
- commentary(COMMENTARY_ALWAYS,
- "And here is the resultant view of the data graph\n\n");
-
- System.out.println(getBuf().toString());
-
- }
-
- public void reset() {
- indent = 0;
- buf = new StringBuffer();
- }
-
- /*
- * a convenience method allowing untyped access to the print function for
- * selected SDO artifacts
- */
- public void print(Object sdoObject) throws Exception {
-
- if (sdoObject instanceof XMLDocument) {
- printXMLDocument((XMLDocument) sdoObject);
- } else if (sdoObject instanceof DataObject) {
- printDataObject((DataObject) sdoObject);
- }
-
- }
-
- public void printXMLDocument(XMLDocument xmlDocument) {
-
- commentary(
- COMMENTARY_FOR_NOVICE,
- "We are going to traverse a data graph that has been wrapped in an instance of XMLDocument\n"
- + "Amongst other things, the XMLDocument instance provides access to the root element name\n"
- + "and the root DataObject of the data graph.\n\n"
- + "xmlDocument.getRootElementName();\n"
- + "xmlDocument.getRootObject();",
-
- "Accessing another graph via an XMLDocument instance as we saw previously ...\n"
- + "xmlDocument.getRootElementName();\n"
- + "xmlDocument.getRootObject();");
-
- buf.append("XMLDocument: ").append(xmlDocument.getRootElementName());
- lineBreak();
- incrementIndent();
- printDataObject(xmlDocument.getRootObject());
- decrementIndent();
- }
-
- public void printDataObject(DataObject dataObject) {
-
- if (dataObject.getContainer() == null) {
- commentary(
- COMMENTARY_FOR_NOVICE,
- "We begin traversing the data graph by examining the root object of the graph's containment hierarchy,\n"
- + "making a record of the values of its Properties. As we inspect the values of the Properties of this object\n"
- + "if we encounter contained DataObjects, then we will recurs through the containment hierarchy of the\n"
- + "data graph in a depth first fashion, and create a text representation of the graph that we'll print\n"
- + "out after the graph traversal has been completed.",
-
- "We are beginning to traverse another data graph from its root object, in the same way that we saw previously");
- } else {
- commentary(
- COMMENTARY_FOR_NOVICE,
- "We have arrived at a contained dataObject in the graph, and will inspect its Property values,\n"
- + "recursing deeper if necessary",
-
- "Inspecting another contained dataObject");
- }
-
- lineBreak();
- indent();
- buf.append("DataObject: ");
- Type type = dataObject.getType();
- buf.append("Type: ").append(type.getURI()).append('#').append(
- type.getName());
- lineBreak();
-
- if (dataObject.getType().isSequenced()) {
-
- commentary(
- COMMENTARY_FOR_INTERMEDIATE,
- "We've encountered a DataObject in the graph for which the Type is 'Sequenced'\n"
- + "That is to say that the order of addition of Property values to the DataObject instance\n"
- + "is important, and is preserved by the DataObject\n\n"
- + "dataObject.getType().isSequenced();",
-
- "We've encountered another sequenced DataObject instance, and so will traverse the Property\n"
- + "values in the order preerved by the instance, as we saw before\n\n"
- + "dataObject.getType().isSequenced();");
-
- commentary(
- "There's a subtlety here which we must deal with if this sample code is to\n" +
- "handle both Type systems that derive from XML schema, and those that come from elsewhere,\n" +
- "e.g. using the SDO API. If a Sequenced DataObject has a Type that comes from XML schema\n" +
- "then its Properties that derive from XML attributes are not ordered, whereas those that\n" +
- "derive from XML elements are ordered. The SDO specification doesn't say whether\n" +
- "the attribute related Properties should appear at the start of a Sequence or not.\n" +
- "Currently in Tuscany we leave them out of the Sequence; other SDO implementations may\n" +
- "include the XML attributes in the Sequence. This sample code is written to deal with\n" +
- "either approach\n." +
- "We use the XSDHelper.isAttribute(Property) and isElement(Property) methods to distinguish\n" +
- "between the two kinds of Property",
-
- "Examining the xml attributes and elements of a Sequenced DataObject again."
- );
-
- XSDHelper xsdHelper = getScope().getXSDHelper();
- incrementIndent();
- for(Iterator it=dataObject.getInstanceProperties().iterator(); it.hasNext();) {
- Property property = (Property)it.next();
- if (xsdHelper.isAttribute(property)) {
- indent();
- buf.append("Property (XML Attribute): ").append(property.getName()).append(" - ").append(dataObject.get(property));
- lineBreak();
- }
-
- }
- decrementIndent();
- Sequence seq = dataObject.getSequence();
-
- commentary(
- "The Property/Value pairs of a Sequence can be accessed via the getProperty(int) and getValue(int)\n"
- + "accessor methods of the Sequence interface. The size() method of the Sequence tells us how many there are.\n"
- + "If the getProperty(int) method returns null, then the value is text. These text values may be encountered\n"
- + "when the DataObject's type is 'mixed' (dataObject.getType().isMixed() == true). A typical example of this\n"
- + "is when the data graph represents a form letter.",
-
- "Inspecting the Property/Value pairs of another Sequence");
-
- incrementIndent();
- indent();
- buf.append("Sequence: {\n");
-
- incrementIndent();
- for (int i = 0; i < seq.size(); i++) {
- Property p = seq.getProperty(i);
- if (p == null) {
- indent();
- buf.append("text: ").append(seq.getValue(i));
- lineBreak();
- } else if(!xsdHelper.isAttribute(p)){
- printPropertyValuePair(p, seq.getValue(i));
- }
- }
- decrementIndent();
-
- indent();
- buf.append("}\n");
- decrementIndent();
-
- } else {
- incrementIndent();
-
- commentary(
- COMMENTARY_FOR_INTERMEDIATE,
- "We access the Property values of this DataObject by first getting the list of 'Instance Properties'\n"
- + "from the DataObject. For many DataObjects, this will be the same set of Properties that are defined\n"
- + "by the DataObject's Type. However, if the DataObject's type is 'Open' then an instance of that Type\n"
- + "may contain more Properties than the type itself. The list of Instance Properties will always include\n"
- + "the Properties defined in the Type, but will also include any Properties that the instance has values for\n"
- + "by virtue of it's type being 'Open'\n\n"
- + "for (int i = 0; i < dataObject.getInstanceProperties().size(); i++) {\n"
- + " Property p = (Property) dataObject.getInstanceProperties().get(i);",
-
- "Traversing the instance Properties of this DataObject\n"
- + "for (int i = 0; i < dataObject.getInstanceProperties().size(); i++) {\n"
- + " Property p = (Property) dataObject.getInstanceProperties().get(i);"
-
- );
-
- for (int i = 0; i < dataObject.getInstanceProperties().size(); i++) {
- Property p = (Property) dataObject.getInstanceProperties().get(i);
- indent();
- printValueOfProperty(dataObject, p);
- }
-
- decrementIndent();
- }
-
- }
-
-
-
-
-
- private void printPropertyValuePair(Property p, Object value) {
-
- indent();
- buf.append("Property: ").append(p.getName()).append(": ");
- if(p.getType().isDataType()) {
- printSimpleValue(value);
- lineBreak();
- } else {
- if(p.isContainment()) {
- incrementIndent();
- printDataObject((DataObject)value);
- decrementIndent();
- } else {
- printReferencedDataObject((DataObject)value);
- }
- }
-
-
- }
-
- private void printValueOfProperty(DataObject dataObject, Property p) {
-
- commentary(
- COMMENTARY_FOR_INTERMEDIATE,
- "We are about to inspect the value of a Property, but we must\n"
- + "consider the nature of that Property in order to deal with it appropriately.\n"
- + "Firstly we see if the Property value has been set (dataObject.isSet(property))\n"
- + "Then we see if the Property is simple valued (property.isDataType() == true)\n"
- + "--if not then we know it's a DataObject and we must recurs deeper into the graph's\n"
- + "containment hierarchy\n"
- + "Whether or not the property value is a DataObject, is may be single or multi-valued\n"
- + "so we must either use one of the DataObject's get*(Property) accessors for single\n"
- + "valued Properties or the getList() method for multi-valued properties.\n"
- + "Another thing we must deal with when the Property is a DataObject, is whether or not the\n"
- + "Property is a 'containment' Property. If it isn't, then here we simply record the fact that\n"
- + "we have encountered this non-containment relationship, and move on to the next Property",
-
- "Inspecting another property to determine how to access its value, as we saw before");
-
- // TODO deal with nullable
-
- buf.append("Property ").append(p.getName()).append(": ").append(" - ");
-
- if (dataObject.isSet(p)) {
- if (p.getType().isDataType()) {
- if (p.isMany()) {
- printSimpleValues(dataObject.getList(p));
- } else {
- printSimpleValue(dataObject.get(p));
- }
- } else {
- if (p.isContainment()) {
- incrementIndent();
- if (p.isMany()) {
- printDataObjects(dataObject.getList(p));
- } else {
- printDataObject(dataObject.getDataObject(p));
- }
- decrementIndent();
- } else {
- if (p.isMany()) {
- printReferencedDataObjects(dataObject.getList(p));
- } else {
- printReferencedDataObject(dataObject.getDataObject(p));
- }
- }
- }
- } else {
- buf.append(" is not set");
- }
-
- lineBreak();
-
- }
-
- private void printReferencedDataObject(DataObject dataObject) {
-
- commentary(
- COMMENTARY_FOR_INTERMEDIATE,
- "We have encounted a non-containment reference to a DataObject, and so\n"
- + "we know that this DataObject will be fully inspected when encountered by the\n"
- + "traversal of the data graph's containment hierarchy.\n"
- + "We therefore record the fact that this association has been encountered by\n"
- + "establishing the path from the root object of the data graph to the referenced\n"
- + "DataObject",
-
- "Recording the fact that we have encountered another non-containment reference");
-
- List path = new ArrayList();
- DataObject current = dataObject;
- while (current != null) {
- Property containmentProperty = current.getContainmentProperty();
- if(containmentProperty != null) {
- if(containmentProperty.isMany()) {
- List pValues = current.getContainer().getList(containmentProperty);
- int index = pValues.indexOf(current)+1;
- path.add("["+index+"]");
- }
- path.add("/"+current.getContainmentProperty().getName());
- }
- current = current.getContainer();
- }
- buf.append("reference to: ");
- for (ListIterator i = path.listIterator(path.size()); i.hasPrevious();) {
- buf.append(i.previous());
- }
- }
-
- private void printReferencedDataObjects(List list) {
-
- commentary(
- COMMENTARY_FOR_NOVICE,
- "Traversing a list of DataObjects which represent the values of a multi-valued non-containment Property");
-
- indent();
- buf.append('[');
- for (Iterator i = list.iterator(); i.hasNext();) {
- printReferencedDataObject((DataObject) i.next());
- }
- indent();
- buf.append(']');
- }
-
- private void printDataObjects(List list) {
-
- commentary(
- COMMENTARY_FOR_NOVICE,
- "Traversing a list of DataObjects which represent the values of a multi-valued containment Property");
-
-
- lineBreak();
- indent();
- buf.append("[");
- incrementIndent();
- for (Iterator i = list.iterator(); i.hasNext();) {
- printDataObject((DataObject) i.next());
- }
- decrementIndent();
- indent();
- buf.append(']');
- }
-
- private void printSimpleValue(Object object) {
- buf.append(object);
- }
-
- private void printSimpleValues(List values) {
- buf.append('[');
- for (Iterator i = values.iterator(); i.hasNext();) {
- printSimpleValue(i.next());
- if (i.hasNext()) {
- buf.append(',');
- }
- }
- buf.append(']');
-
- }
-
- private void decrementIndent() {
- indent -= indentIncrement;
-
- }
-
- private void incrementIndent() {
- indent += indentIncrement;
-
- }
-
- private void indent() {
- for (int i = 0; i < indent; i++) {
- buf.append(' ');
- }
- }
-
- private void lineBreak() {
- buf.append('\n');
- }
-
- public StringBuffer getBuf() {
- return buf;
- }
-
- public void setBuf(StringBuffer b) {
- buf = b;
- }
-
- public HelperContext getScope() {
- return scope;
- }
-
- public void setScope(HelperContext scope) {
- this.scope = scope;
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/package.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/package.html
deleted file mode 100644
index 4a375228f8..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/advanced/package.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- Advanced SDO Samples
-
-
-
Advanced Service Data Object (SDO) Sample Programs
-
-
Running the Samples
See the main overview for instructions on how to run these
-samples.
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java
deleted file mode 100644
index 2030f35017..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessDataObjectPropertiesByName.java
+++ /dev/null
@@ -1,99 +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.samples.sdo.basic;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates accessing a DataObject's Property values by name.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class AccessDataObjectPropertiesByName extends SampleBase {
-
- public AccessDataObjectPropertiesByName(Integer commentaryLevel) {
- super(commentaryLevel, SAMPLE_LEVEL_BASIC);
- }
-
-
- public static void main(String[] args) {
- AccessDataObjectPropertiesByName sample = new AccessDataObjectPropertiesByName(COMMENTARY_FOR_NOVICE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.GET_PROPERTIES_OF_DATAOBJECT_BY_NAME
- };
-
- public void runSample () throws Exception {
-
- banner("This sample will access a DataObject's properties by name\n"+
- "Take a look at the sample code to see all the uses of dataObject.get(String)\n"+
- "dataObject.getList(String) and dataObject.getDataObject(String)");
-
- // setting up the type system for the example, see the utility methods for details of these operations
- HelperContext scope = createScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.PO_XSD_RESOURCE);
-
- DataObject purchaseOrder = getDataObjectFromFile(scope, SampleInfrastructure.PO_XML_RESOURCE);
-
- System.out.println("Accessing properties of purchaseOrder by name");
- System.out.println("Purchase Order: ");
- System.out.println(" purchaseOrder.get(\"orderDate\"): " + purchaseOrder.get("orderDate"));
- System.out.println(" purchaseOrder.get(\"comment\"): " + purchaseOrder.get("comment"));
-
- System.out.println(" DataObject shipTo = purchaseOrder.getDataObject(\"shipTo\");");
- DataObject shipTo = purchaseOrder.getDataObject("shipTo");
- System.out.println(" shipTo.get(\"name\"): " + shipTo.get("name"));
-
- System.out.println(" DataObject billTo = purchaseOrder.getDataObject(\"billTo\");");
- DataObject billTo = purchaseOrder.getDataObject("billTo");
- System.out.println(" billTo.get(\"name\"): " + billTo.get("name"));
-
- System.out.println(" DataObject items = purchaseOrder.getDataObject(\"items\");\n" +
- " List itemList = items.getList(\"item\");\n" +
- " DataObject item = (DataObject) itemList.get(i);");
- DataObject items = purchaseOrder.getDataObject("items");
- List itemList = items.getList("item");
-
- System.out.println(" Items:");
- for (int i = 0; i < itemList.size(); i++) {
- DataObject item = (DataObject) itemList.get(i);
- System.out.println(" item[" + i + "]");
- System.out.println(" item.get(\"partNum\"): " + item.get("partNum"));
- System.out.println(" item.get(\"productName\"): " + item.get("productName"));
- }
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessingTheContentsOfASequence.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessingTheContentsOfASequence.java
deleted file mode 100644
index e24a837ccc..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/AccessingTheContentsOfASequence.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.samples.sdo.basic;
-
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates accessing the sequence from a DataObject containing mixed content.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-
-public class AccessingTheContentsOfASequence extends SampleBase {
-
- HelperContext scope;
-
- public AccessingTheContentsOfASequence(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_BASIC);
- }
-
-
- /**
- * previously created XSD file used
- */
- public static final String LETTER_XSD = "letter.xsd";
-
- /**
- * previously created XML file used
- */
- public static final String LETTER_XML = "letter.xml";
-
- /**
- * Execute this method in order to run the sample.
- *
- * @param args
- */
- public static void main(String[] args) {
-
- AccessingTheContentsOfASequence sample =
- new AccessingTheContentsOfASequence(COMMENTARY_FOR_NOVICE);
-
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.ACCESSING_VALUES_IN_A_SEQUENCE
- };
-
- public void runSample () throws Exception {
-
- commentary("Demonstrates accessing the sequence from a DataObject containing mixed content.");
-
- scope = createScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, LETTER_XSD);
- DataObject letter = getDataObjectFromFile(scope, LETTER_XML);
-
- // print letter sequence
- commentary("We've loaded a document from an XML file that contains mixed content.\n" +
- "Here's how the XML looks ...\n");
- System.out.println(scope.getXMLHelper().save(letter, "letter.xsd", "letter"));
-
- commentary("We can iterate over the sequence, getting the Property / Value pairs\n" +
- "using the Sequence.getProperty(int) and Sequence.getValue(int) methods.\n" +
- "The model for this document is \"mixed\", i.e.\n" +
- "letter.getType().isMixed() returns \"true\".\n" +
- "Let's take a look at the Properties in this sequence.");
-
- Sequence letterSequence = letter.getSequence();
-
- for (int i = 0; i < letterSequence.size(); i++) {
- Property prop = letterSequence.getProperty(i);
- if (prop == null) {
- String text = (String) letterSequence.getValue(i);
- System.out.println("Unstructured text (" + text + ")");
- } else {
- System.out.println("Property: " + prop.getName() + " Value : " + letterSequence.getValue(i));
- }
- }
-
- commentary("The values of the modeled Properties are still accessible through the DataObject\n" +
- "getter and setter methods, but only through the Sequence API can we get to the unstructured\n" +
- "text and see the ordering of the instance document");
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java
deleted file mode 100644
index 38bafca539..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreateCompany.java
+++ /dev/null
@@ -1,151 +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.samples.sdo.basic;
-
-import java.io.FileOutputStream;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * This sample uses the scenario of building a description of a company to demonstrate
- * primarily the setting of data using strings to name Properties.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class CreateCompany extends SampleBase {
-
- public CreateCompany(Integer commentaryLevel) {
- this(commentaryLevel, SAMPLE_LEVEL_BASIC);
- }
-
- public CreateCompany(Integer commentaryLevel, Integer sampleLevel) {
- super(commentaryLevel, sampleLevel);
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.SET_PROPERTIES_OF_DATAOBJECT_BY_NAME
- };
-
- /**
- * XML file generated for the company DataObject
- */
- private static final String COMPANY_GENERATED_XML = "companyGenerated.xml";
-
- /**
- * Main method. Execute this method in order to run sample
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) {
- /*
- * this sample is suitable for a novice to SDO.
- * Change the experience level constructor argument to one of
- * COMMENTARY_FOR_NOVICE, COMMENTARY_FOR_INTERMEDIATE, COMMENTARY_FOR_ADVANCED, change
- * the level of commentary output.
- */
- CreateCompany sample = new CreateCompany(COMMENTARY_FOR_NOVICE);
-
- sample.run();
-
- }
-
- public void runSample () throws Exception {
-
- banner('*',
- "Demonstrates how to create a data graph using a model loaded\n"+
- "from an XML Schema contained in a file on the file system");
-
- HelperContext scope = createScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.COMPANY_XSD);
-
- commentary(
- "Now that our type system has been loaded and made available through the scope\n"+
- "DataObjects can be created by a DataFactory that has access to the required types.\n\n"+
- "DataObject company = scope.getDataFactory().create(SampleInfrastructure.COMPANY_NAMESPACE, \"CompanyType\");");
-
- DataObject company = scope.getDataFactory().create(SampleInfrastructure.COMPANY_NAMESPACE, "CompanyType");
-
- populateGraph(scope, company);
-
- FileOutputStream fos = new FileOutputStream(COMPANY_GENERATED_XML);
-
- commentary(
- "The XMLHelper can be used to write an XML serialized version of the data graph\n\n"+
- "scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, \"company\", fos);");
-
- scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, "company", fos);
-
- commentary(
- "Similarly we can serialize the graph to an XML String using the XMLHelper\n\n"+
- "String xml = scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, \"company\");\n");
-
- String xml = scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, "company");
-
- System.out.println(xml);
-
- }
-
- public void populateGraph(HelperContext scope, DataObject company)
- {
-
- System.out.println("Populating the company DataObject");
- company.setString("name", "ACME");
- company.setString("employeeOfTheMonth", "E0001");
-
- System.out.println("Creating a Department");
-
- DataObject depts = company.createDataObject("departments");
-
- depts.setString("name", "Advanced Technologies");
- depts.setString("location", "NY");
- depts.setString("number", "123");
-
- System.out.println("Creating an employee: John Jones");
- DataObject johnJones = depts.createDataObject("employees");
- johnJones.setString("name", "John Jones");
-
- johnJones.setString("SN", "E0001");
-
- System.out.println("Creating an employee: Jane Doe");
- DataObject janeDoe = depts.createDataObject("employees");
- janeDoe.setString("name", "Jane Doe");
- janeDoe.setString("SN", "E0003");
-
- System.out.println("Creating a manager: Fred Bloggs");
- DataObject fVarone = depts.createDataObject("employees");
- fVarone.setString("name", "Fred Bloggs");
- fVarone.setString("SN", "E0004");
- fVarone.setString("manager", "true");
- System.out.println("DataObject creation completed");
- System.out.println();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java
deleted file mode 100644
index c41aa37397..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/CreatePurchaseOrder.java
+++ /dev/null
@@ -1,159 +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.samples.sdo.basic;
-
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- * Demonstrates creating a purchaseOrder DataObject from an existing XSD and then
- * persisting to disk. This
- * sample was used to generate valid XML for Fuhwei Lwo's paper
- * Create and read an XML document based on XML Schema
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-
-public class CreatePurchaseOrder extends SampleBase {
-
- public CreatePurchaseOrder(Integer commentaryLevel) {
- super(commentaryLevel, SAMPLE_LEVEL_BASIC);
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.LOADING_DATA_FROM_XML,
- SDOFacets.SAVING_DATA_TO_XML
- };
-
-
-
- public static void main(String[] args) {
-
- CreatePurchaseOrder sample = new CreatePurchaseOrder(COMMENTARY_FOR_NOVICE);
-
- sample.run();
-
- }
-
- public void runSample() throws Exception {
-
- commentary(COMMENTARY_ALWAYS,
- "This sample is based upon Fuhwei Lwo's paper\n"
- + "http://www-128.ibm.com/developerworks/webservices/library/ws-sdoxmlschema/\n"
- + "and demonstrates creating a purchaseOrder DataObject from an\n"
- + "existing XSD and then persisting to disk.");
-
- HelperContext scope = createScopeForTypes();
-
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.PO_XSD_RESOURCE);
-
-
- commentary (
- "We are creating a DataObject using a DataFactory by specifying the URI and name of\n"+
- "the Type that we want to use for the DataObject.\n\n"+
- "DataFactory factory = scope.getDataFactory();\n"+
- "DataObject purchaseOrder = factory.create(SampleInfrastructure.PO_NAMESPACE, \"PurchaseOrderType\");");
-
- DataFactory factory = scope.getDataFactory();
- DataObject purchaseOrder = factory.create(SampleInfrastructure.PO_NAMESPACE, "PurchaseOrderType");
-
-
- commentary(
- "Now we build on the graph using the DataObject's set() and createDataObject() methods.\n"+
- "Take a look inside the program code for the full detail of these steps");
-
- purchaseOrder.setString("orderDate", "1999-10-20");
- DataObject shipTo = purchaseOrder.createDataObject("shipTo");
- shipTo.set("country", "US");
- shipTo.set("name", "Alice Smith");
- shipTo.set("street", "123 Maple Street");
- shipTo.set("city", "Mill Valley");
- shipTo.set("state", "CA");
- shipTo.setString("zip", "90952");
- DataObject billTo = purchaseOrder.createDataObject("billTo");
- billTo.set("country", "US");
- billTo.set("name", "Robert Smith");
- billTo.set("street", "8 Oak Avenue");
- billTo.set("city", "Mill Valley");
- billTo.set("state", "PA");
- billTo.setString("zip", "95819");
- purchaseOrder.set("comment", "Hurry, my lawn is going wild!");
-
- DataObject items = purchaseOrder.createDataObject("items");
-
- DataObject item1 = items.createDataObject("item");
- item1.set("partNum", "872-AA");
- item1.set("productName", "Lawnmower");
- item1.setInt("quantity", 1);
- item1.setString("price", "148.95");
-
- item1.set("comment", "Confirm this is electric");
-
- DataObject item2 = items.createDataObject("item");
- item2.set("partNum", "926-AA");
- item2.set("productName", "Baby Monitor");
- item2.setInt("quantity", 1);
- item2.setString("price", "39.98");
- item2.setString("shipDate", "1999-05-21");
- System.out.println("Created 2 items");
-
- commentary(
- "Now we use the XMLHelper to write an XML document representing the data graph\n"+
- "to a file. We must supply a namespace and a name for the root element of the graph, since it is\n"+
- "not contained in the DataObject\n\n"+
- "OutputStream stream = new FileOutputStream(SampleInfrastructure.PO_XML_GENERATED);\n"+
- "scope.getXMLHelper().save(purchaseOrder, SampleInfrastructure.PO_NAMESPACE, \"purchaseOrder\", stream);"
- );
-
-
- OutputStream stream = new FileOutputStream(SampleInfrastructure.PO_XML_GENERATED);
- scope.getXMLHelper().save(purchaseOrder, SampleInfrastructure.PO_NAMESPACE, "purchaseOrder", stream);
- stream.close();
-
- commentary(
- "We could instead have created an XMLDocument instance to wrap the DataObject\n"+
- "This has the advantage that the namespace URI and root element name are preserved in the Object\n"+
- "This interface was introduced after Fuhwei's paper, and has particular advantage\n"+
- "when loading an XML document from a file\n\n"+
- "scope.getXMLHelper().createDocument(purchaseOrder, SampleInfrastructure.PO_NAMESPACE, \"purchaseOrder\");\n"+
- "scope.getXMLHelper().save(doc, System.out, null);");
-
-
- XMLDocument doc = scope.getXMLHelper().createDocument(purchaseOrder, SampleInfrastructure.PO_NAMESPACE, "purchaseOrder");
- scope.getXMLHelper().save(doc, System.out, null);
- System.out.println();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java
deleted file mode 100644
index e1b0dce3e6..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/ReadPurchaseOrder.java
+++ /dev/null
@@ -1,147 +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.samples.sdo.basic;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-/**
- * Reads purchase order DataObject from XML, based upon Fuhwei Lwo's paper
- * Create and read an XML document based on XML Schema.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- *
- */
-public class ReadPurchaseOrder extends SampleBase {
-
-
- public static String purchaseOrderDoc =
- "\n"+
- " \n"+
- " \n"+
- " Alice Smith\n"+
- " 123 Maple Street\n"+
- " Mill Valley\n"+
- " CA\n"+
- " 90952\n"+
- " \n"+
- " \n"+
- " Robert Smith\n"+
- " 8 Oak Avenue\n"+
- " Mill Valley\n"+
- " PA\n"+
- " 95819\n"+
- " \n"+
- " Hurry, my lawn is going wild!\n"+
- " \n"+
- " \n"+
- " Lawnmower\n"+
- " 148.95\n"+
- " 1\n"+
- " Confirm this is electric\n"+
- " \n"+
- " \n"+
- " Baby Monitor\n"+
- " 39.98\n"+
- " 1\n"+
- " 1999-05-21\n"+
- " \n"+
- " \n"+
- " \n";
-
- public ReadPurchaseOrder(Integer commentaryLevel) {
- super(commentaryLevel, SampleInfrastructure.SAMPLE_LEVEL_BASIC);
- }
-
- public static void main(String[] args) {
- ReadPurchaseOrder sample = new ReadPurchaseOrder(COMMENTARY_FOR_NOVICE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.LOADING_DATA_FROM_XML,
- SDOFacets.SAVING_DATA_TO_XML
- };
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.GET_PROPERTIES_OF_DATAOBJECT_BY_NAME
- };
-
-
-
- public void runSample () throws Exception {
- commentary(COMMENTARY_ALWAYS,
- "This sample is based upon Fuhwei Lwo's paper \n"+
- "http://www-128.ibm.com/developerworks/webservices/library/ws-sdoxmlschema/\n");
-
- HelperContext scope = createScopeForTypes();
-
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.PO_XSD_RESOURCE);
-
- commentary(
- "We load the purchase order document into an instance of XMLDocument\n\n"+
- "XMLDocument xmlDoc = getXMLDocumentFromString(scope, purchaseOrderDoc);\n");
-
- XMLDocument xmlDoc = getXMLDocumentFromString(scope, purchaseOrderDoc);
-
- commentary(
- "We then retrieve the root DataObject from the XMLDocument\n"+
- "then print out some of the details\n\n"+
- "DataObject purchaseOrder = xmlDoc.getRootObject();");
-
- DataObject purchaseOrder = xmlDoc.getRootObject();
-
- System.out.println("Order date: " + purchaseOrder.get("orderDate"));
- System.out.println("Comment: " + purchaseOrder.get("comment"));
-
- DataObject shipTo = purchaseOrder.getDataObject("shipTo");
- System.out.println("Ship to name: " + shipTo.get("name"));
-
- DataObject billTo = purchaseOrder.getDataObject("billTo");
- System.out.println("Bill to name: " + billTo.get("name"));
- System.out.println();
-
- DataObject items = purchaseOrder.getDataObject("items");
- List itemList = items.getList("item");
- for (int i = 0; i < itemList.size(); i++) {
-
- DataObject item = (DataObject) itemList.get(i);
-
- System.out.println("Part num: " + item.get("partNum"));
- System.out.println("Product name: " + item.get("productName"));
- }
-
- }
-
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/package.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/package.html
deleted file mode 100644
index d926bdbf5c..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/basic/package.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- Basic SDO Samples
-
-
-
Simple Service Data Object (SDO) Sample Programs
-
-
Running the Samples
See the main overview for instructions on how to run these
-samples.
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java
deleted file mode 100644
index 56bc68340f..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessDataObjectUsingValidXPath.java
+++ /dev/null
@@ -1,129 +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.samples.sdo.intermediate;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates accessing a created DataObject's properties using the SDO XPath like syntax.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class AccessDataObjectUsingValidXPath extends SampleBase {
- HelperContext scope;
-
- public AccessDataObjectUsingValidXPath(Integer userLevel) {
- super(userLevel, SampleInfrastructure.SAMPLE_LEVEL_INTERMEDIATE);
- }
-
-
- /**
- * Accesses and modifies properties of a purchase order DataObject using xPath(
- * properties are defined in the xsd
- * {@link org.apache.tuscany.samples.sdo.internal.SampleInfrastructure#PO_XSD_RESOURCE} and
- * populated by xml
- * {@link org.apache.tuscany.samples.sdo.internal.SampleInfrastructure#PO_XML_RESOURCE} )
- *
- * @param args.
- * No parameters required.
- */
- public static void main(String[] args) {
- AccessDataObjectUsingValidXPath sample = new AccessDataObjectUsingValidXPath(COMMENTARY_FOR_NOVICE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.GET_SET_PROPERTIES_OF_DATAOBJECT_BY_XPATH
- };
-
-
- public void runSample () throws Exception {
-
- commentary("Demonstrates accessing a DataObject's properties using the XPath style getter/setter methods");
-
-
- HelperContext scope = createScopeForTypes();
-
-
- commentary(
- "First we create the type system using an XML Schema file and then create\n"+
- "A DataObject using an XML document for convenience");
-
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.PO_XSD_RESOURCE);
- DataObject purchaseOrder = getDataObjectFromFile(scope, SampleInfrastructure.PO_XML_RESOURCE);
-
-
-
- commentary(
- "Accessing data from the purchase order using the DataObjects XPath style methods\n");
-
-
- System.out.println("First we use the simplest kind of path\n" +
- "purchaseOrder.getString(\"billTo/name\")\n" +
- "The purchase is to be paid for by .... " +
- purchaseOrder.getString("billTo/name"));
-
-
- System.out.println("\nThen we use indexing by integer starting from 1\n" +
- "purchaseOrder.getString(\"items/item[1]/productName\")\n" +
- "The first item in the order is a ... " +
- purchaseOrder.getString("items/item[1]/productName"));
-
-
- System.out.println("\nThe alternative style of indexing uses a . notation and starts from 0\n"+
- "purchaseOrder.getFloat(\"items/item.0/price\")\n" +
- "The price of this item is ... " +
- purchaseOrder.getFloat("items/item.0/price"));
-
-
- System.out.println("\nDataObjects can be looked up by supplying the value of one of the contained simple valued Properties\n"+
- "DataObject babyMonitorItem = purchaseOrder.getDataObject(\"items/item[productName=\\\"Baby Monitor\\\"]");
-
- DataObject babyMonitorItem = purchaseOrder.getDataObject("items/item[productName=\"Baby Monitor\"]");
- System.out.println("The price of the Baby Monitor is .... " +
- babyMonitorItem.getFloat("price"));
-
-
- System.out.println("\nA parent DataObject can be accessed with the .. notation\n"+
- "List onlyIfBuyingGrassSeed = purchaseOrder.getList(\"items/item[productName=GrassSeed]/../item\");");
- List onlyIfBuyingGrassSeed = purchaseOrder.getList("items/item[productName=GrassSeed]/../item");
- if(onlyIfBuyingGrassSeed != null) {
- System.out.println("The purchase order included grass seed and " + new Integer(onlyIfBuyingGrassSeed.size()-1) + " other items");
- } else {
- System.out.println("The purchase order did not include GrassSeed");
- }
-
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessingDataObjectsViaPropertyIndex.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessingDataObjectsViaPropertyIndex.java
deleted file mode 100644
index 98a63b5654..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/AccessingDataObjectsViaPropertyIndex.java
+++ /dev/null
@@ -1,164 +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.samples.sdo.intermediate;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.advanced.PrintDataGraph;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates accessing the properties of a DataObject using integer property indices.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-
-public class AccessingDataObjectsViaPropertyIndex extends SampleBase {
-
- HelperContext scope;
- PrintDataGraph printer;
-
- public AccessingDataObjectsViaPropertyIndex(Integer userLevel) {
- /*
- * Classifying this sample as intermediate, not because it is complex
- * but because it's a scenario not to be encouraged for use by
- * people new to SDO.
- */
- super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
- printer = new PrintDataGraph(SAMPLE_LEVEL_ADVANCED);
- }
-
-
- /**
- * Predefine the property indexes.
- */
-
- private static final int COMPANY_DEPARTMENT = 0;
- private static final int COMPANY_NAME = 1;
- private static final int COMPANY_EMPLOYEE_OF_MONTH = 2;
-
- private static final int DEPARTMENT_EMPLOYEES = 0;
-
- private static final int EMPLOYEE_NAME = 0;
- private static final int EMPLOYEE_SN = 1;
- private static final int EMPLOYEE_MANAGER = 2;
-
-
- /**
- * Execute this method in order to run the sample.
- *
- * @param args
- */
- public static void main(String[] args) {
- AccessingDataObjectsViaPropertyIndex sample =
- new AccessingDataObjectsViaPropertyIndex(COMMENTARY_FOR_NOVICE);
-
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.GET_SET_PROPERTIES_OF_DATAOBJECT_BY_INDEX
- };
-
-
- public void runSample () throws Exception {
-
-
- commentary(
- "This sample demonstrates the use of integer index to get and set\n" +
- "Property values of a DataObject. This approach is optimized for\n" +
- "performance, but is fragile to changes to the Type system. It will be\n" +
- "broken if someone alters the XML schema that is used to load the type system." +
- "This kind of approach is well suited to a situation where the SDO code is being\n" +
- "generated.");
-
- scope = createScopeForTypes();
-
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.COMPANY_XSD);
-
- DataObject company = getDataObjectFromFile(scope, SampleInfrastructure.COMPANY_DATAOBJECT_XML);
-
- commentary("We've loaded a data graph that looks like this ...");
-
- printer.print(company);
- System.out.println(printer.getBuf());
- printer.reset();
-
- commentary("Here's how the data graph looks rendered in XML ...");
- System.out.println(
- scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, "company"));
-
- commentary(
- "This sample class has primitive int static constants defined for the Properties\n" +
- "of the Types that the program is designed to work with, e.g.\n\n" +
- "private static final int COMPANY_NAME = 2;\n\n" +
- "The value of the integers is defined by the sequence the Properties\n" +
- "appear in the List returned by dataObject.getType().getDeclaredProperties()\n" +
- "For a type derived from an XML schema this will be the sequence they appeared in the\n" +
- "schema document.\n" +
- "We can use these integer values to get and set Properties on the company DataObject\n\n" +
- "company.setString(COMPANY_NAME, \"MegaCorp\");\n" +
- "List departments = company.getList(COMPANY_DEPARTMENT);\n" +
- "List employees = department.getList(DEPARTMENT_EMPLOYEES);\n");
-
- company.setString(COMPANY_NAME, "MegaCorp");
-
-
-
- commentary("The sample continues, altering the data graph by using the getter\n" +
- "and setter methods that take int arguments");
-
- List departments = company.getList(COMPANY_DEPARTMENT);
- DataObject department = (DataObject) departments.get(0);
- List employees = department.getList(DEPARTMENT_EMPLOYEES);
- DataObject employeeFromList = (DataObject) employees.get(2);
- employeeFromList.detach();
-
- DataObject newEmployee = department.createDataObject(DEPARTMENT_EMPLOYEES);
-
- newEmployee.set(EMPLOYEE_NAME, "Al Smith");
- newEmployee.set(EMPLOYEE_SN, "E0005");
- newEmployee.setBoolean(EMPLOYEE_MANAGER, true);
-
- company.set(COMPANY_EMPLOYEE_OF_MONTH, newEmployee.get(EMPLOYEE_SN));
-
- commentary("After some more manipulation (take a look at the sample code to see the detail)\n" +
- "we can examine the state of the modified graph");
-
- printer.print(company);
- System.out.println(printer.getBuf());
- printer.reset();
-
- commentary("Or rendered in XML it now looks like this ...");
- System.out.println(scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, "company"));
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateCompanyTuscanyAPI.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateCompanyTuscanyAPI.java
deleted file mode 100644
index 097814d35f..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateCompanyTuscanyAPI.java
+++ /dev/null
@@ -1,114 +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.samples.sdo.intermediate;
-
-import java.io.FileOutputStream;
-
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * This sample is a variant of the CreateCompany sample where the graph of DataObjects
- * is contained in an instance of DataGraph.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class CreateCompanyTuscanyAPI extends org.apache.tuscany.samples.sdo.basic.CreateCompany {
-
- public CreateCompanyTuscanyAPI(Integer commentaryLevel) {
- super(commentaryLevel, SAMPLE_LEVEL_INTERMEDIATE);
- }
-
- /**
- * XML file generated for the company DataGraph
- */
- private String COMPANY_DATAGRAPH_GENERATED_XML = "companyDataGraphGenerated.xml";
-
-
- /**
- * Main method. Execute this method in order to run sample
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) {
- /*
- * this sample is best suited so someone with an intermediate level
- * of understanding of SDO. Change the experience level argument to get more
- * or less commentary.
- */
- CreateCompanyTuscanyAPI sample = new CreateCompanyTuscanyAPI(COMMENTARY_FOR_INTERMEDIATE);
- sample.run();
-
- }
-
- public void runSample () throws Exception {
-
- banner('*',
- " SDO Sample Create Company in a DataGraph \n\n"+
- "This is a variant of the simple CreateCompany sample, but\n"+
- "demonstrates how to create a DataGraph in the absence of a Data Access Service (DAS)\n"+
- "This is not typical of how an SDO user would code, because a DAS is usually\n"+
- "responsible for creating a DataGraph instance. This is why we must use a Tuscany API\n"+
- "to create the dataGraph in the first place\n"+
- "If you don't have a need to use a DataGraph instance then you may want to skip this\n"+
- "sample, or leave it until you have explored the DataObject interface fully\n");
-
- commentary(COMMENTARY_FOR_INTERMEDIATE,
- "As we are dealing with a DataGraph, the SDO API has some gray areas at the moment\n"+
- "in that the DataGraph API hasn't yet been developed to deal with scopes\n"+
- "other than the default scope. So here is an occasion where we must use "+
- "the default singleton scope");
- HelperContext scope = useDefaultScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.COMPANY_XSD);
-
- commentary (COMMENTARY_FOR_INTERMEDIATE,
- "Here is the use of the Tuscany API for creating a DataGraph instance\n\n"+
- "DataGraph dataGraph = SDOUtil.createDataGraph();");
-
- DataGraph dataGraph = SDOUtil.createDataGraph();
-
- commentary(COMMENTARY_FOR_INTERMEDIATE,
- "Now we create a root object of a selected type for the DataGraph wrapper to contain.\n"+
- "This is an example of a DataGraph interface that currently forces us to use the default scope.\n\n"+
- "company = dataGraph.createRootObject(SampleInfrastructure.COMPANY_NAMESPACE, \"CompanyType\");");
-
- DataObject company = dataGraph.createRootObject(SampleInfrastructure.COMPANY_NAMESPACE, "CompanyType");
-
- populateGraph(scope, company);
-
- commentary(COMMENTARY_FOR_INTERMEDIATE,
- "Since the SDO API doesn't currently have a method for serializing the DataGraph instance\n"+
- "we again use a Tuscany specific API\n\n"+
- "SDOUtil.saveDataGraph(dataGraph, fos, null);");
-
- FileOutputStream fos = new FileOutputStream(COMPANY_DATAGRAPH_GENERATED_XML);
- SDOUtil.saveDataGraph(dataGraph, fos, null);
-
- SDOUtil.saveDataGraph(dataGraph, System.out, null);
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java
deleted file mode 100644
index 1ec920146d..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/CreateDataObjectFromXmlString.java
+++ /dev/null
@@ -1,133 +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.samples.sdo.intermediate;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates creating a DataObject from a String of XML without an explicit model.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class CreateDataObjectFromXmlString extends SampleBase {
- HelperContext scope;
-
-
- public CreateDataObjectFromXmlString(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
- }
-
-
- /**
- * String representing a PurchaseOrder in XML format
- */
- public static final String XML_STRING = "" + " " + " Alice Smith"
- + " 123 Maple Street" + " Mill Valley" + " PA" + " 90952" + ""
- + "";
-
-
- public static void main(String[] args) {
-
- CreateDataObjectFromXmlString sample = new CreateDataObjectFromXmlString(COMMENTARY_FOR_NOVICE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.USING_BUILT_IN_TYPES,
- SDOFacets.LOADING_DATA_FROM_XML
- };
-
- public void runSample () throws Exception {
-
-
- commentary("Demonstrates creating a DataObject from a String of XML,\n" +
- "based upon section titled 'Creating DataObjects from XML documents'\n"+
- "This quite unassuming sample demonstrates the maxim of 'less is more'\n"+
- "in that it might look like other samples where the XML document was loaded\n"+
- "from a file or string, but note that we don't define any Types before loading\n"+
- "the document. Built in generic types are used to model the data graph");
-
-
- scope = createScopeForTypes();
-
- commentary("don't define any types! Just go ahead and load from the String\n\n"+
- "DataObject purchaseOrder = scope.getXMLHelper().load(XML_STRING).getRootObject();");
-
- DataObject purchaseOrder = scope.getXMLHelper().load(XML_STRING).getRootObject();
-
- commentary("Note that the Type of the newly created DataObject has no Properties defined for it\n"+
- "but the type is said to be \"Open\", which means that an instance of the Type may make use of other Properties\n"+
- "defined elsewhere. The XMLHelper's load operation creates Properties on demand for the DataObject instance to use as it loads\n"+
- "the document\n\n" +
- "purchaseOrder.getType().isOpen returns true\n" +
- "purchaseOrder.getType().getProperty(\"shipTo\") returns null and\n" +
- "purchaseOrder.getInstanceProperty(\"shipTo\") returns a Property");
-
- System.out.println("DataObject's type is open?: " + purchaseOrder.getType().isOpen());
- System.out.println("Data Object's type has a property shipTo?: " + (purchaseOrder.getType().getProperty("shipTo") != null));
- System.out.println("Data Object instance has a property shipTo?: " + (purchaseOrder.getInstanceProperty("shipTo") != null));
-
- commentary(
- "Without a Type definition accessing a DataObject is slightly\n"+
- "different, since without a Type definition SDO does not know\n"+
- "the intended multiplicity of properties. So every Property is assumed to\n"+
- "be multi-valued, and must be accessed via a list\n\n"+
- "List shipToList = purchaseOrder.getList(\"shipTo\");\n"+
- "DataObject shipTo = (DataObject) shipToList.get(0);");
-
- List shipToList = purchaseOrder.getList("shipTo");
- DataObject shipTo = (DataObject) shipToList.get(0);
-
-
-
- /*
- * With no model around, this next operation is currently quite cumbersome.
- * In future specifications accessing
- * the name element will be simplier and the user could simply execute:
- * List nameList = shipTo.getList("name"); String actualName = (String)
- * nameList.get(0);
- *
- * Or if name is an attribute ("") simply: String actualName = shipTo.getString("name");
- *
- * There are currently more elegant means to perform this task using the xPath support
- */
- List nameList = shipTo.getList("name");
- DataObject name = (DataObject) nameList.get(0);
- // access the contents of the name DataObject
- Sequence s = name.getSequence();
- String actualName = (String) s.getValue(0);
- System.out.println("Name being shipped to: " + actualName);
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java
deleted file mode 100644
index abe3434fab..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/DynamicCustomerTypeSample.java
+++ /dev/null
@@ -1,193 +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.samples.sdo.intermediate;
-
-import java.util.List;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * Demonstrates creating and using Types dynamically.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class DynamicCustomerTypeSample extends SampleBase {
- HelperContext scope;
-
- public DynamicCustomerTypeSample(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
- }
-
-
- /**
- * XSD file used to define the model and Types for Customer Dataobject
- */
- public static final String CUSTOMER_MODEL = "customer.xsd";
-
- /**
- * Default file name to use when generated customer XSD files.
- *
- * @see org.apache.tuscany.samples.sdo.specCodeSnippets.CreateXmlAndXsdFromDataObject
- */
- public static final String CUSTOMER_MODEL_GENERATED = "generatedCustomer.xsd";
-
- /**
- * Fake namespace used for Customer
- */
- public static final String CUSTOMER_NAMESPACE = "http://www.example.com/customer";
-
- /**
- * XML file used to populate Customer DataObjects
- */
- public static final String CUSTOMER_XML = "customer.xml";
-
- /**
- * Default file name to use when generated customer XML files.
- *
- * @see org.apache.tuscany.samples.sdo.specCodeSnippets.CreateXmlAndXsdFromDataObject
- */
- public static final String CUSTOMER_XML_GENERATED = "generatedCustomer.xml";
-
- /**
- * Drives sample methods
- *
- * @param args
- * no arguments required
- */
- public static void main(String[] args) {
-
- DynamicCustomerTypeSample sample =
- new DynamicCustomerTypeSample(COMMENTARY_FOR_INTERMEDIATE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.CREATE_TYPES_USING_THE_SDO_API
- };
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.SET_PROPERTIES_OF_DATAOBJECT_BY_NAME,
- SDOFacets.USING_BUILT_IN_TYPES,
- SDOFacets.SAVING_DATA_TO_XML
- };
-
- public void runSample () throws Exception {
-
- commentary(COMMENTARY_ALWAYS,
- "Demonstrates the use of the SDO API to build types dynamically\n"+
- "by building a data graph representing the type system and\n"+
- "submitting that graph to TypeHelper.define()");
-
-
- scope = createScopeForTypes();
-
-
- commentary("A TypeHelper is used for both looking up types, and later creating them\n\n"+
- "TypeHelper typeHelper = scope.getTypeHelper();");
-
- TypeHelper typeHelper = scope.getTypeHelper();
-
- commentary("We can look up existing types to use in the creation of Properties\n\n"+
- "Type intType = types.getType(\"commonj.sdo\", \"Int\");\n"+
- "Type stringType = types.getType(\"commonj.sdo\", \"String\");");
-
- Type intType = typeHelper.getType("commonj.sdo", "Int");
- Type stringType = typeHelper.getType("commonj.sdo", "String");
-
- commentary("To begin modeling the type system we create a DataObject with\n"+
- "Type \"commonj.sdo#Type\" and set the URI and name for that type\n\n"+
-
- "DataObject customerType = scope.getDataFactory().create(\"commonj.sdo\", \"Type\");\n"+
- "customerType.set(\"uri\", \"http://example.com/customer\");\n"+
- "customerType.set(\"name\", \"Customer\");");
-
- DataObject customerType = scope.getDataFactory().create("commonj.sdo", "Type");
- customerType.set("uri", "http://example.com/customer");
- customerType.set("name", "Customer");
-
- commentary("Now we can create a model for the Properties for the Type\n"+
- "and set the name and Types of those Properties\n\n"+
- "DataObject custNumProperty = customerType.createDataObject(\"property\");\n"+
- "custNumProperty.set(\"name\", \"custNum\");\n"+
- "custNumProperty.set(\"type\", intType);"
- );
-
- DataObject custNumProperty = customerType.createDataObject("property");
- custNumProperty.set("name", "custNum");
- custNumProperty.set("type", intType);
-
- commentary("We continue in this manner until all the Types and their Properties are modeled");
- DataObject lastNameProperty = customerType.createDataObject("property");
- lastNameProperty.set("name", "lastName");
- lastNameProperty.set("type", stringType);
-
- DataObject firstNameProperty = customerType.createDataObject("property");
- firstNameProperty.set("name", "firstName");
- firstNameProperty.set("type", stringType);
-
- commentary("Now that our type is fully modeled we submit the model to the TypeHelper\n"+
- "The new Type instance is returned to us, but is also available for lookup within\n"+
- "the scope associated with the TypeHelper\n\n"+
- "Type t = typeHelper.define(customerType);");
- Type t = typeHelper.define(customerType);
-
- commentary("Here we see the newly created Type being accessed via the TypeHelper\n"+
- "along with a printout of the Type's Properties\n\n"+
- "Type testType = scope.getTypeHelper().getType(\"http://example.com/customer\", \"Customer\");");
-
- Type testType = scope.getTypeHelper().getType("http://example.com/customer", "Customer");
- List props = testType.getProperties();
- for (int i = 0; i < props.size(); i++) {
- System.out.println(props.get(i));
- }
-
- commentary("Now we can create an instance of the type using the DataFactory associated with the type scope\n\n"+
- "DataFactory factory = scope.getDataFactory();\n"+
- "DataObject customer1 = factory.create(\"http://example.com/customer\", \"Customer\");");
-
- DataFactory factory = scope.getDataFactory();
- DataObject customer1 = factory.create("http://example.com/customer", "Customer");
- customer1.setInt("custNum", 1);
- customer1.set("firstName", "John");
- customer1.set("lastName", "Adams");
-
- commentary("Here's an XML String representing a DataObject we have created with the new type");
- String xmlDocString = scope.getXMLHelper().save(customer1, CUSTOMER_NAMESPACE, "customer");
- System.out.println(xmlDocString);
-
-
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/SerializingDeserializingADataObject.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/SerializingDeserializingADataObject.java
deleted file mode 100644
index eaecf436bf..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/SerializingDeserializingADataObject.java
+++ /dev/null
@@ -1,137 +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.samples.sdo.intermediate;
-
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.tuscany.samples.sdo.SampleBase;
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-/**
- * Demonstrates serializing and deserializing a DataObject to disk
- * using java serialization.
- *
- *
Running this Sample
See the main overview for instructions on how to run this
- * sample.
- */
-public class SerializingDeserializingADataObject extends SampleBase {
- HelperContext scope;
-
- public SerializingDeserializingADataObject(Integer userLevel) {
- super(userLevel, SAMPLE_LEVEL_INTERMEDIATE);
- }
-
-
- public static void main(String[] args) {
-
- SerializingDeserializingADataObject sample =
- new SerializingDeserializingADataObject(COMMENTARY_FOR_INTERMEDIATE);
- sample.run();
-
- }
-
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] CORE_FUNCTION = {
- SDOFacets.JAVA_SERIALIZATION_OF_DATA_GRAPH
- };
- /*
- * metadata for the sample documenting the areas of SDO that are explored
- */
- public static int [] SIGNIFICANT_FUNCTION = {
- SDOFacets.TESTING_FOR_GRAPH_EQUALITY
- };
-
- public void runSample () throws Exception {
-
- commentary(
- "Demonstrates serializing and deserializing a DataObject\n" +
- "to disk using Java serialization.");
-
- scope = useDefaultScopeForTypes();
- loadTypesFromXMLSchemaFile(scope, SampleInfrastructure.COMPANY_XSD);
- DataObject company = getDataObjectFromFile(scope, SampleInfrastructure.COMPANY_DATAOBJECT_XML);
-
-
- commentary("We've loaded a data graph 'company' from a file\n" +
- "using XML schema for the model and XML for the graph in the usual manner\n");
- String fileName = "temporarySerializedDataObject.xml";
- commentary("We've loaded a data graph 'company' from a file\n" +
- "using XML schema for the model and XML for the graph in the usual manner\n" +
- "Now we are going to serialize it to, and read it from a temporary file: "+fileName);
-
- commentary(
- "The following code, which doesn't use any SDO APIs, demonstrates the\n" +
- "underlying SDO function of performing Java serialization on SDO objects\n\n" +
- "FileOutputStream fos = new FileOutputStream(fileName);\n" +
- "ObjectOutputStream out = new ObjectOutputStream(fos);\n" +
- "out.writeObject(company);\n" +
- "out.close();");
-
- FileOutputStream fos = new FileOutputStream(fileName);
- ObjectOutputStream out = new ObjectOutputStream(fos);
- out.writeObject(company);
- out.close();
-
- // read in DataObject
- commentary("Having written the data graph to the temporary file we\n" +
- "can read it back\n\n" +
- "FileInputStream fis = new FileInputStream(fileName);\n" +
- "ObjectInputStream input = new ObjectInputStream(fis);\n" +
- "DataObject newDataObject = (DataObject) input.readObject();\n" +
- "input.close();");
-
- FileInputStream fis = new FileInputStream(fileName);
- ObjectInputStream input = new ObjectInputStream(fis);
- DataObject newDataObject = (DataObject) input.readObject();
- input.close();
-
- /**
- * Compare data graphs
- */
-
- commentary("We can use the SDO EqualityHelper to check that we have got\n" +
- "back an equivalent graph to the one we had originally\n\n" +
- "boolean equal = scope.getEqualityHelper().equal(company, newDataObject);");
-
- boolean equal = scope.getEqualityHelper().equal(company, newDataObject);
- System.out.println("DataObjects are equal: " + equal);
-
- //print out xml representation
- System.out.println();
- System.out.println("Original company DataObject:");
- System.out.println(scope.getXMLHelper().save(company, SampleInfrastructure.COMPANY_NAMESPACE, "company"));
-
- System.out.println();
- System.out.println("Deserialized company DataObject:");
- System.out.println(scope.getXMLHelper().save(newDataObject, SampleInfrastructure.COMPANY_NAMESPACE, "company"));
-
-
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/package.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/package.html
deleted file mode 100644
index 59ea1c39e6..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/intermediate/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- Intermediate SDO Samples
-
-
-
Intermediate Service Data Object (SDO) Sample Programs
-
Running the Samples
See the main overview for instructions on how to run these
-samples.
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/DocumentSamples.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/DocumentSamples.java
deleted file mode 100644
index af20cb663a..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/DocumentSamples.java
+++ /dev/null
@@ -1,218 +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.samples.sdo.internal;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.tuscany.samples.sdo.internal.SampleInfrastructure.SDOFacets;
-
-
-/**
- * Class to generate html documentation for the SDO Samples.
- * The program introspects the sample programs listed in the
- * {@link SampleInfrastructure#sampleClasses sample classes}
- * static constant, for the values of the static CORE_FUNCTION
- * and SIGNIFICANT_FUNCTION variables.
- *
- * It builds indexes from
- * sample to function and from function to sample and creates
- * html output that displays these indexes.
- */
-public class DocumentSamples {
-
- private Map classToCoreFunction = new HashMap();
- private Map coreFunctionToClass = new HashMap();
- private Map classToSignificantFunction = new HashMap();
- private Map significantFunctionToClass = new HashMap();
-
- public static void main(String[] args) throws SecurityException,
- NoSuchMethodException, IllegalArgumentException, InstantiationException,
- IllegalAccessException, InvocationTargetException, IOException {
-
- DocumentSamples ds = new DocumentSamples();
- ds.run();
-
- }
-
- private static String HTML_HEADER =
- "\n" +
- "\n" +
- " \n"+
- " \n"+
- "
SDO Samples\n" +
- "
SDO Samples
\n" +
- "
\n" +
- "The samples provided in the Tuscany SDO distribution cover many areas of\n" +
- "the SDO API. Here we provide two indexes into the samples. The first lists\n" +
- "each sample in sequence and details the central theme(s) of the sample.\n" +
- "It also mentions if the sample significantly demonstrates other areas in passing.\n" +
- "The second index lists all the themes that are covered by these samples, and\n" +
- "indicates which of the samples has that subject area as a central theme or as\n" +
- "demonstrates the subject area significant as an incidental part of the sample.";
-
- private static String CLASSES_HEADING =
- "
\n");
- if(coreFunctionToClass.keySet().contains(fobj)) {
- doc.append("Samples which demonstrate this as their core function \n");
- Set classesWithFunction = (Set)coreFunctionToClass.get(fobj);
- for(Iterator cwf = classesWithFunction.iterator(); cwf.hasNext();) {
- Class c = (Class)cwf.next();
- doc.append(getSimpleName(c)).append(" \n");
- }
- }
- if(significantFunctionToClass.keySet().contains(fobj)) {
- doc.append("Samples which demonstrate this in addition to their core function \n");
- Set classesWithFunction = (Set)significantFunctionToClass.get(fobj);
- for(Iterator cwf = classesWithFunction.iterator(); cwf.hasNext();) {
- Class c = (Class)cwf.next();
- doc.append(getSimpleName(c)).append(" \n");
- }
- }
-
- }
-
- doc.append(HTML_FOOTER);
- System.out.println(doc);
- }
-
- private int[] recordFunction(Class c, Field functionIndices, Map ftoc, Map ctof)
- throws IllegalAccessException {
- int[] functions = (int[]) functionIndices.get(c);
- for (int j = 0; j < functions.length; j++) {
- addClassesToFunction(ftoc, functions[j], c);
- }
- ctof.put(c, functions);
- return functions;
- }
-
- private void addClassesToFunction(Map functionToClass, int i, Class c) {
- Integer iobj = new Integer(i);
- if (!functionToClass.containsKey(iobj)) {
- functionToClass.put(iobj, new HashSet());
- }
- ((Set) (functionToClass.get(iobj))).add(c);
- }
-
- private String getSimpleName(Class c) {
- String result = c.getName();
- int lastDot = result.lastIndexOf('.');
- if(lastDot != -1) {
- result = result.substring(lastDot+1);
- }
- return result;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/SampleInfrastructure.java b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/SampleInfrastructure.java
deleted file mode 100644
index aa65cbad6d..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/internal/SampleInfrastructure.java
+++ /dev/null
@@ -1,330 +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.samples.sdo.internal;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.tuscany.samples.sdo.advanced.MedicalScenario;
-import org.apache.tuscany.samples.sdo.advanced.MedicalScenarioWithChangeMonitoring;
-import org.apache.tuscany.samples.sdo.advanced.ObtainingDataGraphFromXml;
-import org.apache.tuscany.samples.sdo.advanced.PrintDataGraph;
-import org.apache.tuscany.samples.sdo.basic.AccessDataObjectPropertiesByName;
-import org.apache.tuscany.samples.sdo.basic.AccessingTheContentsOfASequence;
-import org.apache.tuscany.samples.sdo.basic.CreateCompany;
-import org.apache.tuscany.samples.sdo.basic.CreatePurchaseOrder;
-import org.apache.tuscany.samples.sdo.basic.ReadPurchaseOrder;
-import org.apache.tuscany.samples.sdo.intermediate.AccessDataObjectUsingValidXPath;
-import org.apache.tuscany.samples.sdo.intermediate.AccessingDataObjectsViaPropertyIndex;
-import org.apache.tuscany.samples.sdo.intermediate.CreateCompanyTuscanyAPI;
-import org.apache.tuscany.samples.sdo.intermediate.CreateDataObjectFromXmlString;
-import org.apache.tuscany.samples.sdo.intermediate.DynamicCustomerTypeSample;
-import org.apache.tuscany.samples.sdo.intermediate.SerializingDeserializingADataObject;
-
-/**
- * One of a pair of base classes for samples. This one contains all the
- * infrastructure code that a person wanting to learn SDO would not want to look
- * at.
- */
-public abstract class SampleInfrastructure {
-
- protected int sampleComplexityLevel = SAMPLE_LEVEL_BASIC.intValue();
- protected int commentaryLevel = COMMENTARY_FOR_NOVICE.intValue();
-
- /**
- * Here's the list of sample programs
- */
- public static final Class[] sampleClasses = {
- CreateCompany.class,
- ReadPurchaseOrder.class,
- CreatePurchaseOrder.class,
- AccessDataObjectPropertiesByName.class,
- AccessingTheContentsOfASequence.class,
-
- AccessDataObjectUsingValidXPath.class,
- DynamicCustomerTypeSample.class,
- CreateCompanyTuscanyAPI.class,
- CreateDataObjectFromXmlString.class,
- SerializingDeserializingADataObject.class,
- AccessingDataObjectsViaPropertyIndex.class,
-
- ObtainingDataGraphFromXml.class,
- PrintDataGraph.class,
- MedicalScenario.class,
- MedicalScenarioWithChangeMonitoring.class
-
- };
-
- public static class SDOFacets {
- public static final int GET_PROPERTIES_OF_DATAOBJECT_BY_NAME = 1;
- public static final int SET_PROPERTIES_OF_DATAOBJECT_BY_NAME = 2;
- public static final int CREATE_DATAOBJECTS_BY_NAME = 3;
- public static final int GET_SET_PROPERTIES_OF_DATAOBJECT_BY_INDEX = 4;
- public static final int GET_SET_PROPERTIES_BY_INSTANCE_PROPERTIES = 5;
- public static final int GET_SET_PROPERTIES_OF_DATAOBJECT_BY_XPATH = 6;
- public static final int ISMANY_PROPERTIES = 7;
- public static final int CONTAINMENT = 8;
- public static final int CREATE_TYPES_USING_THE_SDO_API = 9;
- public static final int CREATE_TYPES_USING_XML_SCHEMA = 10;
- public static final int CREATE_TYPES_USING_THE_TUSCANY_API = 11;
- public static final int USING_BUILT_IN_TYPES = 12;
- public static final int ACCESSING_VALUES_IN_A_SEQUENCE = 13;
- public static final int GENERIC_DATA_GRAPH_TRAVERSAL = 14;
- public static final int LOADING_DATA_FROM_XML = 15;
- public static final int SAVING_DATA_TO_XML = 16;
- public static final int CHANGE_MONITORING_USING_A_DATAGRAPH = 17;
- public static final int CHANGE_MONITORING_USING_A_CHANGESUMMARY_PROPERTY_ON_A_DATAOBJECT = 18;
- public static final int WRAPPING_DATA_GRAPH_IN_A_DATAGRAPH_INSTANCE = 19;
- public static final int OPEN_CONTENT = 20;
- public static final int NON_CONTAINMENT = 21;
- public static final int CREATE_XML_SCHEMA_FROM_TYPES = 22;
- public static final int JAVA_SERIALIZATION_OF_DATA_GRAPH = 23;
- public static final int TESTING_FOR_GRAPH_EQUALITY = 24;
-
- public static final String [] subject_areas = {
- "",
- "Get Properties of DataObject by name",
- "Set Properties of DataObject by name",
- "Create DataObjects by name",
- "Get/Set Properties of DataObject by index",
- "Get/Set Properties by Instance Properties",
- "Get/Set Properties of DataObject by Xpath",
- "isMany Properties","Containment",
- "Create Types using the SDO API",
- "Create Types using XML Schema",
- "Create Types using the Tuscany API",
- "Using Built-in Types",
- "Accessing values in a Sequence",
- "Generic data graph traversal",
- "Loading data from XML",
- "Saving data to XML",
- "Change Monitoring using a DataGraph",
- "Change Monitoring using a ChangeSummary Property on a DataObject",
- "Wrapping data graph in a DataGraph instance",
- "Open Content","Non-Containment",
- "Create XML Schema from Types",
- "Java Serialization of data graph",
- "Testing for Graph Equality"
- };
- }
-
-
- /*
- * keep a record of what's been said, so that if alternative terse text is
- * offered, the verbose text need not be repeated for repeat actions.
- */
- private static Set commentaryHistory = new HashSet();
-
- public SampleInfrastructure(Integer commentaryLevel) {
- this.commentaryLevel = commentaryLevel.intValue();
- }
-
- public SampleInfrastructure(Integer commentaryLevel, Integer sampLevel) {
- this.commentaryLevel = commentaryLevel.intValue();
- this.sampleComplexityLevel = sampLevel.intValue();
- }
-
- private static String hrule = "********************************************";
-
- /*
- * Constants which allow the sample program infrastructure to understand the
- * complexity of a sample program.
- */
- protected static final Integer SAMPLE_LEVEL_BASIC = new Integer(0);
- protected static final Integer SAMPLE_LEVEL_INTERMEDIATE = new Integer(1);
- protected static final Integer SAMPLE_LEVEL_ADVANCED = new Integer(2);
-
- /*
- * Constants which can be used to reduce the amount of information output by
- * an executing sample program.
- */
- protected static final Integer COMMENTARY_FOR_NOVICE = new Integer(0);
- protected static final Integer COMMENTARY_FOR_INTERMEDIATE = new Integer(1);
- protected static final Integer COMMENTARY_FOR_ADVANCED = new Integer(2);
- protected static final Integer COMMENTARY_ALWAYS = new Integer(3);
-
- protected static final String[] userLevels = { "novice", "intermediate",
- "advanced" };
-
- /*
- * Various constants that reference resources etc shared between the samples
- */
- public static final String COMPANY_DATAOBJECT_XML = "companyGenerated.xml";
- public static final String COMPANY_DATAGRAPH_XML = "companyDataGraphGenerated.xml";
- public static final String COMPANY_XSD = "company.xsd";
- public static final String COMPANY_NAMESPACE = "company.xsd";
- public static final String PO_NAMESPACE = "http://www.example.com/PO";
- public static final String PO_XML_GENERATED = "temporaryPoGenerated.xml";
- public static final String PO_XML_RESOURCE = "po.xml";
- public static final String PO_XSD_RESOURCE = "po.xsd";
-
-
- public void banner(char borderChar, String text) {
- if (text == null || text.length() == 0) {
- System.out.println(hrule);
- return;
- }
- String[] lines = text.split("\n");
- int maxlinelen = 0;
-
- for (int i = 0; i < lines.length; i++) {
- maxlinelen = lines[i].length() > maxlinelen ? lines[i].length()
- : maxlinelen;
- }
-
- StringBuffer buf = new StringBuffer();
- for (int p = 0; p < maxlinelen + 4; p++) {
- buf.append(borderChar);
- }
- buf.append("\n");
- for (int l = 0; l < lines.length; l++) {
- buf.append(borderChar).append(" ");
- buf.append(lines[l]);
- for (int rem = lines[l].length() + 2; rem < maxlinelen + 3; rem++)
- buf.append(" ");
- buf.append(borderChar).append("\n");
- }
- for (int p = 0; p < maxlinelen + 4; p++) {
- buf.append(borderChar);
- }
- buf.append("\n");
- System.out.println(buf.toString());
- }
-
- public void banner(String text) {
- banner('-', text);
- }
-
- protected void commentary(String text, String repeatText) {
- commentary(new Integer(sampleComplexityLevel), text, repeatText);
-
- }
-
- protected void commentary(Integer commentLevel, String text, String repeatText) {
-
- if (commentLevel.intValue() < commentaryLevel)
- return;
-
- if (repeatText != null) {
- boolean alreadySeen = commentaryHistory.contains(text);
- if (alreadySeen) {
- commentary(commentLevel, repeatText);
- } else {
- commentary(commentLevel, text);
- commentaryHistory.add(text);
- }
- } else {
- commentary(commentLevel, text);
- }
-
- }
-
- protected void commentary(Integer commentLevel, String text) {
- if (commentLevel.intValue() >= commentaryLevel) {
- banner(text);
- }
- }
-
- /*
- * convenience method to allow commentary level to default to that of the
- * sample's complexity
- */
- protected void commentary(String text) {
- commentary(new Integer(getSampleComplexityLevel()), text);
- }
-
- public void somethingUnexpectedHasHappened(Exception e) {
- banner(
- '!',
- "Something unexpected has gone wrong with the execution of this sample program\n"
- + "Please take a look at the exception and see if its something wrong with your environment\n"
- + "If you can't figure it out please send a note to the tuscany-user@ws.apache.org mailing list\n"
- + "including the text of the exception and any other useful information, thanks");
-
- e.printStackTrace();
- }
-
- /**
- * Utility method to obtain information from the user about whether or not
- * they would like to use a DataGraph or simply use a DataObject
- *
- * @return whether or not a DataGraph should be used
- * @throws Exception
- */
- protected boolean yesOrNoFromUser(String question) throws Exception {
-
- System.out.print(question + " {y,n} :");
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- String answer = in.readLine();
- while ((!answer.equalsIgnoreCase("n")) && (!answer.equalsIgnoreCase("y"))) {
-
- System.out.println();
- System.out.print("Sorry, please enter 'y' or 'n':");
- answer = in.readLine();
- }
- System.out.println();
-
- if (answer.equalsIgnoreCase("y")) {
- return true;
- } else {
- return false;
- }
- }
-
- public void run() {
-
- commentary(
- COMMENTARY_FOR_INTERMEDIATE,
- "Running with commentary level for a "
- + userLevels[commentaryLevel]
- + " user\n"
- + "Edit the sample program's constructor argument to one from\n"
- + "COMMENTARY_FOR_NOVICE\nCOMMENTARY_FOR_INTERMEDIATE or\nCOMMENTARY_FOR_ADVANCED\n"
- + "in order to alter the level of commentary you are seeing", "");
-
- commentary(COMMENTARY_ALWAYS, " Tuscany SDO Java Sample "
- + this.getClass().getName() + " \n"
- + " This sample is aimed at a " + userLevels[sampleComplexityLevel]
- + " user");
-
- try {
- runSample();
- } catch (Exception e) {
- somethingUnexpectedHasHappened(e);
- } finally {
- commentary(COMMENTARY_ALWAYS, " End of sample "
- + this.getClass().getName() + " ");
- }
- }
-
- public abstract void runSample() throws Exception;
-
- public int getSampleComplexityLevel() {
- return sampleComplexityLevel;
- }
-
- public void setSampleComplexityLevel(Integer sampleComplexityLevel) {
- this.sampleComplexityLevel = sampleComplexityLevel.intValue();
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/overview.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/overview.html
deleted file mode 100644
index b4fc183800..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/overview.html
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
- SDO Sample Overview
-
-
-
Tuscany Service Data Object (SDO) Sample Programs
Overview
-Apache Tuscany SDO samples
-are provided here to help users learn SDO.
-The index by SDO
-subject areas lists the different samples available
-to you. These samples provide a starting point for learning SDO and can be
-extended and enhanced to experiment with other available SDO features.
-Please help us enhance these samples by sending your feedback to Tuscany
-mailing list or join us and contribute to this
-project.
-
-
-These samples are coded to the SDO 2.1 API defined
-here
-
-
-These samples provide a place to begin learning and experimenting with the SDO
-API and programming model. Developers are encouraged to extend and experiment
-with the current set of samples. If a sample is unclear, is missing
-documentation, or does not cover a desired area, please send feedback to the
-Tuscany mailing lists, or better still send us a patch or join the Tuscany team
-and contribute back to the project.
-
-
Running the Samples from a Binary Distribution of Apache Tuscany
-
The
-SDO samples have been written to be useful in learning SDO, even without
-reference to the sample source code. The samples output commentary as they
-execute and key lines of source code are output too. One of the sample programs
-(ExecuteSamples) executes all the other samples in sequence. The binary
-distribution includes the sample source code too, so that you can investigate
-further if you wish.
-
-
-The binary distribution of Tuscany contains a pair of scripts to execute the
-ExecuteSamples program (runsamples.bat and runsamples.sh). To execute the
-samples first locate the appropriate script for your environment in the samples
-directory of the binary distribution and set the value of the BINARY_BASE
-variable to be the directory in your file system that contains the lib and
-samples directories. Then run the script and take a look at the output. After
-that, copy and modify the script to suit your own purposes in running the other
-samples.
-
-
Running the Samples from a Source Distribution of Apache Tuscany
-
-The
-samples depend on the following libraries
-
-
-
- The samples themselves, the SDO 2.1 API and the Tuscany SDO
- Implementation
-
-
- sample-sdo-{tuscany-version}.jar - SDO API
-
-
- sdo-api-r2.1-{tuscany-version}.jar - SDO API
-
-
- tuscany-sdo-lib-{tuscany-version}.jar - Tuscany APIs and support
- function
-
- common-{version}.jar - some common framework utility and base classes
-
-
- ecore-{version}.jar - the EMF core runtime implementation classes (the Ecore
- metamodel)
-
-
- ecore-change-{version}.jar - the EMF change recorder and framework
-
-
- ecore-xmi-{version}.jar - EMF's default XML (and XMI) serializer and loader
-
-
- xsd-{version}.jar - the XML Schema model
-
-
-
-
And the StAX API
-
-
stax-api-1.0.1.jar
-
-
-
-If you are running these samples as a result of building Tuscany SDO for Java
-from a Tuscany source distribution using maven then these dependencies will be
-resolved by having followed the instructions in the BUILDING file at the root of
-the source distribution.
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/package.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/package.html
deleted file mode 100644
index c1335e6e5b..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/package.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- package information
-
-
-Provides common constants and a command line java interface for executing samples.
-
Related Documentation
-For overviews, tutorials, examples, guides, and tool documentation, please see the
- SDO Java Overview
-
-section of the Tuscany website.
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/sampleProgramContents.html b/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/sampleProgramContents.html
deleted file mode 100644
index cc646ed3a9..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/java/org/apache/tuscany/samples/sdo/sampleProgramContents.html
+++ /dev/null
@@ -1,243 +0,0 @@
-
-
-
-SDO Samples
-
SDO Samples
-
-The samples provided in the Tuscany SDO distribution cover many areas of
-the SDO API. Here we provide two indexes into the samples. The first lists
-each sample in sequence and details the central theme(s) of the sample.
-It also mentions if the sample significantly demonstrates other areas in passing.
-The second index lists all the themes that are covered by these samples, and
-indicates which of the samples has that subject area as a central theme or as
-demonstrates the subject area significant as an incidental part of the sample.
-Samples which demonstrate this as their core function
-AccessDataObjectPropertiesByName
-Samples which demonstrate this in addition to their core function
-ReadPurchaseOrder
-
-
Set Properties of DataObject by name
-Samples which demonstrate this as their core function
-CreateCompany
-CreateCompanyTuscanyAPI
-Samples which demonstrate this in addition to their core function
-DynamicCustomerTypeSample
-
-
Create DataObjects by name
-Samples which demonstrate this in addition to their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Get/Set Properties of DataObject by index
-Samples which demonstrate this as their core function
-AccessingDataObjectsViaPropertyIndex
-
-
Get/Set Properties by Instance Properties
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Get/Set Properties of DataObject by Xpath
-Samples which demonstrate this as their core function
-AccessDataObjectUsingValidXPath
-
-
isMany Properties
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Containment
-Samples which demonstrate this as their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Create Types using the SDO API
-Samples which demonstrate this as their core function
-MedicalScenario
-DynamicCustomerTypeSample
-MedicalScenarioWithChangeMonitoring
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Create Types using XML Schema
-Samples which demonstrate this as their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Create Types using the Tuscany API
-
-
Using Built-in Types
-Samples which demonstrate this as their core function
-CreateDataObjectFromXmlString
-Samples which demonstrate this in addition to their core function
-ObtainingDataGraphFromXml
-DynamicCustomerTypeSample
-
-
Accessing values in a Sequence
-Samples which demonstrate this as their core function
-AccessingTheContentsOfASequence
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Generic data graph traversal
-Samples which demonstrate this as their core function
-PrintDataGraph
-Samples which demonstrate this in addition to their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Loading data from XML
-Samples which demonstrate this as their core function
-CreateDataObjectFromXmlString
-CreatePurchaseOrder
-ReadPurchaseOrder
-
-
Saving data to XML
-Samples which demonstrate this as their core function
-CreatePurchaseOrder
-ReadPurchaseOrder
-Samples which demonstrate this in addition to their core function
-MedicalScenario
-DynamicCustomerTypeSample
-MedicalScenarioWithChangeMonitoring
-
-
Change Monitoring using a DataGraph
-
-
Change Monitoring using a ChangeSummary Property on a DataObject
-Samples which demonstrate this as their core function
-MedicalScenarioWithChangeMonitoring
-
-
Wrapping data graph in a DataGraph instance
-Samples which demonstrate this as their core function
-ObtainingDataGraphFromXml
-
-
Open Content
-Samples which demonstrate this as their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-
-
Non-Containment
-Samples which demonstrate this as their core function
-MedicalScenario
-MedicalScenarioWithChangeMonitoring
-Samples which demonstrate this in addition to their core function
-PrintDataGraph
-
-
Create XML Schema from Types
-
-
Java Serialization of data graph
-Samples which demonstrate this as their core function
-SerializingDeserializingADataObject
-
-
Testing for Graph Equality
-Samples which demonstrate this in addition to their core function
-SerializingDeserializingADataObject
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/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.1.1-incubating/sample/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9f9572a167..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest.xsd
deleted file mode 100644
index 34ae528148..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest.xsd
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest_CS.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest_CS.xsd
deleted file mode 100644
index 668c023bc6..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/MedicalTest_CS.xsd
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/People.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/People.xsd
deleted file mode 100644
index b9e59701ae..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/People.xsd
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/company.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/company.xsd
deleted file mode 100644
index c699f89e31..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/company.xsd
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyCompleteDataGraph.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyCompleteDataGraph.xml
deleted file mode 100644
index f636f2131e..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyCompleteDataGraph.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraph.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraph.xml
deleted file mode 100644
index 7114b98fdf..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraph.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraphGenerated.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraphGenerated.xml
deleted file mode 100644
index a99e71bbaa..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyDataGraphGenerated.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyGenerated.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyGenerated.xml
deleted file mode 100644
index 0108e67a4b..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/companyGenerated.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/doc-files/cmdPrompt.GIF b/branches/sdo-1.1.1-incubating/sample/src/main/resources/doc-files/cmdPrompt.GIF
deleted file mode 100644
index ad2fbbf46f..0000000000
Binary files a/branches/sdo-1.1.1-incubating/sample/src/main/resources/doc-files/cmdPrompt.GIF and /dev/null differ
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xml
deleted file mode 100644
index 85e0bd42b8..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-August 1, 2003Mutual of Omaha Wild Kingdom, USA DearCasyCrocodilePlease buy more shark repellent. Your premium is past due.
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xsd
deleted file mode 100644
index e6e077ff75..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/letter.xsd
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xml b/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xml
deleted file mode 100644
index e44cb07720..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
- Robbie Minshall
- 123 Maple Street
- Mill Valley
- CA
- 90952
-
-
- Robert Smith
- 8 Oak Avenue
- Mill Valley
- PA
- 95819
-
- Hurry, my lawn is going wild!
-
-
- Lawnmower
- 148.95
- 1
- Confirm this is electric
-
-
- Baby Monitor
- 39.98
- 1
- 1999-05-21
-
-
- GrassSeed
- 50
- 100
- For Shade
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xsd b/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xsd
deleted file mode 100644
index 8929775d49..0000000000
--- a/branches/sdo-1.1.1-incubating/sample/src/main/resources/po.xsd
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/pom.xml b/branches/sdo-1.1.1-incubating/sdo-api/pom.xml
deleted file mode 100644
index f1792bac16..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/pom.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
- 4.0.0
-
- org.apache.tuscany
- parent
- 2-incubating
-
- org.apache.tuscany.sdo
- tuscany-sdo-api-r${specVersion}
- jar
- 1.1.1-incubating-SNAPSHOT
- SDO API
- API classes for Service Data Objects
-
-
- 2.1
-
-
-
-
-
- apache.snapshots
- Apache Snapshot Repository
- http://people.apache.org/repo/m2-snapshot-repository
-
- false
-
-
- true
-
-
-
- apache.incubator
- Apache Incubator Repository
- http://people.apache.org/repo/m2-incubating-repository/
-
- true
-
-
- false
-
-
-
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.3
-
-
- **/*TestCase.java
-
- brief
- false
- once
- -ea
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.4
- 1.4
-
-
-
-
- maven-jar-plugin
-
-
- ${project.build.outputDirectory}/META-INF/MANIFEST.MF
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- 1.4.0
- true
-
-
- bundle-manifest
- process-classes
-
- manifest
-
-
-
-
-
- ${pom.name}
- ${specVersion}
- ${pom.description}
- ${pom.organization.name}
- plugin
- org.apache.tuscany.sdo.spec
-
- commonj.sdo;version="${specVersion}", commonj.sdo.helper;version="${specVersion}",
- commonj.sdo.impl;version="${specVersion}"
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
- 2.0
-
-
-
- package
- package
-
- jar
-
-
-
-
-
- install
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/ChangeSummary.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/ChangeSummary.java
deleted file mode 100644
index 72d694da45..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/ChangeSummary.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-import java.util.List;
-
-/**
- * A change summary is used to record changes to DataObjects,
- * allowing applications to efficiently and incrementally update back-end storage when required.
- */
-public interface ChangeSummary
-{
- /**
- * Indicates whether change logging is on (true) or off (false).
- * @return true if change logging is on.
- * @see #beginLogging
- * @see #endLogging
- */
- boolean isLogging();
-
- /**
- * Returns the {@link DataGraph data graph} associated with this change summary or null.
- * @return the data graph.
- * @see DataGraph#getChangeSummary
- */
- DataGraph getDataGraph();
-
- /**
- * Returns a list consisting of all the {@link DataObject data objects} that have been changed while {@link #isLogging logging}.
- *
- * The {@link #isCreated new} and {@link #isModified modified} objects in the List are references to objects
- * associated with this ChangeSummary.
- * The {@link #isDeleted deleted} objects in the List are references to objects
- * at the time that event logging was enabled;
- *
Each changed object must have exactly one of the following methods return true:
- * {@link #isCreated isCreated},
- * {@link #isDeleted isDeleted}, or
- * {@link #isModified isModified}.
- * @return a list of changed data objects.
- * @see #isCreated(DataObject)
- * @see #isDeleted(DataObject)
- * @see #isModified(DataObject)
- */
- List /*DataObject*/ getChangedDataObjects();
-
- /**
- * Returns whether or not the specified data object was created while {@link #isLogging logging}.
- * Any object that was added to the scope
- * but was not in the scope when logging began,
- * will be considered created.
- * @param dataObject the data object in question.
- * @return true if the specified data object was created.
- * @see #getChangedDataObjects
- */
- boolean isCreated(DataObject dataObject);
-
- /**
- * Returns whether or not the specified data object was deleted while {@link #isLogging logging}.
- * Any object that is not in scope but was in scope when logging began
- * will be considered deleted.
- * @param dataObject the data object in question.
- * @return true if the specified data object was deleted.
- * @see #getChangedDataObjects
- */
- boolean isDeleted(DataObject dataObject);
-
- /**
- * A setting encapsulates a {@link Property property} and a corresponding single value of the property's {@link Property#getType type}.
- */
- public interface Setting
- {
- /**
- * Returns the property of the setting.
- * @return the setting property.
- */
- Property getProperty();
-
- /**
- * Returns the value of the setting.
- * @return the setting value.
- */
- Object getValue();
-
- /**
- * Returns whether or not the property is set.
- * @return true if the property is set.
- */
- boolean isSet();
- }
-
- /**
- * Returns a list of {@link ChangeSummary.Setting settings}
- * that represent the property values of the given dataObject
- * at the point when logging {@link #beginLogging() began}.
- *
In the case of a {@link #isDeleted(DataObject) deleted} object,
- * the List will include settings for all the Properties.
- *
An old value setting indicates the value at the
- * point logging begins. A setting is only produced for
- * {@link #isModified modified} objects if
- * either the old value differs from the current value or
- * if the isSet differs from the current value.
- *
No settings are produced for {@link #isCreated created} objects.
- * @param dataObject the object in question.
- * @return a list of settings.
- * @see #getChangedDataObjects
- */
- List /*ChangeSummary.Setting*/ getOldValues(DataObject dataObject);
-
- /**
- * Clears the List of {@link #getChangedDataObjects changes} and turns change logging on.
- * No operation occurs if logging is already on.
- * @see #endLogging
- * @see #isLogging
- */
- void beginLogging();
-
- /**
- * An implementation that requires logging may throw an UnsupportedOperationException.
- * Turns change logging off. No operation occurs if logging is already off.
- * @see #beginLogging
- * @see #isLogging
- */
- void endLogging();
-
-
- /**
- * Returns whether or not the specified data object was updated while {@link #isLogging logging}.
- * An object that was contained in the scope when logging began
- * and remains in the scope when logging ends will be considered potentially modified.
- *
An object considered modified must have at least one old value setting.
- * @param dataObject the data object in question.
- * @return true if the specified data object was modified.
- * @see #getChangedDataObjects
- */
- boolean isModified(DataObject dataObject);
-
- /**
- * Returns the ChangeSummary root DataObject - the object from which
- * changes are tracked.
- * When a DataGraph is used, this is the same as getDataGraph().getRootObject().
- * @return the ChangeSummary root DataObject
- */
- DataObject getRootObject();
-
- /**
- * Returns a {@link ChangeSummary.Setting setting} for the specified property
- * representing the property value of the given dataObject
- * at the point when logging {@link #beginLogging() began}.
- *
Returns null if the property was not modified and
- * has not been {@link #isDeleted(DataObject) deleted}.
- * @param dataObject the object in question.
- * @param property the property of the object.
- * @return the Setting for the specified property.
- * @see #getChangedDataObjects
- */
- Setting getOldValue(DataObject dataObject, Property property);
-
- /**
- * Returns the value of the {@link DataObject#getContainer container} data object
- * at the point when logging {@link #beginLogging() began}.
- * @param dataObject the object in question.
- * @return the old container data object.
- */
- DataObject getOldContainer(DataObject dataObject);
-
- /**
- * Returns the value of the {@link DataObject#getContainmentProperty containment property} data object property
- * at the point when logging {@link #beginLogging() began}.
- * @param dataObject the object in question.
- * @return the old containment property.
- */
- Property getOldContainmentProperty(DataObject dataObject);
-
- /**
- * Returns the value of the {@link DataObject#getSequence sequence} for the data object
- * at the point when logging {@link #beginLogging() began}.
- * @param dataObject the object in question.
- * @return the old containment property.
- */
- Sequence getOldSequence(DataObject dataObject);
-
- /**
- * This method is intended for use by service implementations only.
- * Undoes all changes in the log to restore the tree of
- * DataObjects to its original state when logging began.
- * isLogging() is unchanged. The log is cleared.
- * @see #beginLogging
- * @see #endLogging
- * @see #isLogging
- */
- void undoChanges();
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataGraph.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataGraph.java
deleted file mode 100644
index f583cbf0a3..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataGraph.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-import java.io.Serializable;
-
-/**
- * A data graph is used to package a graph of {@link DataObject data objects} along with their
- * metadata, that is, data describing the data.
- * A data graph also contains a {@link #getChangeSummary change summary}
- * which is used to record changes made to the objects in the graph.
- */
-
-public interface DataGraph extends Serializable
-{
- /**
- * Returns the root {@link DataObject data object} of this data graph.
- * @return the root data object.
- * @see DataObject#getDataGraph
- */
- DataObject getRootObject();
-
- /**
- * Returns the {@link ChangeSummary change summary} associated with this data graph.
- * @return the change summary.
- * @see ChangeSummary#getDataGraph
- */
- ChangeSummary getChangeSummary();
-
- /**
- * Returns the {@link Type type} with the given the {@link Type#getURI() URI},
- * or contained by the resource at the given URI,
- * and with the given {@link Type#getName name}.
- * @param uri the namespace URI of a type or the location URI of a resource containing a type.
- * @param typeName name of a type.
- * @return the type with the corresponding namespace and name.
- */
- Type getType(String uri, String typeName);
-
- /**
- * Creates a new root data object of the {@link #getType specified type}.
- * An exception is thrown if a root object exists.
- * @param namespaceURI namespace of the type.
- * @param typeName name of the type.
- * @return the new root.
- * @throws IllegalStateException if the root object already exists.
- * @see #createRootObject(Type)
- * @see #getType(String, String)
- */
- DataObject createRootObject(String namespaceURI, String typeName);
-
- /**
- * Creates a new root data object of the specified type.
- * An exception is thrown if a root object exists.
- * @param type the type of the new root.
- * @return the new root.
- * @throws IllegalStateException if the root object already exists.
- * @see #createRootObject(String, String)
- */
- DataObject createRootObject(Type type);
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataObject.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataObject.java
deleted file mode 100644
index fb592fcf58..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/DataObject.java
+++ /dev/null
@@ -1,1121 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.List;
-
-/**
- * A data object is a representation of some structured data.
- * It is the fundamental component in the SDO (Service Data Objects) package.
- * Data objects support reflection, path-based accesss, convenience creation and deletion methods,
- * and the ability to be part of a {@link DataGraph data graph}.
- *
- * Each data object holds its data as a series of {@link Property Properties}.
- * Properties can be accessed by name, property index, or using the property meta object itself.
- * A data object can also contain references to other data objects, through reference-type Properties.
- *
- * A data object has a series of convenience accessors for its Properties.
- * These methods either use a path (String),
- * a property index,
- * or the {@link Property property's meta object} itself, to identify the property.
- * Some examples of the path-based accessors are as follows:
- *
- * DataObject company = ...;
- * company.get("name"); is the same as company.get(company.getType().getProperty("name"))
- * company.set("name", "acme");
- * company.get("department.0/name") is the same as ((DataObject)((List)company.get("department")).get(0)).get("name")
- * .n indexes from 0 ... implies the name property of the first department
- * company.get("department[1]/name") [] indexes from 1 ... implies the name property of the first department
- * company.get("department[number=123]") returns the first department where number=123
- * company.get("..") returns the containing data object
- * company.get("/") returns the root containing data object
- *
- *
There are general accessors for Properties, i.e., {@link #get(Property) get} and {@link #set(Property, Object) set},
- * as well as specific accessors for the primitive types and commonly used data types like
- * String, Date, List, BigInteger, and BigDecimal.
- */
-public interface DataObject extends Serializable
-{
- /**
- * Returns the value of a property of either this object or an object reachable from it, as identified by the
- * specified path.
- * @param path the path to a valid object and property.
- * @return the value of the specified property.
- * @see #get(Property)
- */
- Object get(String path);
-
- /**
- * Sets a property of either this object or an object reachable from it, as identified by the specified path,
- * to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void set(String path, Object value);
-
- /**
- * Returns whether a property of either this object or an object reachable from it, as identified by the specified path,
- * is considered to be set.
- * @param path the path to a valid object and property.
- * @see #isSet(Property)
- */
- boolean isSet(String path);
-
- /**
- * Unsets a property of either this object or an object reachable from it, as identified by the specified path.
- * @param path the path to a valid object and property.
- * @see #unset(Property)
- */
- void unset(String path);
-
- /**
- * Returns the value of a boolean property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the boolean value of the specified property.
- * @see #get(String)
- */
- boolean getBoolean(String path);
-
- /**
- * Returns the value of a byte property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the byte value of the specified property.
- * @see #get(String)
- */
- byte getByte(String path);
-
- /**
- * Returns the value of a char property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the char value of the specified property.
- * @see #get(String)
- */
- char getChar(String path);
-
- /**
- * Returns the value of a double property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the double value of the specified property.
- * @see #get(String)
- */
- double getDouble(String path);
-
- /**
- * Returns the value of a float property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the float value of the specified property.
- * @see #get(String)
- */
- float getFloat(String path);
-
- /**
- * Returns the value of a int property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the int value of the specified property.
- * @see #get(String)
- */
- int getInt(String path);
-
- /**
- * Returns the value of a long property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the long value of the specified property.
- * @see #get(String)
- */
- long getLong(String path);
-
- /**
- * Returns the value of a short property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the short value of the specified property.
- * @see #get(String)
- */
- short getShort(String path);
-
- /**
- * Returns the value of a byte[] property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the byte[] value of the specified property.
- * @see #get(String)
- */
- byte[] getBytes(String path);
-
- /**
- * Returns the value of a BigDecimal property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the BigDecimal value of the specified property.
- * @see #get(String)
- */
- BigDecimal getBigDecimal(String path);
-
- /**
- * Returns the value of a BigInteger property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the BigInteger value of the specified property.
- * @see #get(String)
- */
- BigInteger getBigInteger(String path);
-
- /**
- * Returns the value of a DataObject property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the DataObject value of the specified property.
- * @see #get(String)
- */
- DataObject getDataObject(String path);
-
- /**
- * Returns the value of a Date property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the Date value of the specified property.
- * @see #get(String)
- */
- Date getDate(String path);
-
- /**
- * Returns the value of a String property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the String value of the specified property.
- * @see #get(String)
- */
- String getString(String path);
-
- /**
- * Returns the value of a List property identified by the specified path.
- * @param path the path to a valid object and property.
- * @return the List value of the specified property.
- * @see #get(String)
- */
- List getList(String path);
-
- /**
- * @see #getSequence()
- * Returns the value of a Sequence property identified by the specified path.
- * An implementation may throw an UnsupportedOperationException.
- * @param path the path to a valid object and property.
- * @return the Sequence value of the specified property.
- * @see #get(String)
- * @deprecated in 2.1.0.
- */
- Sequence getSequence(String path);
-
- /**
- * Sets the value of a boolean property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setBoolean(String path, boolean value);
-
- /**
- * Sets the value of a byte property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setByte(String path, byte value);
-
- /**
- * Sets the value of a char property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setChar(String path, char value);
-
- /**
- * Sets the value of a double property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setDouble(String path, double value);
-
- /**
- * Sets the value of a float property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setFloat(String path, float value);
-
- /**
- * Sets the value of a int property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setInt(String path, int value);
-
- /**
- * Sets the value of a long property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setLong(String path, long value);
-
- /**
- * Sets the value of a short property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setShort(String path, short value);
-
- /**
- * Sets the value of a byte[] property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setBytes(String path, byte[] value);
-
- /**
- * Sets the value of a BigDecimal property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setBigDecimal(String path, BigDecimal value);
-
- /**
- * Sets the value of a BigInteger property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setBigInteger(String path, BigInteger value);
-
- /**
- * Sets the value of a DataObject property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setDataObject(String path, DataObject value);
-
- /**
- * Sets the value of a Date property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setDate(String path, Date value);
-
- /**
- * Sets the value of a String property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- */
- void setString(String path, String value);
-
- /**
- * Sets the value of a List property identified by the specified path, to the specified value.
- * @param path the path to a valid object and property.
- * @param value the new value for the property.
- * @see #set(String, Object)
- * @see #setList(Property, List)
- */
- void setList(String path, List value);
-
- /**
- * Returns the value of the property at the specified index in {@link Type#getProperties property list}
- * of this object's {@link Type type}.
- * @param propertyIndex the index of the property.
- * @return the value of the specified property.
- * @see #get(Property)
- */
- Object get(int propertyIndex);
-
- /**
- * Sets the property at the specified index in {@link Type#getProperties property list} of this object's
- * {@link Type type}, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void set(int propertyIndex, Object value);
-
- /**
- * Returns whether the the property at the specified index in {@link Type#getProperties property list} of this object's
- * {@link Type type}, is considered to be set.
- * @param propertyIndex the index of the property.
- * @return whether the specified property is set.
- * @see #isSet(Property)
- */
- boolean isSet(int propertyIndex);
-
- /**
- * Unsets the property at the specified index in {@link Type#getProperties property list} of this object's {@link Type type}.
- * @param propertyIndex the index of the property.
- * @see #unset(Property)
- */
- void unset(int propertyIndex);
-
- /**
- * Returns the value of a boolean property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the boolean value of the specified property.
- * @see #get(int)
- */
- boolean getBoolean(int propertyIndex);
-
- /**
- * Returns the value of a byte property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the byte value of the specified property.
- * @see #get(int)
- */
- byte getByte(int propertyIndex);
-
- /**
- * Returns the value of a char property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the char value of the specified property.
- * @see #get(int)
- */
- char getChar(int propertyIndex);
-
- /**
- * Returns the value of a double property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the double value of the specified property.
- * @see #get(int)
- */
- double getDouble(int propertyIndex);
-
- /**
- * Returns the value of a float property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the float value of the specified property.
- * @see #get(int)
- */
- float getFloat(int propertyIndex);
-
- /**
- * Returns the value of a int property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the int value of the specified property.
- * @see #get(int)
- */
- int getInt(int propertyIndex);
-
- /**
- * Returns the value of a long property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the long value of the specified property.
- * @see #get(int)
- */
- long getLong(int propertyIndex);
-
- /**
- * Returns the value of a short property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the short value of the specified property.
- * @see #get(int)
- */
- short getShort(int propertyIndex);
-
- /**
- * Returns the value of a byte[] property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the byte[] value of the specified property.
- * @see #get(int)
- */
- byte[] getBytes(int propertyIndex);
-
- /**
- * Returns the value of a BigDecimal property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the BigDecimal value of the specified property.
- * @see #get(int)
- */
- BigDecimal getBigDecimal(int propertyIndex);
-
- /**
- * Returns the value of a BigInteger property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the BigInteger value of the specified property.
- * @see #get(int)
- */
- BigInteger getBigInteger(int propertyIndex);
-
- /**
- * Returns the value of a DataObject property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the DataObject value of the specified property.
- * @see #get(int)
- */
- DataObject getDataObject(int propertyIndex);
-
- /**
- * Returns the value of a Date property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the Date value of the specified property.
- * @see #get(int)
- */
- Date getDate(int propertyIndex);
-
- /**
- * Returns the value of a String property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the String value of the specified property.
- * @see #get(int)
- */
- String getString(int propertyIndex);
-
- /**
- * Returns the value of a List property identified by the specified property index.
- * @param propertyIndex the index of the property.
- * @return the List value of the specified property.
- * @see #get(int)
- */
- List getList(int propertyIndex);
-
- /**
- * @see #getSequence()
- * Returns the value of a Sequence property identified by the specified property index.
- * An implementation may throw an UnsupportedOperationException.
- * @param propertyIndex the index of the property.
- * @return the Sequence value of the specified property.
- * @see #get(int)
- * @deprecated in 2.1.0.
- */
- Sequence getSequence(int propertyIndex);
-
- /**
- * Sets the value of a boolean property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setBoolean(int propertyIndex, boolean value);
-
- /**
- * Sets the value of a byte property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setByte(int propertyIndex, byte value);
-
- /**
- * Sets the value of a char property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setChar(int propertyIndex, char value);
-
- /**
- * Sets the value of a double property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setDouble(int propertyIndex, double value);
-
- /**
- * Sets the value of a float property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setFloat(int propertyIndex, float value);
-
- /**
- * Sets the value of a int property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setInt(int propertyIndex, int value);
-
- /**
- * Sets the value of a long property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setLong(int propertyIndex, long value);
-
- /**
- * Sets the value of a short property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setShort(int propertyIndex, short value);
-
- /**
- * Sets the value of a byte[] property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setBytes(int propertyIndex, byte[] value);
-
- /**
- * Sets the value of a BigDecimal property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setBigDecimal(int propertyIndex, BigDecimal value);
-
- /**
- * Sets the value of a BigInteger property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setBigInteger(int propertyIndex, BigInteger value);
-
- /**
- * Sets the value of a DataObject property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setDataObject(int propertyIndex, DataObject value);
-
- /**
- * Sets the value of a Date property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setDate(int propertyIndex, Date value);
-
- /**
- * Sets the value of a String property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- */
- void setString(int propertyIndex, String value);
-
- /**
- * Sets the value of a List property identified by the specified property index, to the specified value.
- * @param propertyIndex the index of the property.
- * @param value the new value for the property.
- * @see #set(int, Object)
- * @see #setList(Property, List)
- */
- void setList(int propertyIndex, List value);
-
- /**
- * Returns the value of the given property of this object.
- *
- * If the property is {@link Property#isMany many-valued},
- * the result will be a {@link java.util.List}
- * and each object in the List will be {@link Type#isInstance an instance of}
- * the property's {@link Property#getType type}.
- * Otherwise the result will directly be an instance of the property's type.
- * @param property the property of the value to fetch.
- * @return the value of the given property of the object.
- * @see #set(Property, Object)
- * @see #unset(Property)
- * @see #isSet(Property)
- */
- Object get(Property property);
-
- /**
- * Sets the value of the given property of the object to the new value.
- *
- * If the property is {@link Property#isMany many-valued},
- * the new value must be a {@link java.util.List}
- * and each object in that list must be {@link Type#isInstance an instance of}
- * the property's {@link Property#getType type};
- * the existing contents are cleared and the contents of the new value are added.
- * Otherwise the new value directly must be an instance of the property's type
- * and it becomes the new value of the property of the object.
- * @param property the property of the value to set.
- * @param value the new value for the property.
- * @see #unset(Property)
- * @see #isSet(Property)
- * @see #get(Property)
- */
- void set(Property property, Object value);
-
- /**
- * Returns whether the property of the object is considered to be set.
- *
- * isSet() for many-valued Properties returns true if the List is not empty and
- * false if the List is empty. For single-valued Properties it returns true if the Property
- * has been set() and not unset(), and false otherwise.
- * Any call to set() without a call to unset() will cause isSet() to return true, regardless of
- * the value being set. For example, after calling set(property, property.getDefault()) on a
- * previously unset property, isSet(property) will return true, even though the value of
- * get(property) will be unchanged.
- * @param property the property in question.
- * @return whether the property of the object is set.
- * @see #set(Property, Object)
- * @see #unset(Property)
- * @see #get(Property)
- */
- boolean isSet(Property property);
-
- /**
- * Unsets the property of the object.
- *
- * If the property is {@link Property#isMany many-valued},
- * the value must be an {@link java.util.List}
- * and that list is cleared.
- * Otherwise,
- * the value of the property of the object
- * is set to the property's {@link Property#getDefault default value}.
- * The property will no longer be considered {@link #isSet set}.
- * @param property the property in question.
- * @see #isSet(Property)
- * @see #set(Property, Object)
- * @see #get(Property)
- */
- void unset(Property property);
-
- /**
- * Returns the value of the specified boolean property.
- * @param property the property to get.
- * @return the boolean value of the specified property.
- * @see #get(Property)
- */
- boolean getBoolean(Property property);
-
- /**
- * Returns the value of the specified byte property.
- * @param property the property to get.
- * @return the byte value of the specified property.
- * @see #get(Property)
- */
- byte getByte(Property property);
-
- /**
- * Returns the value of the specified char property.
- * @param property the property to get.
- * @return the char value of the specified property.
- * @see #get(Property)
- */
- char getChar(Property property);
-
- /**
- * Returns the value of the specified double property.
- * @param property the property to get.
- * @return the double value of the specified property.
- * @see #get(Property)
- */
- double getDouble(Property property);
-
- /**
- * Returns the value of the specified float property.
- * @param property the property to get.
- * @return the float value of the specified property.
- * @see #get(Property)
- */
- float getFloat(Property property);
-
- /**
- * Returns the value of the specified int property.
- * @param property the property to get.
- * @return the int value of the specified property.
- * @see #get(Property)
- */
- int getInt(Property property);
-
- /**
- * Returns the value of the specified long property.
- * @param property the property to get.
- * @return the long value of the specified property.
- * @see #get(Property)
- */
- long getLong(Property property);
-
- /**
- * Returns the value of the specified short property.
- * @param property the property to get.
- * @return the short value of the specified property.
- * @see #get(Property)
- */
- short getShort(Property property);
-
- /**
- * Returns the value of the specified byte[] property.
- * @param property the property to get.
- * @return the byte[] value of the specified property.
- * @see #get(Property)
- */
- byte[] getBytes(Property property);
-
- /**
- * Returns the value of the specified BigDecimal property.
- * @param property the property to get.
- * @return the BigDecimal value of the specified property.
- * @see #get(Property)
- */
- BigDecimal getBigDecimal(Property property);
-
- /**
- * Returns the value of the specified BigInteger property.
- * @param property the property to get.
- * @return the BigInteger value of the specified property.
- * @see #get(Property)
- */
- BigInteger getBigInteger(Property property);
-
- /**
- * Returns the value of the specified DataObject property.
- * @param property the property to get.
- * @return the DataObject value of the specified property.
- * @see #get(Property)
- */
- DataObject getDataObject(Property property);
-
- /**
- * Returns the value of the specified Date property.
- * @param property the property to get.
- * @return the Date value of the specified property.
- * @see #get(Property)
- */
- Date getDate(Property property);
-
- /**
- * Returns the value of the specified String property.
- * @param property the property to get.
- * @return the String value of the specified property.
- * @see #get(Property)
- */
- String getString(Property property);
-
- /**
- * Returns the value of the specified List property.
- * The List returned contains the current values.
- * Updates through the List interface operate on the current values of the DataObject.
- * Each access returns the same List object.
- * @param property the property to get.
- * @return the List value of the specified property.
- * @see #get(Property)
- */
- List getList(Property property);
-
- /**
- * @see #getSequence()
- * Returns the value of the specified Sequence property.
- * An implementation may throw an UnsupportedOperationException.
- * @param property the property to get.
- * @return the Sequence value of the specified property.
- * @see #get(Property)
- * @deprecated in 2.1.0.
- */
- Sequence getSequence(Property property);
-
- /**
- * Sets the value of the specified boolean property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setBoolean(Property property, boolean value);
-
- /**
- * Sets the value of the specified byte property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setByte(Property property, byte value);
-
- /**
- * Sets the value of the specified char property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setChar(Property property, char value);
-
- /**
- * Sets the value of the specified double property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setDouble(Property property, double value);
-
- /**
- * Sets the value of the specified float property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setFloat(Property property, float value);
-
- /**
- * Sets the value of the specified int property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setInt(Property property, int value);
-
- /**
- * Sets the value of the specified long property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setLong(Property property, long value);
-
- /**
- * Sets the value of the specified short property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setShort(Property property, short value);
-
- /**
- * Sets the value of the specified byte[] property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setBytes(Property property, byte[] value);
-
- /**
- * Sets the value of the specified BigDecimal property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setBigDecimal(Property property, BigDecimal value);
-
- /**
- * Sets the value of the specified BigInteger property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setBigInteger(Property property, BigInteger value);
-
- /**
- * Sets the value of the specified DataObject property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setDataObject(Property property, DataObject value);
-
- /**
- * Sets the value of the specified Date property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setDate(Property property, Date value);
-
- /**
- * Sets the value of the specified String property, to the specified value.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setString(Property property, String value);
-
- /**
- * Sets the value of the specified List property, to the specified value.
- *
The new value must be a {@link java.util.List}
- * and each object in that list must be {@link Type#isInstance an instance of}
- * the property's {@link Property#getType type};
- * the existing contents are cleared and the contents of the new value are added.
- * @param property the property to set.
- * @param value the new value for the property.
- * @see #set(Property, Object)
- */
- void setList(Property property, List value);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be a {@link Property#isContainment containment property}.
- * The type of the created object is the {@link Property#getType declared type} of the specified property.
- * @param propertyName the name of the specified containment property.
- * @return the created data object.
- * @see #createDataObject(String, String, String)
- */
- DataObject createDataObject(String propertyName);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be a {@link Property#isContainment containment property}.
- * The type of the created object is the {@link Property#getType declared type} of the specified property.
- * @param propertyIndex the index of the specified containment property.
- * @return the created data object.
- * @see #createDataObject(int, String, String)
- */
- DataObject createDataObject(int propertyIndex);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be a {@link Property#isContainment containment property}.
- * The type of the created object is the {@link Property#getType declared type} of the specified property.
- * @param property the specified containment property.
- * @return the created data object.
- * @see #createDataObject(Property, Type)
- */
- DataObject createDataObject(Property property);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be a {@link Property#isContainment containment property}.
- * The type of the created object is specified by the packageURI and typeName arguments.
- * The specified type must be a compatible target for the property identified by propertyName.
- * @param propertyName the name of the specified containment property.
- * @param namespaceURI the namespace URI of the package containing the type of object to be created.
- * @param typeName the name of a type in the specified package.
- * @return the created data object.
- * @see #createDataObject(String)
- * @see DataGraph#getType
- */
- DataObject createDataObject(String propertyName, String namespaceURI, String typeName);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be a {@link Property#isContainment containment property}.
- * The type of the created object is specified by the packageURI and typeName arguments.
- * The specified type must be a compatible target for the property identified by propertyIndex.
- * @param propertyIndex the index of the specified containment property.
- * @param namespaceURI the namespace URI of the package containing the type of object to be created.
- * @param typeName the name of a type in the specified package.
- * @return the created data object.
- * @see #createDataObject(int)
- * @see DataGraph#getType
- */
- DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName);
-
- /**
- * Returns a new {@link DataObject data object} contained by this object using the specified property,
- * which must be of {@link Property#isContainment containment type}.
- * The type of the created object is specified by the type argument,
- * which must be a compatible target for the speicifed property.
- * @param property a containment property of this object.
- * @param type the type of object to be created.
- * @return the created data object.
- * @see #createDataObject(int)
- */
- DataObject createDataObject(Property property, Type type);
-
- /**
- * Remove this object from its container and then unset all its non-{@link Property#isReadOnly readOnly} Properties.
- * If this object is contained by a {@link Property#isReadOnly readOnly} {@link Property#isContainment containment property}, its non-{@link Property#isReadOnly readOnly} Properties will be unset but the object will not be removed from its container.
- * All DataObjects recursively contained by {@link Property#isContainment containment Properties} will also be deleted.
- */
- void delete();
-
- /**
- * Returns the containing {@link DataObject data object}
- * or null if there is no container.
- * @return the containing data object or null.
- */
- DataObject getContainer();
-
- /**
- * Return the Property of the {@link DataObject data object} containing this data object
- * or null if there is no container.
- * @return the property containing this data object.
- */
- Property getContainmentProperty();
-
- /**
- * Returns the {@link DataGraph data graph} for this object or null if there isn't one.
- * @return the containing data graph or null.
- */
- DataGraph getDataGraph();
-
- /**
- * Returns the data object's type.
- *
- * The type defines the Properties available for reflective access.
- * @return the type.
- */
- Type getType();
-
- /**
- * Returns the Sequence for this DataObject.
- * When getType().isSequencedType() == true,
- * the Sequence of a DataObject corresponds to the
- * XML elements representing the values of its Properties.
- * Updates through DataObject and the Lists or Sequences returned
- * from DataObject operate on the same data.
- * When getType().isSequencedType() == false, null is returned.
- * @return the Sequence or null.
- */
- Sequence getSequence();
-
- /**
- * Returns a read-only List of the Properties currently used in this DataObject.
- * This list will contain all of the Properties in getType().getProperties()
- * and any Properties where isSet(property) is true.
- * For example, Properties resulting from the use of
- * open or mixed XML content are present if allowed by the Type.
- * the List does not contain duplicates.
- * The order of the Properties in the List begins with getType().getProperties()
- * and the order of the remaining Properties is determined by the implementation.
- * The same list will be returned unless the DataObject is updated so that
- * the contents of the List change.
- * @return the List of Properties currently used in this DataObject.
- */
- List /* Property */ getInstanceProperties();
-
- /**
- * Returns the named Property from the current instance properties,
- * or null if not found. The instance properties are getInstanceProperties().
- * @param propertyName the name of the Property
- * @return the named Property from the DataObject's current instance properties, or null.
- */
- Property getInstanceProperty(String propertyName);
-
- /**
- * @deprecated replaced by {@link #getInstanceProperty(String)} in 2.1.0
- */
- Property getProperty(String propertyName);
-
- /**
- * Returns the root {@link DataObject data object}.
- * @return the root data object.
- */
- DataObject getRootObject();
-
- /**
- * Returns the ChangeSummary with scope covering this dataObject, or null
- * if there is no ChangeSummary.
- * @return the ChangeSummary with scope covering this dataObject, or null.
- */
- ChangeSummary getChangeSummary();
-
- /**
- * Removes this DataObject from its container, if any.
- * Same as
- * getContainer().getList(getContainmentProperty()).remove(this) or
- * getContainer().unset(getContainmentProperty())
- * depending on getContainmentProperty().isMany() respectively.
- */
- void detach();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Property.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Property.java
deleted file mode 100644
index 89a3857a75..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Property.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-import java.util.List;
-
-/**
- * A representation of a Property in the {@link Type type} of a {@link DataObject data object}.
- */
-public interface Property
-{
- /**
- * Returns the name of the Property.
- * @return the Property name.
- */
- String getName();
-
- /**
- * Returns the type of the Property.
- * @return the Property type.
- */
- Type getType();
-
- /**
- * Returns whether the Property is many-valued.
- * @return true if the Property is many-valued.
- */
- boolean isMany();
-
- /**
- * Returns whether the Property is containment, i.e., whether it represents by-value composition.
- * @return true if the Property is containment.
- */
- boolean isContainment();
-
- /**
- * Returns the containing type of this Property.
- * @return the Property's containing type.
- * @see Type#getProperties()
- */
- Type getContainingType();
-
- /**
- * Returns the default value this Property will have in a {@link DataObject data object} where the Property hasn't been set.
- * @return the default value.
- */
- Object getDefault();
-
- /**
- * Returns true if values for this Property cannot be modified using the SDO APIs.
- * When true, DataObject.set(Property property, Object value) throws an exception.
- * Values may change due to other factors, such as services operating on DataObjects.
- * @return true if values for this Property cannot be modified.
- */
- boolean isReadOnly();
-
- /**
- * Returns the opposite Property if the Property is bi-directional or null otherwise.
- * @return the opposite Property if the Property is bi-directional or null
- */
- Property getOpposite();
-
- /**
- * Returns a list of alias names for this Property.
- * @return a list of alias names for this Property.
- */
- List /*String*/ getAliasNames();
-
- /**
- * Returns whether or not instances of this property can be set to null. The effect of calling set(null) on a non-nullable
- * property is not specified by SDO.
- * @return true if this property is nullable.
- */
- boolean isNullable();
-
- /**
- * Returns whether or not this is an open content Property.
- * @return true if this property is an open content Property.
- */
- boolean isOpenContent();
-
- /**
- * Returns a read-only List of instance Properties available on this Property.
- *
- * This list includes, at a minimum, any open content properties (extensions) added to
- * the object before {@link commonj.sdo.helper.TypeHelper#define(DataObject) defining
- * the Property's Type}. Implementations may, but are not required to in the 2.1 version
- * of SDO, provide additional instance properties.
- * @return the List of instance Properties on this Property.
- */
- List /*Property*/ getInstanceProperties();
-
- /**
- * Returns the value of the specified instance property of this Property.
- * @param property one of the properties returned by {@link #getInstanceProperties()}.
- * @return the value of the specified property.
- * @see DataObject#get(Property)
- */
- Object get(Property property);
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Sequence.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Sequence.java
deleted file mode 100644
index d015633fa5..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Sequence.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-/**
- * A sequence is a heterogeneous list of {@link Property properties} and corresponding values.
- * It represents an ordered arbitrary mixture of data values from more than one property of a {@link DataObject data object}.
- */
-public interface Sequence
-{
- /**
- * Returns the number of entries in the sequence.
- * @return the number of entries.
- */
- int size();
-
- /**
- * Returns the property for the given entry index.
- * Returns null for mixed text entries.
- * @param index the index of the entry.
- * @return the property or null for the given entry index.
- */
- Property getProperty(int index);
-
- /**
- * Returns the property value for the given entry index.
- * @param index the index of the entry.
- * @return the value for the given entry index.
- */
- Object getValue(int index);
-
- /**
- * Sets the entry at a specified index to the new value.
- * @param index the index of the entry.
- * @param value the new value for the entry.
- */
- Object setValue(int index, Object value);
-
- /**
- * Adds a new entry with the specified property name and value
- * to the end of the entries.
- * @param propertyName the name of the entry's property.
- * @param value the value for the entry.
- */
- boolean add(String propertyName, Object value);
-
- /**
- * Adds a new entry with the specified property index and value
- * to the end of the entries.
- * @param propertyIndex the index of the entry's property.
- * @param value the value for the entry.
- */
- boolean add(int propertyIndex, Object value);
-
- /**
- * Adds a new entry with the specified property and value
- * to the end of the entries.
- * @param property the property of the entry.
- * @param value the value for the entry.
- */
- boolean add(Property property, Object value);
-
- /**
- * Adds a new entry with the specified property name and value
- * at the specified entry index.
- * @param index the index at which to add the entry.
- * @param propertyName the name of the entry's property.
- * @param value the value for the entry.
- */
- void add(int index, String propertyName, Object value);
-
- /**
- * Adds a new entry with the specified property index and value
- * at the specified entry index.
- * @param index the index at which to add the entry.
- * @param propertyIndex the index of the entry's property.
- * @param value the value for the entry.
- */
- void add(int index, int propertyIndex, Object value);
-
- /**
- * Adds a new entry with the specified property and value
- * at the specified entry index.
- * @param index the index at which to add the entry.
- * @param property the property of the entry.
- * @param value the value for the entry.
- */
- void add(int index, Property property, Object value);
-
- /**
- * Removes the entry at the given entry index.
- * @param index the index of the entry.
- */
- void remove(int index);
-
- /**
- * Moves the entry at fromIndex to toIndex.
- * @param toIndex the index of the entry destination.
- * @param fromIndex the index of the entry to move.
- */
- void move(int toIndex, int fromIndex);
-
- /**
- * @deprecated replaced by {@link #addText(String)} in 2.1.0
- */
- void add(String text);
-
- /**
- * @deprecated replaced by {@link #addText(int, String)} in 2.1.0
- */
- void add(int index, String text);
-
- /**
- * Adds a new text entry to the end of the Sequence.
- * @param text value of the entry.
- */
- void addText(String text);
-
- /**
- * Adds a new text entry at the given index.
- * @param index the index at which to add the entry.
- * @param text value of the entry.
- */
- void addText(int index, String text);
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Type.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Type.java
deleted file mode 100644
index c8d54a6ca0..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/Type.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo;
-
-import java.util.List;
-
-/**
- * A representation of the type of a {@link Property property} of a {@link DataObject data object}.
- */
-public interface Type
-{
- /**
- * Returns the name of the type.
- * @return the type name.
- */
- String getName();
-
- /**
- * Returns the namespace URI of the type.
- * @return the namespace URI.
- */
- String getURI();
-
- /**
- * Returns the Java class that this type represents.
- * @return the Java class.
- */
- Class getInstanceClass();
-
- /**
- * Returns whether the specified object is an instance of this type.
- * @param object the object in question.
- * @return true if the object is an instance.
- * @see Class#isInstance
- */
- boolean isInstance(Object object);
-
- /**
- * Returns the List of the {@link Property Properties} of this type.
- *
- * The expression
- *
- * type.getProperties().indexOf(property)
- *
- * yields the property's index relative to this type.
- * As such, these expressions are equivalent:
- *
- *
- * @return the Properties of the type.
- * @see Property#getContainingType
- */
- List /*Property*/ getProperties();
-
- /**
- * Returns from {@link #getProperties all the Properties} of this type, the one with the specified name.
- * As such, these expressions are equivalent:
- *
- *
- * @return the Property with the specified name.
- * @see #getProperties
- */
- Property getProperty(String propertyName);
-
- /**
- * Indicates if this Type specifies DataTypes (true) or DataObjects (false).
- * When false, any object that is an instance of this type
- * also implements the DataObject interface.
- * True for simple types such as Strings and numbers.
- * For any object:
- *
- * @return true if Type specifies DataTypes, false for DataObjects.
- */
- boolean isDataType();
-
- /**
- * Indicates if this Type allows any form of open content. If false,
- * dataObject.getInstanceProperties() must be the same as
- * dataObject.getType().getProperties() for any DataObject dataObject of this Type.
- * @return true if this Type allows open content.
- */
- boolean isOpen();
-
- /**
- * Indicates if this Type specifies Sequenced DataObjects.
- * Sequenced DataObjects are used when the order of values
- * between Properties must be preserved.
- * When true, a DataObject will return a Sequence. For example,
- *
- * Sequence elements = dataObject.{@link DataObject#getSequence() getSequence}();
- *
- * @return true if this Type specifies Sequenced DataObjects.
- */
- boolean isSequenced();
-
- /**
- * Indicates if this Type is abstract. If true, this Type cannot be
- * instantiated. Abstract types cannot be used in DataObject or
- * DataFactory create methods.
- * @return true if this Type is abstract.
- */
- boolean isAbstract();
-
- /**
- * Returns the List of base Types for this Type. The List is empty
- * if there are no base Types. XSD , , and
- * Java extends keyword are mapped to this list.
- * @return the List of base Types for this Type.
- */
- List /*Type*/ getBaseTypes();
-
- /**
- * Returns the Properties declared in this Type as opposed to
- * those declared in base Types.
- * @return the Properties declared in this Type.
- */
- List /*Property*/ getDeclaredProperties();
-
- /**
- * Return a list of alias names for this Type.
- * @return a list of alias names for this Type.
- */
- List /*String*/ getAliasNames();
-
- /**
- * Returns a read-only List of instance Properties available on this Type.
- *
- * This list includes, at a minimum, any open content properties (extensions) added to
- * the object before {@link commonj.sdo.helper.TypeHelper#define(DataObject) defining
- * the Type's Type}. Implementations may, but are not required to in the 2.1 version
- * of SDO, provide additional instance properties.
- * @return the List of instance Properties on this Type.
- */
- List /*Property*/ getInstanceProperties();
-
- /**
- * Returns the value of the specified instance property of this Type.
- * @param property one of the properties returned by {@link #getInstanceProperties()}.
- * @return the value of the specified property.
- * @see DataObject#get(Property)
- */
- Object get(Property property);
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/CopyHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/CopyHelper.java
deleted file mode 100644
index d185d4d420..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/CopyHelper.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * A helper for copying DataObjects.
- */
-public interface CopyHelper
-{
- /**
- * Create a shallow copy of the DataObject dataObject:
- * Creates a new DataObject copiedDataObject with the same values
- * as the source dataObject for each property where
- * property.getType().isDataType() is true.
- * The value of such a Property property in copiedDataObject is:
- * dataObject.get(property) for single-valued Properties
- * (copiedDataObject.get(property) equals() dataObject.get(property)), or
- * a List where each member is equal to the member at the
- * same index in dataObject for multi-valued Properties
- * copiedDataObject.getList(property).get(i) equals() dataObject.getList(property).get(i)
- * The copied Object is unset for each Property where
- * property.getType().isDataType() is false
- * since they are not copied.
- * Read-only properties are copied.
- * A copied object shares metadata with the source object
- * sourceDO.getType() == copiedDO.getType()
- * If a ChangeSummary is part of the source DataObject
- * the copy has a new, empty ChangeSummary.
- * Logging state is the same as the source ChangeSummary.
- *
- * @param dataObject to be copied
- * @return copy of dataObject
- */
- DataObject copyShallow(DataObject dataObject);
-
- /**
- * Create a deep copy of the DataObject tree:
- * Copies the dataObject and all its {@link commonj.sdo.Property#isContainment() contained}
- * DataObjects recursively.
- * Values of Properties are copied as in shallow copy,
- * and values of Properties where
- * property.getType().isDataType() is false
- * are copied where each value copied must be a
- * DataObject contained by the source dataObject.
- * If a DataObject is outside the DataObject tree and the
- * property is bidirectional, then the DataObject is skipped.
- * If a DataObject is outside the DataObject tree and the
- * property is unidirectional, then the same DataObject is referenced.
- * Read-only properties are copied.
- * If any DataObject referenced is not in the containment
- * tree an IllegalArgumentException is thrown.
- * If a ChangeSummary is part of the copy tree the new
- * ChangeSummary refers to objects in the new DataObject tree.
- * Logging state is the same as the source ChangeSummary.
- *
- * @param dataObject to be copied.
- * @return copy of dataObject
- * @throws IllegalArgumentException if any referenced DataObject
- * is not part of the containment tree.
- */
- DataObject copy(DataObject dataObject);
-
- /**
- * The default CopyHelper.
- */
- CopyHelper INSTANCE = HelperProvider.getCopyHelper();
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataFactory.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataFactory.java
deleted file mode 100644
index 8507b83440..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * A Factory for creating DataObjects.
- * The created DataObjects are not connected to any other DataObjects.
- */
-public interface DataFactory
-{
- /**
- * Create a DataObject of the Type specified by typeName with the given package uri.
- * @param uri The uri of the Type.
- * @param typeName The name of the Type.
- * @return the created DataObject.
- * @throws IllegalArgumentException if the uri and typeName does
- * not correspond to a Type this factory can instantiate.
- */
- DataObject create(String uri, String typeName);
-
- /**
- * Create a DataObject supporting the given interface.
- * InterfaceClass is the interface for the DataObject's Type.
- * The DataObject created is an instance of the interfaceClass.
- * @param interfaceClass is the interface for the DataObject's Type.
- * @return the created DataObject.
- * @throws IllegalArgumentException if the instanceClass does
- * not correspond to a Type this factory can instantiate.
- */
- DataObject create(Class interfaceClass);
-
- /**
- * Create a DataObject of the Type specified.
- * @param type The Type.
- * @return the created DataObject.
- * @throws IllegalArgumentException if the Type
- * cannot be instantiaed by this factory.
- */
- DataObject create(Type type);
-
- /**
- * The default DataFactory.
- */
- DataFactory INSTANCE = HelperProvider.getDataFactory();
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataHelper.java
deleted file mode 100644
index 2b705c718e..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/DataHelper.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Locale;
-
-import commonj.sdo.Type;
-import commonj.sdo.Property;
-
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * Data helper methods.
- */
-public interface DataHelper
-{
- /**
- * Convert from a String representation of an SDO date type to a Date.
- * @param dateString the String representation of an SDO date type
- * @return a Date representation of an SDO date type.
- * @throws IllegalArgumentException for invalid formats.
- */
- Date toDate(String dateString);
-
- /**
- * Convert from a String representation of an SDO date type to a Calendar using the
- * default locale. Same as toCalendar(dateString, null).
- * @param dateString the String representation of an SDO date type
- * @return a Calendar representation of an SDO date type.
- * @throws IllegalArgumentException for invalid formats.
- */
- Calendar toCalendar(String dateString);
-
- /**
- * Convert from a String representation of an SDO date type to a Calendar using the
- * specified locale, or the default locale if the locale is null.
- * @param dateString the String representation of an SDO date type
- * @param locale the locale or null for default locale.
- * @return a Calendar representation of an SDO date type.
- * @throws IllegalArgumentException for invalid formats.
- */
- Calendar toCalendar(String dateString, Locale locale);
-
- /**
- * Convert from a Date to a String representation of the DateTime type.
- * @param date the date
- * @return a Date to a String representation of the DateTime type.
- */
- String toDateTime(Date date);
-
- /**
- * Convert from a Date to a String representation of the Duration type.
- * @param date the date
- * @return a Date to a String representation of the Duration type.
- */
- String toDuration(Date date);
-
- /**
- * Convert from a Date to a String representation of the Time type.
- * @param date the date
- * @return a Date to a String representation of the Time type.
- */
- String toTime(Date date);
-
- /**
- * Convert from a Date to a String representation of the Day type.
- * @param date the date
- * @return a Date to a String representation of the Day type.
- */
- String toDay(Date date);
-
- /**
- * Convert from a Date to a String representation of the Month type.
- * @param date the date
- * @return a Date to a String representation of the Month type.
- */
- String toMonth(Date date);
-
- /**
- * Convert from a Date to a String representation of the MonthDay type.
- * @param date the date
- * @return a Date to a String representation of the MonthDay type.
- */
- String toMonthDay(Date date);
-
- /**
- * Convert from a Date to a String representation of the Year type.
- * @param date the date
- * @return a Date to a String representation of the Year type.
- */
- String toYear(Date date);
-
- /**
- * Convert from a Date to a String representation of the YearMonth type.
- * @param date the date
- * @return a Date to a String representation of the YearMonth type.
- */
- String toYearMonth(Date date);
-
- /**
- * Convert from a Date to a String representation of the YearMonthDay type.
- * @param date the date
- * @return a Date to a String representation of the YearMonthDay type.
- */
- String toYearMonthDay(Date date);
-
- /**
- * Convert from a Calendar to a String representation of the DateTime type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the DateTime type.
- */
- String toDateTime(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the Duration type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the Duration type.
- */
- String toDuration(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the Time type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the Time type.
- */
- String toTime(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the Day type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the Day type.
- */
- String toDay(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the Month type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the Month type.
- */
- String toMonth(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the MonthDay type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the MonthDay type.
- */
- String toMonthDay(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the Year type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the Year type.
- */
- String toYear(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the YearMonth type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the YearMonth type.
- */
- String toYearMonth(Calendar calendar);
-
- /**
- * Convert from a Calendar to a String representation of the YearMonthDay type.
- * @param calendar the calendar to convert
- * @return a Calendar to a String representation of the YearMonthDay type.
- */
- String toYearMonthDay(Calendar calendar);
-
- /**
- * Convert the specified value to an {@link Type#getInstanceClass() instance}
- * of the specified type.
- * Supported conversions are listed in Section 16 of the SDO specification.
- * @param type the target {@link Type#isDataType() data type}.
- * @param value the value to convert
- * @return a value of the specified type's instance class
- * @throws IllegalArgumentException if the value could not be converted
- * @see #convert(Property, Object)
- */
- Object convert(Type type, Object value);
-
- /**
- * Convert the specified value to an {@link Type#getInstanceClass() instance}
- * of the specified property's {@link Property#getType() type}.
- * The specified value must be a List if the property is {@link Property#isMany()
- * many valued}. In this case, all the values in the List are converted.
- * @param property the target {@link Type#isDataType() data type} property.
- * @param value the value or List of values to convert
- * @return a converted value or list of converted values
- * @throws IllegalArgumentException if the value could not be converted
- * @see #convert(Type, Object)
- */
- Object convert(Property property, Object value);
-
- /**
- * The default DataHelper.
- */
- DataHelper INSTANCE = HelperProvider.getDataHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/EqualityHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/EqualityHelper.java
deleted file mode 100644
index 31cd9b686f..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/EqualityHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * A helper for comparing DataObjects.
- */
-public interface EqualityHelper
-{
- /**
- *
Two DataObjects are equalShallow if
- * they have the same {@link DataObject#getType Type}
- * and all their compared Properties are equal.
- * The set of Properties compared are the
- * {@link DataObject#getInstanceProperties() instance properties}
- * where property.getType().isDataType() is true
- * and property.getType() is not ChangeSummaryType.
- * Two of these Property values are equal if they are both not
- * {@link DataObject#isSet(Property) set}, or set to an equal value
- * dataObject1.get(property).equals(dataObject2.get(property))
- * If the type is a sequenced type, the sequence entries must be the same.
- * For each entry x in the sequence where the property is used in the comparison,
- * dataObject1.getSequence().getValue(x).equals(
- * dataObject2.getSequence().getValue(x)) and
- * dataObject1.getSequence().getProperty(x) ==
- * dataObject2.getSequence().getProperty(x)
- * must be true.
- *
- * Returns true the objects have the same Type and all values of all compared Properties are equal.
- * @param dataObject1 DataObject to be compared
- * @param dataObject2 DataObject to be compared
- * @return true the objects have the same Type and all values of all compared Properties are equal.
- */
- boolean equalShallow(DataObject dataObject1, DataObject dataObject2);
-
- /**
- *
Two DataObjects are equal(Deep) if they are equalShallow,
- * all their compared Properties are equal, and all reachable DataObjects in their
- * graphs excluding containers are equal.
- * The set of Properties compared are the
- * {@link DataObject#getInstanceProperties() instance properties}
- * where property.getType().isDataType() is false,
- * and is not a container property, ie !property.getOpposite().isContainment()
- * Two of these Property values are equal if they are both not
- * {@link DataObject#isSet(Property) set}, or all the DataObjects
- * they refer to are {@link #equal(DataObject, DataObject) equal} in the
- * context of dataObject1 and dataObject2.
- * Note that properties to a containing DataObject are not compared
- * which means two DataObject trees can be equal even if their containers are not equal.
- * If the type is a sequenced type, the sequence entries must be the same.
- * For each entry x in the sequence where the property is used in the comparison,
- * equal(dataObject1.getSequence().getValue(x),
- * dataObject2.getSequence().getValue(x)) and
- * dataObject1.getSequence().getProperty(x) ==
- * dataObject2.getSequence().getProperty(x)
- * must be true.
- *
- * A DataObject directly or indirectly referenced by dataObject1 or dataObject2
- * can only be equal to exactly one DataObject directly or indirectly referenced
- * by dataObject1 or dataObject2, respectively.
- * This ensures that dataObject1 and dataObject2 are equal if the graph formed by
- * all their referenced DataObjects have the same shape.
- *
- * Returns true if the trees of DataObjects are equal(Deep).
- * @param dataObject1 DataObject to be compared
- * @param dataObject2 DataObject to be compared
- * @return true if the trees of DataObjects are equal(Deep).
- */
- boolean equal(DataObject dataObject1, DataObject dataObject2);
-
- /**
- * The default EqualityHelper.
- */
- EqualityHelper INSTANCE = HelperProvider.getEqualityHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/HelperContext.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/HelperContext.java
deleted file mode 100644
index 143b29de17..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/HelperContext.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-/**
- * This interface represents a helper execution context.
- * The set of helpers returned by the methods in this interface have visibility
- * to the same SDO metadata, that is, they execute in the same "scope".
- */
-public interface HelperContext
-{
- /**
- * Gets the CopyHelper to use in this context.
- * @return a CopyHelper object
- */
- CopyHelper getCopyHelper();
-
- /**
- * Gets the DataFactory to use in this context.
- * @return a DataFactory object
- */
- DataFactory getDataFactory();
-
- /**
- * Gets the DataHelper to use in this context.
- * @return a DataHelper object
- */
- DataHelper getDataHelper();
-
- /**
- * Gets the EqualityHelper to use in this context.
- * @return an EqualityHelper object
- */
- EqualityHelper getEqualityHelper();
-
- /**
- * Gets the TypeHelper to use in this context.
- * @return a TypeHelper object
- */
- TypeHelper getTypeHelper();
-
- /**
- * Gets the XMLHelper to use in this context.
- * @return an XMLHelper object
- */
- XMLHelper getXMLHelper();
-
- /**
- * Gets the XSDHelper to use in this context.
- * @return an XSDHelper object
- */
- XSDHelper getXSDHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/TypeHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/TypeHelper.java
deleted file mode 100644
index 6281a257b1..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/TypeHelper.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import java.util.List;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * Look up a Type given the uri and typeName or interfaceClass.
- * SDO Types are available through the
- * getType("commonj.sdo", typeName) method.
- * Defines Types from DataObjects.
- */
-public interface TypeHelper
-{
- /**
- * Return the Type specified by typeName with the given uri,
- * or null if not found.
- * @param uri The uri of the Type - type.getURI();
- * @param typeName The name of the Type - type.getName();
- * @return the Type specified by typeName with the given uri,
- * or null if not found.
- */
- Type getType(String uri, String typeName);
-
- /**
- * Return the Type for this interfaceClass or null if not found.
- * @param interfaceClass is the interface for the DataObject's Type -
- * type.getInstanceClass();
- * @return the Type for this interfaceClass or null if not found.
- */
- Type getType(Class interfaceClass);
-
- /**
- * Get the open content (global) Property with the specified uri and name, or null
- * if not found.
- * @param uri the namespace URI of the open content Property.
- * @param propertyName the name of the open content Property.
- * @return the global Property.
- */
- Property getOpenContentProperty(String uri, String propertyName);
-
- /**
- * Define the DataObject as a Type.
- * The Type is available through TypeHelper and DataGraph getType() methods.
- * @param type the DataObject representing the Type.
- * @return the defined Type.
- * @throws IllegalArgumentException if the Type could not be defined.
- */
- Type define(DataObject type);
-
- /**
- * Define the list of DataObjects as Types.
- * The Types are available through TypeHelper and DataGraph getType() methods.
- * @param types a List of DataObjects representing the Types.
- * @return the defined Types.
- * @throws IllegalArgumentException if the Types could not be defined.
- */
- List /*Type*/ define(List /*DataObject*/ types);
-
- /**
- * Define the DataObject as a Property for setting open content.
- * The containing Type of the open content property is not specified by SDO.
- * If the specified uri is not null the defined property is accessible through
- * TypeHelper.getOpenContentProperty(uri, propertyName).
- * If a null uri is specified, the location and management of the open content property
- * is not specified by SDO.
- * @param uri the namespace URI of the open content Property or null.
- * @return the defined open content Property.
- * @throws IllegalArgumentException if the Property could not be defined.
- */
- Property defineOpenContentProperty(String uri, DataObject property);
-
- /**
- * The default TypeHelper.
- */
- TypeHelper INSTANCE = HelperProvider.getTypeHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLDocument.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLDocument.java
deleted file mode 100644
index a89ff7bd9d..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLDocument.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import commonj.sdo.DataObject;
-
-/**
- * Represents an XML Document containing a tree of DataObjects.
- *
- * An example XMLDocument fragment is:
- *
- *
- *
- * created from this XML Schema fragment:
- *
- *
- *
- *
- * Upon loading this XMLDocument:
- * DataObject is an instance of Type PurchaseOrderType.
- * RootElementURI is null because the XSD has no targetNamespace URI.
- * RootElementName is purchaseOrder.
- * Encoding is null because the document did not specify an encoding.
- * XMLDeclaration is true because the document contained an XML declaration.
- * XMLVersion is 1.0
- * SchemaLocation and noNamespaceSchemaLocation are null because they are
- * not specified in the document.
- *
- * When saving the root element, if the type of the root dataObject is not the
- * type of global element specified by rootElementURI and rootElementName,
- * or if a global element does not exist for rootElementURI and rootElementName,
- * then an xsi:type declaration is written to record the root DataObject's Type.
- *
- * When loading the root element and an xsi:type declaration is found
- * it is used as the type of the root DataObject. In this case,
- * if validation is not being performed, it is not an error if the
- * rootElementName is not a global element.
- */
-public interface XMLDocument
-{
- /**
- * Return the root DataObject for the XMLDocument.
- * @return root DataObject for the XMLDocument.
- */
- DataObject getRootObject();
-
- /**
- * Return the targetNamespace URI for the root element.
- * If there is no targetNamespace URI, the value is null.
- * The root element is a global element of the XML Schema
- * with a type compatible to the DataObject.
- * @return the targetNamespace URI for the root element.
- */
- String getRootElementURI();
-
- /**
- * Return the name of the root element.
- * The root element is a global element of the XML Schema
- * with a type compatible to the DataObject.
- * @return the name of the root element.
- */
- String getRootElementName();
-
- /**
- * Return the XML encoding of the document, or null if not specified.
- * The default value is "UTF-8".
- * Specification of other values is implementation-dependent.
- * @return the XML encoding of the document, or null if not specified.
- */
- String getEncoding();
-
- /**
- * Set the XML encoding of the document, or null if not specified.
- * @param encoding
- */
- void setEncoding(String encoding);
-
- /**
- * Return the XML declaration of the document. If true,
- * XMLHelper save() will produce a declaration of the form:
- *
- * Encoding will be suppressed if getEncoding() is null.
- * The default value is true.
- * @return the XML declaration of the document.
- */
- boolean isXMLDeclaration();
-
- /**
- * Set the XML declaration version of the document.
- * @param xmlDeclaration the XML declaration version of the document.
- */
- void setXMLDeclaration(boolean xmlDeclaration);
-
- /**
- * Return the XML version of the document, or null if not specified.
- * The default value is "1.0".
- * Specification of other values is implementation-dependent.
- * @return the XML version of the document, or null if not specified.
- */
- String getXMLVersion();
-
- /**
- * Set the XML version of the document, or null if not specified.
- * @param xmlVersion the XML version of the document, or null if not specified.
- */
- void setXMLVersion(String xmlVersion);
-
- /**
- * Return the value of the schemaLocation declaration
- * for the http://www.w3.org/2001/XMLSchema-instance namespace in the
- * root element, or null if not present.
- * @return the value of the schemaLocation declaration,
- * or null if not present.
- */
- String getSchemaLocation();
-
- /**
- * Sets the value of the schemaLocation declaration
- * for the http://www.w3.org/2001/XMLSchema-instance namespace in the
- * root element, or null if it should not be present.
- * @param schemaLocation the value of the schemaLocation declaration, or null.
- */
- void setSchemaLocation(String schemaLocation);
-
- /**
- * Return the value of the noNamespaceSchemaLocation declaration
- * for the http://www.w3.org/2001/XMLSchema-instance namespace in the
- * root element, or null if not present.
- * @return the value of the noNamespaceSchemaLocation declaration,
- * or null if not present.
- */
- String getNoNamespaceSchemaLocation();
-
- /**
- * Sets the value of the noNamespaceSchemaLocation declaration
- * for the http://www.w3.org/2001/XMLSchema-instance namespace in the
- * root element, or null if it should not be present.
- * @param schemaLocation the value of the noNamespaceSchemaLocation declaration, or null.
- */
- void setNoNamespaceSchemaLocation(String schemaLocation);
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLHelper.java
deleted file mode 100644
index d28b017b41..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XMLHelper.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import javax.xml.transform.Source;
-import javax.xml.transform.Result;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * A helper to convert XML documents into DataObects and
- * DataObjects into XML documnets.
- */
-public interface XMLHelper
-{
- /**
- * Creates and returns an XMLDocument from the input String.
- * By default does not perform XSD validation.
- * Same as
- * load(new StringReader(inputString), null, null);
- *
- * @param inputString specifies the String to read from
- * @return the new XMLDocument loaded
- * @throws RuntimeException for errors in XML parsing or
- * implementation-specific validation.
- */
- XMLDocument load(String inputString);
-
- /**
- * Creates and returns an XMLDocument from the inputStream.
- * The InputStream will be closed after reading.
- * By default does not perform XSD validation.
- * Same as
- * load(inputStream, null, null);
- *
- * @param inputStream specifies the InputStream to read from
- * @return the new XMLDocument loaded
- * @throws IOException for stream exceptions.
- * @throws RuntimeException for errors in XML parsing or
- * implementation-specific validation.
- */
- XMLDocument load(InputStream inputStream) throws IOException;
-
- /**
- * Creates and returns an XMLDocument from the inputStream.
- * The InputStream will be closed after reading.
- * By default does not perform XSD validation.
- * @param inputStream specifies the InputStream to read from
- * @param locationURI specifies the URI of the document for relative schema locations
- * @param options implementation-specific options.
- * @return the new XMLDocument loaded
- * @throws IOException for stream exceptions.
- * @throws RuntimeException for errors in XML parsing or
- * implementation-specific validation.
- */
- XMLDocument load(InputStream inputStream, String locationURI, Object options) throws IOException;
-
- /**
- * Creates and returns an XMLDocument from the inputReader.
- * The InputStream will be closed after reading.
- * By default does not perform XSD validation.
- * @param inputReader specifies the Reader to read from
- * @param locationURI specifies the URI of the document for relative schema locations
- * @param options implementation-specific options.
- * @return the new XMLDocument loaded
- * @throws IOException for stream exceptions.
- * @throws RuntimeException for errors in XML parsing or
- * implementation-specific validation.
- */
- XMLDocument load(Reader inputReader, String locationURI, Object options) throws IOException;
-
- /**
- * Creates and returns an XMLDocument from the inputSource.
- * The InputSource will be closed after reading.
- * By default does not perform XSD validation.
- * @param inputSource specifies the Source to read from
- * @param locationURI specifies the URI of the document for relative schema locations
- * @param options implementation-specific options.
- * @return the new XMLDocument loaded
- * @throws IOException for stream exceptions.
- * @throws RuntimeException for errors in XML parsing or
- * implementation-specific validation.
- */
- XMLDocument load(Source inputSource, String locationURI, Object options) throws IOException;
-
- /**
- * Returns the DataObject saved as an XML document with the specified root element.
- * Same as
- * StringWriter stringWriter = new StringWriter();
- * save(createDocument(dataObject, rootElementURI, rootElementName),
- * stringWriter, null);
- * stringWriter.toString();
- *
- * @param dataObject specifies DataObject to be saved
- * @param rootElementURI the Target Namespace URI of the root XML element
- * @param rootElementName the Name of the root XML element
- * @return the saved XML document as a string
- * @throws IllegalArgumentException if the dataObject tree
- * is not closed or has no container.
- */
- String save(DataObject dataObject, String rootElementURI, String rootElementName);
-
- /**
- * Saves the DataObject as an XML document with the specified root element.
- * Same as
- * save(createDocument(dataObject, rootElementURI, rootElementName),
- * outputStream, null);
- *
- * @param dataObject specifies DataObject to be saved
- * @param rootElementURI the Target Namespace URI of the root XML element
- * @param rootElementName the Name of the root XML element
- * @param outputStream specifies the OutputStream to write to.
- * @throws IOException for stream exceptions.
- * @throws IllegalArgumentException if the dataObject tree
- * is not closed or has no container.
- */
- void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws IOException;
-
- /**
- * Serializes an XMLDocument as an XML document into the outputStream.
- * If the DataObject's Type was defined by an XSD, the serialization
- * will follow the XSD.
- * Otherwise the serialization will follow the format as if an XSD
- * were generated as defined by the SDO specification.
- * The OutputStream will be flushed after writing.
- * Does not perform validation to ensure compliance with an XSD.
- * @param xmlDocument specifies XMLDocument to be saved
- * @param outputStream specifies the OutputStream to write to.
- * @param options implementation-specific options.
- * @throws IOException for stream exceptions.
- * @throws IllegalArgumentException if the dataObject tree
- * is not closed or has no container.
- */
- void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException;
-
- /**
- * Serializes an XMLDocument as an XML document into the outputWriter.
- * If the DataObject's Type was defined by an XSD, the serialization
- * will follow the XSD.
- * Otherwise the serialization will follow the format as if an XSD
- * were generated as defined by the SDO specification.
- * The OutputStream will be flushed after writing.
- * Does not perform validation to ensure compliance with an XSD.
- * @param xmlDocument specifies XMLDocument to be saved
- * @param outputWriter specifies the Writer to write to.
- * @param options implementation-specific options.
- * @throws IOException for stream exceptions.
- * @throws IllegalArgumentException if the dataObject tree
- * is not closed or has no container.
- */
- void save(XMLDocument xmlDocument, Writer outputWriter, Object options) throws IOException;
-
- /**
- * Serializes an XMLDocument as an XML document into the outputResult in a
- * serialization technology independent format (as specified in
- * javax.xml.transform).
- * The OutputResult will be flushed after writing.
- * Does not perform validation to ensure compliance with an XSD.
- * @param xmlDocument specifies XMLDocument to be saved
- * @param outputResult specifies Result to be saved
- * @param options implementation-specific options.
- * @throws IOException for stream exceptions.
- * @throws IllegalArgumentException if the dataObject tree
- * is not closed or has no container.
- */
- void save(XMLDocument xmlDocument, Result outputResult, Object options) throws IOException;
-
- /**
- * Creates an XMLDocument with the specified XML rootElement for the DataObject.
- * @param dataObject specifies DataObject to be saved
- * @param rootElementURI the Target Namespace URI of the root XML element
- * @param rootElementName the Name of the root XML element
- * @return XMLDocument a new XMLDocument set with the specified parameters.
- */
- XMLDocument createDocument(DataObject dataObject, String rootElementURI, String rootElementName);
-
- /**
- * The default XMLHelper.
- */
- XMLHelper INSTANCE = HelperProvider.getXMLHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XSDHelper.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XSDHelper.java
deleted file mode 100644
index af4f002690..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/helper/XSDHelper.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.helper;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.List;
-import java.util.Map;
-
-import commonj.sdo.Property;
-import commonj.sdo.Type;
-import commonj.sdo.impl.HelperProvider;
-
-/**
- * Provides access to additional information when the
- * Type or Property is defined by an XML Schema (XSD).
- * Methods return null/false otherwise or if the information is unavailable.
- * Defines Types from an XSD.
-*/
-public interface XSDHelper
-{
- /**
- * Returns the local name as declared in the XSD.
- * @param type to return local name for.
- * @return the local name as declared in the XSD.
- */
- String getLocalName(Type type);
-
- /**
- * Returns the local name as declared in the XSD.
- * @param property to return local name for.
- * @return the local name as declared in the XSD.
- */
- String getLocalName(Property property);
-
- /**
- * Returns the namespace URI as declared in the XSD.
- * @param property to return namespace URI for.
- * @return the namespace URI as declared in the XSD.
- */
- String getNamespaceURI(Property property);
-
- /**
- * Returns true if the property is declared as an attribute in the XSD.
- * Returns false if not known or for advanced cases.
- * It is possible for both isAttribute and isElement to return false
- * but they will not both return true.
- * @param property to identify if an attribute.
- * @return true if the property is declared as an attribute in the XSD.
- */
- boolean isAttribute(Property property);
-
- /**
- * Returns true if the property is declared as an element in the XSD.
- * Returns false if not known or for advanced cases.
- * It is possible for both isAttribute and isElement to return false
- * but they will not both return true.
- * @param property to identify if an element.
- * @return true if the property is declared as an element in the XSD.
- */
- boolean isElement(Property property);
-
- /**
- * Returns true if the Type is declared to contain mixed content.
- * A DataObject's mixed content values are typically accessed via a Sequence.
- * @param type to identify if mixed content.
- * @return true if the Type is declared to contain mixed content.
- */
- boolean isMixed(Type type);
-
- /**
- * Indicates if this helper contains XSD information for the specified type.
- * @param type the type.
- * @return true if this helper contains XSD information for the specified type.
- */
- boolean isXSD(Type type);
-
- /**
- * Returns the Property defined by the named global element or attribute
- * in the targetNamespace uri, or null if not found.
- * @param uri The uri of the targetNamespace.
- * @param propertyName The name of the global property.
- * @param isElement is true for global elements, false for global attributes.
- * @return the Property defined by the named global element or attribute
- * in the targetNamespace uri, or null if not found.
- */
- Property getGlobalProperty(String uri, String propertyName, boolean isElement);
-
- /**
- * Return the appinfo declared for this Type and source.
- * The appinfo start and end tags and content are returned.
- * The xml namespace context is preserved in the appinfo element.
- * If more than one appinfo with the same source is declared on the same
- * Type their contents are concatenated.
- * @param type the type with the appinfo declaration
- * @param source the source of the appinfo declaration.
- * @return the appinfo declared for this Type and source.
- */
- String getAppinfo(Type type, String source);
-
- /**
- * Return the content of the appinfo declared for this Property and source.
- * If the property is defined by ref= the appinfo of the referenced
- * element or attribute is included.
- * The appinfo start and end tags and content are returned.
- * The xml namespace context is preserved in the appinfo element.
- * If more than one appinfo with the same source is declared on the same
- * Type their contents are concatenated.
- * @param property the Property with the appinfo declaration
- * @param source the source of the appinfo declaration.
- * @return the appinfo declared for this Property and source.
- */
- String getAppinfo(Property property, String source);
-
- /**
- * Define the XML Schema as Types.
- * The Types are available through TypeHelper and DataGraph getType() methods.
- * Same as define(new StringReader(xsd), null)
- * @param xsd the XML Schema.
- * @return the defined Types.
- * @throws IllegalArgumentException if the Types could not be defined.
- */
- List /*Type*/ define(String xsd);
-
- /**
- * Define XML Schema as Types.
- * The Types are available through TypeHelper and DataGraph getType() methods.
- * @param xsdReader reader to an XML Schema.
- * @param schemaLocation the URI of the location of the schema, used
- * for processing relative imports and includes. May be null if not used.
- * @return the defined Types.
- * @throws IllegalArgumentException if the Types could not be defined.
- */
- List /*Type*/ define(Reader xsdReader, String schemaLocation);
-
- /**
- * Define XML Schema as Types.
- * The Types are available through TypeHelper and DataGraph getType() methods.
- * @param xsdInputStream input stream to an XML Schema.
- * @param schemaLocation the URI of the location of the schema, used
- * for processing relative imports and includes. May be null if not used.
- * @return the defined Types.
- * @throws IllegalArgumentException if the Types could not be defined.
- */
- List /*Type*/ define(InputStream xsdInputStream, String schemaLocation);
-
- /**
- * Generate an XML Schema Declaration (XSD) from Types.
- * Same as generate(types, null);
- * @param types a List containing the Types
- * @return a String containing the generated XSD.
- * @throws IllegalArgumentException if the XSD could not be generated.
- */
- String generate(List /*Type*/ types);
-
- /**
- * Generate an XML Schema Declaration (XSD) from Types.
- * Round trip from SDO to XSD to SDO is supported.
- * Round trip from XSD to SDO to XSD is not supported.
- * Use the original schema if one exists instead of generating a new one, as
- * the generated XSD validates a different set of documents than the original XSD.
- * Generating an XSD does not affect the XSDHelper or the Types.
- * The Types must all have the same URI.
- * The result is a String containing the generated XSD.
- * All Types referenced with the same URI will be generated in the XSD
- * and the list will be expanded to include all types generated.
- * Any Types referenced with other URIs will cause
- * imports to be produced as appropriate.
- * Imports will include a schemaLocation if a Map is provided with an entry
- * of the form key=import target namespace, value=schemaLocation
- * @param types a List containing the Types
- * @param namespaceToSchemaLocation map of target namespace to schema locations or null
- * @return a String containing the generated XSD.
- * @throws IllegalArgumentException if the XSD could not be generated.
- */
- String generate(List /*Type*/ types, Map /*String, String*/ namespaceToSchemaLocation);
-
- /**
- * The default XSDHelper.
- */
- XSDHelper INSTANCE = HelperProvider.getXSDHelper();
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/ExternalizableDelegator.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/ExternalizableDelegator.java
deleted file mode 100644
index 03220a8a32..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/ExternalizableDelegator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- *
- *
- * Service Data Objects
- * Version 2.1.0
- * Licensed Materials
- *
- * (c) Copyright BEA Systems, Inc., International Business Machines Corporation,
- * Oracle Corporation, Primeton Technologies Ltd., Rogue Wave Software, SAP AG.,
- * Software AG., Sun Microsystems, Sybase Inc., Xcalia, Zend Technologies,
- * 2005, 2006. All rights reserved.
- *
- *
- *
- */
-
-package commonj.sdo.impl;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.ObjectStreamException;
-
-/**
- * Delegates DataObject serialization while ensuring implementation independent
- * java.io.Serialization. An implementation of DataObject
- * returns an ExternalizableDelegator from its writeReplace() method.
- *
- * The root DataObject is the object returned from do.getRootObject() where
- * do is the DataObject being serialized in a java.io.ObjectOutputStream.
- * When do.getContainer() == null then do is a root object.
- *
- * The byte format for each DataObject in the stream is:
- * [0] [path] [root] // when do is not a root object
- * [1] [rootXML] // when do is a root object
- *
- * where:
- * [0] is the byte 0, serialized using writeByte(0).
- * [1] is the byte 1, serialized using writeByte(1).
- *
- * [path] is an SDO path expression from the root DataObject to the serialized
- * DataObject such that root.getDataObject(path) == do.
- * Serialized using writeUTF(path).
- *
- * [root] is the root object serialized using writeObject(root).
- *
- * [rootXML] is the GZip of the XML serialization of the root DataObject.
- * The XML serialization is the same as
- * XMLHelper.INSTANCE.save(root, "commonj.sdo", "dataObject", stream);
- * where stream is a GZIPOutputStream, length is the number of bytes
- * in the stream, and bytes are the contents of the stream.
- * Serialized using writeInt(length), write(bytes).
- *
- */
-public class ExternalizableDelegator implements Externalizable
-{
- public interface Resolvable extends Externalizable
- {
- Object readResolve() throws ObjectStreamException;
- }
-
- static final long serialVersionUID = 1;
- transient Resolvable delegate;
-
- public ExternalizableDelegator()
- {
- delegate = HelperProvider.createResolvable();
- }
-
- public ExternalizableDelegator(Object target)
- {
- delegate = HelperProvider.createResolvable(target);
- }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- delegate.writeExternal(out);
- }
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- delegate.readExternal(in);
- }
-
- public Object readResolve() throws ObjectStreamException
- {
- return delegate.readResolve();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/HelperProvider.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/HelperProvider.java
deleted file mode 100644
index be513c43e8..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/HelperProvider.java
+++ /dev/null
@@ -1,411 +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 commonj.sdo.impl;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * A HelperProvider obtains specific default helpers and other
- * implementation-specific objects used by a Java implementation of SDO.
- *
- * @version $Rev$ $Date$
- */
-public abstract class HelperProvider {
- /**
- * The default HelperProvider INSTANCE. This is located using the ClassLoader used
- * to load the HelperProvider class itself and if no default implementation is available
- * this field will be set to null.
- */
- public static HelperProvider INSTANCE;
-
- /**
- * The name of the resource that is used for service location.
- */
- public static final String SERVICE_RESOURCE_NAME = "META-INF/services/commonj.sdo.impl.HelperProvider";
-
- /**
- * The name of the system property that will be checked for an implementation name.
- */
- public static final String PROPERTY_NAME = "commonj.sdo.impl.HelperProvider";
-
- static {
- // initialize the default instance using this class's classloader
- // set to null if none could be located (implies no default implementation)
- HelperProvider provider;
- try {
- provider = getInstance(HelperProvider.class.getClassLoader());
- } catch (NoHelperProviderException e) {
- provider = null;
- }
- INSTANCE = provider;
- }
-
- public static synchronized void setDefaultInstance(ClassLoader cl) {
- if (INSTANCE == null) {
- try {
- INSTANCE = getInstance(cl);
- } catch (NoHelperProviderException e) {
- }
- }
- }
-
- /**
- * Locate and instantiate a HelperProvider.
- *
- * Attempt to locate a HelperProvider using first the Thread's current context classloader and then,
- * if that is not set, not readable, or does not provide an implementation, using the classloader
- * used to load the HelperProvider class itself.
- *
- * A new instance is returned for each sucessful invocation.
- *
- * @return an implementation of HelperProvider
- * @throws NoHelperProviderException if no provider implementation was defined or it could not be instantiated
- */
- public static HelperProvider getInstance() throws NoHelperProviderException {
- String implName = getImplementationName();
-
- ClassLoader cl = getContextClassLoader();
- if (cl != null) {
- HelperProvider provider = loadImplementation(cl, implName);
- if (provider != null) {
- return provider;
- }
- }
-
- cl = HelperProvider.class.getClassLoader();
- HelperProvider provider = loadImplementation(cl, implName);
- if (provider != null) {
- return provider;
- }
-
- throw new NoHelperProviderException(implName);
- }
-
-
- /**
- * Locate and instantiate a HelperProvider using the supplied ClassLoader.
- *
- * The name of the implementation to use is determined by the value of the "commonj.sdo.impl.HelperProvider"
- * system property. If this is not set or this code does not have permission to read it then the name
- * will be retrieved from the META-INF/services/commonj.sdo.impl.HelperProvider resource as returned
- * by the supplied classloader as described in the
- * JAR file specification.
- *
- * A new instance is returned for each sucessful invocation.
- *
- * @param cl the classloader to use to locate and instantiate the implementation
- * @return the specified implementation of HelperProvider
- * @throws NoHelperProviderException if no provider implementation was defined or it could not be instantiated
- */
- public static HelperProvider getInstance(ClassLoader cl) throws NoHelperProviderException {
- String implName = getImplementationName();
- HelperProvider provider = loadImplementation(cl, implName);
- if (provider == null) {
- throw new NoHelperProviderException(implName);
- }
- return provider;
- }
-
- private static ClassLoader getContextClassLoader() {
- try {
- return (ClassLoader)AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- } catch (SecurityException e) {
- return null;
- }
- }
-
- private static HelperProvider loadImplementation(ClassLoader cl, String implName) throws NoHelperProviderException {
- // if no name is requested, locate using the supplied classloader
- if (implName == null) {
- implName = getImplementationName(cl);
- }
- // no implementation to try, return null
- if (implName == null) {
- return null;
- }
-
- // try an instantiate the implementation
- try {
- return (HelperProvider) cl.loadClass(implName).newInstance();
- } catch (InstantiationException e) {
- throw new NoHelperProviderException(implName, e);
- } catch (IllegalAccessException e) {
- throw new NoHelperProviderException(implName, e);
- } catch (ClassNotFoundException e) {
- throw new NoHelperProviderException(implName, e);
- }
- }
-
- private static String getImplementationName() {
- try {
- return (String)AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return System.getProperty(PROPERTY_NAME);
- }
- });
- } catch (SecurityException e) {
- return null;
- }
- }
-
- private static String getImplementationName(ClassLoader cl) {
- InputStream is = cl.getResourceAsStream(SERVICE_RESOURCE_NAME);
- if (is == null) {
- return null;
- }
-
- InputStreamReader in;
- try {
- in = new InputStreamReader(is, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new AssertionError("UTF-8 encoding not available");
- }
-
- try {
- BufferedReader reader = new BufferedReader(in, 128);
- try {
- String line;
- while ((line = reader.readLine()) != null) {
- int i = line.indexOf('#');
- if (i != -1) {
- line = line.substring(0, i);
- }
- line = line.trim();
- if (line.length() > 0) {
- return line;
- }
- }
- return null;
- } finally {
- reader.close();
- }
- } catch (IOException e) {
- throw new NoHelperProviderException(e);
- }
- }
-
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // implementation specific methods for users that don't want to use the default implementation
-
- /**
- * Returns a CopyHelper obtained from this implementation.
- *
- * @return a CopyHelper obtained from this implementation
- */
- public abstract CopyHelper copyHelper();
-
- /**
- * Returns a DataFactory obtained from this implementation.
- *
- * @return a DataFactory obtained from this implementation
- */
- public abstract DataFactory dataFactory();
-
- /**
- * Returns a DataHelper obtained from this implementation.
- *
- * @return a DataHelper obtained from this implementation
- */
- public abstract DataHelper dataHelper();
-
- /**
- * Returns a EqualityHelper obtained from this implementation.
- *
- * @return a EqualityHelper obtained from this implementation
- */
- public abstract EqualityHelper equalityHelper();
-
- /**
- * Returns a TypeHelper obtained from this implementation.
- *
- * @return a TypeHelper obtained from this implementation
- */
- public abstract TypeHelper typeHelper();
-
- /**
- * Returns a XMLHelper obtained from this implementation.
- *
- * @return a XMLHelper obtained from this implementation
- */
- public abstract XMLHelper xmlHelper();
-
- /**
- * Returns a XSDHelper obtained from this implementation.
- *
- * @return a XSDHelper obtained from this implementation
- */
- public abstract XSDHelper xsdHelper();
-
- /**
- * Create a Resolvable using this implementation
- *
- * @return a Resolvable created using this implementation
- */
- public abstract ExternalizableDelegator.Resolvable resolvable();
-
- /**
- * Create a Resolvable using this implementation
- *
- * @param target the object to be resolved
- * @return a Resolvable created using this implementation
- */
- public abstract ExternalizableDelegator.Resolvable resolvable(Object target);
-
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // static helper methods required by the specification
-
- /**
- * Returns a CopyHelper obtained from the default HelperProvider.
- *
- * @return a CopyHelper obtained from the default HelperProvider
- */
- public static CopyHelper getCopyHelper() {
- return INSTANCE.copyHelper();
- }
-
- /**
- * Returns a DataFactory obtained from the default HelperProvider.
- *
- * @return a DataFactory obtained from the default HelperProvider
- */
- public static DataFactory getDataFactory() {
- return INSTANCE.dataFactory();
- }
-
- /**
- * Returns a DataHelper obtained from the default HelperProvider.
- *
- * @return a DataHelper obtained from the default HelperProvider
- */
- public static DataHelper getDataHelper() {
- return INSTANCE.dataHelper();
- }
-
- /**
- * Returns a EqualityHelper obtained from the default HelperProvider.
- *
- * @return a EqualityHelper obtained from the default HelperProvider
- */
- public static EqualityHelper getEqualityHelper() {
- return INSTANCE.equalityHelper();
- }
-
- /**
- * Returns a TypeHelper obtained from the default HelperProvider.
- *
- * @return a TypeHelper obtained from the default HelperProvider
- */
- public static TypeHelper getTypeHelper() {
- return INSTANCE.typeHelper();
- }
-
- /**
- * Returns a XMLHelper obtained from the default HelperProvider.
- *
- * @return a XMLHelper obtained from the default HelperProvider
- */
- public static XMLHelper getXMLHelper() {
- return INSTANCE.xmlHelper();
- }
-
- /**
- * Returns a XSDHelper obtained from the default HelperProvider.
- *
- * @return a XSDHelper obtained from the default HelperProvider
- */
- public static XSDHelper getXSDHelper() {
- return INSTANCE.xsdHelper();
- }
-
- /**
- * Create a Resolvable using the default HelperProvider
- *
- * @return a Resolvable created using the default HelperProvider
- */
- public static ExternalizableDelegator.Resolvable createResolvable() {
- return INSTANCE.resolvable();
- }
-
- /**
- * Create a Resolvable using the default HelperProvider
- *
- * @param target the object to be resolved
- * @return a Resolvable created using the default HelperProvider
- */
- public static ExternalizableDelegator.Resolvable createResolvable(Object target) {
- return INSTANCE.resolvable(target);
- }
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // New in SDO 2.1
- ////////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Gets the default HelperContext
- * @return a HelperContext object
- */
- public static HelperContext getDefaultContext()
- {
- return INSTANCE.helperContext();
- }
-
- HelperContext helperContext()
- {
- return defaultContext;
- }
-
-// static HelperContext defaultContext = new DefaultHelperContext();
-// TODO: Tuscany SDO implementation specific to create a special implementation of HelperContext
- protected static HelperContext defaultContext;
-
- static class DefaultHelperContext implements HelperContext
- {
- public CopyHelper getCopyHelper() { return INSTANCE.copyHelper(); }
- public DataFactory getDataFactory() { return INSTANCE.dataFactory(); }
- public DataHelper getDataHelper() { return INSTANCE.dataHelper(); }
- public EqualityHelper getEqualityHelper() { return INSTANCE.equalityHelper(); }
- public TypeHelper getTypeHelper() { return INSTANCE.typeHelper(); }
- public XMLHelper getXMLHelper() { return INSTANCE.xmlHelper(); }
- public XSDHelper getXSDHelper() { return INSTANCE.xsdHelper(); }
- }
-
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/NoHelperProviderException.java b/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/NoHelperProviderException.java
deleted file mode 100644
index 83f0b21e2e..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/java/commonj/sdo/impl/NoHelperProviderException.java
+++ /dev/null
@@ -1,58 +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 commonj.sdo.impl;
-
-/**
- * Exception indicating that a HelperProvider could not be located or instantiated.
- * The message will be set to the name of the implementation class; a null value
- * indicates that the name of the implementation could not be determined.
- * The cause will be set to the Throwable that prevented the provider from being
- * located or created.
- *
- * @version $Revision$ $Date$
- */
-public class NoHelperProviderException extends RuntimeException {
- private static final long serialVersionUID = 727646133930924084L;
-
- public NoHelperProviderException() {
- }
-
- public NoHelperProviderException(String message) {
- super(message);
- }
-
- public NoHelperProviderException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public NoHelperProviderException(Throwable cause) {
- super(cause);
- }
-
- /**
- * Return the name of the implementation class that could not be provided.
- *
- * @return the name of the implementation class; may be null if not known
- */
- public String getImplementationName() {
- return getMessage();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/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.1.1-incubating/sdo-api/src/main/resources/META-INF/LICENSE b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/LICENSE
deleted file mode 100644
index 23176fcec9..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/LICENSE
+++ /dev/null
@@ -1,277 +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.
-
-
-==================================================================================
-
-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, Interface Definition files
-and XSD files.
-
-The Service Data Objects JavaDoc, Interface Definition files and XSD files
-are 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, make derivative works of and distribute
-the Service Data Objects JavaDoc, Interface Definition files and XSD files
-(the "Artifacts") in any medium without fee or royalty is hereby granted,
-provided that you include the following on ALL copies of the Artifacts,
-or portions thereof, that you make:
-
-1. A link or URL to the Artifacts 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 Artifacts.
-
-
-
-THE ARTIFACTS ARE PROVIDED "AS IS" AND THE AUTHORS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THE
-ARTIFACTS 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 ARTIFACTS.
-
-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.
-
-Revision level 1.11, last updated on 2007/12/21
-
-============================================================================================================
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index a1c4f1a283..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,9 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-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).
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/datagraph.xsd b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/datagraph.xsd
deleted file mode 100644
index e6b9697a8d..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/datagraph.xsd
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Expected type is emof:Package.
-
-
-
-
-
-
-
-
-
-
- Expected type is xsd:schema.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xml b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xml
deleted file mode 100644
index 01d3d9e1ac..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xsd b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xsd
deleted file mode 100644
index 7387568942..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoJava.xsd
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xml b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xml
deleted file mode 100644
index 7fdf82d1be..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xsd b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xsd
deleted file mode 100644
index c5aabc9cc8..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoModel.xsd
+++ /dev/null
@@ -1,221 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xml b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xml
deleted file mode 100644
index f0fbeac49b..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xsd b/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xsd
deleted file mode 100644
index 39dd3840ec..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/main/resources/xml/sdoXML.xsd
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/commonj/sdo/impl/HelperProviderTestCase.java b/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/commonj/sdo/impl/HelperProviderTestCase.java
deleted file mode 100644
index a434f6f989..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/commonj/sdo/impl/HelperProviderTestCase.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 commonj.sdo.impl;
-
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import junit.framework.TestCase;
-import test.DefaultHelperProvider;
-import test.TCCL1HelperProvider;
-
-/**
- * @version $Revision$ $Date$
- */
-public class HelperProviderTestCase extends TestCase {
- private URL classes;
- private URL testClasses;
- private URL def;
- private URL tccl1;
-
- public void testInstanceIsNullWithNoImplementation() throws Exception {
- assertNull(HelperProvider.INSTANCE);
- }
-
- public void testDefaultInstance() throws Exception {
- ClassLoader cl = new URLClassLoader(new URL[]{classes, def, testClasses}, null);
- Class providerClass = cl.loadClass(HelperProvider.class.getName());
- Class implClass = cl.loadClass(DefaultHelperProvider.class.getName());
- Object instance = providerClass.getField("INSTANCE").get(null);
- assertNotNull(instance);
- assertEquals(implClass, instance.getClass());
- }
-
- public void testLocateFromClassLoader() throws Exception {
- ClassLoader cl = new URLClassLoader(new URL[]{classes, tccl1, testClasses}, null);
- Class providerClass = cl.loadClass(HelperProvider.class.getName());
- Object provider = providerClass.getMethod("getInstance", new Class[] {ClassLoader.class})
- .invoke(null, new Object[] {cl});
- assertNotNull(provider);
- assertEquals(TCCL1HelperProvider.class.getName(), provider.getClass().getName());
- }
-
- public void testThreadContextInstance() throws Exception {
- ClassLoader cl = new URLClassLoader(new URL[]{classes, tccl1, testClasses}, null);
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(cl);
- Class providerClass = cl.loadClass(HelperProvider.class.getName());
- Object provider = providerClass.getMethod("getInstance", new Class[0]).invoke(null, new Object[0]);
- assertNotNull(provider);
- assertEquals(TCCL1HelperProvider.class.getName(), provider.getClass().getName());
- } finally {
- Thread.currentThread().setContextClassLoader(tccl);
- }
-
- }
-
- public void testSystemProperty() {
- System.setProperty("commonj.sdo.impl.HelperProvider", "test.TCCL1HelperProvider");
- try {
- HelperProvider provider = HelperProvider.getInstance();
- assertNotNull(provider);
- assertEquals(TCCL1HelperProvider.class, provider.getClass());
- } finally {
- System.getProperties().remove("commonj.sdo.impl.HelperProvider");
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- classes = new URL(HelperProvider.class.getResource("HelperProvider.class"), "../../..");
- testClasses = new URL(HelperProviderTestCase.class.getResource("HelperProviderTestCase.class"), "../../..");
- tccl1 = new URL(testClasses, "tccl1/");
- def = new URL(testClasses, "default/");
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/DefaultHelperProvider.java b/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/DefaultHelperProvider.java
deleted file mode 100644
index 77d6206972..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/DefaultHelperProvider.java
+++ /dev/null
@@ -1,71 +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 test;
-
-import commonj.sdo.impl.HelperProvider;
-import commonj.sdo.impl.ExternalizableDelegator;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * @version $Revision$ $Date$
- */
-public class DefaultHelperProvider extends HelperProvider {
- public CopyHelper copyHelper() {
- throw new UnsupportedOperationException();
- }
-
- public DataFactory dataFactory() {
- throw new UnsupportedOperationException();
- }
-
- public DataHelper dataHelper() {
- throw new UnsupportedOperationException();
- }
-
- public EqualityHelper equalityHelper() {
- throw new UnsupportedOperationException();
- }
-
- public TypeHelper typeHelper() {
- throw new UnsupportedOperationException();
- }
-
- public XMLHelper xmlHelper() {
- throw new UnsupportedOperationException();
- }
-
- public XSDHelper xsdHelper() {
- throw new UnsupportedOperationException();
- }
-
- public ExternalizableDelegator.Resolvable resolvable() {
- throw new UnsupportedOperationException();
- }
-
- public ExternalizableDelegator.Resolvable resolvable(Object target) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/TCCL1HelperProvider.java b/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/TCCL1HelperProvider.java
deleted file mode 100644
index 05b1b04925..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/test/java/test/TCCL1HelperProvider.java
+++ /dev/null
@@ -1,71 +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 test;
-
-import commonj.sdo.impl.HelperProvider;
-import commonj.sdo.impl.ExternalizableDelegator;
-import commonj.sdo.helper.CopyHelper;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.DataHelper;
-import commonj.sdo.helper.EqualityHelper;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.helper.XMLHelper;
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * @version $Revision$ $Date$
- */
-public class TCCL1HelperProvider extends HelperProvider {
- public CopyHelper copyHelper() {
- throw new UnsupportedOperationException();
- }
-
- public DataFactory dataFactory() {
- throw new UnsupportedOperationException();
- }
-
- public DataHelper dataHelper() {
- throw new UnsupportedOperationException();
- }
-
- public EqualityHelper equalityHelper() {
- throw new UnsupportedOperationException();
- }
-
- public TypeHelper typeHelper() {
- throw new UnsupportedOperationException();
- }
-
- public XMLHelper xmlHelper() {
- throw new UnsupportedOperationException();
- }
-
- public XSDHelper xsdHelper() {
- throw new UnsupportedOperationException();
- }
-
- public ExternalizableDelegator.Resolvable resolvable() {
- throw new UnsupportedOperationException();
- }
-
- public ExternalizableDelegator.Resolvable resolvable(Object target) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/default/META-INF/services/commonj.sdo.impl.HelperProvider b/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/default/META-INF/services/commonj.sdo.impl.HelperProvider
deleted file mode 100644
index 5175e5abea..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/default/META-INF/services/commonj.sdo.impl.HelperProvider
+++ /dev/null
@@ -1,3 +0,0 @@
-# test comment and blank line
-
- test.DefaultHelperProvider # comment
diff --git a/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/tccl1/META-INF/services/commonj.sdo.impl.HelperProvider b/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/tccl1/META-INF/services/commonj.sdo.impl.HelperProvider
deleted file mode 100644
index fa88e4c705..0000000000
--- a/branches/sdo-1.1.1-incubating/sdo-api/src/test/resources/tccl1/META-INF/services/commonj.sdo.impl.HelperProvider
+++ /dev/null
@@ -1 +0,0 @@
-test.TCCL1HelperProvider
diff --git a/branches/sdo-1.1.1-incubating/tools/pom.xml b/branches/sdo-1.1.1-incubating/tools/pom.xml
deleted file mode 100644
index 7d6de220ff..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/pom.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo
- 1.1.1-incubating-SNAPSHOT
-
- 4.0.0
- tuscany-sdo-tools
- Tuscany SDO Tools
- SDO Tools.
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-lib
- ${sdo.version}
- compile
-
-
-
- org.apache.tuscany.sdo
- tuscany-sdo-impl
- ${sdo.version}
- compile
-
-
-
- org.eclipse.emf
- common
- ${emfVersion}
- compile
-
-
-
- org.eclipse.emf
- ecore
- ${emfVersion}
- compile
-
-
-
- org.eclipse.emf
- codegen
- ${emfVersion}
- compile
-
-
-
- org.eclipse.emf
- codegen-ecore
- ${emfVersion}
- compile
-
-
-
- org.eclipse.xsd
- xsd
- ${emfVersion}
- compile
-
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
- stax
- stax-api
- 1.0.1
- test
-
-
-
-
-
-
- maven-jar-plugin
-
-
-
- org.apache
- 1.1.1-incubating-SNAPSHOT
- 1.4
- 1.4
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.1
-
-
-
- ${project.artifactId}
- ${project.name}
- ${project.organization.name}
- ${version}
- ${project.artifactId}
- ${project.organization.name}
- org.apache
- ${project.version}
-
- 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
- org.apache.tuscany.sdo.generate,org.apache.tuscany.sdo.generate.util
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.2
-
-
- 2.0
-
-
-
-
-
-
-
-
-
diff --git a/branches/sdo-1.1.1-incubating/tools/readme.htm b/branches/sdo-1.1.1-incubating/tools/readme.htm
deleted file mode 100644
index e7aa8d6718..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/readme.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-Tuscany SDO Tools
-
-
-
-
-
-
Tuscany SDO Tools
-
Building SDO Tools
-
-To build the Tuscany SDO Java Generator tools, perform the following steps
-
-
Ensure that the environment variable JAVA_HOME is set to point to an installation of Java 5 (Java 1.5.0_6 works)
-
Run the command "mvn"
-
-Note: 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.
-
-
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
deleted file mode 100644
index c735e55e2a..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java
+++ /dev/null
@@ -1,739 +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.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.apache.tuscany.sdo.generate.adapter.SDOGenModelGeneratorAdapterFactory;
-import org.apache.tuscany.sdo.helper.HelperContextImpl;
-import org.apache.tuscany.sdo.impl.SDOPackageImpl;
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.internal.InternalFactory;
-import org.apache.tuscany.sdo.util.DataObjectUtil;
-import org.eclipse.emf.codegen.ecore.generator.Generator;
-import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
-import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
-import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
-import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
-import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory;
-import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage;
-import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
-import org.eclipse.emf.codegen.ecore.genmodel.GenResourceKind;
-import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
-import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
-import org.eclipse.emf.codegen.merge.java.JControlModel;
-import org.eclipse.emf.codegen.util.CodeGenUtil;
-import org.eclipse.emf.common.util.BasicMonitor;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.xsd.XSDSchema;
-
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * Abstract base class for static SDO code generators. See XSD2JavaGenerator and Interface2JavaGenerator for
- * concrete generator commands.
- *
- * Supports the following command line options:
- *
- * [ -targetDirectory ]
- * [ -javaPackage ]
- * [ -prefix ]
- * [ -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:
- * ResourceImpl and 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", ResourceFactoryImpl.class);
- * XMLDocument doc = XMLHelper.INSTANCE.load(new FileInputStream("somefile.xml"), null, options);
- * Note: this option currently only works for simple schemas without substitution groups or wildcards.
- * -interfaceDataObject
- * This option is used to generate static interfaces that extend commonj.sdo.DataObject
- * -sparsePattern
- * For SDO metamodels that have classes with many properties of which only a few are typically set at
- * runtime, this option can be used to produce a space-optimized implementation (at the expense of speed).
- * -storePattern
- * This option can be used to generate static classes that work with a Store-based DataObject
- * implementation. It changes the generator pattern to generate accessors which delegate to the
- * reflective methods (as opposed to the other way around) and changes the DataObject base class
- * to org.apache.tuscany.sdo.impl.StoreDataObjectImpl. Note that this option generates classes that
- * require a Store implementation to be provided before they can be run.
- * -noGenerate
- * A basic implementation of this switch is in place, but is not fully implemented. An intention
- * behind this is to provide commentary on the artifacts that would be generated.
- *
- *
- */
-public abstract class JavaGenerator
-{
- public static int OPTION_NO_INTERFACES=0x1;
- public static int OPTION_SPARSE_PATTERN=0x2;
- public static int OPTION_STORE_PATTERN=0x4;
- public static int OPTION_NO_CONTAINMENT=0x8;
- public static int OPTION_NO_NOTIFICATION=0x10;
- public static int OPTION_ARRAY_ACCESSORS=0x20;
- public static int OPTION_GENERATE_LOADER=0x40;
- public static int OPTION_NO_UNSETTABLE=0x80;
- //FIXME Temporary, I need this option for now to get Switch classes generated for the SCDL models
- public static int OPTION_GENERATE_SWITCH=0x100;
- public static int OPTION_INTERFACE_DO=0x400;
- public static int OPTION_NO_GENERATE=0x800;
-
- static
- {
- System.setProperty("EMF_NO_CONSTRAINTS", "true"); // never generate a validator class
- }
-
- /**
- * @deprecated replaced by XSD2JavaGenerator
- */
- public static void main(String args[])
- {
- try
- {
- JavaGenerator generator = new XSD2JavaGenerator();
- generator.processArguments(args);
- generator.run(args);
- }
- catch (IllegalArgumentException e)
- {
- printUsage();
- }
- }
-
- protected void processArguments(String args[])
- {
- if (args.length == 0)
- {
- throw new IllegalArgumentException();
- }
-
- int index = 0;
- while (args[index].startsWith("-"))
- {
- int newIndex = handleArgument(args, index);
- if (newIndex == index)
- {
- throw new IllegalArgumentException();
- }
- index = newIndex;
- if (index == args.length)
- {
- throw new IllegalArgumentException();
- }
- }
-
- inputIndex = index;
- }
-
- protected String targetDirectory = null;
- protected String javaPackage = null;
- protected String prefix = null;
- protected int genOptions = 0;
- protected String xsdFileName;
- protected int inputIndex;
-
- protected int handleArgument(String args[], int index)
- {
- if (args[index].equalsIgnoreCase("-targetDirectory"))
- {
- targetDirectory = args[++index];
- }
- else if (args[index].equalsIgnoreCase("-javaPackage"))
- {
- javaPackage = args[++index];
- }
- else if (args[index].equalsIgnoreCase("-prefix"))
- {
- prefix = args[++index];
- }
- else if (args[index].equalsIgnoreCase("-noInterfaces"))
- {
- genOptions |= OPTION_NO_INTERFACES;
- }
- else if (args[index].equalsIgnoreCase("-sparsePattern"))
- {
- genOptions |= OPTION_SPARSE_PATTERN;
- }
- else if (args[index].equalsIgnoreCase("-storePattern"))
- {
- genOptions |= OPTION_STORE_PATTERN;
- }
- else if (args[index].equalsIgnoreCase("-noContainment"))
- {
- genOptions |= OPTION_NO_CONTAINMENT;
- }
- else if (args[index].equalsIgnoreCase("-noNotification"))
- {
- genOptions |= OPTION_NO_NOTIFICATION;
- }
- else if (args[index].equalsIgnoreCase("-arrayAccessors"))
- {
- genOptions |= OPTION_ARRAY_ACCESSORS;
- }
- else if (args[index].equalsIgnoreCase("-generateLoader"))
- {
- genOptions |= OPTION_GENERATE_LOADER;
- }
- else if (args[index].equalsIgnoreCase("-noUnsettable"))
- {
- genOptions |= OPTION_NO_UNSETTABLE;
- }
- else if (args[index].equalsIgnoreCase("-noEMF"))
- {
- System.out.println("Warning: -noEMF is deprecated. It is the default now.");
- //genOptions |= OPTION_NO_EMF;
- }
- else if (args[index].equalsIgnoreCase("-interfaceDataObject"))
- {
- genOptions |= OPTION_INTERFACE_DO;
- }
- else if (args[index].equalsIgnoreCase("-noGenerate"))
- {
- genOptions |= OPTION_NO_GENERATE;
- }
- //else if (...)
- else
- {
- return index;
- }
-
- return index + 1;
- }
-
- protected abstract void run(String args[]);
-
- /**
- * @deprecated moved to XSD2JavaGenerator
- */
- public static void generateFromXMLSchema(String xsdFileName, String targetDirectory, String javaPackage, String prefix, int genOptions)
- {
- DataObjectUtil.initRuntime();
- EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
- ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
- XSDHelper xsdHelper = (new HelperContextImpl(extendedMetaData, false)).getXSDHelper();
-
- try
- {
- File inputFile = new File(xsdFileName).getAbsoluteFile();
- InputStream inputStream = new FileInputStream(inputFile);
- xsdHelper.define(inputStream, inputFile.toURI().toString());
-
- if (targetDirectory == null)
- {
- targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
- }
- else
- {
- targetDirectory = new File(targetDirectory).getCanonicalPath();
- }
-
- if (!packageRegistry.values().isEmpty())
- {
- String packageURI = getSchemaNamespace(xsdFileName);
- generatePackages(packageRegistry.values(), packageURI, null, targetDirectory, javaPackage, prefix, genOptions);
- }
-
- /*
- for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();)
- {
- EPackage ePackage = (EPackage)iter.next();
- String basePackage = extractBasePackageName(ePackage, javaPackage);
- if (prefix == null)
- {
- prefix = CodeGenUtil.capName(ePackage.getName());
- }
- generateFromEPackage(ePackage, targetDirectory, basePackage, prefix, genOptions);
- }
- */
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
-
- protected static void generatePackages(Collection packageList, String packageURI, String shortName, String targetDirectory, String javaPackage, String prefix, int genOptions)
- {
- Hashtable packageInfoTable = new Hashtable();
- packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, packageURI, shortName ));
- generatePackages(packageList, targetDirectory, packageInfoTable, genOptions, false);
- }
-
- protected static GenModel generatePackages(Collection packageList, String targetDirectory, Hashtable packageInfoTable, int genOptions, boolean allNamespaces )
- {
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
- List usedGenPackages = new ArrayList();
- GenModel genModel = null;
- ArrayList packagesToModel = new ArrayList();
- for (Iterator iter = packageList.iterator(); iter.hasNext();)
- {
- EPackage currentEPackage = (EPackage)iter.next();
- String packageNamespace = currentEPackage.getNsURI();
- PackageInfo packageInfo = (PackageInfo)packageInfoTable.get(packageNamespace);
- boolean bTargetPackage = allNamespaces;
- String javaPackage = null;
- String prefix = null;
- String shortName = null;
- if( packageInfo != null )
- {
- bTargetPackage = true;
- javaPackage = packageInfo.getBasePackage();
- prefix = packageInfo.getPrefix();
- shortName = packageInfo.getShortName();
- }
- String currentBasePackage = extractBasePackageName(currentEPackage, bTargetPackage ? javaPackage : null);
- String currentPrefix = bTargetPackage && prefix != null ? prefix : CodeGenUtil.capName(shortName != null ? shortName : currentEPackage.getName());
- packageInfoTable.put(currentEPackage, new PackageInfo(currentBasePackage, currentPrefix, null, null ));
-
- if( allNamespaces || packageInfo != null )
- packagesToModel.add(currentEPackage);
- else
- {
- GenPackage currentGenPackage = createGenPackage(currentEPackage, currentBasePackage, currentPrefix, genOptions, resourceSet);
- usedGenPackages.add(currentGenPackage);
- }
- }
- genModel = createGenPackages(packagesToModel, packageInfoTable, genOptions, resourceSet);
-
- if (genModel == null) return null; // nothing to generate
-
- //TODO Figure out which predefined packages are really "used"
- usedGenPackages.add(createGenPackage(SDOPackageImpl.eINSTANCE, "org.apache.tuscany", "SDO", 0, resourceSet));
- usedGenPackages.add(createGenPackage((EPackage)ModelFactory.INSTANCE, "org.apache.tuscany.sdo", "Model", 0, resourceSet));
- usedGenPackages.add(createGenPackage((EPackage)InternalFactory.INSTANCE, "org.apache.tuscany.sdo.model", "Internal", 0, resourceSet));
- //usedGenPackages.add(createGenPackage((EPackage)JavaFactory.INSTANCE, "org.apache.tuscany.sdo.model", "Java", 0, resourceSet));
- //usedGenPackages.add(createGenPackage((EPackage)XMLFactory.INSTANCE, "org.apache.tuscany.sdo.model", "XML", 0, resourceSet));
-
- genModel.getUsedGenPackages().addAll(usedGenPackages);
-
- // If the display namespace option is selected, Don't generate
- if( (genOptions & OPTION_NO_GENERATE) == 0)
- {
- // Invoke the SDO JavaGenerator to generate the SDO classes
- try
- {
- generateFromGenModel(genModel, new File(targetDirectory).getCanonicalPath(), genOptions);
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
-
- return genModel;
- }
-
- /**
- * @deprecated
- */
- public static String getSchemaNamespace(String xsdFileName)
- {
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
- File inputFile = new File(xsdFileName).getAbsoluteFile();
- Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true);
- XSDSchema schema = (XSDSchema)model.getContents().get(0);
- return schema.getTargetNamespace();
- }
-
- protected static GenModel createGenPackages(Collection ePackages, Hashtable packageInfoTable, int genOptions, ResourceSet resourceSet)
- {
- GenModel genModel = ecore2GenModel(ePackages, packageInfoTable, genOptions);
-
- for (Iterator iter = ePackages.iterator(); iter.hasNext();)
- {
- EPackage ePackage = (EPackage)iter.next();
-
- URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore");
- URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
-
- Resource ecoreResource = resourceSet.createResource(ecoreURI);
- ecoreResource.getContents().add(ePackage);
-
- Resource genModelResource = resourceSet.createResource(genModelURI);
- genModelResource.getContents().add(genModel);
- }
-
- return genModel;
- }
-
- public static GenPackage createGenPackage(EPackage ePackage, String basePackage, String prefix, int genOptions, ResourceSet resourceSet)
- {
- GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions);
-
- URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore");
- URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
-
- Resource ecoreResource = resourceSet.createResource(ecoreURI);
- ecoreResource.getContents().add(ePackage);
-
- Resource genModelResource = resourceSet.createResource(genModelURI);
- genModelResource.getContents().add(genModel);
-
- return (GenPackage)genModel.getGenPackages().get(0);
- }
-
- public static void generateFromEPackage(EPackage ePackage, String targetDirectory, String basePackage, String prefix, int genOptions)
- {
- GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions);
-
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
- URI ecoreURI = URI.createURI("file:///temp.ecore");
- URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel");
-
- Resource ecoreResource = resourceSet.createResource(ecoreURI);
- ecoreResource.getContents().add(ePackage);
-
- Resource genModelResource = resourceSet.createResource(genModelURI);
- genModelResource.getContents().add(genModel);
-
- generateFromGenModel(genModel, targetDirectory, genOptions);
- }
-
- public static void generateFromGenModel(GenModel genModel, String targetDirectory, int genOptions)
- {
- Resource resource = genModel.eResource();
-
- // Return if nothing is found
- if( resource == null )
- return;
-
- if (targetDirectory != null)
- {
- resource.getResourceSet().getURIConverter().getURIMap().put(
- URI.createURI("platform:/resource/TargetProject/"),
- URI.createFileURI(targetDirectory + "/"));
- genModel.setModelDirectory("/TargetProject");
- }
-
- //genModel.gen(new BasicMonitor.Printing(System.out));
- GeneratorAdapterFactory.Descriptor.Registry.INSTANCE.addDescriptor
- (GenModelPackage.eNS_URI, GenModelGeneratorAdapterFactory.DESCRIPTOR);
-
- //Generator generator = new Generator();
- Generator generator = new Generator()
- {
- public JControlModel getJControlModel()
- {
- if (jControlModel == null)
- {
- jControlModel = new JControlModel();
- }
- return jControlModel;
- }
- };
-
-
- //if ((genOptions & OPTION_USE_EMF_PATTERNS) == 0)
- {
- generator.getAdapterFactoryDescriptorRegistry().addDescriptor
- (GenModelPackage.eNS_URI, SDOGenModelGeneratorAdapterFactory.DESCRIPTOR);
- }
-
- generator.setInput(genModel);
- generator.generate(genModel, GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, new BasicMonitor.Printing(System.out));
-
-
- for (Iterator j = resource.getContents().iterator(); j.hasNext();)
- {
- EObject eObject = (EObject)j.next();
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK)
- {
- printDiagnostic(diagnostic, "");
- }
- }
- }
-
- public static GenModel ecore2GenModel(EPackage ePackage, String basePackage, String prefix, int genOptions)
- {
- ArrayList ePackages = new ArrayList();
- ePackages.add(ePackage);
- Hashtable packageInfoTable = new Hashtable();
- packageInfoTable.put(ePackage, new PackageInfo(basePackage, prefix, null, null ));
- return ecore2GenModel(ePackages, packageInfoTable, genOptions );
- }
-
- private static GenModel ecore2GenModel(Collection ePackages, Hashtable packageInfoTable, int genOptions)
- {
- GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
- genModel.initialize(ePackages);
-
- genModel.setRootExtendsInterface("");
- genModel.setRootImplementsInterface("commonj.sdo.DataObject");
- genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl");
- genModel.setFeatureMapWrapperInterface("commonj.sdo.Sequence");
- genModel.setFeatureMapWrapperInternalInterface("org.apache.tuscany.sdo.util.BasicSequence");
- genModel.setFeatureMapWrapperClass("org.apache.tuscany.sdo.util.BasicSequence");
- genModel.setSuppressEMFTypes(true);
- genModel.setSuppressEMFMetaData(true);
- genModel.setSuppressEMFModelTags(true);
- genModel.setCanGenerate(true);
- //FIXME workaround java.lang.NoClassDefFoundError: org/eclipse/jdt/core/jdom/IDOMNode with 02162006 build
- genModel.setFacadeHelperClass("Hack");
- genModel.setForceOverwrite(true);
-
- if ((genOptions & OPTION_NO_INTERFACES) != 0)
- {
- genModel.setSuppressInterfaces(true);
- }
-
- if ((genOptions & OPTION_SPARSE_PATTERN) != 0)
- {
- genModel.setFeatureDelegation(GenDelegationKind.VIRTUAL_LITERAL);
- }
- else if ((genOptions & OPTION_STORE_PATTERN) != 0)
- {
- genModel.setFeatureDelegation(GenDelegationKind.REFLECTIVE_LITERAL);
- genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.StoreDataObjectImpl");
- }
-
- if ((genOptions & OPTION_NO_CONTAINMENT) != 0)
- {
- genModel.setSuppressContainment(true);
- }
-
- if ((genOptions & OPTION_NO_NOTIFICATION) != 0)
- {
- genModel.setSuppressNotification(true);
- }
-
- if ((genOptions & OPTION_ARRAY_ACCESSORS) != 0)
- {
- genModel.setArrayAccessors(true);
- }
-
- if ((genOptions & OPTION_NO_UNSETTABLE) != 0)
- {
- genModel.setSuppressUnsettable(true);
- }
-
- //if ((genOptions & OPTION_USE_EMF_PATTERNS) == 0)
- {
- genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.DataObjectBase");
- }
-
- if ((genOptions & OPTION_INTERFACE_DO) != 0)
- {
- genModel.setRootExtendsInterface("commonj.sdo.DataObject");
- }
- else
- {
- genModel.setRootExtendsInterface("java.io.Serializable");
- }
-
- //GenPackage genPackage = (GenPackage)genModel.getGenPackages().get(0);
- Collection packages = genModel.getGenPackages();
- for (Iterator iter1 = packages.iterator(); iter1.hasNext();)
- {
- GenPackage genPackage = (GenPackage)iter1.next();
- PackageInfo packageInfo = (PackageInfo)packageInfoTable.get(genPackage.getEcorePackage());
-
- if (packageInfo.getBasePackage() != null)
- {
- genPackage.setBasePackage(packageInfo.getBasePackage());
- }
- if (packageInfo.getPrefix() != null)
- {
- genPackage.setPrefix(packageInfo.getPrefix());
- }
-
- //FIXME Temporary, I need this option for now to get Switch classes generated for the SCDL models
- if ((genOptions & OPTION_GENERATE_SWITCH) == 0)
- {
- genPackage.setAdapterFactory(false);
- }
-
- if ((genOptions & OPTION_GENERATE_LOADER) != 0)
- {
- //FIXME workaround compile error with 02162006 build, generated code references non-existent EcoreResourceImpl class
- genPackage.setResource(GenResourceKind.XML_LITERAL);
- //genPackage.setDataTypeConverters(true);
- }
- else
- {
- genPackage.setResource(GenResourceKind.NONE_LITERAL);
- for (Iterator iter2 = genPackage.getGenClasses().iterator(); iter2.hasNext();)
- {
- GenClass genClass = (GenClass)iter2.next();
- if ("DocumentRoot".equals(genClass.getName()))
- {
- genClass.setDynamic(true); // Don't generate DocumentRoot class
- break;
- }
- }
- }
- }
- return genModel;
- }
-
- public static String extractBasePackageName(EPackage ePackage, String javaPackage)
- {
- String qualifiedName = javaPackage != null ? javaPackage : ePackage.getName();
- String name = /*CodeGenUtil.*/shortName(qualifiedName);
- String baseName = qualifiedName.substring(0, qualifiedName.length() - name.length());
- if (javaPackage != null || !name.equals(qualifiedName))
- {
- ePackage.setName(name);
- }
- return baseName != null ? /*CodeGenUtil.*/safeQualifiedName(baseName) : null;
- }
-
- public static String shortName(String qualifiedName)
- {
- int index = qualifiedName.lastIndexOf(".");
- return index != -1 ? qualifiedName.substring(index + 1) : qualifiedName;
- }
-
- public static String safeQualifiedName(String qualifiedName)
- {
- StringBuffer safeQualifiedName = new StringBuffer();
- for (StringTokenizer stringTokenizer = new StringTokenizer(qualifiedName, "."); stringTokenizer.hasMoreTokens();)
- {
- String name = stringTokenizer.nextToken();
- safeQualifiedName.append(CodeGenUtil.safeName(name));
- if (stringTokenizer.hasMoreTokens())
- {
- safeQualifiedName.append('.');
- }
- }
- return safeQualifiedName.toString();
- }
-
- protected static void printDiagnostic(Diagnostic diagnostic, String indent)
- {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Iterator i = diagnostic.getChildren().iterator(); i.hasNext();)
- {
- printDiagnostic((Diagnostic)i.next(), indent + " ");
- }
- }
-
- protected static void printUsage()
- {
- System.out.println("Usage: this is a deprecated command replaced by XSD2JavaGenerator");
- }
-
- public static class PackageInfo
- {
- private String basePackage;
- private String prefix;
- private String namespace;
- private String shortName;
-
- public PackageInfo(String basePackage, String prefix, String namespace, String shortName )
- {
- setBasePackage(basePackage);
- setPrefix(prefix);
- setNamespace(namespace);
- setShortName(shortName);
- }
-
- public void setBasePackage(String basePackage) { this.basePackage = basePackage; }
- public String getBasePackage() { return basePackage; }
- public void setPrefix(String prefix) { this.prefix = prefix; }
- public String getPrefix() { return prefix; }
- public void setNamespace(String namespace) { this.namespace = namespace; }
- public String getNamespace() { return namespace; }
- public void setShortName(String shortName) { this.shortName = shortName; }
- public String getShortName() { return shortName; }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
deleted file mode 100644
index 7e65549165..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java
+++ /dev/null
@@ -1,500 +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 ]
- * [ -javaPackage ]
- * [ -schemaNamespace ]
- * [ -namespaceInfo ]
- * [ other options ... ]
- * |
- *
- * Options:
- *
- * -schemaNamespace
- * Generate classes for XSD types in the specified targetNamespace. By default, types in the
- * targetNamespace of the first schema in the specified xsd or wsdl file are generated. Specify
- * 'all' and this parameter will act as a wildcard selecting all namespaces for code generation.
- * -namespaceInfo
- * Specifies the name of a file that should contain a list of namespaces and their associated package names.
- * Optionally, a prefix may be assigned to each namespace as well. These values are separated by semicolons.
- * So each line in the file would look something like this:
- *
- * some\namespace;custom.package.name;optionalPrefix
- *
- * NOTE: see the base class JavaGenerator for other options.
- *
- * Example:
- *
- * generate somedir/somefile.xsd
- *
- * See base class JavaGenerator for details and the other options.
- *
- */
- public static void main(String args[])
- {
- try
- {
- XSD2JavaGenerator generator = new XSD2JavaGenerator();
- generator.processArguments(args);
- generator.run(args);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- printUsage();
- }
- }
-
-
- protected String schemaNamespace = null;
- protected String namespaceInfo = null;
- protected String generateBuiltIn = null;
- protected static GeneratedPackages generatedPackages = null;
- protected boolean allNamespaces = false;
-
- protected int handleArgument(String args[], int index)
- {
- if (args[index].equalsIgnoreCase("-schemaNamespace"))
- {
- schemaNamespace = args[++index];
- if( "all".equalsIgnoreCase(schemaNamespace) )
- {
- schemaNamespace = null;
- allNamespaces = true;
- }
- }
- else if (args[index].equalsIgnoreCase("-generateBuiltIn"))
- {
- // Internal option used when regenerating one of the built-in (predefined) models (e.g., commonj.sdo).
- generateBuiltIn = args[++index];
- }
- else if (args[index].equalsIgnoreCase("-namespaceInfo"))
- {
- namespaceInfo = args[++index];
- }
- else
- {
- return super.handleArgument(args, index);
- }
-
- return index + 1;
- }
-
- protected void run(String args[])
- {
- String xsdFileName = args[inputIndex];
- EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
- ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
- String packageURI = getSchemaNamespace(xsdFileName);
- Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
- generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
- }
-
- /**
- * This method was invoked by the SDO Mojo plugin
- *
- * @param xsdFileName
- * @param namespace
- * @param targetDirectory
- * @param javaPackage
- * @param prefix
- * @param genOptions
- */
- public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
- {
- boolean allNamespaces = false;
-
- // Need to process the passed-in schemaNamespace value from Mojo plugin the same as the command line
- if( "all".equalsIgnoreCase(namespace))
- {
- namespace = null;
- allNamespaces = true;
- }
-
- EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
- ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
- String packageURI = getSchemaNamespace(xsdFileName);
- Hashtable packageInfoTable = createPackageInfoTable(packageURI, namespace, javaPackage, prefix, null );
- generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, null, allNamespaces);
- }
-
-
- protected static GenModel generateFromXMLSchema(String xsdFileName,
- EPackage.Registry packageRegistry,
- ExtendedMetaData extendedMetaData,
- String targetDirectory,
- Hashtable packageInfoTable,
- int genOptions,
- String regenerateBuiltIn,
- boolean allNamespaces )
- {
- GenModel genModel = null;
-
- HelperContext hc = new HelperContextImpl(extendedMetaData, false);
- XSDHelper xsdHelper = hc.getXSDHelper();
- ((XSDHelperImpl)xsdHelper).setRedefineBuiltIn(regenerateBuiltIn);
-
- try
- {
- File inputFile = new File(xsdFileName).getAbsoluteFile();
- InputStream inputStream = new FileInputStream(inputFile);
- xsdHelper.define(inputStream, inputFile.toURI().toString());
-
- if (targetDirectory == null)
- {
- targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
- }
- else
- {
- targetDirectory = new File(targetDirectory).getCanonicalPath();
- }
-
- if (!packageRegistry.values().isEmpty())
- {
- genModel = generatePackages(packageRegistry.values(), targetDirectory, packageInfoTable, genOptions, allNamespaces );
- // For now, this option is not supported
- /*
- if( (genModel != null) )
- {
- if((extendedMetaData != null))
- {
- // Display only, will report all namespaces and associated packages found
- List genPackages = genModel.getGenPackages();
- for (Iterator iter = genPackages.iterator(); iter.hasNext();)
- {
- GenPackage genPackage = (GenPackage)iter.next();
- EPackage ecorePackage = genPackage.getEcorePackage();
- if( (genOptions & OPTION_DISPLAY_NAMESPACES) != 0)
- System.out.println(extendedMetaData.getNamespace(ecorePackage)+";"+genPackage.getInterfacePackageName()+"."+ecorePackage.getName());
- }
- }
- }
- */
- } else {
- System.err.println("Input schema file " + xsdFileName + " defined no metadata.");
- }
-
- /*
- for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();)
- {
- EPackage ePackage = (EPackage)iter.next();
- String basePackage = extractBasePackageName(ePackage, javaPackage);
- if (prefix == null)
- {
- prefix = CodeGenUtil.capName(ePackage.getName());
- }
- generateFromEPackage(ePackage, targetDirectory, basePackage, prefix, genOptions);
- }
- */
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- return genModel;
- }
-
- public static String getSchemaNamespace(String xsdFileName)
- {
- ResourceSet resourceSet = DataObjectUtil.createResourceSet();
- File inputFile = new File(xsdFileName).getAbsoluteFile();
- Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true);
- XSDSchema schema = (XSDSchema)model.getContents().get(0);
- String targetNS = schema.getTargetNamespace();
- if (targetNS == null) {
- targetNS = schema.getSchemaLocation();
- }
-
- return targetNS;
- }
-
- protected static void printUsage()
- {
- System.out.println("Usage arguments:");
- System.out.println(" [ -targetDirectory ]");
- System.out.println(" [ -javaPackage ]");
- System.out.println(" [ -prefix ]");
- System.out.println(" [ -schemaNamespace ]");
- System.out.println(" [ -namespaceInfo ]");
- 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(" | ");
- System.out.println("");
- System.out.println("For example:");
- System.out.println("");
- System.out.println(" generate somedir/somefile.xsd");
- }
-
- public void generateFromXMLSchema(String args[])
- {
- try
- {
- processArguments(args);
- EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
- ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
- String xsdFileName = args[inputIndex];
- String packageURI = getSchemaNamespace(xsdFileName);
- Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
- GenModel genModel = generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
- generatedPackages = new GeneratedPackages(genModel,extendedMetaData);
- }
- catch (IllegalArgumentException e)
- {
- printUsage();
- }
- }
-
- private static Hashtable createPackageInfoTable( String packageURI, String schemaNamespace, String javaPackage, String prefix, String namespaceInfo )
- {
- Hashtable packageInfoTable = new Hashtable();
-
- if( namespaceInfo != null )
- {
- try
- {
- FileReader inputFile = new FileReader(namespaceInfo);
- BufferedReader bufRead = new BufferedReader(inputFile);
-
- String line = bufRead.readLine();
- while( line != null )
- {
- if( line.length() > 0 )
- {
- String [] options = line.split(";");
- if( options.length > 1 )
- {
- if( options.length > 2 )
- packageInfoTable.put(options[0], new PackageInfo(options[1], options[2], options[0], null ));
- else
- packageInfoTable.put(options[0], new PackageInfo(options[1], null, options[0], null ));
- }
- else
- packageInfoTable.put(options[0], new PackageInfo(null, null, options[0], null ));
- }
- line = bufRead.readLine();
- }
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
- else
- {
- if( schemaNamespace != null )
- packageInfoTable.put(schemaNamespace, new PackageInfo(javaPackage, prefix, schemaNamespace, null ));
- else if( packageURI != null )
- packageInfoTable.put(packageURI, new PackageInfo(javaPackage, prefix, null, null ));
- }
- return packageInfoTable;
- }
-
- public List getGeneratedPackageInfo()
- {
- if( generatedPackages != null )
- return generatedPackages.getPackageList();
- else
- return null;
- }
-
- protected class GeneratedPackages
- {
- private List genPackages = null;
-
- GeneratedPackages(GenModel genModel, ExtendedMetaData extendedMetaData)
- {
- List packages = genModel.getGenPackages();
- Hashtable genClasses = new Hashtable();
- for (Iterator iter = packages.iterator(); iter.hasNext();)
- {
- // loop through the list, once to build up the eclass to genclass mapper
- GenPackage genPackage = (GenPackage)iter.next();
- List classes = genPackage.getGenClasses();
- for (Iterator classIter = classes.iterator(); classIter.hasNext();)
- {
- GenClass genClass = (GenClass)classIter.next();
- genClasses.put(genClass.getEcoreClass(), genClass);
- }
- }
- genPackages = new ArrayList();
- for (Iterator iter = packages.iterator(); iter.hasNext();)
- {
- // now process the pckage list
- GenPackage genPackage = (GenPackage)iter.next();
- genPackages.add(new GeneratedPackage(genPackage,extendedMetaData,genClasses));
- }
- }
-
- List getPackageList() {return genPackages;}
- }
-
- public class GeneratedPackage
- {
- private String namespace;
- private Hashtable classes;
-
- public String getNamespace() {return namespace;}
- public List getClasses() {return new ArrayList(classes.values());}
-
- GeneratedPackage(GenPackage genPackage, ExtendedMetaData extendedMetaData, Hashtable eclassGenClassMap )
- {
- classes = new Hashtable();
-
- EPackage ePackage = genPackage.getEcorePackage();
- namespace = extendedMetaData.getNamespace(ePackage);
-
- List genClasses = genPackage.getGenClasses();
- for (Iterator iterClass = genClasses.iterator(); iterClass.hasNext();)
- {
- GenClass genClass = (GenClass)iterClass.next();
- if ("DocumentRoot".equals(genClass.getEcoreClass().getName())) {
- List features = genClass.getGenFeatures();
- for (Iterator iterFeatures = features.iterator(); iterFeatures.hasNext();)
- {
- GenFeature feature = (GenFeature)iterFeatures.next();
- addGlobalElement(feature.getEcoreFeature(),extendedMetaData, eclassGenClassMap);
- }
- }
- }
- }
-
- private void addGlobalElement(EStructuralFeature eFeature, ExtendedMetaData extendedMetaData, Hashtable eclassGenClassMap )
- {
-
- String name = eFeature.getName();
- String classname = "";
- boolean anonymous = false;
- List propertyClassNames = null;
-
- EClassifier eClassifier = eFeature.getEType();
-
- if( eClassifier instanceof EClass )
- {
- // complex type
- EClass eClass = (EClass)eClassifier;
- GenClass genEClass = (GenClass)eclassGenClassMap.get(eClassifier);
- if( genEClass != null )
- {
- classname = genEClass.getGenPackage().getInterfacePackageName()
- + '.' + genEClass.getInterfaceName();
- anonymous = extendedMetaData.isAnonymous(eClass);
-
- // Build list of property names
- propertyClassNames = new ArrayList();
- List properties = eClass.getEStructuralFeatures();
- for (Iterator iterProperties = properties.iterator(); iterProperties.hasNext();)
- {
- EStructuralFeature property = (EStructuralFeature)iterProperties.next();
- EClassifier propertyType = property.getEType();
- if (propertyType instanceof EClass)
- {
- GenClass propertyGenClass = (GenClass)eclassGenClassMap.get(propertyType);
- if( propertyGenClass != null )
- {
- String propertyClassName = propertyGenClass.getGenPackage().getInterfacePackageName() + '.'
- + propertyGenClass.getInterfaceName();
- propertyClassNames.add(propertyClassName);
- }
- }
- else if (propertyType instanceof EClassifier)
- {
- String propertyClassName = propertyType.getInstanceClass().getName();
- propertyClassNames.add(propertyClassName);
- }
- }
- }
- }
- else
- {
- // simple type
- classname = eClassifier.getInstanceClass().getName();
- }
- classes.put( name, new PackageClassInfo( name, classname, anonymous, propertyClassNames ) );
- }
-
- public class PackageClassInfo
- {
- private String name;
- private String className = null;
- private boolean anonymous = false;
- private List properties = null;
-
- PackageClassInfo( String name, String className, boolean anonymous, List properties )
- {
- this.name = name;
- this.className = className;
- this.anonymous = anonymous;
- this.properties = properties;
- }
-
- public String getName() {return name;}
- public String getClassName() {return className;}
- public boolean getAnonymous() {return anonymous;}
- public List getProperties() {return properties;}
- }
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java
deleted file mode 100644
index d522ad5fad..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.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.generate.adapter;
-
-import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
-import org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter;
-import org.eclipse.emf.common.util.Monitor;
-
-public class SDOGenClassGeneratorAdapter extends GenClassGeneratorAdapter {
-
- public SDOGenClassGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory)
- {
- super(generatorAdapterFactory);
- }
-
- private static JETEmitterDescriptor[] jetEmitterDescriptors;
-
- protected JETEmitterDescriptor[] getJETEmitterDescriptors()
- {
- if (jetEmitterDescriptors == null)
- {
- JETEmitterDescriptor[] base = super.getJETEmitterDescriptors();
- jetEmitterDescriptors = new JETEmitterDescriptor[base.length];
- System.arraycopy(base, 0, jetEmitterDescriptors, 0, base.length);
- jetEmitterDescriptors[CLASS_ID] = new JETEmitterDescriptor("model/SDOClass.javajet", "org.apache.tuscany.sdo.generate.templates.model.SDOClass");
- }
- return jetEmitterDescriptors;
- }
-
- protected void ensureProjectExists(String workspacePath, Object object,
- Object projectType, boolean force, Monitor monitor)
- {
- // Do nothing -- this avoids differential behaviour according to whether we
- // are running in Eclipse or not
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
deleted file mode 100644
index 16678e001b..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
+++ /dev/null
@@ -1,38 +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.GenModelGeneratorAdapter;
-import org.eclipse.emf.common.util.Monitor;
-
-public class SDOGenModelGeneratorAdapter extends GenModelGeneratorAdapter {
-
- public SDOGenModelGeneratorAdapter(
- GeneratorAdapterFactory generatorAdapterFactory) {
- super(generatorAdapterFactory);
- }
-
- protected void ensureProjectExists(String workspacePath, Object object,
- Object projectType, boolean force, Monitor monitor) {
- // Do nothing -- this avoids differential behaviour according to whether we
- // are running in Eclipse or not
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
deleted file mode 100644
index dfe62878af..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
+++ /dev/null
@@ -1,63 +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;
- }
-
- public Adapter createGenModelAdapter()
- {
- if (genModelGeneratorAdapter == null)
- {
- genModelGeneratorAdapter = new SDOGenModelGeneratorAdapter(this);
- }
- return genModelGeneratorAdapter;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
deleted file mode 100644
index 6616be995c..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java
+++ /dev/null
@@ -1,59 +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
- }
-
- protected void ensureProjectExists(String workspacePath, Object object,
- Object projectType, boolean force, Monitor monitor)
- {
- // Do nothing -- this avoids differential behaviour according to whether we
- // are running in Eclipse or not
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
deleted file mode 100644
index 74e6a77699..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java
+++ /dev/null
@@ -1,4288 +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 + " * " + NL + " * " + 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 + " * " + NL + " * A representation of the model object '";
- protected final String TEXT_13 = "'." + NL + " * ";
- protected final String TEXT_14 = NL + " *" + NL + " * " + NL + " * ";
- protected final String TEXT_15 = NL + " * ";
- protected final String TEXT_16 = NL + " *";
- protected final String TEXT_17 = NL + " *
" + NL + " * The following features are supported:" + NL + " *
";
- protected final String TEXT_18 = NL + " *
{@link ";
- protected final String TEXT_19 = "#";
- protected final String TEXT_20 = " ";
- protected final String TEXT_21 = "}
";
- protected final String TEXT_22 = NL + " *
" + NL + " * ";
- 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 + " * " + NL + " * An implementation of the model object '";
- protected final String TEXT_33 = "'." + NL + " * " + NL + " *
";
- protected final String TEXT_34 = NL + " * The following features are implemented:" + NL + " *
";
- protected final String TEXT_35 = NL + " *
{@link ";
- protected final String TEXT_36 = "#";
- protected final String TEXT_37 = " ";
- protected final String TEXT_38 = "}
";
- protected final String TEXT_39 = NL + " *
";
- protected final String TEXT_40 = NL + " * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 '";
- protected final String TEXT_73 = "' ";
- protected final String TEXT_74 = "." + NL + "\t * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 = "() ";
- protected final String TEXT_87 = "}' ";
- protected final String TEXT_88 = "." + NL + "\t * " + NL + "\t * " + 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 = "() ";
- protected final String TEXT_94 = "}' array accessor." + NL + "\t * " + NL + "\t * " + 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 = "() ";
- protected final String TEXT_101 = "}' ";
- protected final String TEXT_102 = "." + NL + "\t * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 = "() ";
- protected final String TEXT_112 = "}' ";
- protected final String TEXT_113 = "." + NL + "\t * " + NL + "\t * " + 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 = "() ";
- protected final String TEXT_119 = "}' ";
- protected final String TEXT_120 = "." + NL + "\t * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_144 = " getStaticType()" + NL + "\t{" + NL + "\t\treturn ((";
- protected final String TEXT_145 = ")";
- protected final String TEXT_146 = ".INSTANCE).get";
- protected final String TEXT_147 = "();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getStaticPropertyCount()" + NL + "\t{" + NL + "\t\treturn INTERNAL_PROPERTY_COUNT;" + NL + "\t}" + NL;
- protected final String TEXT_148 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 '";
- protected final String TEXT_211 = "' ";
- 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 ";
- protected final String TEXT_227 = ".";
- 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 = " ";
- protected final String TEXT_233 = "}'.";
- protected final String TEXT_234 = NL + "\t * ";
- protected final String TEXT_235 = NL + "\t *
" + NL + "\t * If the meaning of the '";
- protected final String TEXT_236 = "' ";
- protected final String TEXT_237 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t *
";
- protected final String TEXT_238 = NL + "\t * ";
- protected final String TEXT_239 = NL + "\t * " + NL + "\t * ";
- protected final String TEXT_240 = NL + "\t * ";
- protected final String TEXT_241 = NL + "\t * @return the value of the '";
- protected final String TEXT_242 = "' ";
- 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 = " ";
- protected final String TEXT_492 = "}' ";
- protected final String TEXT_493 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @param value the new value of the '";
- protected final String TEXT_494 = "' ";
- 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 = " ";
- protected final String TEXT_738 = "}' ";
- protected final String TEXT_739 = "." + NL + "\t * " + NL + "\t * ";
- 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 * " + NL + "\t * " + 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 = " ";
- protected final String TEXT_870 = "}' ";
- protected final String TEXT_871 = " is set." + NL + "\t * " + NL + "\t * " + NL + "\t * @return whether the value of the '";
- protected final String TEXT_872 = "' ";
- 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 * " + NL + "\t * " + 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 * " + NL + "\t * ";
- protected final String TEXT_917 = NL + "\t * " + NL + "\t * ";
- protected final String TEXT_918 = NL + "\t * ";
- 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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(\"\");";
- 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(\"\");";
- 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(\"\");";
- protected final String TEXT_1224 = NL + "\t\tresult.append(eVirtualGet(";
- protected final String TEXT_1225 = ", ";
- protected final String TEXT_1226 = "_DEFAULT_";
- protected final String TEXT_1227 = "));";
- protected final String TEXT_1228 = NL + "\t\tresult.append((";
- protected final String TEXT_1229 = " & ";
- protected final String TEXT_1230 = "_EFLAG) != 0);";
- protected final String TEXT_1231 = NL + "\t\tresult.append(";
- protected final String TEXT_1232 = ");";
- protected final String TEXT_1233 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL;
- protected final String TEXT_1234 = NL + "\tpublic static class ConcreteBase extends ";
- protected final String TEXT_1235 = NL + "\t{" + NL + "\t\tpublic ConcreteBase()" + NL + "\t\t{" + NL + "\t\t\tsuper();" + NL + "\t\t}" + NL + "\t}" + NL + "\t";
- protected final String TEXT_1236 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected int hash = -1;" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + 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 * " + NL + " \t * " + 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 * " + NL + " \t * " + NL + " \t * @generated" + NL + " \t */" + NL + "\tpublic Object getKey()" + NL + "\t{" + NL + " \t";
- protected final String TEXT_1237 = NL + "\t\treturn new ";
- protected final String TEXT_1238 = "(getTypedKey());" + NL + " \t";
- protected final String TEXT_1239 = NL + "\t\treturn getTypedKey();" + NL + " \t";
- protected final String TEXT_1240 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setKey(Object key)" + NL + "\t{";
- protected final String TEXT_1241 = NL + "\t\tgetTypedKey().addAll((";
- protected final String TEXT_1242 = ")key);";
- protected final String TEXT_1243 = NL + "\t\tsetTypedKey(((";
- protected final String TEXT_1244 = ")key).";
- protected final String TEXT_1245 = "());";
- protected final String TEXT_1246 = NL + "\t\tsetTypedKey((";
- protected final String TEXT_1247 = ")key);";
- protected final String TEXT_1248 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getValue()" + NL + "\t{" + NL + " \t";
- protected final String TEXT_1249 = NL + "\t\treturn new ";
- protected final String TEXT_1250 = "(getTypedValue());" + NL + " \t";
- protected final String TEXT_1251 = NL + "\t\treturn getTypedValue();" + NL + " \t";
- protected final String TEXT_1252 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object setValue(Object value)" + NL + "\t{" + NL + "\t\tObject oldValue = getValue();" + NL + " \t";
- protected final String TEXT_1253 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll((";
- protected final String TEXT_1254 = ")value);" + NL + " \t";
- protected final String TEXT_1255 = NL + "\t\tsetTypedValue(((";
- protected final String TEXT_1256 = ")value).";
- protected final String TEXT_1257 = "());" + NL + " \t";
- protected final String TEXT_1258 = NL + "\t\tsetTypedValue((";
- protected final String TEXT_1259 = ")value);" + NL + " \t";
- protected final String TEXT_1260 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_1261 = " getEMap()" + NL + "\t{" + NL + "\t\t";
- protected final String TEXT_1262 = " container = eContainer();" + NL + "\t\treturn container == null ? null : (";
- protected final String TEXT_1263 = ")container.get(eContainmentFeature());" + NL + "\t}";
- protected final String TEXT_1264 = NL + "} //";
- protected final String TEXT_1265 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- GenClass genClass = (GenClass)((Object[])argument)[0]; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel();
- boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);
- boolean isDebug = false;
- String publicStaticFinalFlag = isImplementation ? "public static final " : "";
- /*
- * Output preamble and javadoc header
- */
- stringBuffer.append(TEXT_1);
- stringBuffer.append(TEXT_2);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_3);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_4);
- if (isInterface) {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(genPackage.getInterfacePackageName());
- stringBuffer.append(TEXT_6);
- } else {
- stringBuffer.append(TEXT_7);
- stringBuffer.append(genPackage.getClassPackageName());
- stringBuffer.append(TEXT_8);
- }
- stringBuffer.append(TEXT_9);
- genModel.markImportLocation(stringBuffer, genPackage);
- stringBuffer.append(TEXT_10);
- if (isDebug) { // EYECATCHER 1
- stringBuffer.append(TEXT_11);
- }
- if (isInterface) {
- stringBuffer.append(TEXT_12);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_13);
- if (genClass.hasDocumentation()) {
- stringBuffer.append(TEXT_14);
- stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer)));
- stringBuffer.append(TEXT_15);
- }
- stringBuffer.append(TEXT_16);
- if (!genClass.getGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_17);
- for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genFeature.isSuppressedGetVisibility()) {
- stringBuffer.append(TEXT_18);
- stringBuffer.append(genClass.getQualifiedInterfaceName());
- stringBuffer.append(TEXT_19);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_20);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_21);
- }
- }
- stringBuffer.append(TEXT_22);
- }
- stringBuffer.append(TEXT_23);
- if (!genModel.isSuppressEMFMetaData()) {
- stringBuffer.append(TEXT_24);
- stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
- stringBuffer.append(TEXT_25);
- stringBuffer.append(genClass.getClassifierAccessorName());
- stringBuffer.append(TEXT_26);
- }
- if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
- stringBuffer.append(TEXT_27);
- stringBuffer.append(modelInfo);
- } else {
- stringBuffer.append(TEXT_28);
- stringBuffer.append(modelInfo);
- }} if (first) {
- stringBuffer.append(TEXT_29);
- }}
- if (genClass.needsRootExtendsInterfaceExtendsTag()) { // does it need an @extends tag
- stringBuffer.append(TEXT_30);
- stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface()));
- }
- stringBuffer.append(TEXT_31);
- } else {
- stringBuffer.append(TEXT_32);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_33);
- if (!genClass.getImplementedGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_34);
- for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- stringBuffer.append(TEXT_35);
- stringBuffer.append(genClass.getQualifiedClassName());
- stringBuffer.append(TEXT_36);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_37);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_38);
- }
- stringBuffer.append(TEXT_39);
- }
- stringBuffer.append(TEXT_40);
- }
- if (isImplementation) {
- stringBuffer.append(TEXT_41);
- if (genClass.isAbstract()) {
- stringBuffer.append(TEXT_42);
- }
- stringBuffer.append(TEXT_43);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(genClass.getClassExtends());
- stringBuffer.append(genClass.getClassImplements());
- } else {
- stringBuffer.append(TEXT_44);
- stringBuffer.append(genClass.getInterfaceName());
- stringBuffer.append(genClass.getInterfaceExtends());
- }
- stringBuffer.append(TEXT_45);
- if (genModel.getCopyrightText() != null) {
- stringBuffer.append(TEXT_46);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_47);
- stringBuffer.append(genModel.getCopyrightText());
- stringBuffer.append(TEXT_48);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_49);
- }
- if (isImplementation && genModel.getDriverNumber() != null) {
- stringBuffer.append(TEXT_50);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_51);
- stringBuffer.append(genModel.getDriverNumber());
- stringBuffer.append(TEXT_52);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_53);
- }
- if (isImplementation && genClass.isJavaIOSerializable()) {
- stringBuffer.append(TEXT_54);
- }
- if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
- if (eVirtualValuesField != null) {
- stringBuffer.append(TEXT_55);
- stringBuffer.append(eVirtualValuesField);
- stringBuffer.append(TEXT_56);
- }
- { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());
- if (!eVirtualIndexBitFields.isEmpty()) {
- for (Iterator i = eVirtualIndexBitFields.iterator(); i.hasNext();) { String eVirtualIndexBitField = (String)i.next();
- stringBuffer.append(TEXT_57);
- stringBuffer.append(eVirtualIndexBitField);
- stringBuffer.append(TEXT_58);
- }
- }
- }
- }
- if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) {
- stringBuffer.append(TEXT_59);
- stringBuffer.append(genModel.getBooleanFlagsField());
- stringBuffer.append(TEXT_60);
- }
- if (isImplementation && !genModel.isReflectiveDelegation()) {
- stringBuffer.append(TEXT_61);
- ClassImpl classImpl = (ClassImpl) genClass.getEcoreClass();
- List declaredProperties = classImpl.getDeclaredProperties();
- List extendedProperties = classImpl.getExtendedProperties();
- int declaredPropertiesCount = 0;
- int extendedPropertiesCount = 0;
- for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
- if (declaredProperties.contains(genFeature.getEcoreFeature())){
- declaredPropertiesCount++;
- String featureValue = "";
- List allFeatures = genClass.getAllGenFeatures();
- int g = allFeatures.indexOf(genFeature);
- GenClass base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureValue = Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
- } else {
- int baseCount = base.getFeatureCount();
- if (g < baseCount)
- {
- featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
- } else {
- String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
- featureValue = baseCountID + " + " + Integer.toString(declaredProperties.indexOf(genFeature.getEcoreFeature()));
- }
- }
- stringBuffer.append(TEXT_62);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_63);
- stringBuffer.append(featureValue);
- stringBuffer.append(TEXT_64);
- } else if (extendedProperties.contains(genFeature.getEcoreFeature())){
- extendedPropertiesCount++;
- String featureValue = "";
- List allFeatures = genClass.getAllGenFeatures();
- int g = allFeatures.indexOf(genFeature);
- GenClass base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureValue = Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
- } else {
- int baseCount = base.getFeatureCount();
- if (g < baseCount)
- {
- featureValue = base.getImportedClassName() + "." + genFeature.getUpperName();
- } else {
- String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
- featureValue = baseCountID + " + " + Integer.toString(-1 - extendedProperties.indexOf(genFeature.getEcoreFeature()));
- }
- }
- stringBuffer.append(TEXT_65);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_66);
- stringBuffer.append(featureValue);
- stringBuffer.append(TEXT_67);
- }
- }
- String featureCount = "";
- GenClass base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureCount = Integer.toString(declaredPropertiesCount);
- }
- else {
- String baseCountID = base.getImportedClassName() + "." + "SDO_PROPERTY_COUNT";
- featureCount = baseCountID + " + " + Integer.toString(declaredPropertiesCount);
- }
- stringBuffer.append(TEXT_68);
- stringBuffer.append(featureCount);
- stringBuffer.append(TEXT_69);
- featureCount = "";
- base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureCount = Integer.toString(extendedPropertiesCount*-1);
- }
- else {
- String baseCountID = base.getImportedClassName() + "." + "EXTENDED_PROPERTY_COUNT";
- featureCount = baseCountID + " - " + Integer.toString(extendedPropertiesCount);
- }
- stringBuffer.append(TEXT_70);
- stringBuffer.append(featureCount);
- stringBuffer.append(TEXT_71);
- for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
- stringBuffer.append(TEXT_72);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_73);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_74);
- String featureValue = "";
- List allFeatures = genClass.getAllGenFeatures();
- int g = allFeatures.indexOf(genFeature);
- base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureValue = Integer.toString(g);
- } else {
- int baseCount = base.getFeatureCount();
- if (g < baseCount)
- {
- featureValue = base.getImportedClassName() + "._INTERNAL_" + genFeature.getUpperName();
- } else {
- String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
- featureValue = baseCountID + " + " + Integer.toString(g - baseCount);
- }
- }
- stringBuffer.append(TEXT_75);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_76);
- stringBuffer.append(featureValue);
- stringBuffer.append(TEXT_77);
- }
- stringBuffer.append(TEXT_78);
- featureCount = "";
- base = genClass.getBaseGenClass();
- if (base == null)
- {
- featureCount = Integer.toString(genClass.getFeatureCount());
- }
- else {
- String baseCountID = base.getImportedClassName() + "." + "INTERNAL_PROPERTY_COUNT";
- featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
- }
- stringBuffer.append(TEXT_79);
- stringBuffer.append(featureCount);
- stringBuffer.append(TEXT_80);
- for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
- stringBuffer.append(TEXT_81);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_82);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_83);
- }
- stringBuffer.append(TEXT_84);
- for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (genFeature.isListType() || genFeature.isReferenceType()) {
- if (genClass.isField(genFeature)) {
- stringBuffer.append(TEXT_85);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_86);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_87);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_88);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_89);
- stringBuffer.append(genModel.getImportedName(genFeature.getType()));
- stringBuffer.append(TEXT_90);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_91);
- }
- if (genModel.isArrayAccessors() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
- stringBuffer.append(TEXT_92);
- stringBuffer.append(genFeature.getGetArrayAccessor());
- stringBuffer.append(TEXT_93);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_94);
- stringBuffer.append(genFeature.getGetArrayAccessor());
- stringBuffer.append(TEXT_95);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_96);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_97);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_98);
- }
- } else {
- if (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable())) {
- stringBuffer.append(TEXT_99);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_100);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_101);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_102);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_103);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_104);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_105);
- stringBuffer.append(SDOGenUtil.getStaticDefaultValue(genFeature));
- stringBuffer.append(TEXT_106);
- stringBuffer.append(genModel.getNonNLS(genFeature.getStaticDefaultValue()));
- stringBuffer.append(TEXT_107);
- }
- if (genClass.isField(genFeature)) {
- if (genClass.isFlag(genFeature)) {
- if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) {
- stringBuffer.append(TEXT_108);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_109);
- }
- stringBuffer.append(TEXT_110);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_111);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_112);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_113);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_114);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_115);
- stringBuffer.append("<< " + genClass.getFlagIndex(genFeature) % 32 );
- stringBuffer.append(TEXT_116);
- } else {
- stringBuffer.append(TEXT_117);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_118);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_119);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_120);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_121);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_122);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_123);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_124);
- }
- }
- }
- if (genClass.isESetField(genFeature)) {
- if (genClass.isESetFlag(genFeature)) {
- if (genClass.getESetFlagIndex(genFeature) > 31 && genClass.getESetFlagIndex(genFeature) % 32 == 0) {
- stringBuffer.append(TEXT_125);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_126);
- }
- stringBuffer.append(TEXT_127);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_128);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_129);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_130);
- stringBuffer.append("<< " + genClass.getESetFlagIndex(genFeature) % 32 );
- stringBuffer.append(TEXT_131);
- } else {
- stringBuffer.append(TEXT_132);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_133);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_134);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_135);
- }
- }
- }
- //Class/declaredFieldGenFeature.override.javajetinc
- }
- if (isImplementation) { // create constructor
- stringBuffer.append(TEXT_136);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_137);
- for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- stringBuffer.append(TEXT_138);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_139);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_140);
- }
- if (SDOGenUtil.hasChangeSummaryProperty(genClass)) {
- stringBuffer.append(TEXT_141);
- stringBuffer.append(SDOGenUtil.getChangeSummaryProperty(genClass));
- stringBuffer.append(TEXT_142);
- }
- stringBuffer.append(TEXT_143);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
- stringBuffer.append(TEXT_144);
- stringBuffer.append(genPackage.getImportedFactoryClassName());
- stringBuffer.append(TEXT_145);
- stringBuffer.append(genPackage.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_146);
- stringBuffer.append(genClass.getClassifierAccessorName());
- stringBuffer.append(TEXT_147);
- }
- /*
- * Output getter and setter interfaces / impls
- */
-
- for (Iterator i=(isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures()).iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {
- stringBuffer.append(TEXT_148);
- if (!isImplementation) {
- stringBuffer.append(TEXT_149);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_150);
- stringBuffer.append(genFeature.getGetArrayAccessor());
- stringBuffer.append(TEXT_151);
- } else {
- stringBuffer.append(TEXT_152);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_153);
- stringBuffer.append(genFeature.getGetArrayAccessor());
- stringBuffer.append(TEXT_154);
- if (genFeature.isVolatile()) {
- stringBuffer.append(TEXT_155);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
- stringBuffer.append(TEXT_156);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
- stringBuffer.append(TEXT_157);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_158);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_159);
- } else {
- stringBuffer.append(TEXT_160);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_161);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_162);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_163);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
- stringBuffer.append(TEXT_164);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
- stringBuffer.append(TEXT_165);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_166);
- }
- stringBuffer.append(TEXT_167);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_168);
- }
- stringBuffer.append(TEXT_169);
- if (!isImplementation) {
- stringBuffer.append(TEXT_170);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_171);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_172);
- } else {
- stringBuffer.append(TEXT_173);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_174);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_175);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_176);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_177);
- }
- stringBuffer.append(TEXT_178);
- if (!isImplementation) {
- stringBuffer.append(TEXT_179);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_180);
- } else {
- stringBuffer.append(TEXT_181);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_182);
- if (genFeature.isVolatile()) {
- stringBuffer.append(TEXT_183);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_184);
- } else {
- stringBuffer.append(TEXT_185);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_186);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_187);
- }
- stringBuffer.append(TEXT_188);
- }
- stringBuffer.append(TEXT_189);
- if (!isImplementation) {
- stringBuffer.append(TEXT_190);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_191);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_192);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_193);
- } else {
- stringBuffer.append(TEXT_194);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_195);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_196);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_197);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList"));
- stringBuffer.append(TEXT_198);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_199);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_200);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_201);
- }
- stringBuffer.append(TEXT_202);
- if (!isImplementation) {
- stringBuffer.append(TEXT_203);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_204);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_205);
- } else {
- stringBuffer.append(TEXT_206);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_207);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_208);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_209);
- }
- }
- if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) {
- if (isInterface) {
- stringBuffer.append(TEXT_210);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_211);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_212);
- if (genFeature.isListType()) {
- if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature();
- stringBuffer.append(TEXT_213);
- if (keyFeature.isListType()) {
- stringBuffer.append(TEXT_214);
- stringBuffer.append(keyFeature.getQualifiedListItemType());
- stringBuffer.append(TEXT_215);
- } else {
- stringBuffer.append(TEXT_216);
- stringBuffer.append(keyFeature.getType());
- stringBuffer.append(TEXT_217);
- }
- stringBuffer.append(TEXT_218);
- if (valueFeature.isListType()) {
- stringBuffer.append(TEXT_219);
- stringBuffer.append(valueFeature.getQualifiedListItemType());
- stringBuffer.append(TEXT_220);
- } else {
- stringBuffer.append(TEXT_221);
- stringBuffer.append(valueFeature.getType());
- stringBuffer.append(TEXT_222);
- }
- stringBuffer.append(TEXT_223);
- } else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType()))) {
- stringBuffer.append(TEXT_224);
- stringBuffer.append(genFeature.getQualifiedListItemType());
- stringBuffer.append(TEXT_225);
- }
- } else if (genFeature.isSetDefaultValue()) {
- stringBuffer.append(TEXT_226);
- stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_227);
- }
- if (genFeature.getTypeGenEnum() != null) {
- stringBuffer.append(TEXT_228);
- stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
- stringBuffer.append(TEXT_229);
- }
- if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse();
- if (!reverseGenFeature.isSuppressedGetVisibility()) {
- stringBuffer.append(TEXT_230);
- stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName());
- stringBuffer.append(TEXT_231);
- stringBuffer.append(reverseGenFeature.getGetAccessor());
- stringBuffer.append(TEXT_232);
- stringBuffer.append(reverseGenFeature.getFormattedName());
- stringBuffer.append(TEXT_233);
- }
- }
- stringBuffer.append(TEXT_234);
- if (!genFeature.hasDocumentation()) {
- stringBuffer.append(TEXT_235);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_236);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_237);
- }
- stringBuffer.append(TEXT_238);
- if (genFeature.hasDocumentation()) {
- stringBuffer.append(TEXT_239);
- stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer)));
- stringBuffer.append(TEXT_240);
- }
- stringBuffer.append(TEXT_241);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_242);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_243);
- if (genFeature.getTypeGenEnum() != null) {
- stringBuffer.append(TEXT_244);
- stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
- }
- if (genFeature.isUnsettable()) {
- if (!genFeature.isSuppressedIsSetVisibility()) {
- stringBuffer.append(TEXT_245);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_246);
- }
- if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {
- stringBuffer.append(TEXT_247);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_248);
- }
- }
- if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {
- stringBuffer.append(TEXT_249);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_250);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_251);
- }
- if (!genModel.isSuppressEMFMetaData()) {
- stringBuffer.append(TEXT_252);
- stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
- stringBuffer.append(TEXT_253);
- stringBuffer.append(genFeature.getFeatureAccessorName());
- stringBuffer.append(TEXT_254);
- }
- if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse();
- if (!reverseGenFeature.isSuppressedGetVisibility()) {
- stringBuffer.append(TEXT_255);
- stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName());
- stringBuffer.append(TEXT_256);
- stringBuffer.append(reverseGenFeature.getGetAccessor());
- }
- }
- if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
- stringBuffer.append(TEXT_257);
- stringBuffer.append(modelInfo);
- } else {
- stringBuffer.append(TEXT_258);
- stringBuffer.append(modelInfo);
- }} if (first) {
- stringBuffer.append(TEXT_259);
- }}
- stringBuffer.append(TEXT_260);
- } else {
- stringBuffer.append(TEXT_261);
- }
- if (!isImplementation) {
- stringBuffer.append(TEXT_262);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_263);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_264);
- } else {
- stringBuffer.append(TEXT_265);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_266);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_267);
- if (genModel.isReflectiveDelegation()) {
- stringBuffer.append(TEXT_268);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_269);
- }
- stringBuffer.append(TEXT_270);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_271);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_272);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_273);
- stringBuffer.append(genFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_274);
- }
- stringBuffer.append(TEXT_275);
- } else if (!genFeature.isVolatile()) {
- if (genFeature.isListType()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_276);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_277);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_278);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_279);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_280);
- }
- stringBuffer.append(TEXT_281);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_282);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_283);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_284);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_285);
- stringBuffer.append(genClass.getListConstructor(genFeature));
- stringBuffer.append(TEXT_286);
- } else {
- if (genFeature.getType().equals("commonj.sdo.Sequence")){
- stringBuffer.append(TEXT_287);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_288);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_289);
- } else {
- stringBuffer.append(TEXT_290);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_291);
- stringBuffer.append(SDOGenUtil.getListKind(genFeature, genFeature.isUnsettable()));
- stringBuffer.append(TEXT_292);
- stringBuffer.append(genFeature.getListItemType());
- stringBuffer.append(TEXT_293);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_294);
- stringBuffer.append(genFeature.isBidirectional()?genFeature.getReverse().getUpperName():"0" );
- stringBuffer.append(TEXT_295);
- }}
- stringBuffer.append(TEXT_296);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : "");
- stringBuffer.append(TEXT_297);
- } else if (genFeature.isContainer()) {
- stringBuffer.append(TEXT_298);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_299);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_300);
- } else {
- if (genFeature.isResolveProxies()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_301);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_302);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_303);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_304);
- stringBuffer.append(genFeature.getUpperName());
- if (!genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_305);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_306);
- }
- stringBuffer.append(TEXT_307);
- }
- stringBuffer.append(TEXT_308);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_309);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_310);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_311);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_312);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_313);
- stringBuffer.append(genFeature.getNonEObjectInternalTypeCast());
- stringBuffer.append(TEXT_314);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_315);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_316);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_317);
- if (genFeature.isEffectiveContains()) {
- stringBuffer.append(TEXT_318);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_319);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_320);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_321);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_322);
- if (!genFeature.isBidirectional()) {
- stringBuffer.append(TEXT_323);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_324);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_325);
- } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_326);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext"));
- stringBuffer.append(TEXT_327);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_328);
- stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
- stringBuffer.append(TEXT_329);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_330);
- }
- stringBuffer.append(TEXT_331);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_332);
- if (!genFeature.isBidirectional()) {
- stringBuffer.append(TEXT_333);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_334);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_335);
- } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_336);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_337);
- stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
- stringBuffer.append(TEXT_338);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_339);
- }
- stringBuffer.append(TEXT_340);
- } else if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_341);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_342);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_343);
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_344);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_345);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_346);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_347);
- }
- stringBuffer.append(TEXT_348);
- }
- if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_349);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_350);
- stringBuffer.append(genFeature.getUpperName());
- if (!genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_351);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_352);
- }
- stringBuffer.append(TEXT_353);
- } else if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_354);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_355);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_356);
- } else {
- stringBuffer.append(TEXT_357);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_358);
- }
- }
- } else {//volatile
- if (genFeature.isResolveProxies() && !genFeature.isListType()) {
- stringBuffer.append(TEXT_359);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_360);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_361);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_362);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_363);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_364);
- stringBuffer.append(genFeature.getNonEObjectInternalTypeCast());
- stringBuffer.append(TEXT_365);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_366);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_367);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_368);
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // AAAA
- if (genFeature.isFeatureMapType()) {
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_369);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_370);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_371);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_372);
- } else {
- stringBuffer.append(TEXT_373);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_374);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_375);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_376);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_377);
- }
- } else if (genFeature.isListType()) {
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_378);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_379);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_380);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_381);
- } else {
- stringBuffer.append(TEXT_382);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_383);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_384);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_385);
- }
- } else {
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_386);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_387);
- }
- stringBuffer.append(TEXT_388);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_389);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_390);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_391);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_392);
- stringBuffer.append(genFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_393);
- }
- stringBuffer.append(TEXT_394);
- } else {
- stringBuffer.append(TEXT_395);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_396);
- }
- stringBuffer.append(TEXT_397);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_398);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_399);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_400);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_401);
- stringBuffer.append(genFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_402);
- }
- stringBuffer.append(TEXT_403);
- }
- }
- } else {
- stringBuffer.append(TEXT_404);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_405);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_406);
- //Class/getGenFeature.todo.override.javajetinc
- }
- }
- stringBuffer.append(TEXT_407);
- }
- //Class/getGenFeature.override.javajetinc
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {
- stringBuffer.append(TEXT_408);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_409);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_410);
- if (genFeature.isContainer()) {
- stringBuffer.append(TEXT_411);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_412);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_413);
- } else if (!genFeature.isVolatile()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_414);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_415);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_416);
- } else {
- stringBuffer.append(TEXT_417);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_418);
- }
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //BBBB
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_419);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_420);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_421);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_422);
- } else {
- stringBuffer.append(TEXT_423);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_424);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_425);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_426);
- }
- } else {
- stringBuffer.append(TEXT_427);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_428);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_429);
- //Class/basicGetGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_430);
- //Class/basicGetGenFeature.override.javajetinc
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {
- stringBuffer.append(TEXT_431);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_432);
- stringBuffer.append(genFeature.getImportedInternalType());
- stringBuffer.append(TEXT_433);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_434);
- if (!genFeature.isVolatile()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_435);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_436);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_437);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_438);
- } else {
- stringBuffer.append(TEXT_439);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_440);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_441);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_442);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_443);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_444);
- }
- if (genFeature.isUnsettable()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_445);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_446);
- } else if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_447);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_448);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_449);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_450);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_451);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_452);
- } else {
- stringBuffer.append(TEXT_453);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_454);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_455);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_456);
- }
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_457);
- if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_458);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_459);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_460);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_461);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_462);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_463);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_464);
- } else {
- stringBuffer.append(TEXT_465);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_466);
- }
- stringBuffer.append(TEXT_467);
- } else {
- stringBuffer.append(TEXT_468);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_469);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_470);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_471);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_472);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_473);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_474);
- }
- stringBuffer.append(TEXT_475);
- }
- stringBuffer.append(TEXT_476);
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //CCCC
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_477);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_478);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_479);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_480);
- } else {
- stringBuffer.append(TEXT_481);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_482);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_483);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_484);
- }
- } else {
- stringBuffer.append(TEXT_485);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_486);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_487);
- //Class/basicSetGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_488);
- //Class/basicSetGenFeature.override.javajetinc
- }
- if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {
- if (isInterface) {
- stringBuffer.append(TEXT_489);
- stringBuffer.append(genClass.getQualifiedInterfaceName());
- stringBuffer.append(TEXT_490);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_491);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_492);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_493);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_494);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_495);
- if (genFeature.isEnumType()) {
- stringBuffer.append(TEXT_496);
- stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName());
- }
- if (genFeature.isUnsettable()) {
- if (!genFeature.isSuppressedIsSetVisibility()) {
- stringBuffer.append(TEXT_497);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_498);
- }
- if (!genFeature.isSuppressedUnsetVisibility()) {
- stringBuffer.append(TEXT_499);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_500);
- }
- }
- stringBuffer.append(TEXT_501);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_502);
- } else {
- stringBuffer.append(TEXT_503);
- }
- if (!isImplementation) {
- stringBuffer.append(TEXT_504);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_505);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_506);
- } else {
- stringBuffer.append(TEXT_507);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_508);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_509);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_510);
- if (genModel.isReflectiveDelegation()) {
- stringBuffer.append(TEXT_511);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_512);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_513);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_514);
- }
- stringBuffer.append(TEXT_515);
- stringBuffer.append(genFeature.getCapName());
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_516);
- }
- stringBuffer.append(TEXT_517);
- } else if (!genFeature.isVolatile()) {
- if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_518);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_519);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_520);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_521);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil"));
- stringBuffer.append(TEXT_522);
- stringBuffer.append(genFeature.getEObjectCast());
- stringBuffer.append(TEXT_523);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_524);
- stringBuffer.append(genModel.getImportedName("java.lang.IllegalArgumentException"));
- stringBuffer.append(TEXT_525);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_526);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_527);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_528);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_529);
- stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
- stringBuffer.append(TEXT_530);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_531);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_532);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_533);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_534);
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_535);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_536);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_537);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_538);
- }
- } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_539);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_540);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_541);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_542);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_543);
- }
- stringBuffer.append(TEXT_544);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_545);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_546);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_547);
- if (!genFeature.isBidirectional()) {
- stringBuffer.append(TEXT_548);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_549);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_550);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_551);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_552);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_553);
- } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_554);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_555);
- stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
- stringBuffer.append(TEXT_556);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_557);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_558);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_559);
- stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
- stringBuffer.append(TEXT_560);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_561);
- }
- stringBuffer.append(TEXT_562);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_563);
- stringBuffer.append(genFeature.getInternalTypeCast());
- stringBuffer.append(TEXT_564);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_565);
- if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_566);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_567);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_568);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_569);
- } else if (genClass.isESetFlag(genFeature)) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_570);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_571);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_572);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_573);
- }
- stringBuffer.append(TEXT_574);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_575);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_576);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_577);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_578);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_579);
- }
- stringBuffer.append(TEXT_580);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_581);
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_582);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_583);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_584);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_585);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_586);
- }
- stringBuffer.append(TEXT_587);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_588);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_589);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_590);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_591);
- }
- }
- } else {
- if (genClass.isFlag(genFeature)) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_592);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_593);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_594);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_595);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_596);
- }
- stringBuffer.append(TEXT_597);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_598);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_599);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_600);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_601);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_602);
- } else {
- if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_603);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_604);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_605);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_606);
- }
- }
- if (genFeature.isEnumType()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_607);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_608);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_609);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_610);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_611);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_612);
- } else {
- stringBuffer.append(TEXT_613);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_614);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_615);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_616);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_617);
- }
- } else {
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_618);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_619);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_620);
- stringBuffer.append(genFeature.getInternalTypeCast());
- stringBuffer.append(TEXT_621);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_622);
- } else {
- stringBuffer.append(TEXT_623);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_624);
- stringBuffer.append(genFeature.getInternalTypeCast());
- stringBuffer.append(TEXT_625);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_626);
- }
- }
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_627);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_628);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_629);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_630);
- }
- }
- if (genFeature.isUnsettable()) {
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_631);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_632);
- } else if (genClass.isESetFlag(genFeature)) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_633);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_634);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_635);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_636);
- }
- stringBuffer.append(TEXT_637);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_638);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_639);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_640);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_641);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_642);
- }
- stringBuffer.append(TEXT_643);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_644);
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_645);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_646);
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_647);
- if (genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_648);
- } else {
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_649);
- }
- stringBuffer.append(TEXT_650);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_651);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_652);
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_653);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(genFeature.getSafeName());
- }
- stringBuffer.append(TEXT_654);
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_655);
- } else {
- stringBuffer.append(TEXT_656);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_657);
- }
- stringBuffer.append(TEXT_658);
- }
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_659);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_660);
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_661);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_662);
- if (genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_663);
- } else {
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_664);
- }
- stringBuffer.append(TEXT_665);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_666);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_667);
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_668);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(genFeature.getSafeName());
- }
- stringBuffer.append(TEXT_669);
- }
- }
- }
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); // DDDD
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_670);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_671);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_672);
- if (genFeature.isPrimitiveType()){
- stringBuffer.append(TEXT_673);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_674);
- }
- stringBuffer.append(TEXT_675);
- stringBuffer.append(genFeature.getCapName());
- if (genFeature.isPrimitiveType()){
- stringBuffer.append(TEXT_676);
- }
- stringBuffer.append(TEXT_677);
- } else {
- stringBuffer.append(TEXT_678);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_679);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_680);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_681);
- if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_682);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_683);
- }
- stringBuffer.append(TEXT_684);
- stringBuffer.append(genFeature.getCapName());
- if (genFeature.isPrimitiveType()){
- stringBuffer.append(TEXT_685);
- }
- stringBuffer.append(TEXT_686);
- }
- } else {
- stringBuffer.append(TEXT_687);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_688);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_689);
- //Class/setGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_690);
- }
- //Class/setGenFeature.override.javajetinc
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {
- stringBuffer.append(TEXT_691);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_692);
- if (!genFeature.isVolatile()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_693);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_694);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_695);
- } else {
- stringBuffer.append(TEXT_696);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_697);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_698);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_699);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_700);
- }
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_701);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_702);
- } else if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_703);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_704);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_705);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_706);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_707);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_708);
- } else {
- stringBuffer.append(TEXT_709);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_710);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_711);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_712);
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_713);
- if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_714);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_715);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_716);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_717);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_718);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_719);
- } else {
- stringBuffer.append(TEXT_720);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_721);
- }
- stringBuffer.append(TEXT_722);
- } else {
- stringBuffer.append(TEXT_723);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_724);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_725);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_726);
- stringBuffer.append(genFeature.getCapName());
- } else {
- stringBuffer.append(TEXT_727);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_728);
- }
- stringBuffer.append(TEXT_729);
- }
- stringBuffer.append(TEXT_730);
- } else {
- stringBuffer.append(TEXT_731);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_732);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_733);
- //Class/basicUnsetGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_734);
- //Class.basicUnsetGenFeature.override.javajetinc
- }
- if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {
- if (isInterface) {
- stringBuffer.append(TEXT_735);
- stringBuffer.append(genClass.getQualifiedInterfaceName());
- stringBuffer.append(TEXT_736);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_737);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_738);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_739);
- if (!genFeature.isSuppressedIsSetVisibility()) {
- stringBuffer.append(TEXT_740);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_741);
- }
- stringBuffer.append(TEXT_742);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_743);
- if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {
- stringBuffer.append(TEXT_744);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_745);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_746);
- }
- stringBuffer.append(TEXT_747);
- } else {
- stringBuffer.append(TEXT_748);
- }
- if (!isImplementation) {
- stringBuffer.append(TEXT_749);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_750);
- } else {
- stringBuffer.append(TEXT_751);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_752);
- if (genModel.isReflectiveDelegation()) {
- stringBuffer.append(TEXT_753);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_754);
- } else if (!genFeature.isVolatile()) {
- if (genFeature.isListType()) {
- stringBuffer.append(TEXT_755);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
- stringBuffer.append(TEXT_756);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_757);
- } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_758);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_759);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_760);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_761);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_762);
- }
- stringBuffer.append(TEXT_763);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_764);
- if (!genFeature.isBidirectional()) {
- stringBuffer.append(TEXT_765);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_766);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_767);
- } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_768);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_769);
- stringBuffer.append(SDOGenUtil.getQualifiedInternalPropertyID(reverseFeature));
- stringBuffer.append(TEXT_770);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_771);
- }
- stringBuffer.append(TEXT_772);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_773);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_774);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_775);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_776);
- } else if (genClass.isESetFlag(genFeature)) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_777);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_778);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_779);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_780);
- }
- stringBuffer.append(TEXT_781);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_782);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_783);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_784);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_785);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_786);
- }
- stringBuffer.append(TEXT_787);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_788);
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_789);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_790);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_791);
- }
- stringBuffer.append(TEXT_792);
- } else {
- if (genClass.isFlag(genFeature)) {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_793);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_794);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_795);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_796);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_797);
- }
- } else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_798);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_799);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_800);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_801);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_802);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_803);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_804);
- }
- }
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_805);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_806);
- } else if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_807);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_808);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_809);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_810);
- } else {
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_811);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_812);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_813);
- }
- }
- if (genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_814);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_815);
- if (!genModel.isVirtualDelegation()) {
- if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_816);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_817);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_818);
- } else {
- stringBuffer.append(TEXT_819);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_820);
- }
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_821);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_822);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_823);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_824);
- } else {
- stringBuffer.append(TEXT_825);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_826);
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_827);
- } else {
- stringBuffer.append(TEXT_828);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_829);
- }
- stringBuffer.append(TEXT_830);
- }
- } else {
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_831);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_832);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_833);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_834);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_835);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_836);
- } else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_837);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_838);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_839);
- }
- if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {
- if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_840);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_841);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_842);
- } else {
- stringBuffer.append(TEXT_843);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_844);
- }
- }
- if (!genModel.isSuppressNotification()) {
- stringBuffer.append(TEXT_845);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_846);
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_847);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_848);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_849);
- } else {
- stringBuffer.append(TEXT_850);
- stringBuffer.append(genFeature.getCapName());
- }
- stringBuffer.append(TEXT_851);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_852);
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_853);
- } else {
- stringBuffer.append(TEXT_854);
- stringBuffer.append(genFeature.getCapName());
- stringBuffer.append(TEXT_855);
- }
- stringBuffer.append(TEXT_856);
- }
- }
- }
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //EEEE
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_857);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_858);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_859);
- } else {
- stringBuffer.append(TEXT_860);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_861);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_862);
- }
- } else {
- stringBuffer.append(TEXT_863);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_864);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_865);
- //Class/unsetGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_866);
- }
- //Class/unsetGenFeature.override.javajetinc
- }
- if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {
- if (isInterface) {
- stringBuffer.append(TEXT_867);
- stringBuffer.append(genClass.getQualifiedInterfaceName());
- stringBuffer.append(TEXT_868);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_869);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_870);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_871);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_872);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_873);
- if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {
- stringBuffer.append(TEXT_874);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_875);
- }
- stringBuffer.append(TEXT_876);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_877);
- if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {
- stringBuffer.append(TEXT_878);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_879);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_880);
- }
- stringBuffer.append(TEXT_881);
- } else {
- stringBuffer.append(TEXT_882);
- }
- if (!isImplementation) {
- stringBuffer.append(TEXT_883);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_884);
- } else {
- stringBuffer.append(TEXT_885);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_886);
- if (genModel.isReflectiveDelegation()) {
- stringBuffer.append(TEXT_887);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_888);
- } else if (!genFeature.isVolatile()) {
- if (genFeature.isListType()) {
- if (genModel.isVirtualDelegation()) {
- stringBuffer.append(TEXT_889);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_890);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_891);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_892);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_893);
- }
- stringBuffer.append(TEXT_894);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_895);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
- stringBuffer.append(TEXT_896);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_897);
- } else {
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_898);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_899);
- } else if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_900);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_901);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_902);
- } else {
- stringBuffer.append(TEXT_903);
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_904);
- }
- }
- } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); //FFFF
- if (delegateFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_905);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_906);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_907);
- } else {
- stringBuffer.append(TEXT_908);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_909);
- stringBuffer.append(delegateFeature.getAccessorName());
- stringBuffer.append(TEXT_910);
- stringBuffer.append(genFeature.getQualifiedFeatureAccessor());
- stringBuffer.append(TEXT_911);
- }
- } else {
- stringBuffer.append(TEXT_912);
- stringBuffer.append(genFeature.getFormattedName());
- stringBuffer.append(TEXT_913);
- stringBuffer.append(genFeature.getFeatureKind());
- stringBuffer.append(TEXT_914);
- //Class/isSetGenFeature.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_915);
- }
- //Class/isSetGenFeature.override.javajetinc
- }
- //Class/genFeature.override.javajetinc
- }// end output getter and setter interfaces or impls
- for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();
- if (isInterface) {
- stringBuffer.append(TEXT_916);
- if (genOperation.hasDocumentation()) {
- stringBuffer.append(TEXT_917);
- stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer)));
- stringBuffer.append(TEXT_918);
- }
- if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;
- stringBuffer.append(TEXT_919);
- stringBuffer.append(modelInfo);
- } else {
- stringBuffer.append(TEXT_920);
- stringBuffer.append(modelInfo);
- }} if (first) {
- stringBuffer.append(TEXT_921);
- }}
- stringBuffer.append(TEXT_922);
- } else {
- stringBuffer.append(TEXT_923);
- }
- if (!isImplementation) {
- stringBuffer.append(TEXT_924);
- stringBuffer.append(genOperation.getImportedType());
- stringBuffer.append(TEXT_925);
- stringBuffer.append(genOperation.getName());
- stringBuffer.append(TEXT_926);
- stringBuffer.append(genOperation.getParameters());
- stringBuffer.append(TEXT_927);
- stringBuffer.append(genOperation.getThrows());
- stringBuffer.append(TEXT_928);
- } else {
- stringBuffer.append(TEXT_929);
- stringBuffer.append(genOperation.getImportedType());
- stringBuffer.append(TEXT_930);
- stringBuffer.append(genOperation.getName());
- stringBuffer.append(TEXT_931);
- stringBuffer.append(genOperation.getParameters());
- stringBuffer.append(TEXT_932);
- stringBuffer.append(genOperation.getThrows());
- stringBuffer.append(TEXT_933);
- if (genOperation.hasBody()) {
- stringBuffer.append(TEXT_934);
- stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer)));
- } else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = ((GenParameter)genOperation.getGenParameters().get(0)).getName(); String context = ((GenParameter)genOperation.getGenParameters().get(1)).getName();
- stringBuffer.append(TEXT_935);
- stringBuffer.append(diagnostics);
- stringBuffer.append(TEXT_936);
- stringBuffer.append(diagnostics);
- stringBuffer.append(TEXT_937);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic"));
- stringBuffer.append(TEXT_938);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic"));
- stringBuffer.append(TEXT_939);
- stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
- stringBuffer.append(TEXT_940);
- stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName());
- stringBuffer.append(TEXT_941);
- stringBuffer.append(opClass.getOperationID(genOperation));
- stringBuffer.append(TEXT_942);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin"));
- stringBuffer.append(TEXT_943);
- stringBuffer.append(genOperation.getName());
- stringBuffer.append(TEXT_944);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator"));
- stringBuffer.append(TEXT_945);
- stringBuffer.append(context);
- stringBuffer.append(TEXT_946);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
- stringBuffer.append(TEXT_947);
- } else {
- stringBuffer.append(TEXT_948);
- //Class/implementedGenOperation.todo.override.javajetinc
- }
- stringBuffer.append(TEXT_949);
- }
- //Class/implementedGenOperation.override.javajetinc
- }//for
- if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {
- stringBuffer.append(TEXT_950);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_951);
- for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_952);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_953);
- if (genFeature.isListType()) {
- if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
- stringBuffer.append(TEXT_954);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
- stringBuffer.append(TEXT_955);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_956);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_957);
- } else {
- stringBuffer.append(TEXT_958);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
- stringBuffer.append(TEXT_959);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_960);
- }
- } else if (genFeature.isContainer()) {
- stringBuffer.append(TEXT_961);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_962);
- } else {
- if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_963);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_964);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_965);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_966);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_967);
- }
- stringBuffer.append(TEXT_968);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_969);
- if (genFeature.isEffectiveContains()) {
- stringBuffer.append(TEXT_970);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_971);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_972);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_973);
- } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- stringBuffer.append(TEXT_974);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject"));
- stringBuffer.append(TEXT_975);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_976);
- stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
- stringBuffer.append(TEXT_977);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_978);
- }
- stringBuffer.append(TEXT_979);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_980);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_981);
- }
- }
- }
- stringBuffer.append(TEXT_982);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_983);
- } else {
- stringBuffer.append(TEXT_984);
- }
- stringBuffer.append(TEXT_985);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {
- stringBuffer.append(TEXT_986);
- stringBuffer.append(genModel.getImportedName("java.lang.Object"));
- stringBuffer.append(TEXT_987);
- for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_988);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_989);
- if (genFeature.isListType()) {
- if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {
- stringBuffer.append(TEXT_990);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList"));
- stringBuffer.append(TEXT_991);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_992);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_993);
- } else if (genFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_994);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_995);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_996);
- } else {
- stringBuffer.append(TEXT_997);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_998);
- }
- } else if (genFeature.isContainer()) {
- stringBuffer.append(TEXT_999);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1000);
- } else if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_1001);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1002);
- } else {
- stringBuffer.append(TEXT_1003);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1004);
- }
- }
- }
- stringBuffer.append(TEXT_1005);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1006);
- } else {
- stringBuffer.append(TEXT_1007);
- }
- stringBuffer.append(TEXT_1008);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {
- stringBuffer.append(TEXT_1009);
- for (Iterator i=genClass.getEBasicRemoveFromContainerGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_1010);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1011);
- stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature));
- stringBuffer.append(TEXT_1012);
- stringBuffer.append(targetClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_1013);
- }
- }
- stringBuffer.append(TEXT_1014);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1015);
- } else {
- stringBuffer.append(TEXT_1016);
- }
- stringBuffer.append(TEXT_1017);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_1018);
- for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_1019);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1020);
- if (genFeature.isPrimitiveType()) {
- if (genFeature.isBooleanType()) {
- stringBuffer.append(TEXT_1021);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1022);
- } else {
- stringBuffer.append(TEXT_1023);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_1024);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1025);
- }
- } else if (genFeature.isResolveProxies() && !genFeature.isListType()) {
- stringBuffer.append(TEXT_1026);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1027);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1028);
- } else if (genFeature.isMapType()) {
- if (genFeature.isEffectiveSuppressEMFTypes()) {
- stringBuffer.append(TEXT_1029);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1030);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1031);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1032);
- } else {
- stringBuffer.append(TEXT_1033);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1034);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1035);
- }
- } else if (genFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_1036);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1037);
- } else if (genFeature.isFeatureMapType()) {
- stringBuffer.append(TEXT_1038);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1039);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_1040);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1041);
- } else {
- stringBuffer.append(TEXT_1042);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1043);
- }
- }
- }
- stringBuffer.append(TEXT_1044);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1045);
- } else {
- stringBuffer.append(TEXT_1046);
- }
- stringBuffer.append(TEXT_1047);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {
- stringBuffer.append(TEXT_1048);
- for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_1049);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1050);
- if (genFeature.isListType()) {
- if (genFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_1051);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1052);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1053);
- } else if (genFeature.isFeatureMapType()) {
- stringBuffer.append(TEXT_1054);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap"));
- stringBuffer.append(TEXT_1055);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1056);
- } else if (genFeature.isMapType()) {
- if (genFeature.isEffectiveSuppressEMFTypes()) {
- stringBuffer.append(TEXT_1057);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
- stringBuffer.append(TEXT_1058);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1059);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1060);
- } else {
- stringBuffer.append(TEXT_1061);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
- stringBuffer.append(TEXT_1062);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1063);
- }
- } else {
- stringBuffer.append(TEXT_1064);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1065);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1066);
- stringBuffer.append(genModel.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_1067);
- }
- } else if (genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1068);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1069);
- stringBuffer.append(genFeature.getObjectType());
- stringBuffer.append(TEXT_1070);
- stringBuffer.append(genFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_1071);
- } else {
- stringBuffer.append(TEXT_1072);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1073);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1074);
- }
- stringBuffer.append(TEXT_1075);
- }
- }
- stringBuffer.append(TEXT_1076);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1077);
- } else {
- stringBuffer.append(TEXT_1078);
- }
- stringBuffer.append(TEXT_1079);
- for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_1080);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1081);
- if (genFeature.isListType() && !genFeature.isUnsettable()) {
- if (genFeature.isWrappedFeatureMapType()) {
- stringBuffer.append(TEXT_1082);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1083);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1084);
- } else {
- stringBuffer.append(TEXT_1085);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1086);
- }
- } else if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_1087);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1088);
- } else if (genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_1089);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1090);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1091);
- } else {
- stringBuffer.append(TEXT_1092);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1093);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1094);
- }
- stringBuffer.append(TEXT_1095);
- }
- }
- stringBuffer.append(TEXT_1096);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1097);
- } else {
- stringBuffer.append(TEXT_1098);
- }
- stringBuffer.append(TEXT_1099);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_1100);
- for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();
- if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {
- stringBuffer.append(TEXT_1101);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1102);
- if (genFeature.isListType() && !genFeature.isUnsettable()) {
- if (genFeature.isWrappedFeatureMapType()) {
- if (genFeature.isVolatile()) {
- stringBuffer.append(TEXT_1103);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1104);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1105);
- } else {
- stringBuffer.append(TEXT_1106);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1107);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1108);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1109);
- }
- } else {
- if (genClass.isField(genFeature)) {
- stringBuffer.append(TEXT_1110);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1111);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1112);
- } else {
- if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_1113);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1114);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1115);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1116);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1117);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1118);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1119);
- } else {
- stringBuffer.append(TEXT_1120);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1121);
- }
- }
- }
- } else if (genFeature.isUnsettable()) {
- stringBuffer.append(TEXT_1122);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1123);
- } else if (genFeature.isResolveProxies()) {
- if (genClass.isField(genFeature)) {
- stringBuffer.append(TEXT_1124);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1125);
- } else {
- if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_1126);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1127);
- } else {
- stringBuffer.append(TEXT_1128);
- stringBuffer.append(genFeature.getAccessorName());
- stringBuffer.append(TEXT_1129);
- }
- }
- } else if (genFeature.isReferenceType()) {
- if (genClass.isField(genFeature)) {
- stringBuffer.append(TEXT_1130);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1131);
- } else {
- if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_1132);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1133);
- } else {
- stringBuffer.append(TEXT_1134);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1135);
- }
- }
- } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {
- if (genClass.isField(genFeature)) {
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_1136);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_1137);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1138);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1139);
- } else {
- stringBuffer.append(TEXT_1140);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1141);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1142);
- }
- } else {
- if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_1143);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1144);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1145);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1146);
- } else {
- stringBuffer.append(TEXT_1147);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1148);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1149);
- }
- }
- } else {//datatype
- if (genClass.isField(genFeature)) {
- stringBuffer.append(TEXT_1150);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1151);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1152);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1153);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1154);
- } else {
- if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {
- stringBuffer.append(TEXT_1155);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1156);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1157);
- stringBuffer.append(genFeature.getImportedType());
- stringBuffer.append(TEXT_1158);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1159);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1160);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1161);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1162);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1163);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1164);
- } else {
- stringBuffer.append(TEXT_1165);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1166);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1167);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1168);
- stringBuffer.append(genFeature.getGetAccessor());
- stringBuffer.append(TEXT_1169);
- }
- }
- }
- }
- }
- stringBuffer.append(TEXT_1170);
- if (genModel.isMinimalReflectiveMethods()) {
- stringBuffer.append(TEXT_1171);
- } else {
- stringBuffer.append(TEXT_1172);
- }
- stringBuffer.append(TEXT_1173);
- //Class/eIsSet.override.javajetinc
- }
- if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_1174);
- for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next();
- stringBuffer.append(TEXT_1175);
- stringBuffer.append(mixinGenClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_1176);
- for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
- stringBuffer.append(TEXT_1177);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1178);
- stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
- stringBuffer.append(TEXT_1179);
- }
- stringBuffer.append(TEXT_1180);
- }
- stringBuffer.append(TEXT_1181);
- for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next();
- stringBuffer.append(TEXT_1182);
- stringBuffer.append(mixinGenClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_1183);
- for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();
- stringBuffer.append(TEXT_1184);
- stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature));
- stringBuffer.append(TEXT_1185);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1186);
- }
- stringBuffer.append(TEXT_1187);
- }
- stringBuffer.append(TEXT_1188);
- }
- if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();
- if (eVirtualValuesField != null) {
- stringBuffer.append(TEXT_1189);
- stringBuffer.append(eVirtualValuesField);
- stringBuffer.append(TEXT_1190);
- stringBuffer.append(eVirtualValuesField);
- stringBuffer.append(TEXT_1191);
- }
- { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());
- if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());
- stringBuffer.append(TEXT_1192);
- for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
- stringBuffer.append(TEXT_1193);
- stringBuffer.append(i);
- stringBuffer.append(TEXT_1194);
- stringBuffer.append(allEVirtualIndexBitFields.get(i));
- stringBuffer.append(TEXT_1195);
- }
- stringBuffer.append(TEXT_1196);
- for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {
- stringBuffer.append(TEXT_1197);
- stringBuffer.append(i);
- stringBuffer.append(TEXT_1198);
- stringBuffer.append(allEVirtualIndexBitFields.get(i));
- stringBuffer.append(TEXT_1199);
- }
- stringBuffer.append(TEXT_1200);
- }
- }
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {
- stringBuffer.append(TEXT_1201);
- { boolean first = true;
- for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();
- if (first) { first = false;
- stringBuffer.append(TEXT_1202);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_1203);
- stringBuffer.append(genModel.getNonNLS());
- } else {
- stringBuffer.append(TEXT_1204);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_1205);
- stringBuffer.append(genModel.getNonNLS());
- }
- if (genFeature.isUnsettable() && !genFeature.isListType()) {
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1206);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1207);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1208);
- stringBuffer.append(genModel.getNonNLS());
- } else {
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_1209);
- if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_1210);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_1211);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1212);
- } else {
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_1213);
- }
- stringBuffer.append(TEXT_1214);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_1215);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1216);
- stringBuffer.append(genModel.getNonNLS());
- } else {
- stringBuffer.append(TEXT_1217);
- if (genClass.isESetFlag(genFeature)) {
- stringBuffer.append(TEXT_1218);
- stringBuffer.append(genClass.getESetFlagsField(genFeature));
- stringBuffer.append(TEXT_1219);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1220);
- } else {
- stringBuffer.append(genFeature.getUncapName());
- stringBuffer.append(TEXT_1221);
- }
- stringBuffer.append(TEXT_1222);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1223);
- stringBuffer.append(genModel.getNonNLS());
- }
- }
- } else {
- if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1224);
- stringBuffer.append(genFeature.getUpperName());
- if (!genFeature.isListType() && !genFeature.isReferenceType()){
- stringBuffer.append(TEXT_1225);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1226);
- }
- stringBuffer.append(TEXT_1227);
- } else {
- if (genClass.isFlag(genFeature)) {
- stringBuffer.append(TEXT_1228);
- stringBuffer.append(genClass.getFlagsField(genFeature));
- stringBuffer.append(TEXT_1229);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_1230);
- } else {
- stringBuffer.append(TEXT_1231);
- stringBuffer.append(genFeature.getSafeName());
- stringBuffer.append(TEXT_1232);
- }
- }
- }
- }
- }
- stringBuffer.append(TEXT_1233);
- }
- if (isImplementation && !genModel.isReflectiveDelegation() && genClass.isAbstract()) {
- stringBuffer.append(TEXT_1234);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_1235);
- }
- if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();
- stringBuffer.append(TEXT_1236);
- if (keyFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1237);
- stringBuffer.append(keyFeature.getObjectType());
- stringBuffer.append(TEXT_1238);
- } else {
- stringBuffer.append(TEXT_1239);
- }
- stringBuffer.append(TEXT_1240);
- if (keyFeature.isListType()) {
- stringBuffer.append(TEXT_1241);
- stringBuffer.append(genModel.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_1242);
- } else if (keyFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1243);
- stringBuffer.append(keyFeature.getObjectType());
- stringBuffer.append(TEXT_1244);
- stringBuffer.append(keyFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_1245);
- } else {
- stringBuffer.append(TEXT_1246);
- stringBuffer.append(keyFeature.getImportedType());
- stringBuffer.append(TEXT_1247);
- }
- stringBuffer.append(TEXT_1248);
- if (valueFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1249);
- stringBuffer.append(valueFeature.getObjectType());
- stringBuffer.append(TEXT_1250);
- } else {
- stringBuffer.append(TEXT_1251);
- }
- stringBuffer.append(TEXT_1252);
- if (valueFeature.isListType()) {
- stringBuffer.append(TEXT_1253);
- stringBuffer.append(genModel.getImportedName("java.util.Collection"));
- stringBuffer.append(TEXT_1254);
- } else if (valueFeature.isPrimitiveType()) {
- stringBuffer.append(TEXT_1255);
- stringBuffer.append(valueFeature.getObjectType());
- stringBuffer.append(TEXT_1256);
- stringBuffer.append(valueFeature.getPrimitiveValueFunction());
- stringBuffer.append(TEXT_1257);
- } else {
- stringBuffer.append(TEXT_1258);
- stringBuffer.append(valueFeature.getImportedType());
- stringBuffer.append(TEXT_1259);
- }
- stringBuffer.append(TEXT_1260);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1261);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject"));
- stringBuffer.append(TEXT_1262);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap"));
- stringBuffer.append(TEXT_1263);
- }
- stringBuffer.append(TEXT_1264);
- stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName());
- // TODO fix the space above
- genModel.emitSortedImports();
- stringBuffer.append(TEXT_1265);
- return stringBuffer.toString();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
deleted file mode 100644
index 4a86a29027..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java
+++ /dev/null
@@ -1,1132 +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;
- }
-
- protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "";
- protected final String TEXT_2 = "/**" + NL + " * " + NL + " * " + NL + " *" + NL + " * ";
- protected final String TEXT_3 = "Id";
- protected final String TEXT_4 = NL + " */";
- protected final String TEXT_5 = NL + "package ";
- protected final String TEXT_6 = ";";
- protected final String TEXT_7 = NL + "package ";
- protected final String TEXT_8 = ";";
- protected final String TEXT_9 = NL + NL + "import commonj.sdo.helper.HelperContext;" + NL + "import org.apache.tuscany.sdo.helper.HelperContextImpl;";
- protected final String TEXT_10 = NL + "import org.apache.tuscany.sdo.helper.TypeHelperImpl;";
- protected final String TEXT_11 = NL;
- protected final String TEXT_12 = NL;
- protected final String TEXT_13 = NL + "/**" + NL + " * " + NL + " * The Factory for the model." + NL + " * It provides a create method for each non-abstract class of the model." + NL + " * ";
- 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 + " * " + NL + " * An implementation of the model Factory." + NL + " * Generator information:" + NL + " * patternVersion=";
- protected final String TEXT_19 = ";";
- protected final String TEXT_20 = NL + " * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void register(HelperContext scope) " + NL + "\t{" + NL + "\t\tif(scope == null) {" + NL + "\t\t\tthrow new IllegalArgumentException(\"Scope can not be null\");" + NL + "\t\t}" + NL + "" + NL + "\t\tif (((HelperContextImpl)scope).getExtendedMetaData().getPackage(NAMESPACE_URI) != null)" + NL + "\t\t\treturn;" + NL + " " + NL + "\t\t// Register this package with provided scope " + NL + "\t\t((HelperContextImpl)scope).getExtendedMetaData().putPackage(NAMESPACE_URI, this);" + NL + "\t\t" + NL + "\t\t//Register dependent packages with provided scope";
- protected final String TEXT_55 = NL + "\t\t";
- protected final String TEXT_56 = ".INSTANCE.register(scope);";
- protected final String TEXT_57 = NL + " }" + NL + "\t" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + 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 * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_76 = " create";
- protected final String TEXT_77 = "()" + NL + "\t{";
- protected final String TEXT_78 = NL + "\t\t";
- protected final String TEXT_79 = " ";
- protected final String TEXT_80 = " = ";
- protected final String TEXT_81 = "super.create(";
- protected final String TEXT_82 = ");";
- protected final String TEXT_83 = NL + "\t\t";
- protected final String TEXT_84 = " ";
- protected final String TEXT_85 = " = new ";
- protected final String TEXT_86 = "()";
- protected final String TEXT_87 = "{}";
- protected final String TEXT_88 = ";";
- protected final String TEXT_89 = NL + "\t\treturn ";
- protected final String TEXT_90 = ";" + NL + "\t}";
- protected final String TEXT_91 = NL + "\t" + NL + "\t// Following creates and initializes SDO metadata for the supported types.";
- protected final String TEXT_92 = "\t";
- protected final String TEXT_93 = "\t" + NL + "\tprotected ";
- protected final String TEXT_94 = " ";
- protected final String TEXT_95 = "Type = null;" + NL + "" + NL + "\tpublic ";
- protected final String TEXT_96 = " get";
- protected final String TEXT_97 = "()" + NL + "\t{" + NL + "\t\treturn ";
- protected final String TEXT_98 = "Type;" + NL + "\t}" + NL;
- protected final String TEXT_99 = "\t" + NL + "" + NL + "\tprivate static ";
- protected final String TEXT_100 = " instance = null; " + NL + "\tpublic static ";
- protected final String TEXT_101 = " init()" + NL + "\t{" + NL + "\t\tif (instance != null ) return instance;" + NL + "\t\tinstance = new ";
- protected final String TEXT_102 = "();" + NL + "" + NL + "\t\t// Create package meta-data objects" + NL + "\t\tinstance.createMetaData();" + NL + "" + NL + "\t\t// Initialize created meta-data" + NL + "\t\tinstance.initializeMetaData();" + NL + "\t\t" + NL + "\t\t// Mark meta-data to indicate it can't be changed" + NL + "\t\t//the";
- protected final String TEXT_103 = ".freeze(); //FB do we need to freeze / should we freeze ????" + NL + "" + NL + "\t\treturn instance;" + NL + "\t}" + NL + " " + NL + "\tprivate boolean isCreated = false;" + NL + "" + NL + "\tpublic void createMetaData()" + NL + "\t{" + NL + "\t\tif (isCreated) return;" + NL + "\t\tisCreated = true;";
- protected final String TEXT_104 = "\t" + NL + "" + NL + "\t\t// Create types and their properties";
- protected final String TEXT_105 = NL + "\t\t";
- protected final String TEXT_106 = "Type = createType(false, ";
- protected final String TEXT_107 = ");";
- protected final String TEXT_108 = NL + "\t\tcreateProperty(";
- protected final String TEXT_109 = ", ";
- protected final String TEXT_110 = "Type,";
- protected final String TEXT_111 = "._INTERNAL_";
- protected final String TEXT_112 = "); ";
- protected final String TEXT_113 = NL + NL + "\t\t// Create data types";
- protected final String TEXT_114 = NL + "\t\t";
- protected final String TEXT_115 = "Type = createType(true, ";
- protected final String TEXT_116 = " );";
- protected final String TEXT_117 = NL + "\t}" + NL + "\t" + NL + "\tprivate boolean isInitialized = false;" + NL + "" + NL + "\tpublic void initializeMetaData()" + NL + "\t{" + NL + "\t\tif (isInitialized) return;" + NL + "\t\tisInitialized = true;";
- protected final String TEXT_118 = NL + NL + "\t\t// Obtain other dependent packages";
- protected final String TEXT_119 = NL + "\t\t";
- protected final String TEXT_120 = " ";
- protected final String TEXT_121 = " = (";
- protected final String TEXT_122 = ")";
- protected final String TEXT_123 = ".init();";
- protected final String TEXT_124 = NL + "\t\t";
- protected final String TEXT_125 = " property = null;" + NL + "" + NL + "\t\t// Add supertypes to types";
- protected final String TEXT_126 = NL + "\t\taddSuperType(";
- protected final String TEXT_127 = "Type, ";
- protected final String TEXT_128 = ".get";
- protected final String TEXT_129 = "());";
- protected final String TEXT_130 = NL + NL + "\t\t// Initialize types and properties";
- protected final String TEXT_131 = NL + "\t\tinitializeType(";
- protected final String TEXT_132 = "Type, ";
- protected final String TEXT_133 = ".class, \"";
- protected final String TEXT_134 = "\", ";
- protected final String TEXT_135 = ");";
- protected final String TEXT_136 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_137 = "Type, \"";
- protected final String TEXT_138 = "\", ";
- protected final String TEXT_139 = ", ";
- protected final String TEXT_140 = ");";
- protected final String TEXT_141 = NL + "\t\tproperty = getLocalProperty(";
- protected final String TEXT_142 = "Type, ";
- protected final String TEXT_143 = ");";
- protected final String TEXT_144 = NL + "\t\tinitializeProperty(property, ";
- protected final String TEXT_145 = ", \"";
- protected final String TEXT_146 = "\", ";
- protected final String TEXT_147 = ", ";
- protected final String TEXT_148 = ", ";
- protected final String TEXT_149 = ", ";
- protected final String TEXT_150 = ", ";
- protected final String TEXT_151 = ", ";
- protected final String TEXT_152 = ", ";
- protected final String TEXT_153 = ", ";
- protected final String TEXT_154 = " , ";
- protected final String TEXT_155 = ");";
- protected final String TEXT_156 = NL + "\t\tinitializeProperty(property, ";
- protected final String TEXT_157 = ", \"";
- protected final String TEXT_158 = "\", ";
- protected final String TEXT_159 = ", ";
- protected final String TEXT_160 = ", ";
- protected final String TEXT_161 = ", ";
- protected final String TEXT_162 = ", ";
- protected final String TEXT_163 = ", ";
- protected final String TEXT_164 = ", ";
- protected final String TEXT_165 = ");";
- protected final String TEXT_166 = NL + "\t\tsetInstanceProperty (property, \"";
- protected final String TEXT_167 = "\", ";
- protected final String TEXT_168 = ", ";
- protected final String TEXT_169 = ");";
- protected final String TEXT_170 = NL;
- protected final String TEXT_171 = NL + "\t\t// Initialize data types";
- protected final String TEXT_172 = NL + "\t\tinitializeType(";
- protected final String TEXT_173 = "Type, ";
- protected final String TEXT_174 = ".class, \"";
- protected final String TEXT_175 = "\", ";
- protected final String TEXT_176 = ", ";
- protected final String TEXT_177 = ");";
- protected final String TEXT_178 = NL + "\t\tsetInstanceProperty (";
- protected final String TEXT_179 = "Type, \"";
- protected final String TEXT_180 = "\", ";
- protected final String TEXT_181 = ", ";
- protected final String TEXT_182 = ");";
- protected final String TEXT_183 = NL;
- protected final String TEXT_184 = NL + "\t\tcreateXSDMetaData(";
- protected final String TEXT_185 = ");" + NL + "\t}" + NL + "\t " + NL + "\tprotected void createXSDMetaData(";
- protected final String TEXT_186 = ")" + NL + "\t{" + NL + "\t\tsuper.initXSD();" + NL + "\t\t" + NL + "\t\t";
- protected final String TEXT_187 = " property = null;" + NL + "\t\t";
- protected final String TEXT_188 = NL + "\t\taddXSDMapping" + NL + "\t\t (new String[]" + NL + "\t\t\t {";
- protected final String TEXT_189 = NL + "\t\t\t ";
- protected final String TEXT_190 = ", ";
- protected final String TEXT_191 = NL + "\t\t\t }," + NL + "\t\t\t \"";
- protected final String TEXT_192 = "\");" + NL;
- protected final String TEXT_193 = NL;
- protected final String TEXT_194 = NL + "\t\taddXSDMapping" + NL + "\t\t (";
- protected final String TEXT_195 = "Type," + NL + "\t\t\t new String[] " + NL + "\t\t\t {";
- protected final String TEXT_196 = NL + "\t\t\t ";
- protected final String TEXT_197 = ", ";
- protected final String TEXT_198 = NL + "\t\t\t });" + NL;
- protected final String TEXT_199 = NL + "\t\tproperty = createGlobalProperty" + NL + "\t\t (\"";
- protected final String TEXT_200 = "\"," + NL + "\t\t ";
- protected final String TEXT_201 = ".get";
- protected final String TEXT_202 = "()," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_203 = NL + "\t\t\t ";
- protected final String TEXT_204 = ", ";
- protected final String TEXT_205 = NL + "\t\t\t }," + NL + "\t\t\t IS_ATTRIBUTE);";
- protected final String TEXT_206 = NL + "\t\t\t });";
- protected final String TEXT_207 = NL + " ";
- protected final String TEXT_208 = NL + "\t\tsetInstanceProperty" + NL + "\t\t (property," + NL + "\t\t\t \"";
- protected final String TEXT_209 = "\"," + NL + "\t\t\t ";
- protected final String TEXT_210 = ", ";
- protected final String TEXT_211 = ");";
- protected final String TEXT_212 = NL + " ";
- protected final String TEXT_213 = " ";
- protected final String TEXT_214 = NL + "\t\taddXSDMapping" + NL + "\t\t\t(getLocalProperty(";
- protected final String TEXT_215 = "Type, ";
- protected final String TEXT_216 = ")," + NL + "\t\t\t new String[]" + NL + "\t\t\t {";
- protected final String TEXT_217 = NL + "\t\t\t ";
- protected final String TEXT_218 = ", ";
- protected final String TEXT_219 = NL + "\t\t\t });" + NL;
- protected final String TEXT_220 = NL + " }" + NL + " ";
- protected final String TEXT_221 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_222 = " create";
- protected final String TEXT_223 = "FromString(String initialValue)" + NL + "\t{";
- protected final String TEXT_224 = NL + "\t\t";
- protected final String TEXT_225 = " result = ";
- protected final String TEXT_226 = ".get(initialValue);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + type.getName() + \"'\");";
- protected final String TEXT_227 = NL + "\t\treturn result;";
- protected final String TEXT_228 = NL + "\t\treturn (";
- protected final String TEXT_229 = ")create";
- protected final String TEXT_230 = "FromString(initialValue);";
- protected final String TEXT_231 = NL + "\t\treturn (";
- protected final String TEXT_232 = ")";
- protected final String TEXT_233 = ".create";
- protected final String TEXT_234 = "FromString(initialValue);";
- protected final String TEXT_235 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_236 = " result = new ";
- protected final String TEXT_237 = "();" + NL + "\t\tfor (";
- protected final String TEXT_238 = " stringTokenizer = new ";
- protected final String TEXT_239 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();";
- protected final String TEXT_240 = NL + "\t\t\tresult.add(create";
- protected final String TEXT_241 = "FromString(item));";
- protected final String TEXT_242 = NL + "\t\t\tresult.add(";
- protected final String TEXT_243 = ".create";
- protected final String TEXT_244 = "FromString(item));";
- protected final String TEXT_245 = NL + "\t\t}" + NL + "\t\treturn result;";
- protected final String TEXT_246 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_247 = " result = null;" + NL + "\t\tRuntimeException exception = null;";
- protected final String TEXT_248 = NL + "\t\ttry" + NL + "\t\t{";
- protected final String TEXT_249 = NL + "\t\t\tresult = (";
- protected final String TEXT_250 = ")create";
- protected final String TEXT_251 = "FromString(initialValue);";
- protected final String TEXT_252 = NL + "\t\t\tresult = (";
- protected final String TEXT_253 = ")";
- protected final String TEXT_254 = ".create";
- protected final String TEXT_255 = "FromString(initialValue);";
- protected final String TEXT_256 = NL + "\t\t\tif (result != null/* && Diagnostician.INSTANCE.validate(type, result, null, null)*/)" + NL + "\t\t\t{" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tcatch (RuntimeException e)" + NL + "\t\t{" + NL + "\t\t\texception = e;" + NL + "\t\t}";
- protected final String TEXT_257 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;";
- protected final String TEXT_258 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
- protected final String TEXT_259 = "();";
- protected final String TEXT_260 = NL + "\t\treturn (";
- protected final String TEXT_261 = ")super.createFromString(";
- protected final String TEXT_262 = ", initialValue);";
- protected final String TEXT_263 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert";
- protected final String TEXT_264 = "ToString(Object instanceValue)" + NL + "\t{";
- protected final String TEXT_265 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();";
- protected final String TEXT_266 = NL + "\t\treturn convert";
- protected final String TEXT_267 = "ToString(instanceValue);";
- protected final String TEXT_268 = NL + "\t\treturn ";
- protected final String TEXT_269 = ".convert";
- protected final String TEXT_270 = "ToString(instanceValue);";
- protected final String TEXT_271 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t";
- protected final String TEXT_272 = " list = (";
- protected final String TEXT_273 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t";
- protected final String TEXT_274 = " result = new ";
- protected final String TEXT_275 = "();" + NL + "\t\tfor (";
- protected final String TEXT_276 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{";
- protected final String TEXT_277 = NL + "\t\t\tresult.append(convert";
- protected final String TEXT_278 = "ToString(i.next()));";
- protected final String TEXT_279 = NL + "\t\t\tresult.append(";
- protected final String TEXT_280 = ".convert";
- protected final String TEXT_281 = "ToString(i.next()));";
- protected final String TEXT_282 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);";
- protected final String TEXT_283 = NL + "\t\tif (instanceValue == null) return null;";
- protected final String TEXT_284 = NL + "\t\tif (";
- protected final String TEXT_285 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{";
- protected final String TEXT_286 = NL + "\t\t\t\tString value = convert";
- protected final String TEXT_287 = "ToString(instanceValue);";
- protected final String TEXT_288 = NL + "\t\t\t\tString value = ";
- protected final String TEXT_289 = ".convert";
- protected final String TEXT_290 = "ToString(instanceValue);";
- protected final String TEXT_291 = NL + "\t\t\t\tif (value != null) return value;" + NL + "\t\t\t}" + NL + "\t\t\tcatch (Exception e)" + NL + "\t\t\t{" + NL + "\t\t\t}" + NL + "\t\t}";
- protected final String TEXT_292 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :";
- protected final String TEXT_293 = "\");";
- protected final String TEXT_294 = NL + "\t\t// TODO: implement this method" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new ";
- protected final String TEXT_295 = "();";
- protected final String TEXT_296 = NL + "\t\treturn super.convertToString(";
- protected final String TEXT_297 = ", instanceValue);";
- protected final String TEXT_298 = NL + "\t}" + NL;
- protected final String TEXT_299 = NL + "\t/**" + NL + "\t * Returns a new object of class '";
- protected final String TEXT_300 = "'." + NL + "\t * " + NL + "\t * " + NL + "\t * @return a new object of class '";
- protected final String TEXT_301 = "'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
- protected final String TEXT_302 = " create";
- protected final String TEXT_303 = "();" + NL;
- protected final String TEXT_304 = NL + " /**" + NL + " * Registers the types supported by this Factory within the supplied scope.argument" + NL + "\t * " + NL + "\t * " + NL + "\t * @param scope an instance of HelperContext used to manage the scoping of types." + NL + "\t * @generated" + NL + " */" + NL + " public void register(HelperContext scope);" + NL + " ";
- protected final String TEXT_305 = NL + "\t/**" + NL + "\t * Returns an instance of data type '";
- protected final String TEXT_306 = "' corresponding the given literal." + NL + "\t * " + NL + "\t * " + NL + "\t * @param literal a literal of the data type." + NL + "\t * @return a new instance value of the data type." + NL + "\t * @generated" + NL + "\t */" + NL + "\t";
- protected final String TEXT_307 = " create";
- protected final String TEXT_308 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '";
- protected final String TEXT_309 = "'." + NL + "\t * " + NL + "\t * " + NL + "\t * @param instanceValue an instance value of the data type." + NL + "\t * @return a literal representation of the instance value." + NL + "\t * @generated" + NL + "\t */" + NL + "\tString convert";
- protected final String TEXT_310 = "(";
- protected final String TEXT_311 = " instanceValue);" + NL;
- protected final String TEXT_312 = NL + "} //";
- protected final String TEXT_313 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
-
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- GenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel();
- boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);
- String factoryPatternVersion = "1.2";
- String publicStaticFinalFlag = isImplementation ? "public static final " : "";
- stringBuffer.append(TEXT_1);
- stringBuffer.append(TEXT_2);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_3);
- stringBuffer.append("$");
- stringBuffer.append(TEXT_4);
- if (isInterface || genModel.isSuppressInterfaces()) {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(genPackage.getReflectionPackageName());
- stringBuffer.append(TEXT_6);
- } else {
- stringBuffer.append(TEXT_7);
- stringBuffer.append(genPackage.getClassPackageName());
- stringBuffer.append(TEXT_8);
- }
- stringBuffer.append(TEXT_9);
- if (!isInterface || genModel.isSuppressInterfaces()) {
- stringBuffer.append(TEXT_10);
- }
- stringBuffer.append(TEXT_11);
- if (isImplementation) {
- if (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");
- }
- genModel.markImportLocation(stringBuffer);
- stringBuffer.append(TEXT_12);
- if (isInterface) {
- stringBuffer.append(TEXT_13);
- if (!genModel.isSuppressEMFMetaData()) {
- stringBuffer.append(TEXT_14);
- stringBuffer.append(genPackage.getQualifiedPackageInterfaceName());
- }
- if (genModel.isSuppressInterfaces()) {
- stringBuffer.append(TEXT_15);
- stringBuffer.append(factoryPatternVersion);
- stringBuffer.append(TEXT_16);
- stringBuffer.append(SDOGenUtil.printArguments(genPackage, genModel) );
- }
- stringBuffer.append(TEXT_17);
- } else {
- stringBuffer.append(TEXT_18);
- stringBuffer.append(factoryPatternVersion);
- stringBuffer.append(TEXT_19);
- stringBuffer.append(SDOGenUtil.printArguments(genPackage, genModel) );
- stringBuffer.append(TEXT_20);
- }
- if (isImplementation) {
- stringBuffer.append(TEXT_21);
- stringBuffer.append(genPackage.getFactoryClassName());
- stringBuffer.append(TEXT_22);
- stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.impl.FactoryBase"));
- if (!genModel.isSuppressInterfaces()) {
- stringBuffer.append(TEXT_23);
- stringBuffer.append(genPackage.getImportedFactoryInterfaceName());
- }
- } else {
- stringBuffer.append(TEXT_24);
- stringBuffer.append(genPackage.getFactoryInterfaceName());
- if (!genModel.isSuppressEMFMetaData()) {
- stringBuffer.append(TEXT_25);
- stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EFactory"));
- }
- }
- stringBuffer.append(TEXT_26);
- if (genModel.getCopyrightText() != null) {
- stringBuffer.append(TEXT_27);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_28);
- stringBuffer.append(genModel.getCopyrightText());
- stringBuffer.append(TEXT_29);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_30);
- }
- stringBuffer.append(TEXT_31);
- if (isInterface && genModel.isSuppressEMFMetaData()) {
- stringBuffer.append(TEXT_32);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genPackage.getFactoryInterfaceName());
- stringBuffer.append(TEXT_33);
- stringBuffer.append(genPackage.getQualifiedFactoryClassName());
- stringBuffer.append(TEXT_34);
- } else if (isInterface && !genModel.isSuppressInterfaces()) {
- stringBuffer.append(TEXT_35);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genPackage.getFactoryInterfaceName());
- stringBuffer.append(TEXT_36);
- stringBuffer.append(genPackage.getQualifiedFactoryClassName());
- stringBuffer.append(TEXT_37);
- }
- if (isImplementation) {
- stringBuffer.append(TEXT_38);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_39);
- stringBuffer.append(genPackage.getNSURI());
- stringBuffer.append(TEXT_40);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_41);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_42);
- stringBuffer.append(genPackage.getNSName());
- stringBuffer.append(TEXT_43);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(TEXT_44);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(genModel.getImportedName("java.lang.String"));
- stringBuffer.append(TEXT_45);
- stringBuffer.append(factoryPatternVersion);
- stringBuffer.append(TEXT_46);
- int genIndex = 1;
-for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();
- if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) {
- stringBuffer.append(TEXT_47);
- stringBuffer.append(publicStaticFinalFlag);
- stringBuffer.append(TEXT_48);
- stringBuffer.append(genPackage.getClassifierID(genClassifier));
- stringBuffer.append(TEXT_49);
- stringBuffer.append(genIndex);
- stringBuffer.append(TEXT_50);
- genIndex++;
- } }
- stringBuffer.append(TEXT_51);
- String factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();
- stringBuffer.append(TEXT_52);
- stringBuffer.append(genPackage.getFactoryClassName());
- stringBuffer.append(TEXT_53);
- stringBuffer.append(genPackage.getReflectionPackageName());
- stringBuffer.append(TEXT_54);
- for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
- stringBuffer.append(TEXT_55);
- stringBuffer.append(dep.getImportedFactoryInterfaceName());
- stringBuffer.append(TEXT_56);
- }
- stringBuffer.append(TEXT_57);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject"));
- stringBuffer.append(TEXT_58);
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (!genClass.isAbstract() && !genClass.isDynamic()) {
- stringBuffer.append(TEXT_59);
- stringBuffer.append(genClass.getClassifierID());
- stringBuffer.append(TEXT_60);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject"));
- stringBuffer.append(TEXT_61);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_62);
- }
- }
- stringBuffer.append(TEXT_63);
- if (!genPackage.getAllGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_64);
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_65);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_66);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_67);
- }
- }
- stringBuffer.append(TEXT_68);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
- stringBuffer.append(TEXT_69);
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_70);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_71);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_72);
- }
- }
- stringBuffer.append(TEXT_73);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
- stringBuffer.append(TEXT_74);
- }
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (!genClass.isAbstract() && !genClass.isDynamic()) {
- stringBuffer.append(TEXT_75);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_76);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_77);
- if (genClass.isDynamic()) {
- stringBuffer.append(TEXT_78);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_79);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_80);
- stringBuffer.append(genClass.getCastFromEObject());
- stringBuffer.append(TEXT_81);
- stringBuffer.append(genClass.getQualifiedClassifierAccessor());
- stringBuffer.append(TEXT_82);
- } else {
- stringBuffer.append(TEXT_83);
- stringBuffer.append(genClass.getImportedClassName());
- stringBuffer.append(TEXT_84);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_85);
- stringBuffer.append(genClass.getImportedClassName());
- stringBuffer.append(TEXT_86);
- if (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {
- stringBuffer.append(TEXT_87);
- }
- stringBuffer.append(TEXT_88);
- }
- stringBuffer.append(TEXT_89);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_90);
- }
- }
- stringBuffer.append(TEXT_91);
- for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();
- stringBuffer.append(TEXT_92);
- if (!genPackage.getClassifierID(genClassifier).equals("DOCUMENT_ROOT")) {
- stringBuffer.append(TEXT_93);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
- stringBuffer.append(TEXT_94);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_95);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Type"));
- stringBuffer.append(TEXT_96);
- stringBuffer.append(genClassifier.getClassifierAccessorName());
- stringBuffer.append(TEXT_97);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_98);
- } }
- stringBuffer.append(TEXT_99);
- stringBuffer.append(factoryType);
- stringBuffer.append(TEXT_100);
- stringBuffer.append(factoryType);
- stringBuffer.append(TEXT_101);
- stringBuffer.append(factoryType);
- stringBuffer.append(TEXT_102);
- stringBuffer.append(factoryType);
- stringBuffer.append(TEXT_103);
- if (!genPackage.getGenClasses().isEmpty()) {
- stringBuffer.append(TEXT_104);
- for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
- if (!genClass.isDynamic()) {
- stringBuffer.append(TEXT_105);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_106);
- stringBuffer.append(genPackage.getClassifierID(genClass));
- stringBuffer.append(TEXT_107);
- for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();
- stringBuffer.append(TEXT_108);
- stringBuffer.append(!genFeature.isReferenceType());
- stringBuffer.append(TEXT_109);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_110);
- stringBuffer.append(genClass.getClassName());
- stringBuffer.append(TEXT_111);
- stringBuffer.append(genFeature.getUpperName());
- stringBuffer.append(TEXT_112);
- }
- }
- }
- }
- if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_113);
- for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_114);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_115);
- stringBuffer.append(genPackage.getClassifierID(genDataType));
- stringBuffer.append(TEXT_116);
- }
- }
- stringBuffer.append(TEXT_117);
- if (!genPackage.getPackageInitializationDependencies().isEmpty()) {
- stringBuffer.append(TEXT_118);
- for (Iterator p=genPackage.getPackageInitializationDependencies().iterator(); p.hasNext();) { GenPackage dep = (GenPackage)p.next();
- stringBuffer.append(TEXT_119);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_120);
- stringBuffer.append(genPackage.getPackageInstanceVariable(dep));
- stringBuffer.append(TEXT_121);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_122);
- stringBuffer.append(dep.getImportedFactoryClassName());
- stringBuffer.append(TEXT_123);
- }
- }
- List annotationSources = genPackage.getAnnotationSources();
- annotationSources.remove(ExtendedMetaData.ANNOTATION_URI);
- stringBuffer.append(TEXT_124);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_125);
- for (Iterator c=genPackage.getGenClasses().iterator(); c.hasNext();) { GenClass genClass = (GenClass)c.next();
- for (Iterator b=genClass.getBaseGenClasses().iterator(); b.hasNext();) { GenClass baseGenClass = (GenClass)b.next();
- stringBuffer.append(TEXT_126);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_127);
- stringBuffer.append(genPackage.getPackageInstanceVariable(baseGenClass.getGenPackage()));
- stringBuffer.append(TEXT_128);
- stringBuffer.append(baseGenClass.getClassifierAccessorName());
- stringBuffer.append(TEXT_129);
- }
- }
- stringBuffer.append(TEXT_130);
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (!genClass.isDynamic()) {
- stringBuffer.append(TEXT_131);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_132);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_133);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_134);
- stringBuffer.append(genClass.isAbstract());
- stringBuffer.append(TEXT_135);
- for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
- EAnnotation classAnnotation = genClass.getEcoreClassifier().getEAnnotation(annotationSource);
- if (classAnnotation != null) {
- for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_136);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_137);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_138);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_139);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_140);
- }
- }
- }
- for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next();
- String type = genFeature.getType().equals("commonj.sdo.Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()";
- stringBuffer.append(TEXT_141);
- stringBuffer.append(genClass.getSafeUncapName());
- stringBuffer.append(TEXT_142);
- stringBuffer.append(genClass.getLocalFeatureIndex(genFeature));
- stringBuffer.append(TEXT_143);
- if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();
- String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";
- stringBuffer.append(TEXT_144);
- stringBuffer.append(type);
- stringBuffer.append(TEXT_145);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_146);
- stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_147);
- stringBuffer.append(genFeature.getLowerBound());
- stringBuffer.append(TEXT_148);
- stringBuffer.append(genFeature.getUpperBound());
- stringBuffer.append(TEXT_149);
- stringBuffer.append(genFeature.getContainerClass());
- stringBuffer.append(TEXT_150);
- stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
- stringBuffer.append(TEXT_151);
- stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
- stringBuffer.append(TEXT_152);
- stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
- stringBuffer.append(TEXT_153);
- stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false");
- stringBuffer.append(TEXT_154);
- stringBuffer.append(reverse);
- stringBuffer.append(TEXT_155);
- }else{
- stringBuffer.append(TEXT_156);
- stringBuffer.append(type);
- stringBuffer.append(TEXT_157);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_158);
- stringBuffer.append(genFeature.getDefaultValue());
- stringBuffer.append(TEXT_159);
- stringBuffer.append(genFeature.getLowerBound());
- stringBuffer.append(TEXT_160);
- stringBuffer.append(genFeature.getUpperBound());
- stringBuffer.append(TEXT_161);
- stringBuffer.append(genFeature.getContainerClass());
- stringBuffer.append(TEXT_162);
- stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true");
- stringBuffer.append(TEXT_163);
- stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false");
- stringBuffer.append(TEXT_164);
- stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false");
- stringBuffer.append(TEXT_165);
- }
- for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
- EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
- if (featureAnnotation != null) {
- for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_166);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_167);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_168);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_169);
- }
- }
- }
- stringBuffer.append(TEXT_170);
- }
- }
- }
- if (!genPackage.getGenDataTypes().isEmpty()) {
- stringBuffer.append(TEXT_171);
- for (Iterator d=genPackage.getGenDataTypes().iterator(); d.hasNext();) { GenDataType genDataType = (GenDataType)d.next();
- stringBuffer.append(TEXT_172);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_173);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_174);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_175);
- stringBuffer.append(genDataType.getSerializableFlag().equals("IS_SERIALIZABLE") ? "true" : "false");
- stringBuffer.append(TEXT_176);
- stringBuffer.append(genDataType.getGeneratedInstanceClassFlag().equals("IS_GENERATED_INSTANCE_CLASS") ? "true" : "false" );
- stringBuffer.append(TEXT_177);
- stringBuffer.append(genModel.getNonNLS());
- for (Iterator sources = annotationSources.iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
- EAnnotation dataTypeAnnotation = genDataType.getEcoreDataType().getEAnnotation(annotationSource);
- if (dataTypeAnnotation != null) {
- for (Iterator k = dataTypeAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_178);
- stringBuffer.append(genDataType.getSafeUncapName());
- stringBuffer.append(TEXT_179);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_180);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_181);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_182);
- }
- }
- }
- stringBuffer.append(TEXT_183);
- }
- }
- stringBuffer.append(TEXT_184);
- stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, false));
- stringBuffer.append(TEXT_185);
- stringBuffer.append(SDOGenUtil.getDependentFactoryArgumentList(genPackage, true));
- stringBuffer.append(TEXT_186);
- stringBuffer.append(genModel.getImportedName("commonj.sdo.Property"));
- stringBuffer.append(TEXT_187);
- String extendedMetaDataSource = ExtendedMetaData.ANNOTATION_URI;
- EAnnotation packageAnnotation = genPackage.getEcorePackage().getEAnnotation(extendedMetaDataSource);
- if (packageAnnotation != null){
- stringBuffer.append(TEXT_188);
- for (Iterator k = packageAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_189);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_190);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_191);
- stringBuffer.append(packageAnnotation.getSource());
- stringBuffer.append(TEXT_192);
- }
- stringBuffer.append(TEXT_193);
- for (Iterator i=genPackage.getGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next(); EAnnotation classAnnotation = genClassifier.getEcoreClassifier().getEAnnotation(extendedMetaDataSource);
- if (classAnnotation != null && !genClassifier.getName().equals("DocumentRoot")) {
- stringBuffer.append(TEXT_194);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_195);
- for (Iterator k = classAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_196);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_197);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_198);
- }
- if (genClassifier instanceof GenClass) { GenClass genClass = (GenClass) genClassifier;
- for (Iterator j=genClass.getGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();
- EAnnotation featureAnnotation = genFeature.getEcoreFeature().getEAnnotation(extendedMetaDataSource);
- if (genClass.getName().equals("DocumentRoot")) {
- if (!(genFeature.getName().equals("mixed") || genFeature.getName().equals("xMLNSPrefixMap") || genFeature.getName().equals("xSISchemaLocation"))) {
- stringBuffer.append(TEXT_199);
- stringBuffer.append(genFeature.getName());
- stringBuffer.append(TEXT_200);
- stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()));
- stringBuffer.append(TEXT_201);
- stringBuffer.append(genFeature.getTypeClassifierAccessorName());
- stringBuffer.append(TEXT_202);
- for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_203);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_204);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- if (!genFeature.isReferenceType()) {
- stringBuffer.append(TEXT_205);
- } else {
- stringBuffer.append(TEXT_206);
- }
- stringBuffer.append(TEXT_207);
- for (Iterator sources = genPackage.getAnnotationSources().iterator(); sources.hasNext();) { String annotationSource = (String)sources.next();
- if (!annotationSource.equals(extendedMetaDataSource)) {
- EAnnotation globalAnnotation = genFeature.getEcoreFeature().getEAnnotation(annotationSource);
- if (globalAnnotation != null) {
- for (Iterator k = globalAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_208);
- stringBuffer.append(annotationSource);
- stringBuffer.append(TEXT_209);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_210);
- stringBuffer.append(value);
- stringBuffer.append(genModel.getNonNLS(key + value));
- stringBuffer.append(TEXT_211);
- }
- stringBuffer.append(TEXT_212);
- }
- }
- stringBuffer.append(TEXT_213);
- }
- }
- } else {
- stringBuffer.append(TEXT_214);
- stringBuffer.append(genClassifier.getSafeUncapName());
- stringBuffer.append(TEXT_215);
- stringBuffer.append(genClass.getLocalFeatureIndex(genFeature));
- stringBuffer.append(TEXT_216);
- for (Iterator k = featureAnnotation.getDetails().iterator(); k.hasNext();) { Map.Entry detail = (Map.Entry)k.next(); String key = Literals.toStringLiteral((String)detail.getKey(), genModel); String value = Literals.toStringLiteral((String)detail.getValue(), genModel);
- stringBuffer.append(TEXT_217);
- stringBuffer.append(key);
- stringBuffer.append(TEXT_218);
- stringBuffer.append(value);
- stringBuffer.append(k.hasNext() ? "," : "");
- stringBuffer.append(genModel.getNonNLS(key + value));
- }
- stringBuffer.append(TEXT_219);
- }
- }
- }
- }
- stringBuffer.append(TEXT_220);
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_221);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_222);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_223);
- if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_224);
- stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_225);
- stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName());
- stringBuffer.append(TEXT_226);
- stringBuffer.append(genModel.getNonNLS());
- stringBuffer.append(genModel.getNonNLS(2));
- stringBuffer.append(genModel.getNonNLS(3));
- stringBuffer.append(TEXT_227);
- } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
- if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_228);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_229);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_230);
- } else {
- stringBuffer.append(TEXT_231);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_232);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_233);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_234);
- }
- } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_235);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_236);
- stringBuffer.append(genModel.getImportedName("java.util.ArrayList"));
- stringBuffer.append(TEXT_237);
- stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_238);
- stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer"));
- stringBuffer.append(TEXT_239);
- if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_240);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_241);
- } else {
- stringBuffer.append(TEXT_242);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_243);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_244);
- }
- stringBuffer.append(TEXT_245);
- } else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_246);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_247);
- for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_248);
- if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_249);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_250);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_251);
- } else {
- stringBuffer.append(TEXT_252);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_253);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_254);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_255);
- }
- stringBuffer.append(TEXT_256);
- }
- stringBuffer.append(TEXT_257);
- } else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_258);
- stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_259);
- } else {
- stringBuffer.append(TEXT_260);
- stringBuffer.append(genDataType.getObjectInstanceClassName());
- stringBuffer.append(TEXT_261);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_262);
- }
- stringBuffer.append(TEXT_263);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_264);
- if (genDataType instanceof GenEnum) {
- stringBuffer.append(TEXT_265);
- } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType();
- if (genBaseType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_266);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_267);
- } else {
- stringBuffer.append(TEXT_268);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genBaseType.getGenPackage()));
- stringBuffer.append(TEXT_269);
- stringBuffer.append(genBaseType.getName());
- stringBuffer.append(TEXT_270);
- }
- } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType();
- stringBuffer.append(TEXT_271);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_272);
- stringBuffer.append(genModel.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_273);
- stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_274);
- stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer"));
- stringBuffer.append(TEXT_275);
- stringBuffer.append(genModel.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_276);
- if (genItemType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_277);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_278);
- } else {
- stringBuffer.append(TEXT_279);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genItemType.getGenPackage()));
- stringBuffer.append(TEXT_280);
- stringBuffer.append(genItemType.getName());
- stringBuffer.append(TEXT_281);
- }
- stringBuffer.append(TEXT_282);
- } else if (!genDataType.getMemberTypes().isEmpty()) {
- stringBuffer.append(TEXT_283);
- for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();
- stringBuffer.append(TEXT_284);
- stringBuffer.append(SDOGenUtil.getQualifiedTypeAccessor(genMemberType));
- stringBuffer.append(TEXT_285);
- if (genMemberType.getGenPackage() == genPackage) {
- stringBuffer.append(TEXT_286);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_287);
- } else {
- stringBuffer.append(TEXT_288);
- stringBuffer.append(SDOGenUtil.getFactoryImpl(genMemberType.getGenPackage()));
- stringBuffer.append(TEXT_289);
- stringBuffer.append(genMemberType.getName());
- stringBuffer.append(TEXT_290);
- }
- stringBuffer.append(TEXT_291);
- }
- stringBuffer.append(TEXT_292);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_293);
- } else if (genDataType.isArrayType()) {
- stringBuffer.append(TEXT_294);
- stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException"));
- stringBuffer.append(TEXT_295);
- } else {
- stringBuffer.append(TEXT_296);
- stringBuffer.append(genDataType.getClassifierID());
- stringBuffer.append(TEXT_297);
- }
- stringBuffer.append(TEXT_298);
- }
- }
- } else {
- for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();
- if (genClass.hasFactoryInterfaceCreateMethod()) {
- stringBuffer.append(TEXT_299);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_300);
- stringBuffer.append(genClass.getFormattedName());
- stringBuffer.append(TEXT_301);
- stringBuffer.append(genClass.getImportedInterfaceName());
- stringBuffer.append(TEXT_302);
- stringBuffer.append(genClass.getName());
- stringBuffer.append(TEXT_303);
- }
- }
- stringBuffer.append(TEXT_304);
- if (genPackage.isDataTypeConverters()) {
- for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();
- if (genDataType.isSerializable()) {
- stringBuffer.append(TEXT_305);
- stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_306);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_307);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_308);
- stringBuffer.append(genDataType.getFormattedName());
- stringBuffer.append(TEXT_309);
- stringBuffer.append(genDataType.getName());
- stringBuffer.append(TEXT_310);
- stringBuffer.append(genDataType.getImportedInstanceClassName());
- stringBuffer.append(TEXT_311);
- }
- }
- }
- }
- stringBuffer.append(TEXT_312);
- stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName());
- genModel.emitSortedImports();
- stringBuffer.append(TEXT_313);
- return stringBuffer.toString();
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.java
deleted file mode 100644
index 062580f4b8..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/apache/tuscany/sdo/generate/util/SDOGenUtil.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 org.apache.tuscany.sdo.generate.util;
-
-import java.util.Iterator;
-
-import org.apache.tuscany.sdo.model.ModelFactory;
-import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl;
-import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
-import org.eclipse.emf.codegen.ecore.genmodel.GenClassifier;
-import org.eclipse.emf.codegen.ecore.genmodel.GenDataType;
-import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
-import org.eclipse.emf.codegen.ecore.genmodel.GenFeature;
-import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
-import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
-import org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl;
-import org.eclipse.emf.codegen.ecore.genmodel.impl.Literals;
-import org.eclipse.emf.codegen.util.CodeGenUtil;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EcorePackage;
-
-import commonj.sdo.Type;
-
-public class SDOGenUtil {
-
- public static String getQualifiedTypeAccessor(GenClassifier genClassifier)
- {
- GenPackage genPackage = genClassifier.getGenPackage();
- return getFactoryImpl(genPackage) + ".get" + genClassifier.getClassifierAccessorName() + "()";
- }
-
- public static String getDependentFactoryArgumentList(GenPackage genPackage, boolean isFormalArguments)
- {
- StringBuffer result = new StringBuffer();
- for (Iterator iter = genPackage.getPackageInitializationDependencies().iterator(); iter.hasNext(); )
- {
- GenPackage dep = (GenPackage)iter.next();
- if (isFormalArguments)
- {
- result.append(dep.getImportedFactoryClassName());
- result.append(" ");
- }
- result.append(genPackage.getPackageInstanceVariable(dep));
- if (iter.hasNext()) result.append(", ");
- }
- return result.toString();
- }
-
- public static String getFactoryImpl(GenPackage genPackage)
- {
- return "((" + genPackage.getImportedFactoryClassName() + ")"
- + genPackage.getImportedFactoryInterfaceName() + ".INSTANCE)";
- }
-
- public static String getListKind(GenFeature genFeature, boolean suppressNotification )
- {
- boolean unsettable = genFeature.isUnsettable();
-
- if (suppressNotification)
- {
- return "ListKind.BASIC";
- }
- else if (genFeature.isEffectiveContains())
- {
- if (genFeature.isBidirectional())
- {
- if (genFeature.isResolveProxies())
- {
- if( unsettable )
- return "ListKind.CONTAINMENT_INVERSE_RESOLVING_UNSETTABLE";
- else
- return "ListKind.CONTAINMENT_INVERSE_RESOLVING";
- }
- else
- {
- if( unsettable )
- return "ListKind.CONTAINMENT_INVERSE_UNSETTABLE";
- else
- return "ListKind.CONTAINMENT_INVERSE";
- }
- }
- else
- {
- if (genFeature.isResolveProxies())
- {
- if( unsettable )
- return "ListKind.CONTAINMENT_RESOLVING_UNSETTABLE";
- else
- return "ListKind.CONTAINMENT_RESOLVING";
- }
- else
- {
- if( unsettable )
- return "ListKind.CONTAINMENT_UNSETTABLE";
- else
- return "ListKind.CONTAINMENT";
- }
- }
- }
- else if (genFeature.isReferenceType())
- {
- if (genFeature.isBidirectional())
- {
- GenFeature reverseFeature = genFeature.getReverse();
- if (genFeature.isResolveProxies())
- {
- if (reverseFeature.isListType())
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_MANYINVERSE_RESOLVING_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT_MANYINVERSE_RESOLVING";
- }
- else
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_INVERSE_RESOLVING_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT_INVERSE_RESOLVING";
- }
- }
- else
- {
- if (reverseFeature.isListType())
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_MANYINVERSE_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT_MANYINVERSE";
- }
- else
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_INVERSE_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT_INVERSE";
- }
- }
- }
- else
- {
- if (genFeature.isResolveProxies())
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_RESOLVING_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT_RESOLVING";
- }
- else
- {
- if( unsettable )
- return "ListKind.NONCONTAINMENT_UNSETTABLE";
- else
- return "ListKind.NONCONTAINMENT";
- }
- }
- }
- else
- { //datatype
- if (genFeature.isUnique())
- {
- if( unsettable )
- return "ListKind.DATATYPE_UNIQUE_UNSETTABLE";
- else
- return "ListKind.DATATYPE_UNIQUE";
- }
- else
- {
- if( unsettable )
- return "ListKind.DATATYPE_UNSETTABLE";
- else
- return "ListKind.DATATYPE";
- }
- }
- }
-
- public static boolean hasChangeSummaryProperty(GenClass genClass)
- {
- return getChangeSummaryProperty(genClass) != null;
- }
-
- public static String getQualifiedInternalPropertyID(GenFeature genFeature)
- {
- return genFeature.getGenClass().getImportedClassName() + ".INTERNAL_" + genFeature.getUpperName();
- }
-
- public static String getChangeSummaryProperty(GenClass genClass)
- {
- Type csType = ((ModelFactoryImpl)ModelFactory.INSTANCE).getChangeSummaryType();
- for (Iterator i = genClass.getGenFeatures().iterator(); i.hasNext(); )
- {
- GenFeature genFeature = (GenFeature)i.next();
- EClassifier eClassifier = genFeature.getEcoreFeature().getEType();
- if (eClassifier instanceof Type)
- {
- Type type = (Type)eClassifier;
- //if (csType == type)// this doesn't work when generating sdoModel.xsd
- if (csType.getName().equals(type.getName()) && csType.getURI().equals(type.getURI()))
- {
- return genFeature.getUpperName();
- }
- }
- }
- return null;
- }
-
- public static String printArguments(GenPackage genPackage, GenModel genModel) {
- StringBuffer result = new StringBuffer();
- if(!CodeGenUtil.capName(genPackage.getNSName()).equals(genPackage.getPrefix())) {
- result.append(" -prefix " + genPackage.getPrefix());
- }
- if (genModel.isSuppressInterfaces()) {
- result.append(" -noInterfaces");
- }
- if ( genModel.getFeatureDelegation() == GenDelegationKind.VIRTUAL_LITERAL) {
- result.append(" -sparsePattern");
- }
- if ("org.apache.tuscany.sdo.impl.StoreDataObjectImpl".equals(genModel.getRootExtendsClass())) {
- result.append(" -storePattern");
- }
- if (genModel.isSuppressNotification()) {
- result.append(" -noNotification");
- }
- if (genModel.isSuppressContainment()) {
- result.append(" -noContainment");
- }
- if (genModel.isArrayAccessors()) {
- result.append(" -arrayAccessors");
- }
- if (genModel.isSuppressUnsettable()) {
- result.append(" -noUnsettable");
- }
-
- return result.toString();
- }
-
- /*
- * EMF doesn't do what we want in all cases, so filter the cases we need to handle
- * and drop through to EMF for all others.
- */
- public static String getStaticDefaultValue(GenFeature genFeature) {
- String result = "null";
- boolean defaultFound = false;
-
- String defaultString = genFeature.getEcoreFeature()
- .getDefaultValueLiteral();
- EClassifier eType = genFeature.getEcoreFeature().getEType();
- if (eType instanceof EDataType) {
- GenPackage genPackage = ((GenFeatureImpl) genFeature)
- .findGenPackage(genFeature.getEcoreFeature().getEType().getEPackage());
- GenDataType gdt = null;
- if (genPackage != null) {
- for (Iterator iter = genPackage.getGenDataTypes().iterator(); iter
- .hasNext()
- && gdt == null;) {
- GenDataType genDataType = (GenDataType) iter.next();
- if (eType.getName().equals(genDataType.getEcoreDataType().getName())) {
- gdt = genDataType;
- }
- }
- }
- EClassifier eDataType = gdt.getEcoreDataType();
- if (eDataType.getEPackage() != EcorePackage.eINSTANCE
- && defaultString != null) {
- boolean replaced = false;
- for (Iterator i = EcorePackage.eINSTANCE.getEClassifiers().iterator(); i
- .hasNext();) {
- EClassifier eClassifier = (EClassifier) i.next();
- if (eClassifier instanceof EDataType
- && eClassifier.getInstanceClassName().equals(
- eDataType.getInstanceClassName())
- && ((EDataType) eClassifier).isSerializable()
- && eClassifier != EcorePackage.eINSTANCE.getEDate()) {
- replaced = true;
- eDataType = eClassifier;
- break;
- }
- }
- if (!replaced) {
- result = "((" + genPackage.getFactoryClassName() + ")"
- + genPackage.getFactoryInterfaceName() + "."
- + genPackage.getFactoryInstanceName() + ")." + "create"
- + gdt.getName() + "FromString("
- + Literals.toLiteral(defaultString) + ")";
-
-
- if (gdt.isPrimitiveType())
- {
- result = "((" + gdt.getObjectInstanceClassName() + ")" + result
- + ")." + gdt.getPrimitiveValueFunction() + "()";
- } else if (!gdt.isObjectType()) {
- result = "(" + gdt.getImportedInstanceClassName() + ")" + result;
- }
-
- defaultFound = true;
- }
- }
- }
-
- if (!defaultFound) {
- // the input didn't match any special case that we want to handle differently
- // from EMF's default approach, so go ahead and get EMF to do it
- result = genFeature.getStaticDefaultValue();
- }
-
- return result;
- }
-}
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java b/branches/sdo-1.1.1-incubating/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java
deleted file mode 100644
index 1c1f37682f..0000000000
--- a/branches/sdo-1.1.1-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.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER b/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index a65af91c5a..0000000000
--- a/branches/sdo-1.1.1-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.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt b/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 9a90d375bc..0000000000
--- a/branches/sdo-1.1.1-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.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF b/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 8bb7dea1fe..0000000000
--- a/branches/sdo-1.1.1-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.1.1-incubating/tools/src/main/resources/META-INF/NOTICE b/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 9f9572a167..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Tuscany
-Copyright (c) 2005 - 2008 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt b/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt
deleted file mode 100644
index 3394b161cf..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/main/resources/META-INF/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Apache Tuscany 1.1.1-incubating-SNAPSHOT build (May 2008)
-=========================================================
-
-http://incubator.apache.org/tuscany/
-
-Support
--------
-
-Any problem with this release can be reported to the Tuscany mailing list
-or in the JIRA issue tracker.
-
-Mailing list subscription:
- tuscany-dev-subscribe@ws.apache.org
-
-Jira:
- http://issues.apache.org/jira/browse/Tuscany
-
-
-Thank you for using Tuscany!
-
-
-The Tuscany Team.
-
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RCType.java
deleted file mode 100644
index 29a558b5a2..0000000000
--- a/branches/sdo-1.1.1-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;
-
-/**
- *
- * A representation of the model object 'RC Type'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface RCType extends Serializable
-{
- /**
- * Returns the value of the 'Group' attribute list.
- *
- *
- * If the meaning of the 'Group' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group' attribute list.
- * @generated
- */
- Sequence getGroup();
-
- /**
- * Returns the value of the 'S' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'S' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'S' attribute list.
- * @generated
- */
- List getS();
-
- /**
- * Returns the value of the 'I' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'I' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'I' attribute list.
- * @generated
- */
- List getI();
-
- /**
- * Returns the value of the 'F' attribute list.
- * The list contents are of type {@link java.lang.Float}.
- *
- *
- * If the meaning of the 'F' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'F' attribute list.
- * @generated
- */
- List getF();
-
-} // RCType
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/RepchoiceFactory.java
deleted file mode 100644
index 9a7c3033a5..0000000000
--- a/branches/sdo-1.1.1-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;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface RepchoiceFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- RepchoiceFactory INSTANCE = com.example.repchoice.impl.RepchoiceFactoryImpl.init();
-
- /**
- * Returns a new object of class 'RC Type'.
- *
- *
- * @return a new object of class 'RC Type'.
- * @generated
- */
- RCType createRCType();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @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.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.java
deleted file mode 100644
index 322dc5a8e0..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/repchoice/impl/RCTypeImpl.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.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;
-
-/**
- *
- * An implementation of the model object 'RC Type'.
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface MixedQuote extends Serializable
-{
- /**
- * Returns the value of the 'Mixed' attribute list.
- *
- *
- * If the meaning of the 'Mixed' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Mixed' attribute list.
- * @generated
- */
- Sequence getMixed();
-
- /**
- * Returns the value of the 'Symbol' attribute.
- *
- *
- * If the meaning of the 'Symbol' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Symbol' attribute.
- * @see #isSetSymbol()
- * @see #unsetSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- String getSymbol();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getSymbol Symbol}' attribute.
- *
- *
- * @param value the new value of the 'Symbol' attribute.
- * @see #isSetSymbol()
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @generated
- */
- void setSymbol(String value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getSymbol Symbol}' attribute.
- *
- *
- * @see #isSetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- void unsetSymbol();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getSymbol Symbol}' attribute is set.
- *
- *
- * @return whether the value of the 'Symbol' attribute is set.
- * @see #unsetSymbol()
- * @see #getSymbol()
- * @see #setSymbol(String)
- * @generated
- */
- boolean isSetSymbol();
-
- /**
- * Returns the value of the 'Company Name' attribute.
- *
- *
- * If the meaning of the 'Company Name' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Company Name' attribute.
- * @see #isSetCompanyName()
- * @see #unsetCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- String getCompanyName();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getCompanyName Company Name}' attribute.
- *
- *
- * @param value the new value of the 'Company Name' attribute.
- * @see #isSetCompanyName()
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @generated
- */
- void setCompanyName(String value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getCompanyName Company Name}' attribute.
- *
- *
- * @see #isSetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- void unsetCompanyName();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getCompanyName Company Name}' attribute is set.
- *
- *
- * @return whether the value of the 'Company Name' attribute is set.
- * @see #unsetCompanyName()
- * @see #getCompanyName()
- * @see #setCompanyName(String)
- * @generated
- */
- boolean isSetCompanyName();
-
- /**
- * Returns the value of the 'Price' attribute.
- *
- *
- * If the meaning of the 'Price' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Price' attribute.
- * @see #isSetPrice()
- * @see #unsetPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- BigDecimal getPrice();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getPrice Price}' attribute.
- *
- *
- * @param value the new value of the 'Price' attribute.
- * @see #isSetPrice()
- * @see #unsetPrice()
- * @see #getPrice()
- * @generated
- */
- void setPrice(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getPrice Price}' attribute.
- *
- *
- * @see #isSetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- void unsetPrice();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getPrice Price}' attribute is set.
- *
- *
- * @return whether the value of the 'Price' attribute is set.
- * @see #unsetPrice()
- * @see #getPrice()
- * @see #setPrice(BigDecimal)
- * @generated
- */
- boolean isSetPrice();
-
- /**
- * Returns the value of the 'Open1' attribute.
- *
- *
- * If the meaning of the 'Open1' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Open1' attribute.
- * @see #isSetOpen1()
- * @see #unsetOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- BigDecimal getOpen1();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getOpen1 Open1}' attribute.
- *
- *
- * @param value the new value of the 'Open1' attribute.
- * @see #isSetOpen1()
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @generated
- */
- void setOpen1(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getOpen1 Open1}' attribute.
- *
- *
- * @see #isSetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- void unsetOpen1();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getOpen1 Open1}' attribute is set.
- *
- *
- * @return whether the value of the 'Open1' attribute is set.
- * @see #unsetOpen1()
- * @see #getOpen1()
- * @see #setOpen1(BigDecimal)
- * @generated
- */
- boolean isSetOpen1();
-
- /**
- * Returns the value of the 'High' attribute.
- *
- *
- * If the meaning of the 'High' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'High' attribute.
- * @see #isSetHigh()
- * @see #unsetHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- BigDecimal getHigh();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getHigh High}' attribute.
- *
- *
- * @param value the new value of the 'High' attribute.
- * @see #isSetHigh()
- * @see #unsetHigh()
- * @see #getHigh()
- * @generated
- */
- void setHigh(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getHigh High}' attribute.
- *
- *
- * @see #isSetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- void unsetHigh();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getHigh High}' attribute is set.
- *
- *
- * @return whether the value of the 'High' attribute is set.
- * @see #unsetHigh()
- * @see #getHigh()
- * @see #setHigh(BigDecimal)
- * @generated
- */
- boolean isSetHigh();
-
- /**
- * Returns the value of the 'Low' attribute.
- *
- *
- * If the meaning of the 'Low' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Low' attribute.
- * @see #isSetLow()
- * @see #unsetLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- BigDecimal getLow();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getLow Low}' attribute.
- *
- *
- * @param value the new value of the 'Low' attribute.
- * @see #isSetLow()
- * @see #unsetLow()
- * @see #getLow()
- * @generated
- */
- void setLow(BigDecimal value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getLow Low}' attribute.
- *
- *
- * @see #isSetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- void unsetLow();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getLow Low}' attribute is set.
- *
- *
- * @return whether the value of the 'Low' attribute is set.
- * @see #unsetLow()
- * @see #getLow()
- * @see #setLow(BigDecimal)
- * @generated
- */
- boolean isSetLow();
-
- /**
- * Returns the value of the 'Volume' attribute.
- *
- *
- * If the meaning of the 'Volume' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Volume' attribute.
- * @see #isSetVolume()
- * @see #unsetVolume()
- * @see #setVolume(double)
- * @generated
- */
- double getVolume();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute.
- *
- *
- * @param value the new value of the 'Volume' attribute.
- * @see #isSetVolume()
- * @see #unsetVolume()
- * @see #getVolume()
- * @generated
- */
- void setVolume(double value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute.
- *
- *
- * @see #isSetVolume()
- * @see #getVolume()
- * @see #setVolume(double)
- * @generated
- */
- void unsetVolume();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getVolume Volume}' attribute is set.
- *
- *
- * @return whether the value of the 'Volume' attribute is set.
- * @see #unsetVolume()
- * @see #getVolume()
- * @see #setVolume(double)
- * @generated
- */
- boolean isSetVolume();
-
- /**
- * Returns the value of the 'Change1' attribute.
- *
- *
- * If the meaning of the 'Change1' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Change1' attribute.
- * @see #isSetChange1()
- * @see #unsetChange1()
- * @see #setChange1(double)
- * @generated
- */
- double getChange1();
-
- /**
- * Sets the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute.
- *
- *
- * @param value the new value of the 'Change1' attribute.
- * @see #isSetChange1()
- * @see #unsetChange1()
- * @see #getChange1()
- * @generated
- */
- void setChange1(double value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute.
- *
- *
- * @see #isSetChange1()
- * @see #getChange1()
- * @see #setChange1(double)
- * @generated
- */
- void unsetChange1();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.MixedQuote#getChange1 Change1}' attribute is set.
- *
- *
- * @return whether the value of the 'Change1' attribute is set.
- * @see #unsetChange1()
- * @see #getChange1()
- * @see #setChange1(double)
- * @generated
- */
- boolean isSetChange1();
-
- /**
- * Returns the value of the 'Quotes' containment reference list.
- * The list contents are of type {@link com.example.sequences.MixedQuote}.
- *
- *
- * If the meaning of the 'Quotes' containment reference list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Quotes' containment reference list.
- * @generated
- */
- List getQuotes();
-
-} // MixedQuote
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java
deleted file mode 100644
index dba64b0487..0000000000
--- a/branches/sdo-1.1.1-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;
-
-/**
- *
- * A representation of the model object 'Mixed Repeating Choice'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface MixedRepeatingChoice extends Serializable
-{
- /**
- * Returns the value of the 'Mixed' attribute list.
- *
- *
- * If the meaning of the 'Mixed' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Mixed' attribute list.
- * @generated
- */
- Sequence getMixed();
-
- /**
- * Returns the value of the 'Group' attribute list.
- *
- *
- * If the meaning of the 'Group' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group' attribute list.
- * @generated
- */
- Sequence getGroup();
-
- /**
- * Returns the value of the 'A' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'A' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'A' attribute list.
- * @generated
- */
- List getA();
-
- /**
- * Returns the value of the 'B' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'B' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'B' attribute list.
- * @generated
- */
- List getB();
-
-} // MixedRepeatingChoice
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/RepeatingChoice.java
deleted file mode 100644
index 3f0b0839f2..0000000000
--- a/branches/sdo-1.1.1-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;
-
-/**
- *
- * A representation of the model object 'Repeating Choice'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface RepeatingChoice extends Serializable
-{
- /**
- * Returns the value of the 'Group' attribute list.
- *
- *
- * If the meaning of the 'Group' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group' attribute list.
- * @generated
- */
- Sequence getGroup();
-
- /**
- * Returns the value of the 'A' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'A' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'A' attribute list.
- * @generated
- */
- List getA();
-
- /**
- * Returns the value of the 'B' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'B' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'B' attribute list.
- * @generated
- */
- List getB();
-
-} // RepeatingChoice
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/SequencesFactory.java
deleted file mode 100644
index 900b51ddc3..0000000000
--- a/branches/sdo-1.1.1-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;
-
-
-/**
- *
- * The Factory for the model.
- * It provides a create method for each non-abstract class of the model.
- *
- * @generated
- */
-public interface SequencesFactory
-{
-
- /**
- * The singleton instance of the factory.
- *
- *
- * @generated
- */
- SequencesFactory INSTANCE = com.example.sequences.impl.SequencesFactoryImpl.init();
-
- /**
- * Returns a new object of class 'Mixed Quote'.
- *
- *
- * @return a new object of class 'Mixed Quote'.
- * @generated
- */
- MixedQuote createMixedQuote();
-
- /**
- * Returns a new object of class 'Mixed Repeating Choice'.
- *
- *
- * @return a new object of class 'Mixed Repeating Choice'.
- * @generated
- */
- MixedRepeatingChoice createMixedRepeatingChoice();
-
- /**
- * Returns a new object of class 'Repeating Choice'.
- *
- *
- * @return a new object of class 'Repeating Choice'.
- * @generated
- */
- RepeatingChoice createRepeatingChoice();
-
- /**
- * Returns a new object of class 'Two RCs'.
- *
- *
- * @return a new object of class 'Two RCs'.
- * @generated
- */
- TwoRCs createTwoRCs();
-
- /**
- * Returns a new object of class 'Two RCs Mixed'.
- *
- *
- * @return a new object of class 'Two RCs Mixed'.
- * @generated
- */
- TwoRCsMixed createTwoRCsMixed();
-
- /**
- * Registers the types supported by this Factory within the supplied scope.argument
- *
- *
- * @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.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCs.java
deleted file mode 100644
index c6e54e6598..0000000000
--- a/branches/sdo-1.1.1-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;
-
-/**
- *
- * A representation of the model object 'Two RCs'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface TwoRCs extends Serializable
-{
- /**
- * Returns the value of the 'Group' attribute list.
- *
- *
- * If the meaning of the 'Group' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group' attribute list.
- * @generated
- */
- Sequence getGroup();
-
- /**
- * Returns the value of the 'A' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'A' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'A' attribute list.
- * @generated
- */
- List getA();
-
- /**
- * Returns the value of the 'B' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'B' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'B' attribute list.
- * @generated
- */
- List getB();
-
- /**
- * Returns the value of the 'Split' attribute.
- *
- *
- * If the meaning of the 'Split' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Split' attribute.
- * @see #isSetSplit()
- * @see #unsetSplit()
- * @see #setSplit(String)
- * @generated
- */
- String getSplit();
-
- /**
- * Sets the value of the '{@link com.example.sequences.TwoRCs#getSplit Split}' attribute.
- *
- *
- * @param value the new value of the 'Split' attribute.
- * @see #isSetSplit()
- * @see #unsetSplit()
- * @see #getSplit()
- * @generated
- */
- void setSplit(String value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.TwoRCs#getSplit Split}' attribute.
- *
- *
- * @see #isSetSplit()
- * @see #getSplit()
- * @see #setSplit(String)
- * @generated
- */
- void unsetSplit();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.TwoRCs#getSplit Split}' attribute is set.
- *
- *
- * @return whether the value of the 'Split' attribute is set.
- * @see #unsetSplit()
- * @see #getSplit()
- * @see #setSplit(String)
- * @generated
- */
- boolean isSetSplit();
-
- /**
- * Returns the value of the 'Group1' attribute list.
- *
- *
- * If the meaning of the 'Group1' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group1' attribute list.
- * @generated
- */
- Sequence getGroup1();
-
- /**
- * Returns the value of the 'Y' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'Y' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Y' attribute list.
- * @generated
- */
- List getY();
-
- /**
- * Returns the value of the 'Z' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'Z' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Z' attribute list.
- * @generated
- */
- List getZ();
-
-} // TwoRCs
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/TwoRCsMixed.java
deleted file mode 100644
index 90d5f942b6..0000000000
--- a/branches/sdo-1.1.1-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;
-
-/**
- *
- * A representation of the model object 'Two RCs Mixed'.
- *
- *
- *
- *
- *
- * @extends Serializable
- * @generated
- */
-public interface TwoRCsMixed extends Serializable
-{
- /**
- * Returns the value of the 'Mixed' attribute list.
- *
- *
- * If the meaning of the 'Mixed' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Mixed' attribute list.
- * @generated
- */
- Sequence getMixed();
-
- /**
- * Returns the value of the 'Group' attribute list.
- *
- *
- * If the meaning of the 'Group' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group' attribute list.
- * @generated
- */
- Sequence getGroup();
-
- /**
- * Returns the value of the 'A' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'A' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'A' attribute list.
- * @generated
- */
- List getA();
-
- /**
- * Returns the value of the 'B' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'B' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'B' attribute list.
- * @generated
- */
- List getB();
-
- /**
- * Returns the value of the 'Split' attribute.
- *
- *
- * If the meaning of the 'Split' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Split' attribute.
- * @see #isSetSplit()
- * @see #unsetSplit()
- * @see #setSplit(String)
- * @generated
- */
- String getSplit();
-
- /**
- * Sets the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit Split}' attribute.
- *
- *
- * @param value the new value of the 'Split' attribute.
- * @see #isSetSplit()
- * @see #unsetSplit()
- * @see #getSplit()
- * @generated
- */
- void setSplit(String value);
-
- /**
- * Unsets the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit Split}' attribute.
- *
- *
- * @see #isSetSplit()
- * @see #getSplit()
- * @see #setSplit(String)
- * @generated
- */
- void unsetSplit();
-
- /**
- * Returns whether the value of the '{@link com.example.sequences.TwoRCsMixed#getSplit Split}' attribute is set.
- *
- *
- * @return whether the value of the 'Split' attribute is set.
- * @see #unsetSplit()
- * @see #getSplit()
- * @see #setSplit(String)
- * @generated
- */
- boolean isSetSplit();
-
- /**
- * Returns the value of the 'Group1' attribute list.
- *
- *
- * If the meaning of the 'Group1' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Group1' attribute list.
- * @generated
- */
- Sequence getGroup1();
-
- /**
- * Returns the value of the 'Y' attribute list.
- * The list contents are of type {@link java.lang.String}.
- *
- *
- * If the meaning of the 'Y' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Y' attribute list.
- * @generated
- */
- List getY();
-
- /**
- * Returns the value of the 'Z' attribute list.
- * The list contents are of type {@link java.lang.Integer}.
- *
- *
- * If the meaning of the 'Z' attribute list isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Z' attribute list.
- * @generated
- */
- List getZ();
-
-} // TwoRCsMixed
diff --git a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java b/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
deleted file mode 100644
index 96fe832ef3..0000000000
--- a/branches/sdo-1.1.1-incubating/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java
+++ /dev/null
@@ -1,766 +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;
-
-/**
- *
- * An implementation of the model object 'Mixed Quote'.
- *
- *
-<%}%>
- *
- *
- * @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) {%>
- /**
- *
- *
- * @generated
- */
- <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genModel.getDriverNumber() != null) {%>
- /**
- *
- *
- * @generated
- */
- public static final <%=genModel.getImportedName("java.lang.String")%> mofDriverNumber = "<%=genModel.getDriverNumber()%>";<%=genModel.getNonNLS()%>
-
-<%}%>
-<%if (isImplementation && genClass.isJavaIOSerializable()) {%>
- /**
- *
- *
- * @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.
- *
- *
- * @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.
- *
- *
- * @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.
- *
- *
- * @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 '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>.
- *
- *
- * @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.
- *
- *
- * @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()%>() <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>.
- *
- *
- * @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()%>() <%=genFeature.getFormattedName()%>}' array accessor.
- *
- *
- * @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()%>() <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>.
- *
- *
- * @see #<%=genFeature.getGetAccessor()%>()
- * @generated
- * @ordered
- */
- protected static final <%=genFeature.getImportedType()%> <%=genFeature.getUpperName()%>_DEFAULT_ = <%=SDOGenUtil.getStaticDefaultValue(genFeature)%>;<%=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.
- *
- *
- * @generated
- * @ordered
- */
- protected int <%=genClass.getFlagsField(genFeature)%> = 0;
-
- <%}%>
- /**
- * The flag representing the value of the '{@link #<%=genFeature.getGetAccessor()%>() <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>.
- *
- *
- * @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()%>() <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>.
- *
- *
- * @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.
- *
- *
- * @generated
- * @ordered
- */
- protected int <%=genClass.getESetFlagsField(genFeature)%> = 0;
-
- <%}%>
- /**
- * The flag representing whether the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
- *
- *
- * @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.
- *
- *
- * @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 %>
- /**
- *
- *
- * @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)%>);
- <%}%>
- }
-
- /**
- *
- *
- * @generated
- */
- public <%=genModel.getImportedName("commonj.sdo.Type")%> getStaticType()
- {
- return ((<%=genPackage.getImportedFactoryClassName()%>)<%=genPackage.getImportedFactoryInterfaceName()%>.INSTANCE).get<%=genClass.getClassifierAccessorName()%>();
- }
-
- /**
- *
- *
- * @generated
- */
- public int getStaticPropertyCount()
- {
- return INTERNAL_PROPERTY_COUNT;
- }
-
-<%}%>
-<%/*%>
-<% * 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()) {%>
- /**
- *
- *
- * @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();
- }
-
- <%}%>
- /**
- *
- *
- * @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);
- }
- <%}%>
- /**
- *
- *
- * @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();
- <%}%>
- }
-
- <%}%>
- /**
- *
- *
- * @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()%>);
- }
-
- <%}%>
- /**
- *
- *
- * @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 '<%=genFeature.getFormattedName()%>' <%=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 <%=genFeature.getDefaultValue()%>.
- <%}%>
- <%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()%> <%=reverseGenFeature.getFormattedName()%>}'.
- <%}%>
- <%}%>
- *
- <%if (!genFeature.hasDocumentation()) {%>
- *
- * If the meaning of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> isn't clear,
- * there really should be more of a description here...
- *