From ece4fd35da7b7fc76264776f81705e6b5b52d3e0 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:11:48 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835140 13f79535-47bb-0310-9956-ffa450edef68 --- branches/java-post-M1/sdo/impl/model/SDO.ecore | 962 --- branches/java-post-M1/sdo/impl/model/SDO.genmodel | 564 -- branches/java-post-M1/sdo/impl/model/SDO.mdl | 7670 -------------------- branches/java-post-M1/sdo/impl/pom.xml | 110 - .../org/apache/tuscany/sdo/AnyTypeDataObject.java | 34 - .../apache/tuscany/sdo/SDOExtendedMetaData.java | 35 - .../java/org/apache/tuscany/sdo/SDOFactory.java | 173 - .../java/org/apache/tuscany/sdo/SDOPackage.java | 1599 ---- .../org/apache/tuscany/sdo/SDOTypeVisitor.java | 46 - .../tuscany/sdo/SimpleAnyTypeDataObject.java | 32 - .../sdo/codegen/BytecodeInterfaceGenerator.java | 95 - .../tuscany/sdo/codegen/GenerationException.java | 39 - .../sdo/codegen/JavaInterfaceGenerator.java | 176 - .../sdo/codegen/NoJavaImplementationException.java | 58 - .../apache/tuscany/sdo/helper/CopyHelperImpl.java | 51 - .../apache/tuscany/sdo/helper/DataFactoryImpl.java | 62 - .../apache/tuscany/sdo/helper/DataHelperImpl.java | 310 - .../tuscany/sdo/helper/EqualityHelperImpl.java | 67 - .../tuscany/sdo/helper/HelperProviderImpl.java | 212 - .../sdo/helper/SDOExtendedMetaDataImpl.java | 96 - .../tuscany/sdo/helper/SDOXSDEcoreBuilder.java | 434 -- .../apache/tuscany/sdo/helper/TypeHelperImpl.java | 215 - .../apache/tuscany/sdo/helper/XMLDocumentImpl.java | 533 -- .../apache/tuscany/sdo/helper/XMLHelperImpl.java | 116 - .../apache/tuscany/sdo/helper/XMLStreamHelper.java | 89 - .../tuscany/sdo/helper/XMLStreamHelperImpl.java | 126 - .../apache/tuscany/sdo/helper/XSDHelperImpl.java | 218 - .../tuscany/sdo/impl/AnyTypeDataObjectImpl.java | 296 - .../org/apache/tuscany/sdo/impl/AttributeImpl.java | 732 -- .../apache/tuscany/sdo/impl/ChangeSummaryImpl.java | 679 -- .../tuscany/sdo/impl/ChangeSummarySettingImpl.java | 110 - .../org/apache/tuscany/sdo/impl/ClassImpl.java | 773 -- .../org/apache/tuscany/sdo/impl/DataGraphImpl.java | 821 --- .../apache/tuscany/sdo/impl/DataObjectBase.java | 238 - .../apache/tuscany/sdo/impl/DataObjectImpl.java | 1508 ---- .../org/apache/tuscany/sdo/impl/DataTypeImpl.java | 750 -- .../tuscany/sdo/impl/DynamicDataObjectImpl.java | 196 - .../sdo/impl/DynamicStoreDataObjectImpl.java | 88 - .../java/org/apache/tuscany/sdo/impl/EnumImpl.java | 170 - .../org/apache/tuscany/sdo/impl/FactoryBase.java | 214 - .../org/apache/tuscany/sdo/impl/ReferenceImpl.java | 698 -- .../apache/tuscany/sdo/impl/SDOFactoryImpl.java | 325 - .../apache/tuscany/sdo/impl/SDOPackageImpl.java | 2133 ------ .../sdo/impl/SimpleAnyTypeDataObjectImpl.java | 330 - .../tuscany/sdo/impl/StoreDataObjectImpl.java | 311 - .../tuscany/sdo/model/BaseDataGraphType.java | 125 - .../tuscany/sdo/model/ChangeSummaryType.java | 152 - .../apache/tuscany/sdo/model/DataGraphType.java | 50 - .../org/apache/tuscany/sdo/model/DataObject.java | 30 - .../org/apache/tuscany/sdo/model/ModelFactory.java | 100 - .../org/apache/tuscany/sdo/model/ModelPackage.java | 141 - .../org/apache/tuscany/sdo/model/ModelsType.java | 56 - .../org/apache/tuscany/sdo/model/Property.java | 342 - .../org/apache/tuscany/sdo/model/TextType.java | 51 - .../java/org/apache/tuscany/sdo/model/Type.java | 371 - .../java/org/apache/tuscany/sdo/model/Types.java | 53 - .../java/org/apache/tuscany/sdo/model/XSDType.java | 56 - .../sdo/model/impl/BaseDataGraphTypeImpl.java | 408 -- .../sdo/model/impl/ChangeSummaryTypeImpl.java | 396 - .../tuscany/sdo/model/impl/DataGraphTypeImpl.java | 187 - .../tuscany/sdo/model/impl/DataObjectImpl.java | 54 - .../tuscany/sdo/model/impl/ModelFactoryImpl.java | 1095 --- .../tuscany/sdo/model/impl/ModelPackageImpl.java | 4331 ----------- .../tuscany/sdo/model/impl/ModelsTypeImpl.java | 189 - .../tuscany/sdo/model/impl/PropertyImpl.java | 801 -- .../tuscany/sdo/model/impl/TextTypeImpl.java | 170 - .../apache/tuscany/sdo/model/impl/TypeImpl.java | 851 --- .../apache/tuscany/sdo/model/impl/TypesImpl.java | 179 - .../apache/tuscany/sdo/model/impl/XSDTypeImpl.java | 189 - .../apache/tuscany/sdo/model/java/JavaFactory.java | 46 - .../apache/tuscany/sdo/model/java/JavaInfo.java | 60 - .../sdo/model/java/impl/JavaFactoryImpl.java | 361 - .../tuscany/sdo/model/java/impl/JavaInfoImpl.java | 185 - .../sdo/model/java/impl/JavaPackageImpl.java | 1149 --- .../org/apache/tuscany/sdo/util/BasicSequence.java | 134 - .../sdo/util/DataGraphResourceFactoryImpl.java | 691 -- .../apache/tuscany/sdo/util/DataObjectUtil.java | 2669 ------- .../java/org/apache/tuscany/sdo/util/SDOUtil.java | 595 -- .../apache/tuscany/sdo/util/StAX2SAXAdapter.java | 247 - .../tuscany/sdo/util/metadata/JavaMetaData.java | 85 - .../tuscany/sdo/util/metadata/MetadataFactory.java | 73 - .../sdo/util/metadata/SDOMetaDataGroup.java | 86 - .../tuscany/sdo/util/metadata/TypeMetaData.java | 60 - .../tuscany/sdo/util/metadata/XSDMetaData.java | 60 - .../sdo/util/metadata/impl/JavaMetaDataImpl.java | 241 - .../util/metadata/impl/MetadataFactoryImpl.java | 174 - .../util/metadata/impl/MetadataPackageImpl.java | 1015 --- .../util/metadata/impl/SDOMetaDataGroupImpl.java | 323 - .../sdo/util/metadata/impl/TypeMetaDataImpl.java | 185 - .../sdo/util/metadata/impl/XSDMetaDataImpl.java | 185 - .../util/resource/DataObjectXMLStreamReader.java | 1500 ---- .../util/resource/SDOXMLResourceFactoryImpl.java | 44 - .../sdo/util/resource/SDOXMLResourceImpl.java | 181 - .../sdo/util/resource/XMLDocumentStreamReader.java | 426 -- .../sdo/util/resource/XMLFragmentStreamReader.java | 34 - .../sdo/util/resource/XMLStreamSerializer.java | 258 - .../impl/src/main/resources/META-INF/LICENSE.txt | 1277 ---- .../impl/src/main/resources/META-INF/MANIFEST.MF | 25 - .../sdo/impl/src/main/resources/META-INF/NOTICE | 18 - .../impl/src/main/resources/META-INF/README.txt | 35 - .../services/commonj.sdo.impl.HelperProvider | 1 - .../sdo/impl/src/main/resources/sdo-metadata.xsd | 42 - .../java/org/apache/tuscany/sdo/codegen/Bar1.java | 23 - .../java/org/apache/tuscany/sdo/codegen/Bar2.java | 23 - .../BytecodeInterfaceGeneratorTestCase.java | 164 - .../java/org/apache/tuscany/sdo/codegen/Foo.java | 23 - .../codegen/JavaInterfaceGeneratorTestCase.java | 126 - .../apache/tuscany/sdo/codegen/MockProperty.java | 75 - .../org/apache/tuscany/sdo/codegen/MockType.java | 93 - .../tuscany/sdo/test/ChangeSummaryTestCase.java | 89 - .../tuscany/sdo/test/DataTypeBaseTypeTestCase.java | 65 - .../tuscany/sdo/test/DefineTypeTestCase.java | 632 -- .../apache/tuscany/sdo/test/MixedTypeTestCase.java | 86 - .../apache/tuscany/sdo/test/OpenTypeTestCase.java | 82 - .../tuscany/sdo/test/SimpleCopyTestCase.java | 68 - .../tuscany/sdo/test/SimpleDynamicTestCase.java | 78 - .../tuscany/sdo/test/SimpleEqualityTestCase.java | 60 - .../tuscany/sdo/test/SubstitutionValues.java | 24 - .../java/org/apache/tuscany/sdo/test/TestUtil.java | 282 - .../apache/tuscany/sdo/test/TypeRoundTripTest.java | 161 - .../tuscany/sdo/test/XMLDocumentTestCase.java | 107 - .../tuscany/sdo/test/XMLStreamHelperTestCase.java | 125 - .../org/apache/tuscany/sdo/test/XPathTestCase.java | 125 - .../apache/tuscany/sdo/test/XSDHelperTestCase.java | 61 - .../impl/src/test/resources/SubstitutionValues.xsd | 12 - .../XMLDocumentNoNamespaceSchemaLocation.xsd | 28 - .../test/resources/XMLDocumentSchemaLocation.xsd | 32 - .../src/test/resources/XMLDocumentTestCase.xml | 14 - .../sdo/impl/src/test/resources/customer1.xml | 8 - .../sdo/impl/src/test/resources/customer2.xml | 8 - .../sdo/impl/src/test/resources/datatype.xsd | 31 - .../sdo/impl/src/test/resources/foo-ext.xml | 9 - .../sdo/impl/src/test/resources/foo-ext.xsd | 41 - .../sdo/impl/src/test/resources/foo.xsd | 229 - .../sdo/impl/src/test/resources/mixed.xml | 9 - .../sdo/impl/src/test/resources/mixed.xsd | 38 - .../sdo/impl/src/test/resources/mixed2.xml | 12 - .../sdo/impl/src/test/resources/mixedopen.xml | 13 - .../sdo/impl/src/test/resources/names.xsd | 30 - .../sdo/impl/src/test/resources/open.xml | 8 - .../sdo/impl/src/test/resources/open.xsd | 41 - .../sdo/impl/src/test/resources/open2.xml | 9 - .../sdo/impl/src/test/resources/quote.xml | 14 - .../sdo/impl/src/test/resources/sdoannotations.xsd | 57 - .../sdo/impl/src/test/resources/sdotypes.xsd | 68 - .../sdo/impl/src/test/resources/shallowquote.xml | 11 - .../sdo/impl/src/test/resources/simple.xsd | 38 - .../src/test/resources/simplechangesummary.xml | 36 - .../sdo/impl/src/test/resources/xpath.xml | 51 - .../sdo/impl/src/test/resources/xpath.xsd | 58 - branches/java-post-M1/sdo/plugin/pom.xml | 41 - .../apache/tuscany/sdo/plugin/GeneratorMojo.java | 264 - .../tuscany/sdo/plugin/SchemaFileOption.java | 189 - .../plugin/src/main/resources/META-INF/LICENSE.txt | 1277 ---- .../sdo/plugin/src/main/resources/META-INF/NOTICE | 18 - .../plugin/src/main/resources/META-INF/README.txt | 35 - branches/java-post-M1/sdo/pom.xml | 83 - branches/java-post-M1/sdo/tools/pom.xml | 55 - branches/java-post-M1/sdo/tools/readme.htm | 29 - .../sdo/generate/Interface2JavaGenerator.java | 242 - .../apache/tuscany/sdo/generate/JavaGenerator.java | 616 -- .../tuscany/sdo/generate/XSD2JavaGenerator.java | 179 - .../adapter/SDOGenClassGeneratorAdapter.java | 43 - .../SDOGenModelGeneratorAdapterFactory.java | 51 - .../adapter/SDOGenPackageGeneratorAdapter.java | 49 - .../sdo/generate/templates/model/SDOClass.java | 4165 ----------- .../generate/templates/model/SDOFactoryClass.java | 1495 ---- .../eclipse/jdt/core/formatter/CodeFormatter.java | 24 - .../tools/src/main/resources/META-INF/LICENSE.txt | 1277 ---- .../sdo/tools/src/main/resources/META-INF/NOTICE | 18 - .../tools/src/main/resources/META-INF/README.txt | 35 - .../java/com/example/sequences/MixedQuote.java | 323 - .../example/sequences/MixedRepeatingChoice.java | 96 - .../com/example/sequences/RepeatingChoice.java | 82 - .../com/example/sequences/SequencesFactory.java | 83 - .../test/java/com/example/sequences/TwoRCs.java | 151 - .../java/com/example/sequences/TwoRCsMixed.java | 165 - .../com/example/sequences/impl/MixedQuoteImpl.java | 657 -- .../sequences/impl/MixedRepeatingChoiceImpl.java | 299 - .../sequences/impl/RepeatingChoiceImpl.java | 265 - .../sequences/impl/SequencesFactoryImpl.java | 692 -- .../com/example/sequences/impl/TwoRCsImpl.java | 449 -- .../example/sequences/impl/TwoRCsMixedImpl.java | 447 -- .../src/test/java/com/example/simple/Quote.java | 307 - .../java/com/example/simple/SimpleFactory.java | 46 - .../java/com/example/simple/impl/QuoteImpl.java | 712 -- .../com/example/simple/impl/SimpleFactoryImpl.java | 138 - .../com/example/simple/impl/SimplePackageImpl.java | 908 --- .../apache/tuscany/sdo/test/SimpleStaticTest.java | 64 - .../tuscany/sdo/test/StaticSequenceNoEmfTest.java | 249 - .../java/org/apache/tuscany/sdo/test/TestUtil.java | 282 - .../sdo/tools/src/test/resources/enum.xsd | 47 - .../resources/mixedRepeatingChoiceTestResult.xml | 22 - .../src/test/resources/mixedStaticTestResult.xml | 31 - .../tools/src/test/resources/repeatingChoice.xsd | 29 - .../test/resources/repeatingChoiceTestResult.xml | 22 - .../sdo/tools/src/test/resources/sequences.xsd | 97 - .../sdo/tools/src/test/resources/simple.xsd | 38 - .../twoRepeatingChoicesMixedTestResult.xml | 25 - .../resources/twoRepeatingChoicesTestResult.xml | 25 - .../sdo/tools/templates/Header.javajetinc | 6 - .../sdo/tools/templates/models/SDOClass.javajet | 1813 ----- .../tools/templates/models/SDOFactoryClass.javajet | 727 -- 203 files changed, 70295 deletions(-) delete mode 100644 branches/java-post-M1/sdo/impl/model/SDO.ecore delete mode 100644 branches/java-post-M1/sdo/impl/model/SDO.genmodel delete mode 100644 branches/java-post-M1/sdo/impl/model/SDO.mdl delete mode 100644 branches/java-post-M1/sdo/impl/pom.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/NoJavaImplementationException.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/CopyHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/DataHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/EqualityHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/HelperProviderImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLDocumentImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AttributeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummarySettingImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ClassImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataGraphImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SimpleAnyTypeDataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/StoreDataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ChangeSummaryType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelPackage.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ChangeSummaryTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelPackageImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaPackageImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/BasicSequence.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataGraphResourceFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/StAX2SAXAdapter.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataPackageImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/DataObjectXMLStreamReader.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceImpl.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLDocumentStreamReader.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLFragmentStreamReader.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLStreamSerializer.java delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/META-INF/LICENSE.txt delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/META-INF/MANIFEST.MF delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/META-INF/NOTICE delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/META-INF/README.txt delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/META-INF/services/commonj.sdo.impl.HelperProvider delete mode 100644 branches/java-post-M1/sdo/impl/src/main/resources/sdo-metadata.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValues.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/TypeRoundTripTest.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XMLDocumentTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XMLStreamHelperTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/SubstitutionValues.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentTestCase.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/customer1.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/customer2.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/datatype.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/foo.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/mixed.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/mixed.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/mixed2.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/mixedopen.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/names.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/open.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/open.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/open2.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/quote.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/sdoannotations.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/sdotypes.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/shallowquote.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/simple.xsd delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/simplechangesummary.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/xpath.xml delete mode 100644 branches/java-post-M1/sdo/impl/src/test/resources/xpath.xsd delete mode 100644 branches/java-post-M1/sdo/plugin/pom.xml delete mode 100644 branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java delete mode 100644 branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java delete mode 100644 branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/LICENSE.txt delete mode 100644 branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/NOTICE delete mode 100644 branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/README.txt delete mode 100644 branches/java-post-M1/sdo/pom.xml delete mode 100644 branches/java-post-M1/sdo/tools/pom.xml delete mode 100644 branches/java-post-M1/sdo/tools/readme.htm delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java delete mode 100644 branches/java-post-M1/sdo/tools/src/main/resources/META-INF/LICENSE.txt delete mode 100644 branches/java-post-M1/sdo/tools/src/main/resources/META-INF/NOTICE delete mode 100644 branches/java-post-M1/sdo/tools/src/main/resources/META-INF/README.txt delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/Quote.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimplePackageImpl.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTest.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/enum.xsd delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/mixedStaticTestResult.xml delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoice.xsd delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/sequences.xsd delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/simple.xsd delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml delete mode 100644 branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml delete mode 100644 branches/java-post-M1/sdo/tools/templates/Header.javajetinc delete mode 100644 branches/java-post-M1/sdo/tools/templates/models/SDOClass.javajet delete mode 100644 branches/java-post-M1/sdo/tools/templates/models/SDOFactoryClass.javajet (limited to 'branches/java-post-M1/sdo') diff --git a/branches/java-post-M1/sdo/impl/model/SDO.ecore b/branches/java-post-M1/sdo/impl/model/SDO.ecore deleted file mode 100644 index dce261ecd2..0000000000 --- a/branches/java-post-M1/sdo/impl/model/SDO.ecore +++ /dev/null @@ -1,962 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - -
- - - - - -
- - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/model/SDO.genmodel b/branches/java-post-M1/sdo/impl/model/SDO.genmodel deleted file mode 100644 index d28946204c..0000000000 --- a/branches/java-post-M1/sdo/impl/model/SDO.genmodel +++ /dev/null @@ -1,564 +0,0 @@ - - - SDO.mdl - VABASE_PLUGINS_PATH - ../.. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/model/SDO.mdl b/branches/java-post-M1/sdo/impl/model/SDO.mdl deleted file mode 100644 index 2288766bab..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/pom.xml b/branches/java-post-M1/sdo/impl/pom.xml deleted file mode 100644 index c0e3477d73..0000000000 --- a/branches/java-post-M1/sdo/impl/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - org.apache.tuscany - tuscany-sdo - 1.0-SNAPSHOT - - 4.0.0 - tuscany-sdo-impl - Tuscany SDO Implementation - Tuscany implementation of SDO API. - - - - commonj - sdo-api - incubating-M1 - compile - - - - stax - stax-api - 1.0 - - provided - true - - - - woodstox - wstx-asl - 2.9.3 - test - - - - - asm - asm - 2.2 - 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 - - - - junit - junit - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - src/main/resources/META-INF/MANIFEST.MF - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java deleted file mode 100644 index 5eea403613..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/AnyTypeDataObject.java +++ /dev/null @@ -1,34 +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; - -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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java deleted file mode 100644 index 7bc75d8faa..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOExtendedMetaData.java +++ /dev/null @@ -1,35 +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; - -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); - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java deleted file mode 100644 index 5b066bb6e3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOFactory.java +++ /dev/null @@ -1,173 +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; - -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 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java deleted file mode 100644 index caa154baf5..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOPackage.java +++ /dev/null @@ -1,1599 +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; - -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; - - /** - * The number of structural features of the 'Change Summary' class. - * - * - * @generated - * @ordered - */ - int CHANGE_SUMMARY_FEATURE_COUNT = ChangePackage.CHANGE_DESCRIPTION_FEATURE_COUNT + 1; - - /** - * 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 'EJava List' data type. - * - * - * @see java.util.List - * @see org.apache.tuscany.sdo.impl.SDOPackageImpl#getEJavaList() - * @generated - */ - int EJAVA_LIST = 17; - - /** - * 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 = 18; - - - /** - * 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(); - - /** - * 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 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java deleted file mode 100644 index ced62cc058..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SDOTypeVisitor.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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; - -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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java deleted file mode 100644 index 5fed5829ae..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/SimpleAnyTypeDataObject.java +++ /dev/null @@ -1,32 +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; - -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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java deleted file mode 100644 index 6608357769..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java deleted file mode 100644 index 15ff8a7502..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/GenerationException.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java deleted file mode 100644 index b7048ed6ab..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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 && 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) - { - - 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. - } - - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java deleted file mode 100644 index f4d39670b6..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/TypeHelperImpl.java +++ /dev/null @@ -1,215 +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.helper; - - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; -import org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl; -import org.apache.tuscany.sdo.util.SDOUtil; -import org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl; -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.Type; -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 ExtendedMetaData extendedMetaData; - - public ExtendedMetaData getExtendedMetaData() - { - return extendedMetaData; - } - - public TypeHelperImpl(ExtendedMetaData extendedMetaData) - { - this.extendedMetaData = extendedMetaData; - - // Register the standard (predefined) SDO types - ModelPackageImpl.init(); - JavaPackageImpl.init(); - MetadataPackageImpl.init(); - } - - 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; - } - - public Type getType(Class interfaceClass) - { - Type type = SDOUtil.getJavaSDOType(interfaceClass); - if (type != null) - { - return type; - } - - //TODO more efficient implementation ... this is a really bad one! - for (Iterator iter = EPackage.Registry.INSTANCE.values().iterator(); iter.hasNext(); ) - { - Object value = iter.next(); - if (value instanceof EPackage) - { - EPackage ePackage = (EPackage)value; - for (Iterator iter2 = ePackage.getEClassifiers().iterator(); iter2.hasNext(); ) - { - EClassifier eClassifier = (EClassifier)iter2.next(); - if (eClassifier.getInstanceClass() == interfaceClass) - { - return (Type)eClassifier; - } - } - } - } - - 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(this, modeledType.getUri(), modeledType.getName(), isDataType); - - 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); - - SDOUtil.setMany(definedProperty, modeledProperty.isMany()); - SDOUtil.setDefault(definedProperty, modeledProperty.getDefault_()); - SDOUtil.setReadOnly(definedProperty, modeledProperty.isReadOnly()); - - for (Iterator iter2 = modeledProperty.getAliasName().iterator(); iter2.hasNext(); ) - { - String aliasName = (String)iter2.next(); - SDOUtil.addAliasName(definedProperty, aliasName); - } - - if (!propertyType.isDataType()) - { - SDOUtil.setContainment(definedProperty, modeledProperty.isContainment()); - if (modeledProperty.getOpposite_() != null) - { - SDOUtil.setOpposite(definedProperty, getDefinedProperty(modeledProperty.getOpposite_())); - } - } - } - } // if (!isDataType) - - return definedType; - } - - 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); - } - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLDocumentImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLDocumentImpl.java deleted file mode 100644 index b0205b5362..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLDocumentImpl.java +++ /dev/null @@ -1,533 +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.helper; - - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Reader; -import java.io.Writer; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sdo.SimpleAnyTypeDataObject; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.apache.tuscany.sdo.util.SDOUtil; -import org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.common.util.URI; -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.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.xmi.XMLResource; -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; -import org.xml.sax.InputSource; - -import commonj.sdo.DataObject; -import commonj.sdo.Type; -import commonj.sdo.helper.XMLDocument; - - -/** - * 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 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 - { - EObject oldContainer = null; - EReference oldContainmentReference = null; - int oldContainmentIndex = -1; - - if (documentRoot != null) - { - //TODO also check if rootObject is directly contained in a resource - oldContainer = rootObject.eContainer(); - if (oldContainer != null) - { - oldContainmentReference = rootObject.eContainmentFeature(); - } - if (oldContainer != documentRoot || oldContainmentReference != rootElement) - { - if (oldContainmentReference != null && oldContainmentReference.isMany()) - { - oldContainmentIndex = ((List)oldContainer.eGet(oldContainmentReference)).indexOf(rootObject); - } - - Object rootValue = - rootElement instanceof EAttribute && rootObject instanceof SimpleAnyTypeDataObject ? - ((SimpleAnyTypeDataObject)rootObject).getValue() : rootObject; - - documentRoot.eSet(rootElement, rootValue); - } - } - - resource.save(outputStream, (Map)options); - - if (oldContainer != null) - { - if (oldContainer != documentRoot || oldContainmentReference != rootElement) - { - if (oldContainmentReference.isMany()) - { - ((List)oldContainer.eGet(oldContainmentReference)).add(oldContainmentIndex, rootObject); - } - else - { - oldContainer.eSet(oldContainmentReference, rootObject); - } - } - } - else if (documentRoot != null) - { - documentRoot.eSet(rootElement, null); - } - } - - 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 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 void load(XMLStreamReader reader) throws IOException - { - ((SDOXMLResourceImpl)resource).load(reader, null); - 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(); - } - - 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 - } - 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java deleted file mode 100644 index 653665e1b8..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLHelperImpl.java +++ /dev/null @@ -1,116 +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.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 org.eclipse.emf.ecore.util.ExtendedMetaData; - -import commonj.sdo.DataObject; -import commonj.sdo.helper.TypeHelper; -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 -{ - ExtendedMetaData extendedMetaData; - - public XMLHelperImpl(ExtendedMetaData extendedMetaData) - { - this.extendedMetaData = extendedMetaData; - } - - public XMLHelperImpl(TypeHelper typeHelper) - { - this.extendedMetaData = ((TypeHelperImpl)typeHelper).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(InputStream inputStream) throws IOException - { - return load(inputStream, null, null); - } - - public XMLDocument load(InputStream inputStream, String locationURI, Object options) throws IOException - { - 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); - document.load(inputReader, locationURI, options); - return document; - } - - 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 void save(DataObject dataObject, String rootElementURI, String rootElementName, OutputStream outputStream) throws IOException - { - save(createDocument(dataObject, rootElementURI, rootElementName), outputStream, null); - } - - public void save(XMLDocument xmlDocument, OutputStream outputStream, Object options) throws IOException - { - ((XMLDocumentImpl)xmlDocument).save(outputStream, options); - } - - public void save(XMLDocument xmlDocument, Writer outputWriter, Object options) throws IOException - { - ((XMLDocumentImpl)xmlDocument).save(outputWriter, options); - } - - public XMLDocument createDocument(DataObject dataObject, String rootElementURI, String rootElementName) - { - return new XMLDocumentImpl(extendedMetaData, dataObject, rootElementURI, rootElementName); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java deleted file mode 100644 index 03d7936894..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelper.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation - * - * 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.helper; - -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import commonj.sdo.DataObject; -import commonj.sdo.helper.XMLDocument; - -/** - * Helper interface for reading and writing SDO DataObjects from XML streams (StAX). - * - * @version $Rev$ $Date$ - */ -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; - - /** - * 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; - - /** - * 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; - - /** - * 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); -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java deleted file mode 100644 index 788cd99927..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XMLStreamHelperImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation - * - * 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.helper; - -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.TypeHelper; -import commonj.sdo.helper.XMLDocument; - -/** - * @version $Rev$ $Date$ - */ -public class XMLStreamHelperImpl implements XMLStreamHelper -{ - TypeHelperImpl typeHelper; - - public XMLStreamHelperImpl(TypeHelper typeHelper) - { - this.typeHelper = (TypeHelperImpl)typeHelper; - } - - public XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException - { - if (reader.getEventType() != XMLStreamConstants.START_DOCUMENT) - throw new IllegalStateException(); - - return loadDocument(reader); - } - - public void save(XMLDocument document, XMLStreamWriter writer) throws XMLStreamException - { - XMLStreamReader reader = createXMLStreamReader(document); - new XMLStreamSerializer().serialize(reader, writer); - } - - public XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException - { - XMLStreamReader reader = new DataObjectXMLStreamReader(document.getRootObject(), document.getRootElementURI(), document.getRootElementName(), typeHelper); - // Wrap the reader so that its position will be START_ELEMENT - return new XMLDocumentStreamReader(reader); - - } - - public DataObject loadObject(XMLStreamReader reader) 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).getRootObject(); - } - - public void saveObject(DataObject sdo, XMLStreamWriter writer) throws XMLStreamException - { - XMLStreamReader reader = createXMLStreamReader(sdo); - new XMLStreamSerializer().serialize(new XMLDocumentStreamReader(reader), writer); - } - - public XMLStreamReader createXMLStreamReader(DataObject dataObject) - { - 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, typeHelper); - } - - protected XMLDocument loadDocument(XMLStreamReader reader) throws XMLStreamException - { - try { - XMLDocumentImpl document = new XMLDocumentImpl(typeHelper.extendedMetaData, null); - document.load(reader); - 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); // ???? - } - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java deleted file mode 100644 index 2194b0c6ce..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java +++ /dev/null @@ -1,218 +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.helper; - - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -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.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.XSDResourceImpl; -import org.xml.sax.InputSource; - -import commonj.sdo.Property; -import commonj.sdo.Type; -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 -{ - private XSDEcoreBuilder ecoreBuilder; - - private ExtendedMetaData extendedMetaData; - - public XSDHelperImpl(ExtendedMetaData extendedMetaData) - { - this.extendedMetaData = extendedMetaData; - ecoreBuilder = new SDOXSDEcoreBuilder(extendedMetaData); - } - - public XSDHelperImpl(TypeHelper typeHelper) - { - this(((TypeHelperImpl)typeHelper).extendedMetaData); - } - - 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 - { - ResourceSet resourceSet = DataObjectUtil.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(); - - EPackage ePackage = extendedMetaData.getPackage(schema.getTargetNamespace()); - if (ePackage == null) - { - Collection originalEPackages = new HashSet(ecoreBuilder.getTargetNamespaceToEPackageMap().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) - { - throw new UnsupportedOperationException(); //TODO - } - - public String generate(List /*Type*/types, Map /*String, String*/namespaceToSchemaLocation) - { - throw new UnsupportedOperationException(); //TODO - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java deleted file mode 100644 index a1bb922d69..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AnyTypeDataObjectImpl.java +++ /dev/null @@ -1,296 +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.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'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl#getMixed Mixed}
  • - *
  • {@link org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.impl.AnyTypeDataObjectImpl#getAnyAttribute Any Attribute}
  • - *
- *

- * - * @generated - */ -public class AnyTypeDataObjectImpl extends DataObjectImpl implements AnyTypeDataObject -{ - /** - * The cached value of the '{@link #getMixed() Mixed}' attribute list. - * - * - * @see #getMixed() - * @generated - * @ordered - */ - protected FeatureMap mixed = null; - - /** - * The cached value of the '{@link #getAnyAttribute() Any Attribute}' attribute list. - * - * - * @see #getAnyAttribute() - * @generated - * @ordered - */ - protected FeatureMap anyAttribute = null; - - /** - * - * - * @generated - */ - protected AnyTypeDataObjectImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getAnyTypeDataObject(); - } - - /** - * - * - * @generated NOT - */ - public FeatureMap getMixed() - { - if (mixed == null) - { - //mixed = new BasicFeatureMap(this, SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED); - mixed = new BasicSequence(new BasicFeatureMap(this, SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED)).featureMap(); - } - return mixed; - } - - /** - * - * - * @generated NOT - */ - public FeatureMap getAny() - { - //return (FeatureMap)((FeatureMap)getMixed()).list(XMLTypePackage.eINSTANCE.getAnyType_Any()); - return new BasicSequence((FeatureMap.Internal)((FeatureMap)getMixed()).list(XMLTypePackage.eINSTANCE.getAnyType_Any())).featureMap(); - } - - /** - * - * - * @generated NOT - */ - public FeatureMap getAnyAttribute() - { - if (anyAttribute == null) - { - //anyAttribute = new BasicFeatureMap(this, SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE); - anyAttribute = new BasicSequence(new BasicFeatureMap(this, SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE)).featureMap(); - } - return anyAttribute; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) - { - if (featureID >= 0) - { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: - return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: - return ((InternalEList)getAny()).basicRemove(otherEnd, msgs); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - return ((InternalEList)getAnyAttribute()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: - if (coreType) return getMixed(); - return ((FeatureMap.Internal)getMixed()).getWrapper(); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: - if (coreType) return getAny(); - return ((FeatureMap.Internal)getAny()).getWrapper(); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - if (coreType) return getAnyAttribute(); - return ((FeatureMap.Internal)getAnyAttribute()).getWrapper(); - } - return eDynamicGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: - ((FeatureMap.Internal)getMixed()).set(newValue); - return; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: - ((FeatureMap.Internal)getAny()).set(newValue); - return; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - ((FeatureMap.Internal)getAnyAttribute()).set(newValue); - return; - } - eDynamicSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: - getMixed().clear(); - return; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: - getAny().clear(); - return; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - getAnyAttribute().clear(); - return; - } - eDynamicUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: - return mixed != null && !mixed.isEmpty(); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: - return !getAny().isEmpty(); - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - return anyAttribute != null && !anyAttribute.isEmpty(); - } - return eDynamicIsSet(featureID); - } - - /** - * - * - * @generated - */ - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) - { - if (baseClass == AnyType.class) - { - switch (derivedFeatureID) - { - case SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED: return XMLTypePackage.ANY_TYPE__MIXED; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY: return XMLTypePackage.ANY_TYPE__ANY; - case SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: return XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) - { - if (baseClass == AnyType.class) - { - switch (baseFeatureID) - { - case XMLTypePackage.ANY_TYPE__MIXED: return SDOPackage.ANY_TYPE_DATA_OBJECT__MIXED; - case XMLTypePackage.ANY_TYPE__ANY: return SDOPackage.ANY_TYPE_DATA_OBJECT__ANY; - case XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE: return SDOPackage.ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mixed: "); - result.append(mixed); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -} //EDataObjectAnyTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AttributeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AttributeImpl.java deleted file mode 100644 index b516cea449..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/AttributeImpl.java +++ /dev/null @@ -1,732 +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.impl; - -import java.util.List; - -import org.apache.tuscany.sdo.util.BasicSequence; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EAttributeImpl; -import org.eclipse.emf.ecore.util.FeatureMap; - -import commonj.sdo.Property; -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -/** - * - * An implementation of the model object 'Attribute'. - * - *

- *

- * - * @generated - */ -public class AttributeImpl extends EAttributeImpl implements Property, org.apache.tuscany.sdo.model.Property/*, DataObject*/ -{ - /** - * - * - * @generated - */ - protected AttributeImpl() - { - super(); - } - - /** - * - * - * @generated NOT - */ - protected EClass eStaticClass() - { - return EcorePackage.eINSTANCE.getEAttribute(); - } - - /** - * - * - * @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? - } - - 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(); - } - - /** - * - * - * @generated NOT - */ - public Type getContainingType() - { - return (Type)getEContainingClass(); - } - - /** - * - * - * @generated NOT - */ - public Property getOpposite() - { - return null; - } - - /** - * - * - * @generated NOT - */ - public boolean isContainment() - { - return false; - } - - protected EStructuralFeature.Internal.SettingDelegate createFeatureMapSettingDelegate() - { - return new InternalSettingDelegateSequence(this); - } - - public static class InternalSettingDelegateSequence extends InternalSettingDelegateMany - { - InternalSettingDelegateSequence(EStructuralFeature feature) - { - super(InternalSettingDelegateMany.FEATURE_MAP, feature); - } - - protected EStructuralFeature.Setting createDynamicSetting(InternalEObject owner) - { - FeatureMap.Internal featureMap = (FeatureMap.Internal)super.createDynamicSetting(owner); - new BasicSequence(featureMap); - return featureMap; - } - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // org.apache.tuscany.sdo.model.Property methods - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - - public List getAliasName() { - return this.getAliasNames(); - } - - public Sequence getAny() { - throw new UnsupportedOperationException(); - } - - public void unsetContainment() { - throw new UnsupportedOperationException("Property is frozen and cannot be modified"); - } - - public boolean isSetContainment() { - return false; - } - - 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 setContainment(boolean value) { - throw new UnsupportedOperationException(); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // 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); - } - */ - -} //AttributeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java deleted file mode 100644 index 5460257079..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java +++ /dev/null @@ -1,679 +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.impl; - - -import java.util.Collection; -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.SDOFactory; -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.util.BasicSequence; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.UniqueEList; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.change.ChangeDescription; -import org.eclipse.emf.ecore.change.FeatureChange; -import org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl; -import org.eclipse.emf.ecore.change.util.ChangeRecorder; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.BasicExtendedMetaData; -import org.eclipse.emf.ecore.util.DelegatingFeatureMap; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.FeatureMapUtil; -import org.eclipse.emf.ecore.util.InternalEList; - -import commonj.sdo.ChangeSummary; -//import commonj.sdo.ChangeSummary.Setting; - -import commonj.sdo.DataGraph; -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Sequence; - - -/** - * - * An implementation of the model object 'EChange Summary'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.impl.ChangeSummaryImpl#getEDataGraph EData Graph}
  • - *
- *

- * - * @generated - */ -public class ChangeSummaryImpl extends ChangeDescriptionImpl implements ChangeSummary -{ - /** - * The cached value of the '{@link #getEDataGraph() EData Graph}' reference. - * - * - * @see #getEDataGraph() - * @generated - * @ordered - */ - protected DataGraph eDataGraph = null; - - protected ChangeRecorder changeRecorder = null; - protected EList cachedObjectsToDetach = null; - protected HashMap cachedSDOObjectChanges = new HashMap(); - - /** - * - * - * @generated - */ - protected ChangeSummaryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getChangeSummary(); - } - - /** - * - * - * @generated NOT - */ - public boolean isLogging() - { - return changeRecorder != null; - } - - /** - * - * - * @generated - */ - public DataGraph getEDataGraph() - { - return eDataGraph; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetEDataGraph(DataGraph newEDataGraph, NotificationChain msgs) - { - DataGraph oldEDataGraph = eDataGraph; - eDataGraph = newEDataGraph; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH, oldEDataGraph, newEDataGraph); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setEDataGraph(DataGraph newEDataGraph) - { - if (newEDataGraph != eDataGraph) - { - NotificationChain msgs = null; - if (eDataGraph != null) - msgs = ((InternalEObject)eDataGraph).eInverseRemove(this, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, DataGraph.class, msgs); - if (newEDataGraph != null) - msgs = ((InternalEObject)newEDataGraph).eInverseAdd(this, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, DataGraph.class, msgs); - msgs = basicSetEDataGraph(newEDataGraph, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH, newEDataGraph, newEDataGraph)); - } - - /** - * - * - * @generated NOT - */ - public void beginLogging() - { - if (isLogging()) - { - throw new IllegalStateException("Already logging"); - } - - getObjectsToAttach().clear(); - getObjectChanges().clear(); - getResourceChanges().clear(); - - oldContainmentInformation = null; - changeRecorder = new SDOChangeRecorder(); - changeRecorder.beginRecording(Collections.singleton(((DataGraphImpl)getEDataGraph()).getRootResource())); -// if (eNotificationRequired()) -// eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.ECHANGE_SUMMARY__LOGGING, false, true)); - } - - /** - * - * - * @generated NOT - */ - public void resumeLogging() - { - if (isLogging()) - { - throw new IllegalStateException("Already logging"); - } - - oldContainmentInformation = null; - - changeRecorder = new SDOChangeRecorder(); - changeRecorder.beginRecording(this, Collections.singleton(((DataGraphImpl)getEDataGraph()).getRootResource())); - -// if (eNotificationRequired()) -// eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.ECHANGE_SUMMARY__LOGGING, false, true)); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) - { - if (featureID >= 0) - { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) - { - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - if (eDataGraph != null) - msgs = ((InternalEObject)eDataGraph).eInverseRemove(this, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, DataGraph.class, msgs); - return basicSetEDataGraph((DataGraph)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) - { - if (featureID >= 0) - { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) - { - case SDOPackage.CHANGE_SUMMARY__OBJECT_CHANGES: - return ((InternalEList)getObjectChanges()).basicRemove(otherEnd, msgs); - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_ATTACH: - return ((InternalEList)getObjectsToAttach()).basicRemove(otherEnd, msgs); - case SDOPackage.CHANGE_SUMMARY__RESOURCE_CHANGES: - return ((InternalEList)getResourceChanges()).basicRemove(otherEnd, msgs); - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - return basicSetEDataGraph(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case SDOPackage.CHANGE_SUMMARY__OBJECT_CHANGES: - if (coreType) return getObjectChanges(); - else return getObjectChanges().map(); - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_DETACH: - return getObjectsToDetach(); - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_ATTACH: - return getObjectsToAttach(); - case SDOPackage.CHANGE_SUMMARY__RESOURCE_CHANGES: - return getResourceChanges(); - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - return getEDataGraph(); - } - return eDynamicGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case SDOPackage.CHANGE_SUMMARY__OBJECT_CHANGES: - ((EStructuralFeature.Setting)getObjectChanges()).set(newValue); - return; - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_DETACH: - getObjectsToDetach().clear(); - getObjectsToDetach().addAll((Collection)newValue); - return; - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_ATTACH: - getObjectsToAttach().clear(); - getObjectsToAttach().addAll((Collection)newValue); - return; - case SDOPackage.CHANGE_SUMMARY__RESOURCE_CHANGES: - getResourceChanges().clear(); - getResourceChanges().addAll((Collection)newValue); - return; - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - setEDataGraph((DataGraph)newValue); - return; - } - eDynamicSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case SDOPackage.CHANGE_SUMMARY__OBJECT_CHANGES: - getObjectChanges().clear(); - return; - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_DETACH: - getObjectsToDetach().clear(); - return; - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_ATTACH: - getObjectsToAttach().clear(); - return; - case SDOPackage.CHANGE_SUMMARY__RESOURCE_CHANGES: - getResourceChanges().clear(); - return; - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - setEDataGraph((DataGraph)null); - return; - } - eDynamicUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case SDOPackage.CHANGE_SUMMARY__OBJECT_CHANGES: - return objectChanges != null && !objectChanges.isEmpty(); - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_DETACH: - return objectsToDetach != null && !objectsToDetach.isEmpty(); - case SDOPackage.CHANGE_SUMMARY__OBJECTS_TO_ATTACH: - return objectsToAttach != null && !objectsToAttach.isEmpty(); - case SDOPackage.CHANGE_SUMMARY__RESOURCE_CHANGES: - return resourceChanges != null && !resourceChanges.isEmpty(); - case SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH: - return eDataGraph != null; - } - return eDynamicIsSet(featureID); - } - - protected class SDOChangeRecorder extends ChangeRecorder - { - public SDOChangeRecorder() - { - super(); - } - - public void beginRecording(ChangeDescription changeDescription, Collection rootObjects) - { - deletedObjects = null; - cachedObjectsToDetach = null; - cachedSDOObjectChanges.clear(); - super.beginRecording(changeDescription, rootObjects); - } - - protected ChangeDescription createChangeDescription() - { - return ChangeSummaryImpl.this; - } - - protected FeatureChange createFeatureChange(EObject eObject, EStructuralFeature eStructuralFeature, Object value, boolean isSet) - { - Property property = (Property)eStructuralFeature; - if (property.isReadOnly()) - { - if (((DataObject)eObject).getDataGraph() != null) - { - throw - new IllegalStateException - ("The property '" + property.getName() + "' of type '" + - property.getContainingType().getName() + "' is read only"); - } - } - return (FeatureChange)SDOFactory.eINSTANCE.createChangeSummarySetting(eStructuralFeature, value, isSet); - } - - protected void consolidateChanges() - { - deletedObjects = null; - cachedObjectsToDetach = null; - cachedSDOObjectChanges.clear(); - super.consolidateChanges(); - } - - protected void addAdapter(Notifier notifier) - { - if (notifier instanceof DataObjectImpl) - ((DataObjectImpl)notifier).setChangeRecorder(this); - else - super.addAdapter(notifier); - } - - protected void removeAdapter(Notifier notifier) - { - if (notifier instanceof DataObjectImpl) - ((DataObjectImpl)notifier).setChangeRecorder(null); - else - super.removeAdapter(notifier); - } - - } - - /** - * - * - * @generated NOT - */ - public void endLogging() - { - if (!isLogging()) - { - throw new IllegalStateException("Not currently logging"); - } - - changeRecorder.endRecording(); - changeRecorder.dispose(); - changeRecorder = null; -// if (eNotificationRequired()) -// eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.ECHANGE_SUMMARY__LOGGING, true, false)); - } - - /** - * - * - * @generated NOT - */ - public boolean isCreated(DataObject dataObject) - { - return getObjectsToDetach().contains(dataObject); - } - - /** - * - * - * @generated NOT - */ - public boolean isDeleted(DataObject dataObject) - { - return getDeletedObjects().contains(dataObject); - } - - /** - * - * - * @generated NOT - */ - public List getOldValues(DataObject dataObject) - { - List sdoSettings = (List)cachedSDOObjectChanges.get(dataObject); - if (sdoSettings != null) - { - return sdoSettings; - } - - List settings = (List)getObjectChanges().get(dataObject); - if (settings == null) - { - settings = Collections.EMPTY_LIST; - } - else - { - for (int i = 0; i < settings.size(); i++) - { - FeatureChange change = (FeatureChange)settings.get(i); - EStructuralFeature feature = change.getFeature(); - if (FeatureMapUtil.isFeatureMap(feature)) - { - final List values = (List)change.getValue(); - if (sdoSettings == null) - { - sdoSettings = new BasicEList(settings); - } - DelegatingFeatureMap featureMap = new DelegatingFeatureMap(((InternalEObject)dataObject), feature) - { - protected final List theList = values; - - protected List delegateList() - { - return theList; - } - }; - - // create new settings and replace the setting for mixed feature - sdoSettings.set(i, SDOFactory.eINSTANCE.createChangeSummarySetting(feature, new BasicSequence(featureMap), change.isSet())); - // add all derived features - for (int k = 0; k < featureMap.size(); k++) - { - EStructuralFeature f = featureMap.getEStructuralFeature(k); - sdoSettings.add(SDOFactory.eINSTANCE.createChangeSummarySetting(f, featureMap.get(f, false), true)); - } - } - } - } - sdoSettings = (sdoSettings != null) ? sdoSettings : settings; - cachedSDOObjectChanges.put(dataObject, sdoSettings); - return sdoSettings; - } - - /** - * - * - * @generated NOT - */ - public boolean isModified(DataObject dataObject) - { - return getObjectChanges().containsKey(dataObject) && !isDeleted(dataObject) && !isCreated(dataObject); - } - - /** - * - * - * @generated NOT - */ - public void summarize() - { - if (!isLogging()) - { - throw new IllegalStateException("Not currently logging"); - } - - changeRecorder.summarize(); - } - - public Setting getOldValue(DataObject dataObject, Property property) - { - for (Iterator i = getOldValues(dataObject).iterator(); i.hasNext(); ) - { - Setting setting = (Setting)i.next(); - if (setting.getProperty() == property) - { - return setting; - } - } - - return null; - } - - public DataObject getOldContainer(DataObject dataObject) - { - return (DataObject)getOldContainer((EObject)dataObject); - } - - public Property getOldContainmentProperty(DataObject dataObject) - { - return (Property)getOldContainmentFeature((EObject)dataObject); - } - - /** - * - * - * @generated NOT - */ - public Sequence getOldSequence(DataObject dataObject) - { - EAttribute mixedFeature = BasicExtendedMetaData.INSTANCE.getMixedFeature((EClass)dataObject.getType()); - if (mixedFeature != null) - { - return (Sequence)getOldValue(dataObject, (Property)mixedFeature).getValue(); - } - return null; - } - - /** - * - * - * @generated NOT - */ - public void undoChanges() - { - if (isLogging()) - { - changeRecorder.summarize(); - } - apply(); - } - - public EList getObjectsToDetach() - { - if (cachedObjectsToDetach == null) - { - cachedObjectsToDetach = super.getObjectsToDetach(); - } - return cachedObjectsToDetach; - } - - /** - * - * - * @generated NOT - */ - public DataGraph getDataGraph() - { - return getEDataGraph(); - } - - protected Set deletedObjects; - - protected void preApply(boolean reverse) - { - super.preApply(reverse); - deletedObjects = null; - } - - protected Set getDeletedObjects() - { - if (deletedObjects == null) - { - deletedObjects = new HashSet(); - for (Iterator i = EcoreUtil.getAllContents(getObjectsToAttach()); i.hasNext(); ) - { - deletedObjects.add(i.next()); - } - } - return deletedObjects; - } - - /** - * - * - * @generated NOT - */ - public List getChangedDataObjects() - { - EList result = new UniqueEList.FastCompare(getDeletedObjects()); - result.addAll(getObjectsToDetach()); - for (Iterator i = getObjectChanges().iterator(); i.hasNext(); ) - { - Map.Entry entry = (Map.Entry)i.next(); - result.add(entry.getKey()); - } - return result; - } - - /** - * - * - * @generated NOT - */ - public DataObject getRootObject() - { - DataGraph dataGraph = getDataGraph(); - if (dataGraph != null) - { - return dataGraph.getRootObject(); - } - // TODO: handle ChangeSummary-type property - return null; - } - -} //EChangeSummaryImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummarySettingImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummarySettingImpl.java deleted file mode 100644 index 9f714b9cfa..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummarySettingImpl.java +++ /dev/null @@ -1,110 +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.impl; - - -import java.util.Map; - -import org.apache.tuscany.sdo.SDOPackage; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.change.impl.FeatureChangeImpl; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.Property; -/** - * - * An implementation of the model object 'EChange Summary Setting'. - * - *

- *

- * - * @generated - */ -public class ChangeSummarySettingImpl extends FeatureChangeImpl implements ChangeSummary.Setting -{ - /** - * - * - * @generated - */ - protected ChangeSummarySettingImpl() - { - super(); - } - - protected ChangeSummarySettingImpl(EStructuralFeature feature, Object value, boolean isSet) - { - super(feature, value, isSet); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getChangeSummarySetting(); - } - - /** - * - * - * @generated NOT - */ - public Object getValue() - { - EStructuralFeature feature = getFeature(); - if (feature.isMany()) - { - if (value == null) - { - EObject eObject = (EObject)((Map.Entry)eContainer()).getKey(); - value = getListValue((EList)eObject.eGet(feature)); - } - return value; - } - else - { - return super.getValue(); - } - } - - /** - * - * - * @generated NOT - */ - public Property getProperty() - { - return (Property)getFeature(); - } - - /** - * - * - * @generated NOT - */ - public boolean isSet() - { - return super.isSet(); - } - -} //EChangeSummarySettingImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ClassImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ClassImpl.java deleted file mode 100644 index eca552a78d..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ClassImpl.java +++ /dev/null @@ -1,773 +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.impl; - -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.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EClassImpl; -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 'Class'. - * - *

- *

- * - * @generated - */ -public class ClassImpl extends EClassImpl implements Type, org.apache.tuscany.sdo.model.Type/*, DataObject*/ -{ - /** - * - * - * @generated - */ - protected ClassImpl() - { - super(); - } - - /** - * - * - * @generated NOT - */ - protected EClass eStaticClass() - { - return EcorePackage.eINSTANCE.getEClass(); - } - - /** - * - * - * @generated NOT - */ - public String getURI() - { - return getEPackage().getNsURI(); - } - - /** - * - * - * @generated NOT - */ - public boolean isDataType() - { - return false; - } - - /** - * - * - * @generated NOT - */ - public boolean isOpen() - { - for (int i = 0, count = getFeatureCount(); i < count; ++i) - { - EStructuralFeature eStructuralFeature = getEStructuralFeature(i); - switch (ExtendedMetaData.INSTANCE.getFeatureKind(eStructuralFeature)) - { - case ExtendedMetaData.ELEMENT_WILDCARD_FEATURE: - if (eStructuralFeature == ExtendedMetaData.INSTANCE.getMixedFeature(this)) break; - case ExtendedMetaData.ATTRIBUTE_WILDCARD_FEATURE: - case ExtendedMetaData.GROUP_FEATURE: - return true; - } - } - return false; - } - - /** - * - * - * @generated NOT - */ - public boolean isSequenced() - { - // isSequenced == isMixed - return ExtendedMetaData.INSTANCE.getMixedFeature(this) != null; - } - - protected List aliasNames = null; - - /** - * - * - * @generated NOT - */ - public List getAliasNames() - { - if (aliasNames == null) - { - aliasNames = DataObjectUtil.getAliasNames(this); - } - return aliasNames; - } - - /** - * - * - * @generated NOT - */ - public List getDeclaredProperties() - { - return getEStructuralFeatures(); - } - - /** - * - * - * @generated NOT - */ - public List getProperties() - { - return getEAllStructuralFeatures(); - } - - /** - * - * - * @generated NOT - */ - public List getBaseTypes() - { - return getESuperTypes(); - } - - private void initAliasNames() { - if (propertyNameToPropertyMap == null) //FB use eNameToFeatureMap for this? - { - Map result = new HashMap(); - for (Iterator i = getProperties().iterator(); i.hasNext(); ) - { - Property property = (Property)i.next(); - result.put(property.getName(), property); - - List aliasNames = property.getAliasNames(); - for (int count = aliasNames.size(); count > 0; ) - { - result.put(aliasNames.get(--count), property); - } - } - propertyNameToPropertyMap = result; - } - } - - /** - * - * - * @generated NOT - */ - public Property getProperty(String propertyName) - { - initAliasNames(); - Property property = (Property)propertyNameToPropertyMap.get(propertyName); - if (property == null && !isOpen()) { - propertyNameToPropertyMap = null; - initAliasNames(); - property = (Property)propertyNameToPropertyMap.get(propertyName); - } - return property; - } - - protected Map propertyNameToPropertyMap; - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // 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 void unsetAbstract() { - eUnset(EcorePackage.eINSTANCE.getEClass_Abstract()); - } - - public boolean isSetAbstract() { - return eIsSet(EcorePackage.eINSTANCE.getEClass_Abstract()); - } - - public Sequence getAny() { - throw new UnsupportedOperationException(); - } - - public Sequence getAnyAttribute() { - throw new UnsupportedOperationException(); - } - - 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 false; - } - - 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 isOpen(); - } - - 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 isSequenced(); - } - - 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) { - return DataObjectUtil.get(this, propertyIndex); - } - - public void set(int propertyIndex, Object value) { - throw new UnsupportedOperationException("Type is frozen and cannot be modified"); - } - - public boolean isSet(int propertyIndex) { - return DataObjectUtil.isSet(this, propertyIndex); - } - - public void unset(int propertyIndex) { - throw new UnsupportedOperationException("Type 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("Type 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("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"); - //DataObjectUtil.detach(this); - } - */ - -} //ClassTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataGraphImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataGraphImpl.java deleted file mode 100644 index ec07a3ae1a..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataGraphImpl.java +++ /dev/null @@ -1,821 +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.impl; - - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.Serializable; -import java.util.List; - -import org.apache.tuscany.sdo.SDOFactory; -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -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 commonj.sdo.ChangeSummary; -import commonj.sdo.DataGraph; -import commonj.sdo.DataObject; -import commonj.sdo.Type; -import commonj.sdo.helper.TypeHelper; - - -/** - * - * An implementation of the model object 'EData Graph'. - * @extends DataGraph, Adapter, Serializable - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.impl.DataGraphImpl#getResourceSet Resource Set}
  • - *
  • {@link org.apache.tuscany.sdo.impl.DataGraphImpl#getRootResource Root Resource}
  • - *
  • {@link org.apache.tuscany.sdo.impl.DataGraphImpl#getEChangeSummary EChange Summary}
  • - *
  • {@link org.apache.tuscany.sdo.impl.DataGraphImpl#getERootObject ERoot Object}
  • - *
- *

- * - * @generated - */ -public class DataGraphImpl extends EObjectImpl implements DataGraph, Adapter, Serializable -{ - /** - * The default value of the '{@link #getResourceSet() Resource Set}' attribute. - * - * - * @see #getResourceSet() - * @generated - * @ordered - */ - protected static final ResourceSet RESOURCE_SET_EDEFAULT = null; - - /** - * The cached value of the '{@link #getResourceSet() Resource Set}' attribute. - * - * - * @see #getResourceSet() - * @generated - * @ordered - */ - protected ResourceSet resourceSet = RESOURCE_SET_EDEFAULT; - - /** - * The default value of the '{@link #getRootResource() Root Resource}' attribute. - * - * - * @see #getRootResource() - * @generated - * @ordered - */ - protected static final Resource ROOT_RESOURCE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getEChangeSummary() EChange Summary}' reference. - * - * - * @see #getEChangeSummary() - * @generated - * @ordered - */ - protected ChangeSummary eChangeSummary = null; - - /** - * The cached value of the '{@link #getERootObject() ERoot Object}' reference. - * - * - * @see #getERootObject() - * @generated - * @ordered - */ - protected EObject eRootObject = null; - - /** - * The cached extended metadata to wrap the resource set's package registry. - */ - protected ExtendedMetaData extendedMetaData; - - /** - * - * - * @generated - */ - protected DataGraphImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getDataGraph(); - } - - public boolean isAdapterForType(Object type) - { - return type == DataGraph.class; - } - - public void notifyChanged(Notification msg) - { - } - - public Notifier getTarget() - { - return getResourceSet(); - } - - public void setTarget(Notifier newTarget) - { - } - - protected ExtendedMetaData getExtendedMetaData() - { - if (extendedMetaData == null) - { - getResourceSet(); - } - return extendedMetaData; - } - - /** - * - * - * @generated NOT - */ - public ResourceSet getResourceSet() - { - if (resourceSet == null) - { - if (eResource() != null) - { - resourceSet = eResource().getResourceSet(); - } - if (resourceSet == null) - { - resourceSet = createResourceSet(); - } - initializeResourceSet(resourceSet); - } - return resourceSet; - } - - protected ResourceSet createResourceSet() - { - return DataObjectUtil.createResourceSet(); - } - - protected Resource createRootResource() - { - Resource result = resourceSet.createResource(URI.createURI("root.xml")); - result.getContents().clear(); - return result; - } - - protected Resource createChangeSummaryResource() - { - Resource result = resourceSet.createResource(URI.createURI("change-summary.xml")); - result.getContents().clear(); - return result; - } - - protected void initializeResourceSet(ResourceSet resourceSet) - { - if (resourceSet == null) - { - extendedMetaData = null; - } - else - { - extendedMetaData = new BasicExtendedMetaData(resourceSet.getPackageRegistry()); - resourceSet.eAdapters().add(this); - } - } - - /** - * - * - * @generated - */ - public void setResourceSetGen(ResourceSet newResourceSet) - { - ResourceSet oldResourceSet = resourceSet; - resourceSet = newResourceSet; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.DATA_GRAPH__RESOURCE_SET, oldResourceSet, resourceSet)); - } - - public void setResourceSet(ResourceSet newResourceSet) - { - if (resourceSet != null) - { - resourceSet.eAdapters().remove(this); - } - setResourceSetGen(newResourceSet); - initializeResourceSet(newResourceSet); - } - - /** - * - * - * @generated NOT - */ - public Resource getRootResource() - { - if (eRootObject == null) - { - Resource result = getResourceSet().getResource(URI.createURI("root.xml"), false); - if (result == null) - { - result = createRootResource(); - } - - return result; - } - else - { - return eRootObject.eResource(); - } - } - - public Resource getDataGraphResource() - { - Resource result = eResource(); - if (result == null) - { - result = getResourceSet().createResource(URI.createURI("all.datagraph")); - result.getContents().add(this); - } - return result; - } - - /** - * - * - * @generated - */ - public ChangeSummary getEChangeSummary() - { - return eChangeSummary; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetEChangeSummary(ChangeSummary newEChangeSummary, NotificationChain msgs) - { - ChangeSummary oldEChangeSummary = eChangeSummary; - eChangeSummary = newEChangeSummary; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, oldEChangeSummary, newEChangeSummary); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setEChangeSummary(ChangeSummary newEChangeSummary) - { - if (newEChangeSummary != eChangeSummary) - { - NotificationChain msgs = null; - if (eChangeSummary != null) - msgs = ((InternalEObject)eChangeSummary).eInverseRemove(this, SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH, ChangeSummary.class, msgs); - if (newEChangeSummary != null) - msgs = ((InternalEObject)newEChangeSummary).eInverseAdd(this, SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH, ChangeSummary.class, msgs); - msgs = basicSetEChangeSummary(newEChangeSummary, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY, newEChangeSummary, newEChangeSummary)); - } - - /** - * - * - * @generated - */ - public EObject getERootObject() - { - return eRootObject; - } - - /** - * - * - * @generated - */ - public void setERootObjectGen(EObject newERootObject) - { - EObject oldERootObject = eRootObject; - eRootObject = newERootObject; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.DATA_GRAPH__EROOT_OBJECT, oldERootObject, eRootObject)); - } - - public void setERootObject(EObject newERootObject) - { - // If there is a resource set already... - // - if (resourceSet != null) - { - // Get the root resource and if there's a root object in it already, clear it. - // Then set the root object and add it to the root resource. - // - List contents = getRootResource().getContents(); - if (eRootObject != null) - { - contents.clear(); - } - setERootObjectGen(newERootObject); - if (newERootObject != null) - { - contents.add(newERootObject); - } - } - else - { - // Set the root object and see if it has a resource we can reuse. - // - setERootObjectGen(newERootObject); - Resource rootResource = newERootObject.eResource(); - if (rootResource != null) - { - // If there is no resource set - // - if (rootResource.getResourceSet() == null) - { - // Demand create one and add this resource to it. - // - getResourceSet().getResources().add(rootResource); - } - else - { - // Reuse the existing resource set. - // - setResourceSet(rootResource.getResourceSet()); - } - } - else - { - // Demand create the resource set and the root resource, and add to it's contents. - // - getResourceSet(); - createRootResource().getContents().add(newERootObject); - } - } - } - - /** - * - * - * @generated NOT - */ - public EClassifier getEClassifier(String namespaceURI, String typeName) - { - ExtendedMetaData extendedMetaData = getExtendedMetaData(); - EPackage ePackage = extendedMetaData.getPackage(namespaceURI); - if (ePackage != null) - { - EClassifier eClassifier = ePackage.getEClassifier(typeName); - if (eClassifier == null) - { - eClassifier = extendedMetaData.getType(ePackage, typeName); - } - return eClassifier; - } - else - { - return null; - } - } - - /** - * - * - * @generated NOT - */ - public Type getType(String namespaceURI, String typeName) - { - return TypeHelper.INSTANCE.getType(namespaceURI, typeName); - //EClassifier eClassifier = getEClassifier(namespaceURI, typeName); - //return eClassifier == null ? null : SDOUtil.getType(eClassifier); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) - { - if (featureID >= 0) - { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) - { - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - if (eChangeSummary != null) - msgs = ((InternalEObject)eChangeSummary).eInverseRemove(this, SDOPackage.CHANGE_SUMMARY__EDATA_GRAPH, ChangeSummary.class, msgs); - return basicSetEChangeSummary((ChangeSummary)otherEnd, msgs); - default: - return eDynamicInverseAdd(otherEnd, featureID, baseClass, msgs); - } - } - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return eBasicSetContainer(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) - { - if (featureID >= 0) - { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) - { - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - return basicSetEChangeSummary(null, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case SDOPackage.DATA_GRAPH__RESOURCE_SET: - return getResourceSet(); - case SDOPackage.DATA_GRAPH__ROOT_RESOURCE: - return getRootResource(); - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - return getEChangeSummary(); - case SDOPackage.DATA_GRAPH__EROOT_OBJECT: - return getERootObject(); - } - return eDynamicGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case SDOPackage.DATA_GRAPH__RESOURCE_SET: - setResourceSet((ResourceSet)newValue); - return; - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - setEChangeSummary((ChangeSummary)newValue); - return; - case SDOPackage.DATA_GRAPH__EROOT_OBJECT: - setERootObject((EObject)newValue); - return; - } - eDynamicSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case SDOPackage.DATA_GRAPH__RESOURCE_SET: - setResourceSet(RESOURCE_SET_EDEFAULT); - return; - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - setEChangeSummary((ChangeSummary)null); - return; - case SDOPackage.DATA_GRAPH__EROOT_OBJECT: - setERootObject((EObject)null); - return; - } - eDynamicUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case SDOPackage.DATA_GRAPH__RESOURCE_SET: - return RESOURCE_SET_EDEFAULT == null ? resourceSet != null : !RESOURCE_SET_EDEFAULT.equals(resourceSet); - case SDOPackage.DATA_GRAPH__ROOT_RESOURCE: - return ROOT_RESOURCE_EDEFAULT == null ? getRootResource() != null : !ROOT_RESOURCE_EDEFAULT.equals(getRootResource()); - case SDOPackage.DATA_GRAPH__ECHANGE_SUMMARY: - return eChangeSummary != null; - case SDOPackage.DATA_GRAPH__EROOT_OBJECT: - return eRootObject != null; - } - return eDynamicIsSet(featureID); - } - - public DataObject createEDataObject(Type type) - { - return DataObjectUtil.create(type); - } - - public DataObject getRootObject() - { - return (DataObject)getERootObject(); - } - - public DataObject createRootObject(String namespaceURI, String typeName) - { - DataObject dataObject = DataObjectUtil.create(getType(namespaceURI, typeName)); - setERootObject((EObject)dataObject); - return dataObject; - } - - public DataObject createRootObject(Type type) - { - DataObject dataObject = DataObjectUtil.create(type); - setERootObject((EObject)dataObject); - return dataObject; - } - - public ChangeSummary getChangeSummary() - { - //FB is this the right place to create the resources? - ChangeSummary changeSummary = getEChangeSummary(); - if (changeSummary == null) - { - getRootResource(); - changeSummary = createEChangeSummary(); - setEChangeSummary(changeSummary); - } - - if (((ChangeSummaryImpl)changeSummary).eResource() == null) - { - Resource changeSummaryResource = createChangeSummaryResource(); - changeSummaryResource.getContents().add(changeSummary); - } - - return changeSummary; - } - - protected ChangeSummaryImpl createEChangeSummary() - { - return (ChangeSummaryImpl)SDOFactory.eINSTANCE.createChangeSummary(); - } - - public static class EDataGraphExternalizable implements Externalizable - { - protected DataGraphImpl eDataGraph; - //protected Map writeReplacements = new HashMap(); - - public EDataGraphExternalizable() - { - } - - public EDataGraphExternalizable(DataGraphImpl eDataGraph) - { - this.eDataGraph = eDataGraph; - } - - public void writeExternal(ObjectOutput objectOutput) throws IOException - { - ByteArrayOutputStream byteArrayOutputStream = - new ByteArrayOutputStream() - { - public byte [] toByteArray() - { - return super.toByteArray(); - } - }; - - eDataGraph.getDataGraphResource().save(byteArrayOutputStream, null); - objectOutput.writeInt(byteArrayOutputStream.toByteArray().length); - objectOutput.write(byteArrayOutputStream.toByteArray()); - } - - public void readExternal(ObjectInput objectInput) throws IOException - { - int length = objectInput.readInt(); - byte [] bytes = new byte [length]; - objectInput.readFully(bytes); - - ResourceSet resourceSet = createResourceSet(); - Resource resource = resourceSet.createResource(URI.createURI("all.datagraph")); - resource.load(new ByteArrayInputStream(bytes), null); - eDataGraph = (DataGraphImpl)resource.getContents().get(0); - } - - protected ResourceSet createResourceSet() - { - return DataObjectUtil.createResourceSet(); - } - - /* - public Object getWriteReplacement(EObject eObject) - { - Object result = writeReplacements.get(eObject); - if (result == null) - { - result = new EDataObjectExternalizable(eDataGraph, eObject); - writeReplacements.put(eObject, result); - } - return result; - } - */ - - protected Object readResolve() - { - return eDataGraph; - } - } - - /* - public static class EDataObjectExternalizable implements Externalizable - { - protected EObject eObject; - protected DataGraphImpl eDataGraph; - - public EDataObjectExternalizable() - { - } - - public EDataObjectExternalizable(DataGraphImpl eDataGraph, EObject eObject) - { - this.eDataGraph = eDataGraph; - this.eObject = eObject; - } - - public void writeExternal(ObjectOutput objectOutput) throws IOException - { - // Write the data object reference too. - String uri = eObject.eResource().getURIFragment(eObject); - objectOutput.writeUTF(uri); - objectOutput.writeObject(eDataGraph.getWriteReplacement()); - } - - public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException - { - String uri = objectInput.readUTF(); - eDataGraph = (DataGraphImpl)objectInput.readObject(); - eObject = eDataGraph.getRootResource().getEObject(uri); - } - - protected Object readResolve() - { - return eObject; - } - } - */ - - protected EDataGraphExternalizable eDataGraphExternalizable; - //protected Adapter modificationTracker; - - public Object getWriteReplacement() - { - if (eDataGraphExternalizable == null) - { - eDataGraphExternalizable = createEDataGraphExternalizable(); - /* - getRootResource().setTrackingModification(true); - modificationTracker = - new AdapterImpl() - { - public void notifyChanged(Notification notification) - { - if (notification.getFeatureID(Resource.class) == Resource.RESOURCE__IS_MODIFIED && notification.getNewBooleanValue()) - { - eDataGraphExternalizable = null; - modificationTracker = null; - ((Resource)target).eAdapters().remove(this); - } - } - }; - getRootResource().eAdapters().add(modificationTracker); - */ - } - return eDataGraphExternalizable; - } - - protected EDataGraphExternalizable createEDataGraphExternalizable() - { - return new EDataGraphExternalizable(this); - } - - /* - public Object getWriteReplacement(EObject eObject) - { - return ((EDataGraphExternalizable)getWriteReplacement()).getWriteReplacement(eObject); - } - */ - - public Object writeReplace() - { - return getWriteReplacement(); - } - - /* - public EObject eObjectForURIFragmentSegment(String uriFragmentSegment) - { - if (uriFragmentSegment.startsWith("@models.")) - { - if (resourceSet != null) - { - int count = Integer.parseInt(uriFragmentSegment.substring(8)); - for (Iterator i = resourceSet.getResources().iterator(); i.hasNext(); ) - { - Resource ePackageResource = (Resource)i.next(); - List resourceContents = ePackageResource.getContents(); - if (resourceContents.size() == 1 && resourceContents.get(0) instanceof EPackage && count-- == 0) - { - return (EObject)resourceContents.get(0); - } - } - } - - return null; - } - else - { - return super.eObjectForURIFragmentSegment(uriFragmentSegment); - } - } - */ - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (resourceSet: "); - result.append(resourceSet); - result.append(')'); - return result.toString(); - } - -} //EDataGraphImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java deleted file mode 100644 index 4617656fff..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectBase.java +++ /dev/null @@ -1,238 +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.impl; - - -import java.util.List; - -import org.apache.tuscany.sdo.util.BasicSequence; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; - - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - - -/** - * Base implementation of the SDO DataObject interface. Used as base class for prototype of EMF-less generated subclasses - */ -public abstract class DataObjectBase extends DataObjectImpl -{ - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Following methods should be proposed SPI for generated subclasses to use - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - protected boolean isNotifying() - { - return changeRecorder != null; - } - - protected interface ChangeKind - { - int SET = Notification.SET; - int UNSET = Notification.UNSET; - int RESOLVE = Notification.RESOLVE; - } - - protected void notify(int changeKind, int property, Object oldValue, Object newValue) - { - eNotify(new ENotificationImpl(this, Notification.SET, property, oldValue, newValue)); - } - - protected void notify(int changeKind, int property, double oldDoubleValue, double newDoubleValue, boolean isSetChange) - { - eNotify(new ENotificationImpl(this, Notification.SET, property, oldDoubleValue, newDoubleValue, isSetChange)); - } - - protected interface ListKind - { - int CONTAINMENT = 0; - } - - protected List createPropertyList(int listKind, Class dataClass, int property) - { - switch (listKind) - { - case ListKind.CONTAINMENT: - return new EObjectContainmentEList(dataClass, this, property); - } - return null; - } - - protected BasicSequence createSequence(int property) { - return new BasicSequence(new BasicFeatureMap(this, property)); - } - - protected Sequence createSequence(Sequence sequence, Type type, int propertyIndex) { - return new BasicSequence((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)sequence).featureMap().list(((EClass)type).getEStructuralFeature(propertyIndex))); - } - - /* - * get the value of the type's property at propertyIndex via the sequence - * @param seq - * @param type - * @param propertyIndex - * @return - */ - protected Object get(Sequence seq, Type type, int propertyIndex) { - return ((FeatureMap.Internal.Wrapper)seq).featureMap().get(((EClass)type).getEStructuralFeature(propertyIndex), true); - } - - protected List getList(Sequence seq, Type type, int propertyIndex) { - return ((FeatureMap.Internal.Wrapper)seq).featureMap().list(((EClass)type).getEStructuralFeature(propertyIndex)); - } - - protected void set(Sequence seq, Type type, int propertyIndex, Object newValue) { - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)seq).featureMap()).set(((EClass)type).getEStructuralFeature(propertyIndex), newValue); - } - - protected void unset(Sequence seq, Type type, int propertyIndex) { - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)seq).featureMap()).clear(((EClass)type).getEStructuralFeature(propertyIndex)); - - } - protected boolean isSet(Sequence seq, Type type, int propertyIndex) { - return !((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)seq).featureMap()).isEmpty(((EClass)type).getEStructuralFeature(propertyIndex)); - } - - protected boolean isSequenceEmpty(Sequence sequence) { - return ((FeatureMap.Internal.Wrapper)sequence).featureMap().isEmpty(); - } - - protected void setSequence(Sequence seq, Object newValue) { - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)seq).featureMap()).set(newValue); - } - - protected void unsetSequence(Sequence seq) { - ((FeatureMap.Internal.Wrapper)seq).featureMap().clear(); - } - - protected Object get(int featureID, boolean resolve) - { - return null; - } - - protected interface ChangeContext {} - - protected ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - ChangeContextImpl changeContextImpl = (ChangeContextImpl)changeContext; - changeContextImpl.notificationChain = super.eInverseRemove((InternalEObject)otherEnd, propertyIndex, changeContextImpl.notificationChain); - return changeContextImpl; - } - - protected ChangeContext removeFromList(List propertyList, Object objectToRemove, ChangeContext changeContext) - { - ChangeContextImpl changeContextImpl = (ChangeContextImpl)changeContext; - changeContextImpl.notificationChain = ((InternalEList)propertyList).basicRemove(objectToRemove, changeContextImpl.notificationChain); - return changeContextImpl; - } - - protected ChangeContext removeFromSequence(Sequence sequence, Object otherEnd, ChangeContext changeContext) { - ChangeContextImpl changeContextImpl = (ChangeContextImpl)changeContext; - changeContextImpl.notificationChain = ((InternalEList)((FeatureMap.Internal.Wrapper)sequence).featureMap()).basicRemove(otherEnd, changeContextImpl.notificationChain); - return changeContextImpl; - } - - protected boolean isProxy() - { - return eIsProxy(); - } - - protected Object resolveProxy(Object proxy) - { - return EcoreUtil.resolve((EObject)proxy, this); - } - - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Following methods override EMF methods to work with pure SDO generated subclasses - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - public EClass eStaticClass() - { - return (EClass)getType(); - } - - public Type getType() // must be overridem in subclasses - { - throw new UnsupportedOperationException(); - } - - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - Object result = get(featureID, resolve); - if (coreType) - { - if (result instanceof FeatureMap.Internal.Wrapper) result = ((FeatureMap.Internal.Wrapper)result).featureMap(); - } - return result; - } - - public void eSet(int featureID, Object newValue) - { - set(featureID, newValue); - } - - public void eUnset(int featureID) - { - unset(featureID); - } - - public boolean eIsSet(int featureID) - { - return isSet(featureID); - } - - private class ChangeContextImpl implements ChangeContext - { - protected NotificationChain notificationChain; - public ChangeContextImpl(NotificationChain notificationChain) { - this.notificationChain = notificationChain; - } - } - - public NotificationChain eInverseRemove(InternalEObject otherEnd, int propertyIndex, NotificationChain msgs) - { - return ((ChangeContextImpl)inverseRemove(otherEnd, propertyIndex, new ChangeContextImpl(msgs))).notificationChain; - } - - public String toString() - { - StringBuffer result = new StringBuffer(getClass().getName()); - result.append('@'); - result.append(Integer.toHexString(hashCode())); - if (eIsProxy()) - { - result.append(" (proxyURI: "); - result.append(eProxyURI()); - result.append(')'); - } - return result.toString(); - } - -} //DataObjectBase - diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectImpl.java deleted file mode 100644 index e952e5eea5..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataObjectImpl.java +++ /dev/null @@ -1,1508 +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.impl; - - -import java.io.ObjectStreamException; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.impl.ChangeSummaryImpl.SDOChangeRecorder; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.EStructuralFeature.Internal.DynamicValueHolder; -import org.eclipse.emf.ecore.impl.BasicEObjectImpl; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.util.BasicExtendedMetaData; -import org.eclipse.emf.ecore.util.EContentsEList; -import org.eclipse.emf.ecore.util.ECrossReferenceEList; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.DataGraph; -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Sequence; -import commonj.sdo.Type; -import commonj.sdo.impl.ExternalizableDelegator; - - -/** - * - * Base implementation of the SDO DataObject interface. This implementation allocates the minimum storage - * overhead needed for SDO. It provides a complete implementation of the API, but does not, however, allocate - * any storage for the actual properties of the data object. It instead requires subclasses for this purpose. - * The subclass, DynamicDataObjectImpl serves as a concrete implementation class for dynamic data objects. - * Static data object storage is provided by generated classes, which also directly or indirectly derive from - * this class. - * - *

- *

- * - * @generated - */ -public abstract class DataObjectImpl extends BasicEObjectImpl implements DataObject -{ - protected InternalEObject eContainer; - protected int eContainerFeatureID; - protected SDOChangeRecorder changeRecorder; - protected Object location; // Resource.Internal (if object is directly contained in a resource) or URI (if it is a proxy) - - /** - * - * - * @generated - */ - protected DataObjectImpl() - { - super(); - } - - /** - * - * - * @generated NOT - */ - public Object get(int propertyIndex) - { - return eGet(propertyIndex, true, false); - } - - /** - * - * - * @generated NOT - */ - public void set(int propertyIndex, Object value) - { - eSet(propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public boolean isSet(int propertyIndex) - { - return eIsSet(propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public void unset(int propertyIndex) - { - eUnset(propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public Object get(Property property) - { - return eGet((EStructuralFeature)property, true, false); - } - - /** - * - * - * @generated NOT - */ - public void set(Property property, Object value) - { - eSet((EStructuralFeature)property, value); - } - - /** - * - * - * @generated NOT - */ - public boolean isSet(Property property) - { - return eIsSet((EStructuralFeature)property); - } - - /** - * - * - * @generated NOT - */ - public void unset(Property property) - { - eUnset((EStructuralFeature)property); - } - - /** - * - * - * @generated NOT - */ - public DataObject getContainer() - { - return (DataObject)eContainer(); - } - - /** - * - * - * @generated NOT - */ - public Property getContainmentProperty() - { - return (Property)eContainmentFeature(); - } - - /** - * - * - * @generated NOT - */ - public Type getType() - { - return (Type)eClass(); - } - - /** - * - * - * @generated NOT - */ - public Object writeReplace() throws ObjectStreamException - { - return new ExternalizableDelegator(this); - } - - - // Remaining DataObject methods are (will be) implemented as straight delegation to DataObjectUtil - - /** - * - * - * @generated NOT - */ - public Object get(String path) - { - return DataObjectUtil.get(this, path); - } - - /** - * - * - * @generated NOT - */ - public void set(String path, Object value) - { - DataObjectUtil.set(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public boolean isSet(String path) - { - return DataObjectUtil.isSet(this, path); - } - - /** - * - * - * @generated NOT - */ - public void unset(String path) - { - DataObjectUtil.unset(this, path); - } - - /** - * - * - * @generated NOT - */ - public DataGraph getDataGraph() - { - return DataObjectUtil.getDataGraph(this); - } - - /** - * - * - * @generated NOT - */ - public BigDecimal getBigDecimal(String path) - { - return DataObjectUtil.getBigDecimal(get(path)); - } - - /** - * - * - * @generated NOT - */ - public BigInteger getBigInteger(String path) - { - return DataObjectUtil.getBigInteger(get(path)); - } - - /** - * - * - * @generated NOT - */ - public boolean getBoolean(String path) - { - return DataObjectUtil.getBoolean(get(path)); - } - - /** - * - * - * @generated NOT - */ - public byte getByte(String path) - { - return DataObjectUtil.getByte(get(path)); - } - - /** - * - * - * @generated NOT - */ - public byte[] getBytes(String path) - { - return DataObjectUtil.getBytes(get(path)); - } - - /** - * - * - * @generated NOT - */ - public char getChar(String path) - { - return DataObjectUtil.getChar(get(path)); - } - - /** - * - * - * @generated NOT - */ - public DataObject getDataObject(String path) - { - return (DataObject)get(path); - } - - /** - * - * - * @generated NOT - */ - public Date getDate(String path) - { - return DataObjectUtil.getDate(get(path)); - } - - /** - * - * - * @generated NOT - */ - public double getDouble(String path) - { - return DataObjectUtil.getDouble(get(path)); - } - - /** - * - * - * @generated NOT - */ - public float getFloat(String path) - { - return DataObjectUtil.getFloat(get(path)); - } - - /** - * - * - * @generated NOT - */ - public int getInt(String path) - { - return DataObjectUtil.getInt(get(path)); - } - - /** - * - * - * @generated NOT - */ - public List getList(String path) - { - return (List)get(path); - } - - /** - * - * - * @generated NOT - */ - public long getLong(String path) - { - return DataObjectUtil.getLong(get(path)); - } - - /** - * - * - * @generated NOT - */ - public Sequence getSequence(String path) - { - return (Sequence)get(path); - } - - /** - * - * - * @generated NOT - */ - public short getShort(String path) - { - return DataObjectUtil.getShort(get(path)); - } - - /** - * - * - * @generated NOT - */ - public String getString(String path) - { - return DataObjectUtil.getString(get(path)); - } - - /** - * - * - * @generated NOT - */ - public void setBigDecimal(String path, BigDecimal value) - { - DataObjectUtil.setBigDecimal(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setBigInteger(String path, BigInteger value) - { - DataObjectUtil.setBigInteger(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setBoolean(String path, boolean value) - { - DataObjectUtil.setBoolean(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setByte(String path, byte value) - { - DataObjectUtil.setByte(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setBytes(String path, byte[] value) - { - DataObjectUtil.setBytes(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setChar(String path, char value) - { - DataObjectUtil.setChar(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setDataObject(String path, DataObject value) - { - DataObjectUtil.set(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setDate(String path, Date value) - { - DataObjectUtil.setDate(this,path,value); - } - - /** - * - * - * @generated NOT - */ - public void setDouble(String path, double value) - { - DataObjectUtil.setDouble(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setFloat(String path, float value) - { - DataObjectUtil.setFloat(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setInt(String path, int value) - { - DataObjectUtil.setInt(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setList(String path, List value) - { - DataObjectUtil.set(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setLong(String path, long value) - { - DataObjectUtil.setLong(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setShort(String path, short value) - { - DataObjectUtil.setShort(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public void setString(String path, String value) - { - DataObjectUtil.setString(this, path, value); - } - - /** - * - * - * @generated NOT - */ - public BigDecimal getBigDecimal(int propertyIndex) - { - return DataObjectUtil.getBigDecimal(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public BigInteger getBigInteger(int propertyIndex) - { - return DataObjectUtil.getBigInteger(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public boolean getBoolean(int propertyIndex) - { - return DataObjectUtil.getBoolean(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public byte getByte(int propertyIndex) - { - return DataObjectUtil.getByte(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public byte[] getBytes(int propertyIndex) - { - return DataObjectUtil.getBytes(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public char getChar(int propertyIndex) - { - return DataObjectUtil.getChar(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public DataObject getDataObject(int propertyIndex) - { - return DataObjectUtil.getDataObject(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public Date getDate(int propertyIndex) - { - return DataObjectUtil.getDate(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public double getDouble(int propertyIndex) - { - return DataObjectUtil.getDouble(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public float getFloat(int propertyIndex) - { - return DataObjectUtil.getFloat(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public int getInt(int propertyIndex) - { - return DataObjectUtil.getInt(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public List getList(int propertyIndex) - { - return DataObjectUtil.getList(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public long getLong(int propertyIndex) - { - return DataObjectUtil.getLong(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public Sequence getSequence(int propertyIndex) - { - return DataObjectUtil.getSequence(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public short getShort(int propertyIndex) - { - return DataObjectUtil.getShort(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public String getString(int propertyIndex) - { - return DataObjectUtil.getString(this,propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public void setBigDecimal(int propertyIndex, BigDecimal value) - { - DataObjectUtil.setBigDecimal(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setBigInteger(int propertyIndex, BigInteger value) - { - DataObjectUtil.setBigInteger(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setBoolean(int propertyIndex, boolean value) - { - DataObjectUtil.setBoolean(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setByte(int propertyIndex, byte value) - { - DataObjectUtil.setByte(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setBytes(int propertyIndex, byte[] value) - { - DataObjectUtil.setBytes(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setChar(int propertyIndex, char value) - { - DataObjectUtil.setChar(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setDataObject(int propertyIndex, DataObject value) - { - DataObjectUtil.setDataObject(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setDate(int propertyIndex, Date value) - { - DataObjectUtil.setDate(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setDouble(int propertyIndex, double value) - { - DataObjectUtil.setDouble(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setFloat(int propertyIndex, float value) - { - DataObjectUtil.setFloat(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setInt(int propertyIndex, int value) - { - DataObjectUtil.setInt(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setList(int propertyIndex, List value) - { - DataObjectUtil.setList(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setLong(int propertyIndex, long value) - { - DataObjectUtil.setLong(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setShort(int propertyIndex, short value) - { - DataObjectUtil.setShort(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public void setString(int propertyIndex, String value) - { - DataObjectUtil.setString(this, propertyIndex, value); - } - - /** - * - * - * @generated NOT - */ - public BigDecimal getBigDecimal(Property property) - { - return DataObjectUtil.getBigDecimal(this, property); - } - - /** - * - * - * @generated NOT - */ - public BigInteger getBigInteger(Property property) - { - return DataObjectUtil.getBigInteger(this, property); - } - - /** - * - * - * @generated NOT - */ - public boolean getBoolean(Property property) - { - return DataObjectUtil.getBoolean(this, property); - } - - /** - * - * - * @generated NOT - */ - public byte getByte(Property property) - { - return DataObjectUtil.getByte(this, property); - } - - /** - * - * - * @generated NOT - */ - public byte[] getBytes(Property property) - { - return DataObjectUtil.getBytes(this, property); - } - - /** - * - * - * @generated NOT - */ - public char getChar(Property property) - { - return DataObjectUtil.getChar(this, property); - } - - /** - * - * - * @generated NOT - */ - public DataObject getDataObject(Property property) - { - return (DataObject)DataObjectUtil.getDataObject(this,property); - } - - /** - * - * - * @generated NOT - */ - public Date getDate(Property property) - { - return DataObjectUtil.getDate(this, property); - } - - /** - * - * - * @generated NOT - */ - public double getDouble(Property property) - { - return DataObjectUtil.getDouble(this, property); - } - - /** - * - * - * @generated NOT - */ - public float getFloat(Property property) - { - return DataObjectUtil.getFloat(this, property); - } - - /** - * - * - * @generated NOT - */ - public int getInt(Property property) - { - return DataObjectUtil.getInt(this, property); - } - - /** - * - * - * @generated NOT - */ - public List getList(Property property) - { - return (List)DataObjectUtil.getList(this, property); - } - - /** - * - * - * @generated NOT - */ - public long getLong(Property property) - { - return DataObjectUtil.getLong(this, property); - } - - /** - * - * - * @generated NOT - */ - public Sequence getSequence(Property property) - { - return (Sequence)DataObjectUtil.getSequence(this, property); - } - - /** - * - * - * @generated NOT - */ - public short getShort(Property property) - { - return DataObjectUtil.getShort(this, property); - } - - /** - * - * - * @generated NOT - */ - public String getString(Property property) - { - return DataObjectUtil.getString(this, property); - } - - /** - * - * - * @generated NOT - */ - public void setBigDecimal(Property property, BigDecimal value) - { - DataObjectUtil.setBigDecimal(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setBigInteger(Property property, BigInteger value) - { - DataObjectUtil.setBigInteger(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setBoolean(Property property, boolean value) - { - DataObjectUtil.setBoolean(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setByte(Property property, byte value) - { - DataObjectUtil.setByte(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setBytes(Property property, byte[] value) - { - DataObjectUtil.setBytes(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setChar(Property property, char value) - { - DataObjectUtil.setChar(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setDataObject(Property property, DataObject value) - { - DataObjectUtil.setDataObject(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setDate(Property property, Date value) - { - DataObjectUtil.setDate(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setDouble(Property property, double value) - { - DataObjectUtil.setDouble(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setFloat(Property property, float value) - { - DataObjectUtil.setFloat(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setInt(Property property, int value) - { - DataObjectUtil.setInt(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setList(Property property, List value) - { - DataObjectUtil.setList(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setLong(Property property, long value) - { - DataObjectUtil.setLong(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setShort(Property property, short value) - { - DataObjectUtil.setShort(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public void setString(Property property, String value) - { - DataObjectUtil.setString(this,property, value); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(String propertyName) - { - return DataObjectUtil.createDataObject(this, propertyName); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(int propertyIndex) - { - return DataObjectUtil.createDataObject(this, propertyIndex); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(Property property) - { - return DataObjectUtil.createDataObject(this,property); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(String propertyName, String namespaceURI, String typeName) - { - return DataObjectUtil.createDataObject(this, propertyName, namespaceURI, typeName); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName) - { - return DataObjectUtil.createDataObject(this, propertyIndex, namespaceURI, typeName); - } - - /** - * - * - * @generated NOT - */ - public DataObject createDataObject(Property property, Type type) - { - return DataObjectUtil.createDataObject(this, property, type); - } - - /** - * - * - * @generated NOT - */ - public void delete() - { - DataObjectUtil.delete(this); - } - - /** - * - * - * @generated NOT - */ - public Sequence getSequence() - { - EAttribute mixedFeature = BasicExtendedMetaData.INSTANCE.getMixedFeature(eClass()); - return mixedFeature != null ? (Sequence)eGet(mixedFeature, true, false) : null; - } - - /** - * - * - * @generated NOT - */ - public List getInstanceProperties() - { - return DataObjectUtil.getInstanceProperties(this); - } - - /** - * - * - * @generated NOT - */ - public Property getProperty(String propertyName) - { - return DataObjectUtil.getProperty(this, propertyName); - } - - /** - * - * - * @generated NOT - */ - public DataObject getRootObject() - { - return DataObjectUtil.getRootObject(this); - } - - /** - * - * - * @generated NOT - */ - public ChangeSummary getChangeSummary() - { - return DataObjectUtil.getChangeSummary(this); - } - - /** - * - * - * @generated NOT - */ - public void detach() - { - DataObjectUtil.detach(this); - } - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Following methods customize BasicEObjectImpl, optimized for SDO - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getDataObject(); - } - - public boolean eNotificationRequired() - { - return changeRecorder != null; - } - - public void eNotify(Notification notification) - { - changeRecorder.notifyChanged(notification); - } - - public void setChangeRecorder(SDOChangeRecorder changeRecorder) - { - if (this.changeRecorder != null) - { - this.changeRecorder.unsetTarget(this); - } - - if (changeRecorder != null) - { - changeRecorder.setTarget(this); - } - - this.changeRecorder = changeRecorder; - } - - public InternalEObject eInternalContainer() - { - return eContainer; - } - - public int eContainerFeatureID() - { - return eContainerFeatureID; - } - - protected void eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID) - { - eContainer = newContainer; - eContainerFeatureID = newContainerFeatureID; - } - - public EClass eClass() - { - return eStaticClass(); - } - - public EList eContents() - { - return new EContentsEList(this); - } - - public EList eCrossReferences() - { - return new ECrossReferenceEList(this); - } - - public Resource.Internal eDirectResource() - { - return location instanceof Resource.Internal ? (Resource.Internal)location : null; - } - - protected EClass eDynamicClass() - { - return null; - } - - protected boolean eHasSettings() - { - return false; - } - - public boolean eIsProxy() - { - return location instanceof URI; - } - - public URI eProxyURI() - { - return location instanceof URI ? (URI)location : null; - } - - public void eSetClass(EClass eClass) - { - throw new UnsupportedOperationException(); - } - - protected void eSetDirectResource(Resource.Internal resource) - { - location = resource; - } - - public void eSetProxyURI(URI uri) - { - location = uri; - } - - protected DynamicValueHolder eSettings() - { - return null; - } - - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - return eDynamicGet(featureID, resolve, coreType); - } - - public void eSet(int featureID, Object newValue) - { - eDynamicSet(featureID, newValue); - } - - public void eUnset(int featureID) - { - eDynamicUnset(featureID); - } - - public boolean eIsSet(int featureID) - { - return eDynamicIsSet(featureID); - } - - public Object eDynamicGet(int featureID, boolean resolve, boolean coreType) - { - return eOpenGet(DataObjectUtil.getOpenFeature(this, featureID), resolve); - } - - public void eDynamicSet(int featureID, Object newValue) - { - eOpenSet(DataObjectUtil.getOpenFeature(this, featureID), newValue); - } - - public void eDynamicUnset(int featureID) - { - eOpenUnset(DataObjectUtil.getOpenFeature(this, featureID)); - } - - public boolean eDynamicIsSet(int featureID) - { - return eOpenIsSet(DataObjectUtil.getOpenFeature(this, featureID)); - } - - /* - public int eDerivedStructuralFeatureID(EStructuralFeature eStructuralFeature) - { - Class containerClass = eStructuralFeature.getContainerClass(); - return - containerClass == null ? - eClass().getFeatureID(eStructuralFeature) : - containerClass.isInstance(this) ? - eDerivedStructuralFeatureID(eStructuralFeature.getFeatureID(), containerClass) : - -1; - } - - public void eOpenSet(EStructuralFeature eFeature, Object newValue) - { - EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); - if (openFeature == null) - { - openFeature = (EStructuralFeature)eClass().getEStructuralFeature("any"); - } - if (openFeature != null) - { - if (!FeatureMapUtil.isFeatureMap(openFeature)) - { - openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); - } - FeatureMap featureMap = (FeatureMap)eGet(openFeature); - ((FeatureMap.Internal)featureMap).set(eFeature, newValue); - } - else - { - throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); - } - } - */ - -} //DataObjectImpl - diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataTypeImpl.java deleted file mode 100644 index 18e1c3a19b..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DataTypeImpl.java +++ /dev/null @@ -1,750 +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.impl; - -import java.util.Collections; -import java.util.List; - -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.impl.EDataTypeImpl; -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 'Data 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 EcorePackage.eINSTANCE.getEDataType(); - } - - /** - * - * - * @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; - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // 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 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java deleted file mode 100644 index dd9cdfa779..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicDataObjectImpl.java +++ /dev/null @@ -1,196 +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.impl; - -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; - -/** - * - * 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); - } - - /** - * - * - * @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); - eDynamicSet(featureID, eFeature, newValue); - } - else - { - super.eDynamicSet(featureID, newValue); - } - } - - public void eDynamicUnset(int featureID) - { - if (featureID < eClass().getFeatureCount()) - { - EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID); - eDynamicUnset(featureID, eFeature); - } - 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java deleted file mode 100644 index d3b709c070..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/DynamicStoreDataObjectImpl.java +++ /dev/null @@ -1,88 +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.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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java deleted file mode 100644 index 56e7eadcea..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/EnumImpl.java +++ /dev/null @@ -1,170 +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.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; - } - -} //EnumTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java deleted file mode 100644 index e57fb54544..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/FactoryBase.java +++ /dev/null @@ -1,214 +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.impl; - -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -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.impl.EClassImpl; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Type; - -/** - */ -public class FactoryBase extends EPackageImpl -{ - protected FactoryBase(String namespaceURI, String namespacePrefix) - { - super(new SDOEFactoryImpl()); - - int index = namespacePrefix.lastIndexOf("."); - setName(index != -1 ? namespacePrefix.substring(index + 1) : namespacePrefix); - setNsPrefix(namespacePrefix); - - createResource(namespaceURI); - setNsURI(namespaceURI); - //FIXME ... figure out proper (scoped) way to register static packages - EPackage.Registry.INSTANCE.put(namespaceURI, this); - - ((SDOEFactoryImpl)getEFactoryInstance()).sdoFactory = this; - } - - public DataObject create(int typeNumber) - { - return null; - } - - 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 propertyNumber) - { - if (isDataType) - createEAttribute((EClass)containingType, propertyNumber); - else - createEReference((EClass)containingType, propertyNumber); - } - - protected void initializeType(Type type, Class instanceClass, String name) - { - initEClass((EClass)type, instanceClass, name, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - } - - 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, (EClassifier)type, 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 createXSDMetaData() - { - createDocumentRoot(); - } - - 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 createGlobalProperty(String name, Type type, String[] xsdMappings) - { - int propertyNumber = documentRootEClass.getEStructuralFeatures().size(); - createEReference(documentRootEClass, propertyNumber); - EReference globalProperty = (EReference)documentRootEClass.getEStructuralFeatures().get(propertyNumber); - initEReference(globalProperty, (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); - addAnnotation((ENamedElement)globalProperty, ANNOTATION_SOURCE, xsdMappings); - } - - protected Type getSequence() { - return (Type)ecorePackage.getEFeatureMapEntry(); - } - - //public static FactoryBase getStaticFactory(String namespaceURI) - // temporarily return Object - until everything is gen'd with new codegen pattern - 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 EFactoryImpl - { - protected FactoryBase sdoFactory; - - public SDOEFactoryImpl() - { - super(); - } - - public EObject create(EClass eClass) - { - DataObject result = sdoFactory.create(eClass.getClassifierID()); - if (result == null) { - return super.create(eClass); - } - return (EObject)result; - } - } - - 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java deleted file mode 100644 index a3536f4230..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ReferenceImpl.java +++ /dev/null @@ -1,698 +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.impl; - -import java.util.List; - -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.EReferenceImpl; - -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 EcorePackage.eINSTANCE.getEReference(); - } - - /** - * - * - * @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? - } - - protected List aliasNames = null; - - /** - * - * - * @generated NOT - */ - public List getAliasNames() - { - if (aliasNames == null) - { - aliasNames = DataObjectUtil.getAliasNames(this); - } - return aliasNames; - } - - /** - * - * - * @generated NOT - */ - public Type getType() - { - // Note that Property.getType() conflicts with DataObject.getType(), so we can only implement - // it one way or the other here. We're implementing it to return the property type so it will - // return the wrong type when the caller is using the DataObject interface. Not much we can - // do about it tho. -- James Snell - return (Type)getEType(); - } - - /** - * - * - * @generated NOT - */ - public Type getContainingType() - { - return (Type)getEContainingClass(); - } - - /** - * - * - * @generated NOT - */ - public Property getOpposite() - { - return (Property)getEOpposite(); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // 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(); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////// - // 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java deleted file mode 100644 index db60094adc..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOFactoryImpl.java +++ /dev/null @@ -1,325 +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.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.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.EFactoryImpl; -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -import org.eclipse.emf.ecore.impl.EcoreFactoryImpl; - -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 - */ - public static SDOFactory init() - { - try - { - SDOFactory theSDOFactory = (SDOFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/2003/SDO"); - 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(); - 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 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java deleted file mode 100644 index 15011fc37f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SDOPackageImpl.java +++ /dev/null @@ -1,2133 +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.impl; - -import java.io.ObjectStreamException; -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.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.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 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 - */ - private SDOPackageImpl() - { - super(eNS_URI, SDOFactory.eINSTANCE); - } - - /** - * - * - * @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. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SDOPackage init() - { - if (isInited) return (SDOPackage)EPackage.Registry.INSTANCE.getEPackage(SDOPackage.eNS_URI); - - // Obtain or create and register package - SDOPackageImpl theSDOPackage = (SDOPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SDOPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SDOPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - EcorePackageImpl.init(); - XMLTypePackageImpl.init(); - ChangePackageImpl.init(); - - // Create package meta-data objects - theSDOPackage.createPackageContents(); - - // Initialize created meta-data - theSDOPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSDOPackage.freeze(); - - return theSDOPackage; - } - - /** - * - * - * @generated - */ - public EClass getChangeSummary() - { - return changeSummaryEClass; - } - - /** - * - * - * @generated - */ - public EReference getChangeSummary_EDataGraph() - { - return (EReference)changeSummaryEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getChangeSummarySetting() - { - return changeSummarySettingEClass; - } - - /** - * - * - * @generated - */ - public EClass getDataGraph() - { - return dataGraphEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getDataGraph_ResourceSet() - { - return (EAttribute)dataGraphEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getDataGraph_RootResource() - { - return (EAttribute)dataGraphEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getDataGraph_EChangeSummary() - { - return (EReference)dataGraphEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getDataGraph_ERootObject() - { - return (EReference)dataGraphEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getDataObject() - { - return dataObjectEClass; - } - - /** - * - * - * @generated - */ - public EClass getProperty() - { - return propertyEClass; - } - - /** - * - * - * @generated - */ - public EClass getSequence() - { - return sequenceEClass; - } - - /** - * - * - * @generated - */ - public EClass getType() - { - return typeEClass; - } - - /** - * - * - * @generated - */ - public EClass getAnyTypeDataObject() - { - return anyTypeDataObjectEClass; - } - - /** - * - * - * @generated - */ - public EClass getSimpleAnyTypeDataObject() - { - return simpleAnyTypeDataObjectEClass; - } - - /** - * - * - * @generated - */ - public EClass getClass_() - { - return classEClass; - } - - /** - * - * - * @generated - */ - public EClass getDataType() - { - return dataTypeEClass; - } - - /** - * - * - * @generated - */ - public EClass getAttribute() - { - return attributeEClass; - } - - /** - * - * - * @generated - */ - public EClass getReference() - { - return referenceEClass; - } - - /** - * - * - * @generated - */ - public EClass getEnum() - { - return enumEClass; - } - - /** - * - * - * @generated - */ - public EClass getDynamicDataObject() - { - return dynamicDataObjectEClass; - } - - /** - * - * - * @generated - */ - public EClass getStoreDataObject() - { - return storeDataObjectEClass; - } - - /** - * - * - * @generated - */ - public EClass getDynamicStoreDataObject() - { - return dynamicStoreDataObjectEClass; - } - - /** - * - * - * @generated - */ - public EDataType getEJavaList() - { - return eJavaListEDataType; - } - - /** - * - * - * @generated - */ - public EDataType getEObjectStreamException() - { - return eObjectStreamExceptionEDataType; - } - - /** - * - * - * @generated - */ - public SDOFactory getSDOFactory() - { - return (SDOFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - changeSummaryEClass = createEClass(CHANGE_SUMMARY); - createEReference(changeSummaryEClass, CHANGE_SUMMARY__EDATA_GRAPH); - - changeSummarySettingEClass = createEClass(CHANGE_SUMMARY_SETTING); - - dataGraphEClass = createEClass(DATA_GRAPH); - createEAttribute(dataGraphEClass, DATA_GRAPH__RESOURCE_SET); - createEAttribute(dataGraphEClass, DATA_GRAPH__ROOT_RESOURCE); - createEReference(dataGraphEClass, DATA_GRAPH__ECHANGE_SUMMARY); - createEReference(dataGraphEClass, DATA_GRAPH__EROOT_OBJECT); - - dataObjectEClass = createEClass(DATA_OBJECT); - - propertyEClass = createEClass(PROPERTY); - - sequenceEClass = createEClass(SEQUENCE); - - typeEClass = createEClass(TYPE); - - anyTypeDataObjectEClass = createEClass(ANY_TYPE_DATA_OBJECT); - - simpleAnyTypeDataObjectEClass = createEClass(SIMPLE_ANY_TYPE_DATA_OBJECT); - - classEClass = createEClass(CLASS); - - dataTypeEClass = createEClass(DATA_TYPE); - - attributeEClass = createEClass(ATTRIBUTE); - - referenceEClass = createEClass(REFERENCE); - - enumEClass = createEClass(ENUM); - - dynamicDataObjectEClass = createEClass(DYNAMIC_DATA_OBJECT); - - storeDataObjectEClass = createEClass(STORE_DATA_OBJECT); - - dynamicStoreDataObjectEClass = createEClass(DYNAMIC_STORE_DATA_OBJECT); - - // Create data types - eJavaListEDataType = createEDataType(EJAVA_LIST); - eObjectStreamExceptionEDataType = createEDataType(EOBJECT_STREAM_EXCEPTION); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - ChangePackageImpl theChangePackage = (ChangePackageImpl)EPackage.Registry.INSTANCE.getEPackage(ChangePackage.eNS_URI); - EcorePackageImpl theEcorePackage = (EcorePackageImpl)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); - XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - - // Add supertypes to classes - changeSummaryEClass.getESuperTypes().add(theChangePackage.getChangeDescription()); - changeSummarySettingEClass.getESuperTypes().add(theChangePackage.getFeatureChange()); - dataGraphEClass.getESuperTypes().add(theEcorePackage.getEObject()); - anyTypeDataObjectEClass.getESuperTypes().add(this.getDataObject()); - anyTypeDataObjectEClass.getESuperTypes().add(theXMLTypePackage.getAnyType()); - simpleAnyTypeDataObjectEClass.getESuperTypes().add(this.getAnyTypeDataObject()); - simpleAnyTypeDataObjectEClass.getESuperTypes().add(theXMLTypePackage.getSimpleAnyType()); - classEClass.getESuperTypes().add(theEcorePackage.getEClass()); - classEClass.getESuperTypes().add(this.getType()); - dataTypeEClass.getESuperTypes().add(theEcorePackage.getEDataType()); - dataTypeEClass.getESuperTypes().add(this.getType()); - attributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute()); - attributeEClass.getESuperTypes().add(this.getProperty()); - referenceEClass.getESuperTypes().add(theEcorePackage.getEReference()); - referenceEClass.getESuperTypes().add(this.getProperty()); - enumEClass.getESuperTypes().add(theEcorePackage.getEEnum()); - enumEClass.getESuperTypes().add(this.getType()); - dynamicDataObjectEClass.getESuperTypes().add(this.getDataObject()); - storeDataObjectEClass.getESuperTypes().add(this.getDataObject()); - dynamicStoreDataObjectEClass.getESuperTypes().add(this.getStoreDataObject()); - - // Initialize classes and features; add operations and parameters - initEClass(changeSummaryEClass, ChangeSummary.class, "ChangeSummary", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEReference(getChangeSummary_EDataGraph(), this.getDataGraph(), this.getDataGraph_EChangeSummary(), "eDataGraph", null, 1, 1, ChangeSummary.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - addEOperation(changeSummaryEClass, null, "beginLogging"); - - addEOperation(changeSummaryEClass, null, "endLogging"); - - EOperation op = addEOperation(changeSummaryEClass, ecorePackage.getEBoolean(), "isCreated"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, ecorePackage.getEBoolean(), "isDeleted"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, this.getEJavaList(), "getOldValues"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, ecorePackage.getEBoolean(), "isModified"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, this.getChangeSummarySetting(), "getOldValue"); - addEParameter(op, this.getDataObject(), "dataObject"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(changeSummaryEClass, this.getDataObject(), "getOldContainer"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, this.getProperty(), "getOldContainmentProperty"); - addEParameter(op, this.getDataObject(), "dataObject"); - - op = addEOperation(changeSummaryEClass, this.getSequence(), "getOldSequence"); - addEParameter(op, this.getDataObject(), "dataObject"); - - addEOperation(changeSummaryEClass, null, "undoChanges"); - - addEOperation(changeSummaryEClass, ecorePackage.getEBoolean(), "isLogging"); - - addEOperation(changeSummaryEClass, this.getDataGraph(), "getDataGraph"); - - addEOperation(changeSummaryEClass, this.getEJavaList(), "getChangedObjects"); - - addEOperation(changeSummaryEClass, this.getDataObject(), "getRootObject"); - - initEClass(changeSummarySettingEClass, ChangeSummary.Setting.class, "ChangeSummarySetting", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - addEOperation(changeSummarySettingEClass, ecorePackage.getEBoolean(), "isSet"); - - addEOperation(changeSummarySettingEClass, theEcorePackage.getEJavaObject(), "getValue"); - - addEOperation(changeSummarySettingEClass, this.getProperty(), "getProperty"); - - initEClass(dataGraphEClass, DataGraph.class, "DataGraph", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDataGraph_ResourceSet(), theEcorePackage.getEResourceSet(), "resourceSet", null, 0, 1, DataGraph.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDataGraph_RootResource(), theEcorePackage.getEResource(), "rootResource", null, 0, 1, DataGraph.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getDataGraph_EChangeSummary(), this.getChangeSummary(), this.getChangeSummary_EDataGraph(), "eChangeSummary", null, 1, 1, DataGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDataGraph_ERootObject(), theEcorePackage.getEObject(), null, "eRootObject", null, 1, 1, DataGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - op = addEOperation(dataGraphEClass, this.getDataObject(), "createRootObject"); - addEParameter(op, ecorePackage.getEString(), "namespaceURI"); - addEParameter(op, ecorePackage.getEString(), "typeName"); - - op = addEOperation(dataGraphEClass, this.getDataObject(), "createRootObject"); - addEParameter(op, this.getType(), "type"); - - op = addEOperation(dataGraphEClass, this.getType(), "getType"); - addEParameter(op, ecorePackage.getEString(), "namespaceURI"); - addEParameter(op, ecorePackage.getEString(), "typeName"); - - addEOperation(dataGraphEClass, this.getDataObject(), "getRootObject"); - - addEOperation(dataGraphEClass, this.getChangeSummary(), "getChangeSummary"); - - initEClass(dataObjectEClass, DataObject.class, "DataObject", IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEJavaObject(), "get"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, null, "set"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "isSet"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, null, "unset"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEJavaObject(), "get"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, null, "set"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "isSet"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, null, "unset"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEJavaObject(), "get"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, null, "set"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "isSet"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, null, "unset"); - addEParameter(op, this.getProperty(), "property"); - - addEOperation(dataObjectEClass, this.getDataObject(), "getContainer"); - - addEOperation(dataObjectEClass, this.getProperty(), "getContainmentProperty"); - - addEOperation(dataObjectEClass, this.getDataGraph(), "getDataGraph"); - - addEOperation(dataObjectEClass, this.getType(), "getType"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigDecimal(), "getBigDecimal"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigInteger(), "getBigInteger"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "getBoolean"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEByte(), "getByte"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEByteArray(), "getBytes"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEChar(), "getChar"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "getDataObject"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEDate(), "getDate"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEDouble(), "getDouble"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEFloat(), "getFloat"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEInt(), "getInt"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, this.getEJavaList(), "getList"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getELong(), "getLong"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, this.getSequence(), "getSequence"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEShort(), "getShort"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEString(), "getString"); - addEParameter(op, ecorePackage.getEString(), "path"); - - op = addEOperation(dataObjectEClass, null, "setBigDecimal"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, theEcorePackage.getEBigDecimal(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBigInteger"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, theEcorePackage.getEBigInteger(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBoolean"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEBoolean(), "value"); - - op = addEOperation(dataObjectEClass, null, "setByte"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEByte(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBytes"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, theEcorePackage.getEByteArray(), "value"); - - op = addEOperation(dataObjectEClass, null, "setChar"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEChar(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDataObject"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, this.getDataObject(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDate"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, theEcorePackage.getEDate(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDouble"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEDouble(), "value"); - - op = addEOperation(dataObjectEClass, null, "setFloat"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEFloat(), "value"); - - op = addEOperation(dataObjectEClass, null, "setInt"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEInt(), "value"); - - op = addEOperation(dataObjectEClass, null, "setList"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, this.getEJavaList(), "value"); - - op = addEOperation(dataObjectEClass, null, "setLong"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getELong(), "value"); - - op = addEOperation(dataObjectEClass, null, "setShort"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEShort(), "value"); - - op = addEOperation(dataObjectEClass, null, "setString"); - addEParameter(op, ecorePackage.getEString(), "path"); - addEParameter(op, ecorePackage.getEString(), "value"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigDecimal(), "getBigDecimal"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigInteger(), "getBigInteger"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "getBoolean"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEByte(), "getByte"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEByteArray(), "getBytes"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEChar(), "getChar"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "getDataObject"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEDate(), "getDate"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEDouble(), "getDouble"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEFloat(), "getFloat"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEInt(), "getInt"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, this.getEJavaList(), "getList"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getELong(), "getLong"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, this.getSequence(), "getSequence"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEShort(), "getShort"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEString(), "getString"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, null, "setBigDecimal"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEBigDecimal(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBigInteger"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEBigInteger(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBoolean"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEBoolean(), "value"); - - op = addEOperation(dataObjectEClass, null, "setByte"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEByte(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBytes"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEByteArray(), "value"); - - op = addEOperation(dataObjectEClass, null, "setChar"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEChar(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDataObject"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, this.getDataObject(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDate"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEDate(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDouble"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEDouble(), "value"); - - op = addEOperation(dataObjectEClass, null, "setFloat"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEFloat(), "value"); - - op = addEOperation(dataObjectEClass, null, "setInt"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEInt(), "value"); - - op = addEOperation(dataObjectEClass, null, "setList"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, this.getEJavaList(), "value"); - - op = addEOperation(dataObjectEClass, null, "setLong"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getELong(), "value"); - - op = addEOperation(dataObjectEClass, null, "setShort"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEShort(), "value"); - - op = addEOperation(dataObjectEClass, null, "setString"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEString(), "value"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigDecimal(), "getBigDecimal"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEBigInteger(), "getBigInteger"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEBoolean(), "getBoolean"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEByte(), "getByte"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEByteArray(), "getBytes"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEChar(), "getChar"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "getDataObject"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, theEcorePackage.getEDate(), "getDate"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEDouble(), "getDouble"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEFloat(), "getFloat"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEInt(), "getInt"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, this.getEJavaList(), "getList"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getELong(), "getLong"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, this.getSequence(), "getSequence"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEShort(), "getShort"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, ecorePackage.getEString(), "getString"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, null, "setBigDecimal"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEBigDecimal(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBigInteger"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEBigInteger(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBoolean"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEBoolean(), "value"); - - op = addEOperation(dataObjectEClass, null, "setByte"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEByte(), "value"); - - op = addEOperation(dataObjectEClass, null, "setBytes"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEByteArray(), "value"); - - op = addEOperation(dataObjectEClass, null, "setChar"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEChar(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDataObject"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, this.getDataObject(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDate"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEDate(), "value"); - - op = addEOperation(dataObjectEClass, null, "setDouble"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEDouble(), "value"); - - op = addEOperation(dataObjectEClass, null, "setFloat"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEFloat(), "value"); - - op = addEOperation(dataObjectEClass, null, "setInt"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEInt(), "value"); - - op = addEOperation(dataObjectEClass, null, "setList"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, this.getEJavaList(), "value"); - - op = addEOperation(dataObjectEClass, null, "setLong"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getELong(), "value"); - - op = addEOperation(dataObjectEClass, null, "setShort"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEShort(), "value"); - - op = addEOperation(dataObjectEClass, null, "setString"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, ecorePackage.getEString(), "value"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, this.getProperty(), "property"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - addEParameter(op, ecorePackage.getEString(), "namespaceURI"); - addEParameter(op, ecorePackage.getEString(), "typeName"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, ecorePackage.getEString(), "namespaceURI"); - addEParameter(op, ecorePackage.getEString(), "typeName"); - - op = addEOperation(dataObjectEClass, this.getDataObject(), "createDataObject"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, this.getType(), "type"); - - addEOperation(dataObjectEClass, null, "delete"); - - addEOperation(dataObjectEClass, this.getSequence(), "getSequence"); - - addEOperation(dataObjectEClass, this.getEJavaList(), "getInstanceProperties"); - - op = addEOperation(dataObjectEClass, this.getProperty(), "getProperty"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - - addEOperation(dataObjectEClass, this.getDataObject(), "getRootObject"); - - addEOperation(dataObjectEClass, this.getChangeSummary(), "getChangeSummary"); - - addEOperation(dataObjectEClass, null, "detach"); - - initEClass(propertyEClass, Property.class, "Property", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - addEOperation(propertyEClass, ecorePackage.getEString(), "getName"); - - addEOperation(propertyEClass, this.getType(), "getType"); - - addEOperation(propertyEClass, ecorePackage.getEBoolean(), "isMany"); - - addEOperation(propertyEClass, ecorePackage.getEBoolean(), "isContainment"); - - addEOperation(propertyEClass, ecorePackage.getEBoolean(), "isReadOnly"); - - addEOperation(propertyEClass, this.getType(), "getContainingType"); - - addEOperation(propertyEClass, this.getEJavaList(), "getAliasNames"); - - addEOperation(propertyEClass, this.getProperty(), "getOpposite"); - - addEOperation(propertyEClass, theEcorePackage.getEJavaObject(), "getDefault"); - - initEClass(sequenceEClass, Sequence.class, "Sequence", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - addEOperation(sequenceEClass, ecorePackage.getEInt(), "size"); - - op = addEOperation(sequenceEClass, this.getProperty(), "getProperty"); - addEParameter(op, ecorePackage.getEInt(), "index"); - - op = addEOperation(sequenceEClass, theEcorePackage.getEJavaObject(), "getValue"); - addEParameter(op, ecorePackage.getEInt(), "index"); - - op = addEOperation(sequenceEClass, theEcorePackage.getEJavaObject(), "setValue"); - addEParameter(op, ecorePackage.getEInt(), "index"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, ecorePackage.getEBoolean(), "add"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, ecorePackage.getEBoolean(), "add"); - addEParameter(op, ecorePackage.getEInt(), "propertIndex"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, ecorePackage.getEBoolean(), "add"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, null, "add"); - addEParameter(op, ecorePackage.getEInt(), "index"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, null, "add"); - addEParameter(op, ecorePackage.getEInt(), "index"); - addEParameter(op, ecorePackage.getEInt(), "propertyIndex"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, null, "add"); - addEParameter(op, ecorePackage.getEInt(), "index"); - addEParameter(op, this.getProperty(), "property"); - addEParameter(op, theEcorePackage.getEJavaObject(), "value"); - - op = addEOperation(sequenceEClass, null, "add"); - addEParameter(op, ecorePackage.getEString(), "text"); - - op = addEOperation(sequenceEClass, null, "add"); - addEParameter(op, ecorePackage.getEInt(), "index"); - addEParameter(op, ecorePackage.getEString(), "text"); - - initEClass(typeEClass, Type.class, "Type", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - addEOperation(typeEClass, ecorePackage.getEString(), "getName"); - - addEOperation(typeEClass, ecorePackage.getEString(), "getURI"); - - addEOperation(typeEClass, theEcorePackage.getEJavaClass(), "getInstanceClass"); - - op = addEOperation(typeEClass, ecorePackage.getEBoolean(), "isInstance"); - addEParameter(op, theEcorePackage.getEJavaObject(), "object"); - - addEOperation(typeEClass, ecorePackage.getEBoolean(), "isDataType"); - - addEOperation(typeEClass, ecorePackage.getEBoolean(), "isSequenced"); - - addEOperation(typeEClass, ecorePackage.getEBoolean(), "isOpen"); - - addEOperation(typeEClass, ecorePackage.getEBoolean(), "isAbstract"); - - addEOperation(typeEClass, this.getEJavaList(), "getBaseTypes"); - - addEOperation(typeEClass, this.getEJavaList(), "getAliasNames"); - - addEOperation(typeEClass, this.getEJavaList(), "getProperties"); - - addEOperation(typeEClass, this.getEJavaList(), "getDeclaredProperties"); - - op = addEOperation(typeEClass, this.getProperty(), "getProperty"); - addEParameter(op, ecorePackage.getEString(), "propertyName"); - - initEClass(anyTypeDataObjectEClass, AnyTypeDataObject.class, "AnyTypeDataObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(simpleAnyTypeDataObjectEClass, SimpleAnyTypeDataObject.class, "SimpleAnyTypeDataObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(classEClass, Type.class, "Class", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(dataTypeEClass, Type.class, "DataType", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(attributeEClass, Property.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(referenceEClass, Property.class, "Reference", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(enumEClass, Type.class, "Enum", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(dynamicDataObjectEClass, DataObject.class, "DynamicDataObject", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(storeDataObjectEClass, DataObject.class, "StoreDataObject", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - initEClass(dynamicStoreDataObjectEClass, DataObject.class, "DynamicStoreDataObject", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - - // Initialize data types - initEDataType(eJavaListEDataType, List.class, "EJavaList", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(eObjectStreamExceptionEDataType, ObjectStreamException.class, "EObjectStreamException", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http://www.eclipse.org/emf/2002/GenModel - createGenModelAnnotations(); - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http://www.eclipse.org/emf/2002/GenModel. - * - * - * @generated - */ - protected void createGenModelAnnotations() - { - String source = "http://www.eclipse.org/emf/2002/GenModel"; - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(0), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.get(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(1), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.set(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(2), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(3), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.unset(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(4), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.get(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(5), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.set(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(6), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(7), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.unset(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(8), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.get(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(9), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.set(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(10), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.isSet(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(11), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.unset(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(12), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getContainer(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(13), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getContainmentProperty(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(14), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDataGraph(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(15), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getType(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(16), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(17), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(18), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(19), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(20), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(21), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(22), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(23), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(24), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(25), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(26), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(27), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getList(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(28), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(29), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(30), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(31), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getString(this, path);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(32), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(33), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(34), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(35), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setByte(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(36), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(37), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setChar(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(38), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(39), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDate(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(40), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(41), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(42), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setInt(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(43), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setList(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(44), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setLong(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(45), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setShort(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(46), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setString(this, path, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(47), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(48), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(49), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(50), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(51), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(52), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(53), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(54), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(55), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(56), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(57), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(58), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getList(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(59), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(60), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(61), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(62), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getString(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(63), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(64), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(65), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(66), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setByte(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(67), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(68), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setChar(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(69), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(70), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDate(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(71), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(72), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(73), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setInt(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(74), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setList(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(75), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setLong(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(76), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setShort(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(77), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setString(this, propertyIndex, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(78), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigDecimal(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(79), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBigInteger(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(80), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBoolean(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(81), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getByte(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(82), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getBytes(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(83), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getChar(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(84), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDataObject(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(85), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDate(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(86), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getDouble(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(87), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getFloat(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(88), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getInt(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(89), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getList(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(90), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getLong(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(91), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(92), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getShort(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(93), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getString(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(94), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigDecimal(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(95), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBigInteger(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(96), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBoolean(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(97), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setByte(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(98), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setBytes(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(99), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setChar(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(100), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDataObject(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(101), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDate(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(102), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setDouble(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(103), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setFloat(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(104), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setInt(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(105), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setList(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(106), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setLong(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(107), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setShort(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(108), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.setString(this, property, value);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(109), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyName);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(110), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyIndex);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(111), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, property);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(112), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyName, namespaceURI, typeName);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(113), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, propertyIndex, namespaceURI, typeName);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(114), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.createDataObject(this, property, type);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(115), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.delete(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(116), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getSequence(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(117), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getInstanceProperties(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(118), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getProperty(this, propertyName);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(119), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getRootObject(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(120), - source, - new String[] - { - "body", "return <%org.apache.sdo.util.SDOUtil%>.getChangeSummary(this);" - }); - addAnnotation - ((EOperation)dataObjectEClass.getEOperations().get(121), - source, - new String[] - { - "body", "<%org.apache.sdo.util.SDOUtil%>.detach(this);" - }); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() - { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (anyTypeDataObjectEClass, - source, - new String[] - { - "kind", "mixed" - }); - addAnnotation - (simpleAnyTypeDataObjectEClass, - source, - new String[] - { - "kind", "simple" - }); - } - -} //SDOPackageImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SimpleAnyTypeDataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SimpleAnyTypeDataObjectImpl.java deleted file mode 100644 index 33ca015ac9..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/SimpleAnyTypeDataObjectImpl.java +++ /dev/null @@ -1,330 +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.impl; - -import java.util.Iterator; - -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.SimpleAnyTypeDataObject; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.xml.type.SimpleAnyType; -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -/** - * - * An implementation of the model object 'EData Object Simple Any Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.impl.SimpleAnyTypeDataObjectImpl#getRawValue Raw Value}
  • - *
  • {@link org.apache.tuscany.sdo.impl.SimpleAnyTypeDataObjectImpl#getValue Value}
  • - *
  • {@link org.apache.tuscany.sdo.impl.SimpleAnyTypeDataObjectImpl#getInstanceType Instance Type}
  • - *
- *

- * - * @generated - */ -public class SimpleAnyTypeDataObjectImpl extends AnyTypeDataObjectImpl implements SimpleAnyTypeDataObject -{ - /** - * The default value of the '{@link #getRawValue() Raw Value}' attribute. - * - * - * @see #getRawValue() - * @generated - * @ordered - */ - protected static final String RAW_VALUE_EDEFAULT = null; - - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final Object VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getInstanceType() Instance Type}' reference. - * - * - * @see #getInstanceType() - * @generated - * @ordered - */ - protected EDataType instanceType = null; - - /** - * - * - * @generated - */ - protected SimpleAnyTypeDataObjectImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getSimpleAnyTypeDataObject(); - } - - /** - * - * - * @generated NOT - */ - public String getRawValue() - { - StringBuffer value = new StringBuffer(); - for (Iterator i = getMixed().iterator(); i.hasNext(); ) - { - FeatureMap.Entry entry = (FeatureMap.Entry)i.next(); - if (entry.getEStructuralFeature() == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Text()) - { - value.append(entry.getValue()); - } - } - return value.toString(); - } - - /** - * - * - * @generated NOT - */ - public void setRawValue(String newRawValue) - { - getMixed().clear(); - if (newRawValue != null) - { - getMixed().add(XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Text(), newRawValue); - } - } - - /** - * - * - * @generated NOT - */ - public Object getValue() - { - return EcoreUtil.createFromString(instanceType, getRawValue()); - } - - /** - * - * - * @generated NOT - */ - public void setValue(Object newValue) - { - setRawValue(EcoreUtil.convertToString(instanceType, newValue)); - } - - /** - * - * - * @generated - */ - public EDataType getInstanceType() - { - return instanceType; - } - - /** - * - * - * @generated - */ - public void setInstanceType(EDataType newInstanceType) - { - EDataType oldInstanceType = instanceType; - instanceType = newInstanceType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE, oldInstanceType, instanceType)); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__MIXED: - if (coreType) return getMixed(); - return ((FeatureMap.Internal)getMixed()).getWrapper(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY: - if (coreType) return getAny(); - return ((FeatureMap.Internal)getAny()).getWrapper(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - if (coreType) return getAnyAttribute(); - return ((FeatureMap.Internal)getAnyAttribute()).getWrapper(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE: - return getRawValue(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE: - return getValue(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE: - return getInstanceType(); - } - return eDynamicGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__MIXED: - ((FeatureMap.Internal)getMixed()).set(newValue); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY: - ((FeatureMap.Internal)getAny()).set(newValue); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - ((FeatureMap.Internal)getAnyAttribute()).set(newValue); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE: - setRawValue((String)newValue); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE: - setValue((Object)newValue); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE: - setInstanceType((EDataType)newValue); - return; - } - eDynamicSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__MIXED: - getMixed().clear(); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY: - getAny().clear(); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - getAnyAttribute().clear(); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE: - setRawValue(RAW_VALUE_EDEFAULT); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE: - setValue(VALUE_EDEFAULT); - return; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE: - setInstanceType((EDataType)null); - return; - } - eDynamicUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__MIXED: - return mixed != null && !mixed.isEmpty(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY: - return !getAny().isEmpty(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__ANY_ATTRIBUTE: - return anyAttribute != null && !anyAttribute.isEmpty(); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE: - return RAW_VALUE_EDEFAULT == null ? getRawValue() != null : !RAW_VALUE_EDEFAULT.equals(getRawValue()); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE: - return VALUE_EDEFAULT == null ? getValue() != null : !VALUE_EDEFAULT.equals(getValue()); - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE: - return instanceType != null; - } - return eDynamicIsSet(featureID); - } - - /** - * - * - * @generated - */ - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) - { - if (baseClass == SimpleAnyType.class) - { - switch (derivedFeatureID) - { - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE: return XMLTypePackage.SIMPLE_ANY_TYPE__RAW_VALUE; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE: return XMLTypePackage.SIMPLE_ANY_TYPE__VALUE; - case SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE: return XMLTypePackage.SIMPLE_ANY_TYPE__INSTANCE_TYPE; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) - { - if (baseClass == SimpleAnyType.class) - { - switch (baseFeatureID) - { - case XMLTypePackage.SIMPLE_ANY_TYPE__RAW_VALUE: return SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__RAW_VALUE; - case XMLTypePackage.SIMPLE_ANY_TYPE__VALUE: return SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__VALUE; - case XMLTypePackage.SIMPLE_ANY_TYPE__INSTANCE_TYPE: return SDOPackage.SIMPLE_ANY_TYPE_DATA_OBJECT__INSTANCE_TYPE; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - -} //EDataObjectSimpleAnyTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/StoreDataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/StoreDataObjectImpl.java deleted file mode 100644 index 06bb3a6d05..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/StoreDataObjectImpl.java +++ /dev/null @@ -1,311 +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.impl; - -import org.apache.tuscany.sdo.SDOPackage; -import org.eclipse.emf.common.util.EList; -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.InternalEObject; -import org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreEList; -import org.eclipse.emf.ecore.impl.EStoreEObjectImpl.EStoreFeatureMap; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.FeatureMapUtil; - -import commonj.sdo.DataObject; - -/** - * - * An implementation of the model object 'Store Data Object'. - * @extends EStructuralFeature.Internal.DynamicValueHolder - * - *

- *

- * - * @generated - */ -public class StoreDataObjectImpl extends DataObjectImpl implements DataObject, EStructuralFeature.Internal.DynamicValueHolder -{ - //TODO consider factoring the eSettings code into a new base class that this and DynamicDataObjectImpl could extend - - protected static final Object [] ENO_SETTINGS = new Object [0]; - protected static final InternalEObject EUNINITIALIZED_CONTAINER = new DynamicDataObjectImpl(); - - protected Object [] eSettings; - protected InternalEObject.EStore eStore; - - /** - * Creates a store-based DataObject. - */ - public StoreDataObjectImpl() - { - super(); - eContainer = EUNINITIALIZED_CONTAINER; - } - - /** - * Creates a store-based DataObject. - */ - public StoreDataObjectImpl(InternalEObject.EStore eStore) - { - super(); - eSetStore(eStore); - eContainer = EUNINITIALIZED_CONTAINER; - } - - /** - * Creates a store-based DataObject. - */ - public StoreDataObjectImpl(EClass eClass) - { - super(); - eSetClass(eClass); - eContainer = EUNINITIALIZED_CONTAINER; - } - - /** - * Creates a store-based DataObject. - */ - public StoreDataObjectImpl(EClass eClass, InternalEObject.EStore eStore) - { - super(); - eSetClass(eClass); - eSetStore(eStore); - eContainer = EUNINITIALIZED_CONTAINER; - } - - protected boolean eIsCaching() - { - return true; - } - - public Object dynamicGet(int dynamicFeatureID) - { - Object result = eSettings[dynamicFeatureID]; - if (result == null) - { - EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); - if (!eStructuralFeature.isTransient()) - { - if (FeatureMapUtil.isFeatureMap(eStructuralFeature)) - { - eSettings[dynamicFeatureID] = result = createFeatureMap(eStructuralFeature); - } - else if (eStructuralFeature.isMany()) - { - eSettings[dynamicFeatureID] = result = createList(eStructuralFeature); - } - else - { - result = eStore().get(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX); - if (eIsCaching()) - { - eSettings[dynamicFeatureID] = result; - } - } - } - } - return result; - } - - public void dynamicSet(int dynamicFeatureID, Object value) - { - EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID); - if (eStructuralFeature.isTransient()) - { - eSettings[dynamicFeatureID] = value; - } - else - { - eStore().set(this, eStructuralFeature, InternalEObject.EStore.NO_INDEX, value == NIL ? null : value); - if (eIsCaching()) - { - eSettings[dynamicFeatureID] = value; - } - } - } - - public void dynamicUnset(int dynamicFeatureID) - { - eStore().unset(this, eDynamicFeature(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); - eDynamicSet(featureID, eFeature, newValue); - } - else - { - super.eDynamicSet(featureID, newValue); - } - } - - public void eDynamicUnset(int featureID) - { - if (featureID < eClass().getFeatureCount()) - { - EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID); - eDynamicUnset(featureID, eFeature); - } - else - { - super.eDynamicUnset(featureID); - } - } - - public boolean eDynamicIsSet(int featureID) - { - if (featureID < eClass().getFeatureCount()) - { - EStructuralFeature eFeature = eClass().getEStructuralFeature(featureID); - return eFeature.isTransient() ? - eSettingDelegate(eFeature).dynamicIsSet(this, eSettings(), featureID) : - eStore().isSet(this, eFeature); - } - else - { - return super.eDynamicIsSet(featureID); - } - } - - /* - public boolean eDynamicIsSet(EStructuralFeature eStructuralFeature) - { - return - eStructuralFeature.isTransient() ? - super.eDynamicIsSet(eStructuralFeature) : - eStore().isSet(this, eStructuralFeature); - } - */ - - protected EList createList(EStructuralFeature eStructuralFeature) - { - return new EStoreEList(this, eStructuralFeature, eStore()); - } - - protected FeatureMap createFeatureMap(EStructuralFeature eStructuralFeature) - { - return new EStoreFeatureMap(this, eStructuralFeature, eStore()); - } - - public EObject eContainer() - { - if (eContainer == EUNINITIALIZED_CONTAINER) - { - eInitializeContainer(); - } - - return eContainer; - } - - public int eContainerFeatureID() - { - if (eContainer == EUNINITIALIZED_CONTAINER) - { - eInitializeContainer(); - } - - return eContainerFeatureID; - } - - protected void eInitializeContainer() - { - eContainer = eStore().getContainer(this); - if (eContainer != null) - { - EStructuralFeature eContainingFeature = eStore().getContainingFeature(this); - if (eContainingFeature instanceof EReference) - { - EReference eContainingReference = (EReference)eContainingFeature; - EReference eOpposite = eContainingReference.getEOpposite(); - if (eOpposite != null) - { - eContainerFeatureID = eClass().getFeatureID(eOpposite); - return; - } - } - - eContainerFeatureID = EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature); - } - } - - public InternalEObject.EStore eStore() - { - return eStore; - } - - public void eSetStore(InternalEObject.EStore store) - { - this.eStore = store; - } - - 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; - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SDOPackage.eINSTANCE.getStoreDataObject(); - } - -} //StoreDataObjectImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java deleted file mode 100644 index 05fe4d1a8f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/BaseDataGraphType.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -/** - * - * A representation of the model object 'Base Data Graph Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels Models}
  • - *
  • {@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd Xsd}
  • - *
  • {@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}
  • - *
  • {@link org.apache.tuscany.sdo.model.BaseDataGraphType#getAnyAttribute Any Attribute}
  • - *
- *

- * - * @generated - */ -public interface BaseDataGraphType -{ - /** - * 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 #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 #getModels() - * @generated - */ - void setModels(ModelsType value); - - /** - * 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 #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 #getXsd() - * @generated - */ - void setXsd(XSDType value); - - /** - * Returns the value of the 'Change Summary' containment reference. - * - *

- * If the meaning of the 'Change Summary' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Change Summary' containment reference. - * @see #setChangeSummary(ChangeSummaryType) - * @generated - */ - ChangeSummaryType getChangeSummary_(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}' containment reference. - * - * - * @param value the new value of the 'Change Summary' containment reference. - * @see #getChangeSummary() - * @generated - */ - void setChangeSummary(ChangeSummaryType value); - - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ChangeSummaryType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ChangeSummaryType.java deleted file mode 100644 index dfdc1d0b97..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ChangeSummaryType.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -/** - * - * A representation of the model object 'Change Summary Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.ChangeSummaryType#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.ChangeSummaryType#getCreate Create}
  • - *
  • {@link org.apache.tuscany.sdo.model.ChangeSummaryType#getDelete Delete}
  • - *
  • {@link org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging Logging}
  • - *
- *

- * - * @generated - */ -public interface ChangeSummaryType -{ - /** - * 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 'Create' attribute. - * - *

- * If the meaning of the 'Create' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Create' attribute. - * @see #setCreate(String) - * @generated - */ - String getCreate(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#getCreate Create}' attribute. - * - * - * @param value the new value of the 'Create' attribute. - * @see #getCreate() - * @generated - */ - void setCreate(String value); - - /** - * Returns the value of the 'Delete' attribute. - * - *

- * If the meaning of the 'Delete' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Delete' attribute. - * @see #setDelete(String) - * @generated - */ - String getDelete(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#getDelete Delete}' attribute. - * - * - * @param value the new value of the 'Delete' attribute. - * @see #getDelete() - * @generated - */ - void setDelete(String value); - - /** - * Returns the value of the 'Logging' attribute. - * - *

- * If the meaning of the 'Logging' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Logging' attribute. - * @see #isSetLogging() - * @see #unsetLogging() - * @see #setLogging(boolean) - * @generated - */ - boolean isLogging(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging Logging}' attribute. - * - * - * @param value the new value of the 'Logging' attribute. - * @see #isSetLogging() - * @see #unsetLogging() - * @see #isLogging() - * @generated - */ - void setLogging(boolean value); - - /** - * Unsets the value of the '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging Logging}' attribute. - * - * - * @see #isSetLogging() - * @see #isLogging() - * @see #setLogging(boolean) - * @generated - */ - void unsetLogging(); - - /** - * Returns whether the value of the '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging Logging}' attribute is set. - * - * - * @return whether the value of the 'Logging' attribute is set. - * @see #unsetLogging() - * @see #isLogging() - * @see #setLogging(boolean) - * @generated - */ - boolean isSetLogging(); - -} // ChangeSummaryType diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java deleted file mode 100644 index 353d25f6ef..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataGraphType.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -/** - * - * A representation of the model object 'Data Graph Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.DataGraphType#getAny Any}
  • - *
- *

- * - * @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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java deleted file mode 100644 index 9d4f7b90a8..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/DataObject.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - - -/** - * - * A representation of the model object 'Data Object'. - * - * - * - * @generated - */ -public interface DataObject -{ -} // DataObject diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java deleted file mode 100644 index 19e59bbc5f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelFactory.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - - -/** - * - * 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.eINSTANCE; - - /** - * Returns a new object of class 'Change Summary Type'. - * - * - * @return a new object of class 'Change Summary Type'. - * @generated - */ - ChangeSummaryType createChangeSummaryType(); - - /** - * 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(); - -} //ModelFactory diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelPackage.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelPackage.java deleted file mode 100644 index c33ca619cc..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelPackage.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; -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; - -public interface ModelPackage extends EPackage { - - /** - * The package name. - * - * - * @generated - */ - public static final String eNAME = "model"; - - /** - * The package namespace URI. - * - * - * @generated - */ - public static final String eNS_URI = "commonj.sdo"; - - /** - * The package namespace name. - * - * - * @generated - */ - public static final String eNS_PREFIX = "commonj"; - - public static final ModelPackage eINSTANCE = ModelPackageImpl.eINSTANCE; - - public EClass getBaseDataGraphType(); - public EReference getBaseDataGraphType_Models(); - public EReference getBaseDataGraphType_Xsd(); - public EReference getBaseDataGraphType_ChangeSummary(); - public EAttribute getBaseDataGraphType_AnyAttribute(); - public EClass getChangeSummaryType(); - public EAttribute getChangeSummaryType_Any(); - public EAttribute getChangeSummaryType_Create(); - public EAttribute getChangeSummaryType_Delete(); - public EAttribute getChangeSummaryType_Logging(); - public EClass getDataGraphType(); - public EAttribute getDataGraphType_Any(); - public EClass getDataObject(); - public EClass getDocumentRoot(); - public EAttribute getDocumentRoot_Mixed(); - public EReference getDocumentRoot_XMLNSPrefixMap(); - public EReference getDocumentRoot_XSISchemaLocation(); - public EReference getDocumentRoot_Datagraph(); - public EReference getDocumentRoot_DataObject(); - public EReference getDocumentRoot_Type(); - public EReference getDocumentRoot_Types(); - public EAttribute getDocumentRoot_Ref(); - public EClass getModelsType(); - public EAttribute getModelsType_Any(); - public EClass getProperty(); - public EAttribute getProperty_AliasName(); - public EAttribute getProperty_Any(); - public EAttribute getProperty_Containment(); - public EAttribute getProperty_Default(); - public EAttribute getProperty_Many(); - public EAttribute getProperty_Name(); - public EReference getProperty_Opposite(); - public EAttribute getProperty_ReadOnly(); - public EReference getProperty_Type(); - public EAttribute getProperty_AnyAttribute(); - public EClass getTextType(); - public EAttribute getTextType_Text(); - public EClass getType(); - public EReference getType_BaseType(); - public EReference getType_Property(); - public EAttribute getType_AliasName(); - public EAttribute getType_Any(); - public EAttribute getType_Abstract(); - public EAttribute getType_DataType(); - public EAttribute getType_Name(); - public EAttribute getType_Open(); - public EAttribute getType_Sequenced(); - public EAttribute getType_Uri(); - public EAttribute getType_AnyAttribute(); - public EClass getTypes(); - public EReference getTypes_Type(); - public EClass getXSDType(); - public EAttribute getXSDType_Any(); - public EDataType getBoolean(); - public EDataType getBooleanObject(); - public EDataType getByte(); - public EDataType getByteObject(); - public EDataType getBytes(); - public EDataType getCharacter(); - public EDataType getCharacterObject(); - public EDataType getDate(); - public EDataType getDateTime(); - public EDataType getDay(); - public EDataType getDecimal(); - public EDataType getDouble(); - public EDataType getDoubleObject(); - public EDataType getDuration(); - public EDataType getFloat(); - public EDataType getFloatObject(); - public EDataType getInt(); - public EDataType getInteger(); - public EDataType getIntObject(); - public EDataType getLong(); - public EDataType getLongObject(); - public EDataType getMonth(); - public EDataType getMonthDay(); - public EDataType getObject(); - public EDataType getShort(); - public EDataType getShortObject(); - public EDataType getString(); - public EDataType getStrings(); - public EDataType getTime(); - public EDataType getURI(); - public EDataType getYear(); - public EDataType getYearMonth(); - public EDataType getYearMonthDay(); - public ModelFactory getModelFactory(); -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java deleted file mode 100644 index a05545afed..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/ModelsType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -/** - * - * A representation of the model object 'Models Type'. - * - * - * - * - * Expected type is emof:Package. - * - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.ModelsType#getAny Any}
  • - *
- *

- * - * @generated - */ -public interface ModelsType -{ - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java deleted file mode 100644 index a124dee1c2..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Property.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -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#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#isContainment Containment}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#getDefault Default}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#isMany Many}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#getName Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#getOpposite Opposite}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#isReadOnly Read Only}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#getType Type}
  • - *
  • {@link org.apache.tuscany.sdo.model.Property#getAnyAttribute Any Attribute}
  • - *
- *

- * - * Note: The getDefault and getOpposite methods had to be renamed to avoid - * conflict with the commonj.sdo.Property getDefault and getOpposite - * methods in classes that implement both. Eventually, the two interfaces - * should be brought in-line with one another -- James Snell - * - * @generated - */ -public interface Property -{ - /** - * 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 '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 #setDefault(String) - * @generated NOT - */ - 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 #getDefault() - * @generated - */ - void setDefault_(String value); - - /** - * 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 '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 #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 #getName() - * @generated - */ - void setName(String value); - - /** - * 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 #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 #getOpposite() - * @generated - */ - void setOpposite_(Property value); - - /** - * 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 #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 #getType() - * @generated - */ - void setType(Type value); - - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java deleted file mode 100644 index e792fc7a87..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/TextType.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import java.util.List; - -/** - * - * A representation of the model object 'Text Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.TextType#getText Text}
  • - *
- *

- * - * @generated - */ -public interface TextType -{ - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java deleted file mode 100644 index 3be181bd9a..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Type.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -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#getProperty Property}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#getAliasName Alias Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#isAbstract Abstract}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#isDataType Data Type}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#getName Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#isOpen Open}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#isSequenced Sequenced}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#getUri Uri}
  • - *
  • {@link org.apache.tuscany.sdo.model.Type#getAnyAttribute Any Attribute}
  • - *
- *

- * - * @generated - */ -public interface Type -{ - /** - * 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 '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 '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 '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 #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 #getName() - * @generated - */ - void setName(String value); - - /** - * 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 '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 #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 #getUri() - * @generated - */ - void setUri(String value); - - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java deleted file mode 100644 index 73188861d4..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/Types.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import java.util.List; - -/** - * - * A representation of the model object 'Types'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.Types#getType Type}
  • - *
- *

- * - * @generated - */ -public interface Types -{ - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java deleted file mode 100644 index 9b12301381..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/XSDType.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model; - -import commonj.sdo.Sequence; - -/** - * - * A representation of the model object 'XSD Type'. - * - * - * - * - * Expected type is xsd:schema. - * - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.XSDType#getAny Any}
  • - *
- *

- * - * @generated - */ -public interface XSDType -{ - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java deleted file mode 100644 index 31d54ca425..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/BaseDataGraphTypeImpl.java +++ /dev/null @@ -1,408 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.BaseDataGraphType; -import org.apache.tuscany.sdo.model.ChangeSummaryType; -import org.apache.tuscany.sdo.model.ModelsType; -import org.apache.tuscany.sdo.model.XSDType; - -import org.apache.tuscany.sdo.util.BasicSequence; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Base Data Graph Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getModels Models}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getXsd Xsd}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getChangeSummary Change Summary}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl#getAnyAttribute Any Attribute}
  • - *
- *

- * - * @generated - */ -public abstract class BaseDataGraphTypeImpl extends DataObjectImpl implements BaseDataGraphType -{ - /** - * The cached value of the '{@link #getModels() Models}' containment reference. - * - * - * @see #getModels() - * @generated - * @ordered - */ - protected ModelsType models = null; - - /** - * The cached value of the '{@link #getXsd() Xsd}' containment reference. - * - * - * @see #getXsd() - * @generated - * @ordered - */ - protected XSDType xsd = null; - - /** - * The cached value of the '{@link #getChangeSummary() Change Summary}' containment reference. - * - * - * @see #getChangeSummary() - * @generated - * @ordered - */ - protected ChangeSummaryType changeSummary = null; - - /** - * The cached value of the '{@link #getAnyAttribute() Any Attribute}' attribute list. - * - * - * @see #getAnyAttribute() - * @generated - * @ordered - */ - protected BasicSequence anyAttribute = null; - - /** - * - * - * @generated - */ - protected BaseDataGraphTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.BASE_DATA_GRAPH_TYPE; - } - - /** - * - * - * @generated - */ - public ModelsType getModels() - { - return models; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetModels(ModelsType newModels, NotificationChain msgs) - { - ModelsType oldModels = models; - models = newModels; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS, oldModels, newModels); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setModels(ModelsType newModels) - { - if (newModels != models) - { - NotificationChain msgs = null; - if (models != null) - msgs = ((InternalEObject)models).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS, null, msgs); - if (newModels != null) - msgs = ((InternalEObject)newModels).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS, null, msgs); - msgs = basicSetModels(newModels, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS, newModels, newModels)); - } - - /** - * - * - * @generated - */ - public XSDType getXsd() - { - return xsd; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetXsd(XSDType newXsd, NotificationChain msgs) - { - XSDType oldXsd = xsd; - xsd = newXsd; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD, oldXsd, newXsd); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setXsd(XSDType newXsd) - { - if (newXsd != xsd) - { - NotificationChain msgs = null; - if (xsd != null) - msgs = ((InternalEObject)xsd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD, null, msgs); - if (newXsd != null) - msgs = ((InternalEObject)newXsd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD, null, msgs); - msgs = basicSetXsd(newXsd, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD, newXsd, newXsd)); - } - - /** - * - * - * @generated - */ - public ChangeSummaryType getChangeSummary_() - { - return changeSummary; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetChangeSummary(ChangeSummaryType newChangeSummary, NotificationChain msgs) - { - ChangeSummaryType oldChangeSummary = changeSummary; - changeSummary = newChangeSummary; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY, oldChangeSummary, newChangeSummary); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setChangeSummary(ChangeSummaryType newChangeSummary) - { - if (newChangeSummary != changeSummary) - { - NotificationChain msgs = null; - if (changeSummary != null) - msgs = ((InternalEObject)changeSummary).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY, null, msgs); - if (newChangeSummary != null) - msgs = ((InternalEObject)newChangeSummary).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY, null, msgs); - msgs = basicSetChangeSummary(newChangeSummary, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY, newChangeSummary, newChangeSummary)); - } - - /** - * - * - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE)); - } - return anyAttribute; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS: - return basicSetModels(null, msgs); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD: - return basicSetXsd(null, msgs); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY: - return basicSetChangeSummary(null, msgs); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS: - return getModels(); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD: - return getXsd(); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY: - return getChangeSummary(); - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap(); - return getAnyAttribute(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS: - setModels((ModelsType)newValue); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD: - setXsd((XSDType)newValue); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY: - setChangeSummary((ChangeSummaryType)newValue); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS: - setModels((ModelsType)null); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD: - setXsd((XSDType)null); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY: - setChangeSummary((ChangeSummaryType)null); - return; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE: - ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__MODELS: - return models != null; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__XSD: - return xsd != null; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY: - return changeSummary != null; - case ModelPackageImpl.BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE: - return anyAttribute != null && !anyAttribute.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -} //BaseDataGraphTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ChangeSummaryTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ChangeSummaryTypeImpl.java deleted file mode 100644 index 07ff624c4f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ChangeSummaryTypeImpl.java +++ /dev/null @@ -1,396 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.ChangeSummaryType; - -import org.apache.tuscany.sdo.util.BasicSequence; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Change Summary Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl#getCreate Create}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl#getDelete Delete}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl#isLogging Logging}
  • - *
- *

- * - * @generated - */ -public class ChangeSummaryTypeImpl extends DataObjectImpl implements ChangeSummaryType -{ - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * The default value of the '{@link #getCreate() Create}' attribute. - * - * - * @see #getCreate() - * @generated - * @ordered - */ - protected static final String CREATE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCreate() Create}' attribute. - * - * - * @see #getCreate() - * @generated - * @ordered - */ - protected String create = CREATE_EDEFAULT; - - /** - * The default value of the '{@link #getDelete() Delete}' attribute. - * - * - * @see #getDelete() - * @generated - * @ordered - */ - protected static final String DELETE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDelete() Delete}' attribute. - * - * - * @see #getDelete() - * @generated - * @ordered - */ - protected String delete = DELETE_EDEFAULT; - - /** - * The default value of the '{@link #isLogging() Logging}' attribute. - * - * - * @see #isLogging() - * @generated - * @ordered - */ - protected static final boolean LOGGING_EDEFAULT = false; - - /** - * The cached value of the '{@link #isLogging() Logging}' attribute. - * - * - * @see #isLogging() - * @generated - * @ordered - */ - protected boolean logging = LOGGING_EDEFAULT; - - /** - * This is true if the Logging attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean loggingESet = false; - - /** - * - * - * @generated - */ - protected ChangeSummaryTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.CHANGE_SUMMARY_TYPE; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public String getCreate() - { - return create; - } - - /** - * - * - * @generated - */ - public void setCreate(String newCreate) - { - String oldCreate = create; - create = newCreate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.CHANGE_SUMMARY_TYPE__CREATE, oldCreate, create)); - } - - /** - * - * - * @generated - */ - public String getDelete() - { - return delete; - } - - /** - * - * - * @generated - */ - public void setDelete(String newDelete) - { - String oldDelete = delete; - delete = newDelete; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.CHANGE_SUMMARY_TYPE__DELETE, oldDelete, delete)); - } - - /** - * - * - * @generated - */ - public boolean isLogging() - { - return logging; - } - - /** - * - * - * @generated - */ - public void setLogging(boolean newLogging) - { - boolean oldLogging = logging; - logging = newLogging; - boolean oldLoggingESet = loggingESet; - loggingESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING, oldLogging, logging, !oldLoggingESet)); - } - - /** - * - * - * @generated - */ - public void unsetLogging() - { - boolean oldLogging = logging; - boolean oldLoggingESet = loggingESet; - logging = LOGGING_EDEFAULT; - loggingESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING, oldLogging, LOGGING_EDEFAULT, oldLoggingESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetLogging() - { - return loggingESet; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__CREATE: - return getCreate(); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__DELETE: - return getDelete(); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING: - return isLogging() ? Boolean.TRUE : Boolean.FALSE; - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__CREATE: - setCreate((String)newValue); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__DELETE: - setDelete((String)newValue); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING: - setLogging(((Boolean)newValue).booleanValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__CREATE: - setCreate(CREATE_EDEFAULT); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__DELETE: - setDelete(DELETE_EDEFAULT); - return; - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING: - unsetLogging(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__ANY: - return any != null && !any.featureMap().isEmpty(); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__CREATE: - return CREATE_EDEFAULT == null ? create != null : !CREATE_EDEFAULT.equals(create); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__DELETE: - return DELETE_EDEFAULT == null ? delete != null : !DELETE_EDEFAULT.equals(delete); - case ModelPackageImpl.CHANGE_SUMMARY_TYPE__LOGGING: - return isSetLogging(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(", create: "); - result.append(create); - result.append(", delete: "); - result.append(delete); - result.append(", logging: "); - if (loggingESet) result.append(logging); else result.append(""); - result.append(')'); - return result.toString(); - } - -} //ChangeSummaryTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java deleted file mode 100644 index e6e8dd1f39..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataGraphTypeImpl.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - - -import org.apache.tuscany.sdo.model.DataGraphType; -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; - -/** - * - * An implementation of the model object 'Data Graph Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl#getAny Any}
  • - *
- *

- * - * @generated - */ -public class DataGraphTypeImpl extends BaseDataGraphTypeImpl implements DataGraphType -{ - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * - * - * @generated - */ - protected DataGraphTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.DATA_GRAPH_TYPE; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.DATA_GRAPH_TYPE__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.DATA_GRAPH_TYPE__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.DATA_GRAPH_TYPE__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.DATA_GRAPH_TYPE__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.DATA_GRAPH_TYPE__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.DATA_GRAPH_TYPE__ANY: - return any != null && !any.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(')'); - return result.toString(); - } - -} //DataGraphTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java deleted file mode 100644 index ed516ebd95..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/DataObjectImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import org.apache.tuscany.sdo.model.DataObject; - -import org.eclipse.emf.ecore.EClass; - -/** - * - * An implementation of the model object 'Data Object'. - * - *

- *

- * - * @generated - */ -public abstract class DataObjectImpl extends org.apache.tuscany.sdo.impl.DataObjectImpl implements DataObject -{ - /** - * - * - * @generated - */ - protected DataObjectImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.DATA_OBJECT; - } - -} //DataObjectImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java deleted file mode 100644 index c5ec4ae591..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelFactoryImpl.java +++ /dev/null @@ -1,1095 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sdo.SDOFactory; -import org.apache.tuscany.sdo.model.ChangeSummaryType; -import org.apache.tuscany.sdo.model.DataGraphType; -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.ModelsType; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.Type; -import org.apache.tuscany.sdo.model.Types; -import org.apache.tuscany.sdo.model.XSDType; -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.impl.EFactoryImpl; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; - -import commonj.sdo.helper.DataHelper; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory -{ - /** - * The singleton instance of the factory. - * - * - * @generated - */ - public static final ModelFactoryImpl eINSTANCE = init(); - - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static ModelFactoryImpl init() - { - try - { - ModelFactoryImpl theModelFactory = (ModelFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("commonj.sdo"); - if (theModelFactory != null) - { - return theModelFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new ModelFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public ModelFactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public EObject createGen(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case ModelPackageImpl.CHANGE_SUMMARY_TYPE: return (EObject)createChangeSummaryType(); - case ModelPackageImpl.DATA_GRAPH_TYPE: return (EObject)createDataGraphType(); - case ModelPackageImpl.DOCUMENT_ROOT: return (EObject)createDocumentRoot(); - case ModelPackageImpl.MODELS_TYPE: return (EObject)createModelsType(); - case ModelPackageImpl.PROPERTY: return (EObject)createProperty(); - case ModelPackageImpl.TYPE: return (EObject)createType(); - case ModelPackageImpl.TYPES: return (EObject)createTypes(); - case ModelPackageImpl.XSD_TYPE: return (EObject)createXSDType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - public EObject create(EClass eClass) - { - if (eClass.getClassifierID() == ModelPackageImpl.DATA_OBJECT) return SDOFactory.eINSTANCE.createAnyTypeDataObject(); - return createGen(eClass); - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { - case ModelPackageImpl.BOOLEAN: - return createBooleanFromString(eDataType, initialValue); - case ModelPackageImpl.BOOLEAN_OBJECT: - return createBooleanObjectFromString(eDataType, initialValue); - case ModelPackageImpl.BYTE: - return createByteFromString(eDataType, initialValue); - case ModelPackageImpl.BYTE_OBJECT: - return createByteObjectFromString(eDataType, initialValue); - case ModelPackageImpl.BYTES: - return createBytesFromString(eDataType, initialValue); - case ModelPackageImpl.CHARACTER: - return createCharacterFromString(eDataType, initialValue); - case ModelPackageImpl.CHARACTER_OBJECT: - return createCharacterObjectFromString(eDataType, initialValue); - case ModelPackageImpl.DATE: - return createDateFromString(eDataType, initialValue); - case ModelPackageImpl.DATE_TIME: - return createDateTimeFromString(eDataType, initialValue); - case ModelPackageImpl.DAY: - return createDayFromString(eDataType, initialValue); - case ModelPackageImpl.DECIMAL: - return createDecimalFromString(eDataType, initialValue); - case ModelPackageImpl.DOUBLE: - return createDoubleFromString(eDataType, initialValue); - case ModelPackageImpl.DOUBLE_OBJECT: - return createDoubleObjectFromString(eDataType, initialValue); - case ModelPackageImpl.DURATION: - return createDurationFromString(eDataType, initialValue); - case ModelPackageImpl.FLOAT: - return createFloatFromString(eDataType, initialValue); - case ModelPackageImpl.FLOAT_OBJECT: - return createFloatObjectFromString(eDataType, initialValue); - case ModelPackageImpl.INT: - return createIntFromString(eDataType, initialValue); - case ModelPackageImpl.INTEGER: - return createIntegerFromString(eDataType, initialValue); - case ModelPackageImpl.INT_OBJECT: - return createIntObjectFromString(eDataType, initialValue); - case ModelPackageImpl.LONG: - return createLongFromString(eDataType, initialValue); - case ModelPackageImpl.LONG_OBJECT: - return createLongObjectFromString(eDataType, initialValue); - case ModelPackageImpl.MONTH: - return createMonthFromString(eDataType, initialValue); - case ModelPackageImpl.MONTH_DAY: - return createMonthDayFromString(eDataType, initialValue); - case ModelPackageImpl.OBJECT: - return createObjectFromString(eDataType, initialValue); - case ModelPackageImpl.SHORT: - return createShortFromString(eDataType, initialValue); - case ModelPackageImpl.SHORT_OBJECT: - return createShortObjectFromString(eDataType, initialValue); - case ModelPackageImpl.STRING: - return createStringFromString(eDataType, initialValue); - case ModelPackageImpl.STRINGS: - return createStringsFromString(eDataType, initialValue); - case ModelPackageImpl.TIME: - return createTimeFromString(eDataType, initialValue); - case ModelPackageImpl.URI: - return createURIFromString(eDataType, initialValue); - case ModelPackageImpl.YEAR: - return createYearFromString(eDataType, initialValue); - case ModelPackageImpl.YEAR_MONTH: - return createYearMonthFromString(eDataType, initialValue); - case ModelPackageImpl.YEAR_MONTH_DAY: - return createYearMonthDayFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { - case ModelPackageImpl.BOOLEAN: - return convertBooleanToString(eDataType, instanceValue); - case ModelPackageImpl.BOOLEAN_OBJECT: - return convertBooleanObjectToString(eDataType, instanceValue); - case ModelPackageImpl.BYTE: - return convertByteToString(eDataType, instanceValue); - case ModelPackageImpl.BYTE_OBJECT: - return convertByteObjectToString(eDataType, instanceValue); - case ModelPackageImpl.BYTES: - return convertBytesToString(eDataType, instanceValue); - case ModelPackageImpl.CHARACTER: - return convertCharacterToString(eDataType, instanceValue); - case ModelPackageImpl.CHARACTER_OBJECT: - return convertCharacterObjectToString(eDataType, instanceValue); - case ModelPackageImpl.DATE: - return convertDateToString(eDataType, instanceValue); - case ModelPackageImpl.DATE_TIME: - return convertDateTimeToString(eDataType, instanceValue); - case ModelPackageImpl.DAY: - return convertDayToString(eDataType, instanceValue); - case ModelPackageImpl.DECIMAL: - return convertDecimalToString(eDataType, instanceValue); - case ModelPackageImpl.DOUBLE: - return convertDoubleToString(eDataType, instanceValue); - case ModelPackageImpl.DOUBLE_OBJECT: - return convertDoubleObjectToString(eDataType, instanceValue); - case ModelPackageImpl.DURATION: - return convertDurationToString(eDataType, instanceValue); - case ModelPackageImpl.FLOAT: - return convertFloatToString(eDataType, instanceValue); - case ModelPackageImpl.FLOAT_OBJECT: - return convertFloatObjectToString(eDataType, instanceValue); - case ModelPackageImpl.INT: - return convertIntToString(eDataType, instanceValue); - case ModelPackageImpl.INTEGER: - return convertIntegerToString(eDataType, instanceValue); - case ModelPackageImpl.INT_OBJECT: - return convertIntObjectToString(eDataType, instanceValue); - case ModelPackageImpl.LONG: - return convertLongToString(eDataType, instanceValue); - case ModelPackageImpl.LONG_OBJECT: - return convertLongObjectToString(eDataType, instanceValue); - case ModelPackageImpl.MONTH: - return convertMonthToString(eDataType, instanceValue); - case ModelPackageImpl.MONTH_DAY: - return convertMonthDayToString(eDataType, instanceValue); - case ModelPackageImpl.OBJECT: - return convertObjectToString(eDataType, instanceValue); - case ModelPackageImpl.SHORT: - return convertShortToString(eDataType, instanceValue); - case ModelPackageImpl.SHORT_OBJECT: - return convertShortObjectToString(eDataType, instanceValue); - case ModelPackageImpl.STRING: - return convertStringToString(eDataType, instanceValue); - case ModelPackageImpl.STRINGS: - return convertStringsToString(eDataType, instanceValue); - case ModelPackageImpl.TIME: - return convertTimeToString(eDataType, instanceValue); - case ModelPackageImpl.URI: - return convertURIToString(eDataType, instanceValue); - case ModelPackageImpl.YEAR: - return convertYearToString(eDataType, instanceValue); - case ModelPackageImpl.YEAR_MONTH: - return convertYearMonthToString(eDataType, instanceValue); - case ModelPackageImpl.YEAR_MONTH_DAY: - return convertYearMonthDayToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ChangeSummaryType createChangeSummaryType() - { - ChangeSummaryTypeImpl changeSummaryType = new ChangeSummaryTypeImpl(); - return changeSummaryType; - } - - /** - * - * - * @generated - */ - public DataGraphType createDataGraphType() - { - DataGraphTypeImpl dataGraphType = new DataGraphTypeImpl(); - return dataGraphType; - } - - /** - * - * - * @generated - */ - public EObject createDocumentRoot() - { - EObject documentRoot = super.create(ModelPackageImpl.Literals.DOCUMENT_ROOT); - return documentRoot; - } - - /** - * - * - * @generated - */ - public ModelsType createModelsType() - { - ModelsTypeImpl modelsType = new ModelsTypeImpl(); - return modelsType; - } - - /** - * - * - * @generated - */ - public Property createProperty() - { - PropertyImpl property = new PropertyImpl(); - return property; - } - - /** - * - * - * @generated - */ - public Type createType() - { - TypeImpl type = new TypeImpl(); - return type; - } - - /** - * - * - * @generated - */ - public Types createTypes() - { - TypesImpl types = new TypesImpl(); - return types; - } - - /** - * - * - * @generated - */ - public XSDType createXSDType() - { - XSDTypeImpl xsdType = new XSDTypeImpl(); - return xsdType; - } - - /** - * - * - * @generated NOT - */ - public Boolean createBooleanFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createBooleanObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertBooleanToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertBooleanObject((Boolean)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Boolean createBooleanObjectFromString(EDataType eDataType, String initialValue) - { - return (Boolean)createBooleanFromString(ModelPackageImpl.Literals.BOOLEAN, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertBooleanObjectToString(EDataType eDataType, Object instanceValue) - { - return convertBooleanToString(ModelPackageImpl.Literals.BOOLEAN, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Byte createByteFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createByteObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertByteToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertByteObject((Byte)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Byte createByteObjectFromString(EDataType eDataType, String initialValue) - { - return (Byte)createByteFromString(ModelPackageImpl.Literals.BYTE, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertByteObjectToString(EDataType eDataType, Object instanceValue) - { - return convertByteToString(ModelPackageImpl.Literals.BYTE, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public byte[] createBytesFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createBase64Binary(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertBytesToString(EDataType eDataType, Object instanceValue) - { - if (instanceValue instanceof byte[]) { - return XMLTypeFactory.eINSTANCE.convertBase64Binary((byte[])instanceValue); - } else { - return XMLTypeFactory.eINSTANCE.convertBase64Binary(instanceValue.toString().getBytes()); - } - } - - /** - * - * - * @generated NOT - */ - public Character createCharacterFromString(EDataType eDataType, String initialValue) - { - return (initialValue == null && initialValue.length() > 0) - ? null : (new Character(collapseWhiteSpace(initialValue).charAt(0))); - } - - /** - * - * - * @generated NOT - */ - public String convertCharacterToString(EDataType eDataType, Object instanceValue) - { - return String.valueOf(((Character)instanceValue).charValue()); - } - - /** - * - * - * @generated NOT - */ - public Character createCharacterObjectFromString(EDataType eDataType, String initialValue) - { - return (Character)createCharacterFromString(ModelPackageImpl.Literals.CHARACTER, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertCharacterObjectToString(EDataType eDataType, Object instanceValue) - { - return convertCharacterToString(ModelPackageImpl.Literals.CHARACTER, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Date createDateFromString(EDataType eDataType, String initialValue) - { - // XMLCalendar cal = (XMLCalendar) XMLTypeFactory.eINSTANCE.createDate(initialValue); - // return (cal != null) ? cal.getDate() : null; - return DataHelper.INSTANCE.toDate(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertDateToString(EDataType eDataType, Object instanceValue) - { - // return XMLTypeFactory.eINSTANCE.convertDate(instanceValue); - return DataHelper.INSTANCE.toDateTime((Date)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public String createDateTimeFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertDateTimeToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public String createDayFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertDayToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public BigDecimal createDecimalFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDecimal(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertDecimalToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDecimal((BigDecimal)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Double createDoubleFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDoubleObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertDoubleToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDoubleObject((Double)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Double createDoubleObjectFromString(EDataType eDataType, String initialValue) - { - return (Double)createDoubleFromString(ModelPackageImpl.Literals.DOUBLE, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertDoubleObjectToString(EDataType eDataType, Object instanceValue) - { - return convertDoubleToString(ModelPackageImpl.Literals.DOUBLE, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public String createDurationFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertDurationToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public Float createFloatFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createFloatObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertFloatToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertFloatObject((Float)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Float createFloatObjectFromString(EDataType eDataType, String initialValue) - { - return (Float)createFloatFromString(ModelPackageImpl.Literals.FLOAT, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertFloatObjectToString(EDataType eDataType, Object instanceValue) - { - return convertFloatToString(ModelPackageImpl.Literals.FLOAT, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Integer createIntFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createIntObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertIntToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertIntObject((Integer)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public BigInteger createIntegerFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createInteger(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertIntegerToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertInteger((BigInteger)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Integer createIntObjectFromString(EDataType eDataType, String initialValue) - { - return (Integer)createIntFromString(ModelPackageImpl.Literals.INT, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertIntObjectToString(EDataType eDataType, Object instanceValue) - { - return convertIntToString(ModelPackageImpl.Literals.INT, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Long createLongFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createLongObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertLongToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertLongObject((Long)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Long createLongObjectFromString(EDataType eDataType, String initialValue) - { - return (Long)createLongFromString(ModelPackageImpl.Literals.LONG, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertLongObjectToString(EDataType eDataType, Object instanceValue) - { - return convertLongToString(ModelPackageImpl.Literals.LONG, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public String createMonthFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertMonthToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public String createMonthDayFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertMonthDayToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public Object createObjectFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertObjectToString(EDataType eDataType, Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * - * - * @generated NOT - */ - public Short createShortFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createShortObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertShortToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertShortObject((Short)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Short createShortObjectFromString(EDataType eDataType, String initialValue) - { - return (Short)createShortFromString(ModelPackageImpl.Literals.SHORT, initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertShortObjectToString(EDataType eDataType, Object instanceValue) - { - return convertShortToString(ModelPackageImpl.Literals.SHORT, instanceValue); - } - - /** - * - * - * @generated NOT - */ - public String createStringFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertStringToString(EDataType eDataType, Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * - * - * @generated NOT - */ - public List createStringsFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createENTITIES(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertStringsToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertENTITIES((List)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public String createTimeFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertTimeToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public String createURIFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertURIToString(EDataType eDataType, Object instanceValue) - { - return (instanceValue != null) ? instanceValue.toString() : null; - } - - /** - * - * - * @generated NOT - */ - public String createYearFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertYearToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public String createYearMonthFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertYearMonthToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated NOT - */ - public String createYearMonthDayFromString(EDataType eDataType, String initialValue) - { - return initialValue; - } - - /** - * - * - * @generated NOT - */ - public String convertYearMonthDayToString(EDataType eDataType, Object instanceValue) - { - return (String)instanceValue; - } - - /** - * - * - * @generated - */ - public ModelPackageImpl getModelPackageImpl() - { - return (ModelPackageImpl)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static ModelPackageImpl getPackage() - { - return ModelPackageImpl.eINSTANCE; - } - - // Following methods are temporary ... for interop with new factory codegen pattern - // - public static final String NAMESPACE_URI = ModelPackageImpl.eNS_URI; - public commonj.sdo.Type getBoolean() { return (commonj.sdo.Type)getModelPackageImpl().getBoolean(); } - public commonj.sdo.Type getBooleanObject() { return (commonj.sdo.Type)getModelPackageImpl().getBooleanObject(); } - public commonj.sdo.Type getByte() { return (commonj.sdo.Type)getModelPackageImpl().getByte(); } - public commonj.sdo.Type getByteObject() { return (commonj.sdo.Type)getModelPackageImpl().getByteObject(); } - public commonj.sdo.Type getBytes() { return (commonj.sdo.Type)getModelPackageImpl().getBytes(); } - public commonj.sdo.Type getCharacter() { return (commonj.sdo.Type)getModelPackageImpl().getCharacter(); } - public commonj.sdo.Type getCharacterObject() { return (commonj.sdo.Type)getModelPackageImpl().getCharacterObject(); } - public commonj.sdo.Type getDate() { return (commonj.sdo.Type)getModelPackageImpl().getDate(); } - public commonj.sdo.Type getDateTime() { return (commonj.sdo.Type)getModelPackageImpl().getDateTime(); } - public commonj.sdo.Type getDay() { return (commonj.sdo.Type)getModelPackageImpl().getDay(); } - public commonj.sdo.Type getDecimal() { return (commonj.sdo.Type)getModelPackageImpl().getDecimal(); } - public commonj.sdo.Type getDouble() { return (commonj.sdo.Type)getModelPackageImpl().getDouble(); } - public commonj.sdo.Type getDoubleObject() { return (commonj.sdo.Type)getModelPackageImpl().getDoubleObject(); } - public commonj.sdo.Type getDuration() { return (commonj.sdo.Type)getModelPackageImpl().getDuration(); } - public commonj.sdo.Type getFloat() { return (commonj.sdo.Type)getModelPackageImpl().getFloat(); } - public commonj.sdo.Type getFloatObject() { return (commonj.sdo.Type)getModelPackageImpl().getFloatObject(); } - public commonj.sdo.Type getInt() { return (commonj.sdo.Type)getModelPackageImpl().getInt(); } - public commonj.sdo.Type getInteger() { return (commonj.sdo.Type)getModelPackageImpl().getInteger(); } - public commonj.sdo.Type getIntObject() { return (commonj.sdo.Type)getModelPackageImpl().getIntObject(); } - public commonj.sdo.Type getLong() { return (commonj.sdo.Type)getModelPackageImpl().getLong(); } - public commonj.sdo.Type getLongObject() { return (commonj.sdo.Type)getModelPackageImpl().getLongObject(); } - public commonj.sdo.Type getMonth() { return (commonj.sdo.Type)getModelPackageImpl().getMonth(); } - public commonj.sdo.Type getMonthDay() { return (commonj.sdo.Type)getModelPackageImpl().getMonthDay(); } - public commonj.sdo.Type getObject() { return (commonj.sdo.Type)getModelPackageImpl().getObject(); } - public commonj.sdo.Type getShort() { return (commonj.sdo.Type)getModelPackageImpl().getShort(); } - public commonj.sdo.Type getShortObject() { return (commonj.sdo.Type)getModelPackageImpl().getShortObject(); } - public commonj.sdo.Type getString() { return (commonj.sdo.Type)getModelPackageImpl().getString(); } - public commonj.sdo.Type getStrings() { return (commonj.sdo.Type)getModelPackageImpl().getStrings(); } - public commonj.sdo.Type getTime() { return (commonj.sdo.Type)getModelPackageImpl().getTime(); } - public commonj.sdo.Type getURI() { return (commonj.sdo.Type)getModelPackageImpl().getURI(); } - public commonj.sdo.Type getYear() { return (commonj.sdo.Type)getModelPackageImpl().getYear(); } - public commonj.sdo.Type getYearMonth() { return (commonj.sdo.Type)getModelPackageImpl().getYearMonth(); } - public commonj.sdo.Type getYearMonthDay() { return (commonj.sdo.Type)getModelPackageImpl().getYearMonthDay(); } - -} //ModelFactoryImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelPackageImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelPackageImpl.java deleted file mode 100644 index 86604e91f6..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelPackageImpl.java +++ /dev/null @@ -1,4331 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import java.math.BigDecimal; -import java.math.BigInteger; - -import java.util.Date; -import java.util.List; - -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.model.BaseDataGraphType; -import org.apache.tuscany.sdo.model.ChangeSummaryType; -import org.apache.tuscany.sdo.model.DataGraphType; -import org.apache.tuscany.sdo.model.DataObject; -import org.apache.tuscany.sdo.model.ModelFactory; -import org.apache.tuscany.sdo.model.ModelPackage; -import org.apache.tuscany.sdo.model.ModelsType; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.TextType; -import org.apache.tuscany.sdo.model.Type; -import org.apache.tuscany.sdo.model.Types; -import org.apache.tuscany.sdo.model.XSDType; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -/** - * - * 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.model.ModelFactory - * @generated - */ -public class ModelPackageImpl extends EPackageImpl implements ModelPackage -{ - /** - * The package name. - * - * - * @generated - */ - public static final String eNAME = "model"; - - /** - * The package namespace URI. - * - * - * @generated - */ - public static final String eNS_URI = "commonj.sdo"; - - /** - * The package namespace name. - * - * - * @generated NOT - */ - public static final String eNS_PREFIX = "sdo"; //FB why was this generated = "commonj" ? - - /** - * The singleton instance of the package. - * - * - * @generated - */ - public static final ModelPackageImpl eINSTANCE = org.apache.tuscany.sdo.model.impl.ModelPackageImpl.init(); - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl Base Data Graph Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBaseDataGraphType() - * @generated - */ - public static final int BASE_DATA_GRAPH_TYPE = 0; - - /** - * The feature id for the 'Models' containment reference. - * - * - * @generated - * @ordered - */ - public static final int BASE_DATA_GRAPH_TYPE__MODELS = 0; - - /** - * The feature id for the 'Xsd' containment reference. - * - * - * @generated - * @ordered - */ - public static final int BASE_DATA_GRAPH_TYPE__XSD = 1; - - /** - * The feature id for the 'Change Summary' containment reference. - * - * - * @generated - * @ordered - */ - public static final int BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY = 2; - - /** - * The feature id for the 'Any Attribute' attribute list. - * - * - * @generated - * @ordered - */ - public static final int BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE = 3; - - /** - * The number of structural features of the 'Base Data Graph Type' class. - * - * - * @generated - * @ordered - */ - public static final int BASE_DATA_GRAPH_TYPE_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl Change Summary Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getChangeSummaryType() - * @generated - */ - public static final int CHANGE_SUMMARY_TYPE = 1; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int CHANGE_SUMMARY_TYPE__ANY = 0; - - /** - * The feature id for the 'Create' attribute. - * - * - * @generated - * @ordered - */ - public static final int CHANGE_SUMMARY_TYPE__CREATE = 1; - - /** - * The feature id for the 'Delete' attribute. - * - * - * @generated - * @ordered - */ - public static final int CHANGE_SUMMARY_TYPE__DELETE = 2; - - /** - * The feature id for the 'Logging' attribute. - * - * - * @generated - * @ordered - */ - public static final int CHANGE_SUMMARY_TYPE__LOGGING = 3; - - /** - * The number of structural features of the 'Change Summary Type' class. - * - * - * @generated - * @ordered - */ - public static final int CHANGE_SUMMARY_TYPE_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl Data Graph Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDataGraphType() - * @generated - */ - public static final int DATA_GRAPH_TYPE = 2; - - /** - * The feature id for the 'Models' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE__MODELS = BASE_DATA_GRAPH_TYPE__MODELS; - - /** - * The feature id for the 'Xsd' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE__XSD = BASE_DATA_GRAPH_TYPE__XSD; - - /** - * The feature id for the 'Change Summary' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE__CHANGE_SUMMARY = BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY; - - /** - * The feature id for the 'Any Attribute' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE__ANY_ATTRIBUTE = BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE__ANY = BASE_DATA_GRAPH_TYPE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Data Graph Type' class. - * - * - * @generated - * @ordered - */ - public static final int DATA_GRAPH_TYPE_FEATURE_COUNT = BASE_DATA_GRAPH_TYPE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.DataObjectImpl Data Object}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DataObjectImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDataObject() - * @generated - */ - public static final int DATA_OBJECT = 3; - - /** - * The number of structural features of the 'Data Object' class. - * - * - * @generated - * @ordered - */ - public static final int DATA_OBJECT_FEATURE_COUNT = 0; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDocumentRoot() - * @generated - */ - public static final int DOCUMENT_ROOT = 4; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__MIXED = 0; - - /** - * The feature id for the 'XMLNS Prefix Map' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; - - /** - * The feature id for the 'XSI Schema Location' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; - - /** - * The feature id for the 'Datagraph' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__DATAGRAPH = 3; - - /** - * The feature id for the 'Data Object' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__DATA_OBJECT = 4; - - /** - * The feature id for the 'Type' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__TYPE = 5; - - /** - * The feature id for the 'Types' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__TYPES = 6; - - /** - * The feature id for the 'Ref' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__REF = 7; - - /** - * The number of structural features of the 'Document Root' class. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT_FEATURE_COUNT = 8; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.ModelsTypeImpl Models Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelsTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getModelsType() - * @generated - */ - public static final int MODELS_TYPE = 5; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int MODELS_TYPE__ANY = 0; - - /** - * The number of structural features of the 'Models Type' class. - * - * - * @generated - * @ordered - */ - public static final int MODELS_TYPE_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.PropertyImpl Property}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.PropertyImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getProperty() - * @generated - */ - public static final int PROPERTY = 6; - - /** - * The feature id for the 'Alias Name' attribute list. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__ALIAS_NAME = 0; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__ANY = 1; - - /** - * The feature id for the 'Containment' attribute. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__CONTAINMENT = 2; - - /** - * The feature id for the 'Default' attribute. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__DEFAULT = 3; - - /** - * The feature id for the 'Many' attribute. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__MANY = 4; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__NAME = 5; - - /** - * The feature id for the 'Opposite' reference. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__OPPOSITE = 6; - - /** - * The feature id for the 'Read Only' attribute. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__READ_ONLY = 7; - - /** - * The feature id for the 'Type' reference. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__TYPE = 8; - - /** - * The feature id for the 'Any Attribute' attribute list. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY__ANY_ATTRIBUTE = 9; - - /** - * The number of structural features of the 'Property' class. - * - * - * @generated - * @ordered - */ - public static final int PROPERTY_FEATURE_COUNT = 10; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.TextTypeImpl Text Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TextTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTextType() - * @generated - */ - public static final int TEXT_TYPE = 7; - - /** - * The feature id for the 'Text' attribute list. - * - * - * @generated - * @ordered - */ - public static final int TEXT_TYPE__TEXT = 0; - - /** - * The number of structural features of the 'Text Type' class. - * - * - * @generated - * @ordered - */ - public static final int TEXT_TYPE_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.TypeImpl Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getType() - * @generated - */ - public static final int TYPE = 8; - - /** - * The feature id for the 'Base Type' reference list. - * - * - * @generated - * @ordered - */ - public static final int TYPE__BASE_TYPE = 0; - - /** - * The feature id for the 'Property' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int TYPE__PROPERTY = 1; - - /** - * The feature id for the 'Alias Name' attribute list. - * - * - * @generated - * @ordered - */ - public static final int TYPE__ALIAS_NAME = 2; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int TYPE__ANY = 3; - - /** - * The feature id for the 'Abstract' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__ABSTRACT = 4; - - /** - * The feature id for the 'Data Type' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__DATA_TYPE = 5; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__NAME = 6; - - /** - * The feature id for the 'Open' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__OPEN = 7; - - /** - * The feature id for the 'Sequenced' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__SEQUENCED = 8; - - /** - * The feature id for the 'Uri' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE__URI = 9; - - /** - * The feature id for the 'Any Attribute' attribute list. - * - * - * @generated - * @ordered - */ - public static final int TYPE__ANY_ATTRIBUTE = 10; - - /** - * The number of structural features of the 'Type' class. - * - * - * @generated - * @ordered - */ - public static final int TYPE_FEATURE_COUNT = 11; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.TypesImpl Types}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TypesImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTypes() - * @generated - */ - public static final int TYPES = 9; - - /** - * The feature id for the 'Type' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int TYPES__TYPE = 0; - - /** - * The number of structural features of the 'Types' class. - * - * - * @generated - * @ordered - */ - public static final int TYPES_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.impl.XSDTypeImpl XSD Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.XSDTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getXSDType() - * @generated - */ - public static final int XSD_TYPE = 10; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - public static final int XSD_TYPE__ANY = 0; - - /** - * The number of structural features of the 'XSD Type' class. - * - * - * @generated - * @ordered - */ - public static final int XSD_TYPE_FEATURE_COUNT = 1; - - /** - * The meta object id for the 'Boolean' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBoolean() - * @generated - */ - public static final int BOOLEAN = 11; - - /** - * The meta object id for the 'Boolean Object' data type. - * - * - * @see java.lang.Boolean - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBooleanObject() - * @generated - */ - public static final int BOOLEAN_OBJECT = 12; - - /** - * The meta object id for the 'Byte' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getByte() - * @generated - */ - public static final int BYTE = 13; - - /** - * The meta object id for the 'Byte Object' data type. - * - * - * @see java.lang.Byte - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getByteObject() - * @generated - */ - public static final int BYTE_OBJECT = 14; - - /** - * The meta object id for the 'Bytes' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBytes() - * @generated - */ - public static final int BYTES = 15; - - /** - * The meta object id for the 'Character' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getCharacter() - * @generated - */ - public static final int CHARACTER = 16; - - /** - * The meta object id for the 'Character Object' data type. - * - * - * @see java.lang.Character - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getCharacterObject() - * @generated - */ - public static final int CHARACTER_OBJECT = 17; - - /** - * The meta object id for the 'Date' data type. - * - * - * @see java.util.Date - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDate() - * @generated - */ - public static final int DATE = 18; - - /** - * The meta object id for the 'Date Time' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDateTime() - * @generated - */ - public static final int DATE_TIME = 19; - - /** - * The meta object id for the 'Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDay() - * @generated - */ - public static final int DAY = 20; - - /** - * The meta object id for the 'Decimal' data type. - * - * - * @see java.math.BigDecimal - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDecimal() - * @generated - */ - public static final int DECIMAL = 21; - - /** - * The meta object id for the 'Double' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDouble() - * @generated - */ - public static final int DOUBLE = 22; - - /** - * The meta object id for the 'Double Object' data type. - * - * - * @see java.lang.Double - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDoubleObject() - * @generated - */ - public static final int DOUBLE_OBJECT = 23; - - /** - * The meta object id for the 'Duration' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDuration() - * @generated - */ - public static final int DURATION = 24; - - /** - * The meta object id for the 'Float' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getFloat() - * @generated - */ - public static final int FLOAT = 25; - - /** - * The meta object id for the 'Float Object' data type. - * - * - * @see java.lang.Float - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getFloatObject() - * @generated - */ - public static final int FLOAT_OBJECT = 26; - - /** - * The meta object id for the 'Int' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getInt() - * @generated - */ - public static final int INT = 27; - - /** - * The meta object id for the 'Integer' data type. - * - * - * @see java.math.BigInteger - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getInteger() - * @generated - */ - public static final int INTEGER = 28; - - /** - * The meta object id for the 'Int Object' data type. - * - * - * @see java.lang.Integer - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getIntObject() - * @generated - */ - public static final int INT_OBJECT = 29; - - /** - * The meta object id for the 'Long' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getLong() - * @generated - */ - public static final int LONG = 30; - - /** - * The meta object id for the 'Long Object' data type. - * - * - * @see java.lang.Long - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getLongObject() - * @generated - */ - public static final int LONG_OBJECT = 31; - - /** - * The meta object id for the 'Month' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getMonth() - * @generated - */ - public static final int MONTH = 32; - - /** - * The meta object id for the 'Month Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getMonthDay() - * @generated - */ - public static final int MONTH_DAY = 33; - - /** - * The meta object id for the 'Object' data type. - * - * - * @see java.lang.Object - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getObject() - * @generated - */ - public static final int OBJECT = 34; - - /** - * The meta object id for the 'Short' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getShort() - * @generated - */ - public static final int SHORT = 35; - - /** - * The meta object id for the 'Short Object' data type. - * - * - * @see java.lang.Short - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getShortObject() - * @generated - */ - public static final int SHORT_OBJECT = 36; - - /** - * The meta object id for the 'String' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getString() - * @generated - */ - public static final int STRING = 37; - - /** - * The meta object id for the 'Strings' data type. - * - * - * @see java.util.List - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getStrings() - * @generated - */ - public static final int STRINGS = 38; - - /** - * The meta object id for the 'Time' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTime() - * @generated - */ - public static final int TIME = 39; - - /** - * The meta object id for the 'URI' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getURI() - * @generated - */ - public static final int URI = 40; - - /** - * The meta object id for the 'Year' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYear() - * @generated - */ - public static final int YEAR = 41; - - /** - * The meta object id for the 'Year Month' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYearMonth() - * @generated - */ - public static final int YEAR_MONTH = 42; - - /** - * The meta object id for the 'Year Month Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYearMonthDay() - * @generated - */ - public static final int YEAR_MONTH_DAY = 43; - - /** - * - * - * @generated - */ - private EClass baseDataGraphTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass changeSummaryTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass dataGraphTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass dataObjectEClass = null; - - /** - * - * - * @generated - */ - private EClass documentRootEClass = null; - - /** - * - * - * @generated - */ - private EClass modelsTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass propertyEClass = null; - - /** - * - * - * @generated - */ - private EClass textTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass typeEClass = null; - - /** - * - * - * @generated - */ - private EClass typesEClass = null; - - /** - * - * - * @generated - */ - private EClass xsdTypeEClass = null; - - /** - * - * - * @generated - */ - private EDataType booleanEDataType = null; - - /** - * - * - * @generated - */ - private EDataType booleanObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType byteEDataType = null; - - /** - * - * - * @generated - */ - private EDataType byteObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType bytesEDataType = null; - - /** - * - * - * @generated - */ - private EDataType characterEDataType = null; - - /** - * - * - * @generated - */ - private EDataType characterObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType dateEDataType = null; - - /** - * - * - * @generated - */ - private EDataType dateTimeEDataType = null; - - /** - * - * - * @generated - */ - private EDataType dayEDataType = null; - - /** - * - * - * @generated - */ - private EDataType decimalEDataType = null; - - /** - * - * - * @generated - */ - private EDataType doubleEDataType = null; - - /** - * - * - * @generated - */ - private EDataType doubleObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType durationEDataType = null; - - /** - * - * - * @generated - */ - private EDataType floatEDataType = null; - - /** - * - * - * @generated - */ - private EDataType floatObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType intEDataType = null; - - /** - * - * - * @generated - */ - private EDataType integerEDataType = null; - - /** - * - * - * @generated - */ - private EDataType intObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType longEDataType = null; - - /** - * - * - * @generated - */ - private EDataType longObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType monthEDataType = null; - - /** - * - * - * @generated - */ - private EDataType monthDayEDataType = null; - - /** - * - * - * @generated - */ - private EDataType objectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType shortEDataType = null; - - /** - * - * - * @generated - */ - private EDataType shortObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType stringEDataType = null; - - /** - * - * - * @generated - */ - private EDataType stringsEDataType = null; - - /** - * - * - * @generated - */ - private EDataType timeEDataType = null; - - /** - * - * - * @generated - */ - private EDataType uriEDataType = null; - - /** - * - * - * @generated - */ - private EDataType yearEDataType = null; - - /** - * - * - * @generated - */ - private EDataType yearMonthEDataType = null; - - /** - * - * - * @generated - */ - private EDataType yearMonthDayEDataType = 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.model.impl.ModelPackageImpl#eNS_URI - * @see #init() - * @generated - */ - private ModelPackageImpl() - { - super(eNS_URI, ((EFactory)ModelFactory.INSTANCE)); - } - - /** - * - * - * @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. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ModelPackageImpl init() - { - if (isInited) return (ModelPackageImpl)EPackage.Registry.INSTANCE.getEPackage(ModelPackageImpl.eNS_URI); - - // Obtain or create and register package - ModelPackageImpl theModelPackageImpl = (ModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ModelPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - XMLTypePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theModelPackageImpl.createPackageContents(); - - // Initialize created meta-data - theModelPackageImpl.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theModelPackageImpl.freeze(); - - return theModelPackageImpl; - } - - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.BaseDataGraphType Base Data Graph Type}'. - * - * - * @return the meta object for class 'Base Data Graph Type'. - * @see org.apache.tuscany.sdo.model.BaseDataGraphType - * @generated - */ - public EClass getBaseDataGraphType() - { - return baseDataGraphTypeEClass; - } - - /** - * Returns the meta object for the containment reference '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getModels Models}'. - * - * - * @return the meta object for the containment reference 'Models'. - * @see org.apache.tuscany.sdo.model.BaseDataGraphType#getModels() - * @see #getBaseDataGraphType() - * @generated - */ - public EReference getBaseDataGraphType_Models() - { - return (EReference)baseDataGraphTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the containment reference '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd Xsd}'. - * - * - * @return the meta object for the containment reference 'Xsd'. - * @see org.apache.tuscany.sdo.model.BaseDataGraphType#getXsd() - * @see #getBaseDataGraphType() - * @generated - */ - public EReference getBaseDataGraphType_Xsd() - { - return (EReference)baseDataGraphTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the containment reference '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary Change Summary}'. - * - * - * @return the meta object for the containment reference 'Change Summary'. - * @see org.apache.tuscany.sdo.model.BaseDataGraphType#getChangeSummary() - * @see #getBaseDataGraphType() - * @generated - */ - public EReference getBaseDataGraphType_ChangeSummary() - { - return (EReference)baseDataGraphTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.BaseDataGraphType#getAnyAttribute Any Attribute}'. - * - * - * @return the meta object for the attribute list 'Any Attribute'. - * @see org.apache.tuscany.sdo.model.BaseDataGraphType#getAnyAttribute() - * @see #getBaseDataGraphType() - * @generated - */ - public EAttribute getBaseDataGraphType_AnyAttribute() - { - return (EAttribute)baseDataGraphTypeEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.ChangeSummaryType Change Summary Type}'. - * - * - * @return the meta object for class 'Change Summary Type'. - * @see org.apache.tuscany.sdo.model.ChangeSummaryType - * @generated - */ - public EClass getChangeSummaryType() - { - return changeSummaryTypeEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.ChangeSummaryType#getAny() - * @see #getChangeSummaryType() - * @generated - */ - public EAttribute getChangeSummaryType_Any() - { - return (EAttribute)changeSummaryTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#getCreate Create}'. - * - * - * @return the meta object for the attribute 'Create'. - * @see org.apache.tuscany.sdo.model.ChangeSummaryType#getCreate() - * @see #getChangeSummaryType() - * @generated - */ - public EAttribute getChangeSummaryType_Create() - { - return (EAttribute)changeSummaryTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#getDelete Delete}'. - * - * - * @return the meta object for the attribute 'Delete'. - * @see org.apache.tuscany.sdo.model.ChangeSummaryType#getDelete() - * @see #getChangeSummaryType() - * @generated - */ - public EAttribute getChangeSummaryType_Delete() - { - return (EAttribute)changeSummaryTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging Logging}'. - * - * - * @return the meta object for the attribute 'Logging'. - * @see org.apache.tuscany.sdo.model.ChangeSummaryType#isLogging() - * @see #getChangeSummaryType() - * @generated - */ - public EAttribute getChangeSummaryType_Logging() - { - return (EAttribute)changeSummaryTypeEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.DataGraphType Data Graph Type}'. - * - * - * @return the meta object for class 'Data Graph Type'. - * @see org.apache.tuscany.sdo.model.DataGraphType - * @generated - */ - public EClass getDataGraphType() - { - return dataGraphTypeEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.DataGraphType#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.DataGraphType#getAny() - * @see #getDataGraphType() - * @generated - */ - public EAttribute getDataGraphType_Any() - { - return (EAttribute)dataGraphTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.DataObject Data Object}'. - * - * - * @return the meta object for class 'Data Object'. - * @see org.apache.tuscany.sdo.model.DataObject - * @generated - */ - public EClass getDataObject() - { - return dataObjectEClass; - } - - /** - * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. - * - * - * @return the meta object for class 'Document Root'. - * @see org.eclipse.emf.ecore.EObject - * @generated - */ - public EClass getDocumentRoot() - { - return documentRootEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. - * - * - * @return the meta object for the attribute list 'Mixed'. - * @see org.eclipse.emf.ecore.EObject#getMixed() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Mixed() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. - * - * - * @return the meta object for the map 'XMLNS Prefix Map'. - * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XMLNSPrefixMap() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. - * - * - * @return the meta object for the map 'XSI Schema Location'. - * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XSISchemaLocation() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getDatagraph Datagraph}'. - * - * - * @return the meta object for the containment reference 'Datagraph'. - * @see org.eclipse.emf.ecore.EObject#getDatagraph() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_Datagraph() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getDataObject Data Object}'. - * - * - * @return the meta object for the containment reference 'Data Object'. - * @see org.eclipse.emf.ecore.EObject#getDataObject() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_DataObject() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(4); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getType Type}'. - * - * - * @return the meta object for the containment reference 'Type'. - * @see org.eclipse.emf.ecore.EObject#getType() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_Type() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(5); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getTypes Types}'. - * - * - * @return the meta object for the containment reference 'Types'. - * @see org.eclipse.emf.ecore.EObject#getTypes() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_Types() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(6); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#getRef Ref}'. - * - * - * @return the meta object for the attribute 'Ref'. - * @see org.eclipse.emf.ecore.EObject#getRef() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Ref() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(7); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.ModelsType Models Type}'. - * - * - * @return the meta object for class 'Models Type'. - * @see org.apache.tuscany.sdo.model.ModelsType - * @generated - */ - public EClass getModelsType() - { - return modelsTypeEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.ModelsType#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.ModelsType#getAny() - * @see #getModelsType() - * @generated - */ - public EAttribute getModelsType_Any() - { - return (EAttribute)modelsTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.Property Property}'. - * - * - * @return the meta object for class 'Property'. - * @see org.apache.tuscany.sdo.model.Property - * @generated - */ - public EClass getProperty() - { - return propertyEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Property#getAliasName Alias Name}'. - * - * - * @return the meta object for the attribute list 'Alias Name'. - * @see org.apache.tuscany.sdo.model.Property#getAliasName() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_AliasName() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Property#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.Property#getAny() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_Any() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Property#isContainment Containment}'. - * - * - * @return the meta object for the attribute 'Containment'. - * @see org.apache.tuscany.sdo.model.Property#isContainment() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_Containment() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Property#getDefault Default}'. - * - * - * @return the meta object for the attribute 'Default'. - * @see org.apache.tuscany.sdo.model.Property#getDefault() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_Default() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Property#isMany Many}'. - * - * - * @return the meta object for the attribute 'Many'. - * @see org.apache.tuscany.sdo.model.Property#isMany() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_Many() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(4); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Property#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.apache.tuscany.sdo.model.Property#getName() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_Name() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(5); - } - - /** - * Returns the meta object for the reference '{@link org.apache.tuscany.sdo.model.Property#getOpposite Opposite}'. - * - * - * @return the meta object for the reference 'Opposite'. - * @see org.apache.tuscany.sdo.model.Property#getOpposite() - * @see #getProperty() - * @generated - */ - public EReference getProperty_Opposite() - { - return (EReference)propertyEClass.getEStructuralFeatures().get(6); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Property#isReadOnly Read Only}'. - * - * - * @return the meta object for the attribute 'Read Only'. - * @see org.apache.tuscany.sdo.model.Property#isReadOnly() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_ReadOnly() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(7); - } - - /** - * Returns the meta object for the reference '{@link org.apache.tuscany.sdo.model.Property#getType Type}'. - * - * - * @return the meta object for the reference 'Type'. - * @see org.apache.tuscany.sdo.model.Property#getType() - * @see #getProperty() - * @generated - */ - public EReference getProperty_Type() - { - return (EReference)propertyEClass.getEStructuralFeatures().get(8); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Property#getAnyAttribute Any Attribute}'. - * - * - * @return the meta object for the attribute list 'Any Attribute'. - * @see org.apache.tuscany.sdo.model.Property#getAnyAttribute() - * @see #getProperty() - * @generated - */ - public EAttribute getProperty_AnyAttribute() - { - return (EAttribute)propertyEClass.getEStructuralFeatures().get(9); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.TextType Text Type}'. - * - * - * @return the meta object for class 'Text Type'. - * @see org.apache.tuscany.sdo.model.TextType - * @generated - */ - public EClass getTextType() - { - return textTypeEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.TextType#getText Text}'. - * - * - * @return the meta object for the attribute list 'Text'. - * @see org.apache.tuscany.sdo.model.TextType#getText() - * @see #getTextType() - * @generated - */ - public EAttribute getTextType_Text() - { - return (EAttribute)textTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.Type Type}'. - * - * - * @return the meta object for class 'Type'. - * @see org.apache.tuscany.sdo.model.Type - * @generated - */ - public EClass getType() - { - return typeEClass; - } - - /** - * Returns the meta object for the reference list '{@link org.apache.tuscany.sdo.model.Type#getBaseType Base Type}'. - * - * - * @return the meta object for the reference list 'Base Type'. - * @see org.apache.tuscany.sdo.model.Type#getBaseType() - * @see #getType() - * @generated - */ - public EReference getType_BaseType() - { - return (EReference)typeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.model.Type#getProperty Property}'. - * - * - * @return the meta object for the containment reference list 'Property'. - * @see org.apache.tuscany.sdo.model.Type#getProperty() - * @see #getType() - * @generated - */ - public EReference getType_Property() - { - return (EReference)typeEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Type#getAliasName Alias Name}'. - * - * - * @return the meta object for the attribute list 'Alias Name'. - * @see org.apache.tuscany.sdo.model.Type#getAliasName() - * @see #getType() - * @generated - */ - public EAttribute getType_AliasName() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Type#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.Type#getAny() - * @see #getType() - * @generated - */ - public EAttribute getType_Any() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#isAbstract Abstract}'. - * - * - * @return the meta object for the attribute 'Abstract'. - * @see org.apache.tuscany.sdo.model.Type#isAbstract() - * @see #getType() - * @generated - */ - public EAttribute getType_Abstract() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(4); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#isDataType Data Type}'. - * - * - * @return the meta object for the attribute 'Data Type'. - * @see org.apache.tuscany.sdo.model.Type#isDataType() - * @see #getType() - * @generated - */ - public EAttribute getType_DataType() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(5); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.apache.tuscany.sdo.model.Type#getName() - * @see #getType() - * @generated - */ - public EAttribute getType_Name() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(6); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#isOpen Open}'. - * - * - * @return the meta object for the attribute 'Open'. - * @see org.apache.tuscany.sdo.model.Type#isOpen() - * @see #getType() - * @generated - */ - public EAttribute getType_Open() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(7); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#isSequenced Sequenced}'. - * - * - * @return the meta object for the attribute 'Sequenced'. - * @see org.apache.tuscany.sdo.model.Type#isSequenced() - * @see #getType() - * @generated - */ - public EAttribute getType_Sequenced() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(8); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.Type#getUri Uri}'. - * - * - * @return the meta object for the attribute 'Uri'. - * @see org.apache.tuscany.sdo.model.Type#getUri() - * @see #getType() - * @generated - */ - public EAttribute getType_Uri() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(9); - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.Type#getAnyAttribute Any Attribute}'. - * - * - * @return the meta object for the attribute list 'Any Attribute'. - * @see org.apache.tuscany.sdo.model.Type#getAnyAttribute() - * @see #getType() - * @generated - */ - public EAttribute getType_AnyAttribute() - { - return (EAttribute)typeEClass.getEStructuralFeatures().get(10); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.Types Types}'. - * - * - * @return the meta object for class 'Types'. - * @see org.apache.tuscany.sdo.model.Types - * @generated - */ - public EClass getTypes() - { - return typesEClass; - } - - /** - * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.model.Types#getType Type}'. - * - * - * @return the meta object for the containment reference list 'Type'. - * @see org.apache.tuscany.sdo.model.Types#getType() - * @see #getTypes() - * @generated - */ - public EReference getTypes_Type() - { - return (EReference)typesEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.XSDType XSD Type}'. - * - * - * @return the meta object for class 'XSD Type'. - * @see org.apache.tuscany.sdo.model.XSDType - * @generated - */ - public EClass getXSDType() - { - return xsdTypeEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.apache.tuscany.sdo.model.XSDType#getAny Any}'. - * - * - * @return the meta object for the attribute list 'Any'. - * @see org.apache.tuscany.sdo.model.XSDType#getAny() - * @see #getXSDType() - * @generated - */ - public EAttribute getXSDType_Any() - { - return (EAttribute)xsdTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for data type 'Boolean'. - * - * - * @return the meta object for data type 'Boolean'. - * @generated - */ - public EDataType getBoolean() - { - return booleanEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Boolean Boolean Object}'. - * - * - * @return the meta object for data type 'Boolean Object'. - * @see java.lang.Boolean - * @generated - */ - public EDataType getBooleanObject() - { - return booleanObjectEDataType; - } - - /** - * Returns the meta object for data type 'Byte'. - * - * - * @return the meta object for data type 'Byte'. - * @generated - */ - public EDataType getByte() - { - return byteEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Byte Byte Object}'. - * - * - * @return the meta object for data type 'Byte Object'. - * @see java.lang.Byte - * @generated - */ - public EDataType getByteObject() - { - return byteObjectEDataType; - } - - /** - * Returns the meta object for data type 'Bytes'. - * - * - * @return the meta object for data type 'Bytes'. - * @generated - */ - public EDataType getBytes() - { - return bytesEDataType; - } - - /** - * Returns the meta object for data type 'Character'. - * - * - * @return the meta object for data type 'Character'. - * @generated - */ - public EDataType getCharacter() - { - return characterEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Character Character Object}'. - * - * - * @return the meta object for data type 'Character Object'. - * @see java.lang.Character - * @generated - */ - public EDataType getCharacterObject() - { - return characterObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.util.Date Date}'. - * - * - * @return the meta object for data type 'Date'. - * @see java.util.Date - * @generated - */ - public EDataType getDate() - { - return dateEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Date Time}'. - * - * - * @return the meta object for data type 'Date Time'. - * @see java.lang.String - * @generated - */ - public EDataType getDateTime() - { - return dateTimeEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Day}'. - * - * - * @return the meta object for data type 'Day'. - * @see java.lang.String - * @generated - */ - public EDataType getDay() - { - return dayEDataType; - } - - /** - * Returns the meta object for data type '{@link java.math.BigDecimal Decimal}'. - * - * - * @return the meta object for data type 'Decimal'. - * @see java.math.BigDecimal - * @generated - */ - public EDataType getDecimal() - { - return decimalEDataType; - } - - /** - * Returns the meta object for data type 'Double'. - * - * - * @return the meta object for data type 'Double'. - * @generated - */ - public EDataType getDouble() - { - return doubleEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Double Double Object}'. - * - * - * @return the meta object for data type 'Double Object'. - * @see java.lang.Double - * @generated - */ - public EDataType getDoubleObject() - { - return doubleObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Duration}'. - * - * - * @return the meta object for data type 'Duration'. - * @see java.lang.String - * @generated - */ - public EDataType getDuration() - { - return durationEDataType; - } - - /** - * Returns the meta object for data type 'Float'. - * - * - * @return the meta object for data type 'Float'. - * @generated - */ - public EDataType getFloat() - { - return floatEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Float Float Object}'. - * - * - * @return the meta object for data type 'Float Object'. - * @see java.lang.Float - * @generated - */ - public EDataType getFloatObject() - { - return floatObjectEDataType; - } - - /** - * Returns the meta object for data type 'Int'. - * - * - * @return the meta object for data type 'Int'. - * @generated - */ - public EDataType getInt() - { - return intEDataType; - } - - /** - * Returns the meta object for data type '{@link java.math.BigInteger Integer}'. - * - * - * @return the meta object for data type 'Integer'. - * @see java.math.BigInteger - * @generated - */ - public EDataType getInteger() - { - return integerEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Integer Int Object}'. - * - * - * @return the meta object for data type 'Int Object'. - * @see java.lang.Integer - * @generated - */ - public EDataType getIntObject() - { - return intObjectEDataType; - } - - /** - * Returns the meta object for data type 'Long'. - * - * - * @return the meta object for data type 'Long'. - * @generated - */ - public EDataType getLong() - { - return longEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Long Long Object}'. - * - * - * @return the meta object for data type 'Long Object'. - * @see java.lang.Long - * @generated - */ - public EDataType getLongObject() - { - return longObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Month}'. - * - * - * @return the meta object for data type 'Month'. - * @see java.lang.String - * @generated - */ - public EDataType getMonth() - { - return monthEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Month Day}'. - * - * - * @return the meta object for data type 'Month Day'. - * @see java.lang.String - * @generated - */ - public EDataType getMonthDay() - { - return monthDayEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Object Object}'. - * - * - * @return the meta object for data type 'Object'. - * @see java.lang.Object - * @generated - */ - public EDataType getObject() - { - return objectEDataType; - } - - /** - * Returns the meta object for data type 'Short'. - * - * - * @return the meta object for data type 'Short'. - * @generated - */ - public EDataType getShort() - { - return shortEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Short Short Object}'. - * - * - * @return the meta object for data type 'Short Object'. - * @see java.lang.Short - * @generated - */ - public EDataType getShortObject() - { - return shortObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String String}'. - * - * - * @return the meta object for data type 'String'. - * @see java.lang.String - * @generated - */ - public EDataType getString() - { - return stringEDataType; - } - - /** - * Returns the meta object for data type '{@link java.util.List Strings}'. - * - * - * @return the meta object for data type 'Strings'. - * @see java.util.List - * @generated - */ - public EDataType getStrings() - { - return stringsEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Time}'. - * - * - * @return the meta object for data type 'Time'. - * @see java.lang.String - * @generated - */ - public EDataType getTime() - { - return timeEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String URI}'. - * - * - * @return the meta object for data type 'URI'. - * @see java.lang.String - * @generated - */ - public EDataType getURI() - { - return uriEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Year}'. - * - * - * @return the meta object for data type 'Year'. - * @see java.lang.String - * @generated - */ - public EDataType getYear() - { - return yearEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Year Month}'. - * - * - * @return the meta object for data type 'Year Month'. - * @see java.lang.String - * @generated - */ - public EDataType getYearMonth() - { - return yearMonthEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.String Year Month Day}'. - * - * - * @return the meta object for data type 'Year Month Day'. - * @see java.lang.String - * @generated - */ - public EDataType getYearMonthDay() - { - return yearMonthDayEDataType; - } - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - public ModelFactory getModelFactory() - { - return (ModelFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - baseDataGraphTypeEClass = createEClass(BASE_DATA_GRAPH_TYPE); - createEReference(baseDataGraphTypeEClass, BASE_DATA_GRAPH_TYPE__MODELS); - createEReference(baseDataGraphTypeEClass, BASE_DATA_GRAPH_TYPE__XSD); - createEReference(baseDataGraphTypeEClass, BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY); - createEAttribute(baseDataGraphTypeEClass, BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE); - - changeSummaryTypeEClass = createEClass(CHANGE_SUMMARY_TYPE); - createEAttribute(changeSummaryTypeEClass, CHANGE_SUMMARY_TYPE__ANY); - createEAttribute(changeSummaryTypeEClass, CHANGE_SUMMARY_TYPE__CREATE); - createEAttribute(changeSummaryTypeEClass, CHANGE_SUMMARY_TYPE__DELETE); - createEAttribute(changeSummaryTypeEClass, CHANGE_SUMMARY_TYPE__LOGGING); - - dataGraphTypeEClass = createEClass(DATA_GRAPH_TYPE); - createEAttribute(dataGraphTypeEClass, DATA_GRAPH_TYPE__ANY); - - dataObjectEClass = createEClass(DATA_OBJECT); - - documentRootEClass = createEClass(DOCUMENT_ROOT); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); - createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - createEReference(documentRootEClass, DOCUMENT_ROOT__DATAGRAPH); - createEReference(documentRootEClass, DOCUMENT_ROOT__DATA_OBJECT); - createEReference(documentRootEClass, DOCUMENT_ROOT__TYPE); - createEReference(documentRootEClass, DOCUMENT_ROOT__TYPES); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__REF); - - modelsTypeEClass = createEClass(MODELS_TYPE); - createEAttribute(modelsTypeEClass, MODELS_TYPE__ANY); - - propertyEClass = createEClass(PROPERTY); - createEAttribute(propertyEClass, PROPERTY__ALIAS_NAME); - createEAttribute(propertyEClass, PROPERTY__ANY); - createEAttribute(propertyEClass, PROPERTY__CONTAINMENT); - createEAttribute(propertyEClass, PROPERTY__DEFAULT); - createEAttribute(propertyEClass, PROPERTY__MANY); - createEAttribute(propertyEClass, PROPERTY__NAME); - createEReference(propertyEClass, PROPERTY__OPPOSITE); - createEAttribute(propertyEClass, PROPERTY__READ_ONLY); - createEReference(propertyEClass, PROPERTY__TYPE); - createEAttribute(propertyEClass, PROPERTY__ANY_ATTRIBUTE); - - textTypeEClass = createEClass(TEXT_TYPE); - createEAttribute(textTypeEClass, TEXT_TYPE__TEXT); - - typeEClass = createEClass(TYPE); - createEReference(typeEClass, TYPE__BASE_TYPE); - createEReference(typeEClass, TYPE__PROPERTY); - createEAttribute(typeEClass, TYPE__ALIAS_NAME); - createEAttribute(typeEClass, TYPE__ANY); - createEAttribute(typeEClass, TYPE__ABSTRACT); - createEAttribute(typeEClass, TYPE__DATA_TYPE); - createEAttribute(typeEClass, TYPE__NAME); - createEAttribute(typeEClass, TYPE__OPEN); - createEAttribute(typeEClass, TYPE__SEQUENCED); - createEAttribute(typeEClass, TYPE__URI); - createEAttribute(typeEClass, TYPE__ANY_ATTRIBUTE); - - typesEClass = createEClass(TYPES); - createEReference(typesEClass, TYPES__TYPE); - - xsdTypeEClass = createEClass(XSD_TYPE); - createEAttribute(xsdTypeEClass, XSD_TYPE__ANY); - - // Create data types - booleanEDataType = createEDataType(BOOLEAN); - booleanObjectEDataType = createEDataType(BOOLEAN_OBJECT); - byteEDataType = createEDataType(BYTE); - byteObjectEDataType = createEDataType(BYTE_OBJECT); - bytesEDataType = createEDataType(BYTES); - characterEDataType = createEDataType(CHARACTER); - characterObjectEDataType = createEDataType(CHARACTER_OBJECT); - dateEDataType = createEDataType(DATE); - dateTimeEDataType = createEDataType(DATE_TIME); - dayEDataType = createEDataType(DAY); - decimalEDataType = createEDataType(DECIMAL); - doubleEDataType = createEDataType(DOUBLE); - doubleObjectEDataType = createEDataType(DOUBLE_OBJECT); - durationEDataType = createEDataType(DURATION); - floatEDataType = createEDataType(FLOAT); - floatObjectEDataType = createEDataType(FLOAT_OBJECT); - intEDataType = createEDataType(INT); - integerEDataType = createEDataType(INTEGER); - intObjectEDataType = createEDataType(INT_OBJECT); - longEDataType = createEDataType(LONG); - longObjectEDataType = createEDataType(LONG_OBJECT); - monthEDataType = createEDataType(MONTH); - monthDayEDataType = createEDataType(MONTH_DAY); - objectEDataType = createEDataType(OBJECT); - shortEDataType = createEDataType(SHORT); - shortObjectEDataType = createEDataType(SHORT_OBJECT); - stringEDataType = createEDataType(STRING); - stringsEDataType = createEDataType(STRINGS); - timeEDataType = createEDataType(TIME); - uriEDataType = createEDataType(URI); - yearEDataType = createEDataType(YEAR); - yearMonthEDataType = createEDataType(YEAR_MONTH); - yearMonthDayEDataType = createEDataType(YEAR_MONTH_DAY); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - - // Add supertypes to classes - dataGraphTypeEClass.getESuperTypes().add(this.getBaseDataGraphType()); - - // Initialize classes and features; add operations and parameters - initEClass(baseDataGraphTypeEClass, BaseDataGraphType.class, "BaseDataGraphType", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getBaseDataGraphType_Models(), this.getModelsType(), null, "models", null, 0, 1, BaseDataGraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBaseDataGraphType_Xsd(), this.getXSDType(), null, "xsd", null, 0, 1, BaseDataGraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getBaseDataGraphType_ChangeSummary(), this.getChangeSummaryType(), null, "changeSummary", null, 0, 1, BaseDataGraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getBaseDataGraphType_AnyAttribute(), ecorePackage.getEFeatureMapEntry(), "anyAttribute", null, 0, -1, BaseDataGraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(changeSummaryTypeEClass, ChangeSummaryType.class, "ChangeSummaryType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getChangeSummaryType_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, -1, ChangeSummaryType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getChangeSummaryType_Create(), theXMLTypePackage.getString(), "create", null, 0, 1, ChangeSummaryType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getChangeSummaryType_Delete(), theXMLTypePackage.getString(), "delete", null, 0, 1, ChangeSummaryType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getChangeSummaryType_Logging(), theXMLTypePackage.getBoolean(), "logging", null, 0, 1, ChangeSummaryType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(dataGraphTypeEClass, DataGraphType.class, "DataGraphType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDataGraphType_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, 1, DataGraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(dataObjectEClass, DataObject.class, "DataObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDocumentRoot_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(getDocumentRoot_XMLNSPrefixMap(), 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(getDocumentRoot_XSISchemaLocation(), 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); - initEReference(getDocumentRoot_Datagraph(), this.getDataGraphType(), null, "datagraph", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getDocumentRoot_DataObject(), ecorePackage.getEObject(), null, "dataObject", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getDocumentRoot_Type(), this.getType(), null, "type", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getDocumentRoot_Types(), this.getTypes(), null, "types", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getDocumentRoot_Ref(), theXMLTypePackage.getString(), "ref", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(modelsTypeEClass, ModelsType.class, "ModelsType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getModelsType_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, -1, ModelsType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProperty_AliasName(), this.getString(), "aliasName", null, 0, -1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, -1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Containment(), this.getBoolean(), "containment", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Default(), this.getString(), "default", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Many(), this.getBoolean(), "many", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_Name(), this.getString(), "name", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProperty_Opposite(), this.getProperty(), null, "opposite", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_ReadOnly(), this.getBoolean(), "readOnly", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProperty_Type(), this.getType(), null, "type", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProperty_AnyAttribute(), ecorePackage.getEFeatureMapEntry(), "anyAttribute", null, 0, -1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(textTypeEClass, TextType.class, "TextType", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getTextType_Text(), theXMLTypePackage.getString(), "text", null, 0, -1, TextType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getType_BaseType(), this.getType(), null, "baseType", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getType_Property(), this.getProperty(), null, "property", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_AliasName(), this.getString(), "aliasName", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Abstract(), this.getBoolean(), "abstract", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_DataType(), this.getBoolean(), "dataType", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Name(), theXMLTypePackage.getID(), "name", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Open(), this.getBoolean(), "open", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Sequenced(), this.getBoolean(), "sequenced", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_Uri(), this.getURI(), "uri", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getType_AnyAttribute(), ecorePackage.getEFeatureMapEntry(), "anyAttribute", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(typesEClass, Types.class, "Types", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getTypes_Type(), this.getType(), null, "type", null, 0, -1, Types.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(xsdTypeEClass, XSDType.class, "XSDType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getXSDType_Any(), ecorePackage.getEFeatureMapEntry(), "any", null, 0, -1, XSDType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize data types - initEDataType(booleanEDataType, boolean.class, "Boolean", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(booleanObjectEDataType, Boolean.class, "BooleanObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(byteEDataType, byte.class, "Byte", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(byteObjectEDataType, Byte.class, "ByteObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(bytesEDataType, byte[].class, "Bytes", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(characterEDataType, char.class, "Character", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(characterObjectEDataType, Character.class, "CharacterObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(dateEDataType, Date.class, "Date", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(dateTimeEDataType, String.class, "DateTime", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(dayEDataType, String.class, "Day", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(decimalEDataType, BigDecimal.class, "Decimal", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(doubleEDataType, double.class, "Double", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(doubleObjectEDataType, Double.class, "DoubleObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(durationEDataType, String.class, "Duration", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(floatEDataType, float.class, "Float", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(floatObjectEDataType, Float.class, "FloatObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(intEDataType, int.class, "Int", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(integerEDataType, BigInteger.class, "Integer", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(intObjectEDataType, Integer.class, "IntObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(longEDataType, long.class, "Long", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(longObjectEDataType, Long.class, "LongObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(monthEDataType, String.class, "Month", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(monthDayEDataType, String.class, "MonthDay", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(objectEDataType, Object.class, "Object", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(shortEDataType, short.class, "Short", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(shortObjectEDataType, Short.class, "ShortObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(stringEDataType, String.class, "String", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(stringsEDataType, List.class, "Strings", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(timeEDataType, String.class, "Time", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(uriEDataType, String.class, "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(yearEDataType, String.class, "Year", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(yearMonthEDataType, String.class, "YearMonth", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(yearMonthDayEDataType, String.class, "YearMonthDay", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() - { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (baseDataGraphTypeEClass, - source, - new String[] - { - "name", "BaseDataGraphType", - "kind", "elementOnly" - }); - addAnnotation - (getBaseDataGraphType_Models(), - source, - new String[] - { - "kind", "element", - "name", "models" - }); - addAnnotation - (getBaseDataGraphType_Xsd(), - source, - new String[] - { - "kind", "element", - "name", "xsd" - }); - addAnnotation - (getBaseDataGraphType_ChangeSummary(), - source, - new String[] - { - "kind", "element", - "name", "changeSummary" - }); - addAnnotation - (getBaseDataGraphType_AnyAttribute(), - source, - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##other", - "name", ":3", - "processing", "lax" - }); - addAnnotation - (booleanEDataType, - source, - new String[] - { - "name", "Boolean" - }); - addAnnotation - (booleanObjectEDataType, - source, - new String[] - { - "name", "Boolean:Object", - "baseType", "Boolean" - }); - addAnnotation - (byteEDataType, - source, - new String[] - { - "name", "Byte" - }); - addAnnotation - (byteObjectEDataType, - source, - new String[] - { - "name", "Byte:Object", - "baseType", "Byte" - }); - addAnnotation - (bytesEDataType, - source, - new String[] - { - "name", "Bytes" - }); - addAnnotation - (changeSummaryTypeEClass, - source, - new String[] - { - "name", "ChangeSummaryType", - "kind", "elementOnly" - }); - addAnnotation - (getChangeSummaryType_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "##any", - "name", ":0", - "processing", "lax" - }); - addAnnotation - (getChangeSummaryType_Create(), - source, - new String[] - { - "kind", "attribute", - "name", "create" - }); - addAnnotation - (getChangeSummaryType_Delete(), - source, - new String[] - { - "kind", "attribute", - "name", "delete" - }); - addAnnotation - (getChangeSummaryType_Logging(), - source, - new String[] - { - "kind", "attribute", - "name", "logging" - }); - addAnnotation - (characterEDataType, - source, - new String[] - { - "name", "Character" - }); - addAnnotation - (characterObjectEDataType, - source, - new String[] - { - "name", "Character:Object", - "baseType", "Character" - }); - addAnnotation - (dataGraphTypeEClass, - source, - new String[] - { - "name", "DataGraphType", - "kind", "elementOnly" - }); - addAnnotation - (getDataGraphType_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":4", - "processing", "lax" - }); - addAnnotation - (dataObjectEClass, - source, - new String[] - { - "name", "DataObject", - "kind", "empty" - }); - addAnnotation - (dateEDataType, - source, - new String[] - { - "name", "Date" - }); - addAnnotation - (dateTimeEDataType, - source, - new String[] - { - "name", "DateTime" - }); - addAnnotation - (dayEDataType, - source, - new String[] - { - "name", "Day" - }); - addAnnotation - (decimalEDataType, - source, - new String[] - { - "name", "Decimal" - }); - addAnnotation - (documentRootEClass, - source, - new String[] - { - "name", "", - "kind", "mixed" - }); - addAnnotation - (getDocumentRoot_Mixed(), - source, - new String[] - { - "kind", "elementWildcard", - "name", ":mixed" - }); - addAnnotation - (getDocumentRoot_XMLNSPrefixMap(), - source, - new String[] - { - "kind", "attribute", - "name", "xmlns:prefix" - }); - addAnnotation - (getDocumentRoot_XSISchemaLocation(), - source, - new String[] - { - "kind", "attribute", - "name", "xsi:schemaLocation" - }); - addAnnotation - (getDocumentRoot_Datagraph(), - source, - new String[] - { - "kind", "element", - "name", "datagraph", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_DataObject(), - source, - new String[] - { - "kind", "element", - "name", "dataObject", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_Type(), - source, - new String[] - { - "kind", "element", - "name", "type", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_Types(), - source, - new String[] - { - "kind", "element", - "name", "types", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_Ref(), - source, - new String[] - { - "kind", "attribute", - "name", "ref", - "namespace", "##targetNamespace" - }); - addAnnotation - (doubleEDataType, - source, - new String[] - { - "name", "Double" - }); - addAnnotation - (doubleObjectEDataType, - source, - new String[] - { - "name", "Double:Object", - "baseType", "Double" - }); - addAnnotation - (durationEDataType, - source, - new String[] - { - "name", "Duration" - }); - addAnnotation - (floatEDataType, - source, - new String[] - { - "name", "Float" - }); - addAnnotation - (floatObjectEDataType, - source, - new String[] - { - "name", "Float:Object", - "baseType", "Float" - }); - addAnnotation - (intEDataType, - source, - new String[] - { - "name", "Int" - }); - addAnnotation - (integerEDataType, - source, - new String[] - { - "name", "Integer" - }); - addAnnotation - (intObjectEDataType, - source, - new String[] - { - "name", "Int:Object", - "baseType", "Int" - }); - addAnnotation - (longEDataType, - source, - new String[] - { - "name", "Long" - }); - addAnnotation - (longObjectEDataType, - source, - new String[] - { - "name", "Long:Object", - "baseType", "Long" - }); - addAnnotation - (modelsTypeEClass, - source, - new String[] - { - "name", "ModelsType", - "kind", "elementOnly" - }); - addAnnotation - (getModelsType_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":0", - "processing", "lax" - }); - addAnnotation - (monthEDataType, - source, - new String[] - { - "name", "Month" - }); - addAnnotation - (monthDayEDataType, - source, - new String[] - { - "name", "MonthDay" - }); - addAnnotation - (objectEDataType, - source, - new String[] - { - "name", "Object" - }); - addAnnotation - (propertyEClass, - source, - new String[] - { - "name", "Property", - "kind", "elementOnly" - }); - addAnnotation - (getProperty_AliasName(), - source, - new String[] - { - "kind", "element", - "name", "aliasName", - "namespace", "##targetNamespace" - }); - addAnnotation - (getProperty_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":1", - "processing", "lax" - }); - addAnnotation - (getProperty_Containment(), - source, - new String[] - { - "kind", "attribute", - "name", "containment" - }); - addAnnotation - (getProperty_Default(), - source, - new String[] - { - "kind", "attribute", - "name", "default" - }); - addAnnotation - (getProperty_Many(), - source, - new String[] - { - "kind", "attribute", - "name", "many" - }); - addAnnotation - (getProperty_Name(), - source, - new String[] - { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (getProperty_Opposite(), - source, - new String[] - { - "kind", "attribute", - "name", "opposite" - }); - addAnnotation - (getProperty_ReadOnly(), - source, - new String[] - { - "kind", "attribute", - "name", "readOnly" - }); - addAnnotation - (getProperty_Type(), - source, - new String[] - { - "kind", "attribute", - "name", "type" - }); - addAnnotation - (getProperty_AnyAttribute(), - source, - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##any", - "name", ":9", - "processing", "lax" - }); - addAnnotation - (shortEDataType, - source, - new String[] - { - "name", "Short" - }); - addAnnotation - (shortObjectEDataType, - source, - new String[] - { - "name", "Short:Object", - "baseType", "Short" - }); - addAnnotation - (stringEDataType, - source, - new String[] - { - "name", "String" - }); - addAnnotation - (stringsEDataType, - source, - new String[] - { - "name", "Strings" - }); - addAnnotation - (textTypeEClass, - source, - new String[] - { - "name", "TextType", - "kind", "elementOnly" - }); - addAnnotation - (getTextType_Text(), - source, - new String[] - { - "kind", "element", - "name", "text", - "namespace", "##targetNamespace" - }); - addAnnotation - (timeEDataType, - source, - new String[] - { - "name", "Time" - }); - addAnnotation - (typeEClass, - source, - new String[] - { - "name", "Type", - "kind", "elementOnly" - }); - addAnnotation - (getType_BaseType(), - source, - new String[] - { - "kind", "element", - "name", "baseType", - "namespace", "##targetNamespace" - }); - addAnnotation - (getType_Property(), - source, - new String[] - { - "kind", "element", - "name", "property", - "namespace", "##targetNamespace" - }); - addAnnotation - (getType_AliasName(), - source, - new String[] - { - "kind", "element", - "name", "aliasName", - "namespace", "##targetNamespace" - }); - addAnnotation - (getType_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "##other", - "name", ":3", - "processing", "lax" - }); - addAnnotation - (getType_Abstract(), - source, - new String[] - { - "kind", "attribute", - "name", "abstract" - }); - addAnnotation - (getType_DataType(), - source, - new String[] - { - "kind", "attribute", - "name", "dataType" - }); - addAnnotation - (getType_Name(), - source, - new String[] - { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (getType_Open(), - source, - new String[] - { - "kind", "attribute", - "name", "open" - }); - addAnnotation - (getType_Sequenced(), - source, - new String[] - { - "kind", "attribute", - "name", "sequenced" - }); - addAnnotation - (getType_Uri(), - source, - new String[] - { - "kind", "attribute", - "name", "uri" - }); - addAnnotation - (getType_AnyAttribute(), - source, - new String[] - { - "kind", "attributeWildcard", - "wildcards", "##any", - "name", ":10", - "processing", "lax" - }); - addAnnotation - (typesEClass, - source, - new String[] - { - "name", "Types", - "kind", "elementOnly" - }); - addAnnotation - (getTypes_Type(), - source, - new String[] - { - "kind", "element", - "name", "type", - "namespace", "##targetNamespace" - }); - addAnnotation - (uriEDataType, - source, - new String[] - { - "name", "URI" - }); - addAnnotation - (xsdTypeEClass, - source, - new String[] - { - "name", "XSDType", - "kind", "elementOnly" - }); - addAnnotation - (getXSDType_Any(), - source, - new String[] - { - "kind", "elementWildcard", - "wildcards", "http://www.w3.org/2001/XMLSchema", - "name", ":0", - "processing", "lax" - }); - addAnnotation - (yearEDataType, - source, - new String[] - { - "name", "Year" - }); - addAnnotation - (yearMonthEDataType, - source, - new String[] - { - "name", "YearMonth" - }); - addAnnotation - (yearMonthDayEDataType, - source, - new String[] - { - "name", "YearMonthDay" - }); - } - - /** - * - * Defines literals for the meta objects that represent - *

    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - public interface Literals - { - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl Base Data Graph Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.BaseDataGraphTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBaseDataGraphType() - * @generated - */ - public static final EClass BASE_DATA_GRAPH_TYPE = eINSTANCE.getBaseDataGraphType(); - - /** - * The meta object literal for the 'Models' containment reference feature. - * - * - * @generated - */ - public static final EReference BASE_DATA_GRAPH_TYPE__MODELS = eINSTANCE.getBaseDataGraphType_Models(); - - /** - * The meta object literal for the 'Xsd' containment reference feature. - * - * - * @generated - */ - public static final EReference BASE_DATA_GRAPH_TYPE__XSD = eINSTANCE.getBaseDataGraphType_Xsd(); - - /** - * The meta object literal for the 'Change Summary' containment reference feature. - * - * - * @generated - */ - public static final EReference BASE_DATA_GRAPH_TYPE__CHANGE_SUMMARY = eINSTANCE.getBaseDataGraphType_ChangeSummary(); - - /** - * The meta object literal for the 'Any Attribute' attribute list feature. - * - * - * @generated - */ - public static final EAttribute BASE_DATA_GRAPH_TYPE__ANY_ATTRIBUTE = eINSTANCE.getBaseDataGraphType_AnyAttribute(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl Change Summary Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.ChangeSummaryTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getChangeSummaryType() - * @generated - */ - public static final EClass CHANGE_SUMMARY_TYPE = eINSTANCE.getChangeSummaryType(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute CHANGE_SUMMARY_TYPE__ANY = eINSTANCE.getChangeSummaryType_Any(); - - /** - * The meta object literal for the 'Create' attribute feature. - * - * - * @generated - */ - public static final EAttribute CHANGE_SUMMARY_TYPE__CREATE = eINSTANCE.getChangeSummaryType_Create(); - - /** - * The meta object literal for the 'Delete' attribute feature. - * - * - * @generated - */ - public static final EAttribute CHANGE_SUMMARY_TYPE__DELETE = eINSTANCE.getChangeSummaryType_Delete(); - - /** - * The meta object literal for the 'Logging' attribute feature. - * - * - * @generated - */ - public static final EAttribute CHANGE_SUMMARY_TYPE__LOGGING = eINSTANCE.getChangeSummaryType_Logging(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl Data Graph Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DataGraphTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDataGraphType() - * @generated - */ - public static final EClass DATA_GRAPH_TYPE = eINSTANCE.getDataGraphType(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute DATA_GRAPH_TYPE__ANY = eINSTANCE.getDataGraphType_Any(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.DataObjectImpl Data Object}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DataObjectImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDataObject() - * @generated - */ - public static final EClass DATA_OBJECT = eINSTANCE.getDataObject(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDocumentRoot() - * @generated - */ - public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); - - /** - * The meta object literal for the 'Mixed' attribute list feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); - - /** - * The meta object literal for the 'XMLNS Prefix Map' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); - - /** - * The meta object literal for the 'XSI Schema Location' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); - - /** - * The meta object literal for the 'Datagraph' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__DATAGRAPH = eINSTANCE.getDocumentRoot_Datagraph(); - - /** - * The meta object literal for the 'Data Object' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__DATA_OBJECT = eINSTANCE.getDocumentRoot_DataObject(); - - /** - * The meta object literal for the 'Type' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__TYPE = eINSTANCE.getDocumentRoot_Type(); - - /** - * The meta object literal for the 'Types' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__TYPES = eINSTANCE.getDocumentRoot_Types(); - - /** - * The meta object literal for the 'Ref' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__REF = eINSTANCE.getDocumentRoot_Ref(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.ModelsTypeImpl Models Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelsTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getModelsType() - * @generated - */ - public static final EClass MODELS_TYPE = eINSTANCE.getModelsType(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute MODELS_TYPE__ANY = eINSTANCE.getModelsType_Any(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.PropertyImpl Property}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.PropertyImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getProperty() - * @generated - */ - public static final EClass PROPERTY = eINSTANCE.getProperty(); - - /** - * The meta object literal for the 'Alias Name' attribute list feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__ALIAS_NAME = eINSTANCE.getProperty_AliasName(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__ANY = eINSTANCE.getProperty_Any(); - - /** - * The meta object literal for the 'Containment' attribute feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__CONTAINMENT = eINSTANCE.getProperty_Containment(); - - /** - * The meta object literal for the 'Default' attribute feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__DEFAULT = eINSTANCE.getProperty_Default(); - - /** - * The meta object literal for the 'Many' attribute feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__MANY = eINSTANCE.getProperty_Many(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__NAME = eINSTANCE.getProperty_Name(); - - /** - * The meta object literal for the 'Opposite' reference feature. - * - * - * @generated - */ - public static final EReference PROPERTY__OPPOSITE = eINSTANCE.getProperty_Opposite(); - - /** - * The meta object literal for the 'Read Only' attribute feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__READ_ONLY = eINSTANCE.getProperty_ReadOnly(); - - /** - * The meta object literal for the 'Type' reference feature. - * - * - * @generated - */ - public static final EReference PROPERTY__TYPE = eINSTANCE.getProperty_Type(); - - /** - * The meta object literal for the 'Any Attribute' attribute list feature. - * - * - * @generated - */ - public static final EAttribute PROPERTY__ANY_ATTRIBUTE = eINSTANCE.getProperty_AnyAttribute(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.TextTypeImpl Text Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TextTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTextType() - * @generated - */ - public static final EClass TEXT_TYPE = eINSTANCE.getTextType(); - - /** - * The meta object literal for the 'Text' attribute list feature. - * - * - * @generated - */ - public static final EAttribute TEXT_TYPE__TEXT = eINSTANCE.getTextType_Text(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.TypeImpl Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getType() - * @generated - */ - public static final EClass TYPE = eINSTANCE.getType(); - - /** - * The meta object literal for the 'Base Type' reference list feature. - * - * - * @generated - */ - public static final EReference TYPE__BASE_TYPE = eINSTANCE.getType_BaseType(); - - /** - * The meta object literal for the 'Property' containment reference list feature. - * - * - * @generated - */ - public static final EReference TYPE__PROPERTY = eINSTANCE.getType_Property(); - - /** - * The meta object literal for the 'Alias Name' attribute list feature. - * - * - * @generated - */ - public static final EAttribute TYPE__ALIAS_NAME = eINSTANCE.getType_AliasName(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute TYPE__ANY = eINSTANCE.getType_Any(); - - /** - * The meta object literal for the 'Abstract' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__ABSTRACT = eINSTANCE.getType_Abstract(); - - /** - * The meta object literal for the 'Data Type' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__DATA_TYPE = eINSTANCE.getType_DataType(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__NAME = eINSTANCE.getType_Name(); - - /** - * The meta object literal for the 'Open' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__OPEN = eINSTANCE.getType_Open(); - - /** - * The meta object literal for the 'Sequenced' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__SEQUENCED = eINSTANCE.getType_Sequenced(); - - /** - * The meta object literal for the 'Uri' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE__URI = eINSTANCE.getType_Uri(); - - /** - * The meta object literal for the 'Any Attribute' attribute list feature. - * - * - * @generated - */ - public static final EAttribute TYPE__ANY_ATTRIBUTE = eINSTANCE.getType_AnyAttribute(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.TypesImpl Types}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.TypesImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTypes() - * @generated - */ - public static final EClass TYPES = eINSTANCE.getTypes(); - - /** - * The meta object literal for the 'Type' containment reference list feature. - * - * - * @generated - */ - public static final EReference TYPES__TYPE = eINSTANCE.getTypes_Type(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.impl.XSDTypeImpl XSD Type}' class. - * - * - * @see org.apache.tuscany.sdo.model.impl.XSDTypeImpl - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getXSDType() - * @generated - */ - public static final EClass XSD_TYPE = eINSTANCE.getXSDType(); - - /** - * The meta object literal for the 'Any' attribute list feature. - * - * - * @generated - */ - public static final EAttribute XSD_TYPE__ANY = eINSTANCE.getXSDType_Any(); - - /** - * The meta object literal for the 'Boolean' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBoolean() - * @generated - */ - public static final EDataType BOOLEAN = eINSTANCE.getBoolean(); - - /** - * The meta object literal for the 'Boolean Object' data type. - * - * - * @see java.lang.Boolean - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBooleanObject() - * @generated - */ - public static final EDataType BOOLEAN_OBJECT = eINSTANCE.getBooleanObject(); - - /** - * The meta object literal for the 'Byte' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getByte() - * @generated - */ - public static final EDataType BYTE = eINSTANCE.getByte(); - - /** - * The meta object literal for the 'Byte Object' data type. - * - * - * @see java.lang.Byte - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getByteObject() - * @generated - */ - public static final EDataType BYTE_OBJECT = eINSTANCE.getByteObject(); - - /** - * The meta object literal for the 'Bytes' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getBytes() - * @generated - */ - public static final EDataType BYTES = eINSTANCE.getBytes(); - - /** - * The meta object literal for the 'Character' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getCharacter() - * @generated - */ - public static final EDataType CHARACTER = eINSTANCE.getCharacter(); - - /** - * The meta object literal for the 'Character Object' data type. - * - * - * @see java.lang.Character - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getCharacterObject() - * @generated - */ - public static final EDataType CHARACTER_OBJECT = eINSTANCE.getCharacterObject(); - - /** - * The meta object literal for the 'Date' data type. - * - * - * @see java.util.Date - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDate() - * @generated - */ - public static final EDataType DATE = eINSTANCE.getDate(); - - /** - * The meta object literal for the 'Date Time' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDateTime() - * @generated - */ - public static final EDataType DATE_TIME = eINSTANCE.getDateTime(); - - /** - * The meta object literal for the 'Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDay() - * @generated - */ - public static final EDataType DAY = eINSTANCE.getDay(); - - /** - * The meta object literal for the 'Decimal' data type. - * - * - * @see java.math.BigDecimal - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDecimal() - * @generated - */ - public static final EDataType DECIMAL = eINSTANCE.getDecimal(); - - /** - * The meta object literal for the 'Double' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDouble() - * @generated - */ - public static final EDataType DOUBLE = eINSTANCE.getDouble(); - - /** - * The meta object literal for the 'Double Object' data type. - * - * - * @see java.lang.Double - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDoubleObject() - * @generated - */ - public static final EDataType DOUBLE_OBJECT = eINSTANCE.getDoubleObject(); - - /** - * The meta object literal for the 'Duration' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getDuration() - * @generated - */ - public static final EDataType DURATION = eINSTANCE.getDuration(); - - /** - * The meta object literal for the 'Float' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getFloat() - * @generated - */ - public static final EDataType FLOAT = eINSTANCE.getFloat(); - - /** - * The meta object literal for the 'Float Object' data type. - * - * - * @see java.lang.Float - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getFloatObject() - * @generated - */ - public static final EDataType FLOAT_OBJECT = eINSTANCE.getFloatObject(); - - /** - * The meta object literal for the 'Int' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getInt() - * @generated - */ - public static final EDataType INT = eINSTANCE.getInt(); - - /** - * The meta object literal for the 'Integer' data type. - * - * - * @see java.math.BigInteger - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getInteger() - * @generated - */ - public static final EDataType INTEGER = eINSTANCE.getInteger(); - - /** - * The meta object literal for the 'Int Object' data type. - * - * - * @see java.lang.Integer - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getIntObject() - * @generated - */ - public static final EDataType INT_OBJECT = eINSTANCE.getIntObject(); - - /** - * The meta object literal for the 'Long' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getLong() - * @generated - */ - public static final EDataType LONG = eINSTANCE.getLong(); - - /** - * The meta object literal for the 'Long Object' data type. - * - * - * @see java.lang.Long - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getLongObject() - * @generated - */ - public static final EDataType LONG_OBJECT = eINSTANCE.getLongObject(); - - /** - * The meta object literal for the 'Month' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getMonth() - * @generated - */ - public static final EDataType MONTH = eINSTANCE.getMonth(); - - /** - * The meta object literal for the 'Month Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getMonthDay() - * @generated - */ - public static final EDataType MONTH_DAY = eINSTANCE.getMonthDay(); - - /** - * The meta object literal for the 'Object' data type. - * - * - * @see java.lang.Object - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getObject() - * @generated - */ - public static final EDataType OBJECT = eINSTANCE.getObject(); - - /** - * The meta object literal for the 'Short' data type. - * - * - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getShort() - * @generated - */ - public static final EDataType SHORT = eINSTANCE.getShort(); - - /** - * The meta object literal for the 'Short Object' data type. - * - * - * @see java.lang.Short - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getShortObject() - * @generated - */ - public static final EDataType SHORT_OBJECT = eINSTANCE.getShortObject(); - - /** - * The meta object literal for the 'String' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getString() - * @generated - */ - public static final EDataType STRING = eINSTANCE.getString(); - - /** - * The meta object literal for the 'Strings' data type. - * - * - * @see java.util.List - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getStrings() - * @generated - */ - public static final EDataType STRINGS = eINSTANCE.getStrings(); - - /** - * The meta object literal for the 'Time' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getTime() - * @generated - */ - public static final EDataType TIME = eINSTANCE.getTime(); - - /** - * The meta object literal for the 'URI' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getURI() - * @generated - */ - public static final EDataType URI = eINSTANCE.getURI(); - - /** - * The meta object literal for the 'Year' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYear() - * @generated - */ - public static final EDataType YEAR = eINSTANCE.getYear(); - - /** - * The meta object literal for the 'Year Month' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYearMonth() - * @generated - */ - public static final EDataType YEAR_MONTH = eINSTANCE.getYearMonth(); - - /** - * The meta object literal for the 'Year Month Day' data type. - * - * - * @see java.lang.String - * @see org.apache.tuscany.sdo.model.impl.ModelPackageImpl#getYearMonthDay() - * @generated - */ - public static final EDataType YEAR_MONTH_DAY = eINSTANCE.getYearMonthDay(); - - } - -} //ModelPackageImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java deleted file mode 100644 index f2873031ee..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/ModelsTypeImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.ModelsType; - -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; - -/** - * - * An implementation of the model object 'Models Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.ModelsTypeImpl#getAny Any}
  • - *
- *

- * - * @generated - */ -public class ModelsTypeImpl extends DataObjectImpl implements ModelsType -{ - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * - * - * @generated - */ - protected ModelsTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.MODELS_TYPE; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.MODELS_TYPE__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.MODELS_TYPE__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.MODELS_TYPE__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.MODELS_TYPE__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.MODELS_TYPE__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.MODELS_TYPE__ANY: - return any != null && !any.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (any: "); - result.append(any); - result.append(')'); - return result.toString(); - } - -} //ModelsTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java deleted file mode 100644 index 9c71e82474..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/PropertyImpl.java +++ /dev/null @@ -1,801 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - -import java.util.Collection; -import java.util.List; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.Type; - -import org.apache.tuscany.sdo.util.BasicSequence; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.EDataTypeEList; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Property'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAliasName Alias Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isContainment Containment}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getDefault Default}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isMany Many}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getName Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getOpposite Opposite}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#isReadOnly Read Only}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getType Type}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.PropertyImpl#getAnyAttribute Any Attribute}
  • - *
- *

- * - * Note: The getDefault and getOpposite methods had to be renamed to avoid - * conflict with the commonj.sdo.Property getDefault and getOpposite - * methods in classes that implement both. Eventually, the two interfaces - * should be brought in-line with one another -- James Snell - * - * @generated - */ -public class PropertyImpl extends DataObjectImpl implements Property -{ - /** - * The cached value of the '{@link #getAliasName() Alias Name}' attribute list. - * - * - * @see #getAliasName() - * @generated - * @ordered - */ - protected EList aliasName = null; - - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * The default value of the '{@link #isContainment() Containment}' attribute. - * - * - * @see #isContainment() - * @generated - * @ordered - */ - protected static final boolean CONTAINMENT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isContainment() Containment}' attribute. - * - * - * @see #isContainment() - * @generated - * @ordered - */ - protected boolean containment = CONTAINMENT_EDEFAULT; - - /** - * This is true if the Containment attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean containmentESet = false; - - /** - * The default value of the '{@link #getDefault() Default}' attribute. - * - * - * @see #getDefault() - * @generated - * @ordered - */ - protected static final String DEFAULT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDefault() Default}' attribute. - * - * - * @see #getDefault() - * @generated - * @ordered - */ - protected String default_ = DEFAULT_EDEFAULT; - - /** - * The default value of the '{@link #isMany() Many}' attribute. - * - * - * @see #isMany() - * @generated - * @ordered - */ - protected static final boolean MANY_EDEFAULT = false; - - /** - * The cached value of the '{@link #isMany() Many}' attribute. - * - * - * @see #isMany() - * @generated - * @ordered - */ - protected boolean many = MANY_EDEFAULT; - - /** - * This is true if the Many attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean manyESet = false; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getOpposite() Opposite}' reference. - * - * - * @see #getOpposite() - * @generated - * @ordered - */ - protected Property opposite = null; - - /** - * The default value of the '{@link #isReadOnly() Read Only}' attribute. - * - * - * @see #isReadOnly() - * @generated - * @ordered - */ - protected static final boolean READ_ONLY_EDEFAULT = false; - - /** - * The cached value of the '{@link #isReadOnly() Read Only}' attribute. - * - * - * @see #isReadOnly() - * @generated - * @ordered - */ - protected boolean readOnly = READ_ONLY_EDEFAULT; - - /** - * This is true if the Read Only attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean readOnlyESet = false; - - /** - * The cached value of the '{@link #getType() Type}' reference. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected Type type = null; - - /** - * The cached value of the '{@link #getAnyAttribute() Any Attribute}' attribute list. - * - * - * @see #getAnyAttribute() - * @generated - * @ordered - */ - protected BasicSequence anyAttribute = null; - - /** - * - * - * @generated - */ - protected PropertyImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.PROPERTY; - } - - /** - * - * - * @generated - */ - public List getAliasName() - { - if (aliasName == null) - { - aliasName = new EDataTypeEList(String.class, this, ModelPackageImpl.PROPERTY__ALIAS_NAME); - } - return aliasName; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.PROPERTY__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public boolean isContainment() - { - return containment; - } - - /** - * - * - * @generated - */ - public void setContainment(boolean newContainment) - { - boolean oldContainment = containment; - containment = newContainment; - boolean oldContainmentESet = containmentESet; - containmentESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__CONTAINMENT, oldContainment, containment, !oldContainmentESet)); - } - - /** - * - * - * @generated - */ - public void unsetContainment() - { - boolean oldContainment = containment; - boolean oldContainmentESet = containmentESet; - containment = CONTAINMENT_EDEFAULT; - containmentESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.PROPERTY__CONTAINMENT, oldContainment, CONTAINMENT_EDEFAULT, oldContainmentESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetContainment() - { - return containmentESet; - } - - /** - * - * - * @generated NOT - */ - public String getDefault_() - { - return default_; - } - - /** - * - * - * @generated - */ - public void setDefault_(String newDefault) - { - String oldDefault = default_; - default_ = newDefault; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__DEFAULT, oldDefault, default_)); - } - - /** - * - * - * @generated - */ - public boolean isMany() - { - return many; - } - - /** - * - * - * @generated - */ - public void setMany(boolean newMany) - { - boolean oldMany = many; - many = newMany; - boolean oldManyESet = manyESet; - manyESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__MANY, oldMany, many, !oldManyESet)); - } - - /** - * - * - * @generated - */ - public void unsetMany() - { - boolean oldMany = many; - boolean oldManyESet = manyESet; - many = MANY_EDEFAULT; - manyESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.PROPERTY__MANY, oldMany, MANY_EDEFAULT, oldManyESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetMany() - { - return manyESet; - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__NAME, oldName, name)); - } - - /** - * - * - * @generated NOT - */ - public Property getOpposite_() - { - if (opposite != null && ((EObject)opposite).eIsProxy()) - { - InternalEObject oldOpposite = (InternalEObject)opposite; - opposite = (Property)eResolveProxy(oldOpposite); - if (opposite != oldOpposite) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackageImpl.PROPERTY__OPPOSITE, oldOpposite, opposite)); - } - } - return opposite; - } - - /** - * - * - * @generated - */ - public Property basicGetOpposite() - { - return opposite; - } - - /** - * - * - * @generated NOT - */ - public void setOpposite_(Property newOpposite) - { - Property oldOpposite = opposite; - opposite = newOpposite; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__OPPOSITE, oldOpposite, opposite)); - } - - /** - * - * - * @generated - */ - public boolean isReadOnly() - { - return readOnly; - } - - /** - * - * - * @generated - */ - public void setReadOnly(boolean newReadOnly) - { - boolean oldReadOnly = readOnly; - readOnly = newReadOnly; - boolean oldReadOnlyESet = readOnlyESet; - readOnlyESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__READ_ONLY, oldReadOnly, readOnly, !oldReadOnlyESet)); - } - - /** - * - * - * @generated - */ - public void unsetReadOnly() - { - boolean oldReadOnly = readOnly; - boolean oldReadOnlyESet = readOnlyESet; - readOnly = READ_ONLY_EDEFAULT; - readOnlyESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.PROPERTY__READ_ONLY, oldReadOnly, READ_ONLY_EDEFAULT, oldReadOnlyESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetReadOnly() - { - return readOnlyESet; - } - - /** - * - * - * @generated - */ - public Type getType_() - { - if (type != null && ((EObject)type).eIsProxy()) - { - InternalEObject oldType = (InternalEObject)type; - type = (Type)eResolveProxy(oldType); - if (type != oldType) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackageImpl.PROPERTY__TYPE, oldType, type)); - } - } - return type; - } - - /** - * - * - * @generated - */ - public Type basicGetType() - { - return type; - } - - /** - * - * - * @generated - */ - public void setType(Type newType) - { - Type oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.PROPERTY__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE)); - } - return anyAttribute; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.PROPERTY__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - return getAliasName(); - case ModelPackageImpl.PROPERTY__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - case ModelPackageImpl.PROPERTY__CONTAINMENT: - return isContainment() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.PROPERTY__DEFAULT: - return getDefault_(); - case ModelPackageImpl.PROPERTY__MANY: - return isMany() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.PROPERTY__NAME: - return getName(); - case ModelPackageImpl.PROPERTY__OPPOSITE: - if (resolve) return getOpposite_(); - return basicGetOpposite(); - case ModelPackageImpl.PROPERTY__READ_ONLY: - return isReadOnly() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.PROPERTY__TYPE: - if (resolve) return getType_(); - return basicGetType(); - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap(); - return getAnyAttribute(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - getAliasName().clear(); - getAliasName().addAll((Collection)newValue); - return; - case ModelPackageImpl.PROPERTY__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - case ModelPackageImpl.PROPERTY__CONTAINMENT: - setContainment(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.PROPERTY__DEFAULT: - setDefault_((String)newValue); - return; - case ModelPackageImpl.PROPERTY__MANY: - setMany(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.PROPERTY__NAME: - setName((String)newValue); - return; - case ModelPackageImpl.PROPERTY__OPPOSITE: - setOpposite_((Property)newValue); - return; - case ModelPackageImpl.PROPERTY__READ_ONLY: - setReadOnly(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.PROPERTY__TYPE: - setType((Type)newValue); - return; - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - getAliasName().clear(); - return; - case ModelPackageImpl.PROPERTY__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - case ModelPackageImpl.PROPERTY__CONTAINMENT: - unsetContainment(); - return; - case ModelPackageImpl.PROPERTY__DEFAULT: - setDefault_(DEFAULT_EDEFAULT); - return; - case ModelPackageImpl.PROPERTY__MANY: - unsetMany(); - return; - case ModelPackageImpl.PROPERTY__NAME: - setName(NAME_EDEFAULT); - return; - case ModelPackageImpl.PROPERTY__OPPOSITE: - setOpposite_((Property)null); - return; - case ModelPackageImpl.PROPERTY__READ_ONLY: - unsetReadOnly(); - return; - case ModelPackageImpl.PROPERTY__TYPE: - setType((Type)null); - return; - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - return aliasName != null && !aliasName.isEmpty(); - case ModelPackageImpl.PROPERTY__ANY: - return any != null && !any.featureMap().isEmpty(); - case ModelPackageImpl.PROPERTY__CONTAINMENT: - return isSetContainment(); - case ModelPackageImpl.PROPERTY__DEFAULT: - return DEFAULT_EDEFAULT == null ? default_ != null : !DEFAULT_EDEFAULT.equals(default_); - case ModelPackageImpl.PROPERTY__MANY: - return isSetMany(); - case ModelPackageImpl.PROPERTY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case ModelPackageImpl.PROPERTY__OPPOSITE: - return opposite != null; - case ModelPackageImpl.PROPERTY__READ_ONLY: - return isSetReadOnly(); - case ModelPackageImpl.PROPERTY__TYPE: - return type != null; - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - return anyAttribute != null && !anyAttribute.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (aliasName: "); - result.append(aliasName); - result.append(", any: "); - result.append(any); - result.append(", containment: "); - if (containmentESet) result.append(containment); else result.append(""); - result.append(", default: "); - result.append(default_); - result.append(", many: "); - if (manyESet) result.append(many); else result.append(""); - result.append(", name: "); - result.append(name); - result.append(", readOnly: "); - if (readOnlyESet) result.append(readOnly); else result.append(""); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - -} //PropertyImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java deleted file mode 100644 index 5d77ce2fae..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TextTypeImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import java.util.Collection; -import java.util.List; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.TextType; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.util.EDataTypeEList; - -/** - * - * An implementation of the model object 'Text Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.TextTypeImpl#getText Text}
  • - *
- *

- * - * @generated - */ -public abstract class TextTypeImpl extends DataObjectImpl implements TextType -{ - /** - * The cached value of the '{@link #getText() Text}' attribute list. - * - * - * @see #getText() - * @generated - * @ordered - */ - protected EList text = null; - - /** - * - * - * @generated - */ - protected TextTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.TEXT_TYPE; - } - - /** - * - * - * @generated - */ - public List getText() - { - if (text == null) - { - text = new EDataTypeEList(String.class, this, ModelPackageImpl.TEXT_TYPE__TEXT); - } - return text; - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.TEXT_TYPE__TEXT: - return getText(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.TEXT_TYPE__TEXT: - getText().clear(); - getText().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TEXT_TYPE__TEXT: - getText().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TEXT_TYPE__TEXT: - return text != null && !text.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (text: "); - result.append(text); - result.append(')'); - return result.toString(); - } - -} //TextTypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java deleted file mode 100644 index c51cd7948c..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypeImpl.java +++ /dev/null @@ -1,851 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - -import java.util.Collection; -import java.util.List; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.Property; -import org.apache.tuscany.sdo.model.Type; -import org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl; - -import org.apache.tuscany.sdo.util.BasicSequence; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.EDataTypeEList; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getBaseType Base Type}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getProperty Property}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAliasName Alias Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAny Any}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#isAbstract Abstract}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#isDataType Data Type}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getName Name}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#isOpen Open}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#isSequenced Sequenced}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getUri Uri}
  • - *
  • {@link org.apache.tuscany.sdo.model.impl.TypeImpl#getAnyAttribute Any Attribute}
  • - *
- *

- * - * @generated - */ -public class TypeImpl extends DataObjectImpl implements Type -{ - /** - * The cached value of the '{@link #getBaseType() Base Type}' reference list. - * - * - * @see #getBaseType() - * @generated - * @ordered - */ - protected EList baseType = null; - - /** - * The cached value of the '{@link #getProperty() Property}' containment reference list. - * - * - * @see #getProperty() - * @generated - * @ordered - */ - protected EList property = null; - - /** - * The cached value of the '{@link #getAliasName() Alias Name}' attribute list. - * - * - * @see #getAliasName() - * @generated - * @ordered - */ - protected EList aliasName = null; - - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * The default value of the '{@link #isAbstract() Abstract}' attribute. - * - * - * @see #isAbstract() - * @generated - * @ordered - */ - protected static final boolean ABSTRACT_EDEFAULT = false; - - /** - * The cached value of the '{@link #isAbstract() Abstract}' attribute. - * - * - * @see #isAbstract() - * @generated - * @ordered - */ - protected boolean abstract_ = ABSTRACT_EDEFAULT; - - /** - * This is true if the Abstract attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean abstractESet = false; - - /** - * The default value of the '{@link #isDataType() Data Type}' attribute. - * - * - * @see #isDataType() - * @generated - * @ordered - */ - protected static final boolean DATA_TYPE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isDataType() Data Type}' attribute. - * - * - * @see #isDataType() - * @generated - * @ordered - */ - protected boolean dataType = DATA_TYPE_EDEFAULT; - - /** - * This is true if the Data Type attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean dataTypeESet = false; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #isOpen() Open}' attribute. - * - * - * @see #isOpen() - * @generated - * @ordered - */ - protected static final boolean OPEN_EDEFAULT = false; - - /** - * The cached value of the '{@link #isOpen() Open}' attribute. - * - * - * @see #isOpen() - * @generated - * @ordered - */ - protected boolean open = OPEN_EDEFAULT; - - /** - * This is true if the Open attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean openESet = false; - - /** - * The default value of the '{@link #isSequenced() Sequenced}' attribute. - * - * - * @see #isSequenced() - * @generated - * @ordered - */ - protected static final boolean SEQUENCED_EDEFAULT = false; - - /** - * The cached value of the '{@link #isSequenced() Sequenced}' attribute. - * - * - * @see #isSequenced() - * @generated - * @ordered - */ - protected boolean sequenced = SEQUENCED_EDEFAULT; - - /** - * This is true if the Sequenced attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean sequencedESet = false; - - /** - * The default value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected static final String URI_EDEFAULT = null; - - /** - * The cached value of the '{@link #getUri() Uri}' attribute. - * - * - * @see #getUri() - * @generated - * @ordered - */ - protected String uri = URI_EDEFAULT; - - /** - * The cached value of the '{@link #getAnyAttribute() Any Attribute}' attribute list. - * - * - * @see #getAnyAttribute() - * @generated - * @ordered - */ - protected BasicSequence anyAttribute = null; - - /** - * - * - * @generated - */ - protected TypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.TYPE; - } - - /** - * - * - * @generated - */ - public List getBaseType() - { - if (baseType == null) - { - baseType = new EObjectResolvingEList(Type.class, this, ModelPackageImpl.TYPE__BASE_TYPE); - } - return baseType; - } - - /** - * - * - * @generated - */ - public List getProperty() - { - if (property == null) - { - property = new EObjectContainmentEList(Property.class, this, ModelPackageImpl.TYPE__PROPERTY); - } - return property; - } - - /** - * - * - * @generated - */ - public List getAliasName() - { - if (aliasName == null) - { - aliasName = new EDataTypeEList(String.class, this, ModelPackageImpl.TYPE__ALIAS_NAME); - } - return aliasName; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.TYPE__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public boolean isAbstract() - { - return abstract_; - } - - /** - * - * - * @generated - */ - public void setAbstract(boolean newAbstract) - { - boolean oldAbstract = abstract_; - abstract_ = newAbstract; - boolean oldAbstractESet = abstractESet; - abstractESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__ABSTRACT, oldAbstract, abstract_, !oldAbstractESet)); - } - - /** - * - * - * @generated - */ - public void unsetAbstract() - { - boolean oldAbstract = abstract_; - boolean oldAbstractESet = abstractESet; - abstract_ = ABSTRACT_EDEFAULT; - abstractESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.TYPE__ABSTRACT, oldAbstract, ABSTRACT_EDEFAULT, oldAbstractESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetAbstract() - { - return abstractESet; - } - - /** - * - * - * @generated - */ - public boolean isDataType() - { - return dataType; - } - - /** - * - * - * @generated - */ - public void setDataType(boolean newDataType) - { - boolean oldDataType = dataType; - dataType = newDataType; - boolean oldDataTypeESet = dataTypeESet; - dataTypeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet)); - } - - /** - * - * - * @generated - */ - public void unsetDataType() - { - boolean oldDataType = dataType; - boolean oldDataTypeESet = dataTypeESet; - dataType = DATA_TYPE_EDEFAULT; - dataTypeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.TYPE__DATA_TYPE, oldDataType, DATA_TYPE_EDEFAULT, oldDataTypeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetDataType() - { - return dataTypeESet; - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public boolean isOpen() - { - return open; - } - - /** - * - * - * @generated - */ - public void setOpen(boolean newOpen) - { - boolean oldOpen = open; - open = newOpen; - boolean oldOpenESet = openESet; - openESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__OPEN, oldOpen, open, !oldOpenESet)); - } - - /** - * - * - * @generated - */ - public void unsetOpen() - { - boolean oldOpen = open; - boolean oldOpenESet = openESet; - open = OPEN_EDEFAULT; - openESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.TYPE__OPEN, oldOpen, OPEN_EDEFAULT, oldOpenESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetOpen() - { - return openESet; - } - - /** - * - * - * @generated - */ - public boolean isSequenced() - { - return sequenced; - } - - /** - * - * - * @generated - */ - public void setSequenced(boolean newSequenced) - { - boolean oldSequenced = sequenced; - sequenced = newSequenced; - boolean oldSequencedESet = sequencedESet; - sequencedESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__SEQUENCED, oldSequenced, sequenced, !oldSequencedESet)); - } - - /** - * - * - * @generated - */ - public void unsetSequenced() - { - boolean oldSequenced = sequenced; - boolean oldSequencedESet = sequencedESet; - sequenced = SEQUENCED_EDEFAULT; - sequencedESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, ModelPackageImpl.TYPE__SEQUENCED, oldSequenced, SEQUENCED_EDEFAULT, oldSequencedESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetSequenced() - { - return sequencedESet; - } - - /** - * - * - * @generated - */ - public String getUri() - { - return uri; - } - - /** - * - * - * @generated - */ - public void setUri(String newUri) - { - String oldUri = uri; - uri = newUri; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ModelPackageImpl.TYPE__URI, oldUri, uri)); - } - - /** - * - * - * @generated - */ - public Sequence getAnyAttribute() - { - if (anyAttribute == null) - { - anyAttribute = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.TYPE__ANY_ATTRIBUTE)); - } - return anyAttribute; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.TYPE__PROPERTY: - return ((InternalEList)getProperty()).basicRemove(otherEnd, msgs); - case ModelPackageImpl.TYPE__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - return getBaseType(); - case ModelPackageImpl.TYPE__PROPERTY: - return getProperty(); - case ModelPackageImpl.TYPE__ALIAS_NAME: - return getAliasName(); - case ModelPackageImpl.TYPE__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - case ModelPackageImpl.TYPE__ABSTRACT: - return isAbstract() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.TYPE__DATA_TYPE: - return isDataType() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.TYPE__NAME: - return getName(); - case ModelPackageImpl.TYPE__OPEN: - return isOpen() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.TYPE__SEQUENCED: - return isSequenced() ? Boolean.TRUE : Boolean.FALSE; - case ModelPackageImpl.TYPE__URI: - return getUri(); - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap(); - return getAnyAttribute(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - getBaseType().clear(); - getBaseType().addAll((Collection)newValue); - return; - case ModelPackageImpl.TYPE__PROPERTY: - getProperty().clear(); - getProperty().addAll((Collection)newValue); - return; - case ModelPackageImpl.TYPE__ALIAS_NAME: - getAliasName().clear(); - getAliasName().addAll((Collection)newValue); - return; - case ModelPackageImpl.TYPE__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - case ModelPackageImpl.TYPE__ABSTRACT: - setAbstract(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.TYPE__DATA_TYPE: - setDataType(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.TYPE__NAME: - setName((String)newValue); - return; - case ModelPackageImpl.TYPE__OPEN: - setOpen(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.TYPE__SEQUENCED: - setSequenced(((Boolean)newValue).booleanValue()); - return; - case ModelPackageImpl.TYPE__URI: - setUri((String)newValue); - return; - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - getBaseType().clear(); - return; - case ModelPackageImpl.TYPE__PROPERTY: - getProperty().clear(); - return; - case ModelPackageImpl.TYPE__ALIAS_NAME: - getAliasName().clear(); - return; - case ModelPackageImpl.TYPE__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - case ModelPackageImpl.TYPE__ABSTRACT: - unsetAbstract(); - return; - case ModelPackageImpl.TYPE__DATA_TYPE: - unsetDataType(); - return; - case ModelPackageImpl.TYPE__NAME: - setName(NAME_EDEFAULT); - return; - case ModelPackageImpl.TYPE__OPEN: - unsetOpen(); - return; - case ModelPackageImpl.TYPE__SEQUENCED: - unsetSequenced(); - return; - case ModelPackageImpl.TYPE__URI: - setUri(URI_EDEFAULT); - return; - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - ((FeatureMap.Internal.Wrapper)getAnyAttribute()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - return baseType != null && !baseType.isEmpty(); - case ModelPackageImpl.TYPE__PROPERTY: - return property != null && !property.isEmpty(); - case ModelPackageImpl.TYPE__ALIAS_NAME: - return aliasName != null && !aliasName.isEmpty(); - case ModelPackageImpl.TYPE__ANY: - return any != null && !any.featureMap().isEmpty(); - case ModelPackageImpl.TYPE__ABSTRACT: - return isSetAbstract(); - case ModelPackageImpl.TYPE__DATA_TYPE: - return isSetDataType(); - case ModelPackageImpl.TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case ModelPackageImpl.TYPE__OPEN: - return isSetOpen(); - case ModelPackageImpl.TYPE__SEQUENCED: - return isSetSequenced(); - case ModelPackageImpl.TYPE__URI: - return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - return anyAttribute != null && !anyAttribute.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (aliasName: "); - result.append(aliasName); - result.append(", any: "); - result.append(any); - result.append(", abstract: "); - if (abstractESet) result.append(abstract_); else result.append(""); - result.append(", dataType: "); - if (dataTypeESet) result.append(dataType); else result.append(""); - result.append(", name: "); - result.append(name); - result.append(", open: "); - if (openESet) result.append(open); else result.append(""); - result.append(", sequenced: "); - if (sequencedESet) result.append(sequenced); else result.append(""); - result.append(", uri: "); - result.append(uri); - result.append(", anyAttribute: "); - result.append(anyAttribute); - result.append(')'); - return result.toString(); - } - - public String getInstanceClassName() - { - EStructuralFeature javaClassFeature = JavaPackageImpl.eINSTANCE.getDocumentRoot_JavaClass(); - Sequence anyAttribute = getAnyAttribute(); - int count = anyAttribute.size(); - for (int i = 0; i < count; i++) - { - EStructuralFeature eFeature = (EStructuralFeature)anyAttribute.getProperty(i); - if (eFeature == javaClassFeature) - { - return (String)anyAttribute.getValue(i); - } - } - return null; - } - -} //TypeImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java deleted file mode 100644 index bfd673f0d2..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/TypesImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import java.util.Collection; -import java.util.List; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.Type; -import org.apache.tuscany.sdo.model.Types; - -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Types'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.TypesImpl#getType Type}
  • - *
- *

- * - * @generated - */ -public class TypesImpl extends DataObjectImpl implements Types -{ - /** - * The cached value of the '{@link #getType() Type}' containment reference list. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected EList type = null; - - /** - * - * - * @generated - */ - protected TypesImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.TYPES; - } - - /** - * - * - * @generated - */ - public List getType_() - { - if (type == null) - { - type = new EObjectContainmentEList(Type.class, this, ModelPackageImpl.TYPES__TYPE); - } - return type; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.TYPES__TYPE: - return ((InternalEList)getType()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.TYPES__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.TYPES__TYPE: - getType_().clear(); - getType_().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TYPES__TYPE: - getType_().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.TYPES__TYPE: - return type != null && !type.isEmpty(); - } - return super.eIsSet(featureID); - } - - public List getTypeList() - { - return getType_(); - } - -} //TypesImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java deleted file mode 100644 index 74b60af0ae..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/impl/XSDTypeImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.impl; - -import commonj.sdo.Sequence; - - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.XSDType; - -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; - -/** - * - * An implementation of the model object 'XSD Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.impl.XSDTypeImpl#getAny Any}
  • - *
- *

- * - * @generated - */ -public class XSDTypeImpl extends DataObjectImpl implements XSDType -{ - /** - * The cached value of the '{@link #getAny() Any}' attribute list. - * - * - * @see #getAny() - * @generated - * @ordered - */ - protected BasicSequence any = null; - - /** - * - * - * @generated - */ - protected XSDTypeImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return ModelPackageImpl.Literals.XSD_TYPE; - } - - /** - * - * - * @generated - */ - public Sequence getAny() - { - if (any == null) - { - any = new BasicSequence(new BasicFeatureMap(this, ModelPackageImpl.XSD_TYPE__ANY)); - } - return any; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case ModelPackageImpl.XSD_TYPE__ANY: - return ((InternalEList)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case ModelPackageImpl.XSD_TYPE__ANY: - if (coreType) return ((FeatureMap.Internal.Wrapper)getAny()).featureMap(); - return getAny(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case ModelPackageImpl.XSD_TYPE__ANY: - ((FeatureMap.Internal)((FeatureMap.Internal.Wrapper)getAny()).featureMap()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.XSD_TYPE__ANY: - ((FeatureMap.Internal.Wrapper)getAny()).featureMap().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case ModelPackageImpl.XSD_TYPE__ANY: - return any != null && !any.featureMap().isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java deleted file mode 100644 index 7ca6ee818f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaFactory.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.java; - - -/** - * - * 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.eINSTANCE; - - /** - * Returns a new object of class 'Info'. - * - * - * @return a new object of class 'Info'. - * @generated - */ - JavaInfo createJavaInfo(); - -} //JavaFactory diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java deleted file mode 100644 index 555be8de4f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/JavaInfo.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.java; - - -/** - * - * A representation of the model object 'Info'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass Java Class}
  • - *
- *

- * - * @generated - */ -public interface JavaInfo -{ - /** - * Returns the value of the 'Java Class' attribute. - * - *

- * If the meaning of the 'Java Class' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Java Class' attribute. - * @see #setJavaClass(String) - * @generated - */ - String getJavaClass(); - - /** - * Sets the value of the '{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass Java Class}' attribute. - * - * - * @param value the new value of the 'Java Class' attribute. - * @see #getJavaClass() - * @generated - */ - void setJavaClass(String value); - -} // JavaInfo diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java deleted file mode 100644 index 6e76337615..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaFactoryImpl.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.java.impl; - -import org.apache.tuscany.sdo.model.java.*; - -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.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class JavaFactoryImpl extends EFactoryImpl implements JavaFactory -{ - /** - * The singleton instance of the factory. - * - * - * @generated - */ - public static final JavaFactoryImpl eINSTANCE = init(); - - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static JavaFactoryImpl init() - { - try - { - JavaFactoryImpl theJavaFactory = (JavaFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("commonj.sdo/java"); - if (theJavaFactory != null) - { - return theJavaFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new JavaFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public JavaFactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case JavaPackageImpl.DOCUMENT_ROOT: return (EObject)createDocumentRoot(); - case JavaPackageImpl.JAVA_INFO: return (EObject)createJavaInfo(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Object createFromString(EDataType eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { - case JavaPackageImpl.BOOLEAN_OBJECT: - return createBooleanObjectFromString(eDataType, initialValue); - case JavaPackageImpl.BYTE_OBJECT: - return createByteObjectFromString(eDataType, initialValue); - case JavaPackageImpl.CHARACTER_OBJECT: - return createCharacterObjectFromString(eDataType, initialValue); - case JavaPackageImpl.DOUBLE_OBJECT: - return createDoubleObjectFromString(eDataType, initialValue); - case JavaPackageImpl.FLOAT_OBJECT: - return createFloatObjectFromString(eDataType, initialValue); - case JavaPackageImpl.INT_OBJECT: - return createIntObjectFromString(eDataType, initialValue); - case JavaPackageImpl.LONG_OBJECT: - return createLongObjectFromString(eDataType, initialValue); - case JavaPackageImpl.SHORT_OBJECT: - return createShortObjectFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public String convertToString(EDataType eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { - case JavaPackageImpl.BOOLEAN_OBJECT: - return convertBooleanObjectToString(eDataType, instanceValue); - case JavaPackageImpl.BYTE_OBJECT: - return convertByteObjectToString(eDataType, instanceValue); - case JavaPackageImpl.CHARACTER_OBJECT: - return convertCharacterObjectToString(eDataType, instanceValue); - case JavaPackageImpl.DOUBLE_OBJECT: - return convertDoubleObjectToString(eDataType, instanceValue); - case JavaPackageImpl.FLOAT_OBJECT: - return convertFloatObjectToString(eDataType, instanceValue); - case JavaPackageImpl.INT_OBJECT: - return convertIntObjectToString(eDataType, instanceValue); - case JavaPackageImpl.LONG_OBJECT: - return convertLongObjectToString(eDataType, instanceValue); - case JavaPackageImpl.SHORT_OBJECT: - return convertShortObjectToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public EObject createDocumentRoot() - { - EObject documentRoot = super.create(JavaPackageImpl.Literals.DOCUMENT_ROOT); - return documentRoot; - } - - /** - * - * - * @generated - */ - public JavaInfo createJavaInfo() - { - JavaInfoImpl javaInfo = new JavaInfoImpl(); - return javaInfo; - } - - /** - * - * - * @generated NOT - */ - public Boolean createBooleanObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createBooleanObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertBooleanObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertBooleanObject((Boolean)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Byte createByteObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createByteObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertByteObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertByteObject((Byte)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Character createCharacterObjectFromString(EDataType eDataType, String initialValue) - { - return (initialValue == null && initialValue.length() > 0) - ? null : (new Character(collapseWhiteSpace(initialValue).charAt(0))); - } - - /** - * - * - * @generated NOT - */ - public String convertCharacterObjectToString(EDataType eDataType, Object instanceValue) - { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated NOT - */ - public Double createDoubleObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createDoubleObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertDoubleObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertDoubleObject((Double)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Float createFloatObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createFloatObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertFloatObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertFloatObject((Float)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Integer createIntObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createIntObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertIntObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertIntObject((Integer)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Long createLongObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createLongObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertLongObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertLongObject((Long)instanceValue); - } - - /** - * - * - * @generated NOT - */ - public Short createShortObjectFromString(EDataType eDataType, String initialValue) - { - return XMLTypeFactory.eINSTANCE.createShortObject(initialValue); - } - - /** - * - * - * @generated NOT - */ - public String convertShortObjectToString(EDataType eDataType, Object instanceValue) - { - return XMLTypeFactory.eINSTANCE.convertShortObject((Short)instanceValue); - } - - /** - * - * - * @generated - */ - public JavaPackageImpl getJavaPackageImpl() - { - return (JavaPackageImpl)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static JavaPackageImpl getPackage() - { - return JavaPackageImpl.eINSTANCE; - } - -} //JavaFactoryImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java deleted file mode 100644 index db395f9632..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaInfoImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.java.impl; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; - -import org.apache.tuscany.sdo.model.java.JavaInfo; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Info'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl#getJavaClass Java Class}
  • - *
- *

- * - * @generated - */ -public class JavaInfoImpl extends DataObjectImpl implements JavaInfo -{ - /** - * The default value of the '{@link #getJavaClass() Java Class}' attribute. - * - * - * @see #getJavaClass() - * @generated - * @ordered - */ - protected static final String JAVA_CLASS_EDEFAULT = null; - - /** - * The cached value of the '{@link #getJavaClass() Java Class}' attribute. - * - * - * @see #getJavaClass() - * @generated - * @ordered - */ - protected String javaClass = JAVA_CLASS_EDEFAULT; - - /** - * - * - * @generated - */ - protected JavaInfoImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return JavaPackageImpl.Literals.JAVA_INFO; - } - - /** - * - * - * @generated - */ - public String getJavaClass() - { - return javaClass; - } - - /** - * - * - * @generated - */ - public void setJavaClass(String newJavaClass) - { - String oldJavaClass = javaClass; - javaClass = newJavaClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JavaPackageImpl.JAVA_INFO__JAVA_CLASS, oldJavaClass, javaClass)); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case JavaPackageImpl.JAVA_INFO__JAVA_CLASS: - return getJavaClass(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case JavaPackageImpl.JAVA_INFO__JAVA_CLASS: - setJavaClass((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case JavaPackageImpl.JAVA_INFO__JAVA_CLASS: - setJavaClass(JAVA_CLASS_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case JavaPackageImpl.JAVA_INFO__JAVA_CLASS: - return JAVA_CLASS_EDEFAULT == null ? javaClass != null : !JAVA_CLASS_EDEFAULT.equals(javaClass); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (javaClass: "); - result.append(javaClass); - result.append(')'); - return result.toString(); - } - -} //JavaInfoImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaPackageImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaPackageImpl.java deleted file mode 100644 index de32f55141..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/model/java/impl/JavaPackageImpl.java +++ /dev/null @@ -1,1149 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.model.java.impl; - -import org.apache.tuscany.sdo.impl.SDOPackageImpl; - -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; - -import org.apache.tuscany.sdo.model.java.JavaFactory; -import org.apache.tuscany.sdo.model.java.JavaInfo; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -/** - * - * 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.model.java.JavaFactory - * @generated - */ -public class JavaPackageImpl extends EPackageImpl -{ - /** - * The package name. - * - * - * @generated - */ - public static final String eNAME = "java"; - - /** - * The package namespace URI. - * - * - * @generated - */ - public static final String eNS_URI = "commonj.sdo/java"; - - /** - * The package namespace name. - * - * - * @generated - */ - public static final String eNS_PREFIX = "java"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - public static final JavaPackageImpl eINSTANCE = org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl.init(); - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.java.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.model.java.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getDocumentRoot() - * @generated - */ - public static final int DOCUMENT_ROOT = 0; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__MIXED = 0; - - /** - * The feature id for the 'XMLNS Prefix Map' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; - - /** - * The feature id for the 'XSI Schema Location' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; - - /** - * The feature id for the 'Extended Instance Class' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__EXTENDED_INSTANCE_CLASS = 3; - - /** - * The feature id for the 'Instance Class' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__INSTANCE_CLASS = 4; - - /** - * The feature id for the 'Java Class' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__JAVA_CLASS = 5; - - /** - * The feature id for the 'Nested Interfaces' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__NESTED_INTERFACES = 6; - - /** - * The feature id for the 'Package' attribute. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__PACKAGE = 7; - - /** - * The number of structural features of the 'Document Root' class. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT_FEATURE_COUNT = 8; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl Info}' class. - * - * - * @see org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getJavaInfo() - * @generated - */ - public static final int JAVA_INFO = 1; - - /** - * The feature id for the 'Java Class' attribute. - * - * - * @generated - * @ordered - */ - public static final int JAVA_INFO__JAVA_CLASS = 0; - - /** - * The number of structural features of the 'Info' class. - * - * - * @generated - * @ordered - */ - public static final int JAVA_INFO_FEATURE_COUNT = 1; - - /** - * The meta object id for the 'Boolean Object' data type. - * - * - * @see java.lang.Boolean - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getBooleanObject() - * @generated - */ - public static final int BOOLEAN_OBJECT = 2; - - /** - * The meta object id for the 'Byte Object' data type. - * - * - * @see java.lang.Byte - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getByteObject() - * @generated - */ - public static final int BYTE_OBJECT = 3; - - /** - * The meta object id for the 'Character Object' data type. - * - * - * @see java.lang.Character - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getCharacterObject() - * @generated - */ - public static final int CHARACTER_OBJECT = 4; - - /** - * The meta object id for the 'Double Object' data type. - * - * - * @see java.lang.Double - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getDoubleObject() - * @generated - */ - public static final int DOUBLE_OBJECT = 5; - - /** - * The meta object id for the 'Float Object' data type. - * - * - * @see java.lang.Float - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getFloatObject() - * @generated - */ - public static final int FLOAT_OBJECT = 6; - - /** - * The meta object id for the 'Int Object' data type. - * - * - * @see java.lang.Integer - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getIntObject() - * @generated - */ - public static final int INT_OBJECT = 7; - - /** - * The meta object id for the 'Long Object' data type. - * - * - * @see java.lang.Long - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getLongObject() - * @generated - */ - public static final int LONG_OBJECT = 8; - - /** - * The meta object id for the 'Short Object' data type. - * - * - * @see java.lang.Short - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getShortObject() - * @generated - */ - public static final int SHORT_OBJECT = 9; - - /** - * - * - * @generated - */ - private EClass documentRootEClass = null; - - /** - * - * - * @generated - */ - private EClass javaInfoEClass = null; - - /** - * - * - * @generated - */ - private EDataType booleanObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType byteObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType characterObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType doubleObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType floatObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType intObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType longObjectEDataType = null; - - /** - * - * - * @generated - */ - private EDataType shortObjectEDataType = 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.model.java.impl.JavaPackageImpl#eNS_URI - * @see #init() - * @generated - */ - private JavaPackageImpl() - { - super(eNS_URI, ((EFactory)JavaFactory.INSTANCE)); - } - - /** - * - * - * @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. - *

Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static JavaPackageImpl init() - { - if (isInited) return (JavaPackageImpl)EPackage.Registry.INSTANCE.getEPackage(JavaPackageImpl.eNS_URI); - - // Obtain or create and register package - JavaPackageImpl theJavaPackageImpl = (JavaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof JavaPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new JavaPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - SDOPackageImpl.eINSTANCE.eClass(); - ModelPackageImpl.eINSTANCE.eClass(); - - // Create package meta-data objects - theJavaPackageImpl.createPackageContents(); - - // Initialize created meta-data - theJavaPackageImpl.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theJavaPackageImpl.freeze(); - - return theJavaPackageImpl; - } - - - /** - * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. - * - * - * @return the meta object for class 'Document Root'. - * @see org.eclipse.emf.ecore.EObject - * @generated - */ - public EClass getDocumentRoot() - { - return documentRootEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. - * - * - * @return the meta object for the attribute list 'Mixed'. - * @see org.eclipse.emf.ecore.EObject#getMixed() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Mixed() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. - * - * - * @return the meta object for the map 'XMLNS Prefix Map'. - * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XMLNSPrefixMap() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. - * - * - * @return the meta object for the map 'XSI Schema Location'. - * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XSISchemaLocation() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#getExtendedInstanceClass Extended Instance Class}'. - * - * - * @return the meta object for the attribute 'Extended Instance Class'. - * @see org.eclipse.emf.ecore.EObject#getExtendedInstanceClass() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_ExtendedInstanceClass() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#getInstanceClass Instance Class}'. - * - * - * @return the meta object for the attribute 'Instance Class'. - * @see org.eclipse.emf.ecore.EObject#getInstanceClass() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_InstanceClass() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(4); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#getJavaClass Java Class}'. - * - * - * @return the meta object for the attribute 'Java Class'. - * @see org.eclipse.emf.ecore.EObject#getJavaClass() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_JavaClass() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(5); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#isNestedInterfaces Nested Interfaces}'. - * - * - * @return the meta object for the attribute 'Nested Interfaces'. - * @see org.eclipse.emf.ecore.EObject#isNestedInterfaces() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_NestedInterfaces() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(6); - } - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.ecore.EObject#getPackage Package}'. - * - * - * @return the meta object for the attribute 'Package'. - * @see org.eclipse.emf.ecore.EObject#getPackage() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Package() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(7); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.model.java.JavaInfo Info}'. - * - * - * @return the meta object for class 'Info'. - * @see org.apache.tuscany.sdo.model.java.JavaInfo - * @generated - */ - public EClass getJavaInfo() - { - return javaInfoEClass; - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass Java Class}'. - * - * - * @return the meta object for the attribute 'Java Class'. - * @see org.apache.tuscany.sdo.model.java.JavaInfo#getJavaClass() - * @see #getJavaInfo() - * @generated - */ - public EAttribute getJavaInfo_JavaClass() - { - return (EAttribute)javaInfoEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for data type '{@link java.lang.Boolean Boolean Object}'. - * - * - * @return the meta object for data type 'Boolean Object'. - * @see java.lang.Boolean - * @generated - */ - public EDataType getBooleanObject() - { - return booleanObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Byte Byte Object}'. - * - * - * @return the meta object for data type 'Byte Object'. - * @see java.lang.Byte - * @generated - */ - public EDataType getByteObject() - { - return byteObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Character Character Object}'. - * - * - * @return the meta object for data type 'Character Object'. - * @see java.lang.Character - * @generated - */ - public EDataType getCharacterObject() - { - return characterObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Double Double Object}'. - * - * - * @return the meta object for data type 'Double Object'. - * @see java.lang.Double - * @generated - */ - public EDataType getDoubleObject() - { - return doubleObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Float Float Object}'. - * - * - * @return the meta object for data type 'Float Object'. - * @see java.lang.Float - * @generated - */ - public EDataType getFloatObject() - { - return floatObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Integer Int Object}'. - * - * - * @return the meta object for data type 'Int Object'. - * @see java.lang.Integer - * @generated - */ - public EDataType getIntObject() - { - return intObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Long Long Object}'. - * - * - * @return the meta object for data type 'Long Object'. - * @see java.lang.Long - * @generated - */ - public EDataType getLongObject() - { - return longObjectEDataType; - } - - /** - * Returns the meta object for data type '{@link java.lang.Short Short Object}'. - * - * - * @return the meta object for data type 'Short Object'. - * @see java.lang.Short - * @generated - */ - public EDataType getShortObject() - { - return shortObjectEDataType; - } - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - public JavaFactory getJavaFactory() - { - return (JavaFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - documentRootEClass = createEClass(DOCUMENT_ROOT); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); - createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__EXTENDED_INSTANCE_CLASS); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__INSTANCE_CLASS); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__JAVA_CLASS); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__NESTED_INTERFACES); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__PACKAGE); - - javaInfoEClass = createEClass(JAVA_INFO); - createEAttribute(javaInfoEClass, JAVA_INFO__JAVA_CLASS); - - // Create data types - booleanObjectEDataType = createEDataType(BOOLEAN_OBJECT); - byteObjectEDataType = createEDataType(BYTE_OBJECT); - characterObjectEDataType = createEDataType(CHARACTER_OBJECT); - doubleObjectEDataType = createEDataType(DOUBLE_OBJECT); - floatObjectEDataType = createEDataType(FLOAT_OBJECT); - intObjectEDataType = createEDataType(INT_OBJECT); - longObjectEDataType = createEDataType(LONG_OBJECT); - shortObjectEDataType = createEDataType(SHORT_OBJECT); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - ModelPackageImpl theModelPackageImpl = (ModelPackageImpl)EPackage.Registry.INSTANCE.getEPackage(ModelPackageImpl.eNS_URI); - - // Add supertypes to classes - - // Initialize classes and features; add operations and parameters - initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDocumentRoot_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(getDocumentRoot_XMLNSPrefixMap(), 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(getDocumentRoot_XSISchemaLocation(), 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); - initEAttribute(getDocumentRoot_ExtendedInstanceClass(), theModelPackageImpl.getString(), "extendedInstanceClass", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDocumentRoot_InstanceClass(), theModelPackageImpl.getString(), "instanceClass", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDocumentRoot_JavaClass(), theModelPackageImpl.getString(), "javaClass", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDocumentRoot_NestedInterfaces(), theModelPackageImpl.getBoolean(), "nestedInterfaces", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getDocumentRoot_Package(), theModelPackageImpl.getString(), "package", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(javaInfoEClass, JavaInfo.class, "JavaInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getJavaInfo_JavaClass(), theModelPackageImpl.getString(), "javaClass", null, 0, 1, JavaInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize data types - initEDataType(booleanObjectEDataType, Boolean.class, "BooleanObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(byteObjectEDataType, Byte.class, "ByteObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(characterObjectEDataType, Character.class, "CharacterObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(doubleObjectEDataType, Double.class, "DoubleObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(floatObjectEDataType, Float.class, "FloatObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(intObjectEDataType, Integer.class, "IntObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(longObjectEDataType, Long.class, "LongObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(shortObjectEDataType, Short.class, "ShortObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() - { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (booleanObjectEDataType, - source, - new String[] - { - "name", "BooleanObject" - }); - addAnnotation - (byteObjectEDataType, - source, - new String[] - { - "name", "ByteObject" - }); - addAnnotation - (characterObjectEDataType, - source, - new String[] - { - "name", "CharacterObject" - }); - addAnnotation - (documentRootEClass, - source, - new String[] - { - "name", "", - "kind", "mixed" - }); - addAnnotation - (getDocumentRoot_Mixed(), - source, - new String[] - { - "kind", "elementWildcard", - "name", ":mixed" - }); - addAnnotation - (getDocumentRoot_XMLNSPrefixMap(), - source, - new String[] - { - "kind", "attribute", - "name", "xmlns:prefix" - }); - addAnnotation - (getDocumentRoot_XSISchemaLocation(), - source, - new String[] - { - "kind", "attribute", - "name", "xsi:schemaLocation" - }); - addAnnotation - (getDocumentRoot_ExtendedInstanceClass(), - source, - new String[] - { - "kind", "attribute", - "name", "extendedInstanceClass", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_InstanceClass(), - source, - new String[] - { - "kind", "attribute", - "name", "instanceClass", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_JavaClass(), - source, - new String[] - { - "kind", "attribute", - "name", "javaClass", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_NestedInterfaces(), - source, - new String[] - { - "kind", "attribute", - "name", "nestedInterfaces", - "namespace", "##targetNamespace" - }); - addAnnotation - (getDocumentRoot_Package(), - source, - new String[] - { - "kind", "attribute", - "name", "package", - "namespace", "##targetNamespace" - }); - addAnnotation - (doubleObjectEDataType, - source, - new String[] - { - "name", "DoubleObject" - }); - addAnnotation - (floatObjectEDataType, - source, - new String[] - { - "name", "FloatObject" - }); - addAnnotation - (intObjectEDataType, - source, - new String[] - { - "name", "IntObject" - }); - addAnnotation - (javaInfoEClass, - source, - new String[] - { - "name", "JavaInfo", - "kind", "empty" - }); - addAnnotation - (getJavaInfo_JavaClass(), - source, - new String[] - { - "kind", "attribute", - "name", "javaClass", - "namespace", "##targetNamespace" - }); - addAnnotation - (longObjectEDataType, - source, - new String[] - { - "name", "LongObject" - }); - addAnnotation - (shortObjectEDataType, - source, - new String[] - { - "name", "ShortObject" - }); - } - - /** - * - * Defines literals for the meta objects that represent - *

    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - public interface Literals - { - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.java.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.model.java.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getDocumentRoot() - * @generated - */ - public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); - - /** - * The meta object literal for the 'Mixed' attribute list feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); - - /** - * The meta object literal for the 'XMLNS Prefix Map' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); - - /** - * The meta object literal for the 'XSI Schema Location' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); - - /** - * The meta object literal for the 'Extended Instance Class' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__EXTENDED_INSTANCE_CLASS = eINSTANCE.getDocumentRoot_ExtendedInstanceClass(); - - /** - * The meta object literal for the 'Instance Class' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__INSTANCE_CLASS = eINSTANCE.getDocumentRoot_InstanceClass(); - - /** - * The meta object literal for the 'Java Class' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__JAVA_CLASS = eINSTANCE.getDocumentRoot_JavaClass(); - - /** - * The meta object literal for the 'Nested Interfaces' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__NESTED_INTERFACES = eINSTANCE.getDocumentRoot_NestedInterfaces(); - - /** - * The meta object literal for the 'Package' attribute feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__PACKAGE = eINSTANCE.getDocumentRoot_Package(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl Info}' class. - * - * - * @see org.apache.tuscany.sdo.model.java.impl.JavaInfoImpl - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getJavaInfo() - * @generated - */ - public static final EClass JAVA_INFO = eINSTANCE.getJavaInfo(); - - /** - * The meta object literal for the 'Java Class' attribute feature. - * - * - * @generated - */ - public static final EAttribute JAVA_INFO__JAVA_CLASS = eINSTANCE.getJavaInfo_JavaClass(); - - /** - * The meta object literal for the 'Boolean Object' data type. - * - * - * @see java.lang.Boolean - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getBooleanObject() - * @generated - */ - public static final EDataType BOOLEAN_OBJECT = eINSTANCE.getBooleanObject(); - - /** - * The meta object literal for the 'Byte Object' data type. - * - * - * @see java.lang.Byte - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getByteObject() - * @generated - */ - public static final EDataType BYTE_OBJECT = eINSTANCE.getByteObject(); - - /** - * The meta object literal for the 'Character Object' data type. - * - * - * @see java.lang.Character - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getCharacterObject() - * @generated - */ - public static final EDataType CHARACTER_OBJECT = eINSTANCE.getCharacterObject(); - - /** - * The meta object literal for the 'Double Object' data type. - * - * - * @see java.lang.Double - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getDoubleObject() - * @generated - */ - public static final EDataType DOUBLE_OBJECT = eINSTANCE.getDoubleObject(); - - /** - * The meta object literal for the 'Float Object' data type. - * - * - * @see java.lang.Float - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getFloatObject() - * @generated - */ - public static final EDataType FLOAT_OBJECT = eINSTANCE.getFloatObject(); - - /** - * The meta object literal for the 'Int Object' data type. - * - * - * @see java.lang.Integer - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getIntObject() - * @generated - */ - public static final EDataType INT_OBJECT = eINSTANCE.getIntObject(); - - /** - * The meta object literal for the 'Long Object' data type. - * - * - * @see java.lang.Long - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getLongObject() - * @generated - */ - public static final EDataType LONG_OBJECT = eINSTANCE.getLongObject(); - - /** - * The meta object literal for the 'Short Object' data type. - * - * - * @see java.lang.Short - * @see org.apache.tuscany.sdo.model.java.impl.JavaPackageImpl#getShortObject() - * @generated - */ - public static final EDataType SHORT_OBJECT = eINSTANCE.getShortObject(); - - } - -} //JavaPackageImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/BasicSequence.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/BasicSequence.java deleted file mode 100644 index 5a631dde77..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/BasicSequence.java +++ /dev/null @@ -1,134 +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.util; - -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.FeatureMapUtil; -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -import commonj.sdo.Property; -import commonj.sdo.Sequence; - -/** - * SDO Sequance implementation which delegates to a feature map. - */ -public class BasicSequence implements Sequence, FeatureMap.Internal.Wrapper -{ - protected FeatureMap.Internal featureMap; - - public BasicSequence(FeatureMap.Internal featureMap) - { - this.featureMap = featureMap; - featureMap.setWrapper(this); - } - - public FeatureMap featureMap() - { - return featureMap; - } - - public int size() - { - return featureMap.size(); - } - - public Property getProperty(int 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; - return isText ? null : (Property)feature; - } - - public Object getValue(int index) - { - return featureMap.getValue(index); - } - - public Object setValue(int index, Object value) - { - return featureMap.setValue(index, value); - } - - protected EStructuralFeature getEStructuralFeature(String propertyName) - { - return featureMap.getEObject().eClass().getEStructuralFeature(propertyName); - } - - protected EStructuralFeature getEStructuralFeature(int propertyIndex) - { - return featureMap.getEObject().eClass().getEStructuralFeature(propertyIndex); - } - - public boolean add(String propertyName, Object value) - { - return featureMap.add(getEStructuralFeature(propertyName), value); - } - - public boolean add(int propertyIndex, Object value) - { - return featureMap.add(getEStructuralFeature(propertyIndex), value); - } - - public boolean add(Property property, Object value) - { - return featureMap.add((EStructuralFeature)property, value); - } - - public void add(int index, String propertyName, Object value) - { - featureMap.add(index, getEStructuralFeature(propertyName), value); - } - - public void add(int index, int propertyIndex, Object value) - { - featureMap.add(index, getEStructuralFeature(propertyIndex), value); - } - - public void add(int index, Property property, Object value) - { - featureMap.add(index, (EStructuralFeature)property, value); - } - - public void add(String text) - { - FeatureMapUtil.addText(featureMap, text); - } - - public void add(int index, String text) - { - FeatureMapUtil.addText(featureMap, index, text); - } - - public void remove(int index) - { - featureMap.remove(index); - } - - public void move(int toIndex, int fromIndex) - { - featureMap.move(toIndex, fromIndex); - } - - public String toString() - { - return featureMap.toString(); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataGraphResourceFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataGraphResourceFactoryImpl.java deleted file mode 100644 index a2288ce027..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataGraphResourceFactoryImpl.java +++ /dev/null @@ -1,691 +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.util; - - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.apache.tuscany.sdo.SDOFactory; -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.helper.TypeHelperImpl; -import org.apache.tuscany.sdo.impl.ChangeSummaryImpl; -import org.apache.tuscany.sdo.impl.DataGraphImpl; -import org.apache.tuscany.sdo.impl.DynamicDataObjectImpl; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EFactory; -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.EcorePackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.ExtendedMetaData; -import org.eclipse.emf.ecore.xmi.EcoreBuilder; -import org.eclipse.emf.ecore.xmi.NameInfo; -import org.eclipse.emf.ecore.xmi.XMLHelper; -import org.eclipse.emf.ecore.xmi.XMLLoad; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.ecore.xmi.XMLSave; -import org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler; -import org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl; -import org.eclipse.emf.ecore.xmi.util.DefaultEcoreBuilder; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.xml.sax.InputSource; -import org.xml.sax.helpers.DefaultHandler; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.helper.TypeHelper; - - -public class DataGraphResourceFactoryImpl extends ResourceFactoryImpl -{ - /** - * Constructor for DataGraphResourceFactoryImpl. - */ - public DataGraphResourceFactoryImpl() - { - super(); - } - - public Resource createResource(URI uri) - { - XMLResourceImpl result = new DataGraphResourceImpl(uri); - - ExtendedMetaData extendedMetaData = ((TypeHelperImpl)TypeHelper.INSTANCE).getExtendedMetaData(); - DataObjectUtil.configureXMLResource(result, extendedMetaData); - - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE); - //result.setEncoding("UTF-8"); - //result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); - //result.getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80)); - - return result; - } - - public static class DataGraphResourceImpl extends XMLResourceImpl - { - public DataGraphResourceImpl(URI uri) - { - super(uri); - } - - public static class HelperImpl extends XMLHelperImpl - { - protected DataGraphImpl eDataGraph; - - protected List resources; - protected List uris; - - public HelperImpl(XMLResource xmlResource) - { - super(xmlResource); - } - - public void setResource(XMLResource resource) - { - super.setResource(resource); - if (!resource.getContents().isEmpty()) - { - eDataGraph = (DataGraphImpl)resource.getContents().get(0); - - resources = new ArrayList(); - uris = new ArrayList(); - - resources.add(eDataGraph.getRootResource()); - uris.add("#" + resource.getURIFragment(eDataGraph) + "/@eRootObject"); - - if (eDataGraph.getEChangeSummary() != null) - { - // Ensure that resource exists. - // - resources.add(((EObject)eDataGraph.getChangeSummary()).eResource()); - uris.add("#" + resource.getURIFragment(eDataGraph) + "/@eChangeSummary"); - } - - if (eDataGraph.eResource() != null && eDataGraph.eResource().getResourceSet() != null) - { - int count = 0; - for (Iterator i = eDataGraph.eResource().getResourceSet().getResources().iterator(); i.hasNext();) - { - Resource ePackageResource = (Resource)i.next(); - List resourceContents = ePackageResource.getContents(); - if (resourceContents.size() == 1 && resourceContents.get(0) instanceof EPackage) - { - resources.add(ePackageResource); - uris.add("#" + resource.getURIFragment(eDataGraph) + "/@models." + count++); - } - } - } - } - } - - public String getID(EObject eObject) - { - return super.getID(eObject); - } - - public String getIDREF(EObject eObject) - { - String fragment = super.getIDREF(eObject); - if (fragment.startsWith("/")) - { - int index = resources.indexOf(eObject.eResource()); - if (index != -1) - { - fragment = ((String)uris.get(index)).substring(1) + fragment.substring(1); - } - } - return fragment; - } - - public String getHREF(EObject eObject) - { - return super.getHREF(eObject); - } - - protected URI getHREF(Resource otherResource, EObject obj) - { - int index = resources.indexOf(otherResource); - if (index == -1) - { - return super.getHREF(otherResource, obj); - } - else - { - return createHREF((String)uris.get(index), otherResource.getURIFragment(obj)); - } - } - - protected URI createHREF(String baseURI, String fragment) - { - if (fragment.startsWith("/")) - { - return URI.createURI(baseURI + fragment.substring(1)); - } - else - { - return URI.createURI("#" + fragment); - } - } - - public void populateNameInfo(NameInfo nameInfo, EClass c) - { - if (c == SDOPackage.eINSTANCE.getDataGraph()) - { - if (extendedMetaData != null) - { - extendedMetaData.demandPackage("commonj.sdo").setNsPrefix("sdo"); - } - nameInfo.setQualifiedName(getQName("commonj.sdo", "datagraph")); - nameInfo.setNamespaceURI("commonj.sdo"); - nameInfo.setLocalPart("datagraph"); - } - else if (c == SDOPackage.eINSTANCE.getChangeSummary()) - { - if (extendedMetaData != null) - { - extendedMetaData.demandPackage("commonj.sdo").setNsPrefix("sdo"); - } - nameInfo.setQualifiedName("changeSummary"); - nameInfo.setNamespaceURI(null); - nameInfo.setLocalPart("changeSummary"); - } - else - { - super.populateNameInfo(nameInfo, c); - } - } - - public String getQName(EClass c) - { - if (c == SDOPackage.eINSTANCE.getDataGraph()) - { - if (extendedMetaData != null) - { - extendedMetaData.demandPackage("commonj.sdo").setNsPrefix("sdo"); - } - return getQName("commonj.sdo", "datagraph"); - } - else if (c == SDOPackage.eINSTANCE.getChangeSummary()) - { - if (extendedMetaData != null) - { - extendedMetaData.demandPackage("commonj.sdo").setNsPrefix("sdo"); - } - return getQName((String)null, "changeSummary"); - } - else - { - return super.getQName(c); - } - } - } - - protected XMLHelper createXMLHelper() - { - return new HelperImpl(this); - } - - protected EObject getEObjectByID(String id) - { - List contents = getContents(); - if (contents.size() >= 1) - { - Object rootObject = contents.get(0); - if (rootObject instanceof DataGraphImpl) - { - DataGraphImpl eDataGraph = (DataGraphImpl)rootObject; - EObject result = eDataGraph.getRootResource().getEObject(id); - if (result != null) - { - return result; - } - else - { - ChangeSummary eChangeSummary = eDataGraph.getEChangeSummary(); - if (eChangeSummary != null) - { - result = ((EObject)eDataGraph.getChangeSummary()).eResource().getEObject(id); - if (result != null) - { - return result; - } - } - } - } - } - return super.getEObjectByID(id); - } - - public static class SaveImpl extends XMLSaveImpl - { - protected DataGraphImpl eDataGraph; - - public SaveImpl(XMLHelper xmlHelper) - { - super(xmlHelper); - } - - public void traverse(List contents) - { - if (contents.size() >= 1 && contents.get(0) instanceof DataGraphImpl) - { - eDataGraph = (DataGraphImpl)contents.get(0); - - Object datagraphMark = null; - if (!toDOM) - { - if (declareXML) - { - doc.add(""); - doc.addLine(); - } - String elementName = helper.getQName(eDataGraph.eClass()); - doc.startElement(elementName); - datagraphMark = doc.mark(); - } - else - { - helper.populateNameInfo(nameInfo, eDataGraph.eClass()); - currentNode = document.createElementNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); - document.appendChild(currentNode); - // not calling handler since there is no corresponding EObject - } - - if (eDataGraph.eResource() != null && eDataGraph.eResource().getResourceSet() != null) - { - List ePackages = new ArrayList(); - for (Iterator i = eDataGraph.eResource().getResourceSet().getResources().iterator(); i.hasNext();) - { - List resourceContents = ((Resource)i.next()).getContents(); - if (resourceContents.size() == 1 && resourceContents.get(0) instanceof EPackage) - { - ePackages.add(resourceContents.get(0)); - } - } - if (!ePackages.isEmpty()) - { - if (!toDOM) - { - doc.startElement("models"); - doc.addAttribute("xmlns", ""); - } - else - { - currentNode = currentNode.appendChild(document.createElementNS(null, "models")); - ((Element)currentNode).setAttributeNS(ExtendedMetaData.XMLNS_URI, ExtendedMetaData.XMLNS_PREFIX, ""); - // not calling handler since there is no corresponding EObject - } - for (Iterator i = ePackages.iterator(); i.hasNext();) - { - writeTopObject((EPackage)i.next()); - } - if (!toDOM) - { - doc.endElement(); - } - else - { - currentNode = currentNode.getParentNode(); - } - } - } - - // use namespace declarations defined in the document (if any) - EObject eRootObject = eDataGraph.getERootObject(); - EReference xmlnsPrefixMapFeature = extendedMetaData.getXMLNSPrefixMapFeature(eRootObject.eClass()); - if (xmlnsPrefixMapFeature != null) - { - EMap xmlnsPrefixMap = (EMap)eRootObject.eGet(xmlnsPrefixMapFeature); - helper.setPrefixToNamespaceMap(xmlnsPrefixMap); - } - ChangeSummary changeSummary = eDataGraph.getEChangeSummary(); - - if (changeSummary != null) - { - helper.setMustHavePrefix(true); - if (changeSummary.isLogging()) - { - ((ChangeSummaryImpl)changeSummary).summarize(); - writeTopObject((EObject)changeSummary); - } - else - { - writeTopObject((EObject)changeSummary); - } - helper.setMustHavePrefix(false); - } - - if (eRootObject != null && writeTopObject(eRootObject) == null && !toDOM) - { - doc.addLine(); - doc.setMixed(false); - } - if (!toDOM) - { - doc.endElement(); - // reset to add namespace declarations - // - doc.resetToMark(datagraphMark); - } - else - { - currentNode = document.getFirstChild(); - } - addNamespaceDeclarations(); - } - else - { - super.traverse(contents); - } - } - - protected void writeTopAttributes(EObject top) - { - if (top == eDataGraph.getEChangeSummary()) - { - if (!toDOM) - { - doc.addAttribute("xmlns", ""); - doc.addAttribute("logging", String.valueOf(eDataGraph.getEChangeSummary().isLogging())); - } - else - { - ((Element)currentNode).setAttributeNS(ExtendedMetaData.XMLNS_URI, ExtendedMetaData.XMLNS_PREFIX, ""); - ((Element)currentNode).setAttributeNS("", "logging", String.valueOf(eDataGraph.getEChangeSummary().isLogging())); - } - } - } - - protected EObject getSchemaLocationRoot(EObject eObject) - { - return eDataGraph.getERootObject(); - } - } - - protected XMLSave createXMLSave() - { - return new SaveImpl(createXMLHelper()); - } - - public static class LoadImpl extends XMLLoadImpl - { - protected boolean resumeLogging = false; - - public void load(XMLResource resource, InputSource inputSource, Map options) throws IOException - { - super.load(resource, inputSource, options); - if (resumeLogging) ((ChangeSummaryImpl)((DataGraphImpl)resource.getContents().get(0)).getChangeSummary()).resumeLogging(); - } - - public void load(XMLResource resource, InputStream inputStream, Map options) throws IOException - { - super.load(resource, inputStream, options); - if (resumeLogging) ((ChangeSummaryImpl)((DataGraphImpl)resource.getContents().get(0)).getChangeSummary()).resumeLogging(); - } - - public void load(XMLResource resource, Node node, Map options) throws IOException - { - super.load(resource, node, options); - if (resumeLogging) ((ChangeSummaryImpl)((DataGraphImpl)resource.getContents().get(0)).getChangeSummary()).resumeLogging(); - } - - public LoadImpl(XMLHelper xmlHelper) - { - super(xmlHelper); - } - - protected DefaultHandler makeDefaultHandler() - { - return new SAXXMLHandler(resource, helper, options) - { - protected DataGraphImpl eDataGraph; - - protected boolean isInModels; - - protected List ePackages = new ArrayList(); - - protected EObject createDocumentRoot(String prefix, String uri, String name, EFactory eFactory, boolean top) - { - return null; - } - - protected void setAttribValue(EObject object, String name, String value) - { - if ("logging".equals(name) && object instanceof ChangeSummaryImpl) - { - resumeLogging = Boolean.valueOf(value).booleanValue(); - } - else - { - super.setAttribValue(object, name, value); - } - } - - protected EMap recordNamespacesSchemaLocations(EObject root) - { - EObject dgroot = eDataGraph.getERootObject(); - if (dgroot == null) - { - return null; - } - EMap prefixToNamespaceMap = super.recordNamespacesSchemaLocations(dgroot); - if (prefixToNamespaceMap != null) - { - for (Iterator i = prefixToNamespaceMap.iterator(); i.hasNext();) - { - Map.Entry entry = (Map.Entry)i.next(); - String prefix = (String)entry.getKey(); - String namespace = (String)entry.getValue(); - if (namespace.equals("commonj.sdo")) - { - prefixToNamespaceMap.removeKey(prefix); - break; - } - } - } - return prefixToNamespaceMap; - } - - protected void handleFeature(String prefix, String name) - { - if (isInModels && objects.size() == 2) - { - EObject modelObject = createObjectByType(prefix, name, false); - processObject(modelObject); - ePackages.add(modelObject); - } - else if (objects.size() == 1) - { - eDataGraph = (DataGraphImpl)objects.peek(); - eDataGraph.getResourceSet(); - if ("".equals(prefix) && "changeSummary".equals(name)) - { - ChangeSummary eChangeSummary = (ChangeSummary)createObjectFromFactory(SDOFactory.eINSTANCE, "ChangeSummary"); - eDataGraph.setEChangeSummary(eChangeSummary); - processObject((EObject)eChangeSummary); - } - else if ("".equals(prefix) && "models".equals(name)) - { - isInModels = true; - types.push(OBJECT_TYPE); - objects.push(eDataGraph); - mixedTargets.push(null); - } - else if (eDataGraph.getERootObject() == null) - { - if (processAnyXML) - { - // Ensure that anything can be handled, even if it's not recognized. - // - String namespaceURI = helper.getURI(prefix); - if (extendedMetaData.getPackage(namespaceURI) == null) - { - EStructuralFeature rootFeature = extendedMetaData.demandFeature(namespaceURI, name, true); - rootFeature.getEContainingClass().getEPackage().setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl()); - } - } - - EObject rootObject = createObjectByType(prefix, name, false); - eDataGraph.setERootObject(rootObject); - processObject(rootObject); - if (rootObject != null - && rootObject.eClass() == ExtendedMetaData.INSTANCE.getDocumentRoot(rootObject.eClass().getEPackage())) - { - super.handleFeature(prefix, name); - - // Remove the document root from the stack. - // - Object mixedTarget = mixedTargets.pop(); - Object object = objects.pop(); - mixedTargets.pop(); - objects.pop(); - mixedTargets.push(mixedTarget); - objects.push(object); - } - } - } - else - { - super.handleFeature(prefix, name); - } - } - - public void endElement(String uri, String localName, String name) - { - if (isInModels && objects.size() == 2) - { - if (!ePackages.isEmpty()) - { - for (Iterator i = ePackages.iterator(); i.hasNext();) - { - EPackage ePackage = (EPackage)i.next(); - ePackage.setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl()); - Resource resource = resourceSet.createResource(URI.createURI("*.ecore")); - resource.getContents().add(ePackage); - if (ePackage.getNsURI() != null) - { - resource.setURI(URI.createURI(ePackage.getNsURI())); - } - - if (extendedMetaData != null) - { - extendedMetaData.putPackage(extendedMetaData.getNamespace(ePackage), ePackage); - } - else - { - packageRegistry.put(ePackage.getNsURI(), ePackage); - } - } - handleForwardReferences(); - } - isInModels = false; - } - super.endElement(uri, localName, name); - } - - protected EPackage getPackageForURI(String uriString) - { - if ("commonj.sdo".equals(uriString)) - { - return SDOPackage.eINSTANCE; - } - else - { - return super.getPackageForURI(uriString); - } - } - - protected EObject createObjectFromFactory(EFactory factory, String typeName) - { - if (factory == SDOFactory.eINSTANCE) - { - if ("datagraph".equals(typeName)) - { - return super.createObjectFromFactory(factory, "DataGraph"); - } - } - return super.createObjectFromFactory(factory, typeName); - } - - protected EcoreBuilder createEcoreBuilder(Map options, ExtendedMetaData extendedMetaData) - { - return new DefaultEcoreBuilder(extendedMetaData) - { - public Collection generate(Map urisToLocations) throws Exception - { - Collection result = super.generate(urisToLocations); - return updateDynamicFactory(result); - } - - public Collection generate(Collection urisToLocations) throws Exception - { - Collection result = super.generate(urisToLocations); - return updateDynamicFactory(result); - } - - protected Collection updateDynamicFactory(Collection result) - { - for (Iterator i = result.iterator(); i.hasNext();) - { - Resource resource = (Resource)i.next(); - for (Iterator j = EcoreUtil.getObjectsByType(resource.getContents(), EcorePackage.eINSTANCE.getEPackage()).iterator(); j.hasNext();) - { - EPackage ePackage = (EPackage)j.next(); - ePackage.setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl()); - } - } - return result; - } - - }; - } - - protected EPackage handleMissingPackage(String uriString) - { - EPackage result = super.handleMissingPackage(uriString); - if (processAnyXML && objects.size() == 1) - { - result = extendedMetaData.demandPackage(uriString); - } - return result; - } - }; - } - } - - protected XMLLoad createXMLLoad() - { - return new LoadImpl(createXMLHelper()); - } - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java deleted file mode 100644 index 63e21e3bd0..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/DataObjectUtil.java +++ /dev/null @@ -1,2669 +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.util; - - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.tuscany.sdo.SDOExtendedMetaData; -import org.apache.tuscany.sdo.SDOPackage; -import org.apache.tuscany.sdo.impl.DataGraphImpl; -import org.apache.tuscany.sdo.impl.SDOFactoryImpl; -import org.apache.tuscany.sdo.util.resource.SDOXMLResourceFactoryImpl; -import org.eclipse.emf.common.util.BasicEList; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.common.util.UniqueEList; -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.EFactory; -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.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.resource.impl.ResourceSetImpl; -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.XMLOptions; -import org.eclipse.emf.ecore.xmi.XMLParserPool; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.ecore.xmi.impl.EMOFResourceFactoryImpl; -import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLOptionsImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl; -import org.eclipse.xsd.util.XSDResourceFactoryImpl; - -import commonj.sdo.ChangeSummary; -import commonj.sdo.DataGraph; -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Sequence; -import commonj.sdo.Type; -import commonj.sdo.helper.DataHelper; -import commonj.sdo.helper.TypeHelper; - - -public final class DataObjectUtil -{ - public static void setString(DataObject dataObject, Property property, String value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setShort(DataObject dataObject, Property property, short value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setLong(DataObject dataObject, Property property, long value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setList(DataObject dataObject, Property property, List value) { - dataObject.set(property, value); - } - - public static void setInt(DataObject dataObject, Property property, int value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setFloat(DataObject dataObject, Property property, float value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setDouble(DataObject dataObject, Property property, double value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setDate(DataObject dataObject, Property property, Date value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setDataObject(DataObject dataObject, Property property, DataObject value) { - dataObject.set(property, value); - } - - public static void setChar(DataObject dataObject, Property property, char value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setBytes(DataObject dataObject, Property property, byte[] value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setByte(DataObject dataObject, Property property, byte value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setBoolean(DataObject dataObject, Property property, boolean value) { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setBigInteger(DataObject dataObject, Property property, BigInteger value) - { - dataObject.set(property, getSetValue(property, value)); - } - - public static void setBigDecimal(DataObject dataObject, Property property, BigDecimal value) - { - dataObject.set(property, getSetValue(property, value)); - } - - public static String getString(DataObject dataObject, Property property) - { - return getString(dataObject.get(property)); - } - - public static short getShort(DataObject dataObject, Property property) - { - return getShort(dataObject.get(property)); - } - - public static Sequence getSequence(DataObject dataObject, Property property) - { - return (Sequence)dataObject.get(property); - } - - public static long getLong(DataObject dataObject, Property property) - { - return getLong(dataObject.get(property)); - } - - public static List getList(DataObject dataObject, Property property) - { - return (List)dataObject.get(property); - } - - public static int getInt(DataObject dataObject, Property property) - { - return getInt(dataObject.get(property)); - } - - public static float getFloat(DataObject dataObject, Property property) - { - return getFloat(dataObject.get(property)); - } - - public static double getDouble(DataObject dataObject, Property property) - { - return getDouble(dataObject.get(property)); - } - - public static Date getDate(DataObject dataObject, Property property) - { - return getDate(dataObject.get(property)); - } - - public static DataObject getDataObject(DataObject dataObject, Property property) - { - return (DataObject)dataObject.get(property); - } - - public static char getChar(DataObject dataObject, Property property) - { - return getChar(dataObject.get(property)); - } - - public static byte[] getBytes(DataObject dataObject, Property property) - { - return getBytes(dataObject.get(property)); - } - - public static byte getByte(DataObject dataObject, Property property) - { - return getByte(dataObject.get(property)); - } - - public static boolean getBoolean(DataObject dataObject, Property property) - { - return getBoolean(dataObject.get(property)); - } - - public static BigInteger getBigInteger(DataObject dataObject, Property property) - { - return getBigInteger(dataObject.get(property)); - } - - public static BigDecimal getBigDecimal(DataObject dataObject, Property property) - { - return getBigDecimal(dataObject.get(property)); - } - - - - private static Property getPropertyByIndex(DataObject dataObject, int propertyIndex) { - EObject eObject = (EObject) dataObject; - Property property = (Property)eObject.eClass().getEStructuralFeature(propertyIndex); - return property; - } - - public static void setString(DataObject dataObject, int propertyIndex, String value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setShort(DataObject dataObject, int propertyIndex, short value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setLong(DataObject dataObject, int propertyIndex, long value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setList(DataObject dataObject, int propertyIndex, List value) { - dataObject.set(propertyIndex, value); - } - - public static void setInt(DataObject dataObject, int propertyIndex, int value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setFloat(DataObject dataObject, int propertyIndex, float value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setDouble(DataObject dataObject, int propertyIndex, double value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setDate(DataObject dataObject, int propertyIndex, Date value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setDataObject(DataObject dataObject, int propertyIndex, DataObject value) { - dataObject.set(propertyIndex, value); - } - - public static void setChar(DataObject dataObject, int propertyIndex, char value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setBytes(DataObject dataObject, int propertyIndex, byte[] value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setByte(DataObject dataObject, int propertyIndex, byte value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setBoolean(DataObject dataObject, int propertyIndex, boolean value) { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setBigInteger(DataObject dataObject, int propertyIndex, BigInteger value) - { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static void setBigDecimal(DataObject dataObject, int propertyIndex, BigDecimal value) - { - dataObject.set(propertyIndex, getSetValue(getPropertyByIndex(dataObject, propertyIndex), value)); - } - - public static String getString(DataObject dataObject, int propertyIndex) - { - return getString(dataObject.get(propertyIndex)); - } - - public static short getShort(DataObject dataObject, int propertyIndex) - { - return getShort(dataObject.get(propertyIndex)); - } - - public static Sequence getSequence(DataObject dataObject, int propertyIndex) - { - return (Sequence)dataObject.get(propertyIndex); - } - - public static long getLong(DataObject dataObject, int propertyIndex) - { - return getLong(dataObject.get(propertyIndex)); - } - - public static List getList(DataObject dataObject, int propertyIndex) - { - return (List)dataObject.get(propertyIndex); - } - - public static int getInt(DataObject dataObject, int propertyIndex) - { - return getInt(dataObject.get(propertyIndex)); - } - - public static float getFloat(DataObject dataObject, int propertyIndex) - { - return getFloat(dataObject.get(propertyIndex)); - } - - public static double getDouble(DataObject dataObject, int propertyIndex) - { - return getDouble(dataObject.get(propertyIndex)); - } - - public static Date getDate(DataObject dataObject, int propertyIndex) - { - return getDate(dataObject.get(propertyIndex)); - } - - public static DataObject getDataObject(DataObject dataObject, int propertyIndex) - { - return (DataObject)dataObject.get(propertyIndex); - } - - public static char getChar(DataObject dataObject, int propertyIndex) - { - return getChar(dataObject.get(propertyIndex)); - } - - public static byte[] getBytes(DataObject dataObject, int propertyIndex) - { - return getBytes(dataObject.get(propertyIndex)); - } - - public static byte getByte(DataObject dataObject, int propertyIndex) - { - return getByte(dataObject.get(propertyIndex)); - } - - public static boolean getBoolean(DataObject dataObject, int propertyIndex) - { - return getBoolean(dataObject.get(propertyIndex)); - } - - public static BigInteger getBigInteger(DataObject dataObject, int propertyIndex) - { - return getBigInteger(dataObject.get(propertyIndex)); - } - - public static BigDecimal getBigDecimal(DataObject dataObject, int propertyIndex) - { - return getBigDecimal(dataObject.get(propertyIndex)); - } - - public static void detach(DataObject dataObject) { - EcoreUtil.remove((EObject)dataObject); - } - - public static DataObject getRootObject(DataObject dataObject) - { - return (DataObject)EcoreUtil.getRootContainer((EObject)dataObject); - } - - public static List getInstanceProperties(DataObject dataObject) - { - //TODO maybe optimize this to just return type.getProperties if type.isOpen (isOpen would need to be cached) - EObject eDataObject = (EObject) dataObject; - List result = new UniqueEList(eDataObject.eClass().getEAllStructuralFeatures()); - for (int i = 0, count = result.size(); i < count; ++i) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)result.get(i); - if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature)) - { - List features = (List)eDataObject.eGet(eStructuralFeature); - for (int j = 0, size = features.size(); j < size; ++j) - { - FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j); - EStructuralFeature entryFeature = entry.getEStructuralFeature(); - result.add(entryFeature); - } - } - } - return result; - } - - public static void delete(DataObject dataObject) - { - EObject eDataObject = (EObject)dataObject; - EcoreUtil.remove(eDataObject); - List contents = new ArrayList((eDataObject).eContents()); - for (int i = 0, size = contents.size(); i < size; ++i) - { - ((DataObject)contents.get(i)).delete(); - } - EClass eClass = eDataObject.eClass(); - for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i) - { - EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i); - if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived() && !((Property)eStructuralFeature).isReadOnly()) - { - eDataObject.eUnset(eStructuralFeature); - } - } - } - - public static DataObject createDataObject(DataObject dataObject, Property property, Type type) - { - if (!property.isContainment()) - { - throw new IllegalArgumentException("The property '" + property.getName() + "' of '" + property.getContainingType().getName() - + "' isn't a containment"); - } - DataObject result = DataObjectUtil.create(type); - if (FeatureMapUtil.isMany((EObject)dataObject, (EStructuralFeature)property)) - { - ((List)dataObject.get(property)).add(result); - } - else - { - dataObject.set(property, result); - } - return result; - } - - public static DataObject createDataObject(DataObject dataObject, int propertyIndex, String namespaceURI, String typeName) - { - Property property = DataObjectUtil.getProperty(dataObject, propertyIndex); - Type type = DataObjectUtil.getType(dataObject, namespaceURI, typeName); - return createDataObject(dataObject, property, type); - } - - public static DataObject createDataObject(DataObject dataObject, String propertyName, String namespaceURI, String typeName) - { - Property property = getProperty(dataObject, propertyName); - Type type = DataObjectUtil.getType(dataObject, namespaceURI, typeName); - return createDataObject(dataObject, property, type); - } - - public static DataObject createDataObject(DataObject dataObject, Property property) - { - Type type = property.getType(); - return createDataObject(dataObject, property, type); - } - - public static DataObject createDataObject(DataObject dataObject, int propertyIndex) - { - Property property = getProperty(dataObject, propertyIndex); - Type type = property.getType(); - return createDataObject(dataObject,property, type); - } - - public static DataObject createDataObject(DataObject dataObject, String propertyName) - { - Property property = (Property)getProperty(dataObject, propertyName); - Type type = property.getType(); - return createDataObject(dataObject,property, type); - } - - public static void setString(DataObject dataObject, String path, String value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - - public static void setShort(DataObject dataObject, String path, short value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setLong(DataObject dataObject, String path, long value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setList(DataObject dataObject, String path, List value) - { - dataObject.set(path, value); - } - - public static void setInt(DataObject dataObject, String path, int value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setFloat(DataObject dataObject, String path, float value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setDouble(DataObject dataObject, String path, double value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setDate(DataObject dataObject, String path, Date value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setDataObject(DataObject dataObject, String path, DataObject value) - { - dataObject.set(path, value); - } - - public static void setChar(DataObject dataObject, String path, char value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setBytes(DataObject dataObject, String path, byte[] value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setByte(DataObject dataObject, String path, byte value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setBoolean(DataObject dataObject, String path, boolean value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setBigInteger(DataObject dataObject, String path, BigInteger value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static void setBigDecimal(DataObject dataObject, String path, BigDecimal value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, DataObjectUtil.getSetValue(property, value)); - } - else - { - DataObjectUtil.Accessor accessor = DataObjectUtil.Accessor.create((EObject)dataObject, path); - accessor.setAndRecyle(DataObjectUtil.getSetValue(accessor.getProperty(), value)); - } - } - - public static DataGraph getDataGraph(DataObject dataObject) - { - Resource resource = ((EObject)dataObject).eResource(); - if (resource != null) - { - ResourceSet resourceSet = resource.getResourceSet(); - if (resourceSet != null) - { - return (DataGraphImpl)EcoreUtil.getAdapter(resourceSet.eAdapters(), DataGraph.class); - } - } - return null; - } - - public static ChangeSummary getChangeSummary(DataObject dataObject) - { - DataGraph dataGraph = getDataGraph(dataObject); - if (dataGraph != null) - { - return dataGraph.getChangeSummary(); - } - // TODO: handle ChangeSummary-type property - return null; - } - - public static void unset(DataObject dataObject, String path) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.unset(property); - } - else - { - DataObjectUtil.Accessor.create((EObject)dataObject, path).unsetAndRecyle(); - } - } - - public static boolean isSet(DataObject dataObject, String path) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - return dataObject.isSet(property); - } - else - { - return DataObjectUtil.Accessor.create( - (EObject)dataObject, path).isSetAndRecyle(); - } - } - - public static void set(DataObject dataObject, String path, Object value) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) - { - dataObject.set(property, value); - } - else - { - DataObjectUtil.Accessor.create( - (EObject)dataObject, path).setAndRecyle(value); - } - } - - public static Object get(DataObject dataObject, String path) - { - Property property = dataObject.getType().getProperty(path); - if (property != null) { - return dataObject.get(property); - } else { - return Accessor.create((EObject)dataObject, path).getAndRecyle(); - } - } - - public static BigDecimal getBigDecimal(Object value) - { - if (value instanceof BigDecimal) - { - return (BigDecimal)value; - } - - if (value instanceof BigInteger) - { - return new BigDecimal((BigInteger)value); - } - - if (value instanceof Number) - { - return new BigDecimal(((Number)value).doubleValue()); - } - - if (value instanceof String) - { - return new BigDecimal((String)value); - } - - if (value == null) - { - return null; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to BigDecimal"); - } - - public static Object getSetValue(Property property, BigDecimal value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - EClassifier eType = eStructuralFeature.getEType(); - if (value == null) - { - return eType.getDefaultValue(); - } - - String name = eType.getInstanceClassName(); - if (name == "java.math.BigDecimal") - { - return value; - } - - if (name == "java.math.BigInteger") - { - return value.toBigInteger(); - } - - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte(value.byteValue()); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value.doubleValue()); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value.floatValue()); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer(value.intValue()); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value.longValue()); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short(value.shortValue()); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - public static BigInteger getBigInteger(Object value) - { - if (value instanceof BigInteger) - { - return (BigInteger)value; - } - - if (value instanceof BigDecimal) - { - return ((BigDecimal)value).toBigInteger(); - } - - if (value instanceof Number) - { - return BigInteger.valueOf(((Number)value).longValue()); - } - - if (value instanceof String) - { - return new BigInteger((String)value); - } - - if (value instanceof byte[]) - { - return new BigInteger((byte[])value); - } - - if (value == null) - { - return null; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to BigInteger"); - } - - public static Object getSetValue(Property property, BigInteger value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - EClassifier eType = eStructuralFeature.getEType(); - if (value == null) - { - return eType.getDefaultValue(); - } - - String name = eType.getInstanceClassName(); - if (name == "java.math.BigInteger") - { - return value; - } - - if (name == "java.math.BigDecimal") - { - return new BigDecimal(value); - } - - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte(value.byteValue()); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value.doubleValue()); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value.floatValue()); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer(value.intValue()); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value.longValue()); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short(value.shortValue()); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - if (name == "byte[]") - { - return value.toByteArray(); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - public static boolean getBoolean(Object value) - { - if (value instanceof Boolean) - { - return ((Boolean)value).booleanValue(); - } - - if (value instanceof String) - { - return Boolean.valueOf((String)value).booleanValue(); - } - - if (value == null) - { - return false; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to boolean"); - } - - public static Object getSetValue(Property property, boolean value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Boolean" || name == "boolean") - { - return value ? Boolean.TRUE : Boolean.FALSE; - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return value ? Boolean.TRUE : Boolean.FALSE; - } - - public static byte getByte(Object value) - { - if (value instanceof Number) - { - return ((Number)value).byteValue(); - } - - if (value instanceof String) - { - return Byte.parseByte((String)value); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to byte"); - } - - public static Object getSetValue(Property property, byte value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte(value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer(value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short(value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Byte(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Byte(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Byte(value); - } - - public static byte[] getBytes(Object value) - { - if (value instanceof byte[]) - { - return (byte[])value; - } - - if (value instanceof BigInteger) - { - return ((BigInteger)value).toByteArray(); - } - - if (value == null) - { - return null; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to byte array"); - } - - public static Object getSetValue(Property property, byte[] value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - EClassifier eType = eStructuralFeature.getEType(); - if (value == null) - { - return eType.getDefaultValue(); - } - - String name = eType.getInstanceClassName(); - if (name == "byte[]") - { - return value; - } - - if (name == "java.math.BigInteger") - { - return new BigInteger(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - public static char getChar(Object value) - { - if (value instanceof Character) - { - return ((Character)value).charValue(); - } - - if (value instanceof String) - { - return ((String)value).charAt(0); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to char"); - } - - public static Object getSetValue(Property property, char value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Character" || name == "char") - { - return new Character(value); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Character(value); - } - - public static Date getDate(Object value) - { - if (value instanceof String) { - return DataHelper.INSTANCE.toDate((String)value); - } - - //if (value instanceof XMLCalendar) - //{ - //return ((XMLCalendar)value).getDate(); - //} - - if (value instanceof Date) - { - return (Date)value; - } - - if (value instanceof Long) - { - return new Date(((Long)value).longValue()); - } - - if (value == null) - { - return null; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to Date"); - } - - public static Object getSetValue(Property property, Date value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - EClassifier eType = eStructuralFeature.getEType(); - if (value == null) - { - return eType.getDefaultValue(); - } - - String name = eType.getInstanceClassName(); - - if (name == "java.lang.String") - { - String typeName = getDateTypeName((EDataType)eType); - if ("DateTime".equals(typeName)) { - return DataHelper.INSTANCE.toDateTime(value); - } - else if ("Day".equals(typeName)) { - return DataHelper.INSTANCE.toDay(value); - } - else if ("Duration".equals(typeName)) { - return DataHelper.INSTANCE.toDuration(value); - } - else if ("Month".equals(typeName)) { - return DataHelper.INSTANCE.toMonth(value); - } - else if ("MonthDay".equals(typeName)) { - return DataHelper.INSTANCE.toMonthDay(value); - } - else if ("Time".equals(typeName)) { - return DataHelper.INSTANCE.toTime(value); - } - else if ("Year".equals(typeName)) { - return DataHelper.INSTANCE.toYear(value); - } - else if ("YearMonth".equals(typeName)) { - return DataHelper.INSTANCE.toYearMonth(value); - } - else if ("YearMonthDay".equals(typeName)) { - return DataHelper.INSTANCE.toYearMonthDay(value); - } - else if ("String".equals(typeName)) - { - return DataHelper.INSTANCE.toDateTime(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - //if (name == "java.util.Date") - //{ - //return new XMLCalendar(value, XMLCalendar.DATE); - //} - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value.getTime()); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - protected static String getDateTypeName(EDataType eDataType) - { - String name = eDataType.getName(); - if (("DateTime".equals(name)) || - ("Day".equals(name)) || - ("Duration".equals(name)) || - ("Month".equals(name)) || - ("MonthDay".equals(name)) || - ("Time".equals(name)) || - ("Year".equals(name)) || - ("YearMonth".equals(name)) || - ("YearMonthDay".equals(name)) || - ("String".equals(name))) - { - return name; - } - - EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType); - if (baseType != null) - { - return getDateTypeName(baseType); - } - - List memberTypes = ExtendedMetaData.INSTANCE.getMemberTypes(eDataType); - if (!memberTypes.isEmpty()) - { - for (int i = 0, size = memberTypes.size(); i < size; ++i) - { - EDataType memberType = (EDataType)memberTypes.get(i); - String memberTypeName = getDateTypeName(memberType); - if (("DateTime".equals(memberTypeName)) || - ("Day".equals(memberTypeName)) || - ("Duration".equals(memberTypeName)) || - ("Month".equals(memberTypeName)) || - ("MonthDay".equals(memberTypeName)) || - ("Time".equals(memberTypeName)) || - ("Year".equals(memberTypeName)) || - ("YearMonth".equals(memberTypeName)) || - ("YearMonthDay".equals(memberTypeName)) || - ("String".equals(memberTypeName))) - { - return memberTypeName; - } - } - } - - return ""; - } - - public static double getDouble(Object value) - { - if (value instanceof Number) - { - return ((Number)value).doubleValue(); - } - - if (value instanceof String) - { - return Double.parseDouble((String)value); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to double"); - } - - public static Object getSetValue(Property property, double value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte((byte)value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer((int)value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long((long)value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short((short)value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Double(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Double(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - //Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Double(value); - } - - public static float getFloat(Object value) - { - if (value instanceof Number) - { - return ((Number)value).floatValue(); - } - - if (value instanceof String) - { - return Float.parseFloat((String)value); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to float"); - } - - public static Object getSetValue(Property property, float value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte((byte)value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer((int)value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long((long)value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short((short)value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Float(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Float(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Float(value); - } - - public static int getInt(Object value) - { - if (value instanceof Number) - { - return ((Number)value).intValue(); - } - - if (value instanceof String) - { - return Integer.parseInt((String)value); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to int"); - } - - public static Object getSetValue(Property property, int value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte((byte)value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer(value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short((short)value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Integer(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Integer(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Integer(value); - } - - public static long getLong(Object value) - { - if (value instanceof Number) - { - return ((Number)value).longValue(); - } - - if (value instanceof String) - { - return Long.parseLong((String)value); - } - - if (value instanceof Date) - { - return ((Date)value).getTime(); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to long"); - } - - public static Object getSetValue(Property property, long value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte((byte)value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer((int)value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short((short)value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Long(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Long(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - if (name == "java.util.Date") - { - return new Date(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Long(value); - } - - public static short getShort(Object value) - { - if (value instanceof Number) - { - return ((Number)value).shortValue(); - } - - if (value instanceof String) - { - return Short.parseShort((String)value); - } - - if (value == null) - { - return 0; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to short"); - } - - public static Object getSetValue(Property property, short value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - String name = eStructuralFeature.getEType().getInstanceClassName(); - if (name == "java.lang.Byte" || name == "byte") - { - return new Byte((byte)value); - } - - if (name == "java.lang.Double" || name == "double") - { - return new Double(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return new Integer(value); - } - - if (name == "java.lang.Long" || name == "long") - { - return new Long(value); - } - - if (name == "java.lang.Short" || name == "short") - { - return new Short(value); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(new Short(value)); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(new Short(value)); - } - - if (name == "java.lang.String") - { - return String.valueOf(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return new Short(value); - } - - public static String getString(Object value) - { - if (value instanceof String) - { - return (String)value; - } - - if (value instanceof Number || value instanceof Boolean || value instanceof Character) - { - return String.valueOf(value); - } - - if (value == null) - { - return null; - } - - throw new IllegalArgumentException("The value of type '" + value.getClass().getName() + "' cannot be converted to String"); - } - - public static Object getSetValue(Property property, String value) - { - EStructuralFeature eStructuralFeature = (EStructuralFeature)property; - EClassifier eType = eStructuralFeature.getEType(); - if (value == null) - { - return eType.getDefaultValue(); - } - - String name = eType.getInstanceClassName(); - if (name == "java.lang.String") - { - return value; - } - - if (name == "java.lang.Byte" || name == "byte") - { - return Byte.valueOf(value); - } - - if (name == "java.lang.Double" || name == "double" || name == "java.lang.Number") - { - return Double.valueOf(value); - } - - if (name == "java.lang.Float" || name == "float") - { - return new Float(value); - } - - if (name == "java.lang.Integer" || name == "int") - { - return Integer.valueOf(value); - } - - if (name == "java.lang.Long" || name == "long") - { - return Long.valueOf(value); - } - - if (name == "java.lang.Short" || name == "short") - { - return Short.valueOf(value); - } - - if (name == "java.lang.Character" || name == "char") - { - return new Character(value.charAt(0)); - } - - if (name == "java.math.BigDecimal") - { - return getBigDecimal(value); - } - - if (name == "java.math.BigInteger") - { - return getBigInteger(value); - } - - if (name == "java.lang.Boolean" || name == "boolean") - { - return Boolean.valueOf(value); - } - - // Instead of throwing an IllegalArgumentException we will pass the value to the property - return value; - } - - public static EStructuralFeature getOpenFeature(EObject eObject, int featureID) - { - EClass eClass = eObject.eClass(); - int openFeatureCount = featureID - eClass.getFeatureCount(); - Set openFeatureSet = new HashSet(); - for (int i = 0, count = eClass.getEAllStructuralFeatures().size(); i < count; ++i) - { - EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i); - if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature)) - { - List features = (List)eObject.eGet(eStructuralFeature); - for (int j = 0, size = features.size(); j < size; ++j) - { - FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j); - EStructuralFeature entryFeature = entry.getEStructuralFeature(); - if (openFeatureSet.add(entryFeature)) - { - if (--openFeatureCount < 0) return entryFeature; - } - } - } - } - throw new IndexOutOfBoundsException(); - } - - public static EStructuralFeature getOpenFeature(EObject eObject, String featureName) - { - EClass eClass = eObject.eClass(); - Set openFeatureSet = new HashSet(); - for (int i = 0, count = eClass.getEAllStructuralFeatures().size(); i < count; ++i) - { - EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i); - if (/*!eStructuralFeature.isDerived() && */FeatureMapUtil.isFeatureMap(eStructuralFeature)) - { - List features = (List)eObject.eGet(eStructuralFeature); - for (int j = 0, size = features.size(); j < size; ++j) - { - FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j); - EStructuralFeature entryFeature = entry.getEStructuralFeature(); - if (openFeatureSet.add(entryFeature)) - { - Property property = (Property)entryFeature; - if (property.getName().equals(featureName)) return entryFeature; - - List aliasNames = property.getAliasNames(); - for (int aliasCount = aliasNames.size(); aliasCount > 0; ) - { - if (aliasNames.get(--aliasCount).equals(featureName)) return entryFeature; - } - } - } - } - } - throw new IllegalArgumentException("Class '" + eObject.eClass().getName() + "' does not have a feature named '" + featureName + "'"); - } - - public static List getAliasNames(EStructuralFeature eStructuralFeature) - { - List list = SDOExtendedMetaData.INSTANCE.getAliasNames(eStructuralFeature); - if (list == null) { - list = new ArrayList(); - } - return list; - } - - public static List getAliasNames(EClassifier eClassifier) - { - List list = SDOExtendedMetaData.INSTANCE.getAliasNames(eClassifier); - if (list == null) { - list = new ArrayList(); - } - return list; - } - - /** - * Process the default EMF path and minimal XPath syntax. - * This design is still under review and construction. - * - * Syntax: - * - *
-   * path = /? (step '/')* step
-   * step = feature
-   *      | feature '.' index_from_0 
-   *      | feature '[' index_from_1 ']'
-   *      | reference '[' attribute '=' value ']'
-   *      | ..
-   *      | '@' step
-   *
- * - * feature = the name of an attribute or reference - * attribute = the name of an attribute - * reference = the name of a reference - * index = positive integer - * value = the string value of an attribute - * leading / begins at the root - * .. is containing object - * - * features must be multi-valued to use '.' and '[' operations. - * Only the last step may have an attribute as the feature. - */ - public static final class Accessor //TODO rewrite this using SDO APIs - { - /** - * Creates an accessor for the path of the object. - */ - public static Accessor create(EObject eObject, String path) - { - Accessor result = pool.get(); - result.init(eObject, path); - return result; - } - - /** - * Only the get and recycle methods should be call; they are the only synchronized methods. - */ - protected static class Pool extends BasicEList - { - protected Accessor[] accessors; - - public Pool() - { - super(10); - } - - protected Object[] newData(int capacity) - { - return accessors = new Accessor [capacity]; - } - - /** - * Returns a recyled instance or a new instance. - */ - public synchronized Accessor get() - { - if (size > 0) - { - return accessors[--size]; - } - else - { - return new Accessor(); - } - } - - /** Safely gives the accessor back for recycled use. - */ - public synchronized void recycle(Accessor accessor) - { - int minimumCapacity = size + 1; - if (minimumCapacity > data.length) - { - grow(minimumCapacity); - } - accessors[size++] = accessor; - } - } - - /** - * A static thread safe pool of Accessors. - */ - static final Pool pool = new Pool(); - - protected static final int NO_INDEX = -1; - - protected EObject eObject; - - protected EStructuralFeature feature; - - protected int index; - - protected Accessor() - { - } - - protected Accessor(EObject eObject, String path) - { - init(eObject, path); - } - - protected void init(EObject eObject, String path) - { - this.eObject = eObject; - - // This should only be called with a path right now. - // - //feature = getType(eObject).getProperty(path).getEStructuralFeature(); - //if (feature == null) - { - process(path); - } - //else - { - //index = NO_INDEX; - } - } - - public Object get() - { - if (feature == null) - { - return eObject; - } - else - { - Object value = eObject.eGet(feature, true); - if (index >= 0) - { - value = ((List)value).get(index); - if (value instanceof FeatureMap.Entry) - { - value = ((FeatureMap.Entry)value).getValue(); - } - } - else if (FeatureMapUtil.isFeatureMap(feature)) - { - value = new BasicSequence((FeatureMap.Internal)value); - } - return value; - } - } - - public Object getAndRecyle() - { - Object result = get(); - pool.recycle(this); - return result; - } - - public void set(Object newValue) - { - if (index >= 0) - { - List list = (List)eObject.eGet(feature, true); - list.set(index, newValue); - } - else - { - // EATM newValue = string2Enum(feature, newValue); - eObject.eSet(feature, newValue); - } - } - - public void setAndRecyle(Object newValue) - { - set(newValue); - pool.recycle(this); - } - - public boolean isSet() - { - return eObject.eIsSet(feature); - } - - public boolean isSetAndRecyle() - { - boolean result = isSet(); - pool.recycle(this); - return result; - } - - public void unset() - { - eObject.eUnset(feature); - } - - public void unsetAndRecyle() - { - unset(); - pool.recycle(this); - } - - public void recycle() - { - pool.recycle(this); - } - - public EObject getEObject() - { - return eObject; - } - - protected void setEObject(EObject eObject) - { - this.eObject = eObject; - feature = null; - index = NO_INDEX; - } - - public EStructuralFeature getEStructuralFeature() - { - return feature; - } - - public Property getProperty() - { - return (Property)feature; - } - - protected void setFeatureName(String name) - { - if (name != null) - { - feature = (EStructuralFeature)((DataObject)eObject).getProperty(name); - } - else - { - feature = null; - } - index = NO_INDEX; - } - - protected int getIndex() - { - return index; - } - - /* - * calling constraint, this method is not to be used for semantic of setting index to NO_INDEX - */ - protected void setIndex(int index) - { - if(index < 0) { - // The index value should be greater than 0. An index value which is too high will result in - // an index out of bounds generated later on accessing the data. - throw new IndexOutOfBoundsException("Index value is too low"); - } - this.index = index; - if (!FeatureMapUtil.isMany(eObject, feature)) - { - throw new IndexOutOfBoundsException("Index applies only to multi-valued features."); - } - } - - protected void process(String pathString) - { - TokenList tokens = new TokenList(pathString.toCharArray()); - String token; - int size = tokens.size(); - int x = 0; - - if ("/".equals(tokens.peek(0))) - { - setEObject(EcoreUtil.getRootContainer(eObject)); - x++; - } - - for (; x < size; x++) - { - token = tokens.peek(x); - char c = token.charAt(0); - if ('/' == c) - { - setEObject((EObject)get()); - } - else if ("..".equals(token)) - { - EObject container = eObject.eContainer(); - if (container == null) - { - throw new IllegalArgumentException("No containing object for " + eObject); - } - setEObject(container); - } - else if ('.' == c) - { - x++; // skip . - token = tokens.peek(x); - int index = Integer.parseInt(token); - setIndex(index); - } - else if ('[' == c) - { - x++; // skip [ - token = tokens.peek(x); // name or index - char following = tokens.peek(x + 1).charAt(0); - if ('=' != following) - { - int index = Integer.parseInt(token) - 1; - setIndex(index); - x++; // skip ] - } - else - { - x++; // done name - x++; // skip = - String attributeValue = tokens.peek(x); // value - if ("\"".equals(attributeValue)) - { - x++; // skip " - attributeValue = tokens.peek(++x); - } - x++; // skip ] - int index = matchingIndex((List)get(), token, attributeValue); - if (index < 0) - { - setEObject(null); - } - else - { - setIndex(index); - } - } - } - else if ('@' == c) - { - // skip @ - } - else - { - setFeatureName(token); - } - } - } - - protected static int matchingIndex(List eObjects, String attributeName, String attributeValue) - { - for (int i = 0, size = eObjects.size(); i < size; i++) - { - EObject eObject = (EObject)eObjects.get(i); - EStructuralFeature feature = (EStructuralFeature)((Type)eObject.eClass()).getProperty(attributeName); - // If feature is null, that means it could be an open feature. - if(feature == null){ - feature = (EStructuralFeature)DataObjectUtil.getOpenFeature(eObject, attributeName); - } - if (feature != null) - { - Object test = eObject.eGet(feature, true); - if (test != null) - { - String testString = EcoreUtil.convertToString((EDataType)feature.getEType(), test); - if (attributeValue.equals(testString)) - { - return i; - } - } - } - } - return -1; - } - - protected static class TokenList extends BasicEList - { - public TokenList(char[] path) - { - super(4); - - int pathLength = path.length; - StringBuffer token = new StringBuffer(); - char cPrev; - char c = 0; - char cNext; - char stringConstant = 0; - for (int pos = 0; pos < pathLength; pos++) - { - cPrev = c; - c = path[pos]; - cNext = pos < pathLength - 1 ? path[pos + 1] : 0; - - if (stringConstant != 0) - { - if (c == stringConstant) - { - endToken(token, true); - stringConstant = 0; - } - else - { - token.append(c); - } - } - else - { - switch (c) - { - case ' ': - case 0xA: - case 0xD: - case 0x9: - if (cPrev != ' ') - { - endToken(token, false); - } - c = ' '; - break; - - case '"': - case '\'': - endToken(token, false); - stringConstant = c; - break; - - // double or single tokens - case '/': - case ':': - case '.': - if (cPrev != c) - { - endToken(token, false); - } - token.append(c); - if (cNext != c) - { - endToken(token, false); - } - break; - - // single tokens - case '*': - case '@': - case '[': - case ']': - case '(': - case ')': - case '|': - endToken(token, false); - add(String.valueOf(c)); - break; - - // TODO: < > <= >= + - != - case '!': - endToken(token, false); - token.append(c); - break; - - case '=': - endToken(token, false); - add(String.valueOf(c)); - break; - - default: - token.append(c); - } - } - } - endToken(token, false); - } - - public String peek() - { - return size > 0 ? (String)data[0] : " "; - } - - public String peek(int index) - { - return index < size ? (String)data[index] : " "; - } - - public TokenList pop() - { - remove(0); - return this; - } - - public TokenList pop(int count) - { - while (count-- > 0) - { - remove(count); - } - return this; - } - - protected void endToken(StringBuffer token, boolean includeEmpty) - { - if (includeEmpty || token.length() > 0) - { - add(token.toString()); - } - token.setLength(0); - } - - protected boolean canContainNull() - { - return false; - } - - protected Object[] newData(int capacity) - { - return new String [capacity]; - } - } - - public String toString() - { - StringBuffer result = new StringBuffer("Accessor (object:"); - result.append(eObject == null ? "null" : eObject.toString()); - result.append(", feature:"); - result.append(feature == null ? "null" : feature.getName()); - result.append(", index:"); - result.append(index); - result.append(")"); - return result.toString(); - } - } - - public static Type getType(DataObject dataObject, String namespaceURI, String typeName) - { - DataGraph dataGraph = dataObject.getDataGraph(); - if (dataGraph != null) - { - return dataGraph.getType(namespaceURI, typeName); - } - else - { - //TODO think about where else to find the type - return TypeHelper.INSTANCE.getType(namespaceURI, typeName); - } - } - - public static Property getProperty(DataObject dataObject, String propertyName) - { - Property property = dataObject.getType().getProperty(propertyName); - if (property == null) - { - property = (Property)DataObjectUtil.getOpenFeature((EObject)dataObject, propertyName); - //throw new IllegalArgumentException("Type '" + dataObject.getType().getName() + "' does not have a property named '" + propertyName + "'"); - } - - return property; - } - - public static Property getProperty(DataObject dataObject, int propertyIndex) - { - List typeProperties = dataObject.getType().getProperties(); - - Property property = propertyIndex < typeProperties.size() ? - (Property)typeProperties.get(propertyIndex) : - (Property)dataObject.getInstanceProperties().get(propertyIndex); - - //FB maybe should catch bad index exception and throw IllegalArgumentException? - return property; - } - - public static Property getContainmentProperty(Property property) - { - if (property.isContainment()) - { - return property; - } - throw new IllegalArgumentException("The property '" + property.getName() + "' of '" + property.getContainingType().getName() - + "' isn't a containment"); - } - - public static DataObject create(Type type) - { - return (DataObject)EcoreUtil.create((EClass)type); - } - - public static ResourceSet createResourceSet() - { - ResourceSet result = new ResourceSetImpl(); - configureResourceSet(result); - return result; - } - - protected static Map registrations; - - protected static Map getRegistrations() - { - if (registrations == null) - { - Map result = new HashMap(); - - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.datagraph")) instanceof DataGraphResourceFactoryImpl)) - { - result.put("datagraph", new DataGraphResourceFactoryImpl()); - } - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.ecore")) instanceof EcoreResourceFactoryImpl)) - { - result.put("ecore", new EcoreResourceFactoryImpl()); - } - - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.emof")) instanceof EMOFResourceFactoryImpl)) - { - result.put("emof", new EMOFResourceFactoryImpl()); - } - - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.xsd")) instanceof XSDResourceFactoryImpl)) - { - result.put("xsd", new XSDResourceFactoryImpl()); - } - - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.wsdl")) instanceof XSDResourceFactoryImpl)) - { - result.put("wsdl", new XSDResourceFactoryImpl()); - } - - if (!(Resource.Factory.Registry.INSTANCE.getFactory(URI.createURI("*.*")) instanceof SDOXMLResourceFactoryImpl)) - { - result.put("*", new SDOXMLResourceFactoryImpl()); - } - - registrations = result; - } - - return registrations; - } - - protected static void configureResourceSet(ResourceSet resourceSet) - { - resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().putAll(getRegistrations()); - } - - public static EClass createDocumentRoot() - { - EClass documentRootEClass = EcoreFactory.eINSTANCE.createEClass(); - ExtendedMetaData.INSTANCE.setName(documentRootEClass, ""); - ExtendedMetaData.INSTANCE.setContentKind(documentRootEClass, ExtendedMetaData.MIXED_CONTENT); - - EAttribute mixed = EcoreFactory.eINSTANCE.createEAttribute(); - mixed.setName("mixed"); - mixed.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry()); - mixed.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY); - ExtendedMetaData.INSTANCE.setName(mixed, ":mixed"); - ExtendedMetaData.INSTANCE.setFeatureKind(mixed, ExtendedMetaData.ELEMENT_WILDCARD_FEATURE); - documentRootEClass.getEStructuralFeatures().add(mixed); - - EReference xmlnsPrefixMap = EcoreFactory.eINSTANCE.createEReference(); - xmlnsPrefixMap.setName("xMLNSPrefixMap"); - xmlnsPrefixMap.setEType(EcorePackage.eINSTANCE.getEStringToStringMapEntry()); - xmlnsPrefixMap.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY); - xmlnsPrefixMap.setContainment(true); - xmlnsPrefixMap.setTransient(true); - ExtendedMetaData.INSTANCE.setName(xmlnsPrefixMap, "xmlns:prefix"); - ExtendedMetaData.INSTANCE.setFeatureKind(xmlnsPrefixMap, ExtendedMetaData.ATTRIBUTE_FEATURE); - documentRootEClass.getEStructuralFeatures().add(xmlnsPrefixMap); - - EReference xsiSchemaLocation = EcoreFactory.eINSTANCE.createEReference(); - xsiSchemaLocation.setName("xSISchemaLocation"); - xsiSchemaLocation.setEType(EcorePackage.eINSTANCE.getEStringToStringMapEntry()); - xsiSchemaLocation.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY); - xsiSchemaLocation.setContainment(true); - xsiSchemaLocation.setTransient(true); - ExtendedMetaData.INSTANCE.setName(xsiSchemaLocation, "xsi:schemaLocation"); - ExtendedMetaData.INSTANCE.setFeatureKind(xsiSchemaLocation, ExtendedMetaData.ATTRIBUTE_FEATURE); - documentRootEClass.getEStructuralFeatures().add(xsiSchemaLocation); - - return documentRootEClass; - } - - /** - * Configure EMF to support the SDO runtime by registering a specialized Ecore factory, SDOEcoreFactory. - * This static initializion must run before any SDO metadata is created or loaded. - * As long as SDO helper classes (e.g., TypeHelper, XMLHelper, etc.) are accessed though their - * corresponding INSTANCE fields (e.g., TypeHelper.INSTANCE), or using the SDOUtil methods (e.g., - * SDOUtil.createTypeHelper(), this will always be the case. - */ - static - { - EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, new EPackage.Descriptor() - { - public EPackage getEPackage() - { - return EcorePackage.eINSTANCE; - } - - public EFactory getEFactory() - { - return new SDOFactoryImpl.SDOEcoreFactory(); - } - }); - } - - protected static StringBuffer getXPath(DataObject dataObject, StringBuffer path) - { - DataObject container = dataObject.getContainer(); - if (container == null) return path; - - boolean first = path.length() == 0; - Property property = dataObject.getContainmentProperty(); - if (property.isMany()) - { - 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); - } - - public static String getXPath(DataObject dataObject) - { - StringBuffer path = getXPath(dataObject, new StringBuffer()); - return path.toString(); - } - - protected static XMLParserPool globalXMLParserPool = new XMLParserPoolImpl(); - - public static void configureXMLResource(XMLResource resource, ExtendedMetaData extendedMetaData) - { - XMLOptions xmlOptions = new XMLOptionsImpl(); - xmlOptions.setProcessAnyXML(true); - resource.getDefaultLoadOptions().put(XMLResource.OPTION_XML_OPTIONS, xmlOptions); - - resource.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData); - resource.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData); - - resource.getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, globalXMLParserPool); - - resource.getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE); - - resource.getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE); - resource.getDefaultLoadOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE); - - resource.getDefaultLoadOptions().put(XMLResource.OPTION_ANY_TYPE, SDOPackage.eINSTANCE.getAnyTypeDataObject()); - resource.getDefaultSaveOptions().put(XMLResource.OPTION_ANY_TYPE, SDOPackage.eINSTANCE.getAnyTypeDataObject()); - - resource.getDefaultLoadOptions().put(XMLResource.OPTION_ANY_SIMPLE_TYPE, SDOPackage.eINSTANCE.getSimpleAnyTypeDataObject()); - resource.getDefaultSaveOptions().put(XMLResource.OPTION_ANY_SIMPLE_TYPE, SDOPackage.eINSTANCE.getSimpleAnyTypeDataObject()); - - //resource.getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, globalHashMap); - - //resource.getDefaultSaveOptions().put(XMLResource.OPTION_FORMATTED, Boolean.FALSE); - } - - public static void initRuntime() - { - // NOOP since init is done during static initialization of this class. See above. - } - - /* - public static Object get(org.apache.tuscany.sdo.model.Property property, int propertyIndex) { - switch(propertyIndex) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - return property.getAliasName(); - case ModelPackageImpl.PROPERTY__ANY: - return property.getAny(); - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - return property.getAnyAttribute(); - case ModelPackageImpl.PROPERTY__CONTAINMENT: - return Boolean.valueOf(property.isContainment()); - case ModelPackageImpl.PROPERTY__DEFAULT: - return property.getDefault_(); - case ModelPackageImpl.PROPERTY__MANY: - return Boolean.valueOf(property.isMany()); - case ModelPackageImpl.PROPERTY__NAME: - return property.getName(); - case ModelPackageImpl.PROPERTY__OPPOSITE: - return property.getOpposite_(); - case ModelPackageImpl.PROPERTY__READ_ONLY: - return Boolean.valueOf(property.isReadOnly()); - case ModelPackageImpl.PROPERTY__TYPE: - return property.getType_(); - } - return null; - } - - public static boolean isSet(org.apache.tuscany.sdo.model.Property property, int propertyIndex) { - switch(propertyIndex) - { - case ModelPackageImpl.PROPERTY__ALIAS_NAME: - return !property.getAliasName().isEmpty(); - case ModelPackageImpl.PROPERTY__ANY: - return false; - case ModelPackageImpl.PROPERTY__ANY_ATTRIBUTE: - return false; - case ModelPackageImpl.PROPERTY__CONTAINMENT: - return property.isSetContainment(); - case ModelPackageImpl.PROPERTY__DEFAULT: - return property.getDefault_() != null; - case ModelPackageImpl.PROPERTY__MANY: - return property.isSetMany(); - case ModelPackageImpl.PROPERTY__NAME: - return property.getName() != null; - case ModelPackageImpl.PROPERTY__OPPOSITE: - return property.getOpposite_() != null; - case ModelPackageImpl.PROPERTY__READ_ONLY: - return property.isSetReadOnly(); - case ModelPackageImpl.PROPERTY__TYPE: - return property.getType_() != null; - } - return false; - } - - public static Object get(org.apache.tuscany.sdo.model.Type type, int propertyIndex) { - switch (propertyIndex) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - return type.getBaseType(); - case ModelPackageImpl.TYPE__PROPERTY: - return type.getProperty(); - case ModelPackageImpl.TYPE__ALIAS_NAME: - return type.getAliasName(); - case ModelPackageImpl.TYPE__ANY: - return type.getAny(); - case ModelPackageImpl.TYPE__ABSTRACT: - return Boolean.valueOf(type.isAbstract()); - case ModelPackageImpl.TYPE__DATA_TYPE: - return Boolean.valueOf(type.isDataType()); - case ModelPackageImpl.TYPE__NAME: - return type.getName(); - case ModelPackageImpl.TYPE__OPEN: - return Boolean.valueOf(type.isOpen()); - case ModelPackageImpl.TYPE__SEQUENCED: - return Boolean.valueOf(type.isSequenced()); - case ModelPackageImpl.TYPE__URI: - return type.getUri(); - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - return type.getAnyAttribute(); - } - return null; - } - - public static boolean isSet(org.apache.tuscany.sdo.model.Type type, int propertyIndex) { - //FB Note that this implementation has the undesirable effect of invoking lazy creation of feature lists - switch (propertyIndex) - { - case ModelPackageImpl.TYPE__BASE_TYPE: - return !type.getBaseType().isEmpty(); - case ModelPackageImpl.TYPE__PROPERTY: - return !type.getProperty().isEmpty(); - case ModelPackageImpl.TYPE__ALIAS_NAME: - return !type.getAliasName().isEmpty(); - case ModelPackageImpl.TYPE__ANY: - return false; - case ModelPackageImpl.TYPE__ABSTRACT: - return type.isSetAbstract(); - case ModelPackageImpl.TYPE__DATA_TYPE: - return type.isSetDataType(); - case ModelPackageImpl.TYPE__NAME: - return type.getName() != null; - case ModelPackageImpl.TYPE__OPEN: - return type.isSetOpen(); - case ModelPackageImpl.TYPE__SEQUENCED: - return type.isSetSequenced(); - case ModelPackageImpl.TYPE__URI: - return type.getUri() != null; - case ModelPackageImpl.TYPE__ANY_ATTRIBUTE: - return false; - } - return false; - } - */ - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java deleted file mode 100644 index ec9697d8ad..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java +++ /dev/null @@ -1,595 +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.util; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.security.AccessController; -import java.security.PrivilegedExceptionAction; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sdo.SDOExtendedMetaData; -import org.apache.tuscany.sdo.SDOFactory; -import org.apache.tuscany.sdo.SimpleAnyTypeDataObject; -import org.apache.tuscany.sdo.helper.DataFactoryImpl; -import org.apache.tuscany.sdo.helper.SDOExtendedMetaDataImpl; -import org.apache.tuscany.sdo.helper.TypeHelperImpl; -import org.apache.tuscany.sdo.helper.XMLHelperImpl; -import org.apache.tuscany.sdo.helper.XMLStreamHelper; -import org.apache.tuscany.sdo.helper.XMLStreamHelperImpl; -import org.apache.tuscany.sdo.helper.XSDHelperImpl; -import org.apache.tuscany.sdo.impl.DataGraphImpl; -import org.apache.tuscany.sdo.impl.DynamicDataObjectImpl; -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; -import org.eclipse.emf.common.util.URI; -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.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.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.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -import commonj.sdo.DataGraph; -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Type; -import commonj.sdo.Sequence; -import commonj.sdo.helper.DataFactory; -import commonj.sdo.helper.TypeHelper; -import commonj.sdo.helper.XMLHelper; -import commonj.sdo.helper.XSDHelper; - -/** - * This class provides some useful static utility functions which are not specified in the SDO - * specification itself. Use of the functions in this class is recommended, instead of resorting - * to low-level implementation-specific APIs. - */ -public final class SDOUtil -{ - /** - * 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 static DataObject createDataTypeWrapper(Type dataType, Object value) - { - SimpleAnyTypeDataObject simpleAnyType = SDOFactory.eINSTANCE.createSimpleAnyTypeDataObject(); - simpleAnyType.setInstanceType((EDataType)dataType); - simpleAnyType.setValue(value); - return simpleAnyType; - } - - /** - * 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 static Object createFromString(Type dataType, String literal) - { - return EcoreUtil.createFromString((EDataType)dataType, 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 static String convertToString(Type dataType, Object value) - { - return EcoreUtil.convertToString((EDataType)dataType, 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 static Type getXSDSDOType(String xsdType) - { - Type type = null; - //if ("anyType".equals(xsdType)) { - // type = (Type)SDOPackage.eINSTANCE.getDataObject(); - //} else { - String name = (String)xsdToSdoMappings.get(xsdType); - if (name != null) { - type = (Type)ModelPackageImpl.eINSTANCE.getEClassifier(name); - } else { - type = (Type)SDOExtendedMetaData.INSTANCE.getType(XMLTypePackage.eINSTANCE, xsdType); - } - //} - return type; - } - - /** - * 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 static 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(); - } - - /** - * 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 static Type getJavaSDOType(Class javaClass) - { - String name = (String)javaToSdoMappings.get(javaClass); - if (name != null) - { - return (Type)ModelPackageImpl.eINSTANCE.getEClassifier(name); - } - return null; - } - - /** - * 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 static boolean isRequired(Property property) - { - return ((EStructuralFeature)property).isRequired(); - } - - /** - * Create an empty data graph. - * @return the new data graph instance. - */ - public static DataGraph createDataGraph() - { - return SDOFactory.eINSTANCE.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 static void setRootObject(DataGraph dataGraph, DataObject rootObject) - { - ((DataGraphImpl)dataGraph).setERootObject((EObject)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. - * @return the de-serialized data graph. - * @throws IOException - */ - 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); - } - - /** - * 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 static void saveDataGraph(DataGraph dataGraph, OutputStream outputStream, Map options) throws IOException - { - ((DataGraphImpl)dataGraph).getDataGraphResource().save(outputStream, options); - } - - /** - * Create a new TypeHelper instance. The returned type helper will have visibility of types registered - * directly by calling a define method on it or by calling define on an associated XSDHelper. It will - * also have visibility of static types registered by calling SDOUtil.registerStaticTypes in the - * same classLoader scope. - * @return the new TypeHelper. - */ - public static TypeHelper createTypeHelper() - { - EPackage.Registry registry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE); - ExtendedMetaData extendedMetaData = new SDOExtendedMetaDataImpl(registry); //TODO create subclass that makes demand() methods synchronous - return new TypeHelperImpl(extendedMetaData); - } - - /** - * Create a new DataFactory, with visibility to types in the specified TypeHelper scope. - * @param scope the TypeHelper to use for locating types. - * @return the new DataFactory. - */ - public static DataFactory createDataFactory(TypeHelper scope) - { - return new DataFactoryImpl(scope); - } - - /** - * Create a new XMLHelper, with visibility to types in the specified TypeHelper scope. - * @param scope the TypeHelper to use for locating types. - * @return the new XMLHelper. - */ - public static XMLHelper createXMLHelper(TypeHelper scope) - { - return new XMLHelperImpl(scope); - } - - /** - * Create a new XSDHelper, with visibility to types in the specified TypeHelper scope. - * @param scope the TypeHelper to use for locating and populating types. - * @return the new XSDHelper. - */ - public static XSDHelper createXSDHelper(TypeHelper scope) - { - return new XSDHelperImpl(scope); - } - - /** - * Create a new XMLStreamHelper, with visibility to types in the specified TypeHelper scope. - * @param scope the TypeHelper to use for locating types. - * @return the new XMLStreamHelper. - */ - public static XMLStreamHelper createXMLStreamHelper(TypeHelper scope) - { - return new XMLStreamHelperImpl(scope); - } - - public static Type createType(TypeHelper scope, String uri, String name, boolean isDataType) - { - ExtendedMetaData extendedMetaData = ((TypeHelperImpl)scope).getExtendedMetaData(); - - EPackage ePackage = extendedMetaData.getPackage(uri); - if (ePackage == null) - { - ePackage = EcoreFactory.eINSTANCE.createEPackage(); - ePackage.setEFactoryInstance(new DynamicDataObjectImpl.FactoryImpl()); - ePackage.setNsURI(uri); - String packagePrefix = URI.createURI(uri).trimFileExtension().lastSegment(); - ePackage.setName(packagePrefix); - ePackage.setNsPrefix(packagePrefix); - extendedMetaData.putPackage(uri, ePackage); - } - - EClassifier eClassifier = ePackage.getEClassifier(name); - if (eClassifier != null) - throw new IllegalArgumentException(); // already defined - - 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 static void addBaseType(Type type, Type baseType) - { - ((EClass)type).getESuperTypes().add(baseType); - } - - public static void addAliasName(Type type, String aliasName) - { - throw new UnsupportedOperationException(); // TODO: implement this method properly - //type.getAliasNames().add(aliasName); - } - - public static void setOpen(Type type, boolean isOpen) - { - if (isOpen == type.isOpen()) return; - - if (isOpen) - { - EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute(); - ((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")); - - if (type.isSequenced()) { - 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 static void setSequenced(Type type, boolean isSequenced) - { - if (isSequenced == type.isSequenced()) return; - - // 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() != null) // document root is a special case - throw new IllegalArgumentException(); - } - - if (isSequenced) { - EClass eClass = (EClass)type; - ExtendedMetaData.INSTANCE.setContentKind(eClass, ExtendedMetaData.MIXED_CONTENT); - EAttribute mixedFeature = EcoreFactory.eINSTANCE.createEAttribute(); - mixedFeature.setName("mixed"); - mixedFeature.setUnique(false); - mixedFeature.setEType(EcorePackage.eINSTANCE.getEFeatureMapEntry()); - mixedFeature.setLowerBound(0); - mixedFeature.setUpperBound(-1); - eClass.getEStructuralFeatures().add(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 static void setAbstract(Type type, boolean isAbstract) - { - ((EClass)type).setAbstract(isAbstract); - } - - public static void setJavaClassName(Type type, String javaClassName) - { - ((EClassifier)type).setInstanceClassName(javaClassName); - } - - public static 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 (containingType.getName() == null) - if ("".equals(ExtendedMetaData.INSTANCE.getName((EClass)containingType))) - { - ExtendedMetaData.INSTANCE.setFeatureKind(eStructuralFeature, ExtendedMetaData.ELEMENT_FEATURE); - ExtendedMetaData.INSTANCE.setNamespace(eStructuralFeature, containingType.getURI()); - } - - if (containingType.isSequenced()) { - eStructuralFeature.setDerived(true); - eStructuralFeature.setTransient(true); - eStructuralFeature.setVolatile(true); - } - - return (Property)eStructuralFeature; - } - - public static void addAliasName(Property property, String aliasName) - { - throw new UnsupportedOperationException(); // TODO: implement this method properly - //property.getAliasNames().add(aliasName); - } - - public static void setMany(Property property, boolean isMany) - { - ((EStructuralFeature)property).setUpperBound(isMany ? EStructuralFeature.UNBOUNDED_MULTIPLICITY : 1); - } - - public static void setContainment(Property property, boolean isContainment) - { - ((EReference)property).setContainment(isContainment); - } - - public static void setDefault(Property property, String defaultValue) - { - ((EStructuralFeature)property).setDefaultValueLiteral(defaultValue); - } - - public static void setReadOnly(Property property, boolean isReadOnly) - { - ((EStructuralFeature)property).setChangeable(!isReadOnly); - } - - public static void setOpposite(Property property, Property opposite) - { - ((EReference)property).setEOpposite((EReference)opposite); - } - - /** - * Register and initialize the SDO types supported by the specified generated factory class. - * This function must be called before instances of the generated types can be created/used. - * The registered types will be visible in all TypeHelper's created in the same classLoader - * scope as the call to this function. - * @param factoryClass the generated factory class. - */ - public static void registerStaticTypes(Class factoryClass) - { - //TODO this implementation is temporary, until the SDO generated factory pattern is decided - // - String temp = factoryClass.getName().replaceFirst("Factory$", "PackageImpl"); - int lastDot = temp.lastIndexOf('.'); - String packageName = temp.substring(0, lastDot) + ".impl" + temp.substring(lastDot); - try // this case handles the current default generator pattern - { - Class javaClass = getPackageClass(factoryClass, packageName); - Field field = javaClass.getField("eINSTANCE"); - field.get(null); - } - catch (Exception e1) - { - packageName = factoryClass.getName().replaceFirst("Factory$", "Package"); - try // this case handles the -noInterfaces generator pattern - { - Class javaClass = getPackageClass(factoryClass, packageName); - Field field = javaClass.getField("eINSTANCE"); - field.get(null); - } - catch (Exception e2) - { - try // this case handles the -noEMF generator pattern - { - Field field = factoryClass.getField("INSTANCE"); - field.get(null); - } - catch (Exception e3) - { - e3.printStackTrace(); - } - } - } - } - - private static Class getPackageClass(Class factoryClass, String packageName) throws Exception - { - final Class factoryClassTemp = factoryClass; - final String packageNameTemp = packageName; - return (Class)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - return factoryClassTemp.getClassLoader().loadClass(packageNameTemp); - } - }); - } - - //Java instance class to SDO mappings (p.69 - p.71 of the SDO spec) - private 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 (p.95 of the SDO spec) - private 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"); - } - - /** - * Initialize SDO runtime. - */ - static - { - DataObjectUtil.initRuntime(); - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/StAX2SAXAdapter.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/StAX2SAXAdapter.java deleted file mode 100644 index c4f9701cbc..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/StAX2SAXAdapter.java +++ /dev/null @@ -1,247 +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.util; - -import javax.xml.namespace.QName; -import javax.xml.stream.Location; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.AttributesImpl; - -/** - * Adapter that converts from StAX to SAX event streams. Currently the following SAX events are not generated: - *
    - *
  • ignorableWhitespace
  • - *
  • skippedEntity
  • - *
      - * Also the following StAX events are not mapped: - *
        - *
      • CDATA
      • - *
      • COMMENT
      • - *
      • DTD
      • - *
      • ENTITY_DECLARATION
      • - *
      • ENTITY_REFERENCE
      • - *
      • NOTATION_DECLARATION
      • - *
      • SPACE
      • - *
      - * StAX ATTRIBUTE events are ignored but the equivalent attributes (derived from the START_ELEMENT event) are supplied in the SAX startElement event's - * Attributes parameter. If the adaptor is configured to pass namespace prefixes then namespace information will also be included in the Attributes; - * StAX NAMESPACE events are ignored. - *

      - * Another issue is namespace processing. If the reader is positioned at a sub-node, we cannot capture all the in-scope namespace bindings. Therefore - * we cannot re-create a proper SAX event stream from a StAX parser. - *

      - * For example - *

      - * <a:root xmlns:a="foo" xmlns:b="bar"><b:sub>a:foo</b:sub></a:root> - *

      - * And if you are handed a parser at <b:sub>, then your SAX events should look like: - *

      - * <b:sub xmlns:a="foo" xmlns:b="bar">a:foo</b:sub> - *

      - * not: - *

      - * <b:sub>a:foo</b:sub> - *

      - *

      - * Proposal: we change the receiver of SAX events (SDOXMLResourceImpl) so that it uses NamespaceContext to resolve prefix (as opposed to record - * start/endPrefixMappings and use it for resolution.) - * - * @version $Rev$ $Date$ - */ -public class StAX2SAXAdapter { - private final boolean namespacePrefixes; - - /** - * Construct a new StAX to SAX adapter that will convert a StAX event stream into a SAX event stream. - * - * @param namespacePrefixes whether xmlns attributes should be included in startElement events; - */ - public StAX2SAXAdapter(boolean namespacePrefixes) { - this.namespacePrefixes = namespacePrefixes; - } - - /** - * Pull events from the StAX stream and dispatch to the SAX ContentHandler. The StAX stream would typically be located on a START_DOCUMENT or - * START_ELEMENT event and when this method returns it will be located on the associated END_DOCUMENT or END_ELEMENT event. Behaviour with other - * start events is undefined. - * - * @param reader StAX event source to read - * @param handler SAX ContentHandler for processing events - * @throws XMLStreamException if there was a problem reading the stream - * @throws SAXException passed through from the ContentHandler - */ - public void parse(XMLStreamReader reader, ContentHandler handler) throws XMLStreamException, SAXException { - handler.setDocumentLocator(new LocatorAdaptor(reader.getLocation())); - - // remembers the nest level of elements to know when we are done - int level = 0; - int event = reader.getEventType(); - while (true) { - switch (event) { - case XMLStreamConstants.START_DOCUMENT: - level++; - handler.startDocument(); - break; - case XMLStreamConstants.START_ELEMENT: - level++; - handleStartElement(reader, handler); - break; - case XMLStreamConstants.PROCESSING_INSTRUCTION: - handler.processingInstruction(reader.getPITarget(), reader.getPIData()); - break; - case XMLStreamConstants.CHARACTERS: - handler.characters(reader.getTextCharacters(), reader.getTextStart(), reader.getTextLength()); - break; - case XMLStreamConstants.END_ELEMENT: - handleEndElement(reader, handler); - level--; - if (level == 0) { - return; - } - break; - case XMLStreamConstants.END_DOCUMENT: - handler.endDocument(); - return; - /* - * uncomment to handle all events rather than just mapped ones // StAX events that are not mapped to SAX case XMLStreamConstants.COMMENT: - * case XMLStreamConstants.SPACE: case XMLStreamConstants.ENTITY_REFERENCE: case XMLStreamConstants.DTD: case XMLStreamConstants.CDATA: - * case XMLStreamConstants.NOTATION_DECLARATION: case XMLStreamConstants.ENTITY_DECLARATION: break; // StAX events handled in - * START_ELEMENT case XMLStreamConstants.ATTRIBUTE: case XMLStreamConstants.NAMESPACE: break; default: throw new AssertionError("Unknown - * StAX event: " + event); - */ - } - event = reader.next(); - } - } - - private void handleStartElement(XMLStreamReader reader, ContentHandler handler) throws SAXException { - // send startPrefixMapping events immediately before startElement event - int nsCount = reader.getNamespaceCount(); - for (int i = 0; i < nsCount; i++) { - String prefix = reader.getNamespacePrefix(i); - if (prefix == null) { // true for default namespace - prefix = ""; - } - handler.startPrefixMapping(prefix, reader.getNamespaceURI(i)); - } - - // fire startElement - QName qname = reader.getName(); - String prefix = qname.getPrefix(); - String rawname; - if (prefix == null || prefix.length() == 0) { - rawname = qname.getLocalPart(); - } else { - rawname = prefix + ':' + qname.getLocalPart(); - } - Attributes attrs = getAttributes(reader); - handler.startElement(qname.getNamespaceURI(), qname.getLocalPart(), rawname, attrs); - } - - private static void handleEndElement(XMLStreamReader reader, ContentHandler handler) throws SAXException { - // fire endElement - QName qname = reader.getName(); - handler.endElement(qname.getNamespaceURI(), qname.getLocalPart(), qname.toString()); - - // send endPrefixMapping events immediately after endElement event - // we send them in the opposite order to that returned but this is not actually required by SAX - int nsCount = reader.getNamespaceCount(); - for (int i = nsCount - 1; i >= 0; i--) { - String prefix = reader.getNamespacePrefix(i); - if (prefix == null) { // true for default namespace - prefix = ""; - } - handler.endPrefixMapping(prefix); - } - } - - /** - * Get the attributes associated with the current START_ELEMENT event. - * - * @return the StAX attributes converted to org.xml.sax.Attributes - */ - private Attributes getAttributes(XMLStreamReader reader) { - assert reader.getEventType() == XMLStreamConstants.START_ELEMENT; - - AttributesImpl attrs = new AttributesImpl(); - - // add namespace declarations if required - if (namespacePrefixes) { - for (int i = 0; i < reader.getNamespaceCount(); i++) { - String prefix = reader.getNamespacePrefix(i); - String uri = reader.getNamespaceURI(i); - attrs.addAttribute(null, prefix, "xmlns:" + prefix, "CDATA", uri); - } - } - - // Regular attributes - for (int i = 0; i < reader.getAttributeCount(); i++) { - String uri = reader.getAttributeNamespace(i); - if (uri == null) { - uri = ""; - } - String localName = reader.getAttributeLocalName(i); - String prefix = reader.getAttributePrefix(i); - String qname; - if (prefix == null || prefix.length() == 0) { - qname = localName; - } else { - qname = prefix + ':' + localName; - } - String type = reader.getAttributeType(i); - String value = reader.getAttributeValue(i); - - attrs.addAttribute(uri, localName, qname, type, value); - } - - return attrs; - } - - /** - * Adaptor for mapping Locator information. - */ - private static class LocatorAdaptor implements Locator { - private final Location location; - - private LocatorAdaptor(Location location) { - this.location = location; - } - - public int getColumnNumber() { - return location == null ? 0 : location.getColumnNumber(); - } - - public int getLineNumber() { - return location == null ? 0 : location.getLineNumber(); - } - - public String getPublicId() { - return location == null ? "" : location.getPublicId(); - } - - public String getSystemId() { - return location == null ? "" : location.getSystemId(); - } - } -} \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java deleted file mode 100644 index 4dd00c075d..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/JavaMetaData.java +++ /dev/null @@ -1,85 +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.util.metadata; - - -/** - * - * A representation of the model object 'Java Meta Data'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface Factory Interface}
      • - *
      • {@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface Type Interface}
      • - *
      - *

      - * - * @generated - */ -public interface JavaMetaData -{ - /** - * 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 \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java deleted file mode 100644 index e2c33713d3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/MetadataFactory.java +++ /dev/null @@ -1,73 +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.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.eINSTANCE; - - /** - * 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/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.java deleted file mode 100644 index 7cbeeda682..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/SDOMetaDataGroup.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.util.metadata; - -import java.util.List; - -import commonj.sdo.helper.TypeHelper; - -/** - * - * 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}
      • - *
      - *

      - * - * @generated - */ -public interface SDOMetaDataGroup -{ - /** - * 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(); - - void register(TypeHelper scope); - void register(TypeHelper scope, ClassLoader classLoader); - -} // SDOMetaDataGroup \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java deleted file mode 100644 index bc311015ec..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/TypeMetaData.java +++ /dev/null @@ -1,60 +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.util.metadata; - - -/** - * - * A representation of the model object 'Type Meta Data'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation Location}
      • - *
      - *

      - * - * @generated - */ -public interface TypeMetaData -{ - /** - * 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 \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java deleted file mode 100644 index dc004a8f5e..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/XSDMetaData.java +++ /dev/null @@ -1,60 +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.util.metadata; - - -/** - * - * A representation of the model object 'XSD Meta Data'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation Location}
      • - *
      - *

      - * - * @generated - */ -public interface XSDMetaData -{ - /** - * 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 \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java deleted file mode 100644 index b36d7fa8f9..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/JavaMetaDataImpl.java +++ /dev/null @@ -1,241 +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.util.metadata.impl; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; - -import org.apache.tuscany.sdo.util.metadata.JavaMetaData; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Java Meta Data'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl#getFactoryInterface Factory Interface}
      • - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl#getTypeInterface Type Interface}
      • - *
      - *

      - * - * @generated - */ -public class JavaMetaDataImpl extends DataObjectImpl implements JavaMetaData -{ - /** - * The default value of the '{@link #getFactoryInterface() Factory Interface}' attribute. - * - * - * @see #getFactoryInterface() - * @generated - * @ordered - */ - protected static final String FACTORY_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getFactoryInterface() Factory Interface}' attribute. - * - * - * @see #getFactoryInterface() - * @generated - * @ordered - */ - protected String factoryInterface = FACTORY_INTERFACE_EDEFAULT; - - /** - * The default value of the '{@link #getTypeInterface() Type Interface}' attribute. - * - * - * @see #getTypeInterface() - * @generated - * @ordered - */ - protected static final String TYPE_INTERFACE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTypeInterface() Type Interface}' attribute. - * - * - * @see #getTypeInterface() - * @generated - * @ordered - */ - protected String typeInterface = TYPE_INTERFACE_EDEFAULT; - - /** - * - * - * @generated - */ - protected JavaMetaDataImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return MetadataPackageImpl.Literals.JAVA_META_DATA; - } - - /** - * - * - * @generated - */ - public String getFactoryInterface() - { - return factoryInterface; - } - - /** - * - * - * @generated - */ - public void setFactoryInterface(String newFactoryInterface) - { - String oldFactoryInterface = factoryInterface; - factoryInterface = newFactoryInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MetadataPackageImpl.JAVA_META_DATA__FACTORY_INTERFACE, oldFactoryInterface, factoryInterface)); - } - - /** - * - * - * @generated - */ - public String getTypeInterface() - { - return typeInterface; - } - - /** - * - * - * @generated - */ - public void setTypeInterface(String newTypeInterface) - { - String oldTypeInterface = typeInterface; - typeInterface = newTypeInterface; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MetadataPackageImpl.JAVA_META_DATA__TYPE_INTERFACE, oldTypeInterface, typeInterface)); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MetadataPackageImpl.JAVA_META_DATA__FACTORY_INTERFACE: - return getFactoryInterface(); - case MetadataPackageImpl.JAVA_META_DATA__TYPE_INTERFACE: - return getTypeInterface(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MetadataPackageImpl.JAVA_META_DATA__FACTORY_INTERFACE: - setFactoryInterface((String)newValue); - return; - case MetadataPackageImpl.JAVA_META_DATA__TYPE_INTERFACE: - setTypeInterface((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.JAVA_META_DATA__FACTORY_INTERFACE: - setFactoryInterface(FACTORY_INTERFACE_EDEFAULT); - return; - case MetadataPackageImpl.JAVA_META_DATA__TYPE_INTERFACE: - setTypeInterface(TYPE_INTERFACE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.JAVA_META_DATA__FACTORY_INTERFACE: - return FACTORY_INTERFACE_EDEFAULT == null ? factoryInterface != null : !FACTORY_INTERFACE_EDEFAULT.equals(factoryInterface); - case MetadataPackageImpl.JAVA_META_DATA__TYPE_INTERFACE: - return TYPE_INTERFACE_EDEFAULT == null ? typeInterface != null : !TYPE_INTERFACE_EDEFAULT.equals(typeInterface); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (factoryInterface: "); - result.append(factoryInterface); - result.append(", typeInterface: "); - result.append(typeInterface); - result.append(')'); - return result.toString(); - } - -} //JavaMetaDataImpl \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java deleted file mode 100644 index e0e24fc9c2..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataFactoryImpl.java +++ /dev/null @@ -1,174 +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.util.metadata.impl; - -import org.apache.tuscany.sdo.util.metadata.*; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class MetadataFactoryImpl extends EFactoryImpl implements MetadataFactory -{ - /** - * The singleton instance of the factory. - * - * - * @generated - */ - public static final MetadataFactoryImpl eINSTANCE = init(); - - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static MetadataFactoryImpl init() - { - try - { - MetadataFactoryImpl theMetadataFactory = (MetadataFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("org.apache.tuscany.sdo/metadata"); - if (theMetadataFactory != null) - { - return theMetadataFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new MetadataFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public MetadataFactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case MetadataPackageImpl.DOCUMENT_ROOT: return (EObject)createDocumentRoot(); - case MetadataPackageImpl.JAVA_META_DATA: return (EObject)createJavaMetaData(); - case MetadataPackageImpl.SDO_META_DATA_GROUP: return (EObject)createSDOMetaDataGroup(); - case MetadataPackageImpl.TYPE_META_DATA: return (EObject)createTypeMetaData(); - case MetadataPackageImpl.XSD_META_DATA: return (EObject)createXSDMetaData(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public EObject createDocumentRoot() - { - EObject documentRoot = super.create(MetadataPackageImpl.Literals.DOCUMENT_ROOT); - return documentRoot; - } - - /** - * - * - * @generated - */ - public JavaMetaData createJavaMetaData() - { - JavaMetaDataImpl javaMetaData = new JavaMetaDataImpl(); - return javaMetaData; - } - - /** - * - * - * @generated - */ - public SDOMetaDataGroup createSDOMetaDataGroup() - { - SDOMetaDataGroupImpl sdoMetaDataGroup = new SDOMetaDataGroupImpl(); - return sdoMetaDataGroup; - } - - /** - * - * - * @generated - */ - public TypeMetaData createTypeMetaData() - { - TypeMetaDataImpl typeMetaData = new TypeMetaDataImpl(); - return typeMetaData; - } - - /** - * - * - * @generated - */ - public XSDMetaData createXSDMetaData() - { - XSDMetaDataImpl xsdMetaData = new XSDMetaDataImpl(); - return xsdMetaData; - } - - /** - * - * - * @generated - */ - public MetadataPackageImpl getMetadataPackageImpl() - { - return (MetadataPackageImpl)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static MetadataPackageImpl getPackage() - { - return MetadataPackageImpl.eINSTANCE; - } - -} //MetadataFactoryImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataPackageImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataPackageImpl.java deleted file mode 100644 index df1404ddd9..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/MetadataPackageImpl.java +++ /dev/null @@ -1,1015 +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.util.metadata.impl; - -import org.apache.tuscany.sdo.impl.SDOPackageImpl; - -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; - -import org.apache.tuscany.sdo.util.metadata.JavaMetaData; -import org.apache.tuscany.sdo.util.metadata.MetadataFactory; -import org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup; -import org.apache.tuscany.sdo.util.metadata.TypeMetaData; -import org.apache.tuscany.sdo.util.metadata.XSDMetaData; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -/** - * - * 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.util.metadata.MetadataFactory - * @generated - */ -public class MetadataPackageImpl extends EPackageImpl -{ - /** - * The package name. - * - * - * @generated - */ - public static final String eNAME = "metadata"; - - /** - * The package namespace URI. - * - * - * @generated - */ - public static final String eNS_URI = "org.apache.tuscany.sdo/metadata"; - - /** - * The package namespace name. - * - * - * @generated - */ - public static final String eNS_PREFIX = "metadata"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - public static final MetadataPackageImpl eINSTANCE = org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl.init(); - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.util.metadata.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getDocumentRoot() - * @generated - */ - public static final int DOCUMENT_ROOT = 0; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__MIXED = 0; - - /** - * The feature id for the 'XMLNS Prefix Map' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; - - /** - * The feature id for the 'XSI Schema Location' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; - - /** - * The feature id for the 'Sdo Meta Data Group' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__SDO_META_DATA_GROUP = 3; - - /** - * The number of structural features of the 'Document Root' class. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl Java Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getJavaMetaData() - * @generated - */ - public static final int JAVA_META_DATA = 1; - - /** - * The feature id for the 'Factory Interface' attribute. - * - * - * @generated - * @ordered - */ - public static final int JAVA_META_DATA__FACTORY_INTERFACE = 0; - - /** - * The feature id for the 'Type Interface' attribute. - * - * - * @generated - * @ordered - */ - public static final int JAVA_META_DATA__TYPE_INTERFACE = 1; - - /** - * The number of structural features of the 'Java Meta Data' class. - * - * - * @generated - * @ordered - */ - public static final int JAVA_META_DATA_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl SDO Meta Data Group}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getSDOMetaDataGroup() - * @generated - */ - public static final int SDO_META_DATA_GROUP = 2; - - /** - * The feature id for the 'Java Meta Data' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int SDO_META_DATA_GROUP__JAVA_META_DATA = 0; - - /** - * The feature id for the 'Xsd Meta Data' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int SDO_META_DATA_GROUP__XSD_META_DATA = 1; - - /** - * The feature id for the 'Type Meta Data' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int SDO_META_DATA_GROUP__TYPE_META_DATA = 2; - - /** - * The number of structural features of the 'SDO Meta Data Group' class. - * - * - * @generated - * @ordered - */ - public static final int SDO_META_DATA_GROUP_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl Type Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getTypeMetaData() - * @generated - */ - public static final int TYPE_META_DATA = 3; - - /** - * The feature id for the 'Location' attribute. - * - * - * @generated - * @ordered - */ - public static final int TYPE_META_DATA__LOCATION = 0; - - /** - * The number of structural features of the 'Type Meta Data' class. - * - * - * @generated - * @ordered - */ - public static final int TYPE_META_DATA_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl XSD Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getXSDMetaData() - * @generated - */ - public static final int XSD_META_DATA = 4; - - /** - * The feature id for the 'Location' attribute. - * - * - * @generated - * @ordered - */ - public static final int XSD_META_DATA__LOCATION = 0; - - /** - * The number of structural features of the 'XSD Meta Data' class. - * - * - * @generated - * @ordered - */ - public static final int XSD_META_DATA_FEATURE_COUNT = 1; - - /** - * - * - * @generated - */ - private EClass documentRootEClass = null; - - /** - * - * - * @generated - */ - private EClass javaMetaDataEClass = null; - - /** - * - * - * @generated - */ - private EClass sdoMetaDataGroupEClass = null; - - /** - * - * - * @generated - */ - private EClass typeMetaDataEClass = null; - - /** - * - * - * @generated - */ - private EClass xsdMetaDataEClass = 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.util.metadata.impl.MetadataPackageImpl#eNS_URI - * @see #init() - * @generated - */ - private MetadataPackageImpl() - { - super(eNS_URI, ((EFactory)MetadataFactory.INSTANCE)); - } - - /** - * - * - * @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. - *

      Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static MetadataPackageImpl init() - { - if (isInited) return (MetadataPackageImpl)EPackage.Registry.INSTANCE.getEPackage(MetadataPackageImpl.eNS_URI); - - // Obtain or create and register package - MetadataPackageImpl theMetadataPackageImpl = (MetadataPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof MetadataPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new MetadataPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - SDOPackageImpl.eINSTANCE.eClass(); - ModelPackageImpl.eINSTANCE.eClass(); - - // Create package meta-data objects - theMetadataPackageImpl.createPackageContents(); - - // Initialize created meta-data - theMetadataPackageImpl.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theMetadataPackageImpl.freeze(); - - return theMetadataPackageImpl; - } - - - /** - * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. - * - * - * @return the meta object for class 'Document Root'. - * @see org.eclipse.emf.ecore.EObject - * @generated - */ - public EClass getDocumentRoot() - { - return documentRootEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. - * - * - * @return the meta object for the attribute list 'Mixed'. - * @see org.eclipse.emf.ecore.EObject#getMixed() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Mixed() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. - * - * - * @return the meta object for the map 'XMLNS Prefix Map'. - * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XMLNSPrefixMap() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. - * - * - * @return the meta object for the map 'XSI Schema Location'. - * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XSISchemaLocation() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getSdoMetaDataGroup Sdo Meta Data Group}'. - * - * - * @return the meta object for the containment reference 'Sdo Meta Data Group'. - * @see org.eclipse.emf.ecore.EObject#getSdoMetaDataGroup() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_SdoMetaDataGroup() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData Java Meta Data}'. - * - * - * @return the meta object for class 'Java Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData - * @generated - */ - public EClass getJavaMetaData() - { - return javaMetaDataEClass; - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface Factory Interface}'. - * - * - * @return the meta object for the attribute 'Factory Interface'. - * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface() - * @see #getJavaMetaData() - * @generated - */ - public EAttribute getJavaMetaData_FactoryInterface() - { - return (EAttribute)javaMetaDataEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface Type Interface}'. - * - * - * @return the meta object for the attribute 'Type Interface'. - * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface() - * @see #getJavaMetaData() - * @generated - */ - public EAttribute getJavaMetaData_TypeInterface() - { - return (EAttribute)javaMetaDataEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup SDO Meta Data Group}'. - * - * - * @return the meta object for class 'SDO Meta Data Group'. - * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup - * @generated - */ - public EClass getSDOMetaDataGroup() - { - return sdoMetaDataGroupEClass; - } - - /** - * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData Java Meta Data}'. - * - * - * @return the meta object for the containment reference list 'Java Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData() - * @see #getSDOMetaDataGroup() - * @generated - */ - public EReference getSDOMetaDataGroup_JavaMetaData() - { - return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData Xsd Meta Data}'. - * - * - * @return the meta object for the containment reference list 'Xsd Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData() - * @see #getSDOMetaDataGroup() - * @generated - */ - public EReference getSDOMetaDataGroup_XsdMetaData() - { - return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData Type Meta Data}'. - * - * - * @return the meta object for the containment reference list 'Type Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData() - * @see #getSDOMetaDataGroup() - * @generated - */ - public EReference getSDOMetaDataGroup_TypeMetaData() - { - return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData Type Meta Data}'. - * - * - * @return the meta object for class 'Type Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.TypeMetaData - * @generated - */ - public EClass getTypeMetaData() - { - return typeMetaDataEClass; - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation Location}'. - * - * - * @return the meta object for the attribute 'Location'. - * @see org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation() - * @see #getTypeMetaData() - * @generated - */ - public EAttribute getTypeMetaData_Location() - { - return (EAttribute)typeMetaDataEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData XSD Meta Data}'. - * - * - * @return the meta object for class 'XSD Meta Data'. - * @see org.apache.tuscany.sdo.util.metadata.XSDMetaData - * @generated - */ - public EClass getXSDMetaData() - { - return xsdMetaDataEClass; - } - - /** - * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation Location}'. - * - * - * @return the meta object for the attribute 'Location'. - * @see org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation() - * @see #getXSDMetaData() - * @generated - */ - public EAttribute getXSDMetaData_Location() - { - return (EAttribute)xsdMetaDataEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - public MetadataFactory getMetadataFactory() - { - return (MetadataFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - documentRootEClass = createEClass(DOCUMENT_ROOT); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); - createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - createEReference(documentRootEClass, DOCUMENT_ROOT__SDO_META_DATA_GROUP); - - javaMetaDataEClass = createEClass(JAVA_META_DATA); - createEAttribute(javaMetaDataEClass, JAVA_META_DATA__FACTORY_INTERFACE); - createEAttribute(javaMetaDataEClass, JAVA_META_DATA__TYPE_INTERFACE); - - sdoMetaDataGroupEClass = createEClass(SDO_META_DATA_GROUP); - createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__JAVA_META_DATA); - createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__XSD_META_DATA); - createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__TYPE_META_DATA); - - typeMetaDataEClass = createEClass(TYPE_META_DATA); - createEAttribute(typeMetaDataEClass, TYPE_META_DATA__LOCATION); - - xsdMetaDataEClass = createEClass(XSD_META_DATA); - createEAttribute(xsdMetaDataEClass, XSD_META_DATA__LOCATION); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - ModelPackageImpl theModelPackageImpl = (ModelPackageImpl)EPackage.Registry.INSTANCE.getEPackage(ModelPackageImpl.eNS_URI); - - // Add supertypes to classes - - // Initialize classes and features; add operations and parameters - initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDocumentRoot_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(getDocumentRoot_XMLNSPrefixMap(), 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(getDocumentRoot_XSISchemaLocation(), 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); - initEReference(getDocumentRoot_SdoMetaDataGroup(), this.getSDOMetaDataGroup(), null, "sdoMetaDataGroup", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - - initEClass(javaMetaDataEClass, JavaMetaData.class, "JavaMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getJavaMetaData_FactoryInterface(), theModelPackageImpl.getString(), "factoryInterface", null, 0, 1, JavaMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getJavaMetaData_TypeInterface(), theModelPackageImpl.getString(), "typeInterface", null, 0, 1, JavaMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(sdoMetaDataGroupEClass, SDOMetaDataGroup.class, "SDOMetaDataGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getSDOMetaDataGroup_JavaMetaData(), this.getJavaMetaData(), null, "javaMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSDOMetaDataGroup_XsdMetaData(), this.getXSDMetaData(), null, "xsdMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSDOMetaDataGroup_TypeMetaData(), this.getTypeMetaData(), null, "typeMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(typeMetaDataEClass, TypeMetaData.class, "TypeMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getTypeMetaData_Location(), theModelPackageImpl.getString(), "location", null, 1, 1, TypeMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(xsdMetaDataEClass, XSDMetaData.class, "XSDMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getXSDMetaData_Location(), theModelPackageImpl.getString(), "location", null, 1, 1, XSDMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() - { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (documentRootEClass, - source, - new String[] - { - "name", "", - "kind", "mixed" - }); - addAnnotation - (getDocumentRoot_Mixed(), - source, - new String[] - { - "kind", "elementWildcard", - "name", ":mixed" - }); - addAnnotation - (getDocumentRoot_XMLNSPrefixMap(), - source, - new String[] - { - "kind", "attribute", - "name", "xmlns:prefix" - }); - addAnnotation - (getDocumentRoot_XSISchemaLocation(), - source, - new String[] - { - "kind", "attribute", - "name", "xsi:schemaLocation" - }); - addAnnotation - (getDocumentRoot_SdoMetaDataGroup(), - source, - new String[] - { - "kind", "element", - "name", "sdoMetaDataGroup", - "namespace", "##targetNamespace" - }); - addAnnotation - (javaMetaDataEClass, - source, - new String[] - { - "name", "JavaMetaData", - "kind", "empty" - }); - addAnnotation - (getJavaMetaData_FactoryInterface(), - source, - new String[] - { - "kind", "attribute", - "name", "factoryInterface" - }); - addAnnotation - (getJavaMetaData_TypeInterface(), - source, - new String[] - { - "kind", "attribute", - "name", "typeInterface" - }); - addAnnotation - (sdoMetaDataGroupEClass, - source, - new String[] - { - "name", "SDOMetaDataGroup", - "kind", "elementOnly" - }); - addAnnotation - (getSDOMetaDataGroup_JavaMetaData(), - source, - new String[] - { - "kind", "element", - "name", "javaMetaData" - }); - addAnnotation - (getSDOMetaDataGroup_XsdMetaData(), - source, - new String[] - { - "kind", "element", - "name", "xsdMetaData" - }); - addAnnotation - (getSDOMetaDataGroup_TypeMetaData(), - source, - new String[] - { - "kind", "element", - "name", "typeMetaData" - }); - addAnnotation - (typeMetaDataEClass, - source, - new String[] - { - "name", "TypeMetaData", - "kind", "empty" - }); - addAnnotation - (getTypeMetaData_Location(), - source, - new String[] - { - "kind", "attribute", - "name", "location" - }); - addAnnotation - (xsdMetaDataEClass, - source, - new String[] - { - "name", "XSDMetaData", - "kind", "empty" - }); - addAnnotation - (getXSDMetaData_Location(), - source, - new String[] - { - "kind", "attribute", - "name", "location" - }); - } - - /** - * - * Defines literals for the meta objects that represent - *

        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @generated - */ - public interface Literals - { - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.util.metadata.impl.DocumentRootImpl Document Root}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.DocumentRootImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getDocumentRoot() - * @generated - */ - public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); - - /** - * The meta object literal for the 'Mixed' attribute list feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); - - /** - * The meta object literal for the 'XMLNS Prefix Map' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); - - /** - * The meta object literal for the 'XSI Schema Location' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); - - /** - * The meta object literal for the 'Sdo Meta Data Group' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__SDO_META_DATA_GROUP = eINSTANCE.getDocumentRoot_SdoMetaDataGroup(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl Java Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.JavaMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getJavaMetaData() - * @generated - */ - public static final EClass JAVA_META_DATA = eINSTANCE.getJavaMetaData(); - - /** - * The meta object literal for the 'Factory Interface' attribute feature. - * - * - * @generated - */ - public static final EAttribute JAVA_META_DATA__FACTORY_INTERFACE = eINSTANCE.getJavaMetaData_FactoryInterface(); - - /** - * The meta object literal for the 'Type Interface' attribute feature. - * - * - * @generated - */ - public static final EAttribute JAVA_META_DATA__TYPE_INTERFACE = eINSTANCE.getJavaMetaData_TypeInterface(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl SDO Meta Data Group}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getSDOMetaDataGroup() - * @generated - */ - public static final EClass SDO_META_DATA_GROUP = eINSTANCE.getSDOMetaDataGroup(); - - /** - * The meta object literal for the 'Java Meta Data' containment reference list feature. - * - * - * @generated - */ - public static final EReference SDO_META_DATA_GROUP__JAVA_META_DATA = eINSTANCE.getSDOMetaDataGroup_JavaMetaData(); - - /** - * The meta object literal for the 'Xsd Meta Data' containment reference list feature. - * - * - * @generated - */ - public static final EReference SDO_META_DATA_GROUP__XSD_META_DATA = eINSTANCE.getSDOMetaDataGroup_XsdMetaData(); - - /** - * The meta object literal for the 'Type Meta Data' containment reference list feature. - * - * - * @generated - */ - public static final EReference SDO_META_DATA_GROUP__TYPE_META_DATA = eINSTANCE.getSDOMetaDataGroup_TypeMetaData(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl Type Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getTypeMetaData() - * @generated - */ - public static final EClass TYPE_META_DATA = eINSTANCE.getTypeMetaData(); - - /** - * The meta object literal for the 'Location' attribute feature. - * - * - * @generated - */ - public static final EAttribute TYPE_META_DATA__LOCATION = eINSTANCE.getTypeMetaData_Location(); - - /** - * The meta object literal for the '{@link org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl XSD Meta Data}' class. - * - * - * @see org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl - * @see org.apache.tuscany.sdo.util.metadata.impl.MetadataPackageImpl#getXSDMetaData() - * @generated - */ - public static final EClass XSD_META_DATA = eINSTANCE.getXSDMetaData(); - - /** - * The meta object literal for the 'Location' attribute feature. - * - * - * @generated - */ - public static final EAttribute XSD_META_DATA__LOCATION = eINSTANCE.getXSDMetaData_Location(); - - } - -} //MetadataPackageImpl diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java deleted file mode 100644 index 5a668bb306..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/SDOMetaDataGroupImpl.java +++ /dev/null @@ -1,323 +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.util.metadata.impl; - -import java.io.InputStream; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; -import org.apache.tuscany.sdo.model.Types; -import org.apache.tuscany.sdo.util.SDOUtil; -import org.apache.tuscany.sdo.util.metadata.JavaMetaData; -import org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup; -import org.apache.tuscany.sdo.util.metadata.TypeMetaData; -import org.apache.tuscany.sdo.util.metadata.XSDMetaData; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import commonj.sdo.helper.TypeHelper; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.helper.XMLHelper; -import commonj.sdo.helper.XSDHelper; - -/** - * - * An implementation of the model object 'SDO Meta Data Group'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getJavaMetaData Java Meta Data}
      • - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getXsdMetaData Xsd Meta Data}
      • - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.SDOMetaDataGroupImpl#getTypeMetaData Type Meta Data}
      • - *
      - *

      - * - * @generated - */ -public class SDOMetaDataGroupImpl extends DataObjectImpl implements SDOMetaDataGroup -{ - public void register(TypeHelper typeHelper) - { - try - { - ClassLoader classLoader = (ClassLoader)AccessController.doPrivileged(new PrivilegedAction() - { - public Object run() - { - return Thread.currentThread().getContextClassLoader(); - } - }); - register(typeHelper, classLoader); - } - catch (SecurityException e) - { - } - } - - public void register(TypeHelper typeHelper, ClassLoader classLoader) - { - try - { - for (Iterator iter = getJavaMetaData().iterator(); iter.hasNext();) - { - JavaMetaData metadata = (JavaMetaData)iter.next(); - String factoryInterface = metadata.getFactoryInterface(); - if (factoryInterface != null) - { - Class factoryInterfaceClass = classLoader.loadClass(factoryInterface); - SDOUtil.registerStaticTypes(factoryInterfaceClass); - } - else - { - String typeInterface = metadata.getTypeInterface(); - Class typeInterfaceClass = classLoader.loadClass(typeInterface); - // TODO: introspect and register the type - } - } - - XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper); - for (Iterator iter = getXsdMetaData().iterator(); iter.hasNext();) - { - XSDMetaData metadata = (XSDMetaData)iter.next(); - URL url = getClass().getResource(metadata.getLocation()); - InputStream inputStream = url.openStream(); - xsdHelper.define(inputStream, url.toString()); - } - - XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper); - for (Iterator iter = getTypeMetaData().iterator(); iter.hasNext();) - { - TypeMetaData metadata = (TypeMetaData)iter.next(); - URL url = getClass().getResource(metadata.getLocation()); - InputStream inputStream = url.openStream(); - XMLDocument xmlDocument = xmlHelper.load(inputStream); - Types types = (Types)xmlDocument.getRootObject(); - typeHelper.define(types.getTypeList()); - } - } - catch (Exception e) - { - } - } - - /** - * The cached value of the '{@link #getJavaMetaData() Java Meta Data}' containment reference list. - * - * - * @see #getJavaMetaData() - * @generated - * @ordered - */ - protected EList javaMetaData = null; - - /** - * The cached value of the '{@link #getXsdMetaData() Xsd Meta Data}' containment reference list. - * - * - * @see #getXsdMetaData() - * @generated - * @ordered - */ - protected EList xsdMetaData = null; - - /** - * The cached value of the '{@link #getTypeMetaData() Type Meta Data}' containment reference list. - * - * - * @see #getTypeMetaData() - * @generated - * @ordered - */ - protected EList typeMetaData = null; - - /** - * - * - * @generated - */ - protected SDOMetaDataGroupImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return MetadataPackageImpl.Literals.SDO_META_DATA_GROUP; - } - - /** - * - * - * @generated - */ - public List getJavaMetaData() - { - if (javaMetaData == null) - { - javaMetaData = new EObjectContainmentEList(JavaMetaData.class, this, MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA); - } - return javaMetaData; - } - - /** - * - * - * @generated - */ - public List getXsdMetaData() - { - if (xsdMetaData == null) - { - xsdMetaData = new EObjectContainmentEList(XSDMetaData.class, this, MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA); - } - return xsdMetaData; - } - - /** - * - * - * @generated - */ - public List getTypeMetaData() - { - if (typeMetaData == null) - { - typeMetaData = new EObjectContainmentEList(TypeMetaData.class, this, MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA); - } - return typeMetaData; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA: - return ((InternalEList)getJavaMetaData()).basicRemove(otherEnd, msgs); - case MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA: - return ((InternalEList)getXsdMetaData()).basicRemove(otherEnd, msgs); - case MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA: - return ((InternalEList)getTypeMetaData()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA: - return getJavaMetaData(); - case MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA: - return getXsdMetaData(); - case MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA: - return getTypeMetaData(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA: - getJavaMetaData().clear(); - getJavaMetaData().addAll((Collection)newValue); - return; - case MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA: - getXsdMetaData().clear(); - getXsdMetaData().addAll((Collection)newValue); - return; - case MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA: - getTypeMetaData().clear(); - getTypeMetaData().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA: - getJavaMetaData().clear(); - return; - case MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA: - getXsdMetaData().clear(); - return; - case MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA: - getTypeMetaData().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.SDO_META_DATA_GROUP__JAVA_META_DATA: - return javaMetaData != null && !javaMetaData.isEmpty(); - case MetadataPackageImpl.SDO_META_DATA_GROUP__XSD_META_DATA: - return xsdMetaData != null && !xsdMetaData.isEmpty(); - case MetadataPackageImpl.SDO_META_DATA_GROUP__TYPE_META_DATA: - return typeMetaData != null && !typeMetaData.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //SDOMetaDataGroupImpl \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java deleted file mode 100644 index a147b12053..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/TypeMetaDataImpl.java +++ /dev/null @@ -1,185 +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.util.metadata.impl; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; - -import org.apache.tuscany.sdo.util.metadata.TypeMetaData; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'Type Meta Data'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.TypeMetaDataImpl#getLocation Location}
      • - *
      - *

      - * - * @generated - */ -public class TypeMetaDataImpl extends DataObjectImpl implements TypeMetaData -{ - /** - * The default value of the '{@link #getLocation() Location}' attribute. - * - * - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocation() Location}' attribute. - * - * - * @see #getLocation() - * @generated - * @ordered - */ - protected String location = LOCATION_EDEFAULT; - - /** - * - * - * @generated - */ - protected TypeMetaDataImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return MetadataPackageImpl.Literals.TYPE_META_DATA; - } - - /** - * - * - * @generated - */ - public String getLocation() - { - return location; - } - - /** - * - * - * @generated - */ - public void setLocation(String newLocation) - { - String oldLocation = location; - location = newLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MetadataPackageImpl.TYPE_META_DATA__LOCATION, oldLocation, location)); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MetadataPackageImpl.TYPE_META_DATA__LOCATION: - return getLocation(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MetadataPackageImpl.TYPE_META_DATA__LOCATION: - setLocation((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.TYPE_META_DATA__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.TYPE_META_DATA__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (location: "); - result.append(location); - result.append(')'); - return result.toString(); - } - -} //TypeMetaDataImpl \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java deleted file mode 100644 index 1bfdc9d465..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/metadata/impl/XSDMetaDataImpl.java +++ /dev/null @@ -1,185 +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.util.metadata.impl; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; - -import org.apache.tuscany.sdo.util.metadata.XSDMetaData; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * - * An implementation of the model object 'XSD Meta Data'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link org.apache.tuscany.sdo.util.metadata.impl.XSDMetaDataImpl#getLocation Location}
      • - *
      - *

      - * - * @generated - */ -public class XSDMetaDataImpl extends DataObjectImpl implements XSDMetaData -{ - /** - * The default value of the '{@link #getLocation() Location}' attribute. - * - * - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocation() Location}' attribute. - * - * - * @see #getLocation() - * @generated - * @ordered - */ - protected String location = LOCATION_EDEFAULT; - - /** - * - * - * @generated - */ - protected XSDMetaDataImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return MetadataPackageImpl.Literals.XSD_META_DATA; - } - - /** - * - * - * @generated - */ - public String getLocation() - { - return location; - } - - /** - * - * - * @generated - */ - public void setLocation(String newLocation) - { - String oldLocation = location; - location = newLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, MetadataPackageImpl.XSD_META_DATA__LOCATION, oldLocation, location)); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case MetadataPackageImpl.XSD_META_DATA__LOCATION: - return getLocation(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case MetadataPackageImpl.XSD_META_DATA__LOCATION: - setLocation((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.XSD_META_DATA__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case MetadataPackageImpl.XSD_META_DATA__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (location: "); - result.append(location); - result.append(')'); - return result.toString(); - } - -} //XSDMetaDataImpl \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/DataObjectXMLStreamReader.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/DataObjectXMLStreamReader.java deleted file mode 100644 index 595218791f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/DataObjectXMLStreamReader.java +++ /dev/null @@ -1,1500 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.sdo.util.resource; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.xml.namespace.NamespaceContext; -import javax.xml.namespace.QName; -import javax.xml.stream.Location; -import javax.xml.stream.XMLStreamException; - -import org.apache.tuscany.sdo.impl.AttributeImpl; -import org.apache.tuscany.sdo.impl.ReferenceImpl; -import org.apache.tuscany.sdo.util.SDOUtil; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EReference; - -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Sequence; -import commonj.sdo.Type; -import commonj.sdo.helper.TypeHelper; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.helper.XSDHelper; - -public class DataObjectXMLStreamReader implements XMLFragmentStreamReader { - private DataObject dataObject; - - private String rootElementURI; - - private String rootElementName; - - private TypeHelper typeHelper; - - private XSDHelper xsdHelper; - - private Map.Entry[] properties; - - private Map.Entry[] attributes; - - private QName elementQName; - - // we always create a new namespace context - private DelegatingNamespaceContext namespaceContext = new DelegatingNamespaceContext(null); - - private Map declaredNamespaceMap = new HashMap(); - - // states for this pullparser - it can only have three states - private static final int START_ELEMENT_STATE = 0; - - private static final int END_ELEMENT_STATE = 1; - - private static final int DELEGATED_STATE = 2; - - private static final int TEXT_STATE = 3; - - // integer field that keeps the state of this - // parser. - private int state = START_ELEMENT_STATE; - - // reference to the child reader - private XMLFragmentStreamReader childReader; - - // current property index - // initialized at zero - private int currentPropertyIndex = 0; - - public DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName) { - this(dataObject, rootElmentURI, rootElementName, null, null); - } - - public DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName, TypeHelper typeHelper) { - this(dataObject, rootElmentURI, rootElementName, typeHelper, null); - } - - public DataObjectXMLStreamReader(DataObject dataObject, String rootElmentURI, String rootElementName, TypeHelper typeHelper, XSDHelper xsdHelper) { - this.dataObject = dataObject; - this.rootElementURI = rootElmentURI; - this.rootElementName = rootElementName; - this.typeHelper = typeHelper == null ? TypeHelper.INSTANCE : typeHelper; - this.xsdHelper = (xsdHelper != null) ? xsdHelper : ((typeHelper == null) ? XSDHelper.INSTANCE : SDOUtil.createXSDHelper(typeHelper)); - populateProperties(); - } - - public DataObjectXMLStreamReader(XMLDocument document, TypeHelper typeHelper) { - this.dataObject = document.getRootObject(); - this.rootElementName = document.getRootElementName(); - this.rootElementURI = document.getRootElementURI(); - this.typeHelper = typeHelper; - this.xsdHelper = typeHelper == null ? XSDHelper.INSTANCE : SDOUtil.createXSDHelper(typeHelper); - populateProperties(); - } - - /* - * we need to pass in a namespace context since when delegated, we've no idea of the current namespace context. So it needs to be passed on here! - */ - protected DataObjectXMLStreamReader(QName elementQName, Map.Entry[] properties, Map.Entry[] attributes) { - // validate the lengths, since both the arrays are supposed - // to have - this.properties = properties; - this.elementQName = elementQName; - this.attributes = attributes; - - } - - private void addProperty(List propertyList, Property property, Object value) { - if (isTransient(property)) - return; - if (property.isMany() && property.getContainingType().isOpen() && value instanceof Sequence) { - addSequenceValue(propertyList, (Sequence) value); - } else if ((property.isMany() || isGlobal(property)) && value instanceof List) { - // HACK: The isGlobal() test is a HACK for JIRA 115. Properties for global XSD elements should return - // true for isMany() - addListValue(propertyList, property, (List) value); - } else { - // Complex Type - addSingleValue(propertyList, property, value); - } - } - - private void addSequenceValue(List elements, Sequence seq) { - if (seq != null && seq.size() > 0) { - for (int j = 0; j < seq.size(); j++) { - Object o = seq.getValue(j); - Property p = seq.getProperty(j); - addSingleValue(elements, p, o); - } - } - } - - private boolean isTransient(Property property) { - // HACK: We need some SDOUtil extension to understand a property is derived - if (property instanceof ReferenceImpl) { - ReferenceImpl r = (ReferenceImpl) property; - if (r.isTransient()) - return true; - EReference opposite = r.getEOpposite(); - if (opposite != null && opposite.isContainment()) { - return true; - } - } else if (property instanceof AttributeImpl) { - AttributeImpl a = (AttributeImpl) property; - if (a.isTransient()) - return true; - EDataType d = (EDataType) a.getEType(); - if (!d.isSerializable()) { - return true; - } - } - return false; - } - - private boolean isGlobal(Property property) { - String ns = xsdHelper.getNamespaceURI(property); - String name = xsdHelper.getLocalName(property); - return property == xsdHelper.getGlobalProperty(ns, name, true); - } - - private void addListValue(List propertyList, Property property, List objList) { - if (objList != null) { - for (int j = 0; j < objList.size(); j++) { - Object object = objList.get(j); - addSingleValue(propertyList, property, object); - } - } - } - - private void addSingleValue(List propertyList, Property property, Object value) { - String uri = xsdHelper.getNamespaceURI(property); - String name = xsdHelper.getLocalName(property); - QName qname = namespaceContext.createQName(uri, name); - Type propertyType = property.getType(); - - if (property.getName().equals("value") && uri == null && name.equals(":0")) { - // "value" is special property containing the value of simpleContent - Map.Entry entry = new NameValuePair(ELEMENT_TEXT, value); - propertyList.add(entry); - } else - - // FIXME: We need to deal with non-containment properties - if (value == null) { - // Creating xsi:nil="true" for elements - Map.Entry entry = new NameValuePair(qname, null); - propertyList.add(entry); - } else if (propertyType.isDataType()) { - Map.Entry entry = new NameValuePair(qname, SDOUtil.convertToString(propertyType, value)); - propertyList.add(entry); - } else { - DataObjectXMLStreamReader childReader = new DataObjectXMLStreamReader((DataObject) value, uri, name, typeHelper, xsdHelper); - Map.Entry entry = new NameValuePair(qname, childReader); - propertyList.add(entry); - } - } - - public void populateProperties() { - if (properties != null) - return; - if (elementQName == null) - elementQName = namespaceContext.createQName(this.rootElementURI, this.rootElementName); - else - elementQName = namespaceContext.createQName(elementQName.getNamespaceURI(), elementQName.getLocalPart()); - - List elementList = new ArrayList(); - List attributeList = new ArrayList(); - Type type = dataObject.getType(); - if (type.isSequenced()) { - Sequence sequence = dataObject.getSequence(); - for (int i = 0; i < sequence.size(); i++) { - Property property = sequence.getProperty(i); - Object value = sequence.getValue(i); - if (property == null) { - // property == null for text in mixed content - elementList.add(new NameValuePair(ELEMENT_TEXT, value)); - } else { - addProperty(elementList, property, value); - } - } - // Attributes are not in the sequence - List properties = dataObject.getInstanceProperties(); - for (Iterator i = properties.iterator(); i.hasNext();) { - Property property = (Property) i.next(); - if (xsdHelper.isAttribute(property)) { - // FIXME: How to handle nilable=true? - if (!dataObject.isSet(property)) - continue; - Object value = dataObject.get(property); - addProperty(attributeList, property, value); - } - } - } else { - List properties = dataObject.getInstanceProperties(); - for (Iterator i = properties.iterator(); i.hasNext();) { - Property property = (Property) i.next(); - // FIXME: How to handle nilable=true? - if (!dataObject.isSet(property)) - continue; - Object value = dataObject.get(property); - if (xsdHelper.isAttribute(property)) - addProperty(attributeList, property, value); - else - addProperty(elementList, property, value); - } - } - properties = (Map.Entry[]) elementList.toArray(new Map.Entry[0]); - attributes = (Map.Entry[]) attributeList.toArray(new Map.Entry[0]); - } - - public DataObject getDataObject() { - return dataObject; - } - - /** - * add the namespace context - */ - - public void setParentNamespaceContext(NamespaceContext nsContext) { - // register the namespace context passed in to this - this.namespaceContext.setParent(nsContext); - - } - - /** - * we need to split out the calling to the populate namespaces seperately since this needs to be done *after* setting the parent namespace - * context. We cannot assume it will happen at construction! - */ - public void init() { - // here we have an extra issue to attend to. we need to look at the - // prefixes and uris (the combination) and populate a hashmap of - // namespaces. The hashmap of namespaces will be used to serve the - // namespace context - - populateNamespaceContext(); - } - - /** - * - * @param key - * @return - * @throws IllegalArgumentException - */ - public Object getProperty(String key) throws IllegalArgumentException { - if (state == START_ELEMENT_STATE || state == END_ELEMENT_STATE) { - return null; - } else if (state == TEXT_STATE) { - return null; - } else if (state == DELEGATED_STATE) { - return childReader.getProperty(key); - } else { - return null; - } - - } - - public int next() throws XMLStreamException { - return updateStatus(); - } - - public void require(int i, String string, String string1) throws XMLStreamException { - throw new UnsupportedOperationException(); - } - - /** - * todo implement the right contract for this - * - * @return - * @throws XMLStreamException - */ - public String getElementText() throws XMLStreamException { - if (state == DELEGATED_STATE) { - return childReader.getElementText(); - } else { - return null; - } - - } - - /** - * todo implement this - * - * @return - * @throws XMLStreamException - */ - public int nextTag() throws XMLStreamException { - return 0; - } - - /** - * @return - * @throws XMLStreamException - */ - public boolean hasNext() throws XMLStreamException { - if (state == DELEGATED_STATE) { - if (childReader.isEndOfFragment()) { - // the child reader is done. We shouldn't be getting the - // hasnext result from the child pullparser then - return true; - } else { - return childReader.hasNext(); - } - } else { - return (state == START_ELEMENT_STATE || state == TEXT_STATE); - - } - } - - public void close() throws XMLStreamException { - // do nothing here - we have no resources to free - } - - public String getNamespaceURI(String prefix) { - return namespaceContext.getNamespaceURI(prefix); - } - - public boolean isStartElement() { - if (state == START_ELEMENT_STATE) { - return true; - } else if (state == END_ELEMENT_STATE) { - return false; - } - return childReader.isStartElement(); - } - - public boolean isEndElement() { - if (state == START_ELEMENT_STATE) { - return false; - } else if (state == END_ELEMENT_STATE) { - return true; - } - return childReader.isEndElement(); - } - - public boolean isCharacters() { - if (state == START_ELEMENT_STATE || state == END_ELEMENT_STATE) { - return false; - } - return childReader.isCharacters(); - } - - public boolean isWhiteSpace() { - if (state == START_ELEMENT_STATE || state == END_ELEMENT_STATE) { - return false; - } - return childReader.isWhiteSpace(); - } - - // ///////////////////////////////////////////////////////////////////////// - // / attribute handling - // ///////////////////////////////////////////////////////////////////////// - - public String getAttributeValue(String nsUri, String localName) { - - int attribCount = getAttributeCount(); - String returnValue = null; - QName attribQualifiedName; - for (int i = 0; i < attribCount; i++) { - attribQualifiedName = getAttributeName(i); - if (nsUri == null) { - if (localName.equals(attribQualifiedName.getLocalPart())) { - returnValue = getAttributeValue(i); - break; - } - } else { - if (localName.equals(attribQualifiedName.getLocalPart()) && nsUri.equals(attribQualifiedName.getNamespaceURI())) { - returnValue = getAttributeValue(i); - break; - } - } - - } - - return returnValue; - } - - public int getAttributeCount() { - return (state == DELEGATED_STATE) ? childReader.getAttributeCount() - : ((attributes != null) && (state == START_ELEMENT_STATE) ? attributes.length : 0); - } - - /** - * @param i - * @return - */ - public QName getAttributeName(int i) { - if (state == DELEGATED_STATE) { - return childReader.getAttributeName(i); - } else if (state == START_ELEMENT_STATE) { - if (attributes == null) { - return null; - } else { - if ((i >= (attributes.length)) || i < 0) { // out of range - return null; - } else { - // get the attribute pointer - Object attribPointer = attributes[i].getKey(); - // case one - attrib name is null - // this should be the pointer to the OMAttribute then - if (attribPointer instanceof String) { - return new QName((String) attribPointer); - } else if (attribPointer instanceof QName) { - return (QName) attribPointer; - } else { - return null; - } - } - } - } else { - throw new IllegalStateException();// as per the api contract - } - - } - - public String getAttributeNamespace(int i) { - if (state == DELEGATED_STATE) { - return childReader.getAttributeNamespace(i); - } else if (state == START_ELEMENT_STATE) { - QName name = getAttributeName(i); - if (name == null) { - return null; - } else { - return name.getNamespaceURI(); - } - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeLocalName(int i) { - if (state == DELEGATED_STATE) { - return childReader.getAttributeLocalName(i); - } else if (state == START_ELEMENT_STATE) { - QName name = getAttributeName(i); - if (name == null) { - return null; - } else { - return name.getLocalPart(); - } - } else { - throw new IllegalStateException(); - } - } - - public String getAttributePrefix(int i) { - if (state == DELEGATED_STATE) { - return childReader.getAttributePrefix(i); - } else if (state == START_ELEMENT_STATE) { - QName name = getAttributeName(i); - if (name == null) { - return null; - } else { - return name.getPrefix(); - } - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeType(int i) { - return null; // not supported - } - - public String getAttributeValue(int i) { - if (state == DELEGATED_STATE) { - return childReader.getAttributeValue(i); - } else if (state == START_ELEMENT_STATE) { - if (attributes == null) { - return null; - } else { - if ((i >= (attributes.length)) || i < 0) { // out of range - return null; - } else { - // get the attribute pointer - Object attribPointer = attributes[i].getKey(); - Object omAttribObj = attributes[i].getValue(); - // case one - attrib name is null - // this should be the pointer to the OMAttribute then - if (attribPointer instanceof String) { - return (String) omAttribObj; - } else if (attribPointer instanceof QName) { - return (String) omAttribObj; - } else { - return null; - } - } - } - } else { - throw new IllegalStateException(); - } - - } - - public boolean isAttributeSpecified(int i) { - return false; // not supported - } - - // ///////////////////////////////////////////////////////////////////////// - // //////////// end of attribute handling - // ///////////////////////////////////////////////////////////////////////// - - // ////////////////////////////////////////////////////////////////////////// - // //////////// namespace handling - // ////////////////////////////////////////////////////////////////////////// - - public int getNamespaceCount() { - if (state == DELEGATED_STATE) { - return childReader.getNamespaceCount(); - } else { - return declaredNamespaceMap.size(); - } - } - - /** - * @param i - * @return - */ - public String getNamespacePrefix(int i) { - if (state == DELEGATED_STATE) { - return childReader.getNamespacePrefix(i); - } else if (state != TEXT_STATE) { - // order the prefixes - String[] prefixes = makePrefixArray(); - if ((i >= prefixes.length) || (i < 0)) { - return null; - } else { - return prefixes[i]; - } - - } else { - throw new IllegalStateException(); - } - - } - - /** - * Get the prefix list from the hastable and take that into an array - * - * @return - */ - private String[] makePrefixArray() { - String[] prefixes = (String[]) declaredNamespaceMap.keySet().toArray(new String[declaredNamespaceMap.size()]); - Arrays.sort(prefixes); - return prefixes; - } - - public String getNamespaceURI(int i) { - if (state == DELEGATED_STATE) { - return childReader.getNamespaceURI(i); - } else if (state != TEXT_STATE) { - String namespacePrefix = getNamespacePrefix(i); - return namespacePrefix == null ? null : (String) declaredNamespaceMap.get(namespacePrefix); - } else { - throw new IllegalStateException(); - } - - } - - public NamespaceContext getNamespaceContext() { - if (state == DELEGATED_STATE) { - return childReader.getNamespaceContext(); - } else { - return namespaceContext; - } - - } - - // ///////////////////////////////////////////////////////////////////////// - // /////// end of namespace handling - // ///////////////////////////////////////////////////////////////////////// - - public int getEventType() { - if (state == START_ELEMENT_STATE) { - return START_ELEMENT; - } else if (state == END_ELEMENT_STATE) { - return END_ELEMENT; - } else { // this is the delegated state - return childReader.getEventType(); - } - - } - - public String getText() { - if (state == DELEGATED_STATE) { - return childReader.getText(); - } else if (state == TEXT_STATE) { - return (String) properties[currentPropertyIndex - 1].getValue(); - } else { - throw new IllegalStateException(); - } - } - - public char[] getTextCharacters() { - if (state == DELEGATED_STATE) { - return childReader.getTextCharacters(); - } else if (state == TEXT_STATE) { - return properties[currentPropertyIndex - 1].getValue() == null ? new char[0] : ((String) properties[currentPropertyIndex - 1].getValue()) - .toCharArray(); - } else { - throw new IllegalStateException(); - } - } - - public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException { - if (state == DELEGATED_STATE) { - return childReader.getTextCharacters(i, chars, i1, i2); - } else if (state == TEXT_STATE) { - // todo - implement this - return 0; - } else { - throw new IllegalStateException(); - } - } - - public int getTextStart() { - if (state == DELEGATED_STATE) { - return childReader.getTextStart(); - } else if (state == TEXT_STATE) { - return 0;// assume text always starts at 0 - } else { - throw new IllegalStateException(); - } - } - - public int getTextLength() { - if (state == DELEGATED_STATE) { - return childReader.getTextLength(); - } else if (state == TEXT_STATE) { - return 0;// assume text always starts at 0 - } else { - throw new IllegalStateException(); - } - } - - public String getEncoding() { - if (state == DELEGATED_STATE) { - return childReader.getEncoding(); - } else { - // we've no idea what the encoding is going to be in this case - // perhaps we ought to return some constant here, which the user might - // have access to change! - return null; - } - } - - /** - * check the validity of this implementation - * - * @return - */ - public boolean hasText() { - if (state == DELEGATED_STATE) { - return childReader.hasText(); - } else if (state == TEXT_STATE) { - return true; - } else { - return false; - } - - } - - /** - * @return - */ - public Location getLocation() { - // return a default location - return new Location() { - public int getLineNumber() { - return 0; - } - - public int getColumnNumber() { - return 0; - } - - public int getCharacterOffset() { - return 0; - } - - public String getPublicId() { - return null; - } - - public String getSystemId() { - return null; - } - }; - } - - public QName getName() { - if (state == DELEGATED_STATE) { - return childReader.getName(); - } else if (state != TEXT_STATE) { - return elementQName; - } else { - throw new IllegalStateException(); - } - - } - - public String getLocalName() { - if (state == DELEGATED_STATE) { - return childReader.getLocalName(); - } else if (state != TEXT_STATE) { - return elementQName.getLocalPart(); - } else { - throw new IllegalStateException(); - } - } - - public boolean hasName() { - // since this parser always has a name, the hasname - // has to return true if we are still navigating this element - // if not we should ask the child reader for it. - if (state == DELEGATED_STATE) { - return childReader.hasName(); - } else if (state != TEXT_STATE) { - return true; - } else { - return false; - } - } - - public String getNamespaceURI() { - if (state == DELEGATED_STATE) { - return childReader.getNamespaceURI(); - } else if (state == TEXT_STATE) { - return null; - } else { - return elementQName.getNamespaceURI(); - } - } - - public String getPrefix() { - if (state == DELEGATED_STATE) { - return childReader.getPrefix(); - } else if (state == TEXT_STATE) { - return null; - } else { - return elementQName.getPrefix(); - } - } - - public String getVersion() { - return null; - } - - public boolean isStandalone() { - return true; - } - - public boolean standaloneSet() { - return true; - } - - public String getCharacterEncodingScheme() { - return null; // todo - should we return something for this ? - } - - public String getPITarget() { - throw new UnsupportedOperationException("Yet to be implemented !!"); - } - - public String getPIData() { - throw new UnsupportedOperationException("Yet to be implemented !!"); - } - - // ///////////////////////////////////////////////////////////////////////// - // / Other utility methods - // //////////////////////////////////////////////////////////////////////// - - /** - * Populates a namespace context - */ - private void populateNamespaceContext() { - - // first add the current element namespace to the namespace context - // declare it if not found - registerNamespace(elementQName.getPrefix(), elementQName.getNamespaceURI()); - - // traverse through the attributes and populate the namespace context - // the attrib list can be of many combinations - // the valid combinations are - // String - String - // QName - QName - // null - OMAttribute - - if (attributes != null) { - for (int i = 0; i < attributes.length; i++) { // jump in two - Object attribName = attributes[i].getKey(); - if (attribName instanceof String) { - // ignore this case - Nothing to do - } else if (attribName instanceof QName) { - QName attribQName = ((QName) attribName); - registerNamespace(attribQName.getPrefix(), attribQName.getNamespaceURI()); - - } - } - } - - } - - /** - * @param prefix - * @param uri - */ - private void registerNamespace(String prefix, String uri) { - if (!uri.equals(namespaceContext.getNamespaceURI(prefix))) { - namespaceContext.registerMapping(prefix, uri); - declaredNamespaceMap.put(prefix, uri); - } - } - - /** - * By far this should be the most important method in this class this method changes the state of the parser according to the change in the - */ - private int updateStatus() throws XMLStreamException { - int returnEvent = -1; // invalid state is the default state - switch (state) { - case START_ELEMENT_STATE: - // current element is start element. We should be looking at the - // property list and making a pullparser for the property value - if (properties == null || properties.length == 0) { - // no properties - move to the end element state straightaway - state = END_ELEMENT_STATE; - returnEvent = END_ELEMENT; - } else { - // there are properties. now we should delegate this task to a - // child reader depending on the property type - returnEvent = processProperties(); - - } - break; - case END_ELEMENT_STATE: - // we've reached the end element already. If the user tries to push - // further ahead then it is an exception - throw new XMLStreamException("Trying to go beyond the end of the pullparser"); - - case DELEGATED_STATE: - if (childReader.isEndOfFragment()) { - // we've reached the end! - if (currentPropertyIndex > (properties.length - 1)) { - state = END_ELEMENT_STATE; - returnEvent = END_ELEMENT; - } else { - returnEvent = processProperties(); - } - } else { - returnEvent = childReader.next(); - } - break; - - case TEXT_STATE: - // if there are any more event we should be delegating to - // processProperties. if not we just return an end element - if (currentPropertyIndex > (properties.length - 1)) { - state = END_ELEMENT_STATE; - returnEvent = END_ELEMENT; - } else { - returnEvent = processProperties(); - } - break; - } - return returnEvent; - } - - /** - * A convenient method to reuse the properties - * - * @return event to be thrown - * @throws XMLStreamException - */ - private int processProperties() throws XMLStreamException { - // move to the next property depending on the current property - // index - Object propPointer = properties[currentPropertyIndex].getKey(); - QName propertyQName = null; - boolean textFound = false; - if (propPointer == null) { - throw new XMLStreamException("property key cannot be null!"); - } else if (propPointer instanceof String) { - // propPointer being a String has a special case - // that is it can be a the special constant ELEMENT_TEXT that - // says this text event - if (ELEMENT_TEXT.equals(propPointer)) { - textFound = true; - } else { - propertyQName = new QName((String) propPointer); - } - } else if (propPointer instanceof QName) { - propertyQName = (QName) propPointer; - } else { - // oops - we've no idea what kind of key this is - throw new XMLStreamException("unidentified property key!!!" + propPointer); - } - - // ok! we got the key. Now look at the value - Object propertyValue = properties[currentPropertyIndex].getValue(); - // cater for the special case now - if (textFound) { - // no delegation here - make the parser null and immediately - // return with the event characters - childReader = null; - state = TEXT_STATE; - currentPropertyIndex++; - return CHARACTERS; - } else if (propertyValue == null || propertyValue instanceof String) { - // strings are handled by the NameValuePairStreamReader - childReader = new SimpleElementStreamReader(propertyQName, (String) propertyValue); - childReader.setParentNamespaceContext(this.namespaceContext); - childReader.init(); - } else if (propertyValue instanceof DataObjectXMLStreamReader) { - // ADBbean has it's own method to get a reader - XMLFragmentStreamReader reader = (DataObjectXMLStreamReader) propertyValue; - // we know for sure that this is an ADB XMLStreamreader. - // However we need to make sure that it is compatible - childReader = reader; - childReader.setParentNamespaceContext(this.namespaceContext); - childReader.init(); - } else { - // all special possiblilities has been tried! Let's treat - // the thing as a bean and try generating events from it - throw new UnsupportedOperationException("Not supported"); - // childReader = new WrappingXMLStreamReader(BeanUtil.getPullParser(propertyValue, propertyQName)); - // we cannot register the namespace context here - } - - // set the state here - state = DELEGATED_STATE; - // we are done with the delegation - // increment the property index - currentPropertyIndex++; - return childReader.getEventType(); - } - - /** - * are we done ? - * - * @return - */ - public boolean isEndOfFragment() { - return (state == END_ELEMENT_STATE); - } - - protected static class NameValuePair implements Map.Entry { - private Object key; - - private Object value; - - public NameValuePair(Object key, Object value) { - this.key = key; - this.value = value; - } - - public Object getKey() { - return key; - } - - public Object getValue() { - return value; - } - - public Object setValue(Object value) { - Object v = this.value; - this.value = value; - return v; - } - - } - - protected static class SimpleElementStreamReader implements XMLFragmentStreamReader { - - private static final int START_ELEMENT_STATE = 0; - - private static final int TEXT_STATE = 1; - - private static final int END_ELEMENT_STATE = 2; - - private static final int START_ELEMENT_STATE_WITH_NULL = 3; - - private static final QName XSI_NIL_QNAME = new QName("http://www.w3.org/2001/XMLSchema-instance", "nil", "xsi"); - - private DelegatingNamespaceContext namespaceContext = new DelegatingNamespaceContext(null); - - private QName name; - - private String value; - - private int state = START_ELEMENT_STATE; - - public SimpleElementStreamReader(QName name, String value) { - this.name = name; - this.value = value; - if (value == null) - state = START_ELEMENT_STATE_WITH_NULL; - } - - public Object getProperty(String key) throws IllegalArgumentException { - return null; - } - - public int next() throws XMLStreamException { - switch (state) { - case START_ELEMENT_STATE: - state = TEXT_STATE; - return CHARACTERS; - case START_ELEMENT_STATE_WITH_NULL: - state = END_ELEMENT_STATE; - return END_ELEMENT; - case END_ELEMENT_STATE: - // oops, not supposed to happen! - throw new XMLStreamException("end already reached!"); - case TEXT_STATE: - state = END_ELEMENT_STATE; - return END_ELEMENT; - default: - throw new XMLStreamException("unknown event type!"); - } - } - - public void require(int i, String string, String string1) throws XMLStreamException { - // not implemented - } - - public String getElementText() throws XMLStreamException { - if (state == START_ELEMENT) { - // move to the end state and return the value - state = END_ELEMENT_STATE; - return value; - } else { - throw new XMLStreamException(); - } - - } - - public int nextTag() throws XMLStreamException { - return 0;// todo - } - - public boolean hasNext() throws XMLStreamException { - return (state != END_ELEMENT_STATE); - } - - public void close() throws XMLStreamException { - // Do nothing - we've nothing to free here - } - - public String getNamespaceURI(String prefix) { - return namespaceContext.getNamespaceURI(prefix); - } - - public boolean isStartElement() { - return (state == START_ELEMENT_STATE || state == START_ELEMENT_STATE_WITH_NULL); - } - - public boolean isEndElement() { - return (state == END_ELEMENT_STATE); - } - - public boolean isCharacters() { - return (state == TEXT_STATE); - } - - public boolean isWhiteSpace() { - return false; // no whitespaces here - } - - public boolean isAttributeSpecified(int i) { - return false; // no attribs here - } - - public NamespaceContext getNamespaceContext() { - return this.namespaceContext; - } - - public int getEventType() { - switch (state) { - case START_ELEMENT_STATE: - case START_ELEMENT_STATE_WITH_NULL: - return START_ELEMENT; - case END_ELEMENT_STATE: - return END_ELEMENT; - case TEXT_STATE: - return CHARACTERS; - default: - throw new UnsupportedOperationException(); - // we've no idea what this is!!!!! - } - - } - - public String getText() { - if (state == TEXT_STATE) { - return value; - } else { - throw new IllegalStateException(); - } - } - - public char[] getTextCharacters() { - if (state == TEXT_STATE) { - return value.toCharArray(); - } else { - throw new IllegalStateException(); - } - } - - public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException { - // not implemented - throw new UnsupportedOperationException(); - } - - public int getTextStart() { - if (state == TEXT_STATE) { - return 0; - } else { - throw new IllegalStateException(); - } - } - - public int getTextLength() { - if (state == TEXT_STATE) { - return value.length(); - } else { - throw new IllegalStateException(); - } - - } - - public String getEncoding() { - return "UTF-8"; - } - - public boolean hasText() { - return (state == TEXT_STATE); - } - - public Location getLocation() { - return new Location() { - public int getLineNumber() { - return 0; - } - - public int getColumnNumber() { - return 0; - } - - public int getCharacterOffset() { - return 0; - } - - public String getPublicId() { - return null; - } - - public String getSystemId() { - return null; - } - }; - } - - public QName getName() { - if (state != TEXT_STATE) { - return name; - } else { - return null; - } - } - - public String getLocalName() { - if (state != TEXT_STATE) { - return name.getLocalPart(); - } else { - return null; - } - } - - public boolean hasName() { - return (state != TEXT_STATE); - - } - - public String getNamespaceURI() { - if (state != TEXT_STATE) { - return name.getNamespaceURI(); - } else { - return null; - } - - } - - public String getPrefix() { - if (state != TEXT_STATE) { - return name.getPrefix(); - } else { - return null; - } - } - - public String getVersion() { - return null; // todo 1.0 ? - } - - public boolean isStandalone() { - return false; - } - - public boolean standaloneSet() { - return false; - } - - public String getCharacterEncodingScheme() { - return null; - } - - public String getPITarget() { - return null; - } - - public String getPIData() { - return null; - } - - public boolean isEndOfFragment() { - return (state == END_ELEMENT_STATE); - } - - public void setParentNamespaceContext(NamespaceContext nsContext) { - this.namespaceContext.setParent(nsContext); - } - - public void init() { - // just add the current elements namespace and prefix to the this - // elements nscontext - registerNamespace(name.getPrefix(), name.getNamespaceURI()); - - } - - /** - * @param prefix - * @param uri - */ - private void registerNamespace(String prefix, String uri) { - // todo - need to fix this up to cater for cases where - // namespaces are having no prefixes - if (!uri.equals(namespaceContext.getNamespaceURI(prefix))) { - // this namespace is not there. Need to declare it - namespaceContext.registerMapping(prefix, uri); - } - } - - public int getAttributeCount() { - if (state == START_ELEMENT_STATE_WITH_NULL) - return 1; - if (state == START_ELEMENT_STATE) { - return 0; - } else { - throw new IllegalStateException(); - } - - } - - public String getAttributeLocalName(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && i == 0) - return XSI_NIL_QNAME.getLocalPart(); - if (state == START_ELEMENT_STATE) { - return null; - } else { - throw new IllegalStateException(); - } - } - - public QName getAttributeName(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && i == 0) - return XSI_NIL_QNAME; - if (state == START_ELEMENT_STATE) { - return null; - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeNamespace(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && i == 0) - return XSI_NIL_QNAME.getNamespaceURI(); - if (state == START_ELEMENT_STATE) { - return null; - } else { - throw new IllegalStateException(); - } - } - - public String getAttributePrefix(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && i == 0) - return XSI_NIL_QNAME.getPrefix(); - if (state == START_ELEMENT_STATE) { - return null; - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeType(int i) { - return null; // not implemented - } - - public String getAttributeValue(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && i == 0) - return "true"; - if (state == START_ELEMENT_STATE) { - return null; - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeValue(String string, String string1) { - if (state == TEXT_STATE) { - // todo something - return null; - } else { - return null; - } - - } - - public int getNamespaceCount() { - if (state == START_ELEMENT_STATE_WITH_NULL && isXsiNamespacePresent()) - return 1; - else - return 0; - - } - - public String getNamespacePrefix(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && isXsiNamespacePresent() && i == 0) - return XSI_NIL_QNAME.getPrefix(); - else - return null; - } - - public String getNamespaceURI(int i) { - if (state == START_ELEMENT_STATE_WITH_NULL && isXsiNamespacePresent() && i == 0) - return XSI_NIL_QNAME.getNamespaceURI(); - else - return null; - } - - /** - * Test whether the xsi namespace is present - * - * @return - */ - private boolean isXsiNamespacePresent() { - return (namespaceContext.getNamespaceURI(XSI_NIL_QNAME.getPrefix()) != null); - } - - } - - protected static class DelegatingNamespaceContext implements NamespaceContext { - private NamespaceContext parent; - - private Map prefixToNamespaceMapping = new HashMap(); - - public DelegatingNamespaceContext(NamespaceContext parent) { - super(); - this.parent = parent; - - prefixToNamespaceMapping.put("xml", "http://www.w3.org/XML/1998/namespace"); - prefixToNamespaceMapping.put("xmlns", "http://www.w3.org/2000/xmlns/"); - prefixToNamespaceMapping.put("xsi", "http://www.w3.org/2001/XMLSchema-instance"); - } - - public String getNamespaceURI(String prefix) { - if (prefix == null) - throw new IllegalArgumentException("Prefix is null"); - - String ns = (String) prefixToNamespaceMapping.get(prefix); - if (ns != null) - return ns; - else if (parent != null) - return parent.getNamespaceURI(prefix); - else - return null; - } - - public String getPrefix(String nsURI) { - if (nsURI == null) - throw new IllegalArgumentException("Namespace is null"); - for (Iterator i = prefixToNamespaceMapping.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = (Map.Entry) i.next(); - if (entry.getValue().equals(nsURI)) { - return (String) entry.getKey(); - } - } - if (parent != null) - return parent.getPrefix(nsURI); - else - return null; - } - - public Iterator getPrefixes(String nsURI) { - List prefixList = new ArrayList(); - for (Iterator i = prefixToNamespaceMapping.entrySet().iterator(); i.hasNext();) { - Map.Entry entry = (Map.Entry) i.next(); - if (entry.getValue().equals(nsURI)) { - prefixList.add(entry.getKey()); - } - } - if (parent != null) { - for (Iterator i = parent.getPrefixes(nsURI); i.hasNext();) { - prefixList.add(i.next()); - } - } - return prefixList.iterator(); - } - - public void registerMapping(String prefix, String nsURI) { - prefixToNamespaceMapping.put(prefix, nsURI); - } - - private int counter = 0; - - public synchronized QName createQName(String nsURI, String name) { - String prefix = nsURI != null ? (String) getPrefix(nsURI) : null; - if (prefix == null && nsURI != null && !nsURI.equals("")) - prefix = "p" + (counter++); - if (prefix == null) - prefix = ""; - if (nsURI != null) - prefixToNamespaceMapping.put(prefix, nsURI); - return new QName(nsURI, name, prefix); - } - - public void removeMapping(String prefix) { - prefixToNamespaceMapping.remove(prefix); - } - - public void setParent(NamespaceContext parent) { - this.parent = parent; - } - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceFactoryImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceFactoryImpl.java deleted file mode 100644 index a4b4455fb5..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceFactoryImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.sdo.util.resource; - - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; - -/** - * This class creates SDOXMLResourceImpl objects. - */ -public class SDOXMLResourceFactoryImpl extends ResourceFactoryImpl -{ - /** - * Constructor for SDOXMLResourceFactoryImpl. - */ - public SDOXMLResourceFactoryImpl() - { - super(); - } - - /** - * Creates an XMLResourceImpl and returns it. - */ - public Resource createResource(URI uri) - { - return new SDOXMLResourceImpl(uri); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceImpl.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceImpl.java deleted file mode 100644 index fbbe8ef80c..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/SDOXMLResourceImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.sdo.util.resource; - -import java.io.IOException; -import java.security.AccessController; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - -import org.apache.tuscany.sdo.util.StAX2SAXAdapter; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.xmi.XMIException; -import org.eclipse.emf.ecore.xmi.XMLHelper; -import org.eclipse.emf.ecore.xmi.XMLLoad; -import org.eclipse.emf.ecore.xmi.XMLResource; -import org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl; -import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -public class SDOXMLResourceImpl extends XMLResourceImpl { - private XMLStreamReader reader; - - /** - * [rfeng] Override the XMLHelperImpl to replace the NamespaceSupport so that it's aware of the NamespaceContext from the XMLStreamReader - */ - public static class SDOXMLHelperImpl extends XMLHelperImpl { - - private static class StreamNamespaceSupport extends XMLHelperImpl.NamespaceSupport { - private XMLStreamReader reader; - - public String getPrefix(String uri) { - if (reader == null) - return super.getPrefix(uri); - String prefix = null; - try { - prefix = uri != null ? reader.getNamespaceContext().getPrefix(uri) : null; - } catch (Exception e) { - // HACK: - // java.lang.UnsupportedOperationException - // at org.apache.axiom.om.impl.llom.OMStAXWrapper.getNamespaceContext(OMStAXWrapper.java:984) - - prefix = null; - } - return prefix != null ? prefix : super.getPrefix(uri); - } - - public String getURI(String prefix) { - if (reader == null) - return super.getURI(prefix); - String uri; - try { - uri = prefix != null ? reader.getNamespaceContext().getNamespaceURI(prefix) : null; - } catch (Exception e) { - // HACK: - // java.lang.UnsupportedOperationException - // at org.apache.axiom.om.impl.llom.OMStAXWrapper.getNamespaceContext(OMStAXWrapper.java:984) - - uri = null; - } - return uri != null && uri.length()!=0 ? uri : super.getURI(prefix); - } - - public StreamNamespaceSupport(XMLStreamReader reader) { - super(); - this.reader = reader; - } - - } - - public SDOXMLHelperImpl(XMLResource resource, XMLStreamReader reader) { - this(reader); - setResource(resource); - } - - public SDOXMLHelperImpl(XMLStreamReader reader) { - super(); - this.namespaceSupport = new StreamNamespaceSupport(reader); - } - } - - /** - * An EMF XMLLoad that loads a model from a StAX stream - */ - public class SDOXMLLoadImpl extends XMLLoadImpl { - public SDOXMLLoadImpl(XMLHelper helper) { - super(helper); - } - - /** - * Start parsing an XMLReader with the default handler. - */ - public void load(XMLResource resource, final XMLStreamReader reader, Map options) throws IOException { - this.resource = resource; - Map mergedOptions = new HashMap(defaultLoadOptions); - if (options != null) - mergedOptions.putAll(options); - - this.options = mergedOptions; - - final ContentHandler handler = makeDefaultHandler(); - - if (errors != null) { - errors.clear(); - } - - final StAX2SAXAdapter adapter = new StAX2SAXAdapter(true); - // Parse the XMLReader and generate SAX events - try { - AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws XMLStreamException, SAXException { - adapter.parse(reader, handler); - return null; - } - }); - } catch (PrivilegedActionException e) { - throw new Resource.IOWrappedException(e.getException()); - } - - helper = null; - if (!resource.getErrors().isEmpty()) { - Exception error = (Exception) resource.getErrors().get(0); - if (error instanceof XMIException) { - XMIException exception = (XMIException) error; - if (exception.getWrappedException() != null) { - throw new Resource.IOWrappedException(exception.getWrappedException()); - } - } - throw new Resource.IOWrappedException(error); - } - } - } - - public SDOXMLResourceImpl(URI uri) { - super(uri); - } - - protected XMLHelper createXMLHelper() { - return new SDOXMLHelperImpl(this, reader); - } - - /** - * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#createXMLLoad() - */ - protected XMLLoad createXMLLoad() { - return new SDOXMLLoadImpl(createXMLHelper()); - } - - /** - * Loads the resource from a StAX XMLStreamReader. - */ - public void load(XMLStreamReader reader, Map options) throws IOException { - this.reader = reader; - SDOXMLLoadImpl xmlLoad = (SDOXMLLoadImpl) createXMLLoad(); - Map mergedOptions = new HashMap(defaultLoadOptions); - if (options != null) - mergedOptions.putAll(options); - xmlLoad.load(this, reader, mergedOptions); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLDocumentStreamReader.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLDocumentStreamReader.java deleted file mode 100644 index 25fcc0bc69..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLDocumentStreamReader.java +++ /dev/null @@ -1,426 +0,0 @@ -/** - * - */ -package org.apache.tuscany.sdo.util.resource; - -import java.util.NoSuchElementException; - -import javax.xml.namespace.NamespaceContext; -import javax.xml.namespace.QName; -import javax.xml.stream.Location; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; - -/** - * This class is derived from Apache Axis2 class - * org.apache.axis2.util.StreamWrapper. It's used wrap a XMLStreamReader to create a XMLStreamReader representing a document and it will produce - * START_DOCUMENT, END_DOCUMENT events. - * - */ -public class XMLDocumentStreamReader implements XMLStreamReader { - private static final int STATE_INIT = 0; // The wrapper will produce START_DOCUMENT - - private static final int STATE_SWITCHED = 1; // The real reader will produce events - - private static final int STATE_COMPLETE_AT_NEXT = 2; // The wrapper will produce END_DOCUMENT - - private static final int STATE_COMPLETED = 3; // Done - - private XMLStreamReader realReader = null; - - private int state = STATE_INIT; - - public XMLDocumentStreamReader(XMLStreamReader realReader) { - if (realReader == null) { - throw new UnsupportedOperationException("Reader cannot be null"); - } - - this.realReader = realReader; - - // If the real reader is positioned at START_DOCUMENT, always use the real reader - if (realReader.getEventType() == START_DOCUMENT) - state = STATE_SWITCHED; - } - - public void close() throws XMLStreamException { - realReader.close(); - } - - public int next() throws XMLStreamException { - int returnEvent = -1; - - switch (state) { - case STATE_SWITCHED: - returnEvent = realReader.next(); - if (returnEvent == END_DOCUMENT) { - state = STATE_COMPLETED; - } else if (!realReader.hasNext()) { - state = STATE_COMPLETE_AT_NEXT; - } - break; - case STATE_INIT: - state = STATE_SWITCHED; - returnEvent = realReader.getEventType(); - break; - case STATE_COMPLETE_AT_NEXT: - state = STATE_COMPLETED; - returnEvent = END_DOCUMENT; - break; - case STATE_COMPLETED: - // oops - no way we can go beyond this - throw new NoSuchElementException("End of stream has reached."); - default: - throw new UnsupportedOperationException(); - } - - return returnEvent; - } - - private boolean isDelegating() { - return state == STATE_SWITCHED || state == STATE_COMPLETE_AT_NEXT; - } - - public int nextTag() throws XMLStreamException { - if (isDelegating()) { - return realReader.nextTag(); - } else { - throw new XMLStreamException(); - } - } - - public void require(int i, String s, String s1) throws XMLStreamException { - if (isDelegating()) { - realReader.require(i, s, s1); - } - } - - public boolean standaloneSet() { - if (isDelegating()) { - return realReader.standaloneSet(); - } else { - return false; - } - } - - public int getAttributeCount() { - if (isDelegating()) { - return realReader.getAttributeCount(); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeLocalName(int i) { - if (isDelegating()) { - return realReader.getAttributeLocalName(i); - } else { - throw new IllegalStateException(); - } - } - - public QName getAttributeName(int i) { - if (isDelegating()) { - return realReader.getAttributeName(i); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeNamespace(int i) { - if (isDelegating()) { - return realReader.getAttributeNamespace(i); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributePrefix(int i) { - if (isDelegating()) { - return realReader.getAttributePrefix(i); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeType(int i) { - if (isDelegating()) { - return realReader.getAttributeType(i); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeValue(int i) { - if (isDelegating()) { - return realReader.getAttributeValue(i); - } else { - throw new IllegalStateException(); - } - } - - public String getAttributeValue(String s, String s1) { - if (isDelegating()) { - return realReader.getAttributeValue(s, s1); - } else { - throw new IllegalStateException(); - } - } - - public String getCharacterEncodingScheme() { - return realReader.getCharacterEncodingScheme(); - } - - public String getElementText() throws XMLStreamException { - if (isDelegating()) { - return realReader.getElementText(); - } else { - throw new XMLStreamException(); - } - } - - public String getEncoding() { - return realReader.getEncoding(); - } - - public int getEventType() { - int event = -1; - switch (state) { - case STATE_SWITCHED: - case STATE_COMPLETE_AT_NEXT: - event = realReader.getEventType(); - break; - case STATE_INIT: - event = START_DOCUMENT; - break; - case STATE_COMPLETED: - event = END_DOCUMENT; - break; - } - return event; - } - - public Location getLocation() { - if (isDelegating()) { - return realReader.getLocation(); - } else { - return null; - } - } - - public QName getName() { - if (isDelegating()) { - return realReader.getName(); - } else { - throw new IllegalStateException(); - } - } - - public String getLocalName() { - if (isDelegating()) { - return realReader.getLocalName(); - } else { - throw new IllegalStateException(); - } - } - - public NamespaceContext getNamespaceContext() { - return realReader.getNamespaceContext(); - } - - public int getNamespaceCount() { - if (isDelegating()) { - return realReader.getNamespaceCount(); - } else { - throw new IllegalStateException(); - } - } - - public String getNamespacePrefix(int i) { - if (isDelegating()) { - return realReader.getNamespacePrefix(i); - } else { - throw new IllegalStateException(); - } - } - - public String getNamespaceURI() { - if (isDelegating()) { - return realReader.getNamespaceURI(); - } else { - throw new IllegalStateException(); - } - } - - public String getNamespaceURI(int i) { - if (isDelegating()) { - return realReader.getNamespaceURI(i); - } else { - throw new IllegalStateException(); - } - } - - public String getNamespaceURI(String s) { - if (isDelegating()) { - return realReader.getNamespaceURI(s); - } else { - throw new IllegalStateException(); - } - } - - public String getPIData() { - if (isDelegating()) { - return realReader.getPIData(); - } else { - throw new IllegalStateException(); - } - } - - public String getPITarget() { - if (isDelegating()) { - return realReader.getPITarget(); - } else { - throw new IllegalStateException(); - } - } - - public String getPrefix() { - if (isDelegating()) { - return realReader.getPrefix(); - } else { - throw new IllegalStateException(); - } - } - - public Object getProperty(String s) throws IllegalArgumentException { - if (isDelegating()) { - return realReader.getProperty(s); - } else { - throw new IllegalArgumentException(); - } - } - - public String getText() { - if (isDelegating()) { - return realReader.getText(); - } else { - throw new IllegalStateException(); - } - } - - public char[] getTextCharacters() { - if (isDelegating()) { - return realReader.getTextCharacters(); - } else { - throw new IllegalStateException(); - } - } - - public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException { - if (isDelegating()) { - return realReader.getTextCharacters(i, chars, i1, i2); - } else { - throw new IllegalStateException(); - } - } - - public int getTextLength() { - if (isDelegating()) { - return realReader.getTextLength(); - } else { - throw new IllegalStateException(); - } - } - - public int getTextStart() { - if (isDelegating()) { - return realReader.getTextStart(); - } else { - throw new IllegalStateException(); - } - } - - public String getVersion() { - if (isDelegating()) { - return realReader.getVersion(); - } else { - return null; - } - } - - public boolean hasName() { - if (isDelegating()) { - return realReader.hasName(); - } else { - return false; - } - } - - public boolean hasNext() throws XMLStreamException { - if (state == STATE_COMPLETE_AT_NEXT) { - return true; - } else if (state == STATE_COMPLETED) { - return false; - } else if (state == STATE_SWITCHED) { - return realReader.hasNext(); - } else { - return true; - } - } - - public boolean hasText() { - if (isDelegating()) { - return realReader.hasText(); - } else { - return false; - } - } - - public boolean isAttributeSpecified(int i) { - if (isDelegating()) { - return realReader.isAttributeSpecified(i); - } else { - return false; - } - } - - public boolean isCharacters() { - if (isDelegating()) { - return realReader.isCharacters(); - } else { - return false; - } - } - - public boolean isEndElement() { - if (isDelegating()) { - return realReader.isEndElement(); - } else { - return false; - } - } - - public boolean isStandalone() { - if (isDelegating()) { - return realReader.isStandalone(); - } else { - return false; - } - } - - public boolean isStartElement() { - if (isDelegating()) { - return realReader.isStartElement(); - } else { - return false; - } - } - - public boolean isWhiteSpace() { - if (isDelegating()) { - return realReader.isWhiteSpace(); - } else { - return false; - } - } -} \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLFragmentStreamReader.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLFragmentStreamReader.java deleted file mode 100644 index 3a5b3e9eb1..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLFragmentStreamReader.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * - */ -package org.apache.tuscany.sdo.util.resource; - -import javax.xml.namespace.NamespaceContext; -import javax.xml.stream.XMLStreamReader; - -interface XMLFragmentStreamReader extends XMLStreamReader { - - // this will help to handle Text within the current element. - // user should pass the element text to the property list as this - // ELEMENT_TEXT as the key. This key deliberately has a space in it - // so that it is not a valid XML name - static final String ELEMENT_TEXT = "Element Text"; - - /** - * Extra method to query the state of the pullparser - * @return - */ - boolean isEndOfFragment(); - - /** - * add the parent namespace context to this parser - */ - void setParentNamespaceContext(NamespaceContext nsContext); - - /** - * Initiate the parser - this will do whatever the needed - * tasks to initiate the parser and must be called before - * attempting any specific parsing using this parser - */ - void init(); -} diff --git a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLStreamSerializer.java b/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLStreamSerializer.java deleted file mode 100644 index b891dfcadb..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/XMLStreamSerializer.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2004,2005 The Apache Software Foundation. - * - * 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.util.resource; - -import javax.xml.namespace.NamespaceContext; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -/** - * The XMLStreamSerializer pulls events from the XMLStreamReader and dumps into the XMLStreamWriter - */ -public class XMLStreamSerializer implements XMLStreamConstants { - - private static int namespaceSuffix = 0; - - public static final String NAMESPACE_PREFIX = "ns"; - - /* - * The behavior of the serializer is such that it returns when it encounters the starting element for the second time. The depth variable tracks - * the depth of the serilizer and tells it when to return. Note that it is assumed that this serialization starts on an Element. - */ - - /** - * Field depth - */ - private int depth = 0; - - /** - * Method serialize. - * - * @param node - * @param writer - * @throws XMLStreamException - */ - public void serialize(XMLStreamReader node, XMLStreamWriter writer) throws XMLStreamException { - serializeNode(node, writer); - } - - /** - * Method serializeNode. - * - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeNode(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - // TODO We get the StAXWriter at this point and uses it hereafter assuming that this is the only entry point to this class. - // If there can be other classes calling methodes of this we might need to change methode signatures to OMOutputer - while (reader.hasNext()) { - int event = reader.next(); - if (event == START_ELEMENT) { - serializeElement(reader, writer); - depth++; - } else if (event == ATTRIBUTE) { - serializeAttributes(reader, writer); - } else if (event == CHARACTERS) { - serializeText(reader, writer); - } else if (event == COMMENT) { - serializeComment(reader, writer); - } else if (event == CDATA) { - serializeCData(reader, writer); - } else if (event == END_ELEMENT) { - serializeEndElement(writer); - depth--; - } else if (event == START_DOCUMENT) { - depth++; // if a start document is found then increment the depth - } else if (event == END_DOCUMENT) { - if (depth != 0) - depth--; // for the end document - reduce the depth - try { - serializeEndElement(writer); - } catch (Exception e) { - // TODO: log exceptions - } - } - if (depth == 0) { - break; - } - } - } - - /** - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeElement(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - String prefix = reader.getPrefix(); - String nameSpaceName = reader.getNamespaceURI(); - if (nameSpaceName != null) { - String writer_prefix = writer.getPrefix(nameSpaceName); - if (writer_prefix != null) { - writer.writeStartElement(nameSpaceName, reader.getLocalName()); - } else { - if (prefix != null) { - writer.writeStartElement(prefix, reader.getLocalName(), nameSpaceName); - writer.writeNamespace(prefix, nameSpaceName); - writer.setPrefix(prefix, nameSpaceName); - } else { - writer.writeStartElement(nameSpaceName, reader.getLocalName()); - writer.writeDefaultNamespace(nameSpaceName); - writer.setDefaultNamespace(nameSpaceName); - } - } - } else { - writer.writeStartElement(reader.getLocalName()); - } - - // add the namespaces - int count = reader.getNamespaceCount(); - String namespacePrefix; - for (int i = 0; i < count; i++) { - namespacePrefix = reader.getNamespacePrefix(i); - if (namespacePrefix != null && namespacePrefix.length() == 0) - continue; - - serializeNamespace(namespacePrefix, reader.getNamespaceURI(i), writer); - } - - // add attributes - serializeAttributes(reader, writer); - - } - - /** - * Method serializeEndElement. - * - * @param writer - * @throws XMLStreamException - */ - protected void serializeEndElement(XMLStreamWriter writer) throws XMLStreamException { - writer.writeEndElement(); - } - - /** - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeText(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - writer.writeCharacters(reader.getText()); - } - - /** - * Method serializeCData. - * - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeCData(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - writer.writeCData(reader.getText()); - } - - /** - * Method serializeComment. - * - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeComment(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - writer.writeComment(reader.getText()); - } - - /** - * @param reader - * @param writer - * @throws XMLStreamException - */ - protected void serializeAttributes(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { - int count = reader.getAttributeCount(); - String prefix = null; - String namespaceName = null; - String writerPrefix = null; - for (int i = 0; i < count; i++) { - prefix = reader.getAttributePrefix(i); - namespaceName = reader.getAttributeNamespace(i); - if (namespaceName != null) - writerPrefix = writer.getNamespaceContext().getPrefix(namespaceName); - - if (!"".equals(namespaceName)) { - // prefix has already being declared but this particular attrib has a - // no prefix attached. So use the prefix provided by the writer - if (writerPrefix != null && (prefix == null || prefix.equals(""))) { - writer.writeAttribute(writerPrefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); - - // writer prefix is available but different from the current - // prefix of the attrib. We should be decalring the new prefix - // as a namespace declaration - } else if (prefix != null && !"".equals(prefix) && !prefix.equals(writerPrefix)) { - writer.writeNamespace(prefix, namespaceName); - writer.writeAttribute(prefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); - - // prefix is null (or empty), but the namespace name is valid! it has not - // being written previously also. So we need to generate a prefix - // here - } else { - prefix = generateUniquePrefix(writer.getNamespaceContext()); - writer.writeNamespace(prefix, namespaceName); - writer.writeAttribute(prefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); - } - } else { - // empty namespace is equal to no namespace! - writer.writeAttribute(reader.getAttributeLocalName(i), reader.getAttributeValue(i)); - } - - } - } - - /** - * Generates a unique namespace prefix that is not in the scope of the NamespaceContext - * - * @param nsCtxt - * @return string - */ - private String generateUniquePrefix(NamespaceContext nsCtxt) { - String prefix = NAMESPACE_PREFIX + namespaceSuffix++; - // null should be returned if the prefix is not bound! - while (nsCtxt.getNamespaceURI(prefix) != null) { - prefix = NAMESPACE_PREFIX + namespaceSuffix++; - } - - return prefix; - } - - /** - * Method serializeNamespace. - * - * @param prefix - * @param URI - * @param writer - * @throws XMLStreamException - */ - private void serializeNamespace(String prefix, String URI, XMLStreamWriter writer) throws XMLStreamException { - String prefix1 = writer.getPrefix(URI); - if (prefix1 == null) { - writer.writeNamespace(prefix, URI); - writer.setPrefix(prefix, URI); - } - } -} diff --git a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/LICENSE.txt b/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 25d78feeac..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,1277 +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 SUBCOMPONENTS: - -The Apache Tuscany distribution includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -=============================================================================== - -For the Eclipse Modeling Framework component and the Celtix binding: - -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 Rhino JavaScript container component: - -Mozilla Public License 1.1 (MPL 1.1) - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the -Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to -the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original Code, -prior Modifications used by a Contributor, and the Modifications made by that -particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the -combination of the Original Code and Modifications, in each case including -portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally -accepted in the software development community for the electronic transfer of -data. - - 1.5. "Executable" means Covered Code in any form other than Source -Code. - - 1.6. "Initial Developer" means the individual or entity identified as -the Initial Developer in the Source Code notice required by Exhibit A. - - 1.7. "Larger Work" means a work which combines Covered Code or -portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum -extent possible, whether at the time of the initial grant or subsequently -acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the -substance or structure of either the Original Code or any previous -Modifications. When Covered Code is released as a series of files, a -Modification is: - A. Any addition to or deletion from the contents of a file -containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or -previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code -which is described in the Source Code notice required by Exhibit A as Original -Code, and which, at the time of its release under this License is not already -Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and -apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for -making modifications to it, including all modules it contains, plus any -associated interface definition files, scripts used to control compilation and -installation of an Executable, or source code differential comparisons against -either the Original Code or another well known, available Covered Code of the -Contributor's choice. The Source Code can be in a compressed or archival form, -provided the appropriate decompression or de-archiving software is widely -available for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity -exercising rights under, and complying with all of the terms of, this License -or a future version of this License issued under Section 6.1. For legal -entities, "You" includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, "control" -means (a) the power, direct or indirect, to cause the direction or management -of such entity, whether by contract or otherwise, or (b) ownership of more -than fifty percent (50%) of the outstanding shares or beneficial ownership of -such entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: - (a) under intellectual property rights (other than patent or -trademark) Licensable by Initial Developer to use, reproduce, modify, display, -perform, sublicense and distribute the Original Code (or portions thereof) -with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or selling -of Original Code, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Code (or portions thereof). - (c) the licenses granted in this Section 2.1(a) and -(b) are effective on the date Initial Developer first distributes Original -Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is -granted: 1) for code that You delete from the Original Code; 2) separate from -the Original Code; or 3) for infringements caused by: i) the modification of -the Original Code or ii) the combination of the Original Code with other -software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor -hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor, to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such -Contributor (or portions thereof) either on an unmodified basis, with other -Modifications, as Covered Code and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling -of Modifications made by that Contributor either alone and/or in combination -with its Contributor Version (or portions of such combination), to make, use, -sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications -made by that Contributor (or portions thereof); and 2) the combination of -Modifications made by that Contributor with its Contributor Version (or -portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first makes Commercial Use of the Covered -Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is -granted: 1) for any code that Contributor has deleted from the Contributor -Version; 2) separate from the Contributor Version; 3) for infringements -caused by: i) third party modifications of Contributor Version or ii) the -combination of Modifications made by that Contributor with other software -(except as part of the Contributor Version) or other devices; or 4) under -Patent Claims infringed by Covered Code in the absence of Modifications made -by that Contributor. - - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are -governed by the terms of this License, including without limitation Section -2.2. The Source Code version of Covered Code may be distributed only under the -terms of this License or a future version of this License released under -Section 6.1, and You must include a copy of this License with every copy of -the Source Code You distribute. You may not offer or impose any terms on any -Source Code version that alters or restricts the applicable version of this -License or the recipients' rights hereunder. However, You may include an -additional document offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be -made available in Source Code form under the terms of this License either on -the same media as an Executable version or via an accepted Electronic -Distribution Mechanism to anyone to whom you made an Executable version -available; and if made available via Electronic Distribution Mechanism, must -remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a -file documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification is -derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's -intellectual property rights is required to exercise the rights granted by -such Contributor under Sections 2.1 or 2.2, Contributor must include a text -file with the Source Code distribution titled "LEGAL" which describes the -claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available -thereafter and shall take other steps (such as notifying appropriate mailing -lists or newsgroups) reasonably calculated to inform those who received the -Covered Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming -interface and Contributor has knowledge of patent licenses which are -reasonably necessary to implement that API, Contributor must also include this -information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to -Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient -rights to grant the rights conveyed by this License. - - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source -Code. If it is not possible to put such notice in a particular Source Code -file due to its structure, then You must include such notice in a location -(such as a relevant directory) where a user would be likely to look for such a -notice. If You created one or more Modification(s) You may add your name as a -Contributor to the notice described in Exhibit A. You must also duplicate -this License in any documentation for the Source Code where You describe -recipients' rights or ownership rights relating to Covered Code. You may -choose to offer, and to charge a fee for, warranty, support, indemnity or -liability obligations to one or more recipients of Covered Code. However, You -may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for any -liability incurred by the Initial Developer or such Contributor as a result of -warranty, support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the -requirements of Section 3.1-3.5 have been met for that Covered Code, and if -You include a notice stating that the Source Code version of the Covered Code -is available under the terms of this License, including a description of how -and where You have fulfilled the obligations of Section 3.2. The notice must -be conspicuously included in any notice in an Executable version, related -documentation or collateral in which You describe recipients' rights relating -to the Covered Code. You may distribute the Executable version of Covered Code -or ownership rights under a license of Your choice, which may contain terms -different from this License, provided that You are in compliance with the -terms of this License and that the license for the Executable version does not -attempt to limit or alter the recipient's rights in the Source Code version -from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of any such terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code -not governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Code due to statute, -judicial order, or regulation then You must: (a) comply with the terms of this -License to the maximum extent possible; and (b) describe the limitations and -the code they affect. Such description must be included in the LEGAL file -described in Section 3.4 and must be included with all distributions of the -Source Code. Except to the extent prohibited by statute or regulation, such -description must be sufficiently detailed for a recipient of ordinary skill to -be able to understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has attached -the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised -and/or new versions of the License from time to time. Each version will be -given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the -License, You may always continue to use it under the terms of that version. -You may also choose to use such Covered Code under the terms of any subsequent -version of the License published by Netscape. No one other than Netscape has -the right to modify the terms applicable to Covered Code created under this -License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may -only do in order to apply it to code which is not already Covered Code -governed by this License), You must (a) rename Your license so that the -phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or -any confusingly similar phrase do not appear in your license (except to note -that your license differs from this License) and (b) otherwise make it clear -that Your version of the license contains terms which differ from the Mozilla -Public License and Netscape Public License. (Filling in the name of the -Initial Developer, Original Code or Contributor in the notice described in -Exhibit A shall not of themselves be deemed to be modifications of this -License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, -FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED -CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY -OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS -DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure such -breach within 30 days of becoming aware of the breach. All sublicenses to the -Covered Code which are properly granted shall survive any termination of this -License. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement -claim (excluding declatory judgment actions) against Initial Developer or a -Contributor (the Initial Developer or Contributor against whom You file such -action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly -infringes any patent, then any and all rights granted by such Participant to -You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice -from Participant terminate prospectively, unless if within 60 days after -receipt of notice You either: (i) agree in writing to pay Participant a -mutually agreeable reasonable royalty for Your past and future use of -Modifications made by such Participant, or (ii) withdraw Your litigation claim -with respect to the Contributor Version against such Participant. If within -60 days of notice, a reasonable royalty and payment arrangement are not -mutually agreed upon in writing by the parties or the litigation claim is not -withdrawn, the rights granted by Participant to You under Sections 2.1 and/or -2.2 automatically terminate at the expiration of the 60 day notice period -specified above. - - (b) any software, hardware, or device, other than such Participant's -Contributor Version, directly or indirectly infringes any patent, then any -rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are -revoked effective as of the date You first made, used, sold, distributed, or -had made, Modifications made by that Participant. - - 8.3. If You assert a patent infringement claim against Participant -alleging that such Participant's Contributor Version directly or indirectly -infringes any patent where such claim is resolved (such as by license or -settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under -Sections 2.1 or 2.2 shall be taken into account in determining the amount or -value of any payment or license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, all -end user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, -EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH -DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH -OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT -APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS -EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and -"commercial computer software documentation," as such terms are used in 48 -C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. -227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users -acquire Covered Code with only those rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it -enforceable. This License shall be governed by California law provisions -(except to the extent applicable law, if any, provides otherwise), excluding -its conflict-of-law provisions. With respect to disputes in which at least one -party is a citizen of, or an entity chartered or registered to do business in -the United States of America, any litigation relating to this License shall be -subject to the jurisdiction of the Federal Courts of the Northern District of -California, with venue lying in Santa Clara County, California, with the -losing party responsible for costs, including without limitation, court costs -and reasonable attorneys' fees and expenses. The application of the United -Nations Convention on Contracts for the International Sale of Goods is -expressly excluded. Any law or regulation which provides that the language of -a contract shall be construed against the drafter shall not apply to this -License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any -admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as -Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits -you to utilize portions of the Covered Code under Your choice of the MPL or -the alternative licenses, if any, specified by the Initial Developer in the -file described in Exhibit A. - - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License -Version 1.1 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" -basis, WITHOUT WARRANTY OF - ANY KIND, either express or implied. See the License for the specific -language governing rights and - limitations under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. -Portions created by - ______________________ are Copyright (C) ______ -_______________________. All Rights - Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms of -the _____ license (the [___] License), in which case the provisions of -[______] License are applicable instead of those above. If you wish to allow -use of your version of this file only under the terms of the [____] License -and not to allow others to use your version of this file under the MPL, -indicate your decision by deleting the provisions above and replace them -with the notice and other provisions required by the [___] License. If you do -not delete the provisions above, a recipient may use your version of this file -under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of -the notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] - - -=============================================================================== - -For the JAX-WS Reference Implementation component: - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - - - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that - creates or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the - Original Software, prior Modifications used by a - Contributor (if any), and the Modifications made by that - particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or - (b) Modifications, or (c) the combination of files - containing Original Software with files containing - Modifications, in each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form - other than Source Code. - - 1.5. "Initial Developer" means the individual or entity - that first makes Original Software available under this - License. - - 1.6. "Larger Work" means a work which combines Covered - Software or portions thereof with code not governed by the - terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the - maximum extent possible, whether at the time of the initial - grant or subsequently acquired, any and all of the rights - conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable - form of any of the following: - - A. Any file that results from an addition to, - deletion from or modification of the contents of a - file containing Original Software or previous - Modifications; - - B. Any new file that contains any part of the - Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made - available under the terms of this License. - - 1.10. "Original Software" means the Source Code and - Executable form of computer software code that is - originally released under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned - or hereafter acquired, including without limitation, - method, process, and apparatus claims, in any patent - Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer - software code in which modifications are made and (b) - associated documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal - entity exercising rights under, and complying with all of - the terms of, this License. For legal entities, "You" - includes any entity which controls, is controlled by, or is - under common control with You. For purposes of this - definition, "control" means (a) the power, direct or - indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (b) ownership - of more than fifty percent (50%) of the outstanding shares - or beneficial ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, the - Initial Developer hereby grants You a world-wide, - royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Initial Developer, - to use, reproduce, modify, display, perform, - sublicense and distribute the Original Software (or - portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, - using or selling of Original Software, to make, have - made, use, practice, sell, and offer for sale, and/or - otherwise dispose of the Original Software (or - portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) - are effective on the date Initial Developer first - distributes or otherwise makes the Original Software - available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent - license is granted: (1) for code that You delete from - the Original Software, or (2) for infringements - caused by: (i) the modification of the Original - Software, or (ii) the combination of the Original - Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, each - Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Contributor to - use, reproduce, modify, display, perform, sublicense - and distribute the Modifications created by such - Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as - Covered Software and/or as part of a Larger Work; and - - - (b) under Patent Claims infringed by the making, - using, or selling of Modifications made by that - Contributor either alone and/or in combination with - its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, - have made, and/or otherwise dispose of: (1) - Modifications made by that Contributor (or portions - thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version - (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and - 2.2(b) are effective on the date Contributor first - distributes or otherwise makes the Modifications - available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent - license is granted: (1) for any code that Contributor - has deleted from the Contributor Version; (2) for - infringements caused by: (i) third party - modifications of Contributor Version, or (ii) the - combination of Modifications made by that Contributor - with other software (except as part of the - Contributor Version) or other devices; or (3) under - Patent Claims infringed by Covered Software in the - absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make - available in Executable form must also be made available in - Source Code form and that Source Code form must be - distributed only under the terms of this License. You must - include a copy of this License with every copy of the - Source Code form of the Covered Software You distribute or - otherwise make available. You must inform recipients of any - such Covered Software in Executable form as to how they can - obtain such Covered Software in Source Code form in a - reasonable manner on or through a medium customarily used - for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You - contribute are governed by the terms of this License. You - represent that You believe Your Modifications are Your - original creation(s) and/or You have sufficient rights to - grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications - that identifies You as the Contributor of the Modification. - You may not remove or alter any copyright, patent or - trademark notices contained within the Covered Software, or - any notices of licensing or any descriptive text giving - attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered - Software in Source Code form that alters or restricts the - applicable version of this License or the recipients' - rights hereunder. You may choose to offer, and to charge a - fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on - behalf of the Initial Developer or any Contributor. You - must make it absolutely clear that any such warranty, - support, indemnity or liability obligation is offered by - You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred - by the Initial Developer or such Contributor as a result of - warranty, support, indemnity or liability terms You offer. - - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered - Software under the terms of this License or under the terms - of a license of Your choice, which may contain terms - different from this License, provided that You are in - compliance with the terms of this License and that the - license for the Executable form does not attempt to limit - or alter the recipient's rights in the Source Code form - from the rights set forth in this License. If You - distribute the Covered Software in Executable form under a - different license, You must make it absolutely clear that - any terms which differ from this License are offered by You - alone, not by the Initial Developer or Contributor. You - hereby agree to indemnify the Initial Developer and every - Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms - You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software - with other code not governed by the terms of this License - and distribute the Larger Work as a single product. In such - a case, You must make sure the requirements of this License - are fulfilled for the Covered Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Sun Microsystems, Inc. is the initial license steward and - may publish revised and/or new versions of this License - from time to time. Each version will be given a - distinguishing version number. Except as provided in - Section 4.3, no one other than the license steward has the - right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. If the Initial Developer includes a - notice in the Original Software prohibiting it from being - distributed or otherwise made available under any - subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. Otherwise, You may also choose to - use, distribute or otherwise make the Covered Software - available under the terms of any subsequent version of the - License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a - new license for Your Original Software, You may create and - use a modified version of this License if You: (a) rename - the license and remove any references to the name of the - license steward (except to note that the license differs - from this License); and (b) otherwise make it clear that - the license contains terms which differ from this License. - - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" - BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED - SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR - PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY - COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE - INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF - ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF - WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS - DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will - terminate automatically if You fail to comply with terms - herein and fail to cure such breach within 30 days of - becoming aware of the breach. Provisions which, by their - nature, must remain in effect beyond the termination of - this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or - a Contributor (the Initial Developer or Contributor against - whom You assert such claim is referred to as "Participant") - alleging that the Participant Software (meaning the - Contributor Version where the Participant is a Contributor - or the Original Software where the Participant is the - Initial Developer) directly or indirectly infringes any - patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial - Developer (if the Initial Developer is not the Participant) - and all Contributors under Sections 2.1 and/or 2.2 of this - License shall, upon 60 days notice from Participant - terminate prospectively and automatically at the expiration - of such 60 day notice period, unless if within such 60 day - period You withdraw Your claim with respect to the - Participant Software against such Participant either - unilaterally or pursuant to a written agreement with - Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 - above, all end user licenses that have been validly granted - by You or any distributor hereunder prior to termination - (excluding licenses granted to You by any distributor) - shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE - LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK - STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL - INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO - NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR - CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT - APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is - defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial - computer software" (as that term is defined at 48 C.F.R. - 252.227-7014(a)(1)) and "commercial computer software - documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. - 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 - through 227.7202-4 (June 1995), all U.S. Government End Users - acquire Covered Software with only those rights set forth herein. - This U.S. Government Rights clause is in lieu of, and supersedes, - any other FAR, DFAR, or other clause or provision that addresses - Government rights in computer software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the - extent necessary to make it enforceable. This License shall be - governed by the law of the jurisdiction specified in a notice - contained within the Original Software (except to the extent - applicable law, if any, provides otherwise), excluding such - jurisdiction's conflict-of-law provisions. Any litigation - relating to this License shall be subject to the jurisdiction of - the courts located in the jurisdiction and venue specified in a - notice contained within the Original Software, with the losing - party responsible for costs, including, without limitation, court - costs and reasonable attorneys' fees and expenses. The - application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall - be construed against the drafter shall not apply to this License. - You agree that You alone are responsible for compliance with the - United States export administration regulations (and the export - control laws and regulation of any other countries) when You use, - distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or - indirectly, out of its utilization of rights under this License - and You agree to work with Initial Developer and Contributors to - distribute such responsibility on an equitable basis. Nothing - herein is intended or shall be deemed to constitute any admission - of liability. - diff --git a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/MANIFEST.MF b/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index 6abece6be5..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +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-M1 -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.spec;visibility:=reexport -Export-Package: 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 diff --git a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/NOTICE b/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/NOTICE deleted file mode 100644 index d48810c0ec..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/NOTICE +++ /dev/null @@ -1,18 +0,0 @@ -========================================================================= -== NOTICE file corresponding to the section 4 d of == -== the Apache License, Version 2.0, == -== in this case for the Apache Tuscany distribution. == -========================================================================= - -This product includes software developed by 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/) -- the Celtix project (http://celtix.objectweb.org/) -- the Mozilla Rhino project (http://www.mozilla.org/rhino/) -- the GlassFish JAX-WS project (https://jax-ws.dev.java.net/) - -Please read the LICENSE.txt file present in the root directory of this -distribution. - diff --git a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/README.txt b/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/README.txt deleted file mode 100644 index 9b26d1690a..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -Apache Tuscany M1 build (May, 2006) -=================================== - -http://incubator.apache.org/tuscany/ - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Support -------- - -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/java-post-M1/sdo/impl/src/main/resources/META-INF/services/commonj.sdo.impl.HelperProvider b/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/services/commonj.sdo.impl.HelperProvider deleted file mode 100644 index 73693d6556..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/META-INF/services/commonj.sdo.impl.HelperProvider +++ /dev/null @@ -1 +0,0 @@ -org.apache.tuscany.sdo.helper.HelperProviderImpl \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/main/resources/sdo-metadata.xsd b/branches/java-post-M1/sdo/impl/src/main/resources/sdo-metadata.xsd deleted file mode 100644 index b3daf2b894..0000000000 --- a/branches/java-post-M1/sdo/impl/src/main/resources/sdo-metadata.xsd +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java deleted file mode 100644 index f862837715..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar1.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.codegen; - -/** - * @version $Rev$ $Date$ - */ -public interface Bar1 { -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java deleted file mode 100644 index 35a878015f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Bar2.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.codegen; - -/** - * @version $Rev$ $Date$ - */ -public interface Bar2 { -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java deleted file mode 100644 index 7c64a42ab3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java deleted file mode 100644 index 6a401d48bb..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/Foo.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.codegen; - -/** - * @version $Rev$ $Date$ - */ -public interface Foo { -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java deleted file mode 100644 index 9d67b61317..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java deleted file mode 100644 index 5cee856217..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockProperty.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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(); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java deleted file mode 100644 index 209d7021c0..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.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(); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java deleted file mode 100644 index 4cc8c5e842..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryTestCase.java +++ /dev/null @@ -1,89 +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.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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java deleted file mode 100644 index faa8782a77..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DataTypeBaseTypeTestCase.java +++ /dev/null @@ -1,65 +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 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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java deleted file mode 100644 index b77b534be6..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/DefineTypeTestCase.java +++ /dev/null @@ -1,632 +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.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.math.BigDecimal; - -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.DataFactory; -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"; - - public void testDefineTypeRoundTrip() throws Exception { - TypeHelper types = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - Type intType = types.getType("commonj.sdo", "Int"); - Type stringType = types.getType("commonj.sdo", "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); - - // 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); - - 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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - Type intType = types.getType("commonj.sdo", "Int"); - Type stringType = types.getType("commonj.sdo", "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); - - // 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); - - // 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); - - 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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XSDHelper xsdHelper = SDOUtil.createXSDHelper(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - 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); - - // 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); - - // 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); - 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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - Type intType = types.getType("commonj.sdo", "Int"); - Type stringType = types.getType("commonj.sdo", "String"); - - // create a new Type for Customers - Type customerType = SDOUtil.createType(types, "http://example.com/customer", "Customer", false); - - // create a customer number property - SDOUtil.createProperty(customerType, "custNum", intType); - - // create a first name property - SDOUtil.createProperty(customerType, "firstName", stringType); - - // create a last name property - SDOUtil.createProperty(customerType, "lastName", stringType); - - 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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - 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.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.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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - 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.add("\n "); - - Type definedGlobalType = types.getType("http://www.example.com/open", null); - - Property definedSymbolProperty = definedGlobalType.getProperty("symbol"); - quote.setString(definedSymbolProperty, "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.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 = SDOUtil.createTypeHelper(); - DataFactory factory = SDOUtil.createDataFactory(types); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(types); - - Type stringType = types.getType("commonj.sdo", "String"); - Type decimalType = types.getType("commonj.sdo", "Decimal"); - - // 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" - DataObject nameProperty = companyType.createDataObject("property"); - nameProperty.set("name", "name"); - nameProperty.set("type", stringType); - nameProperty.set("containment", Boolean.TRUE); - - types.define(companyType); - - // 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); - - // Define a global property - company - DataObject companyProperty = globalType.createDataObject("property"); - companyProperty.set("name", "company"); - companyProperty.set("type", companyType); - companyProperty.set("containment", Boolean.TRUE); - - // Define a global property - price - DataObject priceProperty = globalType.createDataObject("property"); - priceProperty.set("name", "price"); - priceProperty.set("type", decimalType); - - types.define(globalType); - - // Create DataObject instances - DataObject openQuote = factory.create("http://www.example.com/open", "OpenQuote"); - - assertTrue(openQuote.getType().isOpen()); - - // Get global type - Type definedGlobalType = types.getType("http://www.example.com/open", null); - - Property definedSymbolProperty = definedGlobalType.getProperty("symbol"); - openQuote.set(definedSymbolProperty, "s1"); - - Property definedCompanyProperty = definedGlobalType.getProperty("company"); - - DataObject company = openQuote.createDataObject(definedCompanyProperty); - company.setString("name", "FlyByNightTechnology"); - - Property definedPriceProperty = definedGlobalType.getProperty("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))); - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.java deleted file mode 100644 index e46f9858e2..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/MixedTypeTestCase.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.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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java deleted file mode 100644 index 7e743e296a..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/OpenTypeTestCase.java +++ /dev/null @@ -1,82 +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.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 commonj.sdo.DataObject; -import commonj.sdo.Property; -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 OpenTypeTestCase extends TestCase { - 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 = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "OpenQuote"); - DataObject quote = DataFactory.INSTANCE.create(quoteType); - - quote.setString("symbol", "s1"); - - for (Iterator iter = quote.getInstanceProperties().iterator(); iter.hasNext();) { - Property property = (Property) iter.next(); - } - - Property companyProperty = XSDHelper.INSTANCE.getGlobalProperty(TEST_NAMESPACE, "company", true); - DataObject company = quote.createDataObject(companyProperty); - company.setString("name", "FlyByNightTechnology"); - - Property priceProperty = XSDHelper.INSTANCE.getGlobalProperty(TEST_NAMESPACE, "price", true); - quote.getList(priceProperty).add(new BigDecimal("1000.0")); - - for (Iterator iter = quote.getInstanceProperties().iterator(); iter.hasNext();) { - Property property = (Property) iter.next(); - } - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - XMLHelper.INSTANCE.save(quote, TEST_NAMESPACE, "openStockQuote", 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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java deleted file mode 100644 index 2e91a1a66f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleCopyTestCase.java +++ /dev/null @@ -1,68 +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.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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java deleted file mode 100644 index d86b793087..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleDynamicTestCase.java +++ /dev/null @@ -1,78 +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.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 commonj.sdo.DataObject; -import commonj.sdo.Type; -import commonj.sdo.helper.DataFactory; -import commonj.sdo.helper.TypeHelper; -import commonj.sdo.helper.XMLHelper; -import commonj.sdo.helper.XSDHelper; - - -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"; - - /** - * Simple Dynamic SDO 2 test. - */ - public void testDynamic() throws IOException { - Type quoteType = TypeHelper.INSTANCE.getType(TEST_NAMESPACE, "Quote"); - DataObject quote = DataFactory.INSTANCE.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(); - XMLHelper.INSTANCE.save(quote, TEST_NAMESPACE, "stockQuote", baos); - - 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/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java deleted file mode 100644 index ac05b362d9..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SimpleEqualityTestCase.java +++ /dev/null @@ -1,60 +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.helper.EqualityHelper; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.helper.XMLHelper; -import commonj.sdo.helper.XSDHelper; -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(); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValues.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValues.java deleted file mode 100644 index acc08c1056..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/SubstitutionValues.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.apache.tuscany.sdo.test; - -import java.net.URL; - -import commonj.sdo.DataObject; -import commonj.sdo.Type; -import commonj.sdo.helper.XSDHelper; -import commonj.sdo.helper.DataFactory; -import org.apache.tuscany.sdo.util.SDOUtil; - -public final class SubstitutionValues extends junit.framework.TestCase -{ - public void test() throws java.io.IOException - { - URL url = getClass().getResource("/SubstitutionValues.xsd"); - XSDHelper.INSTANCE.define(url.openStream(), url.toString()); - - final DataObject object = DataFactory.INSTANCE.create("http://www.apache.org/tuscany/SubstitutionValues", "TestObject"); - final Type type = object.getType(); - - assertNotNull( SDOUtil.getSubstitutionValues(object, type.getProperty("groupHead"))); - assertNull( SDOUtil.getSubstitutionValues(object, type.getProperty("nonGroupHead"))); - } -} \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java deleted file mode 100644 index d2ac035e02..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java +++ /dev/null @@ -1,282 +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 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; i1Dummy2"; - - protected void setUp() throws Exception { - super.setUp(); - streamHelper = SDOUtil.createXMLStreamHelper(typeHelper); - URL url = getClass().getClassLoader().getResource(testName + ".xsd"); - xsdHelper.define(url.openStream(), url.toExternalForm()); - inputFactory = XMLInputFactory.newInstance(); - outputFactory = XMLOutputFactory.newInstance(); - url = getClass().getClassLoader().getResource(testName + ".xml"); - InputStreamReader reader = new InputStreamReader(url.openStream()); - StringBuffer stringBuffer = new StringBuffer(); - 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 { - 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(); - } - DataObject dataObject = streamHelper.loadObject(reader); - Assert.assertNotNull(dataObject); - Assert.assertTrue(dataObject.getString("myAttr").equals("helloworld.HelloWorldImpl")); - } - - public void testLoad() throws Exception { - XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(xml)); - XMLDocument document = streamHelper.load(reader); - Assert.assertNotNull(document); - Assert.assertEquals(document.getRootElementURI(), module.getNamespaceURI()); - Assert.assertEquals(document.getRootElementName(), module.getLocalPart()); - DataObject moduleObject = document.getRootObject(); - List components = moduleObject.getList("component"); - DataObject componentObject = (DataObject) components.get(0); - // componentObject.getDataObject("implementation.mock"); - DataObject implObject = (DataObject) componentObject.getSequence(0).getValue(0); - Assert.assertTrue(implObject.getString("myAttr").equals("helloworld.HelloWorldImpl")); - } - - public void testSave() throws XMLStreamException { - XMLDocument document = XMLHelper.INSTANCE.load(xml); - StringWriter writer = new StringWriter(); - XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer); - streamHelper.save(document, streamWriter); - streamWriter.flush(); - String xmlStr = writer.toString(); - // System.out.println(xmlStr); - Assert.assertTrue(xmlStr.contains("myAttr=\"helloworld.HelloWorldImpl\"")); - } - - public void testSaveObject() throws XMLStreamException { - XMLDocument document = XMLHelper.INSTANCE.load(xml); - DataObject moduleObject = document.getRootObject(); - List components = moduleObject.getList("component"); - DataObject componentObject = (DataObject) components.get(0); - StringWriter writer = new StringWriter(); - XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(writer); - streamHelper.saveObject(componentObject, streamWriter); - streamWriter.flush(); - Assert.assertTrue(writer.toString().contains("myAttr=\"helloworld.HelloWorldImpl\"")); - } - - protected void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java deleted file mode 100644 index 7940663290..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XPathTestCase.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * - * Copyright 2006 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.tuscany.sdo.test; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; - -import org.apache.tuscany.sdo.util.SDOUtil; - -import junit.framework.TestCase; - -import commonj.sdo.DataObject; -import commonj.sdo.helper.TypeHelper; -import commonj.sdo.helper.XMLDocument; -import commonj.sdo.helper.XMLHelper; -import commonj.sdo.helper.XSDHelper; - -public class XPathTestCase extends TestCase { - - 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 { - TypeHelper typeHelper = SDOUtil.createTypeHelper(); - XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper); - - 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 { - TypeHelper typeHelper = SDOUtil.createTypeHelper(); - XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper); - XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper); - - 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]"); - assertFalse("bad indexing passed", true); - } catch (IndexOutOfBoundsException iobe) { - // as expected - } catch (Exception e) { - assertFalse("bad indexing generated wrong exception" + e, true); - } - - try { - noFolder = root.getDataObject("Folder[0]"); - assertFalse("bad indexing passed", true); - } catch (IndexOutOfBoundsException iobe) { - // as expected - } catch (Exception e) { - assertFalse("bad indexing generated wrong exception" + e, true); - } - - try { - noFolder = root.getDataObject("Folder.2"); - assertFalse("bad indexing passed", true); - } catch (IndexOutOfBoundsException iobe) { - // as expected - } catch (Exception e) { - assertFalse("bad indexing generated wrong exception" + e, true); - } - - try { - noFolder = root.getDataObject("Folder.-1"); - assertFalse("bad indexing passed", true); - } catch (IndexOutOfBoundsException iobe) { - // as expected - } catch (Exception e) { - assertFalse("bad indexing generated wrong exception" + e, true); - } - - noFolder = root.getDataObject("Folder[FolderName=foo]"); - assertNull(noFolder); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java b/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java deleted file mode 100644 index 16a2cbd195..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java +++ /dev/null @@ -1,61 +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.net.URL; -import java.util.List; - -import org.apache.tuscany.sdo.util.SDOUtil; - -import junit.framework.TestCase; - -import commonj.sdo.helper.XSDHelper; - -/** - * @version $Rev$ $Date$ - */ -public class XSDHelperTestCase extends TestCase { - private static final String TEST_MODEL = "/simple.xsd"; - private URL modelURL; - - public void testDefineWithLocation() throws IOException { - XSDHelper xsdHelper = SDOUtil.createXSDHelper(SDOUtil.createTypeHelper()); - List types = xsdHelper.define(modelURL.openStream(), modelURL.toString()); - assertEquals(2, types.size()); - } - - public void testDefineWithNoLocation() { - XSDHelper xsdHelper = SDOUtil.createXSDHelper(SDOUtil.createTypeHelper()); - List types = xsdHelper.define(getClass().getResourceAsStream(TEST_MODEL), null); - assertEquals(2, types.size()); - } - - public void testDuplicateDefineWithLocation() throws IOException { - XSDHelper xsdHelper = SDOUtil.createXSDHelper(SDOUtil.createTypeHelper()); - List types = xsdHelper.define(modelURL.openStream(), modelURL.toString()); - assertEquals(2, types.size()); - - List types2 = xsdHelper.define(modelURL.openStream(), modelURL.toString()); - assertEquals(0, types2.size()); - } - - protected void setUp() throws Exception { - super.setUp(); - modelURL = getClass().getResource(TEST_MODEL); - } -} diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/SubstitutionValues.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/SubstitutionValues.xsd deleted file mode 100644 index ec4a25740f..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/SubstitutionValues.xsd +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd deleted file mode 100644 index 42f9555d44..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd deleted file mode 100644 index 268ea375f0..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentTestCase.xml b/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentTestCase.xml deleted file mode 100644 index 34e1648429..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/XMLDocumentTestCase.xml +++ /dev/null @@ -1,14 +0,0 @@ - - some string - - another string - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/customer1.xml b/branches/java-post-M1/sdo/impl/src/test/resources/customer1.xml deleted file mode 100644 index 0c18fa47fa..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/customer1.xml +++ /dev/null @@ -1,8 +0,0 @@ - - \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/customer2.xml b/branches/java-post-M1/sdo/impl/src/test/resources/customer2.xml deleted file mode 100644 index 5b74c06c73..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/customer2.xml +++ /dev/null @@ -1,8 +0,0 @@ - - \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/datatype.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/datatype.xsd deleted file mode 100644 index 032f026137..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/datatype.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xml b/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xml deleted file mode 100644 index 000909a52e..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - 1Dummy2 - - - \ No newline at end of file diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xsd deleted file mode 100644 index cb74df8fa3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/foo-ext.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/foo.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/foo.xsd deleted file mode 100644 index fec090de71..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/foo.xsd +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/mixed.xml b/branches/java-post-M1/sdo/impl/src/test/resources/mixed.xml deleted file mode 100644 index 42ff3a3a5b..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/mixed.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/mixed.xsd deleted file mode 100644 index c45fc87de2..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/mixed.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/mixed2.xml b/branches/java-post-M1/sdo/impl/src/test/resources/mixed2.xml deleted file mode 100644 index 723d7bb891..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/mixedopen.xml b/branches/java-post-M1/sdo/impl/src/test/resources/mixedopen.xml deleted file mode 100644 index 2409ce85a6..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/names.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/names.xsd deleted file mode 100644 index 601ecc5f6a..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/names.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/open.xml b/branches/java-post-M1/sdo/impl/src/test/resources/open.xml deleted file mode 100644 index d4a5b92e0c..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/open.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/open.xsd deleted file mode 100644 index 06881e3f05..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/open.xsd +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/open2.xml b/branches/java-post-M1/sdo/impl/src/test/resources/open2.xml deleted file mode 100644 index 5bd70af711..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/open2.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - s1 - - 1000.0 - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/quote.xml b/branches/java-post-M1/sdo/impl/src/test/resources/quote.xml deleted file mode 100644 index d7b5969e23..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/sdoannotations.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/sdoannotations.xsd deleted file mode 100644 index 355e9e2ba3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/sdoannotations.xsd +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/sdotypes.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/sdotypes.xsd deleted file mode 100644 index aa0def2be6..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/sdotypes.xsd +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/shallowquote.xml b/branches/java-post-M1/sdo/impl/src/test/resources/shallowquote.xml deleted file mode 100644 index a56f2fe2b7..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/simple.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/simple.xsd deleted file mode 100644 index 5310f7e1f3..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/simple.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/simplechangesummary.xml b/branches/java-post-M1/sdo/impl/src/test/resources/simplechangesummary.xml deleted file mode 100644 index 1a34e0bf80..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/simplechangesummary.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - fbnt - FlyByNightTechnology - 1000.0 - 1000.0 - 1000.0 - 1000.0 - 1000.0 - 1000.0 - - 2000.0 - - - diff --git a/branches/java-post-M1/sdo/impl/src/test/resources/xpath.xml b/branches/java-post-M1/sdo/impl/src/test/resources/xpath.xml deleted file mode 100644 index b1972b7260..0000000000 --- a/branches/java-post-M1/sdo/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/java-post-M1/sdo/impl/src/test/resources/xpath.xsd b/branches/java-post-M1/sdo/impl/src/test/resources/xpath.xsd deleted file mode 100644 index 258d1b40e6..0000000000 --- a/branches/java-post-M1/sdo/impl/src/test/resources/xpath.xsd +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/plugin/pom.xml b/branches/java-post-M1/sdo/plugin/pom.xml deleted file mode 100644 index e4641f9617..0000000000 --- a/branches/java-post-M1/sdo/plugin/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - org.apache.tuscany - tuscany-sdo - 1.0-SNAPSHOT - - 4.0.0 - tuscany-sdo-plugin - maven-plugin - Tuscany SDO Maven Plugin - - - - org.apache.maven - maven-plugin-api - 2.0 - - - org.apache.tuscany - tuscany-sdo-tools - ${pom.version} - compile - - - diff --git a/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java b/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java deleted file mode 100644 index 88a7b93b6e..0000000000 --- a/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java +++ /dev/null @@ -1,264 +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.plugin; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.util.List; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; - -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.compileSourceRoots}" - * @readonly - */ - private List compilerSourceRoots; - - /** - * With this option, generated code will not have EMF references. - * - * @parameter - */ - private Boolean noEMF; - - /** - * Support for generating multiple schema files. - * - * @parameter - */ - private SchemaFileOption[] schemaFiles; - - 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.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(compilerSourceRoots); - } - if (null == sf.isNoEMF()) { - sf.setNoEMF(noEMF); - } - 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(compilerSourceRoots); - schemaFiles[i].setGenerateLoader(generateLoader); - schemaFiles[i].setGenerateSwitch(generateSwitch); - schemaFiles[i].setNoContainment(noContainment); - schemaFiles[i].setNoEMF(noEMF); - schemaFiles[i].setNoInterfaces(noInterfaces); - schemaFiles[i].setNoNotification(noNotification); - schemaFiles[i].setNoUnsettable(noUnsettable); - schemaFiles[i].setPrefix(prefix); - schemaFiles[i].setTargetDirectory(targetDirectory); - } - } else { - schemaFiles = new SchemaFileOption[] { new SchemaFileOption() }; - schemaFiles[0].setFileName(schemaFile); - schemaFiles[0].setJavaPackage(javaPackage); - schemaFiles[0].setCompilerSourceRoots(compilerSourceRoots); - schemaFiles[0].setGenerateLoader(generateLoader); - schemaFiles[0].setGenerateSwitch(generateSwitch); - schemaFiles[0].setNoContainment(noContainment); - schemaFiles[0].setNoEMF(noEMF); - schemaFiles[0].setNoInterfaces(noInterfaces); - schemaFiles[0].setNoNotification(noNotification); - schemaFiles[0].setNoUnsettable(noUnsettable); - schemaFiles[0].setPrefix(prefix); - schemaFiles[0].setTargetDirectory(targetDirectory); - } - } - - for (int i = 0; i < schemaFiles.length; i++) { - File file = schemaFiles[i].getFileName(); - File marker = new File(targetDirectory, ".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].isNoEMF() != null && schemaFiles[i].isNoEMF().booleanValue()) { - genOptions |= JavaGenerator.OPTION_NO_EMF; - } - - XSD2JavaGenerator.generateFromXMLSchema(file.toString(), targetDirectory, javaPackage, prefix, genOptions); - } - try { - marker.createNewFile(); - } catch (IOException e) { - throw new MojoExecutionException(e.getMessage() + "'" + marker.getAbsolutePath() + "'", e); - } - marker.setLastModified(System.currentTimeMillis()); - } - - compilerSourceRoots.add(targetDirectory); - } - - private static final FileFilter FILTER = new FileFilter() { - public boolean accept(File pathname) { - return (pathname.isFile() || !pathname.isHidden()); - } - }; -} diff --git a/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java b/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java deleted file mode 100644 index ec10a59f68..0000000000 --- a/branches/java-post-M1/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/SchemaFileOption.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.apache.tuscany.sdo.plugin; - -import java.io.File; -import java.util.List; - -public class SchemaFileOption { - - /** - * Name of the schema file - * - */ - 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; - - /** - * @parameter expression="${project.compileSourceRoots}" - * @readonly - */ - private List compilerSourceRoots; - - /** - * With this option, generated code will not have EMF references. - * - * @parameter - */ - private Boolean noEMF; - - public SchemaFileOption() { - } - - public List getCompilerSourceRoots() { - return compilerSourceRoots; - } - - public void setCompilerSourceRoots(List compilerSourceRoots) { - this.compilerSourceRoots = compilerSourceRoots; - } - - 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 isNoEMF() { - return noEMF; - } - - public void setNoEMF(Boolean noEMF) { - this.noEMF = noEMF; - } - - 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; - } - -} diff --git a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/LICENSE.txt b/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 25d78feeac..0000000000 --- a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,1277 +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 SUBCOMPONENTS: - -The Apache Tuscany distribution includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -=============================================================================== - -For the Eclipse Modeling Framework component and the Celtix binding: - -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 Rhino JavaScript container component: - -Mozilla Public License 1.1 (MPL 1.1) - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the -Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to -the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original Code, -prior Modifications used by a Contributor, and the Modifications made by that -particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the -combination of the Original Code and Modifications, in each case including -portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally -accepted in the software development community for the electronic transfer of -data. - - 1.5. "Executable" means Covered Code in any form other than Source -Code. - - 1.6. "Initial Developer" means the individual or entity identified as -the Initial Developer in the Source Code notice required by Exhibit A. - - 1.7. "Larger Work" means a work which combines Covered Code or -portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum -extent possible, whether at the time of the initial grant or subsequently -acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the -substance or structure of either the Original Code or any previous -Modifications. When Covered Code is released as a series of files, a -Modification is: - A. Any addition to or deletion from the contents of a file -containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or -previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code -which is described in the Source Code notice required by Exhibit A as Original -Code, and which, at the time of its release under this License is not already -Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and -apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for -making modifications to it, including all modules it contains, plus any -associated interface definition files, scripts used to control compilation and -installation of an Executable, or source code differential comparisons against -either the Original Code or another well known, available Covered Code of the -Contributor's choice. The Source Code can be in a compressed or archival form, -provided the appropriate decompression or de-archiving software is widely -available for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity -exercising rights under, and complying with all of the terms of, this License -or a future version of this License issued under Section 6.1. For legal -entities, "You" includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, "control" -means (a) the power, direct or indirect, to cause the direction or management -of such entity, whether by contract or otherwise, or (b) ownership of more -than fifty percent (50%) of the outstanding shares or beneficial ownership of -such entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: - (a) under intellectual property rights (other than patent or -trademark) Licensable by Initial Developer to use, reproduce, modify, display, -perform, sublicense and distribute the Original Code (or portions thereof) -with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or selling -of Original Code, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Code (or portions thereof). - (c) the licenses granted in this Section 2.1(a) and -(b) are effective on the date Initial Developer first distributes Original -Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is -granted: 1) for code that You delete from the Original Code; 2) separate from -the Original Code; or 3) for infringements caused by: i) the modification of -the Original Code or ii) the combination of the Original Code with other -software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor -hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor, to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such -Contributor (or portions thereof) either on an unmodified basis, with other -Modifications, as Covered Code and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling -of Modifications made by that Contributor either alone and/or in combination -with its Contributor Version (or portions of such combination), to make, use, -sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications -made by that Contributor (or portions thereof); and 2) the combination of -Modifications made by that Contributor with its Contributor Version (or -portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first makes Commercial Use of the Covered -Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is -granted: 1) for any code that Contributor has deleted from the Contributor -Version; 2) separate from the Contributor Version; 3) for infringements -caused by: i) third party modifications of Contributor Version or ii) the -combination of Modifications made by that Contributor with other software -(except as part of the Contributor Version) or other devices; or 4) under -Patent Claims infringed by Covered Code in the absence of Modifications made -by that Contributor. - - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are -governed by the terms of this License, including without limitation Section -2.2. The Source Code version of Covered Code may be distributed only under the -terms of this License or a future version of this License released under -Section 6.1, and You must include a copy of this License with every copy of -the Source Code You distribute. You may not offer or impose any terms on any -Source Code version that alters or restricts the applicable version of this -License or the recipients' rights hereunder. However, You may include an -additional document offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be -made available in Source Code form under the terms of this License either on -the same media as an Executable version or via an accepted Electronic -Distribution Mechanism to anyone to whom you made an Executable version -available; and if made available via Electronic Distribution Mechanism, must -remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a -file documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification is -derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's -intellectual property rights is required to exercise the rights granted by -such Contributor under Sections 2.1 or 2.2, Contributor must include a text -file with the Source Code distribution titled "LEGAL" which describes the -claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available -thereafter and shall take other steps (such as notifying appropriate mailing -lists or newsgroups) reasonably calculated to inform those who received the -Covered Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming -interface and Contributor has knowledge of patent licenses which are -reasonably necessary to implement that API, Contributor must also include this -information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to -Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient -rights to grant the rights conveyed by this License. - - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source -Code. If it is not possible to put such notice in a particular Source Code -file due to its structure, then You must include such notice in a location -(such as a relevant directory) where a user would be likely to look for such a -notice. If You created one or more Modification(s) You may add your name as a -Contributor to the notice described in Exhibit A. You must also duplicate -this License in any documentation for the Source Code where You describe -recipients' rights or ownership rights relating to Covered Code. You may -choose to offer, and to charge a fee for, warranty, support, indemnity or -liability obligations to one or more recipients of Covered Code. However, You -may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for any -liability incurred by the Initial Developer or such Contributor as a result of -warranty, support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the -requirements of Section 3.1-3.5 have been met for that Covered Code, and if -You include a notice stating that the Source Code version of the Covered Code -is available under the terms of this License, including a description of how -and where You have fulfilled the obligations of Section 3.2. The notice must -be conspicuously included in any notice in an Executable version, related -documentation or collateral in which You describe recipients' rights relating -to the Covered Code. You may distribute the Executable version of Covered Code -or ownership rights under a license of Your choice, which may contain terms -different from this License, provided that You are in compliance with the -terms of this License and that the license for the Executable version does not -attempt to limit or alter the recipient's rights in the Source Code version -from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of any such terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code -not governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Code due to statute, -judicial order, or regulation then You must: (a) comply with the terms of this -License to the maximum extent possible; and (b) describe the limitations and -the code they affect. Such description must be included in the LEGAL file -described in Section 3.4 and must be included with all distributions of the -Source Code. Except to the extent prohibited by statute or regulation, such -description must be sufficiently detailed for a recipient of ordinary skill to -be able to understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has attached -the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised -and/or new versions of the License from time to time. Each version will be -given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the -License, You may always continue to use it under the terms of that version. -You may also choose to use such Covered Code under the terms of any subsequent -version of the License published by Netscape. No one other than Netscape has -the right to modify the terms applicable to Covered Code created under this -License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may -only do in order to apply it to code which is not already Covered Code -governed by this License), You must (a) rename Your license so that the -phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or -any confusingly similar phrase do not appear in your license (except to note -that your license differs from this License) and (b) otherwise make it clear -that Your version of the license contains terms which differ from the Mozilla -Public License and Netscape Public License. (Filling in the name of the -Initial Developer, Original Code or Contributor in the notice described in -Exhibit A shall not of themselves be deemed to be modifications of this -License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, -FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED -CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY -OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS -DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure such -breach within 30 days of becoming aware of the breach. All sublicenses to the -Covered Code which are properly granted shall survive any termination of this -License. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement -claim (excluding declatory judgment actions) against Initial Developer or a -Contributor (the Initial Developer or Contributor against whom You file such -action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly -infringes any patent, then any and all rights granted by such Participant to -You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice -from Participant terminate prospectively, unless if within 60 days after -receipt of notice You either: (i) agree in writing to pay Participant a -mutually agreeable reasonable royalty for Your past and future use of -Modifications made by such Participant, or (ii) withdraw Your litigation claim -with respect to the Contributor Version against such Participant. If within -60 days of notice, a reasonable royalty and payment arrangement are not -mutually agreed upon in writing by the parties or the litigation claim is not -withdrawn, the rights granted by Participant to You under Sections 2.1 and/or -2.2 automatically terminate at the expiration of the 60 day notice period -specified above. - - (b) any software, hardware, or device, other than such Participant's -Contributor Version, directly or indirectly infringes any patent, then any -rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are -revoked effective as of the date You first made, used, sold, distributed, or -had made, Modifications made by that Participant. - - 8.3. If You assert a patent infringement claim against Participant -alleging that such Participant's Contributor Version directly or indirectly -infringes any patent where such claim is resolved (such as by license or -settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under -Sections 2.1 or 2.2 shall be taken into account in determining the amount or -value of any payment or license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, all -end user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, -EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH -DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH -OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT -APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS -EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and -"commercial computer software documentation," as such terms are used in 48 -C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. -227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users -acquire Covered Code with only those rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it -enforceable. This License shall be governed by California law provisions -(except to the extent applicable law, if any, provides otherwise), excluding -its conflict-of-law provisions. With respect to disputes in which at least one -party is a citizen of, or an entity chartered or registered to do business in -the United States of America, any litigation relating to this License shall be -subject to the jurisdiction of the Federal Courts of the Northern District of -California, with venue lying in Santa Clara County, California, with the -losing party responsible for costs, including without limitation, court costs -and reasonable attorneys' fees and expenses. The application of the United -Nations Convention on Contracts for the International Sale of Goods is -expressly excluded. Any law or regulation which provides that the language of -a contract shall be construed against the drafter shall not apply to this -License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any -admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as -Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits -you to utilize portions of the Covered Code under Your choice of the MPL or -the alternative licenses, if any, specified by the Initial Developer in the -file described in Exhibit A. - - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License -Version 1.1 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" -basis, WITHOUT WARRANTY OF - ANY KIND, either express or implied. See the License for the specific -language governing rights and - limitations under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. -Portions created by - ______________________ are Copyright (C) ______ -_______________________. All Rights - Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms of -the _____ license (the [___] License), in which case the provisions of -[______] License are applicable instead of those above. If you wish to allow -use of your version of this file only under the terms of the [____] License -and not to allow others to use your version of this file under the MPL, -indicate your decision by deleting the provisions above and replace them -with the notice and other provisions required by the [___] License. If you do -not delete the provisions above, a recipient may use your version of this file -under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of -the notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] - - -=============================================================================== - -For the JAX-WS Reference Implementation component: - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - - - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that - creates or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the - Original Software, prior Modifications used by a - Contributor (if any), and the Modifications made by that - particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or - (b) Modifications, or (c) the combination of files - containing Original Software with files containing - Modifications, in each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form - other than Source Code. - - 1.5. "Initial Developer" means the individual or entity - that first makes Original Software available under this - License. - - 1.6. "Larger Work" means a work which combines Covered - Software or portions thereof with code not governed by the - terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the - maximum extent possible, whether at the time of the initial - grant or subsequently acquired, any and all of the rights - conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable - form of any of the following: - - A. Any file that results from an addition to, - deletion from or modification of the contents of a - file containing Original Software or previous - Modifications; - - B. Any new file that contains any part of the - Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made - available under the terms of this License. - - 1.10. "Original Software" means the Source Code and - Executable form of computer software code that is - originally released under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned - or hereafter acquired, including without limitation, - method, process, and apparatus claims, in any patent - Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer - software code in which modifications are made and (b) - associated documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal - entity exercising rights under, and complying with all of - the terms of, this License. For legal entities, "You" - includes any entity which controls, is controlled by, or is - under common control with You. For purposes of this - definition, "control" means (a) the power, direct or - indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (b) ownership - of more than fifty percent (50%) of the outstanding shares - or beneficial ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, the - Initial Developer hereby grants You a world-wide, - royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Initial Developer, - to use, reproduce, modify, display, perform, - sublicense and distribute the Original Software (or - portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, - using or selling of Original Software, to make, have - made, use, practice, sell, and offer for sale, and/or - otherwise dispose of the Original Software (or - portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) - are effective on the date Initial Developer first - distributes or otherwise makes the Original Software - available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent - license is granted: (1) for code that You delete from - the Original Software, or (2) for infringements - caused by: (i) the modification of the Original - Software, or (ii) the combination of the Original - Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, each - Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Contributor to - use, reproduce, modify, display, perform, sublicense - and distribute the Modifications created by such - Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as - Covered Software and/or as part of a Larger Work; and - - - (b) under Patent Claims infringed by the making, - using, or selling of Modifications made by that - Contributor either alone and/or in combination with - its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, - have made, and/or otherwise dispose of: (1) - Modifications made by that Contributor (or portions - thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version - (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and - 2.2(b) are effective on the date Contributor first - distributes or otherwise makes the Modifications - available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent - license is granted: (1) for any code that Contributor - has deleted from the Contributor Version; (2) for - infringements caused by: (i) third party - modifications of Contributor Version, or (ii) the - combination of Modifications made by that Contributor - with other software (except as part of the - Contributor Version) or other devices; or (3) under - Patent Claims infringed by Covered Software in the - absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make - available in Executable form must also be made available in - Source Code form and that Source Code form must be - distributed only under the terms of this License. You must - include a copy of this License with every copy of the - Source Code form of the Covered Software You distribute or - otherwise make available. You must inform recipients of any - such Covered Software in Executable form as to how they can - obtain such Covered Software in Source Code form in a - reasonable manner on or through a medium customarily used - for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You - contribute are governed by the terms of this License. You - represent that You believe Your Modifications are Your - original creation(s) and/or You have sufficient rights to - grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications - that identifies You as the Contributor of the Modification. - You may not remove or alter any copyright, patent or - trademark notices contained within the Covered Software, or - any notices of licensing or any descriptive text giving - attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered - Software in Source Code form that alters or restricts the - applicable version of this License or the recipients' - rights hereunder. You may choose to offer, and to charge a - fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on - behalf of the Initial Developer or any Contributor. You - must make it absolutely clear that any such warranty, - support, indemnity or liability obligation is offered by - You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred - by the Initial Developer or such Contributor as a result of - warranty, support, indemnity or liability terms You offer. - - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered - Software under the terms of this License or under the terms - of a license of Your choice, which may contain terms - different from this License, provided that You are in - compliance with the terms of this License and that the - license for the Executable form does not attempt to limit - or alter the recipient's rights in the Source Code form - from the rights set forth in this License. If You - distribute the Covered Software in Executable form under a - different license, You must make it absolutely clear that - any terms which differ from this License are offered by You - alone, not by the Initial Developer or Contributor. You - hereby agree to indemnify the Initial Developer and every - Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms - You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software - with other code not governed by the terms of this License - and distribute the Larger Work as a single product. In such - a case, You must make sure the requirements of this License - are fulfilled for the Covered Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Sun Microsystems, Inc. is the initial license steward and - may publish revised and/or new versions of this License - from time to time. Each version will be given a - distinguishing version number. Except as provided in - Section 4.3, no one other than the license steward has the - right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. If the Initial Developer includes a - notice in the Original Software prohibiting it from being - distributed or otherwise made available under any - subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. Otherwise, You may also choose to - use, distribute or otherwise make the Covered Software - available under the terms of any subsequent version of the - License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a - new license for Your Original Software, You may create and - use a modified version of this License if You: (a) rename - the license and remove any references to the name of the - license steward (except to note that the license differs - from this License); and (b) otherwise make it clear that - the license contains terms which differ from this License. - - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" - BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED - SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR - PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY - COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE - INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF - ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF - WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS - DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will - terminate automatically if You fail to comply with terms - herein and fail to cure such breach within 30 days of - becoming aware of the breach. Provisions which, by their - nature, must remain in effect beyond the termination of - this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or - a Contributor (the Initial Developer or Contributor against - whom You assert such claim is referred to as "Participant") - alleging that the Participant Software (meaning the - Contributor Version where the Participant is a Contributor - or the Original Software where the Participant is the - Initial Developer) directly or indirectly infringes any - patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial - Developer (if the Initial Developer is not the Participant) - and all Contributors under Sections 2.1 and/or 2.2 of this - License shall, upon 60 days notice from Participant - terminate prospectively and automatically at the expiration - of such 60 day notice period, unless if within such 60 day - period You withdraw Your claim with respect to the - Participant Software against such Participant either - unilaterally or pursuant to a written agreement with - Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 - above, all end user licenses that have been validly granted - by You or any distributor hereunder prior to termination - (excluding licenses granted to You by any distributor) - shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE - LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK - STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL - INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO - NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR - CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT - APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is - defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial - computer software" (as that term is defined at 48 C.F.R. - 252.227-7014(a)(1)) and "commercial computer software - documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. - 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 - through 227.7202-4 (June 1995), all U.S. Government End Users - acquire Covered Software with only those rights set forth herein. - This U.S. Government Rights clause is in lieu of, and supersedes, - any other FAR, DFAR, or other clause or provision that addresses - Government rights in computer software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the - extent necessary to make it enforceable. This License shall be - governed by the law of the jurisdiction specified in a notice - contained within the Original Software (except to the extent - applicable law, if any, provides otherwise), excluding such - jurisdiction's conflict-of-law provisions. Any litigation - relating to this License shall be subject to the jurisdiction of - the courts located in the jurisdiction and venue specified in a - notice contained within the Original Software, with the losing - party responsible for costs, including, without limitation, court - costs and reasonable attorneys' fees and expenses. The - application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall - be construed against the drafter shall not apply to this License. - You agree that You alone are responsible for compliance with the - United States export administration regulations (and the export - control laws and regulation of any other countries) when You use, - distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or - indirectly, out of its utilization of rights under this License - and You agree to work with Initial Developer and Contributors to - distribute such responsibility on an equitable basis. Nothing - herein is intended or shall be deemed to constitute any admission - of liability. - diff --git a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/NOTICE b/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/NOTICE deleted file mode 100644 index d48810c0ec..0000000000 --- a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/NOTICE +++ /dev/null @@ -1,18 +0,0 @@ -========================================================================= -== NOTICE file corresponding to the section 4 d of == -== the Apache License, Version 2.0, == -== in this case for the Apache Tuscany distribution. == -========================================================================= - -This product includes software developed by 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/) -- the Celtix project (http://celtix.objectweb.org/) -- the Mozilla Rhino project (http://www.mozilla.org/rhino/) -- the GlassFish JAX-WS project (https://jax-ws.dev.java.net/) - -Please read the LICENSE.txt file present in the root directory of this -distribution. - diff --git a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/README.txt b/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/README.txt deleted file mode 100644 index 9b26d1690a..0000000000 --- a/branches/java-post-M1/sdo/plugin/src/main/resources/META-INF/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -Apache Tuscany M1 build (May, 2006) -=================================== - -http://incubator.apache.org/tuscany/ - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Support -------- - -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/java-post-M1/sdo/pom.xml b/branches/java-post-M1/sdo/pom.xml deleted file mode 100644 index 6f50e10e36..0000000000 --- a/branches/java-post-M1/sdo/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - org.apache.tuscany - tuscany-sdo - pom - Tuscany SDO Implementation Project - 1.0-SNAPSHOT - - - - eclipse.emf - http://download.eclipse.org/tools/emf/maven2 - - true - - - - jsdelfino - http://people.apache.org/~jsdelfino/maven2 - - - - - 2.2.0 - - - - impl - tools - plugin - - - - install - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.4 - 1.4 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*TestCase.java - - - - - - - - - - junit - junit - 3.8.1 - test - - - - diff --git a/branches/java-post-M1/sdo/tools/pom.xml b/branches/java-post-M1/sdo/tools/pom.xml deleted file mode 100644 index ad7eacf2c4..0000000000 --- a/branches/java-post-M1/sdo/tools/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - org.apache.tuscany - tuscany-sdo - 1.0-SNAPSHOT - - 4.0.0 - tuscany-sdo-tools - Tuscany SDO Tools - SDO Tools. - - - - org.apache.tuscany - tuscany-sdo-impl - ${pom.version} - compile - - - - org.eclipse.emf - codegen - ${emfVersion} - compile - - - - org.eclipse.emf - codegen-ecore - ${emfVersion} - compile - - - - junit - junit - - - diff --git a/branches/java-post-M1/sdo/tools/readme.htm b/branches/java-post-M1/sdo/tools/readme.htm deleted file mode 100644 index 1d96e24387..0000000000 --- a/branches/java-post-M1/sdo/tools/readme.htm +++ /dev/null @@ -1,29 +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/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java deleted file mode 100644 index 5bf5eba837..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/Interface2JavaGenerator.java +++ /dev/null @@ -1,242 +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.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(" [ -namespace ]"); - System.out.println(" [ -prefix ]"); - System.out.println(" [ -sparsePattern | -storePattern ]"); - System.out.println(" [ -noInterfaces ]"); - System.out.println(" [ -noContainment ]"); - System.out.println(" [ -noNotification ]"); - System.out.println(" [ -arrayAccessors ]"); - System.out.println(" [ -generateLoader ]"); - System.out.println(" [ -noUnsettable ]"); - System.out.println(" [ -noEMF ]"); - System.out.println(" interface-names"); - System.out.println(""); - System.out.println("For example:"); - System.out.println(""); - System.out.println(" generate somepackage.InterfaceA somepackage.InterfaceB"); - } - -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java deleted file mode 100644 index f12a2667ee..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/JavaGenerator.java +++ /dev/null @@ -1,616 +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.generate; - - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; - -import org.apache.tuscany.sdo.generate.adapter.SDOGenModelGeneratorAdapterFactory; -import org.apache.tuscany.sdo.helper.XSDHelperImpl; -import org.apache.tuscany.sdo.impl.SDOPackageImpl; -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.codegen.ecore.generator.Generator; -import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory; -import org.eclipse.emf.codegen.ecore.genmodel.GenClass; -import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind; -import org.eclipse.emf.codegen.ecore.genmodel.GenModel; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelFactory; -import org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage; -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; -import org.eclipse.emf.codegen.ecore.genmodel.GenResourceKind; -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter; -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory; -import org.eclipse.emf.codegen.util.CodeGenUtil; -import org.eclipse.emf.common.util.BasicMonitor; -import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.impl.EPackageRegistryImpl; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.BasicExtendedMetaData; -import org.eclipse.emf.ecore.util.Diagnostician; -import org.eclipse.emf.ecore.util.ExtendedMetaData; -import org.eclipse.xsd.XSDSchema; - -import commonj.sdo.helper.XSDHelper; - -/** - * Abstract base class for static SDO code generators. See XSD2JavaGenerator and Interface2JavaGenerator for - * concrete generator commands. - * - * Supports the following command line options: - * - * [ -targetDirectory ] - * [ -javaPackage ] - * [ -prefix ] - * [ -sparsePattern | -storePattern ] - * [ -noInterfaces ] - * [ -noContainment ] - * [ -noNotification ] - * [ -arrayAccessors ] - * [ -generateLoader ] - * [ -noUnsettable ] - * [ -noEMF ] - * - * Basic options: - * - * -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. - * -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". - * -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. - * -noEMF - * This option is used to generate static classes that have no references to EMF classes. This - * feature is currently being implemented and is in a preliminary state. - * - * The following options can be used to increase performance, but with some loss of SDO functionality: - * - * -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. - * - * Following are planned but not supported yet: - * - * -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. - * -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 - * is not necessary. - * -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. - * -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". - * - */ -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_NO_EMF=0x200; - - 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")) - { - genOptions |= OPTION_NO_EMF; - } - //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 XSDHelperImpl(extendedMetaData); - - 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(); - } - } - - public static void generatePackages(Collection packageList, String packageURI, String shortName, String targetDirectory, String javaPackage, String prefix, int genOptions) - { - ResourceSet resourceSet = DataObjectUtil.createResourceSet(); - List usedGenPackages = new ArrayList(); - GenModel genModel = null; - for (Iterator iter = packageList.iterator(); iter.hasNext();) - { - EPackage currentEPackage = (EPackage)iter.next(); - String currentBasePackage = extractBasePackageName(currentEPackage, javaPackage); - String currentPrefix = prefix == null ? CodeGenUtil.capName(shortName != null ? shortName : currentEPackage.getName()) : prefix; - GenPackage currentGenPackage = createGenPackage(currentEPackage, currentBasePackage, currentPrefix, genOptions, resourceSet); - if (currentEPackage.getNsURI().equals(packageURI)) - { - genModel = currentGenPackage.getGenModel(); - } - else - { - usedGenPackages.add(currentGenPackage); - } - } - - if (genModel == null) return; // nothing to generate - - usedGenPackages.add(createGenPackage(SDOPackageImpl.eINSTANCE, "org.apache.tuscany", "SDO", 0, resourceSet)); - usedGenPackages.add(createGenPackage(ModelPackageImpl.eINSTANCE, "org.apache.tuscany.sdo", "Model", 0, resourceSet)); - genModel.getUsedGenPackages().addAll(usedGenPackages); - - // Invoke the SDO JavaGenerator to generate the SDO classes - try - { - generateFromGenModel(genModel, new File(targetDirectory).getCanonicalPath(), genOptions); - } - catch (IOException e) - { - e.printStackTrace(); - } - } - - /** - * @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(); - } - - public static GenPackage createGenPackage(EPackage ePackage, String basePackage, String prefix, int genOptions, ResourceSet resourceSet) - { - GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions); - - URI ecoreURI = URI.createURI("file:///" + ePackage.getName() + ".ecore"); - URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel"); - - Resource ecoreResource = resourceSet.createResource(ecoreURI); - ecoreResource.getContents().add(ePackage); - - Resource genModelResource = resourceSet.createResource(genModelURI); - genModelResource.getContents().add(genModel); - - return (GenPackage)genModel.getGenPackages().get(0); - } - - public static void generateFromEPackage(EPackage ePackage, String targetDirectory, String basePackage, String prefix, int genOptions) - { - GenModel genModel = ecore2GenModel(ePackage, basePackage, prefix, genOptions); - - ResourceSet resourceSet = DataObjectUtil.createResourceSet(); - URI ecoreURI = URI.createURI("file:///temp.ecore"); - URI genModelURI = ecoreURI.trimFileExtension().appendFileExtension("genmodel"); - - Resource ecoreResource = resourceSet.createResource(ecoreURI); - ecoreResource.getContents().add(ePackage); - - Resource genModelResource = resourceSet.createResource(genModelURI); - genModelResource.getContents().add(genModel); - - generateFromGenModel(genModel, targetDirectory, genOptions); - } - - public static void generateFromGenModel(GenModel genModel, String targetDirectory, int genOptions) - { - Resource resource = genModel.eResource(); - - if (targetDirectory != null) - { - resource.getResourceSet().getURIConverter().getURIMap().put( - URI.createURI("platform:/resource/TargetProject/"), - URI.createFileURI(targetDirectory + "/")); - genModel.setModelDirectory("/TargetProject"); - } - - //genModel.gen(new BasicMonitor.Printing(System.out)); - GeneratorAdapterFactory.Descriptor.Registry.INSTANCE.addDescriptor - (GenModelPackage.eNS_URI, GenModelGeneratorAdapterFactory.DESCRIPTOR); - - Generator generator = new Generator(); - - if ((genOptions & OPTION_NO_EMF) != 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) - { - GenModel genModel = GenModelFactory.eINSTANCE.createGenModel(); - genModel.initialize(Collections.singleton(ePackage)); - - genModel.setRootExtendsInterface(""); - genModel.setRootImplementsInterface("commonj.sdo.DataObject"); - genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.DataObjectImpl"); - 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_NO_EMF) != 0) - { - genModel.setRootExtendsClass("org.apache.tuscany.sdo.impl.DataObjectBase"); - } - - GenPackage genPackage = (GenPackage)genModel.getGenPackages().get(0); - - if (basePackage != null) - { - genPackage.setBasePackage(basePackage); - } - if (prefix != null) - { - genPackage.setPrefix(prefix); - } - - //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 iter = genPackage.getGenClasses().iterator(); iter.hasNext();) - { - GenClass genClass = (GenClass)iter.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 arguments:"); - System.out.println(" [ -targetDirectory ]"); - System.out.println(" [ -javaPackage ]"); - System.out.println(" [ -prefix ]"); - System.out.println(" [ -sparsePattern | -storePattern ]"); - System.out.println(" [ -noInterfaces ]"); - System.out.println(" [ -noContainment ]"); - System.out.println(" [ -noNotification ]"); - System.out.println(" [ -arrayAccessors ]"); - System.out.println(" [ -generateLoader ]"); - System.out.println(" [ -noUnsettable ]"); - System.out.println(" [ -noEMF ]"); - System.out.println(" | "); - System.out.println(""); - System.out.println("For example:"); - System.out.println(""); - System.out.println(" generate somedir/somefile.xsd"); - } - -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java deleted file mode 100644 index d14604b65c..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/XSD2JavaGenerator.java +++ /dev/null @@ -1,179 +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.generate; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; - -import org.apache.tuscany.sdo.helper.XSDHelperImpl; -import org.apache.tuscany.sdo.util.DataObjectUtil; -import org.eclipse.emf.common.util.URI; -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.ExtendedMetaData; -import org.eclipse.xsd.XSDSchema; - -import commonj.sdo.helper.XSDHelper; - -public class XSD2JavaGenerator extends JavaGenerator -{ - /** - * Generate static SDOs from XML Schema - * - * Usage arguments: see JavaGenerator - * - * [ -targetDirectory ] - * [ -javaPackage ] - * [ -schemaNamespace ] - * [ 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. - * - * NOTE: see the base class JavaGenerator for other options. - * - * Example: - * - * generate somedir/somefile.xsd - * - * See base class JavaGenerator for details and the other options. - * - */ - public static void main(String args[]) - { - try - { - XSD2JavaGenerator generator = new XSD2JavaGenerator(); - generator.processArguments(args); - generator.run(args); - } - catch (IllegalArgumentException e) - { - printUsage(); - } - } - - protected String schemaNamespace = null; - - protected int handleArgument(String args[], int index) - { - if (args[index].equalsIgnoreCase("-schemaNamespace")) - { - schemaNamespace = args[++index]; - } - else - { - return super.handleArgument(args, index); - } - - return index + 1; - } - - protected void run(String args[]) - { - String xsdFileName = args[inputIndex]; - generateFromXMLSchema(xsdFileName, schemaNamespace, targetDirectory, javaPackage, prefix, genOptions); - } - - public static void generateFromXMLSchema(String xsdFileName, String namespace, 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 XSDHelperImpl(extendedMetaData); - - 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 = namespace != null ? namespace : 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(); - } - } - - public static String getSchemaNamespace(String xsdFileName) - { - ResourceSet resourceSet = DataObjectUtil.createResourceSet(); - File inputFile = new File(xsdFileName).getAbsoluteFile(); - Resource model = resourceSet.getResource(URI.createURI(inputFile.toURI().toString()), true); - XSDSchema schema = (XSDSchema)model.getContents().get(0); - return schema.getTargetNamespace(); - } - - protected static void printUsage() - { - System.out.println("Usage arguments:"); - System.out.println(" [ -targetDirectory ]"); - System.out.println(" [ -javaPackage ]"); - System.out.println(" [ -schemaNamespace ]"); - System.out.println(" [ -prefix ]"); - System.out.println(" [ -sparsePattern | -storePattern ]"); - System.out.println(" [ -noInterfaces ]"); - System.out.println(" [ -noContainment ]"); - System.out.println(" [ -noNotification ]"); - System.out.println(" [ -arrayAccessors ]"); - System.out.println(" [ -generateLoader ]"); - System.out.println(" [ -noUnsettable ]"); - System.out.println(" [ -noEMF ]"); - System.out.println(" | "); - System.out.println(""); - System.out.println("For example:"); - System.out.println(""); - System.out.println(" generate somedir/somefile.xsd"); - } - -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java deleted file mode 100644 index 965307eefc..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenClassGeneratorAdapter.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.generate.adapter; - -import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory; -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenClassGeneratorAdapter; - -public class SDOGenClassGeneratorAdapter extends GenClassGeneratorAdapter { - - public SDOGenClassGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory) - { - super(generatorAdapterFactory); - } - - private static JETEmitterDescriptor[] jetEmitterDescriptors; - - protected JETEmitterDescriptor[] getJETEmitterDescriptors() - { - if (jetEmitterDescriptors == null) - { - JETEmitterDescriptor[] base = super.getJETEmitterDescriptors(); - jetEmitterDescriptors = new JETEmitterDescriptor[base.length]; - System.arraycopy(base, 0, jetEmitterDescriptors, 0, base.length); - jetEmitterDescriptors[CLASS_ID] = new JETEmitterDescriptor("model/SDOClass.javajet", "org.apache.tuscany.sdo.generate.templates.model.SDOClass"); - } - return jetEmitterDescriptors; - } - -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java deleted file mode 100644 index aa47d612ed..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.generate.adapter; - -import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory; -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory; -import org.eclipse.emf.common.notify.Adapter; - -public class SDOGenModelGeneratorAdapterFactory extends - GenModelGeneratorAdapterFactory { - - public static final GeneratorAdapterFactory.Descriptor DESCRIPTOR = new GeneratorAdapterFactory.Descriptor() - { - public GeneratorAdapterFactory createAdapterFactory() - { - return new SDOGenModelGeneratorAdapterFactory(); - } - }; - - public Adapter createGenClassAdapter() - { - if (genClassGeneratorAdapter == null) - { - genClassGeneratorAdapter = new SDOGenClassGeneratorAdapter(this); - } - return genClassGeneratorAdapter; - } - - public Adapter createGenPackageAdapter() - { - if (genPackageGeneratorAdapter == null) - { - genPackageGeneratorAdapter = new SDOGenPackageGeneratorAdapter(this); - } - return genPackageGeneratorAdapter; - } -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java deleted file mode 100644 index b8e33fefc5..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenPackageGeneratorAdapter.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.generate.adapter; - -import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory; -import org.eclipse.emf.codegen.ecore.genmodel.GenPackage; -import org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter; -import org.eclipse.emf.common.util.Monitor; - -public class SDOGenPackageGeneratorAdapter extends GenPackageGeneratorAdapter -{ - public SDOGenPackageGeneratorAdapter(GeneratorAdapterFactory generatorAdapterFactory) - { - super(generatorAdapterFactory); - } - - private static JETEmitterDescriptor[] jetEmitterDescriptors; - - protected JETEmitterDescriptor[] getJETEmitterDescriptors() - { - if (jetEmitterDescriptors == null) - { - JETEmitterDescriptor[] base = super.getJETEmitterDescriptors(); - jetEmitterDescriptors = new JETEmitterDescriptor[base.length]; - System.arraycopy(base, 0, jetEmitterDescriptors, 0, base.length); - jetEmitterDescriptors[FACTORY_CLASS_ID] = new JETEmitterDescriptor("model/SDOFactoryClass.javajet", "org.apache.tuscany.sdo.generate.templates.model.SDOFactoryClass"); - } - return jetEmitterDescriptors; - } - - protected void generatePackageClass(GenPackage genPackage, Monitor monitor) - { - // do nothing - } -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java deleted file mode 100644 index f1e1db7bbc..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOClass.java +++ /dev/null @@ -1,4165 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.generate.templates.model; - -import java.util.*; -import org.eclipse.emf.codegen.ecore.genmodel.*; - -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 + "/**" + NL + " * " + NL + " * A representation of the model object '"; - protected final String TEXT_12 = "'." + NL + " * "; - protected final String TEXT_13 = NL + " *" + NL + " * " + NL + " * "; - protected final String TEXT_14 = NL + " * "; - protected final String TEXT_15 = NL + " *"; - protected final String TEXT_16 = NL + " *

      " + NL + " * The following features are supported:" + NL + " *

        "; - protected final String TEXT_17 = NL + " *
      • {@link "; - protected final String TEXT_18 = "#"; - protected final String TEXT_19 = " "; - protected final String TEXT_20 = "}
      • "; - protected final String TEXT_21 = NL + " *
      " + NL + " *

      "; - protected final String TEXT_22 = NL + " *"; - protected final String TEXT_23 = NL + " * @see "; - protected final String TEXT_24 = "#get"; - protected final String TEXT_25 = "()"; - protected final String TEXT_26 = NL + " * @model "; - protected final String TEXT_27 = NL + " * "; - protected final String TEXT_28 = NL + " * @model"; - protected final String TEXT_29 = NL + " * @extends "; - protected final String TEXT_30 = NL + " * @generated" + NL + " */"; - protected final String TEXT_31 = NL + "/**" + NL + " * " + NL + " * An implementation of the model object '"; - protected final String TEXT_32 = "'." + NL + " * " + NL + " *

      "; - protected final String TEXT_33 = NL + " * The following features are implemented:" + NL + " *

        "; - protected final String TEXT_34 = NL + " *
      • {@link "; - protected final String TEXT_35 = "#"; - protected final String TEXT_36 = " "; - protected final String TEXT_37 = "}
      • "; - protected final String TEXT_38 = NL + " *
      "; - protected final String TEXT_39 = NL + " *

      " + NL + " *" + NL + " * @generated" + NL + " */"; - protected final String TEXT_40 = NL + "public"; - protected final String TEXT_41 = " abstract"; - protected final String TEXT_42 = " class "; - protected final String TEXT_43 = NL + "public interface "; - protected final String TEXT_44 = NL + "{"; - protected final String TEXT_45 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\t"; - protected final String TEXT_46 = " copyright = \""; - protected final String TEXT_47 = "\";"; - protected final String TEXT_48 = NL; - protected final String TEXT_49 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final "; - protected final String TEXT_50 = " mofDriverNumber = \""; - protected final String TEXT_51 = "\";"; - protected final String TEXT_52 = NL; - protected final String TEXT_53 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static final long serialVersionUID = 1L;" + NL; - protected final String TEXT_54 = 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_55 = " = null;" + NL; - protected final String TEXT_56 = 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_57 = " = 0;" + NL; - protected final String TEXT_58 = 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_59 = " = 0;" + NL; - protected final String TEXT_60 = NL + "\t/**" + NL + "\t * The feature id for the '"; - protected final String TEXT_61 = "' "; - protected final String TEXT_62 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tpublic final static int "; - protected final String TEXT_63 = " = "; - protected final String TEXT_64 = ";" + NL; - protected final String TEXT_65 = NL + "\t/**" + NL + "\t * The cached value of the '{@link #"; - protected final String TEXT_66 = "() "; - protected final String TEXT_67 = "}' "; - protected final String TEXT_68 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @see #"; - protected final String TEXT_69 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\t" + NL + "\t// How to get BasicSequence from Sequence?" + NL + "\t"; - protected final String TEXT_70 = NL + "\tprotected "; - protected final String TEXT_71 = " "; - protected final String TEXT_72 = " = null;" + NL + "\t"; - protected final String TEXT_73 = NL + "\tprotected "; - protected final String TEXT_74 = " "; - protected final String TEXT_75 = " = null;"; - protected final String TEXT_76 = NL + "\t/**" + NL + "\t * The empty value for the '{@link #"; - protected final String TEXT_77 = "() "; - protected final String TEXT_78 = "}' array accessor." + NL + "\t * " + NL + "\t * " + NL + "\t * @see #"; - protected final String TEXT_79 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final "; - protected final String TEXT_80 = "[] "; - protected final String TEXT_81 = "_EEMPTY_ARRAY = new "; - protected final String TEXT_82 = " [0];" + NL; - protected final String TEXT_83 = NL + "\t/**" + NL + "\t * The default value of the '{@link #"; - protected final String TEXT_84 = "() "; - protected final String TEXT_85 = "}' "; - protected final String TEXT_86 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @see #"; - protected final String TEXT_87 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final "; - protected final String TEXT_88 = " "; - protected final String TEXT_89 = "_DEFAULT_ = "; - protected final String TEXT_90 = ";"; - protected final String TEXT_91 = NL; - protected final String TEXT_92 = 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_93 = " = 0;" + NL; - protected final String TEXT_94 = NL + "\t/**" + NL + "\t * The flag representing the value of the '{@link #"; - protected final String TEXT_95 = "() "; - protected final String TEXT_96 = "}' "; - protected final String TEXT_97 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @see #"; - protected final String TEXT_98 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final int "; - protected final String TEXT_99 = "_EFLAG = 1 "; - protected final String TEXT_100 = ";" + NL; - protected final String TEXT_101 = NL + "\t/**" + NL + "\t * The cached value of the '{@link #"; - protected final String TEXT_102 = "() "; - protected final String TEXT_103 = "}' "; - protected final String TEXT_104 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @see #"; - protected final String TEXT_105 = "()" + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected "; - protected final String TEXT_106 = " "; - protected final String TEXT_107 = " = "; - protected final String TEXT_108 = "_DEFAULT_;" + NL; - protected final String TEXT_109 = 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_110 = " = 0;" + NL; - protected final String TEXT_111 = NL + "\t/**" + NL + "\t * The flag representing whether the "; - protected final String TEXT_112 = " "; - protected final String TEXT_113 = " has been set." + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected static final int "; - protected final String TEXT_114 = "_ESETFLAG = 1 "; - protected final String TEXT_115 = ";" + NL; - protected final String TEXT_116 = NL + "\t/**" + NL + "\t * This is true if the "; - protected final String TEXT_117 = " "; - protected final String TEXT_118 = " has been set." + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t * @ordered" + NL + "\t */" + NL + "\tprotected boolean "; - protected final String TEXT_119 = "_set_ = false;" + NL; - protected final String TEXT_120 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; - protected final String TEXT_121 = "()" + NL + "\t{" + NL + "\t\tsuper();"; - protected final String TEXT_122 = NL + "\t\t"; - protected final String TEXT_123 = " |= "; - protected final String TEXT_124 = "_EFLAG;"; - protected final String TEXT_125 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_126 = " getType()" + NL + "\t{" + NL + "\t\treturn "; - protected final String TEXT_127 = ".INSTANCE.getType("; - protected final String TEXT_128 = ".class); //TBD Generate a more efficient implementation" + NL + "\t}" + NL; - protected final String TEXT_129 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_130 = NL + "\t"; - protected final String TEXT_131 = "[] "; - protected final String TEXT_132 = "();" + NL; - protected final String TEXT_133 = NL + "\tpublic "; - protected final String TEXT_134 = "[] "; - protected final String TEXT_135 = "()" + NL + "\t{"; - protected final String TEXT_136 = NL + "\t\t"; - protected final String TEXT_137 = " list = ("; - protected final String TEXT_138 = ")"; - protected final String TEXT_139 = "();" + NL + "\t\tif (list.isEmpty()) return "; - protected final String TEXT_140 = "_EEMPTY_ARRAY;"; - protected final String TEXT_141 = NL + "\t\tif ("; - protected final String TEXT_142 = " == null || "; - protected final String TEXT_143 = ".isEmpty()) return "; - protected final String TEXT_144 = "_EEMPTY_ARRAY;" + NL + "\t\t"; - protected final String TEXT_145 = " list = ("; - protected final String TEXT_146 = ")"; - protected final String TEXT_147 = ";"; - protected final String TEXT_148 = NL + "\t\tlist.shrink();" + NL + "\t\treturn ("; - protected final String TEXT_149 = "[])list.data();" + NL + "\t}" + NL; - protected final String TEXT_150 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_151 = NL + "\t"; - protected final String TEXT_152 = " get"; - protected final String TEXT_153 = "(int index);" + NL; - protected final String TEXT_154 = NL + "\tpublic "; - protected final String TEXT_155 = " get"; - protected final String TEXT_156 = "(int index)" + NL + "\t{" + NL + "\t\treturn ("; - protected final String TEXT_157 = ")"; - protected final String TEXT_158 = "().get(index);" + NL + "\t}" + NL; - protected final String TEXT_159 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_160 = NL + "\tint get"; - protected final String TEXT_161 = "Length();" + NL; - protected final String TEXT_162 = NL + "\tpublic int get"; - protected final String TEXT_163 = "Length()" + NL + "\t{"; - protected final String TEXT_164 = NL + "\t\treturn "; - protected final String TEXT_165 = "().size();"; - protected final String TEXT_166 = NL + "\t\treturn "; - protected final String TEXT_167 = " == null ? 0 : "; - protected final String TEXT_168 = ".size();"; - protected final String TEXT_169 = NL + "\t}" + NL; - protected final String TEXT_170 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_171 = NL + "\tvoid set"; - protected final String TEXT_172 = "("; - protected final String TEXT_173 = "[] new"; - protected final String TEXT_174 = ");" + NL; - protected final String TEXT_175 = NL + "\tpublic void set"; - protected final String TEXT_176 = "("; - protected final String TEXT_177 = "[] new"; - protected final String TEXT_178 = ")" + NL + "\t{" + NL + "\t\t(("; - protected final String TEXT_179 = ")"; - protected final String TEXT_180 = "()).setData(new"; - protected final String TEXT_181 = ".length, new"; - protected final String TEXT_182 = ");" + NL + "\t}" + NL; - protected final String TEXT_183 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_184 = NL + "\tvoid set"; - protected final String TEXT_185 = "(int index, "; - protected final String TEXT_186 = " element);" + NL; - protected final String TEXT_187 = NL + "\tpublic void set"; - protected final String TEXT_188 = "(int index, "; - protected final String TEXT_189 = " element)" + NL + "\t{" + NL + "\t\t"; - protected final String TEXT_190 = "().set(index, element);" + NL + "\t}" + NL; - protected final String TEXT_191 = NL + "\t/**" + NL + "\t * Returns the value of the '"; - protected final String TEXT_192 = "' "; - protected final String TEXT_193 = "."; - protected final String TEXT_194 = NL + "\t * The key is of type "; - protected final String TEXT_195 = "list of {@link "; - protected final String TEXT_196 = "}"; - protected final String TEXT_197 = "{@link "; - protected final String TEXT_198 = "}"; - protected final String TEXT_199 = "," + NL + "\t * and the value is of type "; - protected final String TEXT_200 = "list of {@link "; - protected final String TEXT_201 = "}"; - protected final String TEXT_202 = "{@link "; - protected final String TEXT_203 = "}"; - protected final String TEXT_204 = ","; - protected final String TEXT_205 = NL + "\t * The list contents are of type {@link "; - protected final String TEXT_206 = "}."; - protected final String TEXT_207 = NL + "\t * The default value is "; - protected final String TEXT_208 = "."; - protected final String TEXT_209 = NL + "\t * The literals are from the enumeration {@link "; - protected final String TEXT_210 = "}."; - protected final String TEXT_211 = NL + "\t * It is bidirectional and its opposite is '{@link "; - protected final String TEXT_212 = "#"; - protected final String TEXT_213 = " "; - protected final String TEXT_214 = "}'."; - protected final String TEXT_215 = NL + "\t * "; - protected final String TEXT_216 = NL + "\t *

      " + NL + "\t * If the meaning of the '"; - protected final String TEXT_217 = "' "; - protected final String TEXT_218 = " isn't clear," + NL + "\t * there really should be more of a description here..." + NL + "\t *

      "; - protected final String TEXT_219 = NL + "\t * "; - protected final String TEXT_220 = NL + "\t * " + NL + "\t * "; - protected final String TEXT_221 = NL + "\t * "; - protected final String TEXT_222 = NL + "\t * @return the value of the '"; - protected final String TEXT_223 = "' "; - protected final String TEXT_224 = "."; - protected final String TEXT_225 = NL + "\t * @see "; - protected final String TEXT_226 = NL + "\t * @see #isSet"; - protected final String TEXT_227 = "()"; - protected final String TEXT_228 = NL + "\t * @see #unset"; - protected final String TEXT_229 = "()"; - protected final String TEXT_230 = NL + "\t * @see #set"; - protected final String TEXT_231 = "("; - protected final String TEXT_232 = ")"; - protected final String TEXT_233 = NL + "\t * @see "; - protected final String TEXT_234 = "#get"; - protected final String TEXT_235 = "()"; - protected final String TEXT_236 = NL + "\t * @see "; - protected final String TEXT_237 = "#"; - protected final String TEXT_238 = NL + "\t * @model "; - protected final String TEXT_239 = NL + "\t * "; - protected final String TEXT_240 = NL + "\t * @model"; - protected final String TEXT_241 = NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_242 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_243 = NL + "\t"; - protected final String TEXT_244 = " "; - protected final String TEXT_245 = "();" + NL; - protected final String TEXT_246 = NL + "\tpublic "; - protected final String TEXT_247 = " "; - protected final String TEXT_248 = "()" + NL + "\t{"; - protected final String TEXT_249 = NL + "\t\treturn "; - protected final String TEXT_250 = "("; - protected final String TEXT_251 = "("; - protected final String TEXT_252 = ")get("; - protected final String TEXT_253 = ", true)"; - protected final String TEXT_254 = ")."; - protected final String TEXT_255 = "()"; - protected final String TEXT_256 = ";"; - protected final String TEXT_257 = NL + "\t\t"; - protected final String TEXT_258 = " "; - protected final String TEXT_259 = " = ("; - protected final String TEXT_260 = ")eVirtualGet("; - protected final String TEXT_261 = ");"; - protected final String TEXT_262 = NL + "\t\tif ("; - protected final String TEXT_263 = " == null)" + NL + "\t\t{"; - protected final String TEXT_264 = NL + "\t\t\teVirtualSet("; - protected final String TEXT_265 = ", "; - protected final String TEXT_266 = " = new "; - protected final String TEXT_267 = ");"; - protected final String TEXT_268 = NL + " \t\t"; - protected final String TEXT_269 = " = createSequence("; - protected final String TEXT_270 = ");" + NL + " \t"; - protected final String TEXT_271 = NL + " \t\t\t"; - protected final String TEXT_272 = " = createPropertyList(ListKind.CONTAINMENT, "; - protected final String TEXT_273 = ".class, "; - protected final String TEXT_274 = ");" + NL + " \t\t"; - protected final String TEXT_275 = NL + "\t\t}" + NL + "\t\treturn "; - protected final String TEXT_276 = ";"; - protected final String TEXT_277 = NL + "\t\tif (eContainerFeatureID != "; - protected final String TEXT_278 = ") return null;" + NL + "\t\treturn ("; - protected final String TEXT_279 = ")eContainer();"; - protected final String TEXT_280 = NL + "\t\t"; - protected final String TEXT_281 = " "; - protected final String TEXT_282 = " = ("; - protected final String TEXT_283 = ")eVirtualGet("; - protected final String TEXT_284 = ", "; - protected final String TEXT_285 = "_DEFAULT_"; - protected final String TEXT_286 = ");"; - protected final String TEXT_287 = NL + "\t\tif ("; - protected final String TEXT_288 = " != null && "; - protected final String TEXT_289 = ".isProxy())" + NL + "\t\t{" + NL + "\t\t\t"; - protected final String TEXT_290 = " old"; - protected final String TEXT_291 = " = ("; - protected final String TEXT_292 = ")"; - protected final String TEXT_293 = ";" + NL + "\t\t\t"; - protected final String TEXT_294 = " = "; - protected final String TEXT_295 = "eResolveProxy(old"; - protected final String TEXT_296 = ");" + NL + "\t\t\tif ("; - protected final String TEXT_297 = " != old"; - protected final String TEXT_298 = ")" + NL + "\t\t\t{"; - protected final String TEXT_299 = NL + "\t\t\t\t"; - protected final String TEXT_300 = " new"; - protected final String TEXT_301 = " = ("; - protected final String TEXT_302 = ")"; - protected final String TEXT_303 = ";"; - protected final String TEXT_304 = NL + "\t\t\t\tChangeContext changeContext = old"; - protected final String TEXT_305 = ".inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_306 = ", null, null);"; - protected final String TEXT_307 = NL + "\t\t\t\t"; - protected final String TEXT_308 = " changeContext = old"; - protected final String TEXT_309 = ".inverseRemove(this, "; - protected final String TEXT_310 = ", "; - protected final String TEXT_311 = ".class, null);"; - protected final String TEXT_312 = NL + "\t\t\t\tif (new"; - protected final String TEXT_313 = ".eInternalContainer() == null)" + NL + "\t\t\t\t{"; - protected final String TEXT_314 = NL + "\t\t\t\t\tchangeContext = new"; - protected final String TEXT_315 = ".eInverseAdd(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_316 = ", null, changeContext);"; - protected final String TEXT_317 = NL + "\t\t\t\t\tchangeContext = new"; - protected final String TEXT_318 = ".eInverseAdd(this, "; - protected final String TEXT_319 = ", "; - protected final String TEXT_320 = ".class, changeContext);"; - protected final String TEXT_321 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (changeContext != null) changeContext.dispatch();"; - protected final String TEXT_322 = NL + "\t\t\t\teVirtualSet("; - protected final String TEXT_323 = ", "; - protected final String TEXT_324 = ");"; - protected final String TEXT_325 = NL + "\t\t\t\tif (isNotifying())" + NL + "\t\t\t\t\tnotify(ChangeKind.RESOLVE, "; - protected final String TEXT_326 = ", old"; - protected final String TEXT_327 = ", "; - protected final String TEXT_328 = ");"; - protected final String TEXT_329 = NL + "\t\t\t}" + NL + "\t\t}"; - protected final String TEXT_330 = NL + "\t\treturn ("; - protected final String TEXT_331 = ")eVirtualGet("; - protected final String TEXT_332 = ", "; - protected final String TEXT_333 = "_DEFAULT_"; - protected final String TEXT_334 = ");"; - protected final String TEXT_335 = NL + "\t\treturn ("; - protected final String TEXT_336 = " & "; - protected final String TEXT_337 = "_EFLAG) != 0;"; - protected final String TEXT_338 = NL + "\t\treturn "; - protected final String TEXT_339 = ";"; - protected final String TEXT_340 = NL + "\t\t"; - protected final String TEXT_341 = " "; - protected final String TEXT_342 = " = basicGet"; - protected final String TEXT_343 = "();" + NL + "\t\treturn "; - protected final String TEXT_344 = " != null && "; - protected final String TEXT_345 = ".isProxy() ? "; - protected final String TEXT_346 = "eResolveProxy(("; - protected final String TEXT_347 = ")"; - protected final String TEXT_348 = ") : "; - protected final String TEXT_349 = ";"; - protected final String TEXT_350 = NL + "\t\treturn create"; - protected final String TEXT_351 = "(get"; - protected final String TEXT_352 = "(), getType(), "; - protected final String TEXT_353 = ");"; - protected final String TEXT_354 = NL + "\t\treturn ("; - protected final String TEXT_355 = ")(("; - protected final String TEXT_356 = ")get"; - protected final String TEXT_357 = "()).list("; - protected final String TEXT_358 = ");"; - protected final String TEXT_359 = NL + " return get"; - protected final String TEXT_360 = "(get"; - protected final String TEXT_361 = "(), getType(), "; - protected final String TEXT_362 = ");" + NL; - protected final String TEXT_363 = NL + "\t\treturn (("; - protected final String TEXT_364 = ")get"; - protected final String TEXT_365 = "()).list("; - protected final String TEXT_366 = ");"; - protected final String TEXT_367 = NL + "\t\treturn "; - protected final String TEXT_368 = "("; - protected final String TEXT_369 = "("; - protected final String TEXT_370 = ")get(get"; - protected final String TEXT_371 = "(), getType(), "; - protected final String TEXT_372 = ")"; - protected final String TEXT_373 = ")."; - protected final String TEXT_374 = "()"; - protected final String TEXT_375 = ";"; - protected final String TEXT_376 = NL + "\t\treturn "; - protected final String TEXT_377 = "("; - protected final String TEXT_378 = "("; - protected final String TEXT_379 = ")get(get"; - protected final String TEXT_380 = "(), getType(), "; - protected final String TEXT_381 = ");"; - protected final String TEXT_382 = ")."; - protected final String TEXT_383 = "()"; - protected final String TEXT_384 = ";"; - protected final String TEXT_385 = NL + "\t\t// TODO: implement this method to return the '"; - protected final String TEXT_386 = "' "; - protected final String TEXT_387 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; - protected final String TEXT_388 = NL + "\t}" + NL; - protected final String TEXT_389 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_390 = " basicGet"; - protected final String TEXT_391 = "()" + NL + "\t{"; - protected final String TEXT_392 = NL + "\t\tif (eContainerFeatureID != "; - protected final String TEXT_393 = ") return null;" + NL + "\t\treturn ("; - protected final String TEXT_394 = ")eInternalContainer();"; - protected final String TEXT_395 = NL + "\t\treturn ("; - protected final String TEXT_396 = ")eVirtualGet("; - protected final String TEXT_397 = ");"; - protected final String TEXT_398 = NL + "\t\treturn "; - protected final String TEXT_399 = ";"; - protected final String TEXT_400 = NL + "\t\treturn ("; - protected final String TEXT_401 = ")get(get"; - protected final String TEXT_402 = "(), getType(), "; - protected final String TEXT_403 = ");"; - protected final String TEXT_404 = NL + "\t\treturn ("; - protected final String TEXT_405 = ")get"; - protected final String TEXT_406 = "().get("; - protected final String TEXT_407 = ", false);"; - protected final String TEXT_408 = NL + "\t\t// TODO: implement this method to return the '"; - protected final String TEXT_409 = "' "; - protected final String TEXT_410 = 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_411 = NL + "\t}" + NL; - protected final String TEXT_412 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicSet"; - protected final String TEXT_413 = "("; - protected final String TEXT_414 = " new"; - protected final String TEXT_415 = ", ChangeContext changeContext)" + NL + "\t{"; - protected final String TEXT_416 = NL + "\t\tObject old"; - protected final String TEXT_417 = " = eVirtualSet("; - protected final String TEXT_418 = ", new"; - protected final String TEXT_419 = ");"; - protected final String TEXT_420 = NL + "\t\t"; - protected final String TEXT_421 = " old"; - protected final String TEXT_422 = " = "; - protected final String TEXT_423 = ";" + NL + "\t\t"; - protected final String TEXT_424 = " = new"; - protected final String TEXT_425 = ";"; - protected final String TEXT_426 = NL + "\t\tboolean isSetChange = old"; - protected final String TEXT_427 = " == EVIRTUAL_NO_VALUE;"; - protected final String TEXT_428 = NL + "\t\tboolean old"; - protected final String TEXT_429 = "_set_ = ("; - protected final String TEXT_430 = " & "; - protected final String TEXT_431 = "_ESETFLAG) != 0;" + NL + "\t\t"; - protected final String TEXT_432 = " |= "; - protected final String TEXT_433 = "_ESETFLAG;"; - protected final String TEXT_434 = NL + "\t\tboolean old"; - protected final String TEXT_435 = "_set_ = "; - protected final String TEXT_436 = "_set_;" + NL + "\t\t"; - protected final String TEXT_437 = "_set_ = true;"; - protected final String TEXT_438 = NL + "\t\tif (isNotifying())" + NL + "\t\t{"; - protected final String TEXT_439 = NL + "\t\t\t"; - protected final String TEXT_440 = " notification = new "; - protected final String TEXT_441 = "(this, "; - protected final String TEXT_442 = ".SET, "; - protected final String TEXT_443 = ", "; - protected final String TEXT_444 = "isSetChange ? null : old"; - protected final String TEXT_445 = "old"; - protected final String TEXT_446 = ", new"; - protected final String TEXT_447 = ", "; - protected final String TEXT_448 = "isSetChange"; - protected final String TEXT_449 = "!old"; - protected final String TEXT_450 = "_set_"; - protected final String TEXT_451 = ");"; - protected final String TEXT_452 = NL + "\t\t\t"; - protected final String TEXT_453 = " notification = new "; - protected final String TEXT_454 = "(this, "; - protected final String TEXT_455 = ".SET, "; - protected final String TEXT_456 = ", "; - protected final String TEXT_457 = "old"; - protected final String TEXT_458 = " == EVIRTUAL_NO_VALUE ? null : old"; - protected final String TEXT_459 = "old"; - protected final String TEXT_460 = ", new"; - protected final String TEXT_461 = ");"; - protected final String TEXT_462 = NL + "\t\t\tif (changeContext == null) changeContext = notification; else changeContext.add(notification);" + NL + "\t\t}"; - protected final String TEXT_463 = NL + "\t\treturn changeContext;"; - protected final String TEXT_464 = NL + "\t\treturn (("; - protected final String TEXT_465 = ".Internal)(("; - protected final String TEXT_466 = ".Internal.Wrapper)get"; - protected final String TEXT_467 = "()).featureMap()).basicAdd("; - protected final String TEXT_468 = ", new"; - protected final String TEXT_469 = ", changeContext);"; - protected final String TEXT_470 = NL + "\t\treturn (("; - protected final String TEXT_471 = ".Internal)get"; - protected final String TEXT_472 = "()).basicAdd("; - protected final String TEXT_473 = ", new"; - protected final String TEXT_474 = ", changeContext);"; - protected final String TEXT_475 = NL + "\t\t// TODO: implement this method to set the contained '"; - protected final String TEXT_476 = "' "; - protected final String TEXT_477 = 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_478 = NL + "\t}" + NL; - protected final String TEXT_479 = NL + "\t/**" + NL + "\t * Sets the value of the '{@link "; - protected final String TEXT_480 = "#"; - protected final String TEXT_481 = " "; - protected final String TEXT_482 = "}' "; - protected final String TEXT_483 = "." + NL + "\t * " + NL + "\t * " + NL + "\t * @param value the new value of the '"; - protected final String TEXT_484 = "' "; - protected final String TEXT_485 = "."; - protected final String TEXT_486 = NL + "\t * @see "; - protected final String TEXT_487 = NL + "\t * @see #isSet"; - protected final String TEXT_488 = "()"; - protected final String TEXT_489 = NL + "\t * @see #unset"; - protected final String TEXT_490 = "()"; - protected final String TEXT_491 = NL + "\t * @see #"; - protected final String TEXT_492 = "()" + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_493 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_494 = NL + "\tvoid set"; - protected final String TEXT_495 = "("; - protected final String TEXT_496 = " value);" + NL; - protected final String TEXT_497 = NL + "\tpublic void set"; - protected final String TEXT_498 = "("; - protected final String TEXT_499 = " new"; - protected final String TEXT_500 = ")" + NL + "\t{"; - protected final String TEXT_501 = NL + "\t\t_set_("; - protected final String TEXT_502 = ", "; - protected final String TEXT_503 = "new "; - protected final String TEXT_504 = "("; - protected final String TEXT_505 = "new"; - protected final String TEXT_506 = ")"; - protected final String TEXT_507 = ");"; - protected final String TEXT_508 = NL + "\t\tif (new"; - protected final String TEXT_509 = " != eInternalContainer() || (eContainerFeatureID != "; - protected final String TEXT_510 = " && new"; - protected final String TEXT_511 = " != null))" + NL + "\t\t{" + NL + "\t\t\tif ("; - protected final String TEXT_512 = ".isAncestor(this, "; - protected final String TEXT_513 = "new"; - protected final String TEXT_514 = "))" + NL + "\t\t\t\tthrow new "; - protected final String TEXT_515 = "(\"Recursive containment not allowed for \" + toString());"; - protected final String TEXT_516 = 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_517 = " != null)" + NL + "\t\t\t\tchangeContext = (("; - protected final String TEXT_518 = ")new"; - protected final String TEXT_519 = ").eInverseAdd(this, "; - protected final String TEXT_520 = ", "; - protected final String TEXT_521 = ".class, changeContext);" + NL + "\t\t\tchangeContext = eBasicSetContainer(("; - protected final String TEXT_522 = ")new"; - protected final String TEXT_523 = ", "; - protected final String TEXT_524 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}"; - protected final String TEXT_525 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; - protected final String TEXT_526 = ", new"; - protected final String TEXT_527 = ", new"; - protected final String TEXT_528 = ");"; - protected final String TEXT_529 = NL + "\t\t"; - protected final String TEXT_530 = " "; - protected final String TEXT_531 = " = ("; - protected final String TEXT_532 = ")eVirtualGet("; - protected final String TEXT_533 = ");"; - protected final String TEXT_534 = NL + "\t\tif (new"; - protected final String TEXT_535 = " != "; - protected final String TEXT_536 = ")" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;" + NL + "\t\t\tif ("; - protected final String TEXT_537 = " != null)"; - protected final String TEXT_538 = NL + "\t\t\t\tchangeContext = (("; - protected final String TEXT_539 = ")"; - protected final String TEXT_540 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_541 = ", null, changeContext);" + NL + "\t\t\tif (new"; - protected final String TEXT_542 = " != null)" + NL + "\t\t\t\tchangeContext = (("; - protected final String TEXT_543 = ")new"; - protected final String TEXT_544 = ").eInverseAdd(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_545 = ", null, changeContext);"; - protected final String TEXT_546 = NL + "\t\t\t\tchangeContext = (("; - protected final String TEXT_547 = ")"; - protected final String TEXT_548 = ").inverseRemove(this, "; - protected final String TEXT_549 = ", "; - protected final String TEXT_550 = ".class, changeContext);" + NL + "\t\t\tif (new"; - protected final String TEXT_551 = " != null)" + NL + "\t\t\t\tchangeContext = (("; - protected final String TEXT_552 = ")new"; - protected final String TEXT_553 = ").eInverseAdd(this, "; - protected final String TEXT_554 = ", "; - protected final String TEXT_555 = ".class, changeContext);"; - protected final String TEXT_556 = NL + "\t\t\tchangeContext = basicSet"; - protected final String TEXT_557 = "("; - protected final String TEXT_558 = "new"; - protected final String TEXT_559 = ", changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}"; - protected final String TEXT_560 = NL + "\t\telse" + NL + " \t{"; - protected final String TEXT_561 = NL + "\t\t\tboolean old"; - protected final String TEXT_562 = "_set_ = eVirtualIsSet("; - protected final String TEXT_563 = ");"; - protected final String TEXT_564 = NL + "\t\t\tboolean old"; - protected final String TEXT_565 = "_set_ = ("; - protected final String TEXT_566 = " & "; - protected final String TEXT_567 = "_ESETFLAG) != 0;"; - protected final String TEXT_568 = NL + "\t\t\t"; - protected final String TEXT_569 = " |= "; - protected final String TEXT_570 = "_ESETFLAG;"; - protected final String TEXT_571 = NL + "\t\t\tboolean old"; - protected final String TEXT_572 = "_set_ = "; - protected final String TEXT_573 = "_set_;"; - protected final String TEXT_574 = NL + "\t\t\t"; - protected final String TEXT_575 = "_set_ = true;"; - protected final String TEXT_576 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.SET, "; - protected final String TEXT_577 = ", new"; - protected final String TEXT_578 = ", new"; - protected final String TEXT_579 = ", !old"; - protected final String TEXT_580 = "_set_);"; - protected final String TEXT_581 = NL + " \t}"; - protected final String TEXT_582 = NL + "\t\telse if (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; - protected final String TEXT_583 = ", new"; - protected final String TEXT_584 = ", new"; - protected final String TEXT_585 = ");"; - protected final String TEXT_586 = NL + "\t\t"; - protected final String TEXT_587 = " old"; - protected final String TEXT_588 = " = ("; - protected final String TEXT_589 = " & "; - protected final String TEXT_590 = "_EFLAG) != 0;"; - protected final String TEXT_591 = NL + "\t\tif (new"; - protected final String TEXT_592 = ") "; - protected final String TEXT_593 = " |= "; - protected final String TEXT_594 = "_EFLAG; else "; - protected final String TEXT_595 = " &= ~"; - protected final String TEXT_596 = "_EFLAG;"; - protected final String TEXT_597 = NL + "\t\t"; - protected final String TEXT_598 = " old"; - protected final String TEXT_599 = " = "; - protected final String TEXT_600 = ";"; - protected final String TEXT_601 = NL + "\t\t"; - protected final String TEXT_602 = " "; - protected final String TEXT_603 = " = new"; - protected final String TEXT_604 = " == null ? "; - protected final String TEXT_605 = "_DEFAULT_ : new"; - protected final String TEXT_606 = ";"; - protected final String TEXT_607 = NL + "\t\t"; - protected final String TEXT_608 = " = new"; - protected final String TEXT_609 = " == null ? "; - protected final String TEXT_610 = "_DEFAULT_ : new"; - protected final String TEXT_611 = ";"; - protected final String TEXT_612 = NL + "\t\t"; - protected final String TEXT_613 = " "; - protected final String TEXT_614 = " = "; - protected final String TEXT_615 = "new"; - protected final String TEXT_616 = ";"; - protected final String TEXT_617 = NL + "\t\t"; - protected final String TEXT_618 = " = "; - protected final String TEXT_619 = "new"; - protected final String TEXT_620 = ";"; - protected final String TEXT_621 = NL + "\t\tObject old"; - protected final String TEXT_622 = " = eVirtualSet("; - protected final String TEXT_623 = ", "; - protected final String TEXT_624 = ");"; - protected final String TEXT_625 = NL + "\t\tboolean isSetChange = old"; - protected final String TEXT_626 = " == EVIRTUAL_NO_VALUE;"; - protected final String TEXT_627 = NL + "\t\tboolean old"; - protected final String TEXT_628 = "_set_ = ("; - protected final String TEXT_629 = " & "; - protected final String TEXT_630 = "_ESETFLAG) != 0;"; - protected final String TEXT_631 = NL + "\t\t"; - protected final String TEXT_632 = " |= "; - protected final String TEXT_633 = "_ESETFLAG;"; - protected final String TEXT_634 = NL + "\t\tboolean old"; - protected final String TEXT_635 = "_set_ = "; - protected final String TEXT_636 = "_set_;"; - protected final String TEXT_637 = NL + "\t\t"; - protected final String TEXT_638 = "_set_ = true;"; - protected final String TEXT_639 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; - protected final String TEXT_640 = ", "; - protected final String TEXT_641 = "isSetChange ? "; - protected final String TEXT_642 = "null"; - protected final String TEXT_643 = "_DEFAULT_"; - protected final String TEXT_644 = " : old"; - protected final String TEXT_645 = "old"; - protected final String TEXT_646 = ", "; - protected final String TEXT_647 = "new"; - protected final String TEXT_648 = ", "; - protected final String TEXT_649 = "isSetChange"; - protected final String TEXT_650 = "!old"; - protected final String TEXT_651 = "_set_"; - protected final String TEXT_652 = ");"; - protected final String TEXT_653 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.SET, "; - protected final String TEXT_654 = ", "; - protected final String TEXT_655 = "old"; - protected final String TEXT_656 = " == EVIRTUAL_NO_VALUE ? "; - protected final String TEXT_657 = "null"; - protected final String TEXT_658 = "_DEFAULT_"; - protected final String TEXT_659 = " : old"; - protected final String TEXT_660 = "old"; - protected final String TEXT_661 = ", "; - protected final String TEXT_662 = "new"; - protected final String TEXT_663 = ");"; - protected final String TEXT_664 = NL + " set(get"; - protected final String TEXT_665 = "(), getType(), "; - protected final String TEXT_666 = ", "; - protected final String TEXT_667 = " new "; - protected final String TEXT_668 = "("; - protected final String TEXT_669 = "new"; - protected final String TEXT_670 = ")"; - protected final String TEXT_671 = ");"; - protected final String TEXT_672 = NL + "\t\t(("; - protected final String TEXT_673 = ".Internal)get"; - protected final String TEXT_674 = "()).set("; - protected final String TEXT_675 = ", "; - protected final String TEXT_676 = "new "; - protected final String TEXT_677 = "("; - protected final String TEXT_678 = "new"; - protected final String TEXT_679 = ")"; - protected final String TEXT_680 = ");"; - protected final String TEXT_681 = NL + "\t\t// TODO: implement this method to set the '"; - protected final String TEXT_682 = "' "; - protected final String TEXT_683 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; - protected final String TEXT_684 = NL + "\t}" + NL; - protected final String TEXT_685 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext basicUnset"; - protected final String TEXT_686 = "(ChangeContext changeContext)" + NL + "\t{"; - protected final String TEXT_687 = NL + "\t\tObject old"; - protected final String TEXT_688 = " = eVirtualUnset("; - protected final String TEXT_689 = ");"; - protected final String TEXT_690 = NL + "\t\t"; - protected final String TEXT_691 = " old"; - protected final String TEXT_692 = " = "; - protected final String TEXT_693 = ";" + NL + "\t\t"; - protected final String TEXT_694 = " = null;"; - protected final String TEXT_695 = NL + "\t\tboolean isSetChange = old"; - protected final String TEXT_696 = " != EVIRTUAL_NO_VALUE;"; - protected final String TEXT_697 = NL + "\t\tboolean old"; - protected final String TEXT_698 = "_set_ = ("; - protected final String TEXT_699 = " & "; - protected final String TEXT_700 = "_ESETFLAG) != 0;" + NL + "\t\t"; - protected final String TEXT_701 = " &= ~"; - protected final String TEXT_702 = "_ESETFLAG;"; - protected final String TEXT_703 = NL + "\t\tboolean old"; - protected final String TEXT_704 = "_set_ = "; - protected final String TEXT_705 = "_set_;" + NL + "\t\t"; - protected final String TEXT_706 = "_set_ = false;"; - protected final String TEXT_707 = NL + "\t\tif (isNotifying())" + NL + "\t\t{" + NL + "\t\t\t"; - protected final String TEXT_708 = " notification = new "; - protected final String TEXT_709 = "(this, "; - protected final String TEXT_710 = ".UNSET, "; - protected final String TEXT_711 = ", "; - protected final String TEXT_712 = "isSetChange ? old"; - protected final String TEXT_713 = " : null"; - protected final String TEXT_714 = "old"; - protected final String TEXT_715 = ", null, "; - protected final String TEXT_716 = "isSetChange"; - protected final String TEXT_717 = "old"; - protected final String TEXT_718 = "_set_"; - protected final String TEXT_719 = ");" + NL + "\t\t\tif (changeContext == null) changeContext = notification; else changeContext.add(notification);" + NL + "\t\t}" + NL + "\t\treturn changeContext;"; - protected final String TEXT_720 = NL + "\t\t// TODO: implement this method to unset the contained '"; - protected final String TEXT_721 = "' "; - protected final String TEXT_722 = 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_723 = NL + "\t}" + NL; - protected final String TEXT_724 = NL + "\t/**" + NL + "\t * Unsets the value of the '{@link "; - protected final String TEXT_725 = "#"; - protected final String TEXT_726 = " "; - protected final String TEXT_727 = "}' "; - protected final String TEXT_728 = "." + NL + "\t * " + NL + "\t * "; - protected final String TEXT_729 = NL + "\t * @see #isSet"; - protected final String TEXT_730 = "()"; - protected final String TEXT_731 = NL + "\t * @see #"; - protected final String TEXT_732 = "()"; - protected final String TEXT_733 = NL + "\t * @see #set"; - protected final String TEXT_734 = "("; - protected final String TEXT_735 = ")"; - protected final String TEXT_736 = NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_737 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_738 = NL + "\tvoid unset"; - protected final String TEXT_739 = "();" + NL; - protected final String TEXT_740 = NL + "\tpublic void unset"; - protected final String TEXT_741 = "()" + NL + "\t{"; - protected final String TEXT_742 = NL + "\t\tunset("; - protected final String TEXT_743 = ");"; - protected final String TEXT_744 = NL + "\t\t(("; - protected final String TEXT_745 = ".Unsettable)get"; - protected final String TEXT_746 = "()).unset();"; - protected final String TEXT_747 = NL + "\t\t"; - protected final String TEXT_748 = " "; - protected final String TEXT_749 = " = ("; - protected final String TEXT_750 = ")eVirtualGet("; - protected final String TEXT_751 = ");"; - protected final String TEXT_752 = NL + "\t\tif ("; - protected final String TEXT_753 = " != null)" + NL + "\t\t{" + NL + "\t\t\tChangeContext changeContext = null;"; - protected final String TEXT_754 = NL + "\t\t\tchangeContext = (("; - protected final String TEXT_755 = ")"; - protected final String TEXT_756 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_757 = ", null, changeContext);"; - protected final String TEXT_758 = NL + "\t\t\tchangeContext = (("; - protected final String TEXT_759 = ")"; - protected final String TEXT_760 = ").inverseRemove(this, "; - protected final String TEXT_761 = ", "; - protected final String TEXT_762 = ".class, changeContext);"; - protected final String TEXT_763 = NL + "\t\t\tchangeContext = basicUnset"; - protected final String TEXT_764 = "(changeContext);" + NL + "\t\t\tif (changeContext != null) changeContext.dispatch();" + NL + "\t\t}" + NL + "\t\telse" + NL + " \t{"; - protected final String TEXT_765 = NL + "\t\t\tboolean old"; - protected final String TEXT_766 = "_set_ = eVirtualIsSet("; - protected final String TEXT_767 = ");"; - protected final String TEXT_768 = NL + "\t\t\tboolean old"; - protected final String TEXT_769 = "_set_ = ("; - protected final String TEXT_770 = " & "; - protected final String TEXT_771 = "_ESETFLAG) != 0;"; - protected final String TEXT_772 = NL + "\t\t\t"; - protected final String TEXT_773 = " &= ~"; - protected final String TEXT_774 = "_ESETFLAG;"; - protected final String TEXT_775 = NL + "\t\t\tboolean old"; - protected final String TEXT_776 = "_set_ = "; - protected final String TEXT_777 = "_set_;"; - protected final String TEXT_778 = NL + "\t\t\t"; - protected final String TEXT_779 = "_set_ = false;"; - protected final String TEXT_780 = NL + "\t\t\tif (isNotifying())" + NL + "\t\t\t\tnotify(ChangeKind.UNSET, "; - protected final String TEXT_781 = ", null, null, old"; - protected final String TEXT_782 = "_set_);"; - protected final String TEXT_783 = NL + " \t}"; - protected final String TEXT_784 = NL + "\t\t"; - protected final String TEXT_785 = " old"; - protected final String TEXT_786 = " = ("; - protected final String TEXT_787 = " & "; - protected final String TEXT_788 = "_EFLAG) != 0;"; - protected final String TEXT_789 = NL + "\t\tObject old"; - protected final String TEXT_790 = " = eVirtualUnset("; - protected final String TEXT_791 = ");"; - protected final String TEXT_792 = NL + "\t\t"; - protected final String TEXT_793 = " old"; - protected final String TEXT_794 = " = "; - protected final String TEXT_795 = ";"; - protected final String TEXT_796 = NL + "\t\tboolean isSetChange = old"; - protected final String TEXT_797 = " != EVIRTUAL_NO_VALUE;"; - protected final String TEXT_798 = NL + "\t\tboolean old"; - protected final String TEXT_799 = "_set_ = ("; - protected final String TEXT_800 = " & "; - protected final String TEXT_801 = "_ESETFLAG) != 0;"; - protected final String TEXT_802 = NL + "\t\tboolean old"; - protected final String TEXT_803 = "_set_ = "; - protected final String TEXT_804 = "_set_;"; - protected final String TEXT_805 = NL + "\t\t"; - protected final String TEXT_806 = " = null;"; - protected final String TEXT_807 = NL + "\t\t"; - protected final String TEXT_808 = " &= ~"; - protected final String TEXT_809 = "_ESETFLAG;"; - protected final String TEXT_810 = NL + "\t\t"; - protected final String TEXT_811 = "_set_ = false;"; - protected final String TEXT_812 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, "; - protected final String TEXT_813 = ", "; - protected final String TEXT_814 = "isSetChange ? old"; - protected final String TEXT_815 = " : null"; - protected final String TEXT_816 = "old"; - protected final String TEXT_817 = ", null, "; - protected final String TEXT_818 = "isSetChange"; - protected final String TEXT_819 = "old"; - protected final String TEXT_820 = "_set_"; - protected final String TEXT_821 = ");"; - protected final String TEXT_822 = NL + "\t\tif ("; - protected final String TEXT_823 = "_DEFAULT_) "; - protected final String TEXT_824 = " |= "; - protected final String TEXT_825 = "_EFLAG; else "; - protected final String TEXT_826 = " &= ~"; - protected final String TEXT_827 = "_EFLAG;"; - protected final String TEXT_828 = NL + "\t\t"; - protected final String TEXT_829 = " = "; - protected final String TEXT_830 = "_DEFAULT_;"; - protected final String TEXT_831 = NL + "\t\t"; - protected final String TEXT_832 = " &= ~"; - protected final String TEXT_833 = "_ESETFLAG;"; - protected final String TEXT_834 = NL + "\t\t"; - protected final String TEXT_835 = "_set_ = false;"; - protected final String TEXT_836 = NL + "\t\tif (isNotifying())" + NL + "\t\t\tnotify(ChangeKind.UNSET, "; - protected final String TEXT_837 = ", "; - protected final String TEXT_838 = "isSetChange ? old"; - protected final String TEXT_839 = " : "; - protected final String TEXT_840 = "_DEFAULT_"; - protected final String TEXT_841 = "old"; - protected final String TEXT_842 = ", "; - protected final String TEXT_843 = "_DEFAULT_, "; - protected final String TEXT_844 = "isSetChange"; - protected final String TEXT_845 = "old"; - protected final String TEXT_846 = "_set_"; - protected final String TEXT_847 = ");"; - protected final String TEXT_848 = NL + " unset(get"; - protected final String TEXT_849 = "(), getType(), "; - protected final String TEXT_850 = ");"; - protected final String TEXT_851 = NL + " unset"; - protected final String TEXT_852 = "(get"; - protected final String TEXT_853 = "());"; - protected final String TEXT_854 = NL + "\t\t// TODO: implement this method to unset the '"; - protected final String TEXT_855 = "' "; - protected final String TEXT_856 = NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; - protected final String TEXT_857 = NL + "\t}" + NL; - protected final String TEXT_858 = NL + "\t/**" + NL + "\t * Returns whether the value of the '{@link "; - protected final String TEXT_859 = "#"; - protected final String TEXT_860 = " "; - protected final String TEXT_861 = "}' "; - protected final String TEXT_862 = " is set." + NL + "\t * " + NL + "\t * " + NL + "\t * @return whether the value of the '"; - protected final String TEXT_863 = "' "; - protected final String TEXT_864 = " is set."; - protected final String TEXT_865 = NL + "\t * @see #unset"; - protected final String TEXT_866 = "()"; - protected final String TEXT_867 = NL + "\t * @see #"; - protected final String TEXT_868 = "()"; - protected final String TEXT_869 = NL + "\t * @see #set"; - protected final String TEXT_870 = "("; - protected final String TEXT_871 = ")"; - protected final String TEXT_872 = NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_873 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_874 = NL + "\tboolean isSet"; - protected final String TEXT_875 = "();" + NL; - protected final String TEXT_876 = NL + "\tpublic boolean isSet"; - protected final String TEXT_877 = "()" + NL + "\t{"; - protected final String TEXT_878 = NL + "\t\treturn isSet("; - protected final String TEXT_879 = ");"; - protected final String TEXT_880 = NL + "\t\t"; - protected final String TEXT_881 = " "; - protected final String TEXT_882 = " = ("; - protected final String TEXT_883 = ")eVirtualGet("; - protected final String TEXT_884 = ");"; - protected final String TEXT_885 = NL + "\t\treturn "; - protected final String TEXT_886 = " != null && (("; - protected final String TEXT_887 = ".Unsettable)"; - protected final String TEXT_888 = ").isSet();"; - protected final String TEXT_889 = NL + "\t\treturn eVirtualIsSet("; - protected final String TEXT_890 = ");"; - protected final String TEXT_891 = NL + "\t\treturn ("; - protected final String TEXT_892 = " & "; - protected final String TEXT_893 = "_ESETFLAG) != 0;"; - protected final String TEXT_894 = NL + "\t\treturn "; - protected final String TEXT_895 = "_set_;"; - protected final String TEXT_896 = NL + " return isSet(get"; - protected final String TEXT_897 = "(), getType(), "; - protected final String TEXT_898 = ");"; - protected final String TEXT_899 = NL + "\t\treturn !(("; - protected final String TEXT_900 = ".Internal)get"; - protected final String TEXT_901 = "()).isEmpty("; - protected final String TEXT_902 = ");"; - protected final String TEXT_903 = NL + "\t\t// TODO: implement this method to return whether the '"; - protected final String TEXT_904 = "' "; - protected final String TEXT_905 = " is set" + NL + "\t\t// Ensure that you remove @generated or mark it @generated NOT" + NL + "\t\tthrow new UnsupportedOperationException();"; - protected final String TEXT_906 = NL + "\t}" + NL; - protected final String TEXT_907 = NL + "\t/**" + NL + "\t * " + NL + "\t * "; - protected final String TEXT_908 = NL + "\t * " + NL + "\t * "; - protected final String TEXT_909 = NL + "\t * "; - protected final String TEXT_910 = NL + "\t * @model "; - protected final String TEXT_911 = NL + "\t * "; - protected final String TEXT_912 = NL + "\t * @model"; - protected final String TEXT_913 = NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_914 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_915 = NL + "\t"; - protected final String TEXT_916 = " "; - protected final String TEXT_917 = "("; - protected final String TEXT_918 = ")"; - protected final String TEXT_919 = ";" + NL; - protected final String TEXT_920 = NL + "\tpublic "; - protected final String TEXT_921 = " "; - protected final String TEXT_922 = "("; - protected final String TEXT_923 = ")"; - protected final String TEXT_924 = NL + "\t{"; - protected final String TEXT_925 = NL + "\t\t"; - protected final String TEXT_926 = 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_927 = " != null)" + NL + "\t\t\t{" + NL + "\t\t\t\t"; - protected final String TEXT_928 = ".add" + NL + "\t\t\t\t\t(new "; - protected final String TEXT_929 = NL + "\t\t\t\t\t\t("; - protected final String TEXT_930 = ".ERROR," + NL + "\t\t\t\t\t\t "; - protected final String TEXT_931 = ".DIAGNOSTIC_SOURCE," + NL + "\t\t\t\t\t\t "; - protected final String TEXT_932 = "."; - protected final String TEXT_933 = "," + NL + "\t\t\t\t\t\t "; - protected final String TEXT_934 = ".INSTANCE.getString(\"_UI_GenericInvariant_diagnostic\", new Object[] { \""; - protected final String TEXT_935 = "\", "; - protected final String TEXT_936 = ".getObjectLabel(this, "; - protected final String TEXT_937 = ") }),"; - protected final String TEXT_938 = 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_939 = 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_940 = NL + "\t}" + NL; - protected final String TEXT_941 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext eInverseAdd("; - protected final String TEXT_942 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; - protected final String TEXT_943 = NL + "\t\t\tcase "; - protected final String TEXT_944 = ":"; - protected final String TEXT_945 = NL + "\t\t\t\treturn (("; - protected final String TEXT_946 = ")(("; - protected final String TEXT_947 = ".InternalMapView)"; - protected final String TEXT_948 = "()).eMap()).basicAdd(otherEnd, changeContext);"; - protected final String TEXT_949 = NL + "\t\t\t\treturn (("; - protected final String TEXT_950 = ")"; - protected final String TEXT_951 = "()).basicAdd(otherEnd, changeContext);"; - protected final String TEXT_952 = 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_953 = ", changeContext);"; - protected final String TEXT_954 = NL + "\t\t\t\t"; - protected final String TEXT_955 = " "; - protected final String TEXT_956 = " = ("; - protected final String TEXT_957 = ")eVirtualGet("; - protected final String TEXT_958 = ");"; - protected final String TEXT_959 = NL + "\t\t\t\tif ("; - protected final String TEXT_960 = " != null)"; - protected final String TEXT_961 = NL + "\t\t\t\t\tchangeContext = (("; - protected final String TEXT_962 = ")"; - protected final String TEXT_963 = ").inverseRemove(this, EOPPOSITE_FEATURE_BASE - "; - protected final String TEXT_964 = ", null, changeContext);"; - protected final String TEXT_965 = NL + "\t\t\t\t\tchangeContext = (("; - protected final String TEXT_966 = ")"; - protected final String TEXT_967 = ").inverseRemove(this, "; - protected final String TEXT_968 = ", "; - protected final String TEXT_969 = ".class, changeContext);"; - protected final String TEXT_970 = NL + "\t\t\t\treturn basicSet"; - protected final String TEXT_971 = "(("; - protected final String TEXT_972 = ")otherEnd, changeContext);"; - protected final String TEXT_973 = NL + "\t\t}"; - protected final String TEXT_974 = NL + "\t\treturn super.eInverseAdd(otherEnd, propertyIndex, changeContext);"; - protected final String TEXT_975 = NL + "\t\treturn eDynamicInverseAdd(otherEnd, propertyIndex, changeContext);"; - protected final String TEXT_976 = NL + "\t}" + NL; - protected final String TEXT_977 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ChangeContext inverseRemove("; - protected final String TEXT_978 = " otherEnd, int propertyIndex, ChangeContext changeContext)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; - protected final String TEXT_979 = NL + "\t\t\tcase "; - protected final String TEXT_980 = ":"; - protected final String TEXT_981 = NL + "\t\t\t\treturn (("; - protected final String TEXT_982 = ")(("; - protected final String TEXT_983 = ".InternalMapView)"; - protected final String TEXT_984 = "()).eMap()).basicRemove(otherEnd, changeContext);"; - protected final String TEXT_985 = NL + " \t\t\treturn removeFrom"; - protected final String TEXT_986 = "("; - protected final String TEXT_987 = "(), otherEnd, changeContext);"; - protected final String TEXT_988 = NL + "\t\t\t\treturn removeFromList("; - protected final String TEXT_989 = "(), otherEnd, changeContext);"; - protected final String TEXT_990 = NL + "\t\t\t\treturn eBasicSetContainer(null, "; - protected final String TEXT_991 = ", changeContext);"; - protected final String TEXT_992 = NL + "\t\t\t\treturn basicUnset"; - protected final String TEXT_993 = "(changeContext);"; - protected final String TEXT_994 = NL + "\t\t\t\treturn basicSet"; - protected final String TEXT_995 = "(null, changeContext);"; - protected final String TEXT_996 = NL + "\t\t}"; - protected final String TEXT_997 = NL + "\t\treturn super.inverseRemove(otherEnd, propertyIndex, changeContext);"; - protected final String TEXT_998 = NL + "\t\treturn eDynamicInverseRemove(otherEnd, propertyIndex, changeContext);"; - protected final String TEXT_999 = NL + "\t}" + NL; - protected final String TEXT_1000 = 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_1001 = NL + "\t\t\tcase "; - protected final String TEXT_1002 = ":" + NL + "\t\t\t\treturn eInternalContainer().inverseRemove(this, "; - protected final String TEXT_1003 = ", "; - protected final String TEXT_1004 = ".class, changeContext);"; - protected final String TEXT_1005 = NL + "\t\t}"; - protected final String TEXT_1006 = NL + "\t\treturn super.eBasicRemoveFromContainerFeature(changeContext);"; - protected final String TEXT_1007 = NL + "\t\treturn eDynamicBasicRemoveFromContainer(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 Object get(int propertyIndex, boolean resolve)" + NL + "\t{" + NL + "\t\tswitch (propertyIndex)" + NL + "\t\t{"; - protected final String TEXT_1010 = NL + "\t\t\tcase "; - protected final String TEXT_1011 = ":"; - protected final String TEXT_1012 = NL + "\t\t\t\treturn "; - protected final String TEXT_1013 = "() ? Boolean.TRUE : Boolean.FALSE;"; - protected final String TEXT_1014 = NL + "\t\t\t\treturn new "; - protected final String TEXT_1015 = "("; - protected final String TEXT_1016 = "());"; - protected final String TEXT_1017 = NL + "\t\t\t\tif (resolve) return "; - protected final String TEXT_1018 = "();" + NL + "\t\t\t\treturn basicGet"; - protected final String TEXT_1019 = "();"; - protected final String TEXT_1020 = NL + "\t\t\t\tif (coreType) return (("; - protected final String TEXT_1021 = ".InternalMapView)"; - protected final String TEXT_1022 = "()).eMap();" + NL + "\t\t\t\telse return "; - protected final String TEXT_1023 = "();"; - protected final String TEXT_1024 = NL + "\t\t\t\tif (coreType) return "; - protected final String TEXT_1025 = "();" + NL + "\t\t\t\telse return "; - protected final String TEXT_1026 = "().map();"; - protected final String TEXT_1027 = 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//if (coreType) " + NL + "\t\t\t\treturn "; - protected final String TEXT_1028 = "();"; - protected final String TEXT_1029 = NL + "\t\t\t\tif (coreType) return "; - protected final String TEXT_1030 = "();" + NL + "\t\t\t\treturn (("; - protected final String TEXT_1031 = ".Internal)"; - protected final String TEXT_1032 = "()).getWrapper();"; - protected final String TEXT_1033 = NL + "\t\t\t\treturn "; - protected final String TEXT_1034 = "();"; - protected final String TEXT_1035 = NL + "\t\t}"; - protected final String TEXT_1036 = NL + "\t\treturn super.get(propertyIndex, resolve);"; - protected final String TEXT_1037 = NL + "\t\treturn eDynamicGet(propertyIndex, resolve, coreType);"; - protected final String TEXT_1038 = NL + "\t}" + NL; - protected final String TEXT_1039 = 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_1040 = NL + "\t\t\tcase "; - protected final String TEXT_1041 = ":"; - protected final String TEXT_1042 = NL + " \tset"; - protected final String TEXT_1043 = "("; - protected final String TEXT_1044 = "(), newValue);"; - protected final String TEXT_1045 = NL + "\t\t\t\t(("; - protected final String TEXT_1046 = ".Internal)"; - protected final String TEXT_1047 = "()).set(newValue);"; - protected final String TEXT_1048 = NL + "\t\t\t\t(("; - protected final String TEXT_1049 = ".Setting)(("; - protected final String TEXT_1050 = ".InternalMapView)"; - protected final String TEXT_1051 = "()).eMap()).set(newValue);"; - protected final String TEXT_1052 = NL + "\t\t\t\t(("; - protected final String TEXT_1053 = ".Setting)"; - protected final String TEXT_1054 = "()).set(newValue);"; - protected final String TEXT_1055 = NL + "\t\t\t\t"; - protected final String TEXT_1056 = "().clear();" + NL + "\t\t\t\t"; - protected final String TEXT_1057 = "().addAll(("; - protected final String TEXT_1058 = ")newValue);"; - protected final String TEXT_1059 = NL + "\t\t\t\tset"; - protected final String TEXT_1060 = "((("; - protected final String TEXT_1061 = ")newValue)."; - protected final String TEXT_1062 = "());"; - protected final String TEXT_1063 = NL + "\t\t\t\tset"; - protected final String TEXT_1064 = "(("; - protected final String TEXT_1065 = ")newValue);"; - protected final String TEXT_1066 = NL + "\t\t\t\treturn;"; - protected final String TEXT_1067 = NL + "\t\t}"; - protected final String TEXT_1068 = NL + "\t\tsuper.set(propertyIndex, newValue);"; - protected final String TEXT_1069 = NL + "\t\teDynamicSet(propertyIndex, newValue);"; - protected final String TEXT_1070 = 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_1071 = NL + "\t\t\tcase "; - protected final String TEXT_1072 = ":"; - protected final String TEXT_1073 = NL + " \t\t\tunset"; - protected final String TEXT_1074 = "("; - protected final String TEXT_1075 = "());"; - protected final String TEXT_1076 = NL + "\t\t\t\t"; - protected final String TEXT_1077 = "().clear();"; - protected final String TEXT_1078 = NL + "\t\t\t\tunset"; - protected final String TEXT_1079 = "();"; - protected final String TEXT_1080 = NL + "\t\t\t\tset"; - protected final String TEXT_1081 = "(("; - protected final String TEXT_1082 = ")null);"; - protected final String TEXT_1083 = NL + "\t\t\t\tset"; - protected final String TEXT_1084 = "("; - protected final String TEXT_1085 = "_DEFAULT_);"; - protected final String TEXT_1086 = NL + "\t\t\t\treturn;"; - protected final String TEXT_1087 = NL + "\t\t}"; - protected final String TEXT_1088 = NL + "\t\tsuper.unset(propertyIndex);"; - protected final String TEXT_1089 = NL + "\t\teDynamicUnset(propertyIndex);"; - protected final String TEXT_1090 = NL + "\t}" + NL; - protected final String TEXT_1091 = 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_1092 = NL + "\t\t\tcase "; - protected final String TEXT_1093 = ":"; - protected final String TEXT_1094 = NL + " \t\treturn !is"; - protected final String TEXT_1095 = "Empty("; - protected final String TEXT_1096 = "());"; - protected final String TEXT_1097 = NL + " \t\t// KDK - should this be !isSequenceEmpty?" + NL + "\t\t\t\treturn "; - protected final String TEXT_1098 = " != null && !is"; - protected final String TEXT_1099 = "Empty("; - protected final String TEXT_1100 = "());"; - protected final String TEXT_1101 = NL + "\t\t\t\treturn "; - protected final String TEXT_1102 = " != null && !"; - protected final String TEXT_1103 = ".isEmpty();"; - protected final String TEXT_1104 = NL + "\t\t\t\t"; - protected final String TEXT_1105 = " "; - protected final String TEXT_1106 = " = ("; - protected final String TEXT_1107 = ")eVirtualGet("; - protected final String TEXT_1108 = ");" + NL + "\t\t\t\treturn "; - protected final String TEXT_1109 = " != null && !"; - protected final String TEXT_1110 = ".isEmpty();"; - protected final String TEXT_1111 = NL + "\t\t\t\treturn !"; - protected final String TEXT_1112 = "().isEmpty();"; - protected final String TEXT_1113 = NL + "\t\t\t\treturn isSet"; - protected final String TEXT_1114 = "();"; - protected final String TEXT_1115 = NL + "\t\t\t\treturn "; - protected final String TEXT_1116 = " != null;"; - protected final String TEXT_1117 = NL + "\t\t\t\treturn eVirtualGet("; - protected final String TEXT_1118 = ") != null;"; - protected final String TEXT_1119 = NL + "\t\t\t\treturn basicGet"; - protected final String TEXT_1120 = "() != null;"; - protected final String TEXT_1121 = NL + "\t\t\t\treturn "; - protected final String TEXT_1122 = " != null;"; - protected final String TEXT_1123 = NL + "\t\t\t\treturn eVirtualGet("; - protected final String TEXT_1124 = ") != null;"; - protected final String TEXT_1125 = NL + "\t\t\t\treturn "; - protected final String TEXT_1126 = "() != null;"; - protected final String TEXT_1127 = NL + "\t\t\t\treturn (("; - protected final String TEXT_1128 = " & "; - protected final String TEXT_1129 = "_EFLAG) != 0) != "; - protected final String TEXT_1130 = "_DEFAULT_;"; - protected final String TEXT_1131 = NL + "\t\t\t\treturn "; - protected final String TEXT_1132 = " != "; - protected final String TEXT_1133 = "_DEFAULT_;"; - protected final String TEXT_1134 = NL + "\t\t\t\treturn eVirtualGet("; - protected final String TEXT_1135 = ", "; - protected final String TEXT_1136 = "_DEFAULT_) != "; - protected final String TEXT_1137 = "_DEFAULT_;"; - protected final String TEXT_1138 = NL + "\t\t\t\treturn "; - protected final String TEXT_1139 = "() != "; - protected final String TEXT_1140 = "_DEFAULT_;"; - protected final String TEXT_1141 = NL + "\t\t\t\treturn "; - protected final String TEXT_1142 = "_DEFAULT_ == null ? "; - protected final String TEXT_1143 = " != null : !"; - protected final String TEXT_1144 = "_DEFAULT_.equals("; - protected final String TEXT_1145 = ");"; - protected final String TEXT_1146 = NL + "\t\t\t\t"; - protected final String TEXT_1147 = " "; - protected final String TEXT_1148 = " = ("; - protected final String TEXT_1149 = ")eVirtualGet("; - protected final String TEXT_1150 = ", "; - protected final String TEXT_1151 = "_DEFAULT_);" + NL + "\t\t\t\treturn "; - protected final String TEXT_1152 = "_DEFAULT_ == null ? "; - protected final String TEXT_1153 = " != null : !"; - protected final String TEXT_1154 = "_DEFAULT_.equals("; - protected final String TEXT_1155 = ");"; - protected final String TEXT_1156 = NL + "\t\t\t\treturn "; - protected final String TEXT_1157 = "_DEFAULT_ == null ? "; - protected final String TEXT_1158 = "() != null : !"; - protected final String TEXT_1159 = "_DEFAULT_.equals("; - protected final String TEXT_1160 = "());"; - protected final String TEXT_1161 = NL + "\t\t}"; - protected final String TEXT_1162 = NL + "\t\treturn super.isSet(propertyIndex);"; - protected final String TEXT_1163 = NL + "\t\treturn eDynamicIsSet(propertyIndex);"; - protected final String TEXT_1164 = NL + "\t}" + NL; - protected final String TEXT_1165 = 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_1166 = NL + "\t\tif (baseClass == "; - protected final String TEXT_1167 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (derivedFeatureID)" + NL + "\t\t\t{"; - protected final String TEXT_1168 = NL + "\t\t\t\tcase "; - protected final String TEXT_1169 = ": return "; - protected final String TEXT_1170 = ";"; - protected final String TEXT_1171 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}"; - protected final String TEXT_1172 = 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_1173 = NL + "\t\tif (baseClass == "; - protected final String TEXT_1174 = ".class)" + NL + "\t\t{" + NL + "\t\t\tswitch (baseFeatureID)" + NL + "\t\t\t{"; - protected final String TEXT_1175 = NL + "\t\t\t\tcase "; - protected final String TEXT_1176 = ": return "; - protected final String TEXT_1177 = ";"; - protected final String TEXT_1178 = NL + "\t\t\t\tdefault: return -1;" + NL + "\t\t\t}" + NL + "\t\t}"; - protected final String TEXT_1179 = NL + "\t\treturn super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);" + NL + "\t}" + NL; - protected final String TEXT_1180 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Object[] eVirtualValues()" + NL + "\t{" + NL + "\t\treturn "; - protected final String TEXT_1181 = ";" + 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_1182 = " = newValues;" + NL + "\t}" + NL; - protected final String TEXT_1183 = 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_1184 = NL + "\t\t\tcase "; - protected final String TEXT_1185 = " :" + NL + "\t\t\t\treturn "; - protected final String TEXT_1186 = ";"; - protected final String TEXT_1187 = 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_1188 = NL + "\t\t\tcase "; - protected final String TEXT_1189 = " :" + NL + "\t\t\t\t"; - protected final String TEXT_1190 = " = newIndexBits;" + NL + "\t\t\t\tbreak;"; - protected final String TEXT_1191 = NL + "\t\t\tdefault :" + NL + "\t\t\t\tthrow new IndexOutOfBoundsException();" + NL + "\t\t}" + NL + "\t}" + NL; - protected final String TEXT_1192 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String toString()" + NL + "\t{" + NL + "\t\tif (isProxy()) return super.toString();" + NL + "" + NL + "\t\tStringBuffer result = new StringBuffer(super.toString());"; - protected final String TEXT_1193 = NL + "\t\tresult.append(\" ("; - protected final String TEXT_1194 = ": \");"; - protected final String TEXT_1195 = NL + "\t\tresult.append(\", "; - protected final String TEXT_1196 = ": \");"; - protected final String TEXT_1197 = NL + "\t\tif (eVirtualIsSet("; - protected final String TEXT_1198 = ")) result.append(eVirtualGet("; - protected final String TEXT_1199 = ")); else result.append(\"\");"; - protected final String TEXT_1200 = NL + "\t\tif ("; - protected final String TEXT_1201 = "("; - protected final String TEXT_1202 = " & "; - protected final String TEXT_1203 = "_ESETFLAG) != 0"; - protected final String TEXT_1204 = "_set_"; - protected final String TEXT_1205 = ") result.append(("; - protected final String TEXT_1206 = " & "; - protected final String TEXT_1207 = "_EFLAG) != 0); else result.append(\"\");"; - protected final String TEXT_1208 = NL + "\t\tif ("; - protected final String TEXT_1209 = "("; - protected final String TEXT_1210 = " & "; - protected final String TEXT_1211 = "_ESETFLAG) != 0"; - protected final String TEXT_1212 = "_set_"; - protected final String TEXT_1213 = ") result.append("; - protected final String TEXT_1214 = "); else result.append(\"\");"; - protected final String TEXT_1215 = NL + "\t\tresult.append(eVirtualGet("; - protected final String TEXT_1216 = ", "; - protected final String TEXT_1217 = "_DEFAULT_"; - protected final String TEXT_1218 = "));"; - protected final String TEXT_1219 = NL + "\t\tresult.append(("; - protected final String TEXT_1220 = " & "; - protected final String TEXT_1221 = "_EFLAG) != 0);"; - protected final String TEXT_1222 = NL + "\t\tresult.append("; - protected final String TEXT_1223 = ");"; - protected final String TEXT_1224 = NL + "\t\tresult.append(')');" + NL + "\t\treturn result.toString();" + NL + "\t}" + NL; - protected final String TEXT_1225 = 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_1226 = NL + "\t\treturn new "; - protected final String TEXT_1227 = "(getTypedKey());" + NL + " \t"; - protected final String TEXT_1228 = NL + "\t\treturn getTypedKey();" + NL + " \t"; - protected final String TEXT_1229 = 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_1230 = NL + "\t\tgetTypedKey().addAll(("; - protected final String TEXT_1231 = ")key);"; - protected final String TEXT_1232 = NL + "\t\tsetTypedKey((("; - protected final String TEXT_1233 = ")key)."; - protected final String TEXT_1234 = "());"; - protected final String TEXT_1235 = NL + "\t\tsetTypedKey(("; - protected final String TEXT_1236 = ")key);"; - protected final String TEXT_1237 = 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_1238 = NL + "\t\treturn new "; - protected final String TEXT_1239 = "(getTypedValue());" + NL + " \t"; - protected final String TEXT_1240 = NL + "\t\treturn getTypedValue();" + NL + " \t"; - protected final String TEXT_1241 = 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_1242 = NL + "\t\tgetTypedValue().clear();" + NL + "\t\tgetTypedValue().addAll(("; - protected final String TEXT_1243 = ")value);" + NL + " \t"; - protected final String TEXT_1244 = NL + "\t\tsetTypedValue((("; - protected final String TEXT_1245 = ")value)."; - protected final String TEXT_1246 = "());" + NL + " \t"; - protected final String TEXT_1247 = NL + "\t\tsetTypedValue(("; - protected final String TEXT_1248 = ")value);" + NL + " \t"; - protected final String TEXT_1249 = NL + "\t\treturn oldValue;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_1250 = " getEMap()" + NL + "\t{" + NL + "\t\t"; - protected final String TEXT_1251 = " container = eContainer();" + NL + "\t\treturn container == null ? null : ("; - protected final String TEXT_1252 = ")container.get(eContainmentFeature());" + NL + "\t}"; - protected final String TEXT_1253 = NL + "} //"; - protected final String TEXT_1254 = NL; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - -/** - * - * - * Copyright (c) 2002-2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - * - * - */ - - 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]); - 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) { - 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 (isInterface) { - stringBuffer.append(TEXT_11); - stringBuffer.append(genClass.getFormattedName()); - stringBuffer.append(TEXT_12); - if (genClass.hasDocumentation()) { - stringBuffer.append(TEXT_13); - stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer))); - stringBuffer.append(TEXT_14); - } - stringBuffer.append(TEXT_15); - if (!genClass.getGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_16); - for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genFeature.isSuppressedGetVisibility()) { - stringBuffer.append(TEXT_17); - stringBuffer.append(genClass.getQualifiedInterfaceName()); - stringBuffer.append(TEXT_18); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_19); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_20); - } - } - stringBuffer.append(TEXT_21); - } - stringBuffer.append(TEXT_22); - if (!genModel.isSuppressEMFMetaData()) { - stringBuffer.append(TEXT_23); - stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); - stringBuffer.append(TEXT_24); - stringBuffer.append(genClass.getClassifierAccessorName()); - stringBuffer.append(TEXT_25); - } - 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_26); - stringBuffer.append(modelInfo); - } else { - stringBuffer.append(TEXT_27); - stringBuffer.append(modelInfo); - }} if (first) { - stringBuffer.append(TEXT_28); - }} - if (genClass.needsRootExtendsInterfaceExtendsTag()) { - stringBuffer.append(TEXT_29); - stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface())); - } - stringBuffer.append(TEXT_30); - } else { - stringBuffer.append(TEXT_31); - stringBuffer.append(genClass.getFormattedName()); - stringBuffer.append(TEXT_32); - if (!genClass.getImplementedGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_33); - for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - stringBuffer.append(TEXT_34); - stringBuffer.append(genClass.getQualifiedClassName()); - stringBuffer.append(TEXT_35); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_36); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_37); - } - stringBuffer.append(TEXT_38); - } - stringBuffer.append(TEXT_39); - } - if (isImplementation) { - stringBuffer.append(TEXT_40); - if (genClass.isAbstract()) { - stringBuffer.append(TEXT_41); - } - stringBuffer.append(TEXT_42); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(genClass.getClassExtends()); - stringBuffer.append(genClass.getClassImplements()); - } else { - stringBuffer.append(TEXT_43); - stringBuffer.append(genClass.getInterfaceName()); - stringBuffer.append(genClass.getInterfaceExtends()); - } - stringBuffer.append(TEXT_44); - if (genModel.getCopyrightText() != null) { - stringBuffer.append(TEXT_45); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genModel.getImportedName("java.lang.String")); - stringBuffer.append(TEXT_46); - stringBuffer.append(genModel.getCopyrightText()); - stringBuffer.append(TEXT_47); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_48); - } - if (isImplementation && genModel.getDriverNumber() != null) { - stringBuffer.append(TEXT_49); - stringBuffer.append(genModel.getImportedName("java.lang.String")); - stringBuffer.append(TEXT_50); - stringBuffer.append(genModel.getDriverNumber()); - stringBuffer.append(TEXT_51); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_52); - } - if (isImplementation && genClass.isJavaIOSerializable()) { - stringBuffer.append(TEXT_53); - } - if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); - if (eVirtualValuesField != null) { - stringBuffer.append(TEXT_54); - stringBuffer.append(eVirtualValuesField); - stringBuffer.append(TEXT_55); - } - { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList()); - if (!eVirtualIndexBitFields.isEmpty()) { - for (Iterator i = eVirtualIndexBitFields.iterator(); i.hasNext();) { String eVirtualIndexBitField = (String)i.next(); - stringBuffer.append(TEXT_56); - stringBuffer.append(eVirtualIndexBitField); - stringBuffer.append(TEXT_57); - } - } - } - } - if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) { - stringBuffer.append(TEXT_58); - stringBuffer.append(genModel.getBooleanFlagsField()); - stringBuffer.append(TEXT_59); - } - if (isImplementation && !genModel.isReflectiveDelegation()) { - for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - stringBuffer.append(TEXT_60); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_61); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_62); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_63); - stringBuffer.append(genClass.getFeatureValue(genFeature)); - stringBuffer.append(TEXT_64); - if (genFeature.isListType() || genFeature.isReferenceType()) { - if (genClass.isField(genFeature)) { - stringBuffer.append(TEXT_65); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_66); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_67); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_68); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_69); - if (genFeature.getImportedType().equals("Sequence")){ - stringBuffer.append(TEXT_70); - stringBuffer.append(genFeature.getImportedEffectiveFeatureMapWrapperClass()); - stringBuffer.append(TEXT_71); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_72); - }else{ - stringBuffer.append(TEXT_73); - stringBuffer.append(genModel.getImportedName(genFeature.getType())); - stringBuffer.append(TEXT_74); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_75); - } - } - if (genModel.isArrayAccessors() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { - stringBuffer.append(TEXT_76); - stringBuffer.append(genFeature.getGetArrayAccessor()); - stringBuffer.append(TEXT_77); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_78); - stringBuffer.append(genFeature.getGetArrayAccessor()); - stringBuffer.append(TEXT_79); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_80); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_81); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_82); - } - } else { - if (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable())) { - stringBuffer.append(TEXT_83); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_84); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_85); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_86); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_87); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_88); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_89); - stringBuffer.append(genFeature.getStaticDefaultValue()); - stringBuffer.append(TEXT_90); - stringBuffer.append(genModel.getNonNLS(genFeature.getStaticDefaultValue())); - stringBuffer.append(TEXT_91); - } - if (genClass.isField(genFeature)) { - if (genClass.isFlag(genFeature)) { - if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) { - stringBuffer.append(TEXT_92); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_93); - } - stringBuffer.append(TEXT_94); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_95); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_96); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_97); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_98); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_99); - stringBuffer.append("<< " + genClass.getFlagIndex(genFeature) % 32 ); - stringBuffer.append(TEXT_100); - } else { - stringBuffer.append(TEXT_101); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_102); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_103); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_104); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_105); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_106); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_107); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_108); - } - } - } - if (genClass.isESetField(genFeature)) { - if (genClass.isESetFlag(genFeature)) { - if (genClass.getESetFlagIndex(genFeature) > 31 && genClass.getESetFlagIndex(genFeature) % 32 == 0) { - stringBuffer.append(TEXT_109); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_110); - } - stringBuffer.append(TEXT_111); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_112); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_113); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_114); - stringBuffer.append("<< " + genClass.getESetFlagIndex(genFeature) % 32 ); - stringBuffer.append(TEXT_115); - } else { - stringBuffer.append(TEXT_116); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_117); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_118); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_119); - } - } - } - //Class/declaredFieldGenFeature.override.javajetinc - } - if (isImplementation) { - stringBuffer.append(TEXT_120); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(TEXT_121); - for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - stringBuffer.append(TEXT_122); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_123); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_124); - } - stringBuffer.append(TEXT_125); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Type")); - stringBuffer.append(TEXT_126); - stringBuffer.append(genModel.getImportedName("commonj.sdo.helper.TypeHelper")); - stringBuffer.append(TEXT_127); - stringBuffer.append(genClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_128); - } - 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_129); - if (!isImplementation) { - stringBuffer.append(TEXT_130); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_131); - stringBuffer.append(genFeature.getGetArrayAccessor()); - stringBuffer.append(TEXT_132); - } else { - stringBuffer.append(TEXT_133); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_134); - stringBuffer.append(genFeature.getGetArrayAccessor()); - stringBuffer.append(TEXT_135); - if (genFeature.isVolatile()) { - stringBuffer.append(TEXT_136); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); - stringBuffer.append(TEXT_137); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); - stringBuffer.append(TEXT_138); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_139); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_140); - } else { - stringBuffer.append(TEXT_141); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_142); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_143); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_144); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); - stringBuffer.append(TEXT_145); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); - stringBuffer.append(TEXT_146); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_147); - } - stringBuffer.append(TEXT_148); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_149); - } - stringBuffer.append(TEXT_150); - if (!isImplementation) { - stringBuffer.append(TEXT_151); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_152); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_153); - } else { - stringBuffer.append(TEXT_154); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_155); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_156); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_157); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_158); - } - stringBuffer.append(TEXT_159); - if (!isImplementation) { - stringBuffer.append(TEXT_160); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_161); - } else { - stringBuffer.append(TEXT_162); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_163); - if (genFeature.isVolatile()) { - stringBuffer.append(TEXT_164); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_165); - } else { - stringBuffer.append(TEXT_166); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_167); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_168); - } - stringBuffer.append(TEXT_169); - } - stringBuffer.append(TEXT_170); - if (!isImplementation) { - stringBuffer.append(TEXT_171); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_172); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_173); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_174); - } else { - stringBuffer.append(TEXT_175); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_176); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_177); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_178); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); - stringBuffer.append(TEXT_179); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_180); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_181); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_182); - } - stringBuffer.append(TEXT_183); - if (!isImplementation) { - stringBuffer.append(TEXT_184); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_185); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_186); - } else { - stringBuffer.append(TEXT_187); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_188); - stringBuffer.append(genFeature.getListItemType()); - stringBuffer.append(TEXT_189); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_190); - } - } - if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) { - if (isInterface) { - stringBuffer.append(TEXT_191); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_192); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_193); - if (genFeature.isListType()) { - if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); - stringBuffer.append(TEXT_194); - if (keyFeature.isListType()) { - stringBuffer.append(TEXT_195); - stringBuffer.append(keyFeature.getQualifiedListItemType()); - stringBuffer.append(TEXT_196); - } else { - stringBuffer.append(TEXT_197); - stringBuffer.append(keyFeature.getType()); - stringBuffer.append(TEXT_198); - } - stringBuffer.append(TEXT_199); - if (valueFeature.isListType()) { - stringBuffer.append(TEXT_200); - stringBuffer.append(valueFeature.getQualifiedListItemType()); - stringBuffer.append(TEXT_201); - } else { - stringBuffer.append(TEXT_202); - stringBuffer.append(valueFeature.getType()); - stringBuffer.append(TEXT_203); - } - stringBuffer.append(TEXT_204); - } else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType()))) { - stringBuffer.append(TEXT_205); - stringBuffer.append(genFeature.getQualifiedListItemType()); - stringBuffer.append(TEXT_206); - } - } else if (genFeature.isSetDefaultValue()) { - stringBuffer.append(TEXT_207); - stringBuffer.append(genFeature.getDefaultValue()); - stringBuffer.append(TEXT_208); - } - if (genFeature.getTypeGenEnum() != null) { - stringBuffer.append(TEXT_209); - stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); - stringBuffer.append(TEXT_210); - } - if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); - if (!reverseGenFeature.isSuppressedGetVisibility()) { - stringBuffer.append(TEXT_211); - stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); - stringBuffer.append(TEXT_212); - stringBuffer.append(reverseGenFeature.getGetAccessor()); - stringBuffer.append(TEXT_213); - stringBuffer.append(reverseGenFeature.getFormattedName()); - stringBuffer.append(TEXT_214); - } - } - stringBuffer.append(TEXT_215); - if (!genFeature.hasDocumentation()) { - stringBuffer.append(TEXT_216); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_217); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_218); - } - stringBuffer.append(TEXT_219); - if (genFeature.hasDocumentation()) { - stringBuffer.append(TEXT_220); - stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer))); - stringBuffer.append(TEXT_221); - } - stringBuffer.append(TEXT_222); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_223); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_224); - if (genFeature.getTypeGenEnum() != null) { - stringBuffer.append(TEXT_225); - stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); - } - if (genFeature.isUnsettable()) { - if (!genFeature.isSuppressedIsSetVisibility()) { - stringBuffer.append(TEXT_226); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_227); - } - if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { - stringBuffer.append(TEXT_228); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_229); - } - } - if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { - stringBuffer.append(TEXT_230); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_231); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_232); - } - if (!genModel.isSuppressEMFMetaData()) { - stringBuffer.append(TEXT_233); - stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); - stringBuffer.append(TEXT_234); - stringBuffer.append(genFeature.getFeatureAccessorName()); - stringBuffer.append(TEXT_235); - } - if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); - if (!reverseGenFeature.isSuppressedGetVisibility()) { - stringBuffer.append(TEXT_236); - stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); - stringBuffer.append(TEXT_237); - 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_238); - stringBuffer.append(modelInfo); - } else { - stringBuffer.append(TEXT_239); - stringBuffer.append(modelInfo); - }} if (first) { - stringBuffer.append(TEXT_240); - }} - stringBuffer.append(TEXT_241); - } else { - stringBuffer.append(TEXT_242); - } - if (!isImplementation) { - stringBuffer.append(TEXT_243); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_244); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_245); - } else { - stringBuffer.append(TEXT_246); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_247); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_248); - if (genModel.isReflectiveDelegation()) { - stringBuffer.append(TEXT_249); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_250); - } - stringBuffer.append(TEXT_251); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_252); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_253); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_254); - stringBuffer.append(genFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_255); - } - stringBuffer.append(TEXT_256); - } else if (!genFeature.isVolatile()) { - if (genFeature.isListType()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_257); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_258); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_259); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_260); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_261); - } - stringBuffer.append(TEXT_262); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_263); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_264); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_265); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_266); - stringBuffer.append(genClass.getListConstructor(genFeature)); - stringBuffer.append(TEXT_267); - } else { - if (genFeature.getImportedType().equals("Sequence")){ - stringBuffer.append(TEXT_268); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_269); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_270); - } else { - stringBuffer.append(TEXT_271); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_272); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_273); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_274); - } - } - stringBuffer.append(TEXT_275); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""); - stringBuffer.append(TEXT_276); - } else if (genFeature.isContainer()) { - stringBuffer.append(TEXT_277); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_278); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_279); - } else { - if (genFeature.isResolveProxies()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_280); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_281); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_282); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_283); - stringBuffer.append(genFeature.getUpperName()); - if (!genFeature.isReferenceType()) { - stringBuffer.append(TEXT_284); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_285); - } - stringBuffer.append(TEXT_286); - } - stringBuffer.append(TEXT_287); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_288); - stringBuffer.append(genFeature.getSafeNameAsEObject()); - stringBuffer.append(TEXT_289); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_290); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_291); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_292); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_293); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_294); - stringBuffer.append(genFeature.getNonEObjectInternalTypeCast()); - stringBuffer.append(TEXT_295); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_296); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_297); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_298); - if (genFeature.isEffectiveContains()) { - stringBuffer.append(TEXT_299); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_300); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_301); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_302); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_303); - if (!genFeature.isBidirectional()) { - stringBuffer.append(TEXT_304); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_305); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_306); - } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_307); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext")); - stringBuffer.append(TEXT_308); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_309); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_310); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_311); - } - stringBuffer.append(TEXT_312); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_313); - if (!genFeature.isBidirectional()) { - stringBuffer.append(TEXT_314); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_315); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_316); - } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_317); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_318); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_319); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_320); - } - stringBuffer.append(TEXT_321); - } else if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_322); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_323); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_324); - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_325); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_326); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_327); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_328); - } - stringBuffer.append(TEXT_329); - } - if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_330); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_331); - stringBuffer.append(genFeature.getUpperName()); - if (!genFeature.isReferenceType()) { - stringBuffer.append(TEXT_332); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_333); - } - stringBuffer.append(TEXT_334); - } else if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_335); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_336); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_337); - } else { - stringBuffer.append(TEXT_338); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_339); - } - } - } else {//volatile - if (genFeature.isResolveProxies() && !genFeature.isListType()) { - stringBuffer.append(TEXT_340); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_341); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_342); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_343); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_344); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_345); - stringBuffer.append(genFeature.getNonEObjectInternalTypeCast()); - stringBuffer.append(TEXT_346); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_347); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_348); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_349); - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (genFeature.isFeatureMapType()) { - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_350); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_351); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_352); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_353); - } else { - stringBuffer.append(TEXT_354); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_355); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_356); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_357); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_358); - } - } else if (genFeature.isListType()) { - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_359); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_360); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_361); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_362); - } else { - stringBuffer.append(TEXT_363); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_364); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_365); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_366); - } - } else { - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_367); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_368); - } - stringBuffer.append(TEXT_369); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_370); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_371); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_372); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_373); - stringBuffer.append(genFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_374); - } - stringBuffer.append(TEXT_375); - } else { - stringBuffer.append(TEXT_376); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_377); - } - stringBuffer.append(TEXT_378); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_379); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_380); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_381); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_382); - stringBuffer.append(genFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_383); - } - stringBuffer.append(TEXT_384); - } - } - } else { - stringBuffer.append(TEXT_385); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_386); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_387); - //Class/getGenFeature.todo.override.javajetinc - } - } - stringBuffer.append(TEXT_388); - } - //Class/getGenFeature.override.javajetinc - } - if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) { - stringBuffer.append(TEXT_389); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_390); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_391); - if (genFeature.isContainer()) { - stringBuffer.append(TEXT_392); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_393); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_394); - } else if (!genFeature.isVolatile()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_395); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_396); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_397); - } else { - stringBuffer.append(TEXT_398); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_399); - } - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_400); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_401); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_402); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_403); - } else { - stringBuffer.append(TEXT_404); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_405); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_406); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_407); - } - } else { - stringBuffer.append(TEXT_408); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_409); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_410); - //Class/basicGetGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_411); - //Class/basicGetGenFeature.override.javajetinc - } - if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) { - stringBuffer.append(TEXT_412); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_413); - stringBuffer.append(genFeature.getImportedInternalType()); - stringBuffer.append(TEXT_414); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_415); - if (!genFeature.isVolatile()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_416); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_417); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_418); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_419); - } else { - stringBuffer.append(TEXT_420); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_421); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_422); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_423); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_424); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_425); - } - if (genFeature.isUnsettable()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_426); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_427); - } else if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_428); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_429); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_430); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_431); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_432); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_433); - } else { - stringBuffer.append(TEXT_434); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_435); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_436); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_437); - } - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_438); - if (genFeature.isUnsettable()) { - stringBuffer.append(TEXT_439); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_440); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_441); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); - stringBuffer.append(TEXT_442); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_443); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_444); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(TEXT_445); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_446); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_447); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_448); - } else { - stringBuffer.append(TEXT_449); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_450); - } - stringBuffer.append(TEXT_451); - } else { - stringBuffer.append(TEXT_452); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_453); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_454); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); - stringBuffer.append(TEXT_455); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_456); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_457); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_458); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(TEXT_459); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_460); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_461); - } - stringBuffer.append(TEXT_462); - } - stringBuffer.append(TEXT_463); - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_464); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_465); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_466); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_467); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_468); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_469); - } else { - stringBuffer.append(TEXT_470); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_471); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_472); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_473); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_474); - } - } else { - stringBuffer.append(TEXT_475); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_476); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_477); - //Class/basicSetGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_478); - //Class/basicSetGenFeature.override.javajetinc - } - if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) { - if (isInterface) { - stringBuffer.append(TEXT_479); - stringBuffer.append(genClass.getQualifiedInterfaceName()); - stringBuffer.append(TEXT_480); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_481); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_482); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_483); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_484); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_485); - if (genFeature.isEnumType()) { - stringBuffer.append(TEXT_486); - stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); - } - if (genFeature.isUnsettable()) { - if (!genFeature.isSuppressedIsSetVisibility()) { - stringBuffer.append(TEXT_487); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_488); - } - if (!genFeature.isSuppressedUnsetVisibility()) { - stringBuffer.append(TEXT_489); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_490); - } - } - stringBuffer.append(TEXT_491); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_492); - } else { - stringBuffer.append(TEXT_493); - } - if (!isImplementation) { - stringBuffer.append(TEXT_494); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_495); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_496); - } else { - stringBuffer.append(TEXT_497); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_498); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_499); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_500); - if (genModel.isReflectiveDelegation()) { - stringBuffer.append(TEXT_501); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_502); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_503); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_504); - } - stringBuffer.append(TEXT_505); - stringBuffer.append(genFeature.getCapName()); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_506); - } - stringBuffer.append(TEXT_507); - } else if (!genFeature.isVolatile()) { - if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_508); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_509); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_510); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_511); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")); - stringBuffer.append(TEXT_512); - stringBuffer.append(genFeature.getEObjectCast()); - stringBuffer.append(TEXT_513); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_514); - stringBuffer.append(genModel.getImportedName("java.lang.IllegalArgumentException")); - stringBuffer.append(TEXT_515); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_516); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_517); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_518); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_519); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_520); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_521); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_522); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_523); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_524); - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_525); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_526); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_527); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_528); - } - } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_529); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_530); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_531); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_532); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_533); - } - stringBuffer.append(TEXT_534); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_535); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_536); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_537); - if (!genFeature.isBidirectional()) { - stringBuffer.append(TEXT_538); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_539); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_540); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_541); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_542); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_543); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_544); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_545); - } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_546); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_547); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_548); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_549); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_550); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_551); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_552); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_553); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_554); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_555); - } - stringBuffer.append(TEXT_556); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_557); - stringBuffer.append(genFeature.getInternalTypeCast()); - stringBuffer.append(TEXT_558); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_559); - if (genFeature.isUnsettable()) { - stringBuffer.append(TEXT_560); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_561); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_562); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_563); - } else if (genClass.isESetFlag(genFeature)) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_564); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_565); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_566); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_567); - } - stringBuffer.append(TEXT_568); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_569); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_570); - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_571); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_572); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_573); - } - stringBuffer.append(TEXT_574); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_575); - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_576); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_577); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_578); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_579); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_580); - } - stringBuffer.append(TEXT_581); - } else { - 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); - } - } - } else { - if (genClass.isFlag(genFeature)) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_586); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_587); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_588); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_589); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_590); - } - stringBuffer.append(TEXT_591); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_592); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_593); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_594); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_595); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_596); - } else { - if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_597); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_598); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_599); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_600); - } - } - if (genFeature.isEnumType()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_601); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_602); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_603); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_604); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_605); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_606); - } else { - stringBuffer.append(TEXT_607); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_608); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_609); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_610); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_611); - } - } else { - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_612); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_613); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_614); - stringBuffer.append(genFeature.getInternalTypeCast()); - stringBuffer.append(TEXT_615); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_616); - } else { - stringBuffer.append(TEXT_617); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_618); - stringBuffer.append(genFeature.getInternalTypeCast()); - stringBuffer.append(TEXT_619); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_620); - } - } - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_621); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_622); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_623); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_624); - } - } - if (genFeature.isUnsettable()) { - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_625); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_626); - } else if (genClass.isESetFlag(genFeature)) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_627); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_628); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_629); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_630); - } - stringBuffer.append(TEXT_631); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_632); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_633); - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_634); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_635); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_636); - } - stringBuffer.append(TEXT_637); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_638); - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_639); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_640); - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_641); - if (genFeature.isReferenceType()) { - stringBuffer.append(TEXT_642); - } else { - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_643); - } - stringBuffer.append(TEXT_644); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(TEXT_645); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_646); - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_647); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(genFeature.getSafeName()); - } - stringBuffer.append(TEXT_648); - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_649); - } else { - stringBuffer.append(TEXT_650); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_651); - } - stringBuffer.append(TEXT_652); - } - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_653); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_654); - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_655); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_656); - if (genFeature.isReferenceType()) { - stringBuffer.append(TEXT_657); - } else { - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_658); - } - stringBuffer.append(TEXT_659); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(TEXT_660); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_661); - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_662); - stringBuffer.append(genFeature.getCapName()); - } else { - stringBuffer.append(genFeature.getSafeName()); - } - stringBuffer.append(TEXT_663); - } - } - } - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_664); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_665); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_666); - if (genFeature.isPrimitiveType()){ - stringBuffer.append(TEXT_667); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_668); - } - stringBuffer.append(TEXT_669); - stringBuffer.append(genFeature.getCapName()); - if (genFeature.isPrimitiveType()){ - stringBuffer.append(TEXT_670); - } - stringBuffer.append(TEXT_671); - } else { - stringBuffer.append(TEXT_672); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_673); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_674); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_675); - if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_676); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_677); - } - stringBuffer.append(TEXT_678); - stringBuffer.append(genFeature.getCapName()); - if (genFeature.isPrimitiveType()){ - stringBuffer.append(TEXT_679); - } - stringBuffer.append(TEXT_680); - } - } else { - stringBuffer.append(TEXT_681); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_682); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_683); - //Class/setGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_684); - } - //Class/setGenFeature.override.javajetinc - } - if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) { - stringBuffer.append(TEXT_685); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_686); - if (!genFeature.isVolatile()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_687); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_688); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_689); - } else { - stringBuffer.append(TEXT_690); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_691); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_692); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_693); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_694); - } - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_695); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_696); - } else if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_697); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_698); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_699); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_700); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_701); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_702); - } else { - stringBuffer.append(TEXT_703); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_704); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_705); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_706); - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_707); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_708); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); - stringBuffer.append(TEXT_709); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); - stringBuffer.append(TEXT_710); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_711); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_712); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_713); - } else { - stringBuffer.append(TEXT_714); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_715); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_716); - } else { - stringBuffer.append(TEXT_717); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_718); - } - stringBuffer.append(TEXT_719); - } - } else { - stringBuffer.append(TEXT_720); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_721); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_722); - //Class/basicUnsetGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_723); - //Class.basicUnsetGenFeature.override.javajetinc - } - if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) { - if (isInterface) { - stringBuffer.append(TEXT_724); - stringBuffer.append(genClass.getQualifiedInterfaceName()); - stringBuffer.append(TEXT_725); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_726); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_727); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_728); - if (!genFeature.isSuppressedIsSetVisibility()) { - stringBuffer.append(TEXT_729); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_730); - } - stringBuffer.append(TEXT_731); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_732); - if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { - stringBuffer.append(TEXT_733); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_734); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_735); - } - stringBuffer.append(TEXT_736); - } else { - stringBuffer.append(TEXT_737); - } - if (!isImplementation) { - stringBuffer.append(TEXT_738); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_739); - } else { - stringBuffer.append(TEXT_740); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_741); - if (genModel.isReflectiveDelegation()) { - stringBuffer.append(TEXT_742); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_743); - } else if (!genFeature.isVolatile()) { - if (genFeature.isListType()) { - stringBuffer.append(TEXT_744); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); - stringBuffer.append(TEXT_745); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_746); - } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_747); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_748); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_749); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_750); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_751); - } - stringBuffer.append(TEXT_752); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_753); - if (!genFeature.isBidirectional()) { - stringBuffer.append(TEXT_754); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_755); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_756); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_757); - } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_758); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_759); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_760); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_761); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_762); - } - stringBuffer.append(TEXT_763); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_764); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_765); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_766); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_767); - } else if (genClass.isESetFlag(genFeature)) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_768); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_769); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_770); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_771); - } - stringBuffer.append(TEXT_772); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_773); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_774); - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_775); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_776); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_777); - } - stringBuffer.append(TEXT_778); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_779); - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_780); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_781); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_782); - } - stringBuffer.append(TEXT_783); - } else { - if (genClass.isFlag(genFeature)) { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_784); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_785); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_786); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_787); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_788); - } - } else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_789); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_790); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_791); - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_792); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_793); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_794); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_795); - } - } - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_796); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_797); - } else if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_798); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_799); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_800); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_801); - } else { - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_802); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_803); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_804); - } - } - if (genFeature.isReferenceType()) { - stringBuffer.append(TEXT_805); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_806); - if (!genModel.isVirtualDelegation()) { - if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_807); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_808); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_809); - } else { - stringBuffer.append(TEXT_810); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_811); - } - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_812); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_813); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_814); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_815); - } else { - stringBuffer.append(TEXT_816); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_817); - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_818); - } else { - stringBuffer.append(TEXT_819); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_820); - } - stringBuffer.append(TEXT_821); - } - } else { - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_822); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_823); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_824); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_825); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_826); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_827); - } else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_828); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_829); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_830); - } - if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { - if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_831); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_832); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_833); - } else { - stringBuffer.append(TEXT_834); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_835); - } - } - if (!genModel.isSuppressNotification()) { - stringBuffer.append(TEXT_836); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_837); - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_838); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_839); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_840); - } else { - stringBuffer.append(TEXT_841); - stringBuffer.append(genFeature.getCapName()); - } - stringBuffer.append(TEXT_842); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_843); - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_844); - } else { - stringBuffer.append(TEXT_845); - stringBuffer.append(genFeature.getCapName()); - stringBuffer.append(TEXT_846); - } - stringBuffer.append(TEXT_847); - } - } - } - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_848); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_849); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_850); - } else { - stringBuffer.append(TEXT_851); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_852); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_853); - } - } else { - stringBuffer.append(TEXT_854); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_855); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_856); - //Class/unsetGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_857); - } - //Class/unsetGenFeature.override.javajetinc - } - if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) { - if (isInterface) { - stringBuffer.append(TEXT_858); - stringBuffer.append(genClass.getQualifiedInterfaceName()); - stringBuffer.append(TEXT_859); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_860); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_861); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_862); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_863); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_864); - if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { - stringBuffer.append(TEXT_865); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_866); - } - stringBuffer.append(TEXT_867); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_868); - if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) { - stringBuffer.append(TEXT_869); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_870); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_871); - } - stringBuffer.append(TEXT_872); - } else { - stringBuffer.append(TEXT_873); - } - if (!isImplementation) { - stringBuffer.append(TEXT_874); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_875); - } else { - stringBuffer.append(TEXT_876); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_877); - if (genModel.isReflectiveDelegation()) { - stringBuffer.append(TEXT_878); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_879); - } else if (!genFeature.isVolatile()) { - if (genFeature.isListType()) { - if (genModel.isVirtualDelegation()) { - stringBuffer.append(TEXT_880); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_881); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_882); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_883); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_884); - } - stringBuffer.append(TEXT_885); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_886); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); - stringBuffer.append(TEXT_887); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_888); - } else { - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_889); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_890); - } else if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_891); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_892); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_893); - } else { - stringBuffer.append(TEXT_894); - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_895); - } - } - } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); - if (delegateFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_896); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_897); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_898); - } else { - stringBuffer.append(TEXT_899); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_900); - stringBuffer.append(delegateFeature.getAccessorName()); - stringBuffer.append(TEXT_901); - stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); - stringBuffer.append(TEXT_902); - } - } else { - stringBuffer.append(TEXT_903); - stringBuffer.append(genFeature.getFormattedName()); - stringBuffer.append(TEXT_904); - stringBuffer.append(genFeature.getFeatureKind()); - stringBuffer.append(TEXT_905); - //Class/isSetGenFeature.todo.override.javajetinc - } - stringBuffer.append(TEXT_906); - } - //Class/isSetGenFeature.override.javajetinc - } - //Class/genFeature.override.javajetinc - }//for - for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next(); - if (isInterface) { - stringBuffer.append(TEXT_907); - if (genOperation.hasDocumentation()) { - stringBuffer.append(TEXT_908); - stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer))); - stringBuffer.append(TEXT_909); - } - 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_910); - stringBuffer.append(modelInfo); - } else { - stringBuffer.append(TEXT_911); - stringBuffer.append(modelInfo); - }} if (first) { - stringBuffer.append(TEXT_912); - }} - stringBuffer.append(TEXT_913); - } else { - stringBuffer.append(TEXT_914); - } - if (!isImplementation) { - stringBuffer.append(TEXT_915); - stringBuffer.append(genOperation.getImportedType()); - stringBuffer.append(TEXT_916); - stringBuffer.append(genOperation.getName()); - stringBuffer.append(TEXT_917); - stringBuffer.append(genOperation.getParameters()); - stringBuffer.append(TEXT_918); - stringBuffer.append(genOperation.getThrows()); - stringBuffer.append(TEXT_919); - } else { - stringBuffer.append(TEXT_920); - stringBuffer.append(genOperation.getImportedType()); - stringBuffer.append(TEXT_921); - stringBuffer.append(genOperation.getName()); - stringBuffer.append(TEXT_922); - stringBuffer.append(genOperation.getParameters()); - stringBuffer.append(TEXT_923); - stringBuffer.append(genOperation.getThrows()); - stringBuffer.append(TEXT_924); - if (genOperation.hasBody()) { - stringBuffer.append(TEXT_925); - 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_926); - stringBuffer.append(diagnostics); - stringBuffer.append(TEXT_927); - stringBuffer.append(diagnostics); - stringBuffer.append(TEXT_928); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")); - stringBuffer.append(TEXT_929); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")); - stringBuffer.append(TEXT_930); - stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); - stringBuffer.append(TEXT_931); - stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); - stringBuffer.append(TEXT_932); - stringBuffer.append(opClass.getOperationID(genOperation)); - stringBuffer.append(TEXT_933); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")); - stringBuffer.append(TEXT_934); - stringBuffer.append(genOperation.getName()); - stringBuffer.append(TEXT_935); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")); - stringBuffer.append(TEXT_936); - stringBuffer.append(context); - stringBuffer.append(TEXT_937); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(genModel.getNonNLS(2)); - stringBuffer.append(TEXT_938); - } else { - stringBuffer.append(TEXT_939); - //Class/implementedGenOperation.todo.override.javajetinc - } - stringBuffer.append(TEXT_940); - } - //Class/implementedGenOperation.override.javajetinc - }//for - if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) { - stringBuffer.append(TEXT_941); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_942); - for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_943); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_944); - if (genFeature.isListType()) { - if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { - stringBuffer.append(TEXT_945); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); - stringBuffer.append(TEXT_946); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_947); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_948); - } else { - stringBuffer.append(TEXT_949); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); - stringBuffer.append(TEXT_950); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_951); - } - } else if (genFeature.isContainer()) { - stringBuffer.append(TEXT_952); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_953); - } else { - if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_954); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_955); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_956); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_957); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_958); - } - stringBuffer.append(TEXT_959); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_960); - if (genFeature.isEffectiveContains()) { - stringBuffer.append(TEXT_961); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_962); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_963); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_964); - } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); - stringBuffer.append(TEXT_965); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); - stringBuffer.append(TEXT_966); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_967); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_968); - stringBuffer.append(targetClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_969); - } - stringBuffer.append(TEXT_970); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_971); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_972); - } - } - } - stringBuffer.append(TEXT_973); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_974); - } else { - stringBuffer.append(TEXT_975); - } - stringBuffer.append(TEXT_976); - } - if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) { - stringBuffer.append(TEXT_977); - stringBuffer.append(genModel.getImportedName("java.lang.Object")); - stringBuffer.append(TEXT_978); - for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_979); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_980); - if (genFeature.isListType()) { - if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { - stringBuffer.append(TEXT_981); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); - stringBuffer.append(TEXT_982); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_983); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_984); - } else if (genFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_985); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_986); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_987); - } else { - stringBuffer.append(TEXT_988); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_989); - } - } else if (genFeature.isContainer()) { - stringBuffer.append(TEXT_990); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_991); - } else if (genFeature.isUnsettable()) { - stringBuffer.append(TEXT_992); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_993); - } else { - stringBuffer.append(TEXT_994); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_995); - } - } - } - stringBuffer.append(TEXT_996); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_997); - } else { - stringBuffer.append(TEXT_998); - } - stringBuffer.append(TEXT_999); - } - if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) { - stringBuffer.append(TEXT_1000); - 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_1001); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1002); - stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); - stringBuffer.append(TEXT_1003); - stringBuffer.append(targetClass.getImportedInterfaceName()); - 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.getImplementedGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_1009); - for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_1010); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1011); - if (genFeature.isPrimitiveType()) { - if (genFeature.isBooleanType()) { - stringBuffer.append(TEXT_1012); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1013); - } else { - stringBuffer.append(TEXT_1014); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_1015); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1016); - } - } else if (genFeature.isResolveProxies() && !genFeature.isListType()) { - stringBuffer.append(TEXT_1017); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1018); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1019); - } else if (genFeature.isMapType()) { - if (genFeature.isEffectiveSuppressEMFTypes()) { - stringBuffer.append(TEXT_1020); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_1021); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1022); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1023); - } else { - stringBuffer.append(TEXT_1024); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1025); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1026); - } - } else if (genFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_1027); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1028); - } else if (genFeature.isFeatureMapType()) { - stringBuffer.append(TEXT_1029); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1030); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - 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(TEXT_1035); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_1036); - } else { - stringBuffer.append(TEXT_1037); - } - stringBuffer.append(TEXT_1038); - } - if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) { - stringBuffer.append(TEXT_1039); - for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_1040); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1041); - if (genFeature.isListType()) { - if (genFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_1042); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1043); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1044); - } else if (genFeature.isFeatureMapType()) { - stringBuffer.append(TEXT_1045); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); - stringBuffer.append(TEXT_1046); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1047); - } else if (genFeature.isMapType()) { - if (genFeature.isEffectiveSuppressEMFTypes()) { - stringBuffer.append(TEXT_1048); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); - stringBuffer.append(TEXT_1049); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_1050); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1051); - } else { - stringBuffer.append(TEXT_1052); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); - stringBuffer.append(TEXT_1053); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1054); - } - } else { - stringBuffer.append(TEXT_1055); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1056); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1057); - stringBuffer.append(genModel.getImportedName("java.util.Collection")); - stringBuffer.append(TEXT_1058); - } - } else if (genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1059); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1060); - stringBuffer.append(genFeature.getObjectType()); - stringBuffer.append(TEXT_1061); - stringBuffer.append(genFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_1062); - } else { - stringBuffer.append(TEXT_1063); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1064); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1065); - } - stringBuffer.append(TEXT_1066); - } - } - stringBuffer.append(TEXT_1067); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_1068); - } else { - stringBuffer.append(TEXT_1069); - } - stringBuffer.append(TEXT_1070); - for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_1071); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1072); - if (genFeature.isListType() && !genFeature.isUnsettable()) { - if (genFeature.isWrappedFeatureMapType()) { - stringBuffer.append(TEXT_1073); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1074); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1075); - } else { - stringBuffer.append(TEXT_1076); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1077); - } - } else if (genFeature.isUnsettable()) { - stringBuffer.append(TEXT_1078); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1079); - } else if (genFeature.isReferenceType()) { - stringBuffer.append(TEXT_1080); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1081); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1082); - } else { - stringBuffer.append(TEXT_1083); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1084); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1085); - } - stringBuffer.append(TEXT_1086); - } - } - stringBuffer.append(TEXT_1087); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_1088); - } else { - stringBuffer.append(TEXT_1089); - } - stringBuffer.append(TEXT_1090); - } - if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_1091); - for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next(); - if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) { - stringBuffer.append(TEXT_1092); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1093); - if (genFeature.isListType() && !genFeature.isUnsettable()) { - if (genFeature.isWrappedFeatureMapType()) { - if (genFeature.isVolatile()) { - stringBuffer.append(TEXT_1094); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1095); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1096); - } else { - stringBuffer.append(TEXT_1097); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1098); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1099); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1100); - } - } else { - if (genClass.isField(genFeature)) { - stringBuffer.append(TEXT_1101); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1102); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1103); - } else { - if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_1104); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1105); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1106); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1107); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1108); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1109); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1110); - } else { - stringBuffer.append(TEXT_1111); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1112); - } - } - } - } else if (genFeature.isUnsettable()) { - stringBuffer.append(TEXT_1113); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1114); - } else if (genFeature.isResolveProxies()) { - if (genClass.isField(genFeature)) { - stringBuffer.append(TEXT_1115); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1116); - } else { - if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_1117); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1118); - } else { - stringBuffer.append(TEXT_1119); - stringBuffer.append(genFeature.getAccessorName()); - stringBuffer.append(TEXT_1120); - } - } - } else if (genFeature.isReferenceType()) { - if (genClass.isField(genFeature)) { - stringBuffer.append(TEXT_1121); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1122); - } else { - if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_1123); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1124); - } else { - stringBuffer.append(TEXT_1125); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1126); - } - } - } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) { - if (genClass.isField(genFeature)) { - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_1127); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_1128); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1129); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1130); - } else { - stringBuffer.append(TEXT_1131); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1132); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1133); - } - } else { - if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_1134); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1135); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1136); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1137); - } else { - stringBuffer.append(TEXT_1138); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1139); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1140); - } - } - } else {//datatype - if (genClass.isField(genFeature)) { - stringBuffer.append(TEXT_1141); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1142); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1143); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1144); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1145); - } else { - if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { - stringBuffer.append(TEXT_1146); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1147); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1148); - stringBuffer.append(genFeature.getImportedType()); - stringBuffer.append(TEXT_1149); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1150); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1151); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1152); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1153); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1154); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1155); - } else { - stringBuffer.append(TEXT_1156); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1157); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1158); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1159); - stringBuffer.append(genFeature.getGetAccessor()); - stringBuffer.append(TEXT_1160); - } - } - } - } - } - stringBuffer.append(TEXT_1161); - if (genModel.isMinimalReflectiveMethods()) { - stringBuffer.append(TEXT_1162); - } else { - stringBuffer.append(TEXT_1163); - } - stringBuffer.append(TEXT_1164); - //Class/eIsSet.override.javajetinc - } - if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_1165); - for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); - stringBuffer.append(TEXT_1166); - stringBuffer.append(mixinGenClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_1167); - for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); - stringBuffer.append(TEXT_1168); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1169); - stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); - stringBuffer.append(TEXT_1170); - } - stringBuffer.append(TEXT_1171); - } - stringBuffer.append(TEXT_1172); - for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); - stringBuffer.append(TEXT_1173); - stringBuffer.append(mixinGenClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_1174); - for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); - stringBuffer.append(TEXT_1175); - stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); - stringBuffer.append(TEXT_1176); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1177); - } - stringBuffer.append(TEXT_1178); - } - stringBuffer.append(TEXT_1179); - } - if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); - if (eVirtualValuesField != null) { - stringBuffer.append(TEXT_1180); - stringBuffer.append(eVirtualValuesField); - stringBuffer.append(TEXT_1181); - stringBuffer.append(eVirtualValuesField); - stringBuffer.append(TEXT_1182); - } - { List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList()); - if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList()); - stringBuffer.append(TEXT_1183); - for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { - stringBuffer.append(TEXT_1184); - stringBuffer.append(i); - stringBuffer.append(TEXT_1185); - stringBuffer.append(allEVirtualIndexBitFields.get(i)); - stringBuffer.append(TEXT_1186); - } - stringBuffer.append(TEXT_1187); - for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { - stringBuffer.append(TEXT_1188); - stringBuffer.append(i); - stringBuffer.append(TEXT_1189); - stringBuffer.append(allEVirtualIndexBitFields.get(i)); - stringBuffer.append(TEXT_1190); - } - stringBuffer.append(TEXT_1191); - } - } - } - if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) { - stringBuffer.append(TEXT_1192); - { boolean first = true; - for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next(); - if (first) { first = false; - stringBuffer.append(TEXT_1193); - stringBuffer.append(genFeature.getName()); - stringBuffer.append(TEXT_1194); - stringBuffer.append(genModel.getNonNLS()); - } else { - stringBuffer.append(TEXT_1195); - stringBuffer.append(genFeature.getName()); - stringBuffer.append(TEXT_1196); - stringBuffer.append(genModel.getNonNLS()); - } - if (genFeature.isUnsettable() && !genFeature.isListType()) { - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1197); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1198); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1199); - stringBuffer.append(genModel.getNonNLS()); - } else { - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_1200); - if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_1201); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_1202); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1203); - } else { - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_1204); - } - stringBuffer.append(TEXT_1205); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_1206); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1207); - stringBuffer.append(genModel.getNonNLS()); - } else { - stringBuffer.append(TEXT_1208); - if (genClass.isESetFlag(genFeature)) { - stringBuffer.append(TEXT_1209); - stringBuffer.append(genClass.getESetFlagsField(genFeature)); - stringBuffer.append(TEXT_1210); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1211); - } else { - stringBuffer.append(genFeature.getUncapName()); - stringBuffer.append(TEXT_1212); - } - stringBuffer.append(TEXT_1213); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1214); - stringBuffer.append(genModel.getNonNLS()); - } - } - } else { - if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1215); - stringBuffer.append(genFeature.getUpperName()); - if (!genFeature.isListType() && !genFeature.isReferenceType()){ - stringBuffer.append(TEXT_1216); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1217); - } - stringBuffer.append(TEXT_1218); - } else { - if (genClass.isFlag(genFeature)) { - stringBuffer.append(TEXT_1219); - stringBuffer.append(genClass.getFlagsField(genFeature)); - stringBuffer.append(TEXT_1220); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_1221); - } else { - stringBuffer.append(TEXT_1222); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_1223); - } - } - } - } - } - stringBuffer.append(TEXT_1224); - } - if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature(); - stringBuffer.append(TEXT_1225); - if (keyFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1226); - stringBuffer.append(keyFeature.getObjectType()); - stringBuffer.append(TEXT_1227); - } else { - stringBuffer.append(TEXT_1228); - } - stringBuffer.append(TEXT_1229); - if (keyFeature.isListType()) { - stringBuffer.append(TEXT_1230); - stringBuffer.append(genModel.getImportedName("java.util.Collection")); - stringBuffer.append(TEXT_1231); - } else if (keyFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1232); - stringBuffer.append(keyFeature.getObjectType()); - stringBuffer.append(TEXT_1233); - stringBuffer.append(keyFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_1234); - } else { - stringBuffer.append(TEXT_1235); - stringBuffer.append(keyFeature.getImportedType()); - stringBuffer.append(TEXT_1236); - } - stringBuffer.append(TEXT_1237); - if (valueFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1238); - stringBuffer.append(valueFeature.getObjectType()); - stringBuffer.append(TEXT_1239); - } else { - stringBuffer.append(TEXT_1240); - } - stringBuffer.append(TEXT_1241); - if (valueFeature.isListType()) { - stringBuffer.append(TEXT_1242); - stringBuffer.append(genModel.getImportedName("java.util.Collection")); - stringBuffer.append(TEXT_1243); - } else if (valueFeature.isPrimitiveType()) { - stringBuffer.append(TEXT_1244); - stringBuffer.append(valueFeature.getObjectType()); - stringBuffer.append(TEXT_1245); - stringBuffer.append(valueFeature.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_1246); - } else { - stringBuffer.append(TEXT_1247); - stringBuffer.append(valueFeature.getImportedType()); - stringBuffer.append(TEXT_1248); - } - stringBuffer.append(TEXT_1249); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_1250); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject")); - stringBuffer.append(TEXT_1251); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); - stringBuffer.append(TEXT_1252); - } - stringBuffer.append(TEXT_1253); - stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()); - // TODO fix the space above - genModel.emitSortedImports(); - stringBuffer.append(TEXT_1254); - return stringBuffer.toString(); - } -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java b/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java deleted file mode 100644 index c74f196d95..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/SDOFactoryClass.java +++ /dev/null @@ -1,1495 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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.generate.templates.model; - -import java.util.*; -import org.eclipse.emf.codegen.ecore.genmodel.*; - -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; - protected final String TEXT_10 = NL; - protected final String TEXT_11 = 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_12 = NL + " * @see "; - protected final String TEXT_13 = NL + " * @generated" + NL + " */"; - protected final String TEXT_14 = NL + "/**" + NL + " * " + NL + " * An implementation of the model Factory." + NL + " * " + NL + " * @generated" + NL + " */"; - protected final String TEXT_15 = NL + "public class "; - protected final String TEXT_16 = " extends "; - protected final String TEXT_17 = " implements "; - protected final String TEXT_18 = NL + "public interface "; - protected final String TEXT_19 = " extends "; - protected final String TEXT_20 = NL + "{"; - protected final String TEXT_21 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\t"; - protected final String TEXT_22 = " copyright = \""; - protected final String TEXT_23 = "\";"; - protected final String TEXT_24 = NL; - protected final String TEXT_25 = NL; - protected final String TEXT_26 = 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_27 = " INSTANCE = "; - protected final String TEXT_28 = ".init();" + NL; - protected final String TEXT_29 = 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_30 = " eINSTANCE = "; - protected final String TEXT_31 = ".init();" + NL; - protected final String TEXT_32 = NL + "/**" + NL + " * The package namespace URI." + NL + " * " + NL + " * " + NL + " * @generated" + NL + " */"; - protected final String TEXT_33 = NL; - protected final String TEXT_34 = " NAMESPACE_URI = \""; - protected final String TEXT_35 = "\";"; - protected final String TEXT_36 = NL + NL + "/**" + NL + " * The package namespace name." + NL + " * " + NL + " * " + NL + " * @generated" + NL + " */"; - protected final String TEXT_37 = NL; - protected final String TEXT_38 = " NAMESPACE_PREFIX = \""; - protected final String TEXT_39 = "\";"; - protected final String TEXT_40 = NL + NL; - protected final String TEXT_41 = NL; - protected final String TEXT_42 = "int "; - protected final String TEXT_43 = " = "; - protected final String TEXT_44 = ";"; - protected final String TEXT_45 = NL + "\t" + NL + "\t" + NL + "\t/**" + NL + "\t * Creates the default factory implementation." + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */"; - protected final String TEXT_46 = NL + 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_47 = "()" + NL + "\t{" + NL + "\t\tsuper(NAMESPACE_URI, NAMESPACE_PREFIX);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_48 = " create(int typeNumber)" + NL + "\t{" + NL + "\t\tswitch (typeNumber)" + NL + "\t\t{"; - protected final String TEXT_49 = NL + "\t\t\t// TODO make sure we're supposed to ingore DOCUMENT_ROOT" + NL + "\t\t\tcase "; - protected final String TEXT_50 = ": return ("; - protected final String TEXT_51 = ")create"; - protected final String TEXT_52 = "();"; - protected final String TEXT_53 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn super.create(typeNumber);" + NL + "\t\t}" + NL + "\t}" + NL + NL; - protected final String TEXT_54 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object createFromString("; - protected final String TEXT_55 = " eDataType, String initialValue)" + NL + "\t{" + NL + "\t\tswitch (eDataType.getClassifierID())" + NL + "\t\t{"; - protected final String TEXT_56 = NL + "\t\t\tcase "; - protected final String TEXT_57 = "."; - protected final String TEXT_58 = ":" + NL + "\t\t\t\treturn create"; - protected final String TEXT_59 = "FromString(eDataType, initialValue);"; - protected final String TEXT_60 = NL + "\t\t\tdefault:" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");"; - protected final String TEXT_61 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convertToString("; - protected final String TEXT_62 = " eDataType, Object instanceValue)" + NL + "\t{" + NL + "\t\tswitch (eDataType.getClassifierID())" + NL + "\t\t{"; - protected final String TEXT_63 = NL + "\t\t\tcase "; - protected final String TEXT_64 = "."; - protected final String TEXT_65 = ":" + NL + "\t\t\t\treturn convert"; - protected final String TEXT_66 = "ToString(eDataType, instanceValue);"; - protected final String TEXT_67 = NL + "\t\t\tdefault:" + NL + "\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");"; - protected final String TEXT_68 = NL + "\t\t}" + NL + "\t}" + NL; - protected final String TEXT_69 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_70 = " create"; - protected final String TEXT_71 = "()" + NL + "\t{"; - protected final String TEXT_72 = NL + "\t\t"; - protected final String TEXT_73 = " "; - protected final String TEXT_74 = " = "; - protected final String TEXT_75 = "super.create("; - protected final String TEXT_76 = ");"; - protected final String TEXT_77 = NL + "\t\t"; - protected final String TEXT_78 = " "; - protected final String TEXT_79 = " = new "; - protected final String TEXT_80 = "()"; - protected final String TEXT_81 = "{}"; - protected final String TEXT_82 = ";"; - protected final String TEXT_83 = NL + "\t\treturn "; - protected final String TEXT_84 = ";" + NL + "\t}" + NL + "\t" + NL + "\t// Following creates and initializes SDO metadata for the supported types." + NL + "\tprotected "; - protected final String TEXT_85 = " "; - protected final String TEXT_86 = "Type = null;" + NL + "\t" + NL + "\tpublic "; - protected final String TEXT_87 = " get"; - protected final String TEXT_88 = "()" + NL + "\t{" + NL + "\t\t// TODO - kdk - verify how to generate quoteType..."; - protected final String TEXT_89 = "Type?" + NL + "\t\treturn "; - protected final String TEXT_90 = "Type;" + NL + " }"; - protected final String TEXT_91 = NL + NL + "\tprivate static boolean isInited = false;" + NL + "\t" + NL + "\tpublic static "; - protected final String TEXT_92 = " init()" + NL + "\t{" + NL + " \tif (isInited) return ("; - protected final String TEXT_93 = ")FactoryBase.getStaticFactory("; - protected final String TEXT_94 = ".NAMESPACE_URI);" + NL + " \t"; - protected final String TEXT_95 = " the"; - protected final String TEXT_96 = " = new "; - protected final String TEXT_97 = "();" + NL + " \tisInited = true;" + NL + "" + NL + " \t// Initialize simple dependencies" + NL + " \t"; - protected final String TEXT_98 = ".registerStaticTypes("; - protected final String TEXT_99 = ".class);" + NL + " \t"; - protected final String TEXT_100 = ".registerStaticTypes("; - protected final String TEXT_101 = ".class);" + NL + " \t" + NL + " \t// Create package meta-data objects" + NL + " \tthe"; - protected final String TEXT_102 = ".createMetaData();" + NL + "" + NL + " \t// Initialize created meta-data" + NL + " \tthe"; - protected final String TEXT_103 = ".initializeMetaData();" + NL + "" + NL + " \t// Mark meta-data to indicate it can't be changed" + NL + " \t//the"; - protected final String TEXT_104 = ".freeze(); //FB do we need to freeze / should we freeze ????" + NL + "" + NL + " \treturn the"; - protected final String TEXT_105 = ";" + 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_106 = NL + " "; - protected final String TEXT_107 = NL + " "; - protected final String TEXT_108 = "Type = createType(false, "; - protected final String TEXT_109 = ");"; - protected final String TEXT_110 = NL + "\t\tcreateProperty("; - protected final String TEXT_111 = ", "; - protected final String TEXT_112 = "Type, "; - protected final String TEXT_113 = "."; - protected final String TEXT_114 = ");"; - protected final String TEXT_115 = NL + "\t}" + NL + "\tprivate boolean isInitialized = false;" + NL + "" + NL + "\tpublic void initializeMetaData()" + NL + "\t{" + NL + "\t\tif (isInitialized) return;" + NL + "\t\tisInitialized = true;" + NL + "" + NL + "\t\t// Obtain other dependent packages" + NL + "\t\t"; - protected final String TEXT_116 = " theModelPackageImpl = ("; - protected final String TEXT_117 = ")FactoryBase.getStaticFactory("; - protected final String TEXT_118 = ".NAMESPACE_URI);" + NL + "" + NL + "\t\t// Add supertypes to classes" + NL + "\t\t// Initialize classes and features; add operations and parameters"; - protected final String TEXT_119 = NL + "\t\t" + NL + "\t\tinitializeType("; - protected final String TEXT_120 = "Type, "; - protected final String TEXT_121 = ".class, \""; - protected final String TEXT_122 = "\");"; - protected final String TEXT_123 = NL + "\t\tinitializeProperty(("; - protected final String TEXT_124 = ")"; - protected final String TEXT_125 = "Type.getProperties().get("; - protected final String TEXT_126 = "."; - protected final String TEXT_127 = "), "; - protected final String TEXT_128 = ", \""; - protected final String TEXT_129 = "\", "; - protected final String TEXT_130 = ", "; - protected final String TEXT_131 = ", "; - protected final String TEXT_132 = ", "; - protected final String TEXT_133 = ", "; - protected final String TEXT_134 = ", "; - protected final String TEXT_135 = ", "; - protected final String TEXT_136 = ", "; - protected final String TEXT_137 = " , "; - protected final String TEXT_138 = ");"; - protected final String TEXT_139 = NL + "\t\tinitializeProperty(("; - protected final String TEXT_140 = ")"; - protected final String TEXT_141 = "Type.getProperties().get("; - protected final String TEXT_142 = "."; - protected final String TEXT_143 = "), "; - protected final String TEXT_144 = ", \""; - 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 = "createXSDMetaData();" + NL + "\t}" + NL + " " + NL + "\tprotected void createXSDMetaData()" + NL + "\t{" + NL + "\t\tsuper.createXSDMetaData();"; - protected final String TEXT_154 = NL + "\t\t// TODO - kdk - is the order right? should kind, elementOnly be first" + NL + "\t\taddXSDMapping" + NL + "\t\t("; - protected final String TEXT_155 = "Type," + NL + "\t\tnew String[] " + NL + "\t\t{" + NL + "\t\t\"name\", \""; - protected final String TEXT_156 = "\"," + NL + "\t\t\"kind\", \"elementOnly\"" + NL + "\t\t});"; - protected final String TEXT_157 = NL + "\t\taddXSDMapping" + NL + "\t\t(("; - protected final String TEXT_158 = ")"; - protected final String TEXT_159 = "Type.getProperties().get("; - protected final String TEXT_160 = "."; - protected final String TEXT_161 = ")," + NL + "\t\tnew String[]" + NL + "\t\t{" + NL + "\t\t\"kind\", \"element\"," + NL + "\t\t\"name\", \""; - protected final String TEXT_162 = "\"" + NL + "\t\t});" + NL + "\t"; - protected final String TEXT_163 = NL; - protected final String TEXT_164 = NL + "\t\t// TODO - kdk - how do I filter out mixed, xMLNSPrefixMap, and xSISchemaLocation without hardcoding it" + NL + "\t\t// TODO - kdk - can I hardcode ##targetNamespace?" + NL + "\t"; - protected final String TEXT_165 = NL + "\t\tcreateGlobalProperty" + NL + "\t\t(\""; - protected final String TEXT_166 = "\", " + NL + "\t\t"; - protected final String TEXT_167 = ".get"; - protected final String TEXT_168 = "()," + NL + "\t\tnew String[] " + NL + "\t\t{" + NL + "\t\t\"kind\", \"element\"," + NL + "\t\t\"name\", \""; - protected final String TEXT_169 = "\"," + NL + "\t\t\"namespace\", \"##targetNamespace\"" + NL + "\t\t}); " + NL + "\t"; - protected final String TEXT_170 = NL + " }" + NL; - protected final String TEXT_171 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_172 = " create"; - protected final String TEXT_173 = "(String literal)" + NL + "\t{"; - protected final String TEXT_174 = NL + "\t\t"; - protected final String TEXT_175 = " result = "; - protected final String TEXT_176 = ".get(literal);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + literal + \"' is not a valid enumerator of '\" + "; - protected final String TEXT_177 = ".getName() + \"'\");"; - protected final String TEXT_178 = NL + "\t\treturn result;"; - protected final String TEXT_179 = NL + "\t\treturn new "; - protected final String TEXT_180 = "(create"; - protected final String TEXT_181 = "(literal));"; - protected final String TEXT_182 = NL + "\t\treturn create"; - protected final String TEXT_183 = "(literal);"; - protected final String TEXT_184 = NL + "\t\treturn new "; - protected final String TEXT_185 = "("; - protected final String TEXT_186 = ".create"; - protected final String TEXT_187 = "(literal));"; - protected final String TEXT_188 = NL + "\t\treturn "; - protected final String TEXT_189 = ".create"; - protected final String TEXT_190 = "(literal);"; - protected final String TEXT_191 = NL + "\t\treturn ("; - protected final String TEXT_192 = ")"; - protected final String TEXT_193 = ".createFromString("; - protected final String TEXT_194 = ", literal);"; - protected final String TEXT_195 = NL + "\t\tif (literal == null) return null;" + NL + "\t\t"; - protected final String TEXT_196 = " result = new "; - protected final String TEXT_197 = "();" + NL + "\t\tfor ("; - protected final String TEXT_198 = " stringTokenizer = new "; - protected final String TEXT_199 = "(literal); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();"; - protected final String TEXT_200 = NL + "\t\t\tresult.add(create"; - protected final String TEXT_201 = "(item));"; - protected final String TEXT_202 = NL + "\t\t\tresult.add(create"; - protected final String TEXT_203 = "FromString("; - protected final String TEXT_204 = ", item));"; - protected final String TEXT_205 = NL + "\t\t\tresult.add("; - protected final String TEXT_206 = ".create"; - protected final String TEXT_207 = "(item));"; - protected final String TEXT_208 = NL + "\t\t\tresult.add("; - protected final String TEXT_209 = ".createFromString("; - protected final String TEXT_210 = ", item));"; - protected final String TEXT_211 = NL + "\t\t}" + NL + "\t\treturn result;"; - protected final String TEXT_212 = NL + "\t\tif (literal == null) return "; - protected final String TEXT_213 = ";" + NL + "\t\t"; - protected final String TEXT_214 = " result = "; - protected final String TEXT_215 = ";" + NL + "\t\tRuntimeException exception = null;"; - protected final String TEXT_216 = NL + "\t\ttry" + NL + "\t\t{"; - protected final String TEXT_217 = NL + "\t\t\tresult = create"; - protected final String TEXT_218 = "(literal);"; - protected final String TEXT_219 = NL + "\t\t\tresult = ("; - protected final String TEXT_220 = ")create"; - protected final String TEXT_221 = "FromString("; - protected final String TEXT_222 = ", literal);"; - protected final String TEXT_223 = NL + "\t\t\tresult = "; - protected final String TEXT_224 = ".create"; - protected final String TEXT_225 = "(literal);"; - protected final String TEXT_226 = NL + "\t\t\tresult = ("; - protected final String TEXT_227 = ")"; - protected final String TEXT_228 = ".createFromString("; - protected final String TEXT_229 = ", literal);"; - protected final String TEXT_230 = NL + "\t\t\tif ("; - protected final String TEXT_231 = "result != null && "; - protected final String TEXT_232 = ".INSTANCE.validate("; - protected final String TEXT_233 = ", "; - protected final String TEXT_234 = "new "; - protected final String TEXT_235 = "(result)"; - protected final String TEXT_236 = "result"; - protected final String TEXT_237 = ", 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_238 = NL + "\t\tif ("; - protected final String TEXT_239 = "result != null || "; - protected final String TEXT_240 = "exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;"; - protected final String TEXT_241 = 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_242 = "();"; - protected final String TEXT_243 = NL + "\t\treturn (("; - protected final String TEXT_244 = ")super.createFromString("; - protected final String TEXT_245 = ", literal))."; - protected final String TEXT_246 = "();"; - protected final String TEXT_247 = NL + "\t\treturn ("; - protected final String TEXT_248 = ")super.createFromString("; - protected final String TEXT_249 = ", literal);"; - protected final String TEXT_250 = NL + "\t}" + NL; - protected final String TEXT_251 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; - protected final String TEXT_252 = " create"; - protected final String TEXT_253 = "FromString("; - protected final String TEXT_254 = " eDataType, String initialValue)" + NL + "\t{"; - protected final String TEXT_255 = NL + "\t\treturn create"; - protected final String TEXT_256 = "(initialValue);"; - protected final String TEXT_257 = NL + "\t\t"; - protected final String TEXT_258 = " result = "; - protected final String TEXT_259 = ".get(initialValue);" + NL + "\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + eDataType.getName() + \"'\");"; - protected final String TEXT_260 = NL + "\t\treturn result;"; - protected final String TEXT_261 = NL + "\t\treturn ("; - protected final String TEXT_262 = ")create"; - protected final String TEXT_263 = "FromString("; - protected final String TEXT_264 = ", initialValue);"; - protected final String TEXT_265 = NL + "\t\treturn ("; - protected final String TEXT_266 = ")"; - protected final String TEXT_267 = ".createFromString("; - protected final String TEXT_268 = ", initialValue);"; - protected final String TEXT_269 = NL + "\t\treturn create"; - protected final String TEXT_270 = "(initialValue);"; - protected final String TEXT_271 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t"; - protected final String TEXT_272 = " result = new "; - protected final String TEXT_273 = "();" + NL + "\t\tfor ("; - protected final String TEXT_274 = " stringTokenizer = new "; - protected final String TEXT_275 = "(initialValue); stringTokenizer.hasMoreTokens(); )" + NL + "\t\t{" + NL + "\t\t\tString item = stringTokenizer.nextToken();"; - protected final String TEXT_276 = NL + "\t\t\tresult.add(create"; - protected final String TEXT_277 = "FromString("; - protected final String TEXT_278 = ", item));"; - protected final String TEXT_279 = NL + "\t\t\tresult.add("; - protected final String TEXT_280 = ".createFromString("; - protected final String TEXT_281 = ", item));"; - protected final String TEXT_282 = NL + "\t\t}" + NL + "\t\treturn result;"; - protected final String TEXT_283 = NL + "\t\treturn new "; - protected final String TEXT_284 = "(create"; - protected final String TEXT_285 = "(initialValue));"; - protected final String TEXT_286 = NL + "\t\treturn create"; - protected final String TEXT_287 = "(initialValue);"; - protected final String TEXT_288 = NL + "\t\tif (initialValue == null) return null;" + NL + "\t\t"; - protected final String TEXT_289 = " result = null;" + NL + "\t\tRuntimeException exception = null;"; - protected final String TEXT_290 = NL + "\t\ttry" + NL + "\t\t{"; - protected final String TEXT_291 = NL + "\t\t\tresult = ("; - protected final String TEXT_292 = ")create"; - protected final String TEXT_293 = "FromString("; - protected final String TEXT_294 = ", initialValue);"; - protected final String TEXT_295 = NL + "\t\t\tresult = ("; - protected final String TEXT_296 = ")"; - protected final String TEXT_297 = ".createFromString("; - protected final String TEXT_298 = ", initialValue);"; - protected final String TEXT_299 = NL + "\t\t\tif (result != null && "; - protected final String TEXT_300 = ".INSTANCE.validate(eDataType, 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_301 = NL + "\t\tif (result != null || exception == null) return result;" + NL + " " + NL + "\t\tthrow exception;"; - protected final String TEXT_302 = 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_303 = "();"; - protected final String TEXT_304 = NL + "\t\treturn ("; - protected final String TEXT_305 = ")super.createFromString(eDataType, initialValue);"; - protected final String TEXT_306 = NL + "\t}" + NL; - protected final String TEXT_307 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert"; - protected final String TEXT_308 = "("; - protected final String TEXT_309 = " instanceValue)" + NL + "\t{"; - protected final String TEXT_310 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();"; - protected final String TEXT_311 = NL + "\t\treturn instanceValue == null ? null : convert"; - protected final String TEXT_312 = "(instanceValue."; - protected final String TEXT_313 = "());"; - protected final String TEXT_314 = NL + "\t\treturn convert"; - protected final String TEXT_315 = "(instanceValue);"; - protected final String TEXT_316 = NL + "\t\treturn "; - protected final String TEXT_317 = ".convert"; - protected final String TEXT_318 = "(instanceValue);"; - protected final String TEXT_319 = NL + "\t\treturn "; - protected final String TEXT_320 = ".convertToString("; - protected final String TEXT_321 = ", instanceValue);"; - protected final String TEXT_322 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\tif (instanceValue.isEmpty()) return \"\";" + NL + "\t\t"; - protected final String TEXT_323 = " result = new "; - protected final String TEXT_324 = "();" + NL + "\t\tfor ("; - protected final String TEXT_325 = " i = instanceValue.iterator(); i.hasNext(); )" + NL + "\t\t{"; - protected final String TEXT_326 = NL + "\t\t\tresult.append(convert"; - protected final String TEXT_327 = "(("; - protected final String TEXT_328 = ")i.next()));"; - protected final String TEXT_329 = NL + "\t\t\tresult.append(convert"; - protected final String TEXT_330 = "ToString("; - protected final String TEXT_331 = ", i.next()));"; - protected final String TEXT_332 = NL + "\t\t\tresult.append("; - protected final String TEXT_333 = ".convert"; - protected final String TEXT_334 = "(("; - protected final String TEXT_335 = ")i.next()));"; - protected final String TEXT_336 = NL + "\t\t\tresult.append("; - protected final String TEXT_337 = ".convertToString("; - protected final String TEXT_338 = ", i.next()));"; - protected final String TEXT_339 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);"; - protected final String TEXT_340 = NL + "\t\tif (instanceValue == null) return null;"; - protected final String TEXT_341 = NL + "\t\tif ("; - protected final String TEXT_342 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{"; - protected final String TEXT_343 = NL + "\t\t\t\tString value = convert"; - protected final String TEXT_344 = "(instanceValue);"; - protected final String TEXT_345 = NL + "\t\t\t\tString value = convert"; - protected final String TEXT_346 = "ToString("; - protected final String TEXT_347 = ", instanceValue);"; - protected final String TEXT_348 = NL + "\t\t\t\tString value = "; - protected final String TEXT_349 = ".convert"; - protected final String TEXT_350 = "(("; - protected final String TEXT_351 = ")instanceValue);"; - protected final String TEXT_352 = NL + "\t\t\t\tString value = "; - protected final String TEXT_353 = ".convertToString("; - protected final String TEXT_354 = ", instanceValue);"; - protected final String TEXT_355 = 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_356 = NL + "\t\ttry" + NL + "\t\t{"; - protected final String TEXT_357 = NL + "\t\t\tString value = convert"; - protected final String TEXT_358 = "(instanceValue);"; - protected final String TEXT_359 = NL + "\t\t\tString value = convert"; - protected final String TEXT_360 = "ToString("; - protected final String TEXT_361 = ", new "; - protected final String TEXT_362 = "(instanceValue));"; - protected final String TEXT_363 = NL + "\t\t\tString value = "; - protected final String TEXT_364 = ".convert"; - protected final String TEXT_365 = "(instanceValue);"; - protected final String TEXT_366 = NL + "\t\t\tString value = "; - protected final String TEXT_367 = ".convertToString("; - protected final String TEXT_368 = ", new "; - protected final String TEXT_369 = "(instanceValue));"; - protected final String TEXT_370 = NL + "\t\t\tif (value != null) return value;" + NL + "\t\t}" + NL + "\t\tcatch (Exception e)" + NL + "\t\t{" + NL + "\t\t}"; - protected final String TEXT_371 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+"; - protected final String TEXT_372 = ".getName());"; - protected final String TEXT_373 = 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_374 = "();"; - protected final String TEXT_375 = NL + "\t\treturn super.convertToString("; - protected final String TEXT_376 = ", new "; - protected final String TEXT_377 = "(instanceValue));"; - protected final String TEXT_378 = NL + "\t\treturn super.convertToString("; - protected final String TEXT_379 = ", instanceValue);"; - protected final String TEXT_380 = NL + "\t}" + NL; - protected final String TEXT_381 = NL + "\t/**" + NL + "\t * " + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String convert"; - protected final String TEXT_382 = "ToString("; - protected final String TEXT_383 = " eDataType, Object instanceValue)" + NL + "\t{"; - protected final String TEXT_384 = NL + "\t\treturn instanceValue == null ? null : instanceValue.toString();"; - protected final String TEXT_385 = NL + "\t\treturn convert"; - protected final String TEXT_386 = "ToString("; - protected final String TEXT_387 = ", instanceValue);"; - protected final String TEXT_388 = NL + "\t\treturn "; - protected final String TEXT_389 = ".convertToString("; - protected final String TEXT_390 = ", instanceValue);"; - protected final String TEXT_391 = NL + "\t\treturn convert"; - protected final String TEXT_392 = "(("; - protected final String TEXT_393 = ")instanceValue);"; - protected final String TEXT_394 = NL + "\t\tif (instanceValue == null) return null;" + NL + "\t\t"; - protected final String TEXT_395 = " list = ("; - protected final String TEXT_396 = ")instanceValue;" + NL + "\t\tif (list.isEmpty()) return \"\";" + NL + "\t\t"; - protected final String TEXT_397 = " result = new "; - protected final String TEXT_398 = "();" + NL + "\t\tfor ("; - protected final String TEXT_399 = " i = list.iterator(); i.hasNext(); )" + NL + "\t\t{"; - protected final String TEXT_400 = NL + "\t\t\tresult.append(convert"; - protected final String TEXT_401 = "ToString("; - protected final String TEXT_402 = ", i.next()));"; - protected final String TEXT_403 = NL + "\t\t\tresult.append("; - protected final String TEXT_404 = ".convertToString("; - protected final String TEXT_405 = ", i.next()));"; - protected final String TEXT_406 = NL + "\t\t\tresult.append(' ');" + NL + "\t\t}" + NL + "\t\treturn result.substring(0, result.length() - 1);"; - protected final String TEXT_407 = NL + "\t\treturn instanceValue == null ? null : convert"; - protected final String TEXT_408 = "((("; - protected final String TEXT_409 = ")instanceValue)."; - protected final String TEXT_410 = "());"; - protected final String TEXT_411 = NL + "\t\treturn convert"; - protected final String TEXT_412 = "(instanceValue);"; - protected final String TEXT_413 = NL + "\t\tif (instanceValue == null) return null;"; - protected final String TEXT_414 = NL + "\t\tif ("; - protected final String TEXT_415 = ".isInstance(instanceValue))" + NL + "\t\t{" + NL + "\t\t\ttry" + NL + "\t\t\t{"; - protected final String TEXT_416 = NL + "\t\t\t\tString value = convert"; - protected final String TEXT_417 = "ToString("; - protected final String TEXT_418 = ", instanceValue);"; - protected final String TEXT_419 = NL + "\t\t\t\tString value = "; - protected final String TEXT_420 = ".convertToString("; - protected final String TEXT_421 = ", instanceValue);"; - protected final String TEXT_422 = 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_423 = NL + "\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+eDataType.getName());"; - protected final String TEXT_424 = 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_425 = "();"; - protected final String TEXT_426 = NL + "\t\treturn super.convertToString(eDataType, instanceValue);"; - protected final String TEXT_427 = NL + "\t}" + NL; - protected final String TEXT_428 = NL + "\t/**" + NL + "\t * Returns a new object of class '"; - protected final String TEXT_429 = "'." + NL + "\t * " + NL + "\t * " + NL + "\t * @return a new object of class '"; - protected final String TEXT_430 = "'." + NL + "\t * @generated" + NL + "\t */" + NL + "\t"; - protected final String TEXT_431 = " create"; - protected final String TEXT_432 = "();" + NL; - protected final String TEXT_433 = NL + "\t/**" + NL + "\t * Returns an instance of data type '"; - protected final String TEXT_434 = "' 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_435 = " create"; - protected final String TEXT_436 = "(String literal);" + NL + "" + NL + "\t/**" + NL + "\t * Returns a literal representation of an instance of data type '"; - protected final String TEXT_437 = "'." + 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_438 = "("; - protected final String TEXT_439 = " instanceValue);" + NL; - protected final String TEXT_440 = NL + "} //"; - protected final String TEXT_441 = NL; - - public String generate(Object argument) - { - final StringBuffer stringBuffer = new StringBuffer(); - -/** - * - * - * Copyright (c) 2002-2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - * - * - */ - - 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 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 (isImplementation) { - if (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*"); - } - genModel.markImportLocation(stringBuffer); - stringBuffer.append(TEXT_10); - if (isInterface) { - stringBuffer.append(TEXT_11); - if (!genModel.isSuppressEMFMetaData()) { - stringBuffer.append(TEXT_12); - stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); - } - stringBuffer.append(TEXT_13); - } else { - stringBuffer.append(TEXT_14); - } - if (isImplementation) { - stringBuffer.append(TEXT_15); - stringBuffer.append(genPackage.getFactoryClassName()); - stringBuffer.append(TEXT_16); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.impl.FactoryBase")); - if (!genModel.isSuppressInterfaces()) { - stringBuffer.append(TEXT_17); - stringBuffer.append(genPackage.getImportedFactoryInterfaceName()); - } - } else { - stringBuffer.append(TEXT_18); - stringBuffer.append(genPackage.getFactoryInterfaceName()); - if (!genModel.isSuppressEMFMetaData()) { - stringBuffer.append(TEXT_19); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EFactory")); - } - } - stringBuffer.append(TEXT_20); - if (genModel.getCopyrightText() != null) { - stringBuffer.append(TEXT_21); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genModel.getImportedName("java.lang.String")); - stringBuffer.append(TEXT_22); - stringBuffer.append(genModel.getCopyrightText()); - stringBuffer.append(TEXT_23); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_24); - } - stringBuffer.append(TEXT_25); - if (isInterface && genModel.isSuppressEMFMetaData()) { - stringBuffer.append(TEXT_26); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genPackage.getFactoryInterfaceName()); - stringBuffer.append(TEXT_27); - stringBuffer.append(genPackage.getQualifiedFactoryClassName()); - stringBuffer.append(TEXT_28); - } else if (isInterface && !genModel.isSuppressInterfaces()) { - stringBuffer.append(TEXT_29); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genPackage.getFactoryInterfaceName()); - stringBuffer.append(TEXT_30); - stringBuffer.append(genPackage.getQualifiedFactoryClassName()); - stringBuffer.append(TEXT_31); - } - if (isImplementation) { - stringBuffer.append(TEXT_32); - stringBuffer.append(TEXT_33); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genModel.getImportedName("java.lang.String")); - stringBuffer.append(TEXT_34); - stringBuffer.append(genPackage.getNSURI()); - stringBuffer.append(TEXT_35); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_36); - stringBuffer.append(TEXT_37); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(genModel.getImportedName("java.lang.String")); - stringBuffer.append(TEXT_38); - stringBuffer.append(genPackage.getNSName()); - stringBuffer.append(TEXT_39); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(TEXT_40); - for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next(); - if (!genClassifier.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_41); - stringBuffer.append(publicStaticFinalFlag); - stringBuffer.append(TEXT_42); - stringBuffer.append(genPackage.getClassifierID(genClassifier)); - stringBuffer.append(TEXT_43); - stringBuffer.append(genPackage.getClassifierValue(genClassifier)); - stringBuffer.append(TEXT_44); - } } - stringBuffer.append(TEXT_45); - String factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName(); - stringBuffer.append(TEXT_46); - stringBuffer.append(genPackage.getFactoryClassName()); - stringBuffer.append(TEXT_47); - stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject")); - stringBuffer.append(TEXT_48); - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_49); - stringBuffer.append(genClass.getClassifierID()); - stringBuffer.append(TEXT_50); - stringBuffer.append(genModel.getImportedName("commonj.sdo.DataObject")); - stringBuffer.append(TEXT_51); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_52); - } - } - stringBuffer.append(TEXT_53); - if (!genPackage.getAllGenDataTypes().isEmpty()) { - stringBuffer.append(TEXT_54); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EDataType")); - stringBuffer.append(TEXT_55); - for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next(); - if (genDataType.isSerializable()) { - stringBuffer.append(TEXT_56); - stringBuffer.append(genPackage.getImportedPackageInterfaceName()); - stringBuffer.append(TEXT_57); - stringBuffer.append(genDataType.getClassifierID()); - stringBuffer.append(TEXT_58); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_59); - } - } - stringBuffer.append(TEXT_60); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(genModel.getNonNLS(2)); - stringBuffer.append(TEXT_61); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EDataType")); - stringBuffer.append(TEXT_62); - for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next(); - if (genDataType.isSerializable()) { - stringBuffer.append(TEXT_63); - stringBuffer.append(genPackage.getImportedPackageInterfaceName()); - stringBuffer.append(TEXT_64); - stringBuffer.append(genDataType.getClassifierID()); - stringBuffer.append(TEXT_65); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_66); - } - } - stringBuffer.append(TEXT_67); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(genModel.getNonNLS(2)); - stringBuffer.append(TEXT_68); - } - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_69); - stringBuffer.append(genClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_70); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_71); - if (genClass.isDynamic()) { - stringBuffer.append(TEXT_72); - stringBuffer.append(genClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_73); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_74); - stringBuffer.append(genClass.getCastFromEObject()); - stringBuffer.append(TEXT_75); - stringBuffer.append(genClass.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_76); - } else { - stringBuffer.append(TEXT_77); - stringBuffer.append(genClass.getImportedClassName()); - stringBuffer.append(TEXT_78); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_79); - stringBuffer.append(genClass.getImportedClassName()); - stringBuffer.append(TEXT_80); - if (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) { - stringBuffer.append(TEXT_81); - } - stringBuffer.append(TEXT_82); - } - stringBuffer.append(TEXT_83); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_84); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Type")); - stringBuffer.append(TEXT_85); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_86); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Type")); - stringBuffer.append(TEXT_87); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_88); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_89); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_90); - } - } - stringBuffer.append(TEXT_91); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_92); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_93); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_94); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_95); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_96); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_97); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.util.SDOUtil")); - stringBuffer.append(TEXT_98); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.impl.SDOFactoryImpl")); - stringBuffer.append(TEXT_99); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.util.SDOUtil")); - stringBuffer.append(TEXT_100); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelPackageImpl")); - stringBuffer.append(TEXT_101); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_102); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_103); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_104); - stringBuffer.append(factoryType); - stringBuffer.append(TEXT_105); - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - stringBuffer.append(TEXT_106); - if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_107); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_108); - stringBuffer.append(genPackage.getClassifierID(genClass)); - stringBuffer.append(TEXT_109); - for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next(); - stringBuffer.append(TEXT_110); - stringBuffer.append(!genFeature.isReferenceType()); - stringBuffer.append(TEXT_111); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_112); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(TEXT_113); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_114); - } - } - } - stringBuffer.append(TEXT_115); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")); - stringBuffer.append(TEXT_116); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")); - stringBuffer.append(TEXT_117); - stringBuffer.append(genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")); - stringBuffer.append(TEXT_118); - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_119); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_120); - stringBuffer.append(genClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_121); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_122); - for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next(); - String type = genFeature.getImportedType().equals("Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()"; - if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse(); - String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()"; - stringBuffer.append(TEXT_123); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Property")); - stringBuffer.append(TEXT_124); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_125); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(TEXT_126); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_127); - stringBuffer.append(type); - stringBuffer.append(TEXT_128); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_129); - stringBuffer.append(genFeature.getDefaultValue()); - stringBuffer.append(TEXT_130); - stringBuffer.append(genFeature.getLowerBound()); - stringBuffer.append(TEXT_131); - stringBuffer.append(genFeature.getUpperBound()); - stringBuffer.append(TEXT_132); - stringBuffer.append(genFeature.getContainerClass()); - stringBuffer.append(TEXT_133); - stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"); - stringBuffer.append(TEXT_134); - stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"); - stringBuffer.append(TEXT_135); - stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"); - stringBuffer.append(TEXT_136); - stringBuffer.append(genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false"); - stringBuffer.append(TEXT_137); - stringBuffer.append(reverse); - stringBuffer.append(TEXT_138); - }else{ - stringBuffer.append(TEXT_139); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Property")); - stringBuffer.append(TEXT_140); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_141); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(TEXT_142); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_143); - stringBuffer.append(type); - stringBuffer.append(TEXT_144); - stringBuffer.append(genFeature.getSafeName()); - stringBuffer.append(TEXT_145); - stringBuffer.append(genFeature.getDefaultValue()); - stringBuffer.append(TEXT_146); - stringBuffer.append(genFeature.getLowerBound()); - stringBuffer.append(TEXT_147); - stringBuffer.append(genFeature.getUpperBound()); - stringBuffer.append(TEXT_148); - stringBuffer.append(genFeature.getContainerClass()); - stringBuffer.append(TEXT_149); - stringBuffer.append(genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"); - stringBuffer.append(TEXT_150); - stringBuffer.append(genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"); - stringBuffer.append(TEXT_151); - stringBuffer.append(genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"); - stringBuffer.append(TEXT_152); - } - } - } - } - stringBuffer.append(TEXT_153); - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_154); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_155); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_156); - for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next(); - stringBuffer.append(TEXT_157); - stringBuffer.append(genModel.getImportedName("commonj.sdo.Property")); - stringBuffer.append(TEXT_158); - stringBuffer.append(genClass.getSafeUncapName()); - stringBuffer.append(TEXT_159); - stringBuffer.append(genClass.getClassName()); - stringBuffer.append(TEXT_160); - stringBuffer.append(genFeature.getUpperName()); - stringBuffer.append(TEXT_161); - stringBuffer.append(genFeature.getName()); - stringBuffer.append(TEXT_162); - } - } - } - stringBuffer.append(TEXT_163); - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (!genClass.isAbstract() && genClass.getClassifierID().equals("DOCUMENT_ROOT")) { - stringBuffer.append(TEXT_164); - for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next(); - if (!genFeature.getName().equals("mixed") && !genFeature.getName().equals("xMLNSPrefixMap") && !genFeature.getName().equals("xSISchemaLocation")){ - stringBuffer.append(TEXT_165); - stringBuffer.append(genFeature.getName()); - stringBuffer.append(TEXT_166); - stringBuffer.append(genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage())); - stringBuffer.append(TEXT_167); - stringBuffer.append(genFeature.getTypeClassifierAccessorName()); - stringBuffer.append(TEXT_168); - stringBuffer.append(genFeature.getName()); - stringBuffer.append(TEXT_169); - } - } - } - } - stringBuffer.append(TEXT_170); - for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next(); - if (genDataType.isSerializable()) { - if (genPackage.isDataTypeConverters()) { String eDataType = genDataType.getQualifiedClassifierAccessor(); - stringBuffer.append(TEXT_171); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_172); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_173); - if (genDataType instanceof GenEnum) { - stringBuffer.append(TEXT_174); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_175); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_176); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_177); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(genModel.getNonNLS(2)); - stringBuffer.append(genModel.getNonNLS(3)); - stringBuffer.append(TEXT_178); - } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType(); - if (genBaseType.getGenPackage() == genPackage) { - if (isPrimitiveConversion) { - stringBuffer.append(TEXT_179); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_180); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_181); - } else { - stringBuffer.append(TEXT_182); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_183); - } - } else if (genBaseType.getGenPackage().isDataTypeConverters()) { - if (isPrimitiveConversion) { - stringBuffer.append(TEXT_184); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_185); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_186); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_187); - } else { - stringBuffer.append(TEXT_188); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_189); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_190); - } - } else { - stringBuffer.append(TEXT_191); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_192); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_193); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_194); - } - } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); - stringBuffer.append(TEXT_195); - stringBuffer.append(genModel.getImportedName("java.util.List")); - stringBuffer.append(TEXT_196); - stringBuffer.append(genModel.getImportedName("java.util.ArrayList")); - stringBuffer.append(TEXT_197); - stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer")); - stringBuffer.append(TEXT_198); - stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer")); - stringBuffer.append(TEXT_199); - if (genItemType.getGenPackage() == genPackage) { - if (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType(); - stringBuffer.append(TEXT_200); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_201); - } else { - stringBuffer.append(TEXT_202); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_203); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_204); - } - } else { - if (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType(); - stringBuffer.append(TEXT_205); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_206); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_207); - } else { - stringBuffer.append(TEXT_208); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_209); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_210); - } - } - stringBuffer.append(TEXT_211); - } else if (!genDataType.getMemberTypes().isEmpty()) { - stringBuffer.append(TEXT_212); - stringBuffer.append(genDataType.getStaticValue(null)); - stringBuffer.append(TEXT_213); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_214); - stringBuffer.append(genDataType.getStaticValue(null)); - stringBuffer.append(TEXT_215); - for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next(); - stringBuffer.append(TEXT_216); - if (genMemberType.getGenPackage() == genPackage) { - if (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType(); - stringBuffer.append(TEXT_217); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_218); - } else { - stringBuffer.append(TEXT_219); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_220); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_221); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_222); - } - } else { - if (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType(); - stringBuffer.append(TEXT_223); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_224); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_225); - } else { - stringBuffer.append(TEXT_226); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_227); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_228); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_229); - } - } - stringBuffer.append(TEXT_230); - if (!genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_231); - } - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.Diagnostician")); - stringBuffer.append(TEXT_232); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_233); - if (genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_234); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_235); - } else { - stringBuffer.append(TEXT_236); - } - stringBuffer.append(TEXT_237); - } - stringBuffer.append(TEXT_238); - if (!genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_239); - } - stringBuffer.append(TEXT_240); - } else if (genDataType.isArrayType()) { - stringBuffer.append(TEXT_241); - stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException")); - stringBuffer.append(TEXT_242); - } else if (genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_243); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_244); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_245); - stringBuffer.append(genDataType.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_246); - } else { - stringBuffer.append(TEXT_247); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_248); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_249); - } - stringBuffer.append(TEXT_250); - } - stringBuffer.append(TEXT_251); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_252); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_253); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EDataType")); - stringBuffer.append(TEXT_254); - if (genDataType instanceof GenEnum) { - if (genPackage.isDataTypeConverters()) { - stringBuffer.append(TEXT_255); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_256); - } else { - stringBuffer.append(TEXT_257); - stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName()); - stringBuffer.append(TEXT_258); - stringBuffer.append(((GenEnum)genDataType).getImportedInstanceClassName()); - stringBuffer.append(TEXT_259); - stringBuffer.append(genModel.getNonNLS()); - stringBuffer.append(genModel.getNonNLS(2)); - stringBuffer.append(genModel.getNonNLS(3)); - stringBuffer.append(TEXT_260); - } - } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); - if (genBaseType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_261); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_262); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_263); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_264); - } else { - stringBuffer.append(TEXT_265); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_266); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_267); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_268); - } - } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); - if (genPackage.isDataTypeConverters()) { - stringBuffer.append(TEXT_269); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_270); - } else { - stringBuffer.append(TEXT_271); - stringBuffer.append(genModel.getImportedName("java.util.List")); - stringBuffer.append(TEXT_272); - stringBuffer.append(genModel.getImportedName("java.util.ArrayList")); - stringBuffer.append(TEXT_273); - stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer")); - stringBuffer.append(TEXT_274); - stringBuffer.append(genModel.getImportedName("java.util.StringTokenizer")); - stringBuffer.append(TEXT_275); - if (genItemType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_276); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_277); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_278); - } else { - stringBuffer.append(TEXT_279); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_280); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_281); - } - stringBuffer.append(TEXT_282); - } - } else if (!genDataType.getMemberTypes().isEmpty()) { - if (genPackage.isDataTypeConverters()) { - if (genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_283); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_284); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_285); - } else { - stringBuffer.append(TEXT_286); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_287); - } - } else { - stringBuffer.append(TEXT_288); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_289); - for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next(); - stringBuffer.append(TEXT_290); - if (genMemberType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_291); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_292); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_293); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_294); - } else { - stringBuffer.append(TEXT_295); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_296); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_297); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_298); - } - stringBuffer.append(TEXT_299); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.Diagnostician")); - stringBuffer.append(TEXT_300); - } - stringBuffer.append(TEXT_301); - } - } else if (genDataType.isArrayType()) { - stringBuffer.append(TEXT_302); - stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException")); - stringBuffer.append(TEXT_303); - } else { - stringBuffer.append(TEXT_304); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_305); - } - stringBuffer.append(TEXT_306); - if (genPackage.isDataTypeConverters()) { String eDataType = genDataType.getQualifiedClassifierAccessor(); - stringBuffer.append(TEXT_307); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_308); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_309); - if (genDataType instanceof GenEnum) { - stringBuffer.append(TEXT_310); - } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType(); - if (genBaseType.getGenPackage() == genPackage) { - if (isPrimitiveConversion) { - stringBuffer.append(TEXT_311); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_312); - stringBuffer.append(genBaseType.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_313); - } else { - stringBuffer.append(TEXT_314); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_315); - } - } else if (genBaseType.getGenPackage().isDataTypeConverters()) { - stringBuffer.append(TEXT_316); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedFactoryInstanceAccessor()); - stringBuffer.append(TEXT_317); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_318); - } else { - stringBuffer.append(TEXT_319); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_320); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_321); - } - } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); - stringBuffer.append(TEXT_322); - stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer")); - stringBuffer.append(TEXT_323); - stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer")); - stringBuffer.append(TEXT_324); - stringBuffer.append(genModel.getImportedName("java.util.Iterator")); - stringBuffer.append(TEXT_325); - if (genItemType.getGenPackage() == genPackage) { - if (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType(); - stringBuffer.append(TEXT_326); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_327); - stringBuffer.append(genItemType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_328); - } else { - stringBuffer.append(TEXT_329); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_330); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_331); - } - } else { - if (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType(); - stringBuffer.append(TEXT_332); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_333); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_334); - stringBuffer.append(genItemType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_335); - } else { - stringBuffer.append(TEXT_336); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_337); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_338); - } - } - stringBuffer.append(TEXT_339); - } else if (!genDataType.getMemberTypes().isEmpty()) { - if (!genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_340); - for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next(); - stringBuffer.append(TEXT_341); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_342); - if (genMemberType.getGenPackage() == genPackage) { - if (genPackage.isDataTypeConverters()) { - stringBuffer.append(TEXT_343); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_344); - } else { - stringBuffer.append(TEXT_345); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_346); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_347); - } - } else { - if (genMemberType.getGenPackage().isDataTypeConverters()) { genMemberType = genMemberType.getObjectType(); - stringBuffer.append(TEXT_348); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_349); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_350); - stringBuffer.append(genMemberType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_351); - } else { - stringBuffer.append(TEXT_352); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_353); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_354); - } - } - stringBuffer.append(TEXT_355); - } - } else { - for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next(); - stringBuffer.append(TEXT_356); - if (genMemberType.getGenPackage() == genPackage) { - if (genPackage.isDataTypeConverters()) { - stringBuffer.append(TEXT_357); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_358); - } else { - stringBuffer.append(TEXT_359); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_360); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_361); - stringBuffer.append(genMemberType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_362); - } - } else { - if (genMemberType.getGenPackage().isDataTypeConverters()) { - stringBuffer.append(TEXT_363); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_364); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_365); - } else { - stringBuffer.append(TEXT_366); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_367); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_368); - stringBuffer.append(genMemberType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_369); - } - } - stringBuffer.append(TEXT_370); - } - } - stringBuffer.append(TEXT_371); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_372); - } else if (genDataType.isArrayType()) { - stringBuffer.append(TEXT_373); - stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException")); - stringBuffer.append(TEXT_374); - } else if (genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_375); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_376); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_377); - } else { - stringBuffer.append(TEXT_378); - stringBuffer.append(eDataType); - stringBuffer.append(TEXT_379); - } - stringBuffer.append(TEXT_380); - } - stringBuffer.append(TEXT_381); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_382); - stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EDataType")); - stringBuffer.append(TEXT_383); - if (genDataType instanceof GenEnum) { - stringBuffer.append(TEXT_384); - } else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); - if (genBaseType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_385); - stringBuffer.append(genBaseType.getName()); - stringBuffer.append(TEXT_386); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_387); - } else { - stringBuffer.append(TEXT_388); - stringBuffer.append(genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_389); - stringBuffer.append(genBaseType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_390); - } - } else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); - if (genPackage.isDataTypeConverters()) { - stringBuffer.append(TEXT_391); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_392); - stringBuffer.append(genModel.getImportedName("java.util.List")); - stringBuffer.append(TEXT_393); - } else { - stringBuffer.append(TEXT_394); - stringBuffer.append(genModel.getImportedName("java.util.List")); - stringBuffer.append(TEXT_395); - stringBuffer.append(genModel.getImportedName("java.util.List")); - stringBuffer.append(TEXT_396); - stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer")); - stringBuffer.append(TEXT_397); - stringBuffer.append(genModel.getImportedName("java.lang.StringBuffer")); - stringBuffer.append(TEXT_398); - stringBuffer.append(genModel.getImportedName("java.util.Iterator")); - stringBuffer.append(TEXT_399); - if (genItemType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_400); - stringBuffer.append(genItemType.getName()); - stringBuffer.append(TEXT_401); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_402); - } else { - stringBuffer.append(TEXT_403); - stringBuffer.append(genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_404); - stringBuffer.append(genItemType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_405); - } - stringBuffer.append(TEXT_406); - } - } else if (!genDataType.getMemberTypes().isEmpty()) { - if (genPackage.isDataTypeConverters()) { - if (genDataType.isPrimitiveType()) { - stringBuffer.append(TEXT_407); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_408); - stringBuffer.append(genDataType.getObjectInstanceClassName()); - stringBuffer.append(TEXT_409); - stringBuffer.append(genDataType.getPrimitiveValueFunction()); - stringBuffer.append(TEXT_410); - } else { - stringBuffer.append(TEXT_411); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_412); - } - } else { - stringBuffer.append(TEXT_413); - for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next(); - stringBuffer.append(TEXT_414); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_415); - if (genMemberType.getGenPackage() == genPackage) { - stringBuffer.append(TEXT_416); - stringBuffer.append(genMemberType.getName()); - stringBuffer.append(TEXT_417); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_418); - } else { - stringBuffer.append(TEXT_419); - stringBuffer.append(genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()); - stringBuffer.append(TEXT_420); - stringBuffer.append(genMemberType.getQualifiedClassifierAccessor()); - stringBuffer.append(TEXT_421); - } - stringBuffer.append(TEXT_422); - } - stringBuffer.append(TEXT_423); - } - } else if (genDataType.isArrayType()) { - stringBuffer.append(TEXT_424); - stringBuffer.append(genModel.getImportedName("java.lang.UnsupportedOperationException")); - stringBuffer.append(TEXT_425); - } else { - stringBuffer.append(TEXT_426); - } - stringBuffer.append(TEXT_427); - } - } - } else { - for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next(); - if (genClass.hasFactoryInterfaceCreateMethod()) { - stringBuffer.append(TEXT_428); - stringBuffer.append(genClass.getFormattedName()); - stringBuffer.append(TEXT_429); - stringBuffer.append(genClass.getFormattedName()); - stringBuffer.append(TEXT_430); - stringBuffer.append(genClass.getImportedInterfaceName()); - stringBuffer.append(TEXT_431); - stringBuffer.append(genClass.getName()); - stringBuffer.append(TEXT_432); - } - } - if (genPackage.isDataTypeConverters()) { - for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next(); - if (genDataType.isSerializable()) { - stringBuffer.append(TEXT_433); - stringBuffer.append(genDataType.getFormattedName()); - stringBuffer.append(TEXT_434); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_435); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_436); - stringBuffer.append(genDataType.getFormattedName()); - stringBuffer.append(TEXT_437); - stringBuffer.append(genDataType.getName()); - stringBuffer.append(TEXT_438); - stringBuffer.append(genDataType.getImportedInstanceClassName()); - stringBuffer.append(TEXT_439); - } - } - } - } - stringBuffer.append(TEXT_440); - stringBuffer.append(isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName()); - genModel.emitSortedImports(); - stringBuffer.append(TEXT_441); - return stringBuffer.toString(); - } -} diff --git a/branches/java-post-M1/sdo/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java b/branches/java-post-M1/sdo/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java deleted file mode 100644 index 99c9191a34..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/java/org/eclipse/jdt/core/formatter/CodeFormatter.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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. - */ -/******************************************************************************* - * 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/java-post-M1/sdo/tools/src/main/resources/META-INF/LICENSE.txt b/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 25d78feeac..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,1277 +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 SUBCOMPONENTS: - -The Apache Tuscany distribution includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -=============================================================================== - -For the Eclipse Modeling Framework component and the Celtix binding: - -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 Rhino JavaScript container component: - -Mozilla Public License 1.1 (MPL 1.1) - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the -Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to -the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original Code, -prior Modifications used by a Contributor, and the Modifications made by that -particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the -combination of the Original Code and Modifications, in each case including -portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally -accepted in the software development community for the electronic transfer of -data. - - 1.5. "Executable" means Covered Code in any form other than Source -Code. - - 1.6. "Initial Developer" means the individual or entity identified as -the Initial Developer in the Source Code notice required by Exhibit A. - - 1.7. "Larger Work" means a work which combines Covered Code or -portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum -extent possible, whether at the time of the initial grant or subsequently -acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the -substance or structure of either the Original Code or any previous -Modifications. When Covered Code is released as a series of files, a -Modification is: - A. Any addition to or deletion from the contents of a file -containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or -previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code -which is described in the Source Code notice required by Exhibit A as Original -Code, and which, at the time of its release under this License is not already -Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or -hereafter acquired, including without limitation, method, process, and -apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for -making modifications to it, including all modules it contains, plus any -associated interface definition files, scripts used to control compilation and -installation of an Executable, or source code differential comparisons against -either the Original Code or another well known, available Covered Code of the -Contributor's choice. The Source Code can be in a compressed or archival form, -provided the appropriate decompression or de-archiving software is widely -available for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity -exercising rights under, and complying with all of the terms of, this License -or a future version of this License issued under Section 6.1. For legal -entities, "You" includes any entity which controls, is controlled by, or is -under common control with You. For purposes of this definition, "control" -means (a) the power, direct or indirect, to cause the direction or management -of such entity, whether by contract or otherwise, or (b) ownership of more -than fifty percent (50%) of the outstanding shares or beneficial ownership of -such entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: - (a) under intellectual property rights (other than patent or -trademark) Licensable by Initial Developer to use, reproduce, modify, display, -perform, sublicense and distribute the Original Code (or portions thereof) -with or without Modifications, and/or as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or selling -of Original Code, to make, have made, use, practice, sell, and offer for sale, -and/or otherwise dispose of the Original Code (or portions thereof). - (c) the licenses granted in this Section 2.1(a) and -(b) are effective on the date Initial Developer first distributes Original -Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is -granted: 1) for code that You delete from the Original Code; 2) separate from -the Original Code; or 3) for infringements caused by: i) the modification of -the Original Code or ii) the combination of the Original Code with other -software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor -hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or -trademark) Licensable by Contributor, to use, reproduce, modify, display, -perform, sublicense and distribute the Modifications created by such -Contributor (or portions thereof) either on an unmodified basis, with other -Modifications, as Covered Code and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling -of Modifications made by that Contributor either alone and/or in combination -with its Contributor Version (or portions of such combination), to make, use, -sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications -made by that Contributor (or portions thereof); and 2) the combination of -Modifications made by that Contributor with its Contributor Version (or -portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are -effective on the date Contributor first makes Commercial Use of the Covered -Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is -granted: 1) for any code that Contributor has deleted from the Contributor -Version; 2) separate from the Contributor Version; 3) for infringements -caused by: i) third party modifications of Contributor Version or ii) the -combination of Modifications made by that Contributor with other software -(except as part of the Contributor Version) or other devices; or 4) under -Patent Claims infringed by Covered Code in the absence of Modifications made -by that Contributor. - - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are -governed by the terms of this License, including without limitation Section -2.2. The Source Code version of Covered Code may be distributed only under the -terms of this License or a future version of this License released under -Section 6.1, and You must include a copy of this License with every copy of -the Source Code You distribute. You may not offer or impose any terms on any -Source Code version that alters or restricts the applicable version of this -License or the recipients' rights hereunder. However, You may include an -additional document offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be -made available in Source Code form under the terms of this License either on -the same media as an Executable version or via an accepted Electronic -Distribution Mechanism to anyone to whom you made an Executable version -available; and if made available via Electronic Distribution Mechanism, must -remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a -file documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification is -derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's -intellectual property rights is required to exercise the rights granted by -such Contributor under Sections 2.1 or 2.2, Contributor must include a text -file with the Source Code distribution titled "LEGAL" which describes the -claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available -thereafter and shall take other steps (such as notifying appropriate mailing -lists or newsgroups) reasonably calculated to inform those who received the -Covered Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming -interface and Contributor has knowledge of patent licenses which are -reasonably necessary to implement that API, Contributor must also include this -information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to -Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient -rights to grant the rights conveyed by this License. - - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source -Code. If it is not possible to put such notice in a particular Source Code -file due to its structure, then You must include such notice in a location -(such as a relevant directory) where a user would be likely to look for such a -notice. If You created one or more Modification(s) You may add your name as a -Contributor to the notice described in Exhibit A. You must also duplicate -this License in any documentation for the Source Code where You describe -recipients' rights or ownership rights relating to Covered Code. You may -choose to offer, and to charge a fee for, warranty, support, indemnity or -liability obligations to one or more recipients of Covered Code. However, You -may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for any -liability incurred by the Initial Developer or such Contributor as a result of -warranty, support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the -requirements of Section 3.1-3.5 have been met for that Covered Code, and if -You include a notice stating that the Source Code version of the Covered Code -is available under the terms of this License, including a description of how -and where You have fulfilled the obligations of Section 3.2. The notice must -be conspicuously included in any notice in an Executable version, related -documentation or collateral in which You describe recipients' rights relating -to the Covered Code. You may distribute the Executable version of Covered Code -or ownership rights under a license of Your choice, which may contain terms -different from this License, provided that You are in compliance with the -terms of this License and that the license for the Executable version does not -attempt to limit or alter the recipient's rights in the Source Code version -from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of any such terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code -not governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Code due to statute, -judicial order, or regulation then You must: (a) comply with the terms of this -License to the maximum extent possible; and (b) describe the limitations and -the code they affect. Such description must be included in the LEGAL file -described in Section 3.4 and must be included with all distributions of the -Source Code. Except to the extent prohibited by statute or regulation, such -description must be sufficiently detailed for a recipient of ordinary skill to -be able to understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has attached -the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised -and/or new versions of the License from time to time. Each version will be -given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the -License, You may always continue to use it under the terms of that version. -You may also choose to use such Covered Code under the terms of any subsequent -version of the License published by Netscape. No one other than Netscape has -the right to modify the terms applicable to Covered Code created under this -License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may -only do in order to apply it to code which is not already Covered Code -governed by this License), You must (a) rename Your license so that the -phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or -any confusingly similar phrase do not appear in your license (except to note -that your license differs from this License) and (b) otherwise make it clear -that Your version of the license contains terms which differ from the Mozilla -Public License and Netscape Public License. (Filling in the name of the -Initial Developer, Original Code or Contributor in the notice described in -Exhibit A shall not of themselves be deemed to be modifications of this -License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT -LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, -FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED -CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY -OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR -CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS -LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS -DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure such -breach within 30 days of becoming aware of the breach. All sublicenses to the -Covered Code which are properly granted shall survive any termination of this -License. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement -claim (excluding declatory judgment actions) against Initial Developer or a -Contributor (the Initial Developer or Contributor against whom You file such -action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly -infringes any patent, then any and all rights granted by such Participant to -You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice -from Participant terminate prospectively, unless if within 60 days after -receipt of notice You either: (i) agree in writing to pay Participant a -mutually agreeable reasonable royalty for Your past and future use of -Modifications made by such Participant, or (ii) withdraw Your litigation claim -with respect to the Contributor Version against such Participant. If within -60 days of notice, a reasonable royalty and payment arrangement are not -mutually agreed upon in writing by the parties or the litigation claim is not -withdrawn, the rights granted by Participant to You under Sections 2.1 and/or -2.2 automatically terminate at the expiration of the 60 day notice period -specified above. - - (b) any software, hardware, or device, other than such Participant's -Contributor Version, directly or indirectly infringes any patent, then any -rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are -revoked effective as of the date You first made, used, sold, distributed, or -had made, Modifications made by that Participant. - - 8.3. If You assert a patent infringement claim against Participant -alleging that such Participant's Contributor Version directly or indirectly -infringes any patent where such claim is resolved (such as by license or -settlement) prior to the initiation of patent infringement litigation, then -the reasonable value of the licenses granted by such Participant under -Sections 2.1 or 2.2 shall be taken into account in determining the amount or -value of any payment or license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, all -end user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT -(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, -EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH -DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH -OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT -APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS -EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and -"commercial computer software documentation," as such terms are used in 48 -C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. -227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users -acquire Covered Code with only those rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it -enforceable. This License shall be governed by California law provisions -(except to the extent applicable law, if any, provides otherwise), excluding -its conflict-of-law provisions. With respect to disputes in which at least one -party is a citizen of, or an entity chartered or registered to do business in -the United States of America, any litigation relating to this License shall be -subject to the jurisdiction of the Federal Courts of the Northern District of -California, with venue lying in Santa Clara County, California, with the -losing party responsible for costs, including without limitation, court costs -and reasonable attorneys' fees and expenses. The application of the United -Nations Convention on Contracts for the International Sale of Goods is -expressly excluded. Any law or regulation which provides that the language of -a contract shall be construed against the drafter shall not apply to this -License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out of its -utilization of rights under this License and You agree to work with Initial -Developer and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any -admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as -Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits -you to utilize portions of the Covered Code under Your choice of the MPL or -the alternative licenses, if any, specified by the Initial Developer in the -file described in Exhibit A. - - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License -Version 1.1 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" -basis, WITHOUT WARRANTY OF - ANY KIND, either express or implied. See the License for the specific -language governing rights and - limitations under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. -Portions created by - ______________________ are Copyright (C) ______ -_______________________. All Rights - Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms of -the _____ license (the [___] License), in which case the provisions of -[______] License are applicable instead of those above. If you wish to allow -use of your version of this file only under the terms of the [____] License -and not to allow others to use your version of this file under the MPL, -indicate your decision by deleting the provisions above and replace them -with the notice and other provisions required by the [___] License. If you do -not delete the provisions above, a recipient may use your version of this file -under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of -the notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] - - -=============================================================================== - -For the JAX-WS Reference Implementation component: - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - - - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that - creates or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the - Original Software, prior Modifications used by a - Contributor (if any), and the Modifications made by that - particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or - (b) Modifications, or (c) the combination of files - containing Original Software with files containing - Modifications, in each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form - other than Source Code. - - 1.5. "Initial Developer" means the individual or entity - that first makes Original Software available under this - License. - - 1.6. "Larger Work" means a work which combines Covered - Software or portions thereof with code not governed by the - terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the - maximum extent possible, whether at the time of the initial - grant or subsequently acquired, any and all of the rights - conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable - form of any of the following: - - A. Any file that results from an addition to, - deletion from or modification of the contents of a - file containing Original Software or previous - Modifications; - - B. Any new file that contains any part of the - Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made - available under the terms of this License. - - 1.10. "Original Software" means the Source Code and - Executable form of computer software code that is - originally released under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned - or hereafter acquired, including without limitation, - method, process, and apparatus claims, in any patent - Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer - software code in which modifications are made and (b) - associated documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal - entity exercising rights under, and complying with all of - the terms of, this License. For legal entities, "You" - includes any entity which controls, is controlled by, or is - under common control with You. For purposes of this - definition, "control" means (a) the power, direct or - indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (b) ownership - of more than fifty percent (50%) of the outstanding shares - or beneficial ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, the - Initial Developer hereby grants You a world-wide, - royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Initial Developer, - to use, reproduce, modify, display, perform, - sublicense and distribute the Original Software (or - portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, - using or selling of Original Software, to make, have - made, use, practice, sell, and offer for sale, and/or - otherwise dispose of the Original Software (or - portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) - are effective on the date Initial Developer first - distributes or otherwise makes the Original Software - available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent - license is granted: (1) for code that You delete from - the Original Software, or (2) for infringements - caused by: (i) the modification of the Original - Software, or (ii) the combination of the Original - Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, each - Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Contributor to - use, reproduce, modify, display, perform, sublicense - and distribute the Modifications created by such - Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as - Covered Software and/or as part of a Larger Work; and - - - (b) under Patent Claims infringed by the making, - using, or selling of Modifications made by that - Contributor either alone and/or in combination with - its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, - have made, and/or otherwise dispose of: (1) - Modifications made by that Contributor (or portions - thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version - (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and - 2.2(b) are effective on the date Contributor first - distributes or otherwise makes the Modifications - available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent - license is granted: (1) for any code that Contributor - has deleted from the Contributor Version; (2) for - infringements caused by: (i) third party - modifications of Contributor Version, or (ii) the - combination of Modifications made by that Contributor - with other software (except as part of the - Contributor Version) or other devices; or (3) under - Patent Claims infringed by Covered Software in the - absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make - available in Executable form must also be made available in - Source Code form and that Source Code form must be - distributed only under the terms of this License. You must - include a copy of this License with every copy of the - Source Code form of the Covered Software You distribute or - otherwise make available. You must inform recipients of any - such Covered Software in Executable form as to how they can - obtain such Covered Software in Source Code form in a - reasonable manner on or through a medium customarily used - for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You - contribute are governed by the terms of this License. You - represent that You believe Your Modifications are Your - original creation(s) and/or You have sufficient rights to - grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications - that identifies You as the Contributor of the Modification. - You may not remove or alter any copyright, patent or - trademark notices contained within the Covered Software, or - any notices of licensing or any descriptive text giving - attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered - Software in Source Code form that alters or restricts the - applicable version of this License or the recipients' - rights hereunder. You may choose to offer, and to charge a - fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on - behalf of the Initial Developer or any Contributor. You - must make it absolutely clear that any such warranty, - support, indemnity or liability obligation is offered by - You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred - by the Initial Developer or such Contributor as a result of - warranty, support, indemnity or liability terms You offer. - - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered - Software under the terms of this License or under the terms - of a license of Your choice, which may contain terms - different from this License, provided that You are in - compliance with the terms of this License and that the - license for the Executable form does not attempt to limit - or alter the recipient's rights in the Source Code form - from the rights set forth in this License. If You - distribute the Covered Software in Executable form under a - different license, You must make it absolutely clear that - any terms which differ from this License are offered by You - alone, not by the Initial Developer or Contributor. You - hereby agree to indemnify the Initial Developer and every - Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms - You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software - with other code not governed by the terms of this License - and distribute the Larger Work as a single product. In such - a case, You must make sure the requirements of this License - are fulfilled for the Covered Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Sun Microsystems, Inc. is the initial license steward and - may publish revised and/or new versions of this License - from time to time. Each version will be given a - distinguishing version number. Except as provided in - Section 4.3, no one other than the license steward has the - right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. If the Initial Developer includes a - notice in the Original Software prohibiting it from being - distributed or otherwise made available under any - subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. Otherwise, You may also choose to - use, distribute or otherwise make the Covered Software - available under the terms of any subsequent version of the - License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a - new license for Your Original Software, You may create and - use a modified version of this License if You: (a) rename - the license and remove any references to the name of the - license steward (except to note that the license differs - from this License); and (b) otherwise make it clear that - the license contains terms which differ from this License. - - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" - BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED - SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR - PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY - COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE - INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF - ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF - WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS - DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will - terminate automatically if You fail to comply with terms - herein and fail to cure such breach within 30 days of - becoming aware of the breach. Provisions which, by their - nature, must remain in effect beyond the termination of - this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or - a Contributor (the Initial Developer or Contributor against - whom You assert such claim is referred to as "Participant") - alleging that the Participant Software (meaning the - Contributor Version where the Participant is a Contributor - or the Original Software where the Participant is the - Initial Developer) directly or indirectly infringes any - patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial - Developer (if the Initial Developer is not the Participant) - and all Contributors under Sections 2.1 and/or 2.2 of this - License shall, upon 60 days notice from Participant - terminate prospectively and automatically at the expiration - of such 60 day notice period, unless if within such 60 day - period You withdraw Your claim with respect to the - Participant Software against such Participant either - unilaterally or pursuant to a written agreement with - Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 - above, all end user licenses that have been validly granted - by You or any distributor hereunder prior to termination - (excluding licenses granted to You by any distributor) - shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE - LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK - STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL - INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO - NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR - CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT - APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is - defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial - computer software" (as that term is defined at 48 C.F.R. - 252.227-7014(a)(1)) and "commercial computer software - documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. - 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 - through 227.7202-4 (June 1995), all U.S. Government End Users - acquire Covered Software with only those rights set forth herein. - This U.S. Government Rights clause is in lieu of, and supersedes, - any other FAR, DFAR, or other clause or provision that addresses - Government rights in computer software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the - extent necessary to make it enforceable. This License shall be - governed by the law of the jurisdiction specified in a notice - contained within the Original Software (except to the extent - applicable law, if any, provides otherwise), excluding such - jurisdiction's conflict-of-law provisions. Any litigation - relating to this License shall be subject to the jurisdiction of - the courts located in the jurisdiction and venue specified in a - notice contained within the Original Software, with the losing - party responsible for costs, including, without limitation, court - costs and reasonable attorneys' fees and expenses. The - application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall - be construed against the drafter shall not apply to this License. - You agree that You alone are responsible for compliance with the - United States export administration regulations (and the export - control laws and regulation of any other countries) when You use, - distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or - indirectly, out of its utilization of rights under this License - and You agree to work with Initial Developer and Contributors to - distribute such responsibility on an equitable basis. Nothing - herein is intended or shall be deemed to constitute any admission - of liability. - diff --git a/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/NOTICE b/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/NOTICE deleted file mode 100644 index d48810c0ec..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/NOTICE +++ /dev/null @@ -1,18 +0,0 @@ -========================================================================= -== NOTICE file corresponding to the section 4 d of == -== the Apache License, Version 2.0, == -== in this case for the Apache Tuscany distribution. == -========================================================================= - -This product includes software developed by 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/) -- the Celtix project (http://celtix.objectweb.org/) -- the Mozilla Rhino project (http://www.mozilla.org/rhino/) -- the GlassFish JAX-WS project (https://jax-ws.dev.java.net/) - -Please read the LICENSE.txt file present in the root directory of this -distribution. - diff --git a/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/README.txt b/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/README.txt deleted file mode 100644 index 9b26d1690a..0000000000 --- a/branches/java-post-M1/sdo/tools/src/main/resources/META-INF/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -Apache Tuscany M1 build (May, 2006) -=================================== - -http://incubator.apache.org/tuscany/ - -Tuscany is an effort undergoing incubation at the Apache Software Foundation -(ASF), sponsored by the Web Services PMC. - -Incubation is required of all newly accepted projects until a further review -indicates that the infrastructure, communications, and decision making process -have stabilized in a manner consistent with other successful ASF projects. - -While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully -endorsed by the ASF. - - -Support -------- - -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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java deleted file mode 100644 index 8ec83abfdb..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedQuote.java +++ /dev/null @@ -1,323 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - -import commonj.sdo.Sequence; - -import java.math.BigDecimal; - -import java.util.List; - -/** - * - * A representation of the model object 'Mixed Quote'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.sequences.MixedQuote#getMixed Mixed}
      • - *
      • {@link com.example.sequences.MixedQuote#getSymbol Symbol}
      • - *
      • {@link com.example.sequences.MixedQuote#getCompanyName Company Name}
      • - *
      • {@link com.example.sequences.MixedQuote#getPrice Price}
      • - *
      • {@link com.example.sequences.MixedQuote#getOpen1 Open1}
      • - *
      • {@link com.example.sequences.MixedQuote#getHigh High}
      • - *
      • {@link com.example.sequences.MixedQuote#getLow Low}
      • - *
      • {@link com.example.sequences.MixedQuote#getVolume Volume}
      • - *
      • {@link com.example.sequences.MixedQuote#getChange1 Change1}
      • - *
      • {@link com.example.sequences.MixedQuote#getQuotes Quotes}
      • - *
      - *

      - * - * @generated - */ -public interface MixedQuote -{ - /** - * 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 #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 #getSymbol() - * @generated - */ - void setSymbol(String value); - - /** - * 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 #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 #getCompanyName() - * @generated - */ - void setCompanyName(String value); - - /** - * 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 #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 #getPrice() - * @generated - */ - void setPrice(BigDecimal value); - - /** - * 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 #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 #getOpen1() - * @generated - */ - void setOpen1(BigDecimal value); - - /** - * 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 #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 #getHigh() - * @generated - */ - void setHigh(BigDecimal value); - - /** - * 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 #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 #getLow() - * @generated - */ - void setLow(BigDecimal value); - - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java deleted file mode 100644 index f92285c048..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/MixedRepeatingChoice.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - -import commonj.sdo.Sequence; - -import java.util.List; - -/** - * - * A representation of the model object 'Mixed Repeating Choice'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.sequences.MixedRepeatingChoice#getMixed Mixed}
      • - *
      • {@link com.example.sequences.MixedRepeatingChoice#getGroup Group}
      • - *
      • {@link com.example.sequences.MixedRepeatingChoice#getA A}
      • - *
      • {@link com.example.sequences.MixedRepeatingChoice#getB B}
      • - *
      - *

      - * - * @generated - */ -public interface MixedRepeatingChoice -{ - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java deleted file mode 100644 index ab5b144e09..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/RepeatingChoice.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - -import commonj.sdo.Sequence; - -import java.util.List; - -/** - * - * A representation of the model object 'Repeating Choice'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.sequences.RepeatingChoice#getGroup Group}
      • - *
      • {@link com.example.sequences.RepeatingChoice#getA A}
      • - *
      • {@link com.example.sequences.RepeatingChoice#getB B}
      • - *
      - *

      - * - * @generated - */ -public interface RepeatingChoice -{ - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java deleted file mode 100644 index c73310b5b5..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/SequencesFactory.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - - -/** - * - * 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(); - -} //SequencesFactory diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java deleted file mode 100644 index 9615d2a0ef..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCs.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - -import commonj.sdo.Sequence; - -import java.util.List; - -/** - * - * A representation of the model object 'Two RCs'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.sequences.TwoRCs#getGroup Group}
      • - *
      • {@link com.example.sequences.TwoRCs#getA A}
      • - *
      • {@link com.example.sequences.TwoRCs#getB B}
      • - *
      • {@link com.example.sequences.TwoRCs#getSplit Split}
      • - *
      • {@link com.example.sequences.TwoRCs#getGroup1 Group1}
      • - *
      • {@link com.example.sequences.TwoRCs#getY Y}
      • - *
      • {@link com.example.sequences.TwoRCs#getZ Z}
      • - *
      - *

      - * - * @generated - */ -public interface TwoRCs -{ - /** - * 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 #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 #getSplit() - * @generated - */ - void setSplit(String value); - - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java deleted file mode 100644 index 0325e2cd9c..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/TwoRCsMixed.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences; - -import commonj.sdo.Sequence; - -import java.util.List; - -/** - * - * A representation of the model object 'Two RCs Mixed'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.sequences.TwoRCsMixed#getMixed Mixed}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getGroup Group}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getA A}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getB B}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getSplit Split}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getGroup1 Group1}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getY Y}
      • - *
      • {@link com.example.sequences.TwoRCsMixed#getZ Z}
      • - *
      - *

      - * - * @generated - */ -public interface TwoRCsMixed -{ - /** - * 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 #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 #getSplit() - * @generated - */ - void setSplit(String value); - - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java deleted file mode 100644 index b3381cda76..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedQuoteImpl.java +++ /dev/null @@ -1,657 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import com.example.sequences.MixedQuote; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import commonj.sdo.helper.TypeHelper; - -import java.math.BigDecimal; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.BasicSequence; - -/** - * - * An implementation of the model object 'Mixed Quote'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getMixed Mixed}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getSymbol Symbol}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getCompanyName Company Name}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getPrice Price}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getOpen1 Open1}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getHigh High}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getLow Low}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getVolume Volume}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getChange1 Change1}
      • - *
      • {@link com.example.sequences.impl.MixedQuoteImpl#getQuotes Quotes}
      • - *
      - *

      - * - * @generated - */ -public class MixedQuoteImpl extends DataObjectBase implements MixedQuote -{ - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public final static int MIXED = 0; - - /** - * The cached value of the '{@link #getMixed() Mixed}' attribute list. - * - * - * @see #getMixed() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence mixed = null; - - /** - * The feature id for the 'Symbol' attribute. - * - * - * @generated - * @ordered - */ - public final static int SYMBOL = 1; - - /** - * The default value of the '{@link #getSymbol() Symbol}' attribute. - * - * - * @see #getSymbol() - * @generated - * @ordered - */ - protected static final String SYMBOL_DEFAULT_ = null; - - /** - * The feature id for the 'Company Name' attribute. - * - * - * @generated - * @ordered - */ - public final static int COMPANY_NAME = 2; - - /** - * The default value of the '{@link #getCompanyName() Company Name}' attribute. - * - * - * @see #getCompanyName() - * @generated - * @ordered - */ - protected static final String COMPANY_NAME_DEFAULT_ = null; - - /** - * The feature id for the 'Price' attribute. - * - * - * @generated - * @ordered - */ - public final static int PRICE = 3; - - /** - * The default value of the '{@link #getPrice() Price}' attribute. - * - * - * @see #getPrice() - * @generated - * @ordered - */ - protected static final BigDecimal PRICE_DEFAULT_ = null; - - /** - * The feature id for the 'Open1' attribute. - * - * - * @generated - * @ordered - */ - public final static int OPEN1 = 4; - - /** - * The default value of the '{@link #getOpen1() Open1}' attribute. - * - * - * @see #getOpen1() - * @generated - * @ordered - */ - protected static final BigDecimal OPEN1_DEFAULT_ = null; - - /** - * The feature id for the 'High' attribute. - * - * - * @generated - * @ordered - */ - public final static int HIGH = 5; - - /** - * The default value of the '{@link #getHigh() High}' attribute. - * - * - * @see #getHigh() - * @generated - * @ordered - */ - protected static final BigDecimal HIGH_DEFAULT_ = null; - - /** - * The feature id for the 'Low' attribute. - * - * - * @generated - * @ordered - */ - public final static int LOW = 6; - - /** - * The default value of the '{@link #getLow() Low}' attribute. - * - * - * @see #getLow() - * @generated - * @ordered - */ - protected static final BigDecimal LOW_DEFAULT_ = null; - - /** - * The feature id for the 'Volume' attribute. - * - * - * @generated - * @ordered - */ - public final static int VOLUME = 7; - - /** - * The feature id for the 'Change1' attribute. - * - * - * @generated - * @ordered - */ - public final static int CHANGE1 = 8; - - /** - * The feature id for the 'Quotes' containment reference list. - * - * - * @generated - * @ordered - */ - public final static int QUOTES = 9; - - /** - * - * - * @generated - */ - protected MixedQuoteImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public Type getType() - { - return TypeHelper.INSTANCE.getType(MixedQuote.class); //TBD Generate a more efficient implementation - } - - /** - * - * - * @generated - */ - public Sequence getMixed() - { - if (mixed == null) - { - mixed = createSequence(MIXED); - - } - return mixed; - } - - /** - * - * - * @generated - */ - public String getSymbol() - { - return (String)get(getMixed(), getType(), SYMBOL); - } - - /** - * - * - * @generated - */ - public void setSymbol(String newSymbol) - { - set(getMixed(), getType(), SYMBOL, newSymbol); - } - - /** - * - * - * @generated - */ - public String getCompanyName() - { - return (String)get(getMixed(), getType(), COMPANY_NAME); - } - - /** - * - * - * @generated - */ - public void setCompanyName(String newCompanyName) - { - set(getMixed(), getType(), COMPANY_NAME, newCompanyName); - } - - /** - * - * - * @generated - */ - public BigDecimal getPrice() - { - return (BigDecimal)get(getMixed(), getType(), PRICE); - } - - /** - * - * - * @generated - */ - public void setPrice(BigDecimal newPrice) - { - set(getMixed(), getType(), PRICE, newPrice); - } - - /** - * - * - * @generated - */ - public BigDecimal getOpen1() - { - return (BigDecimal)get(getMixed(), getType(), OPEN1); - } - - /** - * - * - * @generated - */ - public void setOpen1(BigDecimal newOpen1) - { - set(getMixed(), getType(), OPEN1, newOpen1); - } - - /** - * - * - * @generated - */ - public BigDecimal getHigh() - { - return (BigDecimal)get(getMixed(), getType(), HIGH); - } - - /** - * - * - * @generated - */ - public void setHigh(BigDecimal newHigh) - { - set(getMixed(), getType(), HIGH, newHigh); - } - - /** - * - * - * @generated - */ - public BigDecimal getLow() - { - return (BigDecimal)get(getMixed(), getType(), LOW); - } - - /** - * - * - * @generated - */ - public void setLow(BigDecimal newLow) - { - set(getMixed(), getType(), LOW, newLow); - } - - /** - * - * - * @generated - */ - public double getVolume() - { - return ((Double)get(getMixed(), getType(), VOLUME)).doubleValue(); - } - - /** - * - * - * @generated - */ - public void setVolume(double newVolume) - { - set(getMixed(), getType(), VOLUME, new Double(newVolume)); - } - - /** - * - * - * @generated - */ - public void unsetVolume() - { - unset(getMixed(), getType(), VOLUME); - } - - /** - * - * - * @generated - */ - public boolean isSetVolume() - { - return isSet(getMixed(), getType(), VOLUME); - } - - /** - * - * - * @generated - */ - public double getChange1() - { - return ((Double)get(getMixed(), getType(), CHANGE1)).doubleValue(); - } - - /** - * - * - * @generated - */ - public void setChange1(double newChange1) - { - set(getMixed(), getType(), CHANGE1, new Double(newChange1)); - } - - /** - * - * - * @generated - */ - public void unsetChange1() - { - unset(getMixed(), getType(), CHANGE1); - } - - /** - * - * - * @generated - */ - public boolean isSetChange1() - { - return isSet(getMixed(), getType(), CHANGE1); - } - - /** - * - * - * @generated - */ - public List getQuotes() - { - return getList(getMixed(), getType(), QUOTES); - - } - - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case MIXED: - return removeFromSequence(getMixed(), otherEnd, changeContext); - case QUOTES: - return removeFromList(getQuotes(), otherEnd, changeContext); - } - return super.inverseRemove(otherEnd, propertyIndex, changeContext); - } - - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case MIXED: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getMixed(); - case SYMBOL: - return getSymbol(); - case COMPANY_NAME: - return getCompanyName(); - case PRICE: - return getPrice(); - case OPEN1: - return getOpen1(); - case HIGH: - return getHigh(); - case LOW: - return getLow(); - case VOLUME: - return new Double(getVolume()); - case CHANGE1: - return new Double(getChange1()); - case QUOTES: - return getQuotes(); - } - return super.get(propertyIndex, resolve); - } - - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case MIXED: - setSequence(getMixed(), newValue); - return; - case SYMBOL: - setSymbol((String)newValue); - return; - case COMPANY_NAME: - setCompanyName((String)newValue); - return; - case PRICE: - setPrice((BigDecimal)newValue); - return; - case OPEN1: - setOpen1((BigDecimal)newValue); - return; - case HIGH: - setHigh((BigDecimal)newValue); - return; - case LOW: - setLow((BigDecimal)newValue); - return; - case VOLUME: - setVolume(((Double)newValue).doubleValue()); - return; - case CHANGE1: - setChange1(((Double)newValue).doubleValue()); - return; - case QUOTES: - getQuotes().clear(); - getQuotes().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - unsetSequence(getMixed()); - return; - case SYMBOL: - setSymbol(SYMBOL_DEFAULT_); - return; - case COMPANY_NAME: - setCompanyName(COMPANY_NAME_DEFAULT_); - return; - case PRICE: - setPrice(PRICE_DEFAULT_); - return; - case OPEN1: - setOpen1(OPEN1_DEFAULT_); - return; - case HIGH: - setHigh(HIGH_DEFAULT_); - return; - case LOW: - setLow(LOW_DEFAULT_); - return; - case VOLUME: - unsetVolume(); - return; - case CHANGE1: - unsetChange1(); - return; - case QUOTES: - getQuotes().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - // KDK - should this be !isSequenceEmpty? - return mixed != null && !isSequenceEmpty(getMixed()); - case SYMBOL: - return SYMBOL_DEFAULT_ == null ? getSymbol() != null : !SYMBOL_DEFAULT_.equals(getSymbol()); - case COMPANY_NAME: - return COMPANY_NAME_DEFAULT_ == null ? getCompanyName() != null : !COMPANY_NAME_DEFAULT_.equals(getCompanyName()); - case PRICE: - return PRICE_DEFAULT_ == null ? getPrice() != null : !PRICE_DEFAULT_.equals(getPrice()); - case OPEN1: - return OPEN1_DEFAULT_ == null ? getOpen1() != null : !OPEN1_DEFAULT_.equals(getOpen1()); - case HIGH: - return HIGH_DEFAULT_ == null ? getHigh() != null : !HIGH_DEFAULT_.equals(getHigh()); - case LOW: - return LOW_DEFAULT_ == null ? getLow() != null : !LOW_DEFAULT_.equals(getLow()); - case VOLUME: - return isSetVolume(); - case CHANGE1: - return isSetChange1(); - case QUOTES: - return !getQuotes().isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mixed: "); - result.append(mixed); - result.append(')'); - return result.toString(); - } - -} //MixedQuoteImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java deleted file mode 100644 index 7e49e448f8..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/MixedRepeatingChoiceImpl.java +++ /dev/null @@ -1,299 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import com.example.sequences.MixedRepeatingChoice; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import commonj.sdo.helper.TypeHelper; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.BasicSequence; - -/** - * - * An implementation of the model object 'Mixed Repeating Choice'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getMixed Mixed}
      • - *
      • {@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getGroup Group}
      • - *
      • {@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getA A}
      • - *
      • {@link com.example.sequences.impl.MixedRepeatingChoiceImpl#getB B}
      • - *
      - *

      - * - * @generated - */ -public class MixedRepeatingChoiceImpl extends DataObjectBase implements MixedRepeatingChoice -{ - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public final static int MIXED = 0; - - /** - * The cached value of the '{@link #getMixed() Mixed}' attribute list. - * - * - * @see #getMixed() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence mixed = null; - - /** - * The feature id for the 'Group' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP = 1; - - /** - * The feature id for the 'A' attribute list. - * - * - * @generated - * @ordered - */ - public final static int A = 2; - - /** - * The feature id for the 'B' attribute list. - * - * - * @generated - * @ordered - */ - public final static int B = 3; - - /** - * - * - * @generated - */ - protected MixedRepeatingChoiceImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public Type getType() - { - return TypeHelper.INSTANCE.getType(MixedRepeatingChoice.class); //TBD Generate a more efficient implementation - } - - /** - * - * - * @generated - */ - public Sequence getMixed() - { - if (mixed == null) - { - mixed = createSequence(MIXED); - - } - return mixed; - } - - /** - * - * - * @generated - */ - public Sequence getGroup() - { - return createSequence(getMixed(), getType(), GROUP); - } - - /** - * - * - * @generated - */ - public List getA() - { - return getList(getGroup(), getType(), A); - - } - - /** - * - * - * @generated - */ - public List getB() - { - return getList(getGroup(), getType(), B); - - } - - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case MIXED: - return removeFromSequence(getMixed(), otherEnd, changeContext); - case GROUP: - return removeFromSequence(getGroup(), otherEnd, changeContext); - } - return super.inverseRemove(otherEnd, propertyIndex, changeContext); - } - - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case MIXED: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getMixed(); - case GROUP: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup(); - case A: - return getA(); - case B: - return getB(); - } - return super.get(propertyIndex, resolve); - } - - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case MIXED: - setSequence(getMixed(), newValue); - return; - case GROUP: - setSequence(getGroup(), newValue); - return; - case A: - getA().clear(); - getA().addAll((Collection)newValue); - return; - case B: - getB().clear(); - getB().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - unsetSequence(getMixed()); - return; - case GROUP: - unsetSequence(getGroup()); - return; - case A: - getA().clear(); - return; - case B: - getB().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - // KDK - should this be !isSequenceEmpty? - return mixed != null && !isSequenceEmpty(getMixed()); - case GROUP: - return !isSequenceEmpty(getGroup()); - case A: - return !getA().isEmpty(); - case B: - return !getB().isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mixed: "); - result.append(mixed); - result.append(')'); - return result.toString(); - } - -} //MixedRepeatingChoiceImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java deleted file mode 100644 index f4bc2c301f..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/RepeatingChoiceImpl.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import com.example.sequences.RepeatingChoice; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import commonj.sdo.helper.TypeHelper; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.BasicSequence; - -/** - * - * An implementation of the model object 'Repeating Choice'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.sequences.impl.RepeatingChoiceImpl#getGroup Group}
      • - *
      • {@link com.example.sequences.impl.RepeatingChoiceImpl#getA A}
      • - *
      • {@link com.example.sequences.impl.RepeatingChoiceImpl#getB B}
      • - *
      - *

      - * - * @generated - */ -public class RepeatingChoiceImpl extends DataObjectBase implements RepeatingChoice -{ - /** - * The feature id for the 'Group' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP = 0; - - /** - * The cached value of the '{@link #getGroup() Group}' attribute list. - * - * - * @see #getGroup() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence group = null; - - /** - * The feature id for the 'A' attribute list. - * - * - * @generated - * @ordered - */ - public final static int A = 1; - - /** - * The feature id for the 'B' attribute list. - * - * - * @generated - * @ordered - */ - public final static int B = 2; - - /** - * - * - * @generated - */ - protected RepeatingChoiceImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public Type getType() - { - return TypeHelper.INSTANCE.getType(RepeatingChoice.class); //TBD Generate a more efficient implementation - } - - /** - * - * - * @generated - */ - public Sequence getGroup() - { - if (group == null) - { - group = createSequence(GROUP); - - } - return group; - } - - /** - * - * - * @generated - */ - public List getA() - { - return getList(getGroup(), getType(), A); - - } - - /** - * - * - * @generated - */ - public List getB() - { - return getList(getGroup(), getType(), B); - - } - - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case GROUP: - return removeFromSequence(getGroup(), otherEnd, changeContext); - } - return super.inverseRemove(otherEnd, propertyIndex, changeContext); - } - - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case GROUP: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup(); - case A: - return getA(); - case B: - return getB(); - } - return super.get(propertyIndex, resolve); - } - - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case GROUP: - setSequence(getGroup(), newValue); - return; - case A: - getA().clear(); - getA().addAll((Collection)newValue); - return; - case B: - getB().clear(); - getB().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case GROUP: - unsetSequence(getGroup()); - return; - case A: - getA().clear(); - return; - case B: - getB().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case GROUP: - // KDK - should this be !isSequenceEmpty? - return group != null && !isSequenceEmpty(getGroup()); - case A: - return !getA().isEmpty(); - case B: - return !getB().isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (group: "); - result.append(group); - result.append(')'); - return result.toString(); - } - -} //RepeatingChoiceImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java deleted file mode 100644 index 0cef7a04d1..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/SequencesFactoryImpl.java +++ /dev/null @@ -1,692 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import org.apache.tuscany.sdo.impl.FactoryBase; -import org.apache.tuscany.sdo.impl.SDOFactoryImpl; -import org.apache.tuscany.sdo.model.impl.ModelFactoryImpl; -import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; -import org.apache.tuscany.sdo.util.SDOUtil; - -import com.example.sequences.MixedQuote; -import com.example.sequences.MixedRepeatingChoice; -import com.example.sequences.RepeatingChoice; -import com.example.sequences.SequencesFactory; -import com.example.sequences.TwoRCs; -import com.example.sequences.TwoRCsMixed; -import commonj.sdo.DataObject; -import commonj.sdo.Property; -import commonj.sdo.Type; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class SequencesFactoryImpl extends FactoryBase implements SequencesFactory -{ - -/** - * The package namespace URI. - * - * - * @generated - */ -public static final String NAMESPACE_URI = "http://www.example.com/sequences"; - -/** - * The package namespace name. - * - * - * @generated - */ -public static final String NAMESPACE_PREFIX = "sequences"; - - -public static final int MIXED_QUOTE = 1; -public static final int MIXED_REPEATING_CHOICE = 2; -public static final int REPEATING_CHOICE = 3; -public static final int TWO_RCS = 4; -public static final int TWO_RCS_MIXED = 5; - - - /** - * Creates the default factory implementation. - * - * - * @generated - */ - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public SequencesFactoryImpl() - { - super(NAMESPACE_URI, NAMESPACE_PREFIX); - } - - /** - * - * - * @generated - */ - public DataObject create(int typeNumber) - { - switch (typeNumber) - { - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case MIXED_QUOTE: return (DataObject)createMixedQuote(); - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case MIXED_REPEATING_CHOICE: return (DataObject)createMixedRepeatingChoice(); - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case REPEATING_CHOICE: return (DataObject)createRepeatingChoice(); - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case TWO_RCS: return (DataObject)createTwoRCs(); - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case TWO_RCS_MIXED: return (DataObject)createTwoRCsMixed(); - default: - return super.create(typeNumber); - } - } - - - /** - * - * - * @generated - */ - public MixedQuote createMixedQuote() - { - MixedQuoteImpl mixedQuote = new MixedQuoteImpl(); - return mixedQuote; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type mixedQuoteType = null; - - public Type getMixedQuote() - { - // TODO - kdk - verify how to generate quoteType...mixedQuoteType? - return mixedQuoteType; - } - /** - * - * - * @generated - */ - public MixedRepeatingChoice createMixedRepeatingChoice() - { - MixedRepeatingChoiceImpl mixedRepeatingChoice = new MixedRepeatingChoiceImpl(); - return mixedRepeatingChoice; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type mixedRepeatingChoiceType = null; - - public Type getMixedRepeatingChoice() - { - // TODO - kdk - verify how to generate quoteType...mixedRepeatingChoiceType? - return mixedRepeatingChoiceType; - } - /** - * - * - * @generated - */ - public RepeatingChoice createRepeatingChoice() - { - RepeatingChoiceImpl repeatingChoice = new RepeatingChoiceImpl(); - return repeatingChoice; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type repeatingChoiceType = null; - - public Type getRepeatingChoice() - { - // TODO - kdk - verify how to generate quoteType...repeatingChoiceType? - return repeatingChoiceType; - } - /** - * - * - * @generated - */ - public TwoRCs createTwoRCs() - { - TwoRCsImpl twoRCs = new TwoRCsImpl(); - return twoRCs; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type twoRCsType = null; - - public Type getTwoRCs() - { - // TODO - kdk - verify how to generate quoteType...twoRCsType? - return twoRCsType; - } - /** - * - * - * @generated - */ - public TwoRCsMixed createTwoRCsMixed() - { - TwoRCsMixedImpl twoRCsMixed = new TwoRCsMixedImpl(); - return twoRCsMixed; - } - - // Following creates and initializes SDO metadata for the supported types. - protected Type twoRCsMixedType = null; - - public Type getTwoRCsMixed() - { - // TODO - kdk - verify how to generate quoteType...twoRCsMixedType? - return twoRCsMixedType; - } - - private static boolean isInited = false; - - public static SequencesFactoryImpl init() - { - if (isInited) return (SequencesFactoryImpl)FactoryBase.getStaticFactory(SequencesFactoryImpl.NAMESPACE_URI); - SequencesFactoryImpl theSequencesFactoryImpl = new SequencesFactoryImpl(); - isInited = true; - - // Initialize simple dependencies - SDOUtil.registerStaticTypes(SDOFactoryImpl.class); - SDOUtil.registerStaticTypes(ModelPackageImpl.class); - - // Create package meta-data objects - theSequencesFactoryImpl.createMetaData(); - - // Initialize created meta-data - theSequencesFactoryImpl.initializeMetaData(); - - // Mark meta-data to indicate it can't be changed - //theSequencesFactoryImpl.freeze(); //FB do we need to freeze / should we freeze ???? - - return theSequencesFactoryImpl; - } - - private boolean isCreated = false; - - public void createMetaData() - { - if (isCreated) return; - isCreated = true; - - - mixedQuoteType = createType(false, MIXED_QUOTE); - createProperty(true, mixedQuoteType, MixedQuoteImpl.MIXED); - createProperty(true, mixedQuoteType, MixedQuoteImpl.SYMBOL); - createProperty(true, mixedQuoteType, MixedQuoteImpl.COMPANY_NAME); - createProperty(true, mixedQuoteType, MixedQuoteImpl.PRICE); - createProperty(true, mixedQuoteType, MixedQuoteImpl.OPEN1); - createProperty(true, mixedQuoteType, MixedQuoteImpl.HIGH); - createProperty(true, mixedQuoteType, MixedQuoteImpl.LOW); - createProperty(true, mixedQuoteType, MixedQuoteImpl.VOLUME); - createProperty(true, mixedQuoteType, MixedQuoteImpl.CHANGE1); - createProperty(false, mixedQuoteType, MixedQuoteImpl.QUOTES); - - mixedRepeatingChoiceType = createType(false, MIXED_REPEATING_CHOICE); - createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.MIXED); - createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.GROUP); - createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.A); - createProperty(true, mixedRepeatingChoiceType, MixedRepeatingChoiceImpl.B); - - repeatingChoiceType = createType(false, REPEATING_CHOICE); - createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.GROUP); - createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.A); - createProperty(true, repeatingChoiceType, RepeatingChoiceImpl.B); - - twoRCsType = createType(false, TWO_RCS); - createProperty(true, twoRCsType, TwoRCsImpl.GROUP); - createProperty(true, twoRCsType, TwoRCsImpl.A); - createProperty(true, twoRCsType, TwoRCsImpl.B); - createProperty(true, twoRCsType, TwoRCsImpl.SPLIT); - createProperty(true, twoRCsType, TwoRCsImpl.GROUP1); - createProperty(true, twoRCsType, TwoRCsImpl.Y); - createProperty(true, twoRCsType, TwoRCsImpl.Z); - - twoRCsMixedType = createType(false, TWO_RCS_MIXED); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.MIXED); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.A); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.B); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.SPLIT); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.GROUP1); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Y); - createProperty(true, twoRCsMixedType, TwoRCsMixedImpl.Z); - } - private boolean isInitialized = false; - - public void initializeMetaData() - { - if (isInitialized) return; - isInitialized = true; - - // Obtain other dependent packages - ModelFactoryImpl theModelPackageImpl = (ModelFactoryImpl)FactoryBase.getStaticFactory(ModelFactoryImpl.NAMESPACE_URI); - - // Add supertypes to classes - // Initialize classes and features; add operations and parameters - - initializeType(mixedQuoteType, MixedQuote.class, "MixedQuote"); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED), getSequence(), "mixed", null, 0, -1, MixedQuote.class, false, false, false); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL), theModelPackageImpl.getString(), "symbol", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME), theModelPackageImpl.getString(), "companyName", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE), theModelPackageImpl.getDecimal(), "price", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1), theModelPackageImpl.getDecimal(), "open1", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH), theModelPackageImpl.getDecimal(), "high", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW), theModelPackageImpl.getDecimal(), "low", null, 1, 1, MixedQuote.class, false, false, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME), theModelPackageImpl.getDouble(), "volume", null, 1, 1, MixedQuote.class, false, true, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1), theModelPackageImpl.getDouble(), "change1", null, 1, 1, MixedQuote.class, false, true, true); - initializeProperty((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES), this.getMixedQuote(), "quotes", null, 0, -1, MixedQuote.class, false, false, true, true , null); - - initializeType(mixedRepeatingChoiceType, MixedRepeatingChoice.class, "MixedRepeatingChoice"); - initializeProperty((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED), getSequence(), "mixed", null, 0, -1, MixedRepeatingChoice.class, false, false, false); - initializeProperty((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP), getSequence(), "group", null, 0, -1, MixedRepeatingChoice.class, false, false, true); - initializeProperty((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A), theModelPackageImpl.getString(), "a", null, 0, -1, MixedRepeatingChoice.class, false, false, true); - initializeProperty((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B), theModelPackageImpl.getInt(), "b", null, 0, -1, MixedRepeatingChoice.class, false, false, true); - - initializeType(repeatingChoiceType, RepeatingChoice.class, "RepeatingChoice"); - initializeProperty((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP), getSequence(), "group", null, 0, -1, RepeatingChoice.class, false, false, false); - initializeProperty((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A), theModelPackageImpl.getString(), "a", null, 0, -1, RepeatingChoice.class, false, false, true); - initializeProperty((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B), theModelPackageImpl.getInt(), "b", null, 0, -1, RepeatingChoice.class, false, false, true); - - initializeType(twoRCsType, TwoRCs.class, "TwoRCs"); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP), getSequence(), "group", null, 0, -1, TwoRCs.class, false, false, false); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.A), theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCs.class, false, false, true); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.B), theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCs.class, false, false, true); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT), theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCs.class, false, false, false); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1), getSequence(), "group1", null, 0, -1, TwoRCs.class, false, false, false); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.Y), theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCs.class, false, false, true); - initializeProperty((Property)twoRCsType.getProperties().get(TwoRCsImpl.Z), theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCs.class, false, false, true); - - initializeType(twoRCsMixedType, TwoRCsMixed.class, "TwoRCsMixed"); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED), getSequence(), "mixed", null, 0, -1, TwoRCsMixed.class, false, false, false); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP), getSequence(), "group", null, 0, -1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A), theModelPackageImpl.getString(), "a", null, 0, -1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B), theModelPackageImpl.getInt(), "b", null, 0, -1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT), theModelPackageImpl.getString(), "split", null, 1, 1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1), getSequence(), "group1", null, 0, -1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y), theModelPackageImpl.getString(), "y", null, 0, -1, TwoRCsMixed.class, false, false, true); - initializeProperty((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z), theModelPackageImpl.getInt(), "z", null, 0, -1, TwoRCsMixed.class, false, false, true);createXSDMetaData(); - } - - protected void createXSDMetaData() - { - super.createXSDMetaData(); - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (mixedQuoteType, - new String[] - { - "name", "MixedQuote", - "kind", "elementOnly" - }); - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.MIXED), - new String[] - { - "kind", "element", - "name", "mixed" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.SYMBOL), - new String[] - { - "kind", "element", - "name", "symbol" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.COMPANY_NAME), - new String[] - { - "kind", "element", - "name", "companyName" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.PRICE), - new String[] - { - "kind", "element", - "name", "price" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.OPEN1), - new String[] - { - "kind", "element", - "name", "open1" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.HIGH), - new String[] - { - "kind", "element", - "name", "high" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.LOW), - new String[] - { - "kind", "element", - "name", "low" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.VOLUME), - new String[] - { - "kind", "element", - "name", "volume" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.CHANGE1), - new String[] - { - "kind", "element", - "name", "change1" - }); - - addXSDMapping - ((Property)mixedQuoteType.getProperties().get(MixedQuoteImpl.QUOTES), - new String[] - { - "kind", "element", - "name", "quotes" - }); - - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (mixedRepeatingChoiceType, - new String[] - { - "name", "MixedRepeatingChoice", - "kind", "elementOnly" - }); - addXSDMapping - ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.MIXED), - new String[] - { - "kind", "element", - "name", "mixed" - }); - - addXSDMapping - ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.GROUP), - new String[] - { - "kind", "element", - "name", "group" - }); - - addXSDMapping - ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.A), - new String[] - { - "kind", "element", - "name", "a" - }); - - addXSDMapping - ((Property)mixedRepeatingChoiceType.getProperties().get(MixedRepeatingChoiceImpl.B), - new String[] - { - "kind", "element", - "name", "b" - }); - - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (repeatingChoiceType, - new String[] - { - "name", "RepeatingChoice", - "kind", "elementOnly" - }); - addXSDMapping - ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.GROUP), - new String[] - { - "kind", "element", - "name", "group" - }); - - addXSDMapping - ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.A), - new String[] - { - "kind", "element", - "name", "a" - }); - - addXSDMapping - ((Property)repeatingChoiceType.getProperties().get(RepeatingChoiceImpl.B), - new String[] - { - "kind", "element", - "name", "b" - }); - - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (twoRCsType, - new String[] - { - "name", "TwoRCs", - "kind", "elementOnly" - }); - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP), - new String[] - { - "kind", "element", - "name", "group" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.A), - new String[] - { - "kind", "element", - "name", "a" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.B), - new String[] - { - "kind", "element", - "name", "b" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.SPLIT), - new String[] - { - "kind", "element", - "name", "split" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.GROUP1), - new String[] - { - "kind", "element", - "name", "group1" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Y), - new String[] - { - "kind", "element", - "name", "y" - }); - - addXSDMapping - ((Property)twoRCsType.getProperties().get(TwoRCsImpl.Z), - new String[] - { - "kind", "element", - "name", "z" - }); - - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (twoRCsMixedType, - new String[] - { - "name", "TwoRCsMixed", - "kind", "elementOnly" - }); - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.MIXED), - new String[] - { - "kind", "element", - "name", "mixed" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP), - new String[] - { - "kind", "element", - "name", "group" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.A), - new String[] - { - "kind", "element", - "name", "a" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.B), - new String[] - { - "kind", "element", - "name", "b" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.SPLIT), - new String[] - { - "kind", "element", - "name", "split" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.GROUP1), - new String[] - { - "kind", "element", - "name", "group1" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Y), - new String[] - { - "kind", "element", - "name", "y" - }); - - addXSDMapping - ((Property)twoRCsMixedType.getProperties().get(TwoRCsMixedImpl.Z), - new String[] - { - "kind", "element", - "name", "z" - }); - - - // TODO - kdk - how do I filter out mixed, xMLNSPrefixMap, and xSISchemaLocation without hardcoding it - // TODO - kdk - can I hardcode ##targetNamespace? - - createGlobalProperty - ("mixedStockQuote", - this.getMixedQuote(), - new String[] - { - "kind", "element", - "name", "mixedStockQuote", - "namespace", "##targetNamespace" - }); - - createGlobalProperty - ("mrc", - this.getMixedRepeatingChoice(), - new String[] - { - "kind", "element", - "name", "mrc", - "namespace", "##targetNamespace" - }); - - createGlobalProperty - ("mrc2", - this.getTwoRCsMixed(), - new String[] - { - "kind", "element", - "name", "mrc2", - "namespace", "##targetNamespace" - }); - - createGlobalProperty - ("rc", - this.getRepeatingChoice(), - new String[] - { - "kind", "element", - "name", "rc", - "namespace", "##targetNamespace" - }); - - createGlobalProperty - ("rc2", - this.getTwoRCs(), - new String[] - { - "kind", "element", - "name", "rc2", - "namespace", "##targetNamespace" - }); - - } - -} //SequencesFactoryImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java deleted file mode 100644 index c29eae934d..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsImpl.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import com.example.sequences.TwoRCs; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import commonj.sdo.helper.TypeHelper; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.BasicSequence; - -/** - * - * An implementation of the model object 'Two RCs'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getGroup Group}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getA A}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getB B}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getSplit Split}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getGroup1 Group1}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getY Y}
      • - *
      • {@link com.example.sequences.impl.TwoRCsImpl#getZ Z}
      • - *
      - *

      - * - * @generated - */ -public class TwoRCsImpl extends DataObjectBase implements TwoRCs -{ - /** - * The feature id for the 'Group' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP = 0; - - /** - * The cached value of the '{@link #getGroup() Group}' attribute list. - * - * - * @see #getGroup() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence group = null; - - /** - * The feature id for the 'A' attribute list. - * - * - * @generated - * @ordered - */ - public final static int A = 1; - - /** - * The feature id for the 'B' attribute list. - * - * - * @generated - * @ordered - */ - public final static int B = 2; - - /** - * The feature id for the 'Split' attribute. - * - * - * @generated - * @ordered - */ - public final static int SPLIT = 3; - - /** - * The default value of the '{@link #getSplit() Split}' attribute. - * - * - * @see #getSplit() - * @generated - * @ordered - */ - protected static final String SPLIT_DEFAULT_ = null; - - /** - * The cached value of the '{@link #getSplit() Split}' attribute. - * - * - * @see #getSplit() - * @generated - * @ordered - */ - protected String split = SPLIT_DEFAULT_; - - /** - * The feature id for the 'Group1' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP1 = 4; - - /** - * The cached value of the '{@link #getGroup1() Group1}' attribute list. - * - * - * @see #getGroup1() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence group1 = null; - - /** - * The feature id for the 'Y' attribute list. - * - * - * @generated - * @ordered - */ - public final static int Y = 5; - - /** - * The feature id for the 'Z' attribute list. - * - * - * @generated - * @ordered - */ - public final static int Z = 6; - - /** - * - * - * @generated - */ - protected TwoRCsImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public Type getType() - { - return TypeHelper.INSTANCE.getType(TwoRCs.class); //TBD Generate a more efficient implementation - } - - /** - * - * - * @generated - */ - public Sequence getGroup() - { - if (group == null) - { - group = createSequence(GROUP); - - } - return group; - } - - /** - * - * - * @generated - */ - public List getA() - { - return getList(getGroup(), getType(), A); - - } - - /** - * - * - * @generated - */ - public List getB() - { - return getList(getGroup(), getType(), B); - - } - - /** - * - * - * @generated - */ - public String getSplit() - { - return split; - } - - /** - * - * - * @generated - */ - public void setSplit(String newSplit) - { - String oldSplit = split; - split = newSplit; - if (isNotifying()) - notify(ChangeKind.SET, SPLIT, oldSplit, split); - } - - /** - * - * - * @generated - */ - public Sequence getGroup1() - { - if (group1 == null) - { - group1 = createSequence(GROUP1); - - } - return group1; - } - - /** - * - * - * @generated - */ - public List getY() - { - return getList(getGroup1(), getType(), Y); - - } - - /** - * - * - * @generated - */ - public List getZ() - { - return getList(getGroup1(), getType(), Z); - - } - - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case GROUP: - return removeFromSequence(getGroup(), otherEnd, changeContext); - case GROUP1: - return removeFromSequence(getGroup1(), otherEnd, changeContext); - } - return super.inverseRemove(otherEnd, propertyIndex, changeContext); - } - - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case GROUP: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup(); - case A: - return getA(); - case B: - return getB(); - case SPLIT: - return getSplit(); - case GROUP1: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup1(); - case Y: - return getY(); - case Z: - return getZ(); - } - return super.get(propertyIndex, resolve); - } - - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case GROUP: - setSequence(getGroup(), newValue); - return; - case A: - getA().clear(); - getA().addAll((Collection)newValue); - return; - case B: - getB().clear(); - getB().addAll((Collection)newValue); - return; - case SPLIT: - setSplit((String)newValue); - return; - case GROUP1: - setSequence(getGroup1(), newValue); - return; - case Y: - getY().clear(); - getY().addAll((Collection)newValue); - return; - case Z: - getZ().clear(); - getZ().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case GROUP: - unsetSequence(getGroup()); - return; - case A: - getA().clear(); - return; - case B: - getB().clear(); - return; - case SPLIT: - setSplit(SPLIT_DEFAULT_); - return; - case GROUP1: - unsetSequence(getGroup1()); - return; - case Y: - getY().clear(); - return; - case Z: - getZ().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case GROUP: - // KDK - should this be !isSequenceEmpty? - return group != null && !isSequenceEmpty(getGroup()); - case A: - return !getA().isEmpty(); - case B: - return !getB().isEmpty(); - case SPLIT: - return SPLIT_DEFAULT_ == null ? split != null : !SPLIT_DEFAULT_.equals(split); - case GROUP1: - // KDK - should this be !isSequenceEmpty? - return group1 != null && !isSequenceEmpty(getGroup1()); - case Y: - return !getY().isEmpty(); - case Z: - return !getZ().isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (group: "); - result.append(group); - result.append(", split: "); - result.append(split); - result.append(", group1: "); - result.append(group1); - result.append(')'); - return result.toString(); - } - -} //TwoRCsImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java deleted file mode 100644 index a8c3186088..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/sequences/impl/TwoRCsMixedImpl.java +++ /dev/null @@ -1,447 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation - * - * 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 com.example.sequences.impl; - -import com.example.sequences.TwoRCsMixed; - -import commonj.sdo.Sequence; -import commonj.sdo.Type; - -import commonj.sdo.helper.TypeHelper; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectBase; - -import org.apache.tuscany.sdo.util.BasicSequence; - -/** - * - * An implementation of the model object 'Two RCs Mixed'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getMixed Mixed}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup Group}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getA A}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getB B}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getSplit Split}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getGroup1 Group1}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getY Y}
      • - *
      • {@link com.example.sequences.impl.TwoRCsMixedImpl#getZ Z}
      • - *
      - *

      - * - * @generated - */ -public class TwoRCsMixedImpl extends DataObjectBase implements TwoRCsMixed -{ - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public final static int MIXED = 0; - - /** - * The cached value of the '{@link #getMixed() Mixed}' attribute list. - * - * - * @see #getMixed() - * @generated - * @ordered - */ - - // How to get BasicSequence from Sequence? - - protected BasicSequence mixed = null; - - /** - * The feature id for the 'Group' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP = 1; - - /** - * The feature id for the 'A' attribute list. - * - * - * @generated - * @ordered - */ - public final static int A = 2; - - /** - * The feature id for the 'B' attribute list. - * - * - * @generated - * @ordered - */ - public final static int B = 3; - - /** - * The feature id for the 'Split' attribute. - * - * - * @generated - * @ordered - */ - public final static int SPLIT = 4; - - /** - * The default value of the '{@link #getSplit() Split}' attribute. - * - * - * @see #getSplit() - * @generated - * @ordered - */ - protected static final String SPLIT_DEFAULT_ = null; - - /** - * The feature id for the 'Group1' attribute list. - * - * - * @generated - * @ordered - */ - public final static int GROUP1 = 5; - - /** - * The feature id for the 'Y' attribute list. - * - * - * @generated - * @ordered - */ - public final static int Y = 6; - - /** - * The feature id for the 'Z' attribute list. - * - * - * @generated - * @ordered - */ - public final static int Z = 7; - - /** - * - * - * @generated - */ - protected TwoRCsMixedImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public Type getType() - { - return TypeHelper.INSTANCE.getType(TwoRCsMixed.class); //TBD Generate a more efficient implementation - } - - /** - * - * - * @generated - */ - public Sequence getMixed() - { - if (mixed == null) - { - mixed = createSequence(MIXED); - - } - return mixed; - } - - /** - * - * - * @generated - */ - public Sequence getGroup() - { - return createSequence(getMixed(), getType(), GROUP); - } - - /** - * - * - * @generated - */ - public List getA() - { - return getList(getGroup(), getType(), A); - - } - - /** - * - * - * @generated - */ - public List getB() - { - return getList(getGroup(), getType(), B); - - } - - /** - * - * - * @generated - */ - public String getSplit() - { - return (String)get(getMixed(), getType(), SPLIT); - } - - /** - * - * - * @generated - */ - public void setSplit(String newSplit) - { - set(getMixed(), getType(), SPLIT, newSplit); - } - - /** - * - * - * @generated - */ - public Sequence getGroup1() - { - return createSequence(getMixed(), getType(), GROUP1); - } - - /** - * - * - * @generated - */ - public List getY() - { - return getList(getGroup1(), getType(), Y); - - } - - /** - * - * - * @generated - */ - public List getZ() - { - return getList(getGroup1(), getType(), Z); - - } - - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(Object otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { - case MIXED: - return removeFromSequence(getMixed(), otherEnd, changeContext); - case GROUP: - return removeFromSequence(getGroup(), otherEnd, changeContext); - case GROUP1: - return removeFromSequence(getGroup1(), otherEnd, changeContext); - } - return super.inverseRemove(otherEnd, propertyIndex, changeContext); - } - - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { - case MIXED: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getMixed(); - case GROUP: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup(); - case A: - return getA(); - case B: - return getB(); - case SPLIT: - return getSplit(); - case GROUP1: - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return getGroup1(); - case Y: - return getY(); - case Z: - return getZ(); - } - return super.get(propertyIndex, resolve); - } - - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { - case MIXED: - setSequence(getMixed(), newValue); - return; - case GROUP: - setSequence(getGroup(), newValue); - return; - case A: - getA().clear(); - getA().addAll((Collection)newValue); - return; - case B: - getB().clear(); - getB().addAll((Collection)newValue); - return; - case SPLIT: - setSplit((String)newValue); - return; - case GROUP1: - setSequence(getGroup1(), newValue); - return; - case Y: - getY().clear(); - getY().addAll((Collection)newValue); - return; - case Z: - getZ().clear(); - getZ().addAll((Collection)newValue); - return; - } - super.set(propertyIndex, newValue); - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - unsetSequence(getMixed()); - return; - case GROUP: - unsetSequence(getGroup()); - return; - case A: - getA().clear(); - return; - case B: - getB().clear(); - return; - case SPLIT: - setSplit(SPLIT_DEFAULT_); - return; - case GROUP1: - unsetSequence(getGroup1()); - return; - case Y: - getY().clear(); - return; - case Z: - getZ().clear(); - return; - } - super.unset(propertyIndex); - } - - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { - case MIXED: - // KDK - should this be !isSequenceEmpty? - return mixed != null && !isSequenceEmpty(getMixed()); - case GROUP: - return !isSequenceEmpty(getGroup()); - case A: - return !getA().isEmpty(); - case B: - return !getB().isEmpty(); - case SPLIT: - return SPLIT_DEFAULT_ == null ? getSplit() != null : !SPLIT_DEFAULT_.equals(getSplit()); - case GROUP1: - return !isSequenceEmpty(getGroup1()); - case Y: - return !getY().isEmpty(); - case Z: - return !getZ().isEmpty(); - } - return super.isSet(propertyIndex); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mixed: "); - result.append(mixed); - result.append(')'); - return result.toString(); - } - -} //TwoRCsMixedImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/Quote.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/Quote.java deleted file mode 100644 index 57b12ef331..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/Quote.java +++ /dev/null @@ -1,307 +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 com.example.simple; - -import java.math.BigDecimal; - -import java.util.List; - -/** - * - * A representation of the model object 'Quote'. - * - * - *

      - * The following features are supported: - *

        - *
      • {@link com.example.simple.Quote#getSymbol Symbol}
      • - *
      • {@link com.example.simple.Quote#getCompanyName Company Name}
      • - *
      • {@link com.example.simple.Quote#getPrice Price}
      • - *
      • {@link com.example.simple.Quote#getOpen1 Open1}
      • - *
      • {@link com.example.simple.Quote#getHigh High}
      • - *
      • {@link com.example.simple.Quote#getLow Low}
      • - *
      • {@link com.example.simple.Quote#getVolume Volume}
      • - *
      • {@link com.example.simple.Quote#getChange1 Change1}
      • - *
      • {@link com.example.simple.Quote#getQuotes Quotes}
      • - *
      - *

      - * - * @generated - */ -public interface Quote -{ - /** - * 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 #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 #getSymbol() - * @generated - */ - void setSymbol(String value); - - /** - * 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 #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 #getCompanyName() - * @generated - */ - void setCompanyName(String value); - - /** - * 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 #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 #getPrice() - * @generated - */ - void setPrice(BigDecimal value); - - /** - * 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 #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 #getOpen1() - * @generated - */ - void setOpen1(BigDecimal value); - - /** - * 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 #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 #getHigh() - * @generated - */ - void setHigh(BigDecimal value); - - /** - * 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 #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 #getLow() - * @generated - */ - void setLow(BigDecimal value); - - /** - * 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/java-post-M1/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java deleted file mode 100644 index 9203976521..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/SimpleFactory.java +++ /dev/null @@ -1,46 +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 com.example.simple; - - -/** - * - * 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.eINSTANCE; - - /** - * Returns a new object of class 'Quote'. - * - * - * @return a new object of class 'Quote'. - * @generated - */ - Quote createQuote(); - -} //SimpleFactory diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java deleted file mode 100644 index 5b407dd311..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/QuoteImpl.java +++ /dev/null @@ -1,712 +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 com.example.simple.impl; - -import com.example.simple.Quote; - -import java.math.BigDecimal; - -import java.util.Collection; -import java.util.List; - -import org.apache.tuscany.sdo.impl.DataObjectImpl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -/** - * - * An implementation of the model object 'Quote'. - * - *

      - * The following features are implemented: - *

        - *
      • {@link com.example.simple.impl.QuoteImpl#getSymbol Symbol}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getCompanyName Company Name}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getPrice Price}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getOpen1 Open1}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getHigh High}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getLow Low}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getVolume Volume}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getChange1 Change1}
      • - *
      • {@link com.example.simple.impl.QuoteImpl#getQuotes Quotes}
      • - *
      - *

      - * - * @generated - */ -public class QuoteImpl extends DataObjectImpl implements Quote -{ - /** - * The default value of the '{@link #getSymbol() Symbol}' attribute. - * - * - * @see #getSymbol() - * @generated - * @ordered - */ - protected static final String SYMBOL_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSymbol() Symbol}' attribute. - * - * - * @see #getSymbol() - * @generated - * @ordered - */ - protected String symbol = SYMBOL_EDEFAULT; - - /** - * The default value of the '{@link #getCompanyName() Company Name}' attribute. - * - * - * @see #getCompanyName() - * @generated - * @ordered - */ - protected static final String COMPANY_NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCompanyName() Company Name}' attribute. - * - * - * @see #getCompanyName() - * @generated - * @ordered - */ - protected String companyName = COMPANY_NAME_EDEFAULT; - - /** - * The default value of the '{@link #getPrice() Price}' attribute. - * - * - * @see #getPrice() - * @generated - * @ordered - */ - protected static final BigDecimal PRICE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPrice() Price}' attribute. - * - * - * @see #getPrice() - * @generated - * @ordered - */ - protected BigDecimal price = PRICE_EDEFAULT; - - /** - * The default value of the '{@link #getOpen1() Open1}' attribute. - * - * - * @see #getOpen1() - * @generated - * @ordered - */ - protected static final BigDecimal OPEN1_EDEFAULT = null; - - /** - * The cached value of the '{@link #getOpen1() Open1}' attribute. - * - * - * @see #getOpen1() - * @generated - * @ordered - */ - protected BigDecimal open1 = OPEN1_EDEFAULT; - - /** - * The default value of the '{@link #getHigh() High}' attribute. - * - * - * @see #getHigh() - * @generated - * @ordered - */ - protected static final BigDecimal HIGH_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHigh() High}' attribute. - * - * - * @see #getHigh() - * @generated - * @ordered - */ - protected BigDecimal high = HIGH_EDEFAULT; - - /** - * The default value of the '{@link #getLow() Low}' attribute. - * - * - * @see #getLow() - * @generated - * @ordered - */ - protected static final BigDecimal LOW_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLow() Low}' attribute. - * - * - * @see #getLow() - * @generated - * @ordered - */ - protected BigDecimal low = LOW_EDEFAULT; - - /** - * The default value of the '{@link #getVolume() Volume}' attribute. - * - * - * @see #getVolume() - * @generated - * @ordered - */ - protected static final double VOLUME_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getVolume() Volume}' attribute. - * - * - * @see #getVolume() - * @generated - * @ordered - */ - protected double volume = VOLUME_EDEFAULT; - - /** - * This is true if the Volume attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean volumeESet = false; - - /** - * The default value of the '{@link #getChange1() Change1}' attribute. - * - * - * @see #getChange1() - * @generated - * @ordered - */ - protected static final double CHANGE1_EDEFAULT = 0.0; - - /** - * The cached value of the '{@link #getChange1() Change1}' attribute. - * - * - * @see #getChange1() - * @generated - * @ordered - */ - protected double change1 = CHANGE1_EDEFAULT; - - /** - * This is true if the Change1 attribute has been set. - * - * - * @generated - * @ordered - */ - protected boolean change1ESet = false; - - /** - * The cached value of the '{@link #getQuotes() Quotes}' containment reference list. - * - * - * @see #getQuotes() - * @generated - * @ordered - */ - protected EList quotes = null; - - /** - * - * - * @generated - */ - protected QuoteImpl() - { - super(); - } - - /** - * - * - * @generated - */ - protected EClass eStaticClass() - { - return SimplePackageImpl.Literals.QUOTE; - } - - /** - * - * - * @generated - */ - public String getSymbol() - { - return symbol; - } - - /** - * - * - * @generated - */ - public void setSymbol(String newSymbol) - { - String oldSymbol = symbol; - symbol = newSymbol; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__SYMBOL, oldSymbol, symbol)); - } - - /** - * - * - * @generated - */ - public String getCompanyName() - { - return companyName; - } - - /** - * - * - * @generated - */ - public void setCompanyName(String newCompanyName) - { - String oldCompanyName = companyName; - companyName = newCompanyName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__COMPANY_NAME, oldCompanyName, companyName)); - } - - /** - * - * - * @generated - */ - public BigDecimal getPrice() - { - return price; - } - - /** - * - * - * @generated - */ - public void setPrice(BigDecimal newPrice) - { - BigDecimal oldPrice = price; - price = newPrice; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__PRICE, oldPrice, price)); - } - - /** - * - * - * @generated - */ - public BigDecimal getOpen1() - { - return open1; - } - - /** - * - * - * @generated - */ - public void setOpen1(BigDecimal newOpen1) - { - BigDecimal oldOpen1 = open1; - open1 = newOpen1; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__OPEN1, oldOpen1, open1)); - } - - /** - * - * - * @generated - */ - public BigDecimal getHigh() - { - return high; - } - - /** - * - * - * @generated - */ - public void setHigh(BigDecimal newHigh) - { - BigDecimal oldHigh = high; - high = newHigh; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__HIGH, oldHigh, high)); - } - - /** - * - * - * @generated - */ - public BigDecimal getLow() - { - return low; - } - - /** - * - * - * @generated - */ - public void setLow(BigDecimal newLow) - { - BigDecimal oldLow = low; - low = newLow; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__LOW, oldLow, low)); - } - - /** - * - * - * @generated - */ - public double getVolume() - { - return volume; - } - - /** - * - * - * @generated - */ - public void setVolume(double newVolume) - { - double oldVolume = volume; - volume = newVolume; - boolean oldVolumeESet = volumeESet; - volumeESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__VOLUME, oldVolume, volume, !oldVolumeESet)); - } - - /** - * - * - * @generated - */ - public void unsetVolume() - { - double oldVolume = volume; - boolean oldVolumeESet = volumeESet; - volume = VOLUME_EDEFAULT; - volumeESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, SimplePackageImpl.QUOTE__VOLUME, oldVolume, VOLUME_EDEFAULT, oldVolumeESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetVolume() - { - return volumeESet; - } - - /** - * - * - * @generated - */ - public double getChange1() - { - return change1; - } - - /** - * - * - * @generated - */ - public void setChange1(double newChange1) - { - double oldChange1 = change1; - change1 = newChange1; - boolean oldChange1ESet = change1ESet; - change1ESet = true; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplePackageImpl.QUOTE__CHANGE1, oldChange1, change1, !oldChange1ESet)); - } - - /** - * - * - * @generated - */ - public void unsetChange1() - { - double oldChange1 = change1; - boolean oldChange1ESet = change1ESet; - change1 = CHANGE1_EDEFAULT; - change1ESet = false; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.UNSET, SimplePackageImpl.QUOTE__CHANGE1, oldChange1, CHANGE1_EDEFAULT, oldChange1ESet)); - } - - /** - * - * - * @generated - */ - public boolean isSetChange1() - { - return change1ESet; - } - - /** - * - * - * @generated - */ - public List getQuotes() - { - if (quotes == null) - { - quotes = new EObjectContainmentEList(Quote.class, this, SimplePackageImpl.QUOTE__QUOTES); - } - return quotes; - } - - /** - * - * - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case SimplePackageImpl.QUOTE__QUOTES: - return ((InternalEList)getQuotes()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case SimplePackageImpl.QUOTE__SYMBOL: - return getSymbol(); - case SimplePackageImpl.QUOTE__COMPANY_NAME: - return getCompanyName(); - case SimplePackageImpl.QUOTE__PRICE: - return getPrice(); - case SimplePackageImpl.QUOTE__OPEN1: - return getOpen1(); - case SimplePackageImpl.QUOTE__HIGH: - return getHigh(); - case SimplePackageImpl.QUOTE__LOW: - return getLow(); - case SimplePackageImpl.QUOTE__VOLUME: - return new Double(getVolume()); - case SimplePackageImpl.QUOTE__CHANGE1: - return new Double(getChange1()); - case SimplePackageImpl.QUOTE__QUOTES: - return getQuotes(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case SimplePackageImpl.QUOTE__SYMBOL: - setSymbol((String)newValue); - return; - case SimplePackageImpl.QUOTE__COMPANY_NAME: - setCompanyName((String)newValue); - return; - case SimplePackageImpl.QUOTE__PRICE: - setPrice((BigDecimal)newValue); - return; - case SimplePackageImpl.QUOTE__OPEN1: - setOpen1((BigDecimal)newValue); - return; - case SimplePackageImpl.QUOTE__HIGH: - setHigh((BigDecimal)newValue); - return; - case SimplePackageImpl.QUOTE__LOW: - setLow((BigDecimal)newValue); - return; - case SimplePackageImpl.QUOTE__VOLUME: - setVolume(((Double)newValue).doubleValue()); - return; - case SimplePackageImpl.QUOTE__CHANGE1: - setChange1(((Double)newValue).doubleValue()); - return; - case SimplePackageImpl.QUOTE__QUOTES: - getQuotes().clear(); - getQuotes().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - public void eUnset(int featureID) - { - switch (featureID) - { - case SimplePackageImpl.QUOTE__SYMBOL: - setSymbol(SYMBOL_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__COMPANY_NAME: - setCompanyName(COMPANY_NAME_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__PRICE: - setPrice(PRICE_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__OPEN1: - setOpen1(OPEN1_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__HIGH: - setHigh(HIGH_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__LOW: - setLow(LOW_EDEFAULT); - return; - case SimplePackageImpl.QUOTE__VOLUME: - unsetVolume(); - return; - case SimplePackageImpl.QUOTE__CHANGE1: - unsetChange1(); - return; - case SimplePackageImpl.QUOTE__QUOTES: - getQuotes().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case SimplePackageImpl.QUOTE__SYMBOL: - return SYMBOL_EDEFAULT == null ? symbol != null : !SYMBOL_EDEFAULT.equals(symbol); - case SimplePackageImpl.QUOTE__COMPANY_NAME: - return COMPANY_NAME_EDEFAULT == null ? companyName != null : !COMPANY_NAME_EDEFAULT.equals(companyName); - case SimplePackageImpl.QUOTE__PRICE: - return PRICE_EDEFAULT == null ? price != null : !PRICE_EDEFAULT.equals(price); - case SimplePackageImpl.QUOTE__OPEN1: - return OPEN1_EDEFAULT == null ? open1 != null : !OPEN1_EDEFAULT.equals(open1); - case SimplePackageImpl.QUOTE__HIGH: - return HIGH_EDEFAULT == null ? high != null : !HIGH_EDEFAULT.equals(high); - case SimplePackageImpl.QUOTE__LOW: - return LOW_EDEFAULT == null ? low != null : !LOW_EDEFAULT.equals(low); - case SimplePackageImpl.QUOTE__VOLUME: - return isSetVolume(); - case SimplePackageImpl.QUOTE__CHANGE1: - return isSetChange1(); - case SimplePackageImpl.QUOTE__QUOTES: - return quotes != null && !quotes.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - public String toString() - { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (symbol: "); - result.append(symbol); - result.append(", companyName: "); - result.append(companyName); - result.append(", price: "); - result.append(price); - result.append(", open1: "); - result.append(open1); - result.append(", high: "); - result.append(high); - result.append(", low: "); - result.append(low); - result.append(", volume: "); - if (volumeESet) result.append(volume); else result.append(""); - result.append(", change1: "); - if (change1ESet) result.append(change1); else result.append(""); - result.append(')'); - return result.toString(); - } - -} //QuoteImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java deleted file mode 100644 index 06b0e3891e..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimpleFactoryImpl.java +++ /dev/null @@ -1,138 +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 com.example.simple.impl; - -import com.example.simple.*; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class SimpleFactoryImpl extends EFactoryImpl implements SimpleFactory -{ - /** - * The singleton instance of the factory. - * - * - * @generated - */ - public static final SimpleFactoryImpl eINSTANCE = init(); - - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static SimpleFactoryImpl init() - { - try - { - SimpleFactoryImpl theSimpleFactory = (SimpleFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("http://www.example.com/simple"); - if (theSimpleFactory != null) - { - return theSimpleFactory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new SimpleFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public SimpleFactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case SimplePackageImpl.DOCUMENT_ROOT: return (EObject)createDocumentRoot(); - case SimplePackageImpl.QUOTE: return (EObject)createQuote(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public EObject createDocumentRoot() - { - EObject documentRoot = super.create(SimplePackageImpl.Literals.DOCUMENT_ROOT); - return documentRoot; - } - - /** - * - * - * @generated - */ - public Quote createQuote() - { - QuoteImpl quote = new QuoteImpl(); - return quote; - } - - /** - * - * - * @generated - */ - public SimplePackageImpl getSimplePackageImpl() - { - return (SimplePackageImpl)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - public static SimplePackageImpl getPackage() - { - return SimplePackageImpl.eINSTANCE; - } - -} //SimpleFactoryImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimplePackageImpl.java b/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimplePackageImpl.java deleted file mode 100644 index e8fe40c24d..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/com/example/simple/impl/SimplePackageImpl.java +++ /dev/null @@ -1,908 +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 com.example.simple.impl; - -import com.example.simple.Quote; -import com.example.simple.SimpleFactory; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EFactory; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import org.eclipse.emf.ecore.xml.type.XMLTypePackage; - -/** - * - * 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 com.example.simple.SimpleFactory - * @generated - */ -public class SimplePackageImpl extends EPackageImpl -{ - /** - * The package name. - * - * - * @generated - */ - public static final String eNAME = "simple"; - - /** - * The package namespace URI. - * - * - * @generated - */ - public static final String eNS_URI = "http://www.example.com/simple"; - - /** - * The package namespace name. - * - * - * @generated - */ - public static final String eNS_PREFIX = "simple"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - public static final SimplePackageImpl eINSTANCE = com.example.simple.impl.SimplePackageImpl.init(); - - /** - * The meta object id for the '{@link com.example.simple.impl.DocumentRootImpl Document Root}' class. - * - * - * @see com.example.simple.impl.DocumentRootImpl - * @see com.example.simple.impl.SimplePackageImpl#getDocumentRoot() - * @generated - */ - public static final int DOCUMENT_ROOT = 0; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__MIXED = 0; - - /** - * The feature id for the 'XMLNS Prefix Map' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; - - /** - * The feature id for the 'XSI Schema Location' map. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; - - /** - * The feature id for the 'Stock Quote' containment reference. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT__STOCK_QUOTE = 3; - - /** - * The number of structural features of the 'Document Root' class. - * - * - * @generated - * @ordered - */ - public static final int DOCUMENT_ROOT_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link com.example.simple.impl.QuoteImpl Quote}' class. - * - * - * @see com.example.simple.impl.QuoteImpl - * @see com.example.simple.impl.SimplePackageImpl#getQuote() - * @generated - */ - public static final int QUOTE = 1; - - /** - * The feature id for the 'Symbol' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__SYMBOL = 0; - - /** - * The feature id for the 'Company Name' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__COMPANY_NAME = 1; - - /** - * The feature id for the 'Price' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__PRICE = 2; - - /** - * The feature id for the 'Open1' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__OPEN1 = 3; - - /** - * The feature id for the 'High' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__HIGH = 4; - - /** - * The feature id for the 'Low' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__LOW = 5; - - /** - * The feature id for the 'Volume' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__VOLUME = 6; - - /** - * The feature id for the 'Change1' attribute. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__CHANGE1 = 7; - - /** - * The feature id for the 'Quotes' containment reference list. - * - * - * @generated - * @ordered - */ - public static final int QUOTE__QUOTES = 8; - - /** - * The number of structural features of the 'Quote' class. - * - * - * @generated - * @ordered - */ - public static final int QUOTE_FEATURE_COUNT = 9; - - /** - * - * - * @generated - */ - private EClass documentRootEClass = null; - - /** - * - * - * @generated - */ - private EClass quoteEClass = 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 com.example.simple.impl.SimplePackageImpl#eNS_URI - * @see #init() - * @generated - */ - private SimplePackageImpl() - { - super(eNS_URI, ((EFactory)SimpleFactory.INSTANCE)); - } - - /** - * - * - * @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. - *

      Invocation of this method will not affect any packages that have - * already been initialized. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SimplePackageImpl init() - { - if (isInited) return (SimplePackageImpl)EPackage.Registry.INSTANCE.getEPackage(SimplePackageImpl.eNS_URI); - - // Obtain or create and register package - SimplePackageImpl theSimplePackageImpl = (SimplePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SimplePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SimplePackageImpl()); - - isInited = true; - - // Initialize simple dependencies - XMLTypePackage.eINSTANCE.eClass(); - - // Create package meta-data objects - theSimplePackageImpl.createPackageContents(); - - // Initialize created meta-data - theSimplePackageImpl.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSimplePackageImpl.freeze(); - - return theSimplePackageImpl; - } - - - /** - * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. - * - * - * @return the meta object for class 'Document Root'. - * @see org.eclipse.emf.ecore.EObject - * @generated - */ - public EClass getDocumentRoot() - { - return documentRootEClass; - } - - /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. - * - * - * @return the meta object for the attribute list 'Mixed'. - * @see org.eclipse.emf.ecore.EObject#getMixed() - * @see #getDocumentRoot() - * @generated - */ - public EAttribute getDocumentRoot_Mixed() - { - return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. - * - * - * @return the meta object for the map 'XMLNS Prefix Map'. - * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XMLNSPrefixMap() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. - * - * - * @return the meta object for the map 'XSI Schema Location'. - * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_XSISchemaLocation() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getStockQuote Stock Quote}'. - * - * - * @return the meta object for the containment reference 'Stock Quote'. - * @see org.eclipse.emf.ecore.EObject#getStockQuote() - * @see #getDocumentRoot() - * @generated - */ - public EReference getDocumentRoot_StockQuote() - { - return (EReference)documentRootEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for class '{@link com.example.simple.Quote Quote}'. - * - * - * @return the meta object for class 'Quote'. - * @see com.example.simple.Quote - * @generated - */ - public EClass getQuote() - { - return quoteEClass; - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getSymbol Symbol}'. - * - * - * @return the meta object for the attribute 'Symbol'. - * @see com.example.simple.Quote#getSymbol() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Symbol() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(0); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getCompanyName Company Name}'. - * - * - * @return the meta object for the attribute 'Company Name'. - * @see com.example.simple.Quote#getCompanyName() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_CompanyName() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(1); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getPrice Price}'. - * - * - * @return the meta object for the attribute 'Price'. - * @see com.example.simple.Quote#getPrice() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Price() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(2); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getOpen1 Open1}'. - * - * - * @return the meta object for the attribute 'Open1'. - * @see com.example.simple.Quote#getOpen1() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Open1() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(3); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getHigh High}'. - * - * - * @return the meta object for the attribute 'High'. - * @see com.example.simple.Quote#getHigh() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_High() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(4); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getLow Low}'. - * - * - * @return the meta object for the attribute 'Low'. - * @see com.example.simple.Quote#getLow() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Low() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(5); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getVolume Volume}'. - * - * - * @return the meta object for the attribute 'Volume'. - * @see com.example.simple.Quote#getVolume() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Volume() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(6); - } - - /** - * Returns the meta object for the attribute '{@link com.example.simple.Quote#getChange1 Change1}'. - * - * - * @return the meta object for the attribute 'Change1'. - * @see com.example.simple.Quote#getChange1() - * @see #getQuote() - * @generated - */ - public EAttribute getQuote_Change1() - { - return (EAttribute)quoteEClass.getEStructuralFeatures().get(7); - } - - /** - * Returns the meta object for the containment reference list '{@link com.example.simple.Quote#getQuotes Quotes}'. - * - * - * @return the meta object for the containment reference list 'Quotes'. - * @see com.example.simple.Quote#getQuotes() - * @see #getQuote() - * @generated - */ - public EReference getQuote_Quotes() - { - return (EReference)quoteEClass.getEStructuralFeatures().get(8); - } - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - public SimpleFactory getSimpleFactory() - { - return (SimpleFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - documentRootEClass = createEClass(DOCUMENT_ROOT); - createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); - createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - createEReference(documentRootEClass, DOCUMENT_ROOT__STOCK_QUOTE); - - quoteEClass = createEClass(QUOTE); - createEAttribute(quoteEClass, QUOTE__SYMBOL); - createEAttribute(quoteEClass, QUOTE__COMPANY_NAME); - createEAttribute(quoteEClass, QUOTE__PRICE); - createEAttribute(quoteEClass, QUOTE__OPEN1); - createEAttribute(quoteEClass, QUOTE__HIGH); - createEAttribute(quoteEClass, QUOTE__LOW); - createEAttribute(quoteEClass, QUOTE__VOLUME); - createEAttribute(quoteEClass, QUOTE__CHANGE1); - createEReference(quoteEClass, QUOTE__QUOTES); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - - // Add supertypes to classes - - // Initialize classes and features; add operations and parameters - initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getDocumentRoot_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(getDocumentRoot_XMLNSPrefixMap(), 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(getDocumentRoot_XSISchemaLocation(), 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); - initEReference(getDocumentRoot_StockQuote(), this.getQuote(), null, "stockQuote", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - - initEClass(quoteEClass, Quote.class, "Quote", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getQuote_Symbol(), theXMLTypePackage.getString(), "symbol", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_CompanyName(), theXMLTypePackage.getString(), "companyName", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_Price(), theXMLTypePackage.getDecimal(), "price", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_Open1(), theXMLTypePackage.getDecimal(), "open1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_High(), theXMLTypePackage.getDecimal(), "high", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_Low(), theXMLTypePackage.getDecimal(), "low", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_Volume(), theXMLTypePackage.getDouble(), "volume", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getQuote_Change1(), theXMLTypePackage.getDouble(), "change1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getQuote_Quotes(), this.getQuote(), null, "quotes", null, 0, -1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() - { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (documentRootEClass, - source, - new String[] - { - "name", "", - "kind", "mixed" - }); - addAnnotation - (getDocumentRoot_Mixed(), - source, - new String[] - { - "kind", "elementWildcard", - "name", ":mixed" - }); - addAnnotation - (getDocumentRoot_XMLNSPrefixMap(), - source, - new String[] - { - "kind", "attribute", - "name", "xmlns:prefix" - }); - addAnnotation - (getDocumentRoot_XSISchemaLocation(), - source, - new String[] - { - "kind", "attribute", - "name", "xsi:schemaLocation" - }); - addAnnotation - (getDocumentRoot_StockQuote(), - source, - new String[] - { - "kind", "element", - "name", "stockQuote", - "namespace", "##targetNamespace" - }); - addAnnotation - (quoteEClass, - source, - new String[] - { - "name", "Quote", - "kind", "elementOnly" - }); - addAnnotation - (getQuote_Symbol(), - source, - new String[] - { - "kind", "element", - "name", "symbol" - }); - addAnnotation - (getQuote_CompanyName(), - source, - new String[] - { - "kind", "element", - "name", "companyName" - }); - addAnnotation - (getQuote_Price(), - source, - new String[] - { - "kind", "element", - "name", "price" - }); - addAnnotation - (getQuote_Open1(), - source, - new String[] - { - "kind", "element", - "name", "open1" - }); - addAnnotation - (getQuote_High(), - source, - new String[] - { - "kind", "element", - "name", "high" - }); - addAnnotation - (getQuote_Low(), - source, - new String[] - { - "kind", "element", - "name", "low" - }); - addAnnotation - (getQuote_Volume(), - source, - new String[] - { - "kind", "element", - "name", "volume" - }); - addAnnotation - (getQuote_Change1(), - source, - new String[] - { - "kind", "element", - "name", "change1" - }); - addAnnotation - (getQuote_Quotes(), - source, - new String[] - { - "kind", "element", - "name", "quotes" - }); - } - - /** - * - * Defines literals for the meta objects that represent - *

        - *
      • each class,
      • - *
      • each feature of each class,
      • - *
      • each enum,
      • - *
      • and each data type
      • - *
      - * - * @generated - */ - public interface Literals - { - /** - * The meta object literal for the '{@link com.example.simple.impl.DocumentRootImpl Document Root}' class. - * - * - * @see com.example.simple.impl.DocumentRootImpl - * @see com.example.simple.impl.SimplePackageImpl#getDocumentRoot() - * @generated - */ - public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); - - /** - * The meta object literal for the 'Mixed' attribute list feature. - * - * - * @generated - */ - public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); - - /** - * The meta object literal for the 'XMLNS Prefix Map' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); - - /** - * The meta object literal for the 'XSI Schema Location' map feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); - - /** - * The meta object literal for the 'Stock Quote' containment reference feature. - * - * - * @generated - */ - public static final EReference DOCUMENT_ROOT__STOCK_QUOTE = eINSTANCE.getDocumentRoot_StockQuote(); - - /** - * The meta object literal for the '{@link com.example.simple.impl.QuoteImpl Quote}' class. - * - * - * @see com.example.simple.impl.QuoteImpl - * @see com.example.simple.impl.SimplePackageImpl#getQuote() - * @generated - */ - public static final EClass QUOTE = eINSTANCE.getQuote(); - - /** - * The meta object literal for the 'Symbol' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__SYMBOL = eINSTANCE.getQuote_Symbol(); - - /** - * The meta object literal for the 'Company Name' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__COMPANY_NAME = eINSTANCE.getQuote_CompanyName(); - - /** - * The meta object literal for the 'Price' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__PRICE = eINSTANCE.getQuote_Price(); - - /** - * The meta object literal for the 'Open1' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__OPEN1 = eINSTANCE.getQuote_Open1(); - - /** - * The meta object literal for the 'High' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__HIGH = eINSTANCE.getQuote_High(); - - /** - * The meta object literal for the 'Low' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__LOW = eINSTANCE.getQuote_Low(); - - /** - * The meta object literal for the 'Volume' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__VOLUME = eINSTANCE.getQuote_Volume(); - - /** - * The meta object literal for the 'Change1' attribute feature. - * - * - * @generated - */ - public static final EAttribute QUOTE__CHANGE1 = eINSTANCE.getQuote_Change1(); - - /** - * The meta object literal for the 'Quotes' containment reference list feature. - * - * - * @generated - */ - public static final EReference QUOTE__QUOTES = eINSTANCE.getQuote_Quotes(); - - } - -} //SimplePackageImpl diff --git a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java b/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java deleted file mode 100644 index 520cf707e7..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTest.java +++ /dev/null @@ -1,64 +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.math.BigDecimal; - -import org.apache.tuscany.sdo.util.SDOUtil; - -import com.example.simple.Quote; -import com.example.simple.SimpleFactory; -import commonj.sdo.DataObject; -import commonj.sdo.helper.XMLHelper; - - -public class SimpleStaticTest -{ - /** - * Simple Static SDO 2 test. - */ - public static void main(String[] args) - { - try - { - SDOUtil.registerStaticTypes(SimpleFactory.class); - - //Quote quote = (Quote)DataFactory.INSTANCE.create(Quote.class); - Quote quote = SimpleFactory.INSTANCE.createQuote(); - - quote.setSymbol("fbnt"); - quote.setCompanyName("FlyByNightTechnology"); - quote.setPrice(new BigDecimal("1000.0")); - quote.setOpen1(new BigDecimal("1000.0")); - quote.setHigh(new BigDecimal("1000.0")); - quote.setLow(new BigDecimal("1000.0")); - quote.setVolume(1000); - quote.setChange1(1000); - - //Quote child = (Quote)((DataObject)quote).createDataObject(8); - Quote child = SimpleFactory.INSTANCE.createQuote(); - quote.getQuotes().add(child); - child.setPrice(new BigDecimal("2000.0")); - - XMLHelper.INSTANCE.save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out); - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTest.java b/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTest.java deleted file mode 100644 index ef6544bdb8..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/StaticSequenceNoEmfTest.java +++ /dev/null @@ -1,249 +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.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.List; - -import junit.framework.TestCase; - -import org.apache.tuscany.sdo.util.SDOUtil; - -import com.example.sequences.MixedQuote; -import com.example.sequences.MixedRepeatingChoice; -import com.example.sequences.RepeatingChoice; -import com.example.sequences.SequencesFactory; -import com.example.sequences.TwoRCs; -import com.example.sequences.TwoRCsMixed; -import commonj.sdo.DataObject; -import commonj.sdo.Sequence; -import commonj.sdo.Type; -import commonj.sdo.helper.XMLHelper; - - -public class StaticSequenceNoEmfTest extends TestCase { - private final String TEST_NAMESPACE = "http://www.example.com/sequences"; - private final String MQ_TEST_DATA = "/mixedStaticTestResult.xml"; - private final String RC_TEST_DATA = "/repeatingChoiceTestResult.xml"; - private final String MRC_TEST_DATA = "/mixedRepeatingChoiceTestResult.xml"; - private final String RC2_TEST_DATA = "/twoRepeatingChoicesTestResult.xml"; - private final String RC2M_TEST_DATA = "/twoRepeatingChoicesMixedTestResult.xml"; - - /** - * Sequenced type SDO 2 test. - */ - public void testMixedQuoteType() throws IOException { - MixedQuote quote = SequencesFactory.INSTANCE.createMixedQuote(); - - Type t = ((DataObject)quote).getType(); - List ps = t.getProperties(); - - - Sequence sequence = quote.getMixed(); - - sequence.add("\n "); - - quote.setSymbol("fbnt"); - - sequence.add("\n "); - - quote.setCompanyName("FlyByNightTechnology"); - - sequence.add("\n some text\n "); - - List quotes = quote.getQuotes(); - MixedQuote child = SequencesFactory.INSTANCE.createMixedQuote(); - quotes.add(child); - - child.setPrice(new BigDecimal("2000.0")); - - sequence.add("\n more text\n "); - - sequence.add("price", new BigDecimal("1000.0")); - - sequence.add("\n"); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - XMLHelper.INSTANCE.save((DataObject)quote, TEST_NAMESPACE, "mixedStockQuote", baos); - assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MQ_TEST_DATA))); - } - - public void testRepeatingChoice() throws IOException - { - RepeatingChoice rc = SequencesFactory.INSTANCE.createRepeatingChoice(); - - List as = rc.getA(); - List bs = rc.getB(); - - bs.add(new Integer(1)); - as.add("foo"); - as.add("bar"); - bs.add(new Integer(2)); - - - - - Sequence group = rc.getGroup(); - assertEquals(group.size(), 4); - assertEquals(rc.getA().size(), 2); - assertEquals(rc.getB().size(),2); - - assertEquals(group.getValue(0), new Integer(1)); - assertEquals(group.getValue(1), "foo"); - assertEquals(group.getValue(2), "bar"); - assertEquals(group.getValue(3), new Integer(2)); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - XMLHelper.INSTANCE.save((DataObject)rc, TEST_NAMESPACE, "rc", baos); - assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC_TEST_DATA))); - } - - public void testMixedRepeatingChoice() throws Exception { - MixedRepeatingChoice mrc = SequencesFactory.INSTANCE.createMixedRepeatingChoice(); - - List as = mrc.getA(); - List bs = mrc.getB(); - - - bs.add(new Integer(1)); - as.add("foo"); - Sequence mixed = mrc.getMixed(); - mixed.add("some mixed text"); - as.add("bar"); - bs.add(new Integer(2)); - - // FIXME reintroduce check - // assertEquals(4, mrc.getGroup().size()); - assertEquals(5, mrc.getMixed().size()); - assertEquals(2, mrc.getA().size()); - assertEquals(2, mrc.getB().size(),2); - - - - assertEquals(mixed.getValue(0), new Integer(1)); - assertEquals(mixed.getValue(1), "foo"); - assertEquals(mixed.getValue(3), "bar"); - assertEquals(mixed.getValue(4), new Integer(2)); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - - XMLHelper.INSTANCE.save((DataObject)mrc, TEST_NAMESPACE, "mrc", baos); - assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(MRC_TEST_DATA))); - } - - public void test2RepeatingChoices() throws Exception { - TwoRCs rc2 = SequencesFactory.INSTANCE.createTwoRCs(); - - List as = rc2.getA(); - List bs = rc2.getB(); - List ys = rc2.getY(); - List zs = rc2.getZ(); - - zs.add(new Integer(99)); - bs.add(new Integer(1)); - ys.add("fred"); - as.add("foo"); - as.add("bar"); - bs.add(new Integer(2)); - rc2.setSplit("banana"); - - - Sequence group = rc2.getGroup(); - assertEquals(group.size(), 4); - assertEquals(rc2.getA().size(), 2); - assertEquals(rc2.getB().size(),2); - - Sequence group1 = rc2.getGroup1(); - assertEquals(group1.size(), 2); - assertEquals(rc2.getY().size(), 1); - assertEquals(rc2.getZ().size(),1); - - assertEquals(group.getValue(0), new Integer(1)); - assertEquals(group.getValue(1), "foo"); - assertEquals(group.getValue(2), "bar"); - assertEquals(group.getValue(3), new Integer(2)); - assertEquals(group1.getValue(0), new Integer(99)); - assertEquals(group1.getValue(1), "fred"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - - XMLHelper.INSTANCE.save((DataObject)rc2, TEST_NAMESPACE, "rc2", baos); - assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2_TEST_DATA))); - } - - protected void setUp() throws Exception { - super.setUp(); - SDOUtil.registerStaticTypes(SequencesFactory.class); - } - - protected void tearDown() throws Exception { - super.tearDown(); - } - - public void test2RepeatingChoicesMixed() throws Exception { - TwoRCsMixed rc2m = SequencesFactory.INSTANCE.createTwoRCsMixed(); - - List as = rc2m.getA(); - List bs = rc2m.getB(); - List ys = rc2m.getY(); - List zs = rc2m.getZ(); - Sequence mixed = rc2m.getMixed(); - - bs.add(new Integer(1)); - mixed.add("where will this appear?"); - as.add("foo"); - as.add("bar"); - bs.add(new Integer(2)); - rc2m.setSplit("pea"); - zs.add(new Integer(99)); - ys.add("fred"); - - - assertEquals(8, mixed.size()); - - Sequence group = rc2m.getGroup(); - // FIXME reintroduce test assertEquals(4, group.size()); - assertEquals(rc2m.getA().size(), 2); - assertEquals(rc2m.getB().size(),2); - - Sequence group1 = rc2m.getGroup1(); - // FIXME ditto assertEquals(group1.size(), 2); - assertEquals(rc2m.getY().size(), 1); - assertEquals(rc2m.getZ().size(),1); - - int i = 0; - assertEquals(mixed.getValue(i++), new Integer(1)); - assertEquals(mixed.getValue(i++), "where will this appear?"); - assertEquals(mixed.getValue(i++), "foo"); - assertEquals(mixed.getValue(i++), "bar"); - assertEquals(mixed.getValue(i++), new Integer(2)); - assertEquals(mixed.getValue(i++), "pea"); - assertEquals(mixed.getValue(i++), new Integer(99)); - assertEquals(mixed.getValue(i++), "fred"); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - XMLHelper.INSTANCE.save((DataObject)rc2m, TEST_NAMESPACE, "rc2m", baos); - assertTrue(baos.toString(), TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(RC2M_TEST_DATA))); - } - - -} diff --git a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java b/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java deleted file mode 100644 index c5bc850e16..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java +++ /dev/null @@ -1,282 +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 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml b/branches/java-post-M1/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml deleted file mode 100644 index 6564fe6112..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/mixedRepeatingChoiceTestResult.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - 1 - foo -some mixed text bar - 2 - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/mixedStaticTestResult.xml b/branches/java-post-M1/sdo/tools/src/test/resources/mixedStaticTestResult.xml deleted file mode 100644 index f68e456a0e..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/mixedStaticTestResult.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - fbnt - - FlyByNightTechnology - - some text - - 2000.0 - - - more text - 1000.0 - - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoice.xsd b/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoice.xsd deleted file mode 100644 index b7aef69735..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoice.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml b/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml deleted file mode 100644 index 1b2281f7d3..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/repeatingChoiceTestResult.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - 1 - foo - bar - 2 - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/sequences.xsd b/branches/java-post-M1/sdo/tools/src/test/resources/sequences.xsd deleted file mode 100644 index 6e70ad528c..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/sequences.xsd +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/simple.xsd b/branches/java-post-M1/sdo/tools/src/test/resources/simple.xsd deleted file mode 100644 index 37b1773859..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/simple.xsd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml b/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml deleted file mode 100644 index 2a53982a8f..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesMixedTestResult.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 1 -where will this appear? foo - bar - 2 - pea - 99 - fred - diff --git a/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml b/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml deleted file mode 100644 index 2679d973c5..0000000000 --- a/branches/java-post-M1/sdo/tools/src/test/resources/twoRepeatingChoicesTestResult.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - 1 - foo - bar - 2 - banana - 99 - fred - diff --git a/branches/java-post-M1/sdo/tools/templates/Header.javajetinc b/branches/java-post-M1/sdo/tools/templates/Header.javajetinc deleted file mode 100644 index 27becf3645..0000000000 --- a/branches/java-post-M1/sdo/tools/templates/Header.javajetinc +++ /dev/null @@ -1,6 +0,0 @@ -/** - * - * - * - * <%="$"%>Id<%="$"%> - */ diff --git a/branches/java-post-M1/sdo/tools/templates/models/SDOClass.javajet b/branches/java-post-M1/sdo/tools/templates/models/SDOClass.javajet deleted file mode 100644 index 9acd32751b..0000000000 --- a/branches/java-post-M1/sdo/tools/templates/models/SDOClass.javajet +++ /dev/null @@ -1,1813 +0,0 @@ -<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="SDOClass" version="$Id: Class.javajet,v 1.41 2006/02/15 19:58:39 emerks Exp $" %> -<% -/** - * - * - * Copyright (c) 2002-2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - * - * - */ -%> -<%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]);%> -<%String publicStaticFinalFlag = isImplementation ? "public static final " : "";%> -<%@ include file="../Header.javajetinc"%> -<%if (isInterface) {%> -package <%=genPackage.getInterfacePackageName()%>; -<%} else {%> -package <%=genPackage.getClassPackageName()%>; -<%}%> - -<%genModel.markImportLocation(stringBuffer, genPackage);%> - -<%if (isInterface) {%> -/** - * - * A representation of the model object '<%=genClass.getFormattedName()%>'. - * -<%if (genClass.hasDocumentation()) {%> - * - * - * <%=genClass.getDocumentation(genModel.getIndentation(stringBuffer))%> - * -<%}%> - * -<%if (!genClass.getGenFeatures().isEmpty()) {%> - *

      - * The following features are supported: - *

        -<%for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genFeature.isSuppressedGetVisibility()) {%> - *
      • {@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}
      • - <%}%> -<%}%> - *
      - *

      -<%}%> - * -<%if (!genModel.isSuppressEMFMetaData()) {%> - * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genClass.getClassifierAccessorName()%>() -<%}%> -<%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%> - * @model <%=modelInfo%> -<%} else {%> - * <%=modelInfo%> -<%}} if (first) {%> - * @model -<%}}%> -<%if (genClass.needsRootExtendsInterfaceExtendsTag()) {%> - * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%> -<%}%> - * @generated - */ -<%} else {%> -/** - * - * An implementation of the model object '<%=genClass.getFormattedName()%>'. - * - *

      -<%if (!genClass.getImplementedGenFeatures().isEmpty()) {%> - * The following features are implemented: - *

        -<%for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - *
      • {@link <%=genClass.getQualifiedClassName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}
      • -<%}%> - *
      -<%}%> - *

      - * - * @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()) {%> - <%for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> -<%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> - /** - * The feature id for the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>. - * - * - * @generated - * @ordered - */ - public final static int <%=genFeature.getUpperName()%> = <%=genClass.getFeatureValue(genFeature)%>; - - <%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 - */ - - // How to get BasicSequence from Sequence? - <%if (genFeature.getImportedType().equals("Sequence")){%> - protected <%=genFeature.getImportedEffectiveFeatureMapWrapperClass()%> <%=genFeature.getSafeName()%> = null; - <%}else{%> - 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_ = <%=genFeature.getStaticDefaultValue()%>;<%=genModel.getNonNLS(genFeature.getStaticDefaultValue())%> - - <%}%> - <%if (genClass.isField(genFeature)) {%> - <%if (genClass.isFlag(genFeature)) {%> - <%if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) {%> - /** - * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set. - * - * - * @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) {%> - /** - * - * - * @generated - */ - protected <%=genClass.getClassName()%>() - { - super(); - <%for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; - <%}%> - } - - /** - * - * - * @generated - */ - public <%=genModel.getImportedName("commonj.sdo.Type")%> getType() - { - return <%=genModel.getImportedName("commonj.sdo.helper.TypeHelper")%>.INSTANCE.getType(<%=genClass.getImportedInterfaceName()%>.class); //TBD Generate a more efficient implementation - } - -<%}%> -<%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... - *

      - <%}%> - * - <%if (genFeature.hasDocumentation()) {%> - * - * <%=genFeature.getDocumentation(genModel.getIndentation(stringBuffer))%> - * - <%}%> - * @return the value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>. - <%if (genFeature.getTypeGenEnum() != null) {%> - * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%> - <%}%> - <%if (genFeature.isUnsettable()) {%> - <%if (!genFeature.isSuppressedIsSetVisibility()) {%> - * @see #isSet<%=genFeature.getAccessorName()%>() - <%}%> - <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%> - * @see #unset<%=genFeature.getAccessorName()%>() - <%}%> - <%}%> - <%if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%> - * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) - <%}%> - <%if (!genModel.isSuppressEMFMetaData()) {%> - * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genFeature.getFeatureAccessorName()%>() - <%}%> - <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %> - <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%> - * @see <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> - <%}%> - <%}%> - <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%> - * @model <%=modelInfo%> - <%} else {%> - * <%=modelInfo%> - <%}} if (first) {%> - * @model - <%}}%> - * @generated - */ -<%} else {%> - /** - * - * - * @generated - */ -<%}%> -<%if (!isImplementation) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>(); - -<%} else {%> - public <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>() - { -<%@ include file="Class/getGenFeature.pre.insert.javajetinc" fail="silent" %> - <%if (genModel.isReflectiveDelegation()) {%> - return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; - <%} else if (!genFeature.isVolatile()) {%> - <%if (genFeature.isListType()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%}%> - if (<%=genFeature.getSafeName()%> == null) - { - <%if (genModel.isVirtualDelegation()) {%> - eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>); - <%} else { - if (genFeature.getImportedType().equals("Sequence")){%> - <%=genFeature.getSafeName()%> = createSequence(<%=genFeature.getUpperName()%>); - <%} else {%> - <%=genFeature.getSafeName()%> = createPropertyList(ListKind.CONTAINMENT, <%=genClass.getName()%>.class, <%=genFeature.getUpperName()%>); - <%}%> - <%}%> - } - return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>; - <%} else if (genFeature.isContainer()) {%> - if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null; - return (<%=genFeature.getImportedType()%>)eContainer(); - <%} else {%> - <%if (genFeature.isResolveProxies()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>); - <%}%> - if (<%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeNameAsEObject()%>.isProxy()) - { - <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> old<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>; - <%=genFeature.getSafeName()%> = <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy(old<%=genFeature.getCapName()%>); - if (<%=genFeature.getSafeName()%> != old<%=genFeature.getCapName()%>) - { - <%if (genFeature.isEffectiveContains()) {%> - <%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> new<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>; - <%if (!genFeature.isBidirectional()) {%> - ChangeContext changeContext = old<%=genFeature.getCapName()%>.inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, null); - <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - <%=genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext")%> changeContext = old<%=genFeature.getCapName()%>.inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, null); - <%}%> - if (new<%=genFeature.getCapName()%>.eInternalContainer() == null) - { - <%if (!genFeature.isBidirectional()) {%> - changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); - <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - <%}%> - } - if (changeContext != null) changeContext.dispatch(); - <%} else if (genModel.isVirtualDelegation()) {%> - eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>); - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.RESOLVE, <%=genFeature.getUpperName()%>, old<%=genFeature.getCapName()%>, <%=genFeature.getSafeName()%>); - <%}%> - } - } - <%}%> - <%if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>); - <%} else if (genClass.isFlag(genFeature)) {%> - return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; - <%} else {%> - return <%=genFeature.getSafeName()%>; - <%}%> - <%}%> - <%} else {//volatile%> - <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>(); - return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeName()%>.isProxy() ? <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>; - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (genFeature.isFeatureMapType()) {%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); - <%} else {%> - return (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>); - <%}%> - <%} else if (genFeature.isListType()) {%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return get<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); - - <%} else {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>); - <%}%> - <%} else {%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; - <%} else {%> - return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>; - <%}%> - <%}%> - <%} else {%> -<%@ include file="Class/getGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/getGenFeature.todo.override.javajetinc%> - <%}%> - <%}%> - } - -<%}%> -<%@ end %><%//Class/getGenFeature.override.javajetinc%> - <%}%> - <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {%> -<%@ include file="Class/basicGetGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> - /** - * - * - * @generated - */ - public <%=genFeature.getImportedType()%> basicGet<%=genFeature.getAccessorName()%>() - { -<%@ include file="Class/basicGetGenFeature.pre.insert.javajetinc" fail="silent" %> - <%if (genFeature.isContainer()) {%> - if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null; - return (<%=genFeature.getImportedType()%>)eInternalContainer(); - <%} else if (!genFeature.isVolatile()) {%> - <%if (genModel.isVirtualDelegation()) {%> - return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%} else {%> - return <%=genFeature.getSafeName()%>; - <%}%> - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); - <%} else {%> - return (<%=genFeature.getImportedType()%>)get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false); - <%}%> - <%} else {%> -<%@ include file="Class/basicGetGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // -> do not perform proxy resolution - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/basicGetGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%@ end %><%//Class/basicGetGenFeature.override.javajetinc%> - <%}%> - <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {%> -<%@ include file="Class/basicSetGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> - /** - * - * - * @generated - */ - public ChangeContext basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedInternalType()%> new<%=genFeature.getCapName()%>, ChangeContext changeContext) - { - <%if (!genFeature.isVolatile()) {%> -<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %> - <%if (genModel.isVirtualDelegation()) {%> - Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>); - <%} else {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; - <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%>; - <%}%> - <%if (genFeature.isUnsettable()) {%> - <%if (genModel.isVirtualDelegation()) {%> - boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE; - <%} else if (genClass.isESetFlag(genFeature)) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%=genFeature.getUncapName()%>_set_ = true; - <%}%> - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - { - <%if (genFeature.isUnsettable()) {%> - <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>); - <%} else {%> - <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>); - <%}%> - if (changeContext == null) changeContext = notification; else changeContext.add(notification); - } - <%}%> -<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %> - return changeContext; - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal.Wrapper)get<%=delegateFeature.getAccessorName()%>()).featureMap()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, changeContext); - <%} else {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).basicAdd(<%=genFeature.getQualifiedFeatureAccessor()%>, new<%=genFeature.getCapName()%>, changeContext); - <%}%> - <%} else {%> -<%@ include file="Class/basicSetGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to set the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // -> this method is automatically invoked to keep the containment relationship in synch - // -> do not modify other features - // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first) - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/basicSetGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%@ end %><%//Class/basicSetGenFeature.override.javajetinc%> - <%}%> - <%if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {%> -<%@ include file="Class/setGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> -<%if (isInterface) { %> - /** - * Sets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>. - * - * - * @param value the new value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>. - <%if (genFeature.isEnumType()) {%> - * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%> - <%}%> - <%if (genFeature.isUnsettable()) {%> - <%if (!genFeature.isSuppressedIsSetVisibility()) {%> - * @see #isSet<%=genFeature.getAccessorName()%>() - <%}%> - <%if (!genFeature.isSuppressedUnsetVisibility()) {%> - * @see #unset<%=genFeature.getAccessorName()%>() - <%}%> - <%}%> - * @see #<%=genFeature.getGetAccessor()%>() - * @generated - */ -<%} else {%> - /** - * - * - * @generated - */ -<%}%> -<%if (!isImplementation) { %> - void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> value); - -<%} else {%> - public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> new<%=genFeature.getCapName()%>) - { -<%@ include file="Class/setGenFeature.pre.insert.javajetinc" fail="alternative" %> - <%if (genModel.isReflectiveDelegation()) {%> - _set_(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()) {%>)<%}%>); - <%} else if (!genFeature.isVolatile()) {%> - <%if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - if (new<%=genFeature.getCapName()%> != eInternalContainer() || (eContainerFeatureID != <%=genFeature.getUpperName()%> && new<%=genFeature.getCapName()%> != null)) - { - if (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.isAncestor(this, <%=genFeature.getEObjectCast()%>new<%=genFeature.getCapName()%>)) - throw new <%=genModel.getImportedName("java.lang.IllegalArgumentException")%>("Recursive containment not allowed for " + toString());<%=genModel.getNonNLS()%> - ChangeContext changeContext = null; - if (eInternalContainer() != null) - changeContext = eBasicRemoveFromContainer(changeContext); - if (new<%=genFeature.getCapName()%> != null) - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - changeContext = eBasicSetContainer((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genFeature.getUpperName()%>, changeContext); - if (changeContext != null) changeContext.dispatch(); - } - <%if (!genModel.isSuppressNotification()) {%> - else if (isNotifying()) - notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>); - <%}%> - <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%}%> - if (new<%=genFeature.getCapName()%> != <%=genFeature.getSafeName()%>) - { - ChangeContext changeContext = null; - if (<%=genFeature.getSafeName()%> != null) - <%if (!genFeature.isBidirectional()) {%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); - if (new<%=genFeature.getCapName()%> != null) - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); - <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - if (new<%=genFeature.getCapName()%> != null) - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - <%}%> - changeContext = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, changeContext); - if (changeContext != null) changeContext.dispatch(); - } - <%if (genFeature.isUnsettable()) {%> - else - { - <%if (genModel.isVirtualDelegation()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>); - <%} else if (genClass.isESetFlag(genFeature)) {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%}%> - <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%}%> - <%=genFeature.getUncapName()%>_set_ = true; - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>, !old<%=genFeature.getCapName()%>_set_); - <%}%> - } - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - else if (isNotifying()) - notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>); - <%}%> - <%}%> - <%} else {%> - <%if (genClass.isFlag(genFeature)) {%> - <%if (!genModel.isSuppressNotification()) {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; - <%}%> - if (new<%=genFeature.getCapName()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG; - <%} else {%> - <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> - <%if (!genModel.isSuppressNotification()) {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; - <%}%> - <%}%> - <%if (genFeature.isEnumType()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>; - <%} else {%> - <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>; - <%}%> - <%} else {%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>; - <%} else {%> - <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>; - <%}%> - <%}%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>); - <%}%> - <%}%> - <%if (genFeature.isUnsettable()) {%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE; - <%} else if (genClass.isESetFlag(genFeature)) {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%}%> - <%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%}%> - <%=genFeature.getUncapName()%>_set_ = true; - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>); - <%}%> - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>); - <%}%> - <%}%> - <%}%> -<%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %> - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - set(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>); - <%} else {%> - ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>); - <%}%> - <%} else {%> -<%@ include file="Class/setGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to set the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/setGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%}%> -<%@ end %><%//Class/setGenFeature.override.javajetinc%> - <%}%> - <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {%> -<%@ include file="Class/basicUnsetGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> - /** - * - * - * @generated - */ - public ChangeContext basicUnset<%=genFeature.getAccessorName()%>(ChangeContext changeContext) - { - <%if (!genFeature.isVolatile()) {%> - <%if (genModel.isVirtualDelegation()) {%> - Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>); - <%} else {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; - <%=genFeature.getSafeName()%> = null; - <%}%> - <%if (genModel.isVirtualDelegation()) {%> - boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE; - <%} else if (genClass.isESetFlag(genFeature)) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%=genFeature.getUncapName()%>_set_ = false; - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - { - <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); - if (changeContext == null) changeContext = notification; else changeContext.add(notification); - } - return changeContext; - <%}%> - <%} else {%> -<%@ include file="Class/basicUnsetGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to unset the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // -> this method is automatically invoked to keep the containment relationship in synch - // -> do not modify other features - // -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first) - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/basicUnsetGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%@ end %><%//Class.basicUnsetGenFeature.override.javajetinc%> - <%}%> - <%if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {%> -<%@ include file="Class/unsetGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> -<%if (isInterface) {%> - /** - * Unsets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%>. - * - * - <%if (!genFeature.isSuppressedIsSetVisibility()) {%> - * @see #isSet<%=genFeature.getAccessorName()%>() - <%}%> - * @see #<%=genFeature.getGetAccessor()%>() - <%if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%> - * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) - <%}%> - * @generated - */ -<%} else {%> - /** - * - * - * @generated - */ -<%}%> -<%if (!isImplementation) {%> - void unset<%=genFeature.getAccessorName()%>(); - -<%} else {%> - public void unset<%=genFeature.getAccessorName()%>() - { - <%if (genModel.isReflectiveDelegation()) {%> - unset(<%=genFeature.getQualifiedFeatureAccessor()%>); - <%} else if (!genFeature.isVolatile()) {%> - <%if (genFeature.isListType()) {%> - ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)get<%=genFeature.getAccessorName()%>()).unset(); - <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%}%> - if (<%=genFeature.getSafeName()%> != null) - { - ChangeContext changeContext = null; - <%if (!genFeature.isBidirectional()) {%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); - <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - <%}%> - changeContext = basicUnset<%=genFeature.getAccessorName()%>(changeContext); - if (changeContext != null) changeContext.dispatch(); - } - else - { - <%if (genModel.isVirtualDelegation()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>); - <%} else if (genClass.isESetFlag(genFeature)) {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%}%> - <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%}%> - <%=genFeature.getUncapName()%>_set_ = false; - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, null, null, old<%=genFeature.getCapName()%>_set_); - <%}%> - } - <%} else {%> - <%if (genClass.isFlag(genFeature)) {%> - <%if (!genModel.isSuppressNotification()) {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0; - <%}%> - <%} else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>); - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - <%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>; - <%}%> - <%}%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE; - <%} else if (genClass.isESetFlag(genFeature)) {%> - boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%} else {%> - <%if (!genModel.isSuppressNotification()) {%> - boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_; - <%}%> - <%}%> - <%if (genFeature.isReferenceType()) {%> - <%=genFeature.getSafeName()%> = null; - <%if (!genModel.isVirtualDelegation()) {%> - <%if (genClass.isESetFlag(genFeature)) {%> - <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - <%=genFeature.getUncapName()%>_set_ = false; - <%}%> - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); - <%}%> - <%} else {%> - <%if (genClass.isFlag(genFeature)) {%> - if (<%=genFeature.getUpperName()%>_DEFAULT_) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG; - <%} else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> - <%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_; - <%}%> - <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%> - <%if (genClass.isESetFlag(genFeature)) {%> - <%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG; - <%} else {%> - <%=genFeature.getUncapName()%>_set_ = false; - <%}%> - <%}%> - <%if (!genModel.isSuppressNotification()) {%> - if (isNotifying()) - notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? old<%=genFeature.getCapName()%> : <%=genFeature.getUpperName()%>_DEFAULT_<%} else {%>old<%=genFeature.getCapName()%><%}%>, <%=genFeature.getUpperName()%>_DEFAULT_, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>); - <%}%> - <%}%> - <%}%> - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - unset(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); - <%} else {%> - unset<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>()); - <%}%> - <%} else {%> -<%@ include file="Class/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to unset the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/unsetGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%}%> -<%@ end %><%//Class/unsetGenFeature.override.javajetinc%> - <%}%> - <%if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {%> -<%@ include file="Class/isSetGenFeature.override.javajetinc" fail="alternative" %> -<%@ start %> -<%if (isInterface) {%> - /** - * Returns whether the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <%=genFeature.getFormattedName()%>}' <%=genFeature.getFeatureKind()%> is set. - * - * - * @return whether the value of the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set. - <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%> - * @see #unset<%=genFeature.getAccessorName()%>() - <%}%> - * @see #<%=genFeature.getGetAccessor()%>() - <%if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {%> - * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>) - <%}%> - * @generated - */ -<%} else {%> - /** - * - * - * @generated - */ -<%}%> -<%if (!isImplementation) {%> - boolean isSet<%=genFeature.getAccessorName()%>(); - -<%} else {%> - public boolean isSet<%=genFeature.getAccessorName()%>() - { - <%if (genModel.isReflectiveDelegation()) {%> - return isSet(<%=genFeature.getQualifiedFeatureAccessor()%>); - <%} else if (!genFeature.isVolatile()) {%> - <%if (genFeature.isListType()) {%> - <%if (genModel.isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%}%> - return <%=genFeature.getSafeName()%> != null && ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)<%=genFeature.getSafeName()%>).isSet(); - <%} else {%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - return eVirtualIsSet(<%=genFeature.getUpperName()%>); - <%} else if (genClass.isESetFlag(genFeature)) {%> - return (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0; - <%} else {%> - return <%=genFeature.getUncapName()%>_set_; - <%}%> - <%}%> - <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%> - <%if (delegateFeature.isWrappedFeatureMapType()) {%> - return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>); - <%} else {%> - return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>); - <%}%> - <%} else {%> -<%@ include file="Class/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method to return whether the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/isSetGenFeature.todo.override.javajetinc%> - <%}%> - } - -<%}%> -<%@ end %><%//Class/isSetGenFeature.override.javajetinc%> - <%}%> -<%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %> -<%@ end %><%//Class/genFeature.override.javajetinc%> -<%}//for%> -<%for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();%> -<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %> -<%@ start %> -<%if (isInterface) {%> - /** - * - * - <%if (genOperation.hasDocumentation()) {%> - * - * <%=genOperation.getDocumentation(genModel.getIndentation(stringBuffer))%> - * - <%}%> - <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%> - * @model <%=modelInfo%> - <%} else {%> - * <%=modelInfo%> - <%}} if (first) {%> - * @model - <%}}%> - * @generated - */ -<%} else {%> - /** - * - * - * @generated - */ -<%}%> -<%if (!isImplementation) {%> - <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>; - -<%} else {%> - public <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%> - { - <%if (genOperation.hasBody()) {%> - <%=genOperation.getBody(genModel.getIndentation(stringBuffer))%> - <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = ((GenParameter)genOperation.getGenParameters().get(0)).getName(); String context = ((GenParameter)genOperation.getGenParameters().get(1)).getName();%> - // TODO: implement this method - // -> specify the condition that violates the invariant - // -> verify the details of the diagnostic, including severity and message - // Ensure that you remove @generated or mark it @generated NOT - if (false) - { - if (<%=diagnostics%> != null) - { - <%=diagnostics%>.add - (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%> - (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR, - <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE, - <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>, - <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%> - new Object [] { this })); - } - return false; - } - return true; - <%} else {%> -<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %> -<%@ start %> - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); -<%@ end %><%//Class/implementedGenOperation.todo.override.javajetinc%> - <%}%> - } - -<%}%> -<%@ include file="Class/genOperation.insert.javajetinc" fail="silent" %> -<%@ end %><%//Class/implementedGenOperation.override.javajetinc%> -<%}//for%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {%> - /** - * - * - * @generated - */ - public ChangeContext eInverseAdd(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isListType()) {%> - <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicAdd(otherEnd, changeContext); - <%} else {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)<%=genFeature.getGetAccessor()%>()).basicAdd(otherEnd, changeContext); - <%}%> - <%} else if (genFeature.isContainer()) {%> - if (eInternalContainer() != null) - changeContext = eBasicRemoveFromContainer(changeContext); - return eBasicSetContainer(otherEnd, <%=genFeature.getUpperName()%>, changeContext); - <%} else {%> - <%if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - <%}%> - if (<%=genFeature.getSafeName()%> != null) - <%if (genFeature.isEffectiveContains()) {%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext); - <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - <%}%> - return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)otherEnd, changeContext); - <%}%> - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - return super.eInverseAdd(otherEnd, propertyIndex, changeContext); -<%} else {%> - return eDynamicInverseAdd(otherEnd, propertyIndex, changeContext); -<%}%> - } - -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {%> - /** - * - * - * @generated - */ - public ChangeContext inverseRemove(<%=genModel.getImportedName("java.lang.Object")%> otherEnd, int propertyIndex, ChangeContext changeContext) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isListType()) {%> - <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%> - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicRemove(otherEnd, changeContext); - <%} else if (genFeature.isWrappedFeatureMapType()) {%> - return removeFrom<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext); - <%} else {%> - return removeFromList(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext); - <%}%> - <%} else if (genFeature.isContainer()) {%> - return eBasicSetContainer(null, <%=genFeature.getUpperName()%>, changeContext); - <%} else if (genFeature.isUnsettable()) {%> - return basicUnset<%=genFeature.getAccessorName()%>(changeContext); - <%} else {%> - return basicSet<%=genFeature.getAccessorName()%>(null, changeContext); - <%}%> - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - return super.inverseRemove(otherEnd, propertyIndex, changeContext); -<%} else {%> - return eDynamicInverseRemove(otherEnd, propertyIndex, changeContext); -<%}%> - } - -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {%> - /** - * - * - * @generated - */ - public ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext) - { - switch (eContainerFeatureID) - { -<%for (Iterator i=genClass.getEBasicRemoveFromContainerGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - return eInternalContainer().inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext); - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - return super.eBasicRemoveFromContainerFeature(changeContext); -<%} else {%> - return eDynamicBasicRemoveFromContainer(changeContext); -<%}%> - } - -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%> - /** - * - * - * @generated - */ - public Object get(int propertyIndex, boolean resolve) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isPrimitiveType()) {%> - <%if (genFeature.isBooleanType()) {%> - return <%=genFeature.getGetAccessor()%>() ? Boolean.TRUE : Boolean.FALSE; - <%} else {%> - return new <%=genFeature.getObjectType()%>(<%=genFeature.getGetAccessor()%>()); - <%}%> - <%} else if (genFeature.isResolveProxies() && !genFeature.isListType()) {%> - if (resolve) return <%=genFeature.getGetAccessor()%>(); - return basicGet<%=genFeature.getAccessorName()%>(); - <%} else if (genFeature.isMapType()) {%> - <%if (genFeature.isEffectiveSuppressEMFTypes()) {%> - if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap(); - else return <%=genFeature.getGetAccessor()%>(); - <%} else {%> - if (coreType) return <%=genFeature.getGetAccessor()%>(); - else return <%=genFeature.getGetAccessor()%>().map(); - <%}%> - <%} else if (genFeature.isWrappedFeatureMapType()) {%> - // XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view - //if (coreType) - return <%=genFeature.getGetAccessor()%>(); - <%} else if (genFeature.isFeatureMapType()) {%> - if (coreType) return <%=genFeature.getGetAccessor()%>(); - return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).getWrapper(); - <%} else {%> - return <%=genFeature.getGetAccessor()%>(); - <%}%> - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - return super.get(propertyIndex, resolve); -<%} else {%> - return eDynamicGet(propertyIndex, resolve, coreType); -<%}%> - } - -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {%> - /** - * - * - * @generated - */ - public void set(int propertyIndex, Object newValue) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isListType()) {%> - <%if (genFeature.isWrappedFeatureMapType()) {%> - set<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), newValue); - <%} else if (genFeature.isFeatureMapType()) {%> - ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).set(newValue); - <%} else if (genFeature.isMapType()) {%> - <%if (genFeature.isEffectiveSuppressEMFTypes()) {%> - ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).set(newValue); - <%} else {%> - ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)<%=genFeature.getGetAccessor()%>()).set(newValue); - <%}%> - <%} else {%> - <%=genFeature.getGetAccessor()%>().clear(); - <%=genFeature.getGetAccessor()%>().addAll((<%=genModel.getImportedName("java.util.Collection")%>)newValue); - <%}%> - <%} else if (genFeature.isPrimitiveType()) {%> - set<%=genFeature.getAccessorName()%>(((<%=genFeature.getObjectType()%>)newValue).<%=genFeature.getPrimitiveValueFunction()%>()); - <%} else {%> - set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)newValue); - <%}%> - return; - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - super.set(propertyIndex, newValue); -<%} else {%> - eDynamicSet(propertyIndex, newValue); -<%}%> - } - - /** - * - * - * @generated - */ - public void unset(int propertyIndex) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%> - <%if (genFeature.isWrappedFeatureMapType()) {%> - unset<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>()); - <%} else {%> - <%=genFeature.getGetAccessor()%>().clear(); - <%}%> - <%} else if (genFeature.isUnsettable()) {%> - unset<%=genFeature.getAccessorName()%>(); - <%} else if (genFeature.isReferenceType()) {%> - set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)null); - <%} else {%> - set<%=genFeature.getAccessorName()%>(<%=genFeature.getUpperName()%>_DEFAULT_); - <%}%> - return; - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - super.unset(propertyIndex); -<%} else {%> - eDynamicUnset(propertyIndex); -<%}%> - } - -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%> -<%@ include file="Class/eIsSet.override.javajetinc" fail="alternative" %> -<%@ start %> - /** - * - * - * @generated - */ - public boolean isSet(int propertyIndex) - { - switch (propertyIndex) - { -<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%> - case <%=genFeature.getUpperName()%>: - <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%> - <%if (genFeature.isWrappedFeatureMapType()) {%> - <%if (genFeature.isVolatile()) {%> - return !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>()); - <%} else {%> - // KDK - should this be !isSequenceEmpty? - return <%=genFeature.getSafeName()%> != null && !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>()); - <%}%> - <%} else {%> - <%if (genClass.isField(genFeature)) {%> - return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty(); - <%} else {%> - <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>); - return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty(); - <%} else {%> - return !<%=genFeature.getGetAccessor()%>().isEmpty(); - <%}%> - <%}%> - <%}%> - <%} else if (genFeature.isUnsettable()) {%> - return isSet<%=genFeature.getAccessorName()%>(); - <%} else if (genFeature.isResolveProxies()) {%> - <%if (genClass.isField(genFeature)) {%> - return <%=genFeature.getSafeName()%> != null; - <%} else {%> - <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - return eVirtualGet(<%=genFeature.getUpperName()%>) != null; - <%} else {%> - return basicGet<%=genFeature.getAccessorName()%>() != null; - <%}%> - <%}%> - <%} else if (genFeature.isReferenceType()) {%> - <%if (genClass.isField(genFeature)) {%> - return <%=genFeature.getSafeName()%> != null; - <%} else {%> - <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - return eVirtualGet(<%=genFeature.getUpperName()%>) != null; - <%} else {%> - return <%=genFeature.getGetAccessor()%>() != null; - <%}%> - <%}%> - <%} else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {%> - <%if (genClass.isField(genFeature)) {%> - <%if (genClass.isFlag(genFeature)) {%> - return ((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0) != <%=genFeature.getUpperName()%>_DEFAULT_; - <%} else {%> - return <%=genFeature.getSafeName()%> != <%=genFeature.getUpperName()%>_DEFAULT_; - <%}%> - <%} else {%> - <%if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - return eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_) != <%=genFeature.getUpperName()%>_DEFAULT_; - <%} else {%> - return <%=genFeature.getGetAccessor()%>() != <%=genFeature.getUpperName()%>_DEFAULT_; - <%}%> - <%}%> - <%} else {//datatype%> - <%if (genClass.isField(genFeature)) {%> - return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>); - <%} else {%> - <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%> - <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_); - return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>); - <%} else {%> - return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getGetAccessor()%>() != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getGetAccessor()%>()); - <%}%> - <%}%> - <%}%> - <%}%> -<%}%> - } -<%if (genModel.isMinimalReflectiveMethods()) {%> - return super.isSet(propertyIndex); -<%} else {%> - return eDynamicIsSet(propertyIndex); -<%}%> - } - -<%@ end %><%//Class/eIsSet.override.javajetinc%> -<%}%> -<%if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {%> - /** - * - * - * @generated - */ - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) - { - <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %> - if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class) - { - switch (derivedFeatureID) - { - <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %> - case <%=genFeature.getUpperName()%>: return <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>; - <%}%> - default: return -1; - } - } - <%}%> - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) - { - <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %> - if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class) - { - switch (baseFeatureID) - { - <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %> - case <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>: return <%=genFeature.getUpperName()%>; - <%}%> - default: return -1; - } - } - <%}%> - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - -<%}%> -<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%> - <%if (eVirtualValuesField != null) {%> - /** - * - * - * @generated - */ - protected Object[] eVirtualValues() - { - return <%=eVirtualValuesField%>; - } - - /** - * - * - * @generated - */ - protected void setVirtualValues(Object[] newValues) - { - <%=eVirtualValuesField%> = newValues; - } - - <%}%> - <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%> - <%if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());%> - /** - * - * - * @generated - */ - protected int eVirtualIndexBits(int offset) - { - switch (offset) - { - <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%> - case <%=i%> : - return <%=allEVirtualIndexBitFields.get(i)%>; - <%}%> - default : - throw new IndexOutOfBoundsException(); - } - } - - /** - * - * - * @generated - */ - protected void setVirtualIndexBits(int offset, int newIndexBits) - { - switch (offset) - { - <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%> - case <%=i%> : - <%=allEVirtualIndexBitFields.get(i)%> = newIndexBits; - break; - <%}%> - default : - throw new IndexOutOfBoundsException(); - } - } - - <%}%> - <%}%> -<%}%> -<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {%> - /** - * - * - * @generated - */ - public String toString() - { - if (isProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - <%{ boolean first = true;%> - <%for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();%> - <%if (first) { first = false;%> - result.append(" (<%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%> - <%} else {%> - result.append(", <%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%> - <%}%> - <%if (genFeature.isUnsettable() && !genFeature.isListType()) {%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - if (eVirtualIsSet(<%=genFeature.getUpperName()%>)) result.append(eVirtualGet(<%=genFeature.getUpperName()%>)); else result.append("");<%=genModel.getNonNLS()%> - <%} else {%> - <%if (genClass.isFlag(genFeature)) {%> - if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0); else result.append("");<%=genModel.getNonNLS()%> - <%} else {%> - if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append(<%=genFeature.getSafeName()%>); else result.append("");<%=genModel.getNonNLS()%> - <%}%> - <%}%> - <%} else {%> - <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%> - result.append(eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isListType() && !genFeature.isReferenceType()){%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>)); - <%} else {%> - <%if (genClass.isFlag(genFeature)) {%> - result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0); - <%} else {%> - result.append(<%=genFeature.getSafeName()%>); - <%}%> - <%}%> - <%}%> - <%}%> - <%}%> - result.append(')'); - return result.toString(); - } - -<%}%> -<%if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();%> - /** - * - * - * @generated - */ - protected int hash = -1; - - /** - * - * - * @generated - */ - public int getHash() - { - if (hash == -1) - { - Object theKey = getKey(); - hash = (theKey == null ? 0 : theKey.hashCode()); - } - return hash; - } - - /** - * - * - * @generated - */ - public void setHash(int hash) - { - this.hash = hash; - } - - /** - * - * - * @generated - */ - public Object getKey() - { - <%if (keyFeature.isPrimitiveType()) {%> - return new <%=keyFeature.getObjectType()%>(getTypedKey()); - <%} else {%> - return getTypedKey(); - <%}%> - } - - /** - * - * - * @generated - */ - public void setKey(Object key) - { - <%if (keyFeature.isListType()) {%> - getTypedKey().addAll((<%=genModel.getImportedName("java.util.Collection")%>)key); - <%} else if (keyFeature.isPrimitiveType()) {%> - setTypedKey(((<%=keyFeature.getObjectType()%>)key).<%=keyFeature.getPrimitiveValueFunction()%>()); - <%} else {%> - setTypedKey((<%=keyFeature.getImportedType()%>)key); - <%}%> - } - - /** - * - * - * @generated - */ - public Object getValue() - { - <%if (valueFeature.isPrimitiveType()) {%> - return new <%=valueFeature.getObjectType()%>(getTypedValue()); - <%} else {%> - return getTypedValue(); - <%}%> - } - - /** - * - * - * @generated - */ - public Object setValue(Object value) - { - Object oldValue = getValue(); - <%if (valueFeature.isListType()) {%> - getTypedValue().clear(); - getTypedValue().addAll((<%=genModel.getImportedName("java.util.Collection")%>)value); - <%} else if (valueFeature.isPrimitiveType()) {%> - setTypedValue(((<%=valueFeature.getObjectType()%>)value).<%=valueFeature.getPrimitiveValueFunction()%>()); - <%} else {%> - setTypedValue((<%=valueFeature.getImportedType()%>)value); - <%}%> - return oldValue; - } - - /** - * - * - * @generated - */ - public <%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%> getEMap() - { - <%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> container = eContainer(); - return container == null ? null : (<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>)container.get(eContainmentFeature()); - } -<%}%> -<%@ include file="Class/insert.javajetinc" fail="silent" %> -} //<%=isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()%> -<%// TODO fix the space above%> -<%genModel.emitSortedImports();%> diff --git a/branches/java-post-M1/sdo/tools/templates/models/SDOFactoryClass.javajet b/branches/java-post-M1/sdo/tools/templates/models/SDOFactoryClass.javajet deleted file mode 100644 index 31794dae3f..0000000000 --- a/branches/java-post-M1/sdo/tools/templates/models/SDOFactoryClass.javajet +++ /dev/null @@ -1,727 +0,0 @@ -<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="SDOFactoryClass" version="$Id: SDOFactoryClass.javajet,v 1.23 2005/12/10 13:31:02 emerks Exp $" %> -<% -/** - * - * - * Copyright (c) 2002-2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM - Initial API and implementation - * - * - */ -%> -<%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 publicStaticFinalFlag = isImplementation ? "public static final " : "";%> -<%@ include file="../Header.javajetinc"%> -<%if (isInterface || genModel.isSuppressInterfaces()) {%> -package <%=genPackage.getReflectionPackageName()%>; -<%} else {%> -package <%=genPackage.getClassPackageName()%>; -<%}%> - -<%if (isImplementation) {%> -<%if (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");%> -<%}%> -<%genModel.markImportLocation(stringBuffer);%> - -<%if (isInterface) {%> -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * -<%if (!genModel.isSuppressEMFMetaData()) {%> - * @see <%=genPackage.getQualifiedPackageInterfaceName()%> -<%}%> - * @generated - */ -<%} else {%> -/** - * - * An implementation of the model Factory. - * - * @generated - */ -<%}%> -<%if (isImplementation) {%> -public class <%=genPackage.getFactoryClassName()%> extends <%=genModel.getImportedName("org.apache.tuscany.sdo.impl.FactoryBase")%><%if (!genModel.isSuppressInterfaces()) {%> implements <%=genPackage.getImportedFactoryInterfaceName()%><%}%> -<%} else {%> -public interface <%=genPackage.getFactoryInterfaceName()%><%if (!genModel.isSuppressEMFMetaData()) {%> extends <%=genModel.getImportedName("org.eclipse.emf.ecore.EFactory")%><%}%> -<%}%> -{ -<%if (genModel.getCopyrightText() != null) {%> - /** - * - * - * @generated - */ - <%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%> - -<%}%> - -<%if (isInterface && genModel.isSuppressEMFMetaData()) {%> - /** - * The singleton instance of the factory. - * - * - * @generated - */ - <%=publicStaticFinalFlag%><%=genPackage.getFactoryInterfaceName()%> INSTANCE = <%=genPackage.getQualifiedFactoryClassName()%>.init(); - -<%} else if (isInterface && !genModel.isSuppressInterfaces()) {%> - /** - * The singleton instance of the factory. - * - * - * @generated - */ - <%=publicStaticFinalFlag%><%=genPackage.getFactoryInterfaceName()%> eINSTANCE = <%=genPackage.getQualifiedFactoryClassName()%>.init(); - -<%}%> -<%if (isImplementation) {%> -/** - * The package namespace URI. - * - * - * @generated - */ -<%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> NAMESPACE_URI = "<%=genPackage.getNSURI()%>";<%=genModel.getNonNLS()%> - -/** - * The package namespace name. - * - * - * @generated - */ -<%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> NAMESPACE_PREFIX = "<%=genPackage.getNSName()%>";<%=genModel.getNonNLS()%> - - - <%for (Iterator i=genPackage.getOrderedGenClassifiers().iterator(); i.hasNext();) { GenClassifier genClassifier = (GenClassifier)i.next();%> -<%if (!genClassifier.getClassifierID().equals("DOCUMENT_ROOT")) { %> -<%=publicStaticFinalFlag%>int <%=genPackage.getClassifierID(genClassifier)%> = <%=genPackage.getClassifierValue(genClassifier)%>; -<%} }%> - - - /** - * Creates the default factory implementation. - * - * - * @generated - */ -<%String factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();%> - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public <%=genPackage.getFactoryClassName()%>() - { - super(NAMESPACE_URI, NAMESPACE_PREFIX); - } - - /** - * - * - * @generated - */ - public <%=genModel.getImportedName("commonj.sdo.DataObject")%> create(int typeNumber) - { - switch (typeNumber) - { -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> -<%if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - // TODO make sure we're supposed to ingore DOCUMENT_ROOT - case <%=genClass.getClassifierID()%>: return (<%=genModel.getImportedName("commonj.sdo.DataObject")%>)create<%=genClass.getName()%>(); -<%}%> -<%}%> - default: - return super.create(typeNumber); - } - } - - -<%if (!genPackage.getAllGenDataTypes().isEmpty()) {%> - /** - * - * - * @generated - */ - public Object createFromString(<%=genModel.getImportedName("org.eclipse.emf.ecore.EDataType")%> eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { -<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%> - <%if (genDataType.isSerializable()) {%> - case <%=genPackage.getImportedPackageInterfaceName()%>.<%=genDataType.getClassifierID()%>: - return create<%=genDataType.getName()%>FromString(eDataType, initialValue); - <%}%> -<%}%> - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%> - } - } - - /** - * - * - * @generated - */ - public String convertToString(<%=genModel.getImportedName("org.eclipse.emf.ecore.EDataType")%> eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { -<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%> - <%if (genDataType.isSerializable()) {%> - case <%=genPackage.getImportedPackageInterfaceName()%>.<%=genDataType.getClassifierID()%>: - return convert<%=genDataType.getName()%>ToString(eDataType, instanceValue); - <%}%> -<%}%> - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%> - } - } - -<%}%> -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - <%if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - /** - * - * - * @generated - */ - public <%=genClass.getImportedInterfaceName()%> create<%=genClass.getName()%>() - { - <%if (genClass.isDynamic()) {%> - <%=genClass.getImportedInterfaceName()%> <%=genClass.getSafeUncapName()%> = <%=genClass.getCastFromEObject()%>super.create(<%=genClass.getQualifiedClassifierAccessor()%>); - <%} else {%> - <%=genClass.getImportedClassName()%> <%=genClass.getSafeUncapName()%> = new <%=genClass.getImportedClassName()%>()<%if (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {%>{}<%}%>; - <%}%> - return <%=genClass.getSafeUncapName()%>; - } - - // Following creates and initializes SDO metadata for the supported types. - protected <%=genModel.getImportedName("commonj.sdo.Type")%> <%=genClass.getSafeUncapName()%>Type = null; - - public <%=genModel.getImportedName("commonj.sdo.Type")%> get<%=genClass.getName()%>() - { - // TODO - kdk - verify how to generate quoteType...<%=genClass.getSafeUncapName()%>Type? - return <%=genClass.getSafeUncapName()%>Type; - } - <%}%> -<%}%> - - private static boolean isInited = false; - - public static <%=factoryType%> init() - { - if (isInited) return (<%=factoryType%>)FactoryBase.getStaticFactory(<%=factoryType%>.NAMESPACE_URI); - <%=factoryType%> the<%=factoryType%> = new <%=factoryType%>(); - isInited = true; - - // Initialize simple dependencies - <%=genModel.getImportedName("org.apache.tuscany.sdo.util.SDOUtil")%>.registerStaticTypes(<%=genModel.getImportedName("org.apache.tuscany.sdo.impl.SDOFactoryImpl")%>.class); - <%=genModel.getImportedName("org.apache.tuscany.sdo.util.SDOUtil")%>.registerStaticTypes(<%=genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelPackageImpl")%>.class); - - // Create package meta-data objects - the<%=factoryType%>.createMetaData(); - - // Initialize created meta-data - the<%=factoryType%>.initializeMetaData(); - - // Mark meta-data to indicate it can't be changed - //the<%=factoryType%>.freeze(); //FB do we need to freeze / should we freeze ???? - - return the<%=factoryType%>; - } - - private boolean isCreated = false; - - public void createMetaData() - { - if (isCreated) return; - isCreated = true; -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - - <%if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - <%=genClass.getSafeUncapName()%>Type = createType(false, <%=genPackage.getClassifierID(genClass)%>); - <%for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();%> - createProperty(<%=!genFeature.isReferenceType()%>, <%=genClass.getSafeUncapName()%>Type, <%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>); - <%}%> - <%}%> -<%}%> - } - private boolean isInitialized = false; - - public void initializeMetaData() - { - if (isInitialized) return; - isInitialized = true; - - // Obtain other dependent packages - <%=genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")%> theModelPackageImpl = (<%=genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")%>)FactoryBase.getStaticFactory(<%=genModel.getImportedName("org.apache.tuscany.sdo.model.impl.ModelFactoryImpl")%>.NAMESPACE_URI); - - // Add supertypes to classes - // Initialize classes and features; add operations and parameters -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - <%if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - - initializeType(<%=genClass.getSafeUncapName()%>Type, <%=genClass.getImportedInterfaceName()%>.class, "<%=genClass.getName()%>");<%for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) {GenFeature genFeature = (GenFeature)j.next();%><%String type = genFeature.getImportedType().equals("Sequence") ? "getSequence()" : genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage()) + ".get" + genFeature.getTypeClassifierAccessorName() + "()";%><%if (genFeature.isReferenceType()) { GenFeature reverseGenFeature = genFeature.getReverse();%><%String reverse = reverseGenFeature == null ? "null" : genPackage.getPackageInstanceVariable(reverseGenFeature.getGenPackage()) + ".get" + reverseGenFeature.getFeatureAccessorName() + "()";%> - initializeProperty((<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClass.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>), <%=type%>, "<%=genFeature.getSafeName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>, <%=genFeature.getContainmentFlag().equals("IS_COMPOSITE")? "true": "false"%> , <%=reverse%>);<%}else{%> - initializeProperty((<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClass.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>), <%=type%>, "<%=genFeature.getSafeName()%>", <%=genFeature.getDefaultValue()%>, <%=genFeature.getLowerBound()%>, <%=genFeature.getUpperBound()%>, <%=genFeature.getContainerClass()%>, <%=genFeature.getChangeableFlag().equals("IS_CHANGEABLE") ? "false" : "true"%>, <%=genFeature.getUnsettableFlag().equals("IS_UNSETTABLE") ? "true": "false"%>, <%=genFeature.getDerivedFlag().equals("IS_DERIVED") ? "true" : "false"%>);<%}%><%}%><%}%><%}%>createXSDMetaData(); - } - - protected void createXSDMetaData() - { - super.createXSDMetaData(); -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - <%if (!genClass.isAbstract() && !genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - // TODO - kdk - is the order right? should kind, elementOnly be first - addXSDMapping - (<%=genClass.getSafeUncapName()%>Type, - new String[] - { - "name", "<%=genClass.getName()%>", - "kind", "elementOnly" - }); -<%for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();%> - addXSDMapping - ((<%=genModel.getImportedName("commonj.sdo.Property")%>)<%=genClass.getSafeUncapName()%>Type.getProperties().get(<%=genClass.getClassName()%>.<%=genFeature.getUpperName()%>), - new String[] - { - "kind", "element", - "name", "<%=genFeature.getName()%>" - }); - <%}%> - <%}%> -<%}%> - -<%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - <%if (!genClass.isAbstract() && genClass.getClassifierID().equals("DOCUMENT_ROOT")) {%> - // TODO - kdk - how do I filter out mixed, xMLNSPrefixMap, and xSISchemaLocation without hardcoding it - // TODO - kdk - can I hardcode ##targetNamespace? - <%for (Iterator j=genClass.getAllGenFeatures().iterator(); j.hasNext();) { GenFeature genFeature = (GenFeature)j.next();%> - <%if (!genFeature.getName().equals("mixed") && !genFeature.getName().equals("xMLNSPrefixMap") && !genFeature.getName().equals("xSISchemaLocation")){ %> - createGlobalProperty - ("<%=genFeature.getName()%>", - <%=genPackage.getPackageInstanceVariable(genFeature.getTypeGenPackage())%>.get<%=genFeature.getTypeClassifierAccessorName()%>(), - new String[] - { - "kind", "element", - "name", "<%=genFeature.getName()%>", - "namespace", "##targetNamespace" - }); - <%}%> - <%}%> -<%}%> -<%}%> - } - -<%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%> - <%if (genDataType.isSerializable()) {%> -<%if (genPackage.isDataTypeConverters()) { String eDataType = genDataType.getQualifiedClassifierAccessor();%> - /** - * - * - * @generated - */ - public <%=genDataType.getImportedInstanceClassName()%> create<%=genDataType.getName()%>(String literal) - { - <%if (genDataType instanceof GenEnum) {%> - <%=genDataType.getImportedInstanceClassName()%> result = <%=genDataType.getImportedInstanceClassName()%>.get(literal); - if (result == null) throw new IllegalArgumentException("The value '" + literal + "' is not a valid enumerator of '" + <%=eDataType%>.getName() + "'");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%> - return result; - <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();%> - <%if (genBaseType.getGenPackage() == genPackage) {%> - <%if (isPrimitiveConversion) {%> - return new <%=genDataType.getObjectInstanceClassName()%>(create<%=genBaseType.getName()%>(literal)); - <%} else {%> - return create<%=genBaseType.getName()%>(literal); - <%}%> - <%} else if (genBaseType.getGenPackage().isDataTypeConverters()) {%> - <%if (isPrimitiveConversion) {%> - return new <%=genDataType.getObjectInstanceClassName()%>(<%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=genBaseType.getName()%>(literal)); - <%} else {%> - return <%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=genBaseType.getName()%>(literal); - <%}%> - <%} else {%> - return (<%=genDataType.getObjectInstanceClassName()%>)<%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genBaseType.getQualifiedClassifierAccessor()%>, literal); - <%}%> - <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %> - if (literal == null) return null; - <%=genModel.getImportedName("java.util.List")%> result = new <%=genModel.getImportedName("java.util.ArrayList")%>(); - for (<%=genModel.getImportedName("java.util.StringTokenizer")%> stringTokenizer = new <%=genModel.getImportedName("java.util.StringTokenizer")%>(literal); stringTokenizer.hasMoreTokens(); ) - { - String item = stringTokenizer.nextToken(); - <%if (genItemType.getGenPackage() == genPackage) {%> - <%if (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();%> - result.add(create<%=genItemType.getName()%>(item)); - <%} else {%> - result.add(create<%=genItemType.getName()%>FromString(<%=genItemType.getQualifiedClassifierAccessor()%>, item)); - <%}%> - <%} else {%> - <%if (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();%> - result.add(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=genItemType.getName()%>(item)); - <%} else {%> - result.add(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genItemType.getQualifiedClassifierAccessor()%>, item)); - <%}%> - <%}%> - } - return result; - <%} else if (!genDataType.getMemberTypes().isEmpty()) {%> - if (literal == null) return <%=genDataType.getStaticValue(null)%>; - <%=genDataType.getImportedInstanceClassName()%> result = <%=genDataType.getStaticValue(null)%>; - RuntimeException exception = null; - <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%> - try - { - <%if (genMemberType.getGenPackage() == genPackage) {%> - <%if (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();%> - result = create<%=genMemberType.getName()%>(literal); - <%} else {%> - result = (<%=genDataType.getObjectInstanceClassName()%>)create<%=genMemberType.getName()%>FromString(<%=genMemberType.getQualifiedClassifierAccessor()%>, literal); - <%}%> - <%} else {%> - <%if (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();%> - result = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.create<%=genMemberType.getName()%>(literal); - <%} else {%> - result = (<%=genDataType.getObjectInstanceClassName()%>)<%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genMemberType.getQualifiedClassifierAccessor()%>, literal); - <%}%> - <%}%> - if (<%if (!genDataType.isPrimitiveType()) {%>result != null && <%}%><%=genModel.getImportedName("org.eclipse.emf.ecore.util.Diagnostician")%>.INSTANCE.validate(<%=eDataType%>, <%if (genDataType.isPrimitiveType()) {%>new <%=genDataType.getObjectInstanceClassName()%>(result)<%} else {%>result<%}%>, null, null)) - { - return result; - } - } - catch (RuntimeException e) - { - exception = e; - } - <%}%> - if (<%if (!genDataType.isPrimitiveType()) {%>result != null || <%}%>exception == null) return result; - - throw exception; - <%} else if (genDataType.isArrayType()) {%> - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>(); - <%} else if (genDataType.isPrimitiveType()) {%> - return ((<%=genDataType.getObjectInstanceClassName()%>)super.createFromString(<%=eDataType%>, literal)).<%=genDataType.getPrimitiveValueFunction()%>(); - <%} else {%> - return (<%=genDataType.getObjectInstanceClassName()%>)super.createFromString(<%=eDataType%>, literal); - <%}%> - } - -<%}%> - /** - * - * - * @generated - */ - public <%=genDataType.getObjectInstanceClassName()%> create<%=genDataType.getName()%>FromString(<%=genModel.getImportedName("org.eclipse.emf.ecore.EDataType")%> eDataType, String initialValue) - { - <%if (genDataType instanceof GenEnum) {%> - <%if (genPackage.isDataTypeConverters()) {%> - return create<%=genDataType.getName()%>(initialValue); - <%} else {%> - <%=((GenEnum)genDataType).getImportedInstanceClassName()%> result = <%=((GenEnum)genDataType).getImportedInstanceClassName()%>.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%> - return result; - <%}%> - <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); %> - <%if (genBaseType.getGenPackage() == genPackage) {%> - return (<%=genDataType.getObjectInstanceClassName()%>)create<%=genBaseType.getName()%>FromString(<%=genBaseType.getQualifiedClassifierAccessor()%>, initialValue); - <%} else {%> - return (<%=genDataType.getObjectInstanceClassName()%>)<%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genBaseType.getQualifiedClassifierAccessor()%>, initialValue); - <%}%> - <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %> - <%if (genPackage.isDataTypeConverters()) {%> - return create<%=genDataType.getName()%>(initialValue); - <%} else {%> - if (initialValue == null) return null; - <%=genModel.getImportedName("java.util.List")%> result = new <%=genModel.getImportedName("java.util.ArrayList")%>(); - for (<%=genModel.getImportedName("java.util.StringTokenizer")%> stringTokenizer = new <%=genModel.getImportedName("java.util.StringTokenizer")%>(initialValue); stringTokenizer.hasMoreTokens(); ) - { - String item = stringTokenizer.nextToken(); - <%if (genItemType.getGenPackage() == genPackage) {%> - result.add(create<%=genItemType.getName()%>FromString(<%=genItemType.getQualifiedClassifierAccessor()%>, item)); - <%} else {%> - result.add(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genItemType.getQualifiedClassifierAccessor()%>, item)); - <%}%> - } - return result; - <%}%> - <%} else if (!genDataType.getMemberTypes().isEmpty()) {%> - <%if (genPackage.isDataTypeConverters()) {%> - <%if (genDataType.isPrimitiveType()) {%> - return new <%=genDataType.getObjectInstanceClassName()%>(create<%=genDataType.getName()%>(initialValue)); - <%} else {%> - return create<%=genDataType.getName()%>(initialValue); - <%}%> - <%} else {%> - if (initialValue == null) return null; - <%=genDataType.getObjectInstanceClassName()%> result = null; - RuntimeException exception = null; - <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%> - try - { - <%if (genMemberType.getGenPackage() == genPackage) {%> - result = (<%=genDataType.getObjectInstanceClassName()%>)create<%=genMemberType.getName()%>FromString(<%=genMemberType.getQualifiedClassifierAccessor()%>, initialValue); - <%} else {%> - result = (<%=genDataType.getObjectInstanceClassName()%>)<%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.createFromString(<%=genMemberType.getQualifiedClassifierAccessor()%>, initialValue); - <%}%> - if (result != null && <%=genModel.getImportedName("org.eclipse.emf.ecore.util.Diagnostician")%>.INSTANCE.validate(eDataType, result, null, null)) - { - return result; - } - } - catch (RuntimeException e) - { - exception = e; - } - <%}%> - if (result != null || exception == null) return result; - - throw exception; - <%}%> - <%} else if (genDataType.isArrayType()) {%> - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>(); - <%} else {%> - return (<%=genDataType.getObjectInstanceClassName()%>)super.createFromString(eDataType, initialValue); - <%}%> - } - -<%if (genPackage.isDataTypeConverters()) { String eDataType = genDataType.getQualifiedClassifierAccessor();%> - /** - * - * - * @generated - */ - public String convert<%=genDataType.getName()%>(<%=genDataType.getImportedInstanceClassName()%> instanceValue) - { - <%if (genDataType instanceof GenEnum) {%> - return instanceValue == null ? null : instanceValue.toString(); - <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();%> - <%if (genBaseType.getGenPackage() == genPackage) {%> - <%if (isPrimitiveConversion) {%> - return instanceValue == null ? null : convert<%=genBaseType.getName()%>(instanceValue.<%=genBaseType.getPrimitiveValueFunction()%>()); - <%} else {%> - return convert<%=genBaseType.getName()%>(instanceValue); - <%}%> - <%} else if (genBaseType.getGenPackage().isDataTypeConverters()) {%> - return <%=genBaseType.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.convert<%=genBaseType.getName()%>(instanceValue); - <%} else {%> - return <%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genBaseType.getQualifiedClassifierAccessor()%>, instanceValue); - <%}%> - <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %> - if (instanceValue == null) return null; - if (instanceValue.isEmpty()) return ""; - <%=genModel.getImportedName("java.lang.StringBuffer")%> result = new <%=genModel.getImportedName("java.lang.StringBuffer")%>(); - for (<%=genModel.getImportedName("java.util.Iterator")%> i = instanceValue.iterator(); i.hasNext(); ) - { - <%if (genItemType.getGenPackage() == genPackage) {%> - <%if (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();%> - result.append(convert<%=genItemType.getName()%>((<%=genItemType.getObjectInstanceClassName()%>)i.next())); - <%} else {%> - result.append(convert<%=genItemType.getName()%>ToString(<%=genItemType.getQualifiedClassifierAccessor()%>, i.next())); - <%}%> - <%} else {%> - <%if (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();%> - result.append(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convert<%=genItemType.getName()%>((<%=genItemType.getObjectInstanceClassName()%>)i.next())); - <%} else {%> - result.append(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genItemType.getQualifiedClassifierAccessor()%>, i.next())); - <%}%> - <%}%> - result.append(' '); - } - return result.substring(0, result.length() - 1); - <%} else if (!genDataType.getMemberTypes().isEmpty()) {%> - <%if (!genDataType.isPrimitiveType()) {%> - if (instanceValue == null) return null; - <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%> - if (<%=genMemberType.getQualifiedClassifierAccessor()%>.isInstance(instanceValue)) - { - try - { - <%if (genMemberType.getGenPackage() == genPackage) {%> - <%if (genPackage.isDataTypeConverters()) {%> - String value = convert<%=genMemberType.getName()%>(instanceValue); - <%} else {%> - String value = convert<%=genMemberType.getName()%>ToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, instanceValue); - <%}%> - <%} else {%> - <%if (genMemberType.getGenPackage().isDataTypeConverters()) { genMemberType = genMemberType.getObjectType();%> - String value = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convert<%=genMemberType.getName()%>((<%=genMemberType.getObjectInstanceClassName()%>)instanceValue); - <%} else {%> - String value = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, instanceValue); - <%}%> - <%}%> - if (value != null) return value; - } - catch (Exception e) - { - } - } - <%}%> - <%} else {%> - <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%> - try - { - <%if (genMemberType.getGenPackage() == genPackage) {%> - <%if (genPackage.isDataTypeConverters()) {%> - String value = convert<%=genMemberType.getName()%>(instanceValue); - <%} else {%> - String value = convert<%=genMemberType.getName()%>ToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, new <%=genMemberType.getObjectInstanceClassName()%>(instanceValue)); - <%}%> - <%} else {%> - <%if (genMemberType.getGenPackage().isDataTypeConverters()) {%> - String value = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convert<%=genMemberType.getName()%>(instanceValue); - <%} else {%> - String value = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, new <%=genMemberType.getObjectInstanceClassName()%>(instanceValue)); - <%}%> - <%}%> - if (value != null) return value; - } - catch (Exception e) - { - } - <%}%> - <%}%> - throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+<%=eDataType%>.getName()); - <%} else if (genDataType.isArrayType()) {%> - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>(); - <%} else if (genDataType.isPrimitiveType()) {%> - return super.convertToString(<%=eDataType%>, new <%=genDataType.getObjectInstanceClassName()%>(instanceValue)); - <%} else {%> - return super.convertToString(<%=eDataType%>, instanceValue); - <%}%> - } - -<%}%> - /** - * - * - * @generated - */ - public String convert<%=genDataType.getName()%>ToString(<%=genModel.getImportedName("org.eclipse.emf.ecore.EDataType")%> eDataType, Object instanceValue) - { - <%if (genDataType instanceof GenEnum) {%> - return instanceValue == null ? null : instanceValue.toString(); - <%} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); %> - <%if (genBaseType.getGenPackage() == genPackage) {%> - return convert<%=genBaseType.getName()%>ToString(<%=genBaseType.getQualifiedClassifierAccessor()%>, instanceValue); - <%} else {%> - return <%=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genBaseType.getQualifiedClassifierAccessor()%>, instanceValue); - <%}%> - <%} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); %> - <%if (genPackage.isDataTypeConverters()) {%> - return convert<%=genDataType.getName()%>((<%=genModel.getImportedName("java.util.List")%>)instanceValue); - <%} else {%> - if (instanceValue == null) return null; - <%=genModel.getImportedName("java.util.List")%> list = (<%=genModel.getImportedName("java.util.List")%>)instanceValue; - if (list.isEmpty()) return ""; - <%=genModel.getImportedName("java.lang.StringBuffer")%> result = new <%=genModel.getImportedName("java.lang.StringBuffer")%>(); - for (<%=genModel.getImportedName("java.util.Iterator")%> i = list.iterator(); i.hasNext(); ) - { - <%if (genItemType.getGenPackage() == genPackage) {%> - result.append(convert<%=genItemType.getName()%>ToString(<%=genItemType.getQualifiedClassifierAccessor()%>, i.next())); - <%} else {%> - result.append(<%=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genItemType.getQualifiedClassifierAccessor()%>, i.next())); - <%}%> - result.append(' '); - } - return result.substring(0, result.length() - 1); - <%}%> - <%} else if (!genDataType.getMemberTypes().isEmpty()) {%> - <%if (genPackage.isDataTypeConverters()) {%> - <%if (genDataType.isPrimitiveType()) {%> - return instanceValue == null ? null : convert<%=genDataType.getName()%>(((<%=genDataType.getObjectInstanceClassName()%>)instanceValue).<%=genDataType.getPrimitiveValueFunction()%>()); - <%} else {%> - return convert<%=genDataType.getName()%>(instanceValue); - <%}%> - <%} else {%> - if (instanceValue == null) return null; - <%for (Iterator j = genDataType.getMemberTypes().iterator(); j.hasNext(); ) { GenDataType genMemberType = (GenDataType)j.next();%> - if (<%=genMemberType.getQualifiedClassifierAccessor()%>.isInstance(instanceValue)) - { - try - { - <%if (genMemberType.getGenPackage() == genPackage) {%> - String value = convert<%=genMemberType.getName()%>ToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, instanceValue); - <%} else {%> - String value = <%=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()%>.convertToString(<%=genMemberType.getQualifiedClassifierAccessor()%>, instanceValue); - <%}%> - if (value != null) return value; - } - catch (Exception e) - { - } - } - <%}%> - throw new IllegalArgumentException("Invalid value: '"+instanceValue+"' for datatype :"+eDataType.getName()); - <%}%> - <%} else if (genDataType.isArrayType()) {%> - // TODO: implement this method - // Ensure that you remove @generated or mark it @generated NOT - throw new <%=genModel.getImportedName("java.lang.UnsupportedOperationException")%>(); - <%} else {%> - return super.convertToString(eDataType, instanceValue); - <%}%> - } - - <%}%> -<%}%> -<%} else {%> - <%for (Iterator i=genPackage.getGenClasses().iterator(); i.hasNext();) { GenClass genClass = (GenClass)i.next();%> - <%if (genClass.hasFactoryInterfaceCreateMethod()) {%> - /** - * Returns a new object of class '<%=genClass.getFormattedName()%>'. - * - * - * @return a new object of class '<%=genClass.getFormattedName()%>'. - * @generated - */ - <%=genClass.getImportedInterfaceName()%> create<%=genClass.getName()%>(); - - <%}%> - <%}%> - <%if (genPackage.isDataTypeConverters()) {%> - <%for (Iterator i=genPackage.getAllGenDataTypes().iterator(); i.hasNext();) { GenDataType genDataType = (GenDataType)i.next();%> - <%if (genDataType.isSerializable()) {%> - /** - * Returns an instance of data type '<%=genDataType.getFormattedName()%>' corresponding the given literal. - * - * - * @param literal a literal of the data type. - * @return a new instance value of the data type. - * @generated - */ - <%=genDataType.getImportedInstanceClassName()%> create<%=genDataType.getName()%>(String literal); - - /** - * Returns a literal representation of an instance of data type '<%=genDataType.getFormattedName()%>'. - * - * - * @param instanceValue an instance value of the data type. - * @return a literal representation of the instance value. - * @generated - */ - String convert<%=genDataType.getName()%>(<%=genDataType.getImportedInstanceClassName()%> instanceValue); - - <%}%> - <%}%> - <%}%> -<%}%> -} //<%=isInterface ? genPackage.getFactoryInterfaceName() : genPackage.getFactoryClassName()%> -<%genModel.emitSortedImports();%> -- cgit v1.2.3