From 5f9ef5ea15498d5c9dad2658c9de00cd3be2af8d Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Mon, 27 Sep 2010 16:17:26 +0000 Subject: [284307] Add support for streaming of large byte arrays / BLOB https://bugs.eclipse.org/bugs/show_bug.cgi?id=284307 --- .../META-INF/MANIFEST.MF | 1 + .../eclipse/emf/cdo/common/model/CDOModelUtil.java | 63 ++- .../org/eclipse/emf/cdo/common/model/CDOType.java | 4 + .../eclipse/emf/cdo/common/model/lob/CDOBlob.java | 54 ++ .../eclipse/emf/cdo/common/model/lob/CDOClob.java | 54 ++ .../eclipse/emf/cdo/common/model/lob/CDOLob.java | 88 ++++ .../emf/cdo/common/model/lob/CDOLobStore.java | 60 +++ .../emf/cdo/common/model/lob/CDOLobUtil.java | 57 ++ .../cdo/common/protocol/CDOProtocolConstants.java | 11 + .../emf/cdo/internal/common/model/CDOTypeImpl.java | 55 ++ .../emf/cdo/spi/common/model/CDOLobStoreImpl.java | 206 ++++++++ .../internal/net4j/protocol/CDOClientProtocol.java | 15 +- .../net4j/protocol/CommitDelegationRequest.java | 6 +- .../net4j/protocol/CommitTransactionRequest.java | 41 +- .../net4j/protocol/CommitXATransactionRequest.java | 2 +- .../internal/net4j/protocol/QueryLobsRequest.java | 57 ++ .../emf/cdo/server/internal/db/CDODBSchema.java | 26 + .../cdo/server/internal/db/DBStoreAccessor.java | 94 +++- .../server/internal/db/mapping/TypeMapping.java | 62 +++ .../server/internal/db4o/DB4OStoreAccessor.java | 19 + .../internal/hibernate/HibernateStoreAccessor.java | 19 + .../internal/net4j/protocol/CDOServerProtocol.java | 6 + .../protocol/CommitTransactionIndication.java | 1 + .../internal/net4j/protocol/LoadLobIndication.java | 41 ++ .../net4j/protocol/QueryLobsIndication.java | 53 ++ .../objectivity/ObjectivityStoreAccessor.java | 18 + .../emf/cdo/internal/server/Repository.java | 6 + .../internal/server/TransactionCommitContext.java | 13 + .../embedded/EmbeddedClientSessionProtocol.java | 11 +- .../cdo/internal/server/mem/MEMStoreAccessor.java | 22 + .../server/syncing/SynchronizableRepository.java | 5 +- .../org/eclipse/emf/cdo/server/IStoreAccessor.java | 32 ++ .../emf/cdo/spi/server/InternalCommitContext.java | 6 + .../emf/cdo/spi/server/InternalRepository.java | 5 + .../eclipse/emf/cdo/spi/server/StoreAccessor.java | 42 ++ .../org/eclipse/emf/cdo/tests/db/DBConfigs.java | 2 + .../model/model3-legacy.genmodel | 67 +++ .../model/model3.ecore | 9 + .../model/model3.genmodel | 41 +- .../model/model3.legacy-genmodel | 26 - .../emf/cdo/tests/legacy/model3/Model3Factory.java | 18 + .../emf/cdo/tests/legacy/model3/Model3Package.java | 573 ++++++++++++++------- .../cdo/tests/legacy/model3/impl/Class1Impl.java | 19 +- .../emf/cdo/tests/legacy/model3/impl/FileImpl.java | 241 +++++++++ .../cdo/tests/legacy/model3/impl/ImageImpl.java | 297 +++++++++++ .../cdo/tests/legacy/model3/impl/MetaRefImpl.java | 17 +- .../legacy/model3/impl/Model3FactoryImpl.java | 28 + .../legacy/model3/impl/Model3PackageImpl.java | 163 +++++- .../cdo/tests/legacy/model3/impl/NodeAImpl.java | 32 +- .../cdo/tests/legacy/model3/impl/NodeBImpl.java | 32 +- .../cdo/tests/legacy/model3/impl/NodeCImpl.java | 46 +- .../cdo/tests/legacy/model3/impl/NodeDImpl.java | 49 +- .../cdo/tests/legacy/model3/impl/PolygonImpl.java | 16 +- .../model3/impl/PolygonWithDuplicatesImpl.java | 16 +- .../model3/subpackage/SubpackageFactory.java | 13 +- .../model3/subpackage/SubpackagePackage.java | 50 +- .../legacy/model3/subpackage/impl/Class2Impl.java | 17 +- .../subpackage/impl/SubpackageFactoryImpl.java | 9 +- .../subpackage/impl/SubpackagePackageImpl.java | 30 +- .../subpackage/util/SubpackageAdapterFactory.java | 33 +- .../model3/subpackage/util/SubpackageSwitch.java | 26 +- .../legacy/model3/util/Model3AdapterFactory.java | 42 ++ .../cdo/tests/legacy/model3/util/Model3Switch.java | 68 +++ .../org/eclipse/emf/cdo/tests/model3/Class1.java | 19 +- .../src/org/eclipse/emf/cdo/tests/model3/File.java | 88 ++++ .../org/eclipse/emf/cdo/tests/model3/Image.java | 115 +++++ .../emf/cdo/tests/model3/Model3Factory.java | 59 ++- .../emf/cdo/tests/model3/Model3Package.java | 537 ++++++++++++------- .../org/eclipse/emf/cdo/tests/model3/NodeA.java | 25 +- .../org/eclipse/emf/cdo/tests/model3/NodeB.java | 35 +- .../org/eclipse/emf/cdo/tests/model3/NodeC.java | 55 +- .../org/eclipse/emf/cdo/tests/model3/NodeD.java | 61 ++- .../org/eclipse/emf/cdo/tests/model3/Polygon.java | 11 +- .../cdo/tests/model3/PolygonWithDuplicates.java | 11 +- .../emf/cdo/tests/model3/impl/Class1Impl.java | 10 +- .../emf/cdo/tests/model3/impl/FileImpl.java | 109 ++++ .../emf/cdo/tests/model3/impl/ImageImpl.java | 130 +++++ .../emf/cdo/tests/model3/impl/MetaRefImpl.java | 5 - .../cdo/tests/model3/impl/Model3FactoryImpl.java | 50 +- .../cdo/tests/model3/impl/Model3PackageImpl.java | 175 +++++-- .../emf/cdo/tests/model3/impl/NodeAImpl.java | 15 +- .../emf/cdo/tests/model3/impl/NodeBImpl.java | 16 +- .../emf/cdo/tests/model3/impl/NodeCImpl.java | 22 +- .../emf/cdo/tests/model3/impl/NodeDImpl.java | 23 +- .../emf/cdo/tests/model3/impl/PolygonImpl.java | 8 +- .../model3/impl/PolygonWithDuplicatesImpl.java | 8 +- .../emf/cdo/tests/model3/subpackage/Class2.java | 13 +- .../tests/model3/subpackage/SubpackageFactory.java | 13 +- .../tests/model3/subpackage/SubpackagePackage.java | 50 +- .../tests/model3/subpackage/impl/Class2Impl.java | 8 +- .../subpackage/impl/SubpackageFactoryImpl.java | 13 +- .../subpackage/impl/SubpackagePackageImpl.java | 30 +- .../subpackage/util/SubpackageAdapterFactory.java | 33 +- .../model3/subpackage/util/SubpackageSwitch.java | 26 +- .../tests/model3/util/Model3AdapterFactory.java | 80 ++- .../emf/cdo/tests/model3/util/Model3Switch.java | 118 +++-- .../src/org/eclipse/emf/cdo/tests/LobTest.java | 55 ++ .../.settings/org.eclipse.core.resources.prefs | 4 +- plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF | 2 + .../org.eclipse.emf.cdo/model/eresource.genmodel | 10 +- plugins/org.eclipse.emf.cdo/model/etypes.ecore | 8 + plugins/org.eclipse.emf.cdo/model/etypes.ecorediag | 19 + plugins/org.eclipse.emf.cdo/model/etypes.genmodel | 15 + .../org/eclipse/emf/cdo/etypes/EtypesFactory.java | 36 ++ .../org/eclipse/emf/cdo/etypes/EtypesPackage.java | 138 +++++ .../emf/cdo/etypes/impl/EtypesFactoryImpl.java | 177 +++++++ .../emf/cdo/etypes/impl/EtypesPackageImpl.java | 194 +++++++ .../emf/cdo/transaction/CDOCommitContext.java | 7 + .../emf/internal/cdo/session/CDOSessionImpl.java | 27 +- .../CDOSingleTransactionStrategyImpl.java | 6 +- .../cdo/transaction/CDOTransactionImpl.java | 49 +- .../cdo/transaction/CDOXACommitContextImpl.java | 7 + .../eclipse/emf/spi/cdo/CDOSessionProtocol.java | 12 +- .../org/eclipse/net4j/util/io/DigestWriter.java | 135 +++++ .../src/org/eclipse/net4j/util/io/IOUtil.java | 78 +++ 115 files changed, 5000 insertions(+), 1185 deletions(-) create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOBlob.java create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOClob.java create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLob.java create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobStore.java create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobUtil.java create mode 100644 plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/model/CDOLobStoreImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryLobsRequest.java create mode 100644 plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadLobIndication.java create mode 100644 plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/QueryLobsIndication.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/model/model3-legacy.genmodel delete mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy-genmodel create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/FileImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/ImageImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/File.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Image.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/FileImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/ImageImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java create mode 100644 plugins/org.eclipse.emf.cdo/model/etypes.ecore create mode 100644 plugins/org.eclipse.emf.cdo/model/etypes.ecorediag create mode 100644 plugins/org.eclipse.emf.cdo/model/etypes.genmodel create mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java create mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java create mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java create mode 100644 plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java create mode 100644 plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/DigestWriter.java diff --git a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF index 92e0e9d06b..fb25de5545 100644 --- a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF @@ -20,6 +20,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.0.0", org.eclipse.emf.cdo.common.commit;version="4.0.0", org.eclipse.emf.cdo.common.id;version="4.0.0", org.eclipse.emf.cdo.common.model;version="4.0.0", + org.eclipse.emf.cdo.common.model.lob;version="4.0.0", org.eclipse.emf.cdo.common.protocol;version="4.0.0", org.eclipse.emf.cdo.common.revision;version="4.0.0", org.eclipse.emf.cdo.common.revision.cache;version="4.0.0", diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOModelUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOModelUtil.java index 7022e2ac84..2be7589304 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOModelUtil.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOModelUtil.java @@ -55,6 +55,11 @@ public final class CDOModelUtil */ public static final String CORE_PACKAGE_URI = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$ + /** + * @since 2.0 + */ + public static final String ROOT_CLASS_NAME = "EObject"; //$NON-NLS-1$ + /** * @since 2.0 */ @@ -76,9 +81,19 @@ public final class CDOModelUtil public static final String RESOURCE_CLASS_NAME = "CDOResource"; //$NON-NLS-1$ /** - * @since 2.0 + * @since 4.0 */ - public static final String ROOT_CLASS_NAME = "EObject"; //$NON-NLS-1$ + public static final String TYPES_PACKAGE_URI = "http://www.eclipse.org/emf/CDO/Etypes/4.0.0"; //$NON-NLS-1$ + + /** + * @since 4.0 + */ + public static final String BLOB_CLASS_NAME = "Blob"; //$NON-NLS-1$ + + /** + * @since 4.0 + */ + public static final String CLOB_CLASS_NAME = "Clob"; //$NON-NLS-1$ private static CDOType[] coreTypes; @@ -134,6 +149,14 @@ public final class CDOModelUtil return CORE_PACKAGE_URI.equals(ePackage.getNsURI()); } + /** + * @since 2.0 + */ + public static boolean isRoot(EClass eClass) + { + return isCorePackage(eClass.getEPackage()) && ROOT_CLASS_NAME.equals(eClass.getName()); + } + /** * @since 2.0 */ @@ -177,11 +200,20 @@ public final class CDOModelUtil } /** - * @since 2.0 + * @since 4.0 */ - public static boolean isRoot(EClass eClass) + public static boolean isTypesPackage(EPackage ePackage) { - return isCorePackage(eClass.getEPackage()) && ROOT_CLASS_NAME.equals(eClass.getName()); + return TYPES_PACKAGE_URI.equals(ePackage.getNsURI()); + } + + /** + * @since 4.0 + */ + public static boolean isLob(EClassifier eClassifier) + { + return isTypesPackage(eClassifier.getEPackage()) + && (BLOB_CLASS_NAME.equals(eClassifier.getName()) || CLOB_CLASS_NAME.equals(eClassifier.getName())); } /** @@ -217,15 +249,32 @@ public final class CDOModelUtil return CDOType.ENUM_ORDINAL; } - if (isCorePackage(classifier.getEPackage())) + EDataType eDataType = (EDataType)classifier; + EPackage ePackage = eDataType.getEPackage(); + + if (isCorePackage(ePackage)) { - EDataType eDataType = (EDataType)classifier; CDOType type = getCoreType(eDataType); if (type != null) { return type; } } + else if (isTypesPackage(ePackage)) + { + String name = eDataType.getName(); + if (BLOB_CLASS_NAME.equals(name)) + { + return CDOType.BLOB; + } + + if (CLOB_CLASS_NAME.equals(name)) + { + return CDOType.CLOB; + } + + throw new IllegalArgumentException("Illegal data type: " + eDataType); + } return CDOType.CUSTOM; } diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOType.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOType.java index 286067bc54..fc31cb5bc5 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOType.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/CDOType.java @@ -90,6 +90,10 @@ public interface CDOType */ public static final CDOType ENUM_LITERAL = org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl.ENUM_LITERAL; + public static final CDOType BLOB = org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl.BLOB; + + public static final CDOType CLOB = org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl.CLOB; + public static final CDOType CUSTOM = org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl.CUSTOM; /** diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOBlob.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOBlob.java new file mode 100644 index 0000000000..1a5fb21011 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOBlob.java @@ -0,0 +1,54 @@ +package org.eclipse.emf.cdo.common.model.lob; + +import org.eclipse.emf.cdo.common.model.lob.CDOLobStore.Info; +import org.eclipse.emf.cdo.spi.common.model.CDOLobStoreImpl; + +import org.eclipse.net4j.util.io.ExtendedDataInput; + +import java.io.IOException; +import java.io.InputStream; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public final class CDOBlob extends CDOLob +{ + public CDOBlob(InputStream contents) throws IOException + { + super(contents, CDOLobStoreImpl.INSTANCE); + } + + public CDOBlob(InputStream contents, CDOLobStore store) throws IOException + { + super(contents, store); + } + + CDOBlob(byte[] id, long size) + { + super(id, size); + } + + CDOBlob(ExtendedDataInput in) throws IOException + { + super(in); + } + + @Override + public byte[] toArray() throws IOException + { + return getStore().getBinaryArray(getID()); + } + + @Override + protected Info put(InputStream contents) throws IOException + { + return getStore().putBinary(contents); + } + + @Override + protected InputStream get(byte[] id) throws IOException + { + return getStore().getBinary(id); + } +} diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOClob.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOClob.java new file mode 100644 index 0000000000..aff5b76374 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOClob.java @@ -0,0 +1,54 @@ +package org.eclipse.emf.cdo.common.model.lob; + +import org.eclipse.emf.cdo.common.model.lob.CDOLobStore.Info; +import org.eclipse.emf.cdo.spi.common.model.CDOLobStoreImpl; + +import org.eclipse.net4j.util.io.ExtendedDataInput; + +import java.io.IOException; +import java.io.Reader; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public final class CDOClob extends CDOLob +{ + public CDOClob(Reader contents) throws IOException + { + super(contents, CDOLobStoreImpl.INSTANCE); + } + + public CDOClob(Reader contents, CDOLobStore store) throws IOException + { + super(contents, store); + } + + CDOClob(byte[] id, long size) + { + super(id, size); + } + + CDOClob(ExtendedDataInput in) throws IOException + { + super(in); + } + + @Override + public char[] toArray() throws IOException + { + return getStore().getCharacterArray(getID()); + } + + @Override + protected Info put(Reader contents) throws IOException + { + return getStore().putCharacter(contents); + } + + @Override + protected Reader get(byte[] id) throws IOException + { + return getStore().getCharacter(id); + } +} diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLob.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLob.java new file mode 100644 index 0000000000..a0394cc2ce --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLob.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.common.model.lob; + +import org.eclipse.emf.cdo.common.model.lob.CDOLobStore.Info; + +import org.eclipse.net4j.util.io.ExtendedDataInput; +import org.eclipse.net4j.util.io.ExtendedDataOutput; + +import java.io.IOException; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public abstract class CDOLob +{ + private CDOLobStore store; + + private byte[] id; + + private long size; + + CDOLob(byte[] id, long size) + { + this.id = id; + this.size = size; + } + + CDOLob(IO contents, CDOLobStore store) throws IOException + { + this.store = store; + Info info = put(contents); + id = info.getID(); + size = info.getSize(); + } + + CDOLob(ExtendedDataInput in) throws IOException + { + id = in.readByteArray(); + size = in.readLong(); + } + + final void write(ExtendedDataOutput out) throws IOException + { + out.writeByteArray(id); + out.writeLong(size); + } + + final void setStore(CDOLobStore store) + { + this.store = store; + } + + public final CDOLobStore getStore() + { + return store; + } + + public final byte[] getID() + { + return id; + } + + public final long getSize() + { + return size; + } + + public final IO getContents() throws IOException + { + return get(id); + } + + public abstract ARRAY toArray() throws IOException; + + protected abstract Info put(IO contents) throws IOException; + + protected abstract IO get(byte[] id) throws IOException; +} diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobStore.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobStore.java new file mode 100644 index 0000000000..dbf3bf771c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobStore.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.common.model.lob; + +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public interface CDOLobStore +{ + public Info putBinary(InputStream contents) throws IOException; + + public InputStream getBinary(byte[] id) throws IOException; + + public byte[] getBinaryArray(byte[] id) throws IOException; + + public Info putCharacter(Reader contents) throws IOException; + + public Reader getCharacter(byte[] id) throws IOException; + + public char[] getCharacterArray(byte[] id) throws IOException; + + /** + * @author Eike Stepper + */ + public static final class Info + { + private byte[] id; + + private long size; + + public Info(byte[] id, long size) + { + this.id = id; + this.size = size; + } + + public byte[] getID() + { + return id; + } + + public long getSize() + { + return size; + } + } +} diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobUtil.java new file mode 100644 index 0000000000..774534e471 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/model/lob/CDOLobUtil.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.common.model.lob; + +import org.eclipse.net4j.util.io.ExtendedDataInput; +import org.eclipse.net4j.util.io.ExtendedDataOutput; + +import java.io.IOException; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public final class CDOLobUtil +{ + private CDOLobUtil() + { + } + + public static CDOBlob readBlob(ExtendedDataInput in) throws IOException + { + return new CDOBlob(in); + } + + public static CDOClob readClob(ExtendedDataInput in) throws IOException + { + return new CDOClob(in); + } + + public static void write(ExtendedDataOutput out, CDOLob lob) throws IOException + { + lob.write(out); + } + + public static CDOBlob createBlob(byte[] id, long size) + { + return new CDOBlob(id, size); + } + + public static CDOClob createClob(byte[] id, long size) + { + return new CDOClob(id, size); + } + + public static void setStore(CDOLobStore store, CDOLob lob) throws IOException + { + lob.setStore(store); + } +} diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java index bf2ce437b9..89abb5bd13 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java @@ -194,8 +194,19 @@ public interface CDOProtocolConstants */ public static final short SIGNAL_LOAD_MERGE_DATA = 44; + /** + * @since 4.0 + */ + public static final short SIGNAL_QUERY_LOBS = 45; + + /** + * @since 4.0 + */ + public static final short SIGNAL_LOAD_LOB = 46; + // ////////////////////////////////////////////////////////////////////// // Session Refresh + /** * @since 3.0 */ diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java index 80fe047874..4b252a743a 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/model/CDOTypeImpl.java @@ -14,6 +14,9 @@ package org.eclipse.emf.cdo.internal.common.model; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.model.CDOModelUtil; import org.eclipse.emf.cdo.common.model.CDOType; +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.common.model.lob.CDOLobUtil; import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.protocol.CDODataOutput; import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster; @@ -568,6 +571,58 @@ public abstract class CDOTypeImpl implements CDOType } }; + public static final CDOType BLOB = new CDOTypeImpl("BLOB", 2004, true) //$NON-NLS-1$ + { + public CDOBlob readValue(CDODataInput in) throws IOException + { + if (in.readBoolean()) + { + return CDOLobUtil.readBlob(in); + } + + return null; + } + + public void writeValue(CDODataOutput out, Object value) throws IOException + { + if (value != null) + { + out.writeBoolean(true); + CDOLobUtil.write(out, (CDOBlob)value); + } + else + { + out.writeBoolean(false); + } + } + }; + + public static final CDOType CLOB = new CDOTypeImpl("CLOB", 2005, true) //$NON-NLS-1$ + { + public CDOClob readValue(CDODataInput in) throws IOException + { + if (in.readBoolean()) + { + return CDOLobUtil.readClob(in); + } + + return null; + } + + public void writeValue(CDODataOutput out, Object value) throws IOException + { + if (value != null) + { + out.writeBoolean(true); + CDOLobUtil.write(out, (CDOClob)value); + } + else + { + out.writeBoolean(false); + } + } + }; + public static final CDOType CUSTOM = new CDOTypeImpl("CUSTOM", 999, true) //$NON-NLS-1$ { @Override diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/model/CDOLobStoreImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/model/CDOLobStoreImpl.java new file mode 100644 index 0000000000..c12333d576 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/model/CDOLobStoreImpl.java @@ -0,0 +1,206 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.spi.common.model; + +import org.eclipse.emf.cdo.common.model.lob.CDOLobStore; + +import org.eclipse.net4j.util.HexUtil; +import org.eclipse.net4j.util.WrappedException; +import org.eclipse.net4j.util.io.DigestWriter; +import org.eclipse.net4j.util.io.IORuntimeException; +import org.eclipse.net4j.util.io.IOUtil; +import org.eclipse.net4j.util.om.OMPlatform; + +import java.io.ByteArrayOutputStream; +import java.io.CharArrayWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; +import java.security.DigestOutputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +/** + * @author Eike Stepper + * @since 4.0 + */ +public class CDOLobStoreImpl implements CDOLobStore +{ + public static final CDOLobStore INSTANCE = new CDOLobStoreImpl(); + + private File folder; + + private int tempID; + + public CDOLobStoreImpl(File folder) + { + this.folder = folder; + if (!folder.exists()) + { + folder.mkdirs(); + if (!folder.exists()) + { + throw new IORuntimeException("Folder could not be created: " + folder); + } + + if (!folder.isDirectory()) + { + throw new IORuntimeException("Not a folder: " + folder); + } + } + } + + public CDOLobStoreImpl() + { + this(getDefaultFolder()); + } + + public File getFolder() + { + return folder; + } + + public Info putBinary(InputStream contents) throws IOException + { + File tempFile = getTempFile(); + MessageDigest digest = createDigest(); + digest.update("BINARY".getBytes()); + + FileOutputStream fos = null; + long size; + + try + { + fos = new FileOutputStream(tempFile); + DigestOutputStream dos = new DigestOutputStream(fos, digest); + size = IOUtil.copyBinary(contents, dos); + } + finally + { + IOUtil.close(fos); + } + + byte[] id = digest.digest(); + makePermanent(tempFile, getBinaryFile(id)); + return new Info(id, size); + } + + public InputStream getBinary(byte[] id) throws IOException + { + File file = getBinaryFile(id); + return new FileInputStream(file); + } + + public byte[] getBinaryArray(byte[] id) throws IOException + { + InputStream inputStream = getBinary(id); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + IOUtil.copyBinary(inputStream, baos); + return baos.toByteArray(); + } + + public Info putCharacter(Reader contents) throws IOException + { + File tempFile = getTempFile(); + MessageDigest digest = createDigest(); + digest.update("CHARACTER".getBytes()); + + FileWriter fw = null; + long size; + + try + { + fw = new FileWriter(tempFile); + DigestWriter dw = new DigestWriter(fw, digest); + size = IOUtil.copyCharacter(contents, dw); + } + finally + { + IOUtil.close(fw); + } + + byte[] id = digest.digest(); + makePermanent(tempFile, getCharacterFile(id)); + return new Info(id, size); + } + + public Reader getCharacter(byte[] id) throws IOException + { + File file = getCharacterFile(id); + return new FileReader(file); + } + + public char[] getCharacterArray(byte[] id) throws IOException + { + Reader reader = getCharacter(id); + CharArrayWriter caw = new CharArrayWriter(); + IOUtil.copyCharacter(reader, caw); + return caw.toCharArray(); + } + + protected MessageDigest createDigest() + { + try + { + return MessageDigest.getInstance("SHA-1"); + } + catch (NoSuchAlgorithmException ex) + { + throw WrappedException.wrap(ex); + } + } + + protected synchronized File getTempFile() + { + for (;;) + { + ++tempID; + File file = new File(folder, "contents" + tempID + ".tmp"); + if (!file.exists()) + { + return file; + } + } + } + + private File getBinaryFile(byte[] id) + { + return new File(folder, HexUtil.bytesToHex(id) + ".blob"); + } + + private File getCharacterFile(byte[] id) + { + return new File(folder, HexUtil.bytesToHex(id) + ".clob"); + } + + private void makePermanent(File tempFile, File file) + { + if (file.exists()) + { + tempFile.delete(); + } + else + { + tempFile.renameTo(file); + } + } + + private static File getDefaultFolder() + { + String path = OMPlatform.INSTANCE.getProperty("java.io.tmpdir"); + return new File(new File(path), "cdolobs"); + } +} diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java index 08ff5d5ca5..e34aa80cd4 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java @@ -23,6 +23,7 @@ import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDProvider; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; import org.eclipse.emf.cdo.common.util.TransportException; import org.eclipse.emf.cdo.internal.net4j.bundle.OM; @@ -253,17 +254,23 @@ public class CDOClientProtocol extends SignalProtocol implements CDO return send(new ObjectLockedRequest(this, view, object, lockType, byOthers)); } + public List queryLobs(Set ids) + { + return send(new QueryLobsRequest(this, ids)); + } + public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks, - CDOIDProvider idProvider, CDOCommitData commitData, OMMonitor monitor) + CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs, OMMonitor monitor) { - return send(new CommitTransactionRequest(this, transactionID, comment, releaseLocks, idProvider, commitData), + return send(new CommitTransactionRequest(this, transactionID, comment, releaseLocks, idProvider, commitData, lobs), monitor); } public CommitTransactionResult commitDelegation(CDOBranch branch, String userID, String comment, - CDOCommitData commitData, Map detachedObjectTypes, OMMonitor monitor) + CDOCommitData commitData, Map detachedObjectTypes, Collection> lobs, OMMonitor monitor) { - return send(new CommitDelegationRequest(this, branch, userID, comment, commitData, detachedObjectTypes), monitor); + return send(new CommitDelegationRequest(this, branch, userID, comment, commitData, detachedObjectTypes, lobs), + monitor); } public CommitTransactionResult commitXATransactionPhase1(InternalCDOXACommitContext xaContext, OMMonitor monitor) diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java index 37d2687cc9..84ac4d4419 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java @@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.common.commit.CDOCommitData; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDProvider; import org.eclipse.emf.cdo.common.id.CDOIDTemp; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDODataOutput; import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.MetaInstanceMapper; @@ -22,6 +23,7 @@ import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.MetaInsta import org.eclipse.emf.ecore.EClass; import java.io.IOException; +import java.util.Collection; import java.util.Map; /** @@ -38,10 +40,10 @@ public class CommitDelegationRequest extends CommitTransactionRequest private Map detachedObjectTypes; public CommitDelegationRequest(CDOClientProtocol protocol, CDOBranch branch, String userID, String comment, - CDOCommitData commitData, Map detachedObjectTypes) + CDOCommitData commitData, Map detachedObjectTypes, Collection> lobs) { super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_DELEGATION, UNKNOWN_TRANSACTION_ID, comment, false, - CDOIDProvider.NOOP, commitData); + CDOIDProvider.NOOP, commitData, lobs); this.branch = branch; this.userID = userID; diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java index 48110849dc..e7b36bb216 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java @@ -28,6 +28,9 @@ import org.eclipse.emf.cdo.common.id.CDOIDUtil; import org.eclipse.emf.cdo.common.model.CDOPackageInfo; import org.eclipse.emf.cdo.common.model.CDOPackageRegistry; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.protocol.CDODataOutput; import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; @@ -48,6 +51,7 @@ import org.eclipse.emf.internal.cdo.revision.CDOListWithElementProxiesImpl; import org.eclipse.net4j.signal.RequestWithMonitoring; import org.eclipse.net4j.util.io.ExtendedDataInputStream; import org.eclipse.net4j.util.io.ExtendedDataOutputStream; +import org.eclipse.net4j.util.io.IOUtil; import org.eclipse.net4j.util.io.StringIO; import org.eclipse.net4j.util.om.monitor.OMMonitor; import org.eclipse.net4j.util.om.trace.ContextTracer; @@ -57,6 +61,8 @@ import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult; import org.eclipse.emf.spi.cdo.InternalCDOSession; import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.Collection; import java.util.List; /** @@ -76,15 +82,19 @@ public class CommitTransactionRequest extends RequestWithMonitoring> lobs; + + private ExtendedDataOutputStream stream; + public CommitTransactionRequest(CDOClientProtocol protocol, int transactionID, String comment, boolean releaseLocks, - CDOIDProvider idProvider, CDOCommitData commitData) + CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs) { this(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION, transactionID, comment, releaseLocks, idProvider, - commitData); + commitData, lobs); } public CommitTransactionRequest(CDOClientProtocol protocol, short signalID, int transactionID, String comment, - boolean releaseLocks, CDOIDProvider idProvider, CDOCommitData commitData) + boolean releaseLocks, CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs) { super(protocol, signalID); this.transactionID = transactionID; @@ -92,6 +102,7 @@ public class CommitTransactionRequest extends RequestWithMonitoring lob : lobs) + { + out.writeByteArray(lob.getID()); + if (lob instanceof CDOBlob) + { + CDOBlob blob = (CDOBlob)lob; + out.writeLong(blob.getSize()); + IOUtil.copyBinary(blob.getContents(), stream); + } + else + { + CDOClob clob = (CDOClob)lob; + out.writeLong(-clob.getSize()); + IOUtil.copyCharacter(clob.getContents(), new OutputStreamWriter(stream)); + } + } } protected EClass getObjectType(CDOID id) diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitXATransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitXATransactionRequest.java index e55d079e42..b007a011ea 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitXATransactionRequest.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitXATransactionRequest.java @@ -23,7 +23,7 @@ public class CommitXATransactionRequest extends CommitTransactionRequest { super(protocol, signalID, xaContext.getTransaction().getViewID(), xaContext.getTransaction().getCommitComment(), xaContext.getTransaction().options().isAutoReleaseLocksEnabled(), xaContext.getTransaction(), xaContext - .getCommitData()); + .getCommitData(), xaContext.getLobs()); this.xaContext = xaContext; } diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryLobsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryLobsRequest.java new file mode 100644 index 0000000000..eabcbcfe65 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryLobsRequest.java @@ -0,0 +1,57 @@ +/*************************************************************************** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + **************************************************************************/ +package org.eclipse.emf.cdo.internal.net4j.protocol; + +import org.eclipse.emf.cdo.common.protocol.CDODataInput; +import org.eclipse.emf.cdo.common.protocol.CDODataOutput; +import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Eike Stepper + */ +public class QueryLobsRequest extends CDOClientRequest> +{ + private Collection ids; + + public QueryLobsRequest(CDOClientProtocol protocol, Collection ids) + { + super(protocol, CDOProtocolConstants.SIGNAL_QUERY_LOBS); + this.ids = ids; + } + + @Override + protected void requesting(CDODataOutput out) throws IOException + { + out.writeInt(ids.size()); + for (byte[] id : ids) + { + out.writeByteArray(id); + } + } + + @Override + protected List confirming(CDODataInput in) throws IOException + { + int size = in.readInt(); + List result = new ArrayList(size); + for (int i = 0; i < size; i++) + { + result.add(in.readByteArray()); + } + + return result; + } +} diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java index fd359f484f..722b280385 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java @@ -181,6 +181,32 @@ public class CDODBSchema extends DBSchema public static final IDBIndex INDEX_EXTERNAL_REFS_HASH = // EXTERNAL_REFS.addIndex(IDBIndex.Type.NON_UNIQUE, EXTERNAL_URI); + /** + * DBTable cdo_lobs + */ + public static final IDBTable LOBS = INSTANCE.addTable("cdo_lobs"); //$NON-NLS-1$ + + public static final IDBField LOBS_ID = // + LOBS.addField("id", DBType.CHAR, 40); //$NON-NLS-1$ + + public static final IDBField LOBS_SIZE = // + LOBS.addField("size", DBType.BIGINT); //$NON-NLS-1$ + + public static final IDBField LOBS_BDATA = // + LOBS.addField("bdata", DBType.BLOB); //$NON-NLS-1$ + + public static final IDBField LOBS_CDATA = // + LOBS.addField("cdata", DBType.CLOB); //$NON-NLS-1$ + + public static final IDBIndex INDEX_LOBS_ID = // + LOBS.addIndex(IDBIndex.Type.PRIMARY_KEY, LOBS_ID); + + public static final String SQL_QUERY_LOBS = "SELECT 1 FROM " + CDODBSchema.LOBS + " WHERE " + CDODBSchema.LOBS_ID + "=?"; //$NON-NLS-1$ + + public static final String SQL_WRITE_BLOB = "INSERT INTO " + CDODBSchema.LOBS + "(" + CDODBSchema.LOBS_ID + ", " + CDODBSchema.LOBS_SIZE + ", " + CDODBSchema.LOBS_BDATA + " VALUES(?, ?, ?)"; //$NON-NLS-1$ + + public static final String SQL_WRITE_CLOB = "INSERT INTO " + CDODBSchema.LOBS + "(" + CDODBSchema.LOBS_ID + ", " + CDODBSchema.LOBS_SIZE + ", " + CDODBSchema.LOBS_CDATA + " VALUES(?, ?, ?)"; //$NON-NLS-1$ + /** * Name of object table */ diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java index 84c34bb11c..10a805500c 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java @@ -63,6 +63,7 @@ import org.eclipse.emf.cdo.spi.server.LongIDStoreAccessor; import org.eclipse.net4j.db.DBException; import org.eclipse.net4j.db.DBUtil; +import org.eclipse.net4j.util.HexUtil; import org.eclipse.net4j.util.ObjectUtil; import org.eclipse.net4j.util.StringUtil; import org.eclipse.net4j.util.collection.CloseableIterator; @@ -76,6 +77,8 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EStructuralFeature; import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -84,6 +87,7 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.TimerTask; @@ -134,7 +138,7 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce /** * Returns an iterator that iterates over all objects in the store and makes their CDOIDs available for processing. * This method is supposed to be called very infrequently, for example during the recovery from a crash. - * + * * @since 2.0 * @deprecated Not used by the framework anymore. */ @@ -295,6 +299,44 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce return null; } + public void queryLobs(List ids) + { + PreparedStatement pstmt = null; + ResultSet resultSet = null; + + try + { + pstmt = statementCache.getPreparedStatement(CDODBSchema.SQL_QUERY_LOBS, ReuseProbability.MEDIUM); + + for (Iterator it = ids.iterator(); it.hasNext();) + { + byte[] id = it.next(); + pstmt.setString(1, HexUtil.bytesToHex(id)); + + try + { + resultSet = pstmt.executeQuery(); + if (!resultSet.next()) + { + it.remove(); + } + } + finally + { + DBUtil.close(resultSet); + } + } + } + catch (SQLException ex) + { + throw new DBException(ex); + } + finally + { + statementCache.releasePreparedStatement(pstmt); + } + } + @Override protected void applyIDMappings(InternalCommitContext context, OMMonitor monitor) { @@ -453,6 +495,54 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce return connection; } + @Override + protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException + { + PreparedStatement pstmt = null; + + try + { + pstmt = statementCache.getPreparedStatement(CDODBSchema.SQL_WRITE_BLOB, ReuseProbability.HIGH); + pstmt.setString(1, HexUtil.bytesToHex(id)); + pstmt.setLong(2, size); + pstmt.setBinaryStream(3, inputStream, (int)size); + + CDODBUtil.sqlUpdate(pstmt, true); + } + catch (SQLException ex) + { + throw new DBException(ex); + } + finally + { + statementCache.releasePreparedStatement(pstmt); + } + } + + @Override + protected void writeClob(byte[] id, long size, Reader reader) throws IOException + { + PreparedStatement pstmt = null; + + try + { + pstmt = statementCache.getPreparedStatement(CDODBSchema.SQL_WRITE_CLOB, ReuseProbability.HIGH); + pstmt.setString(1, HexUtil.bytesToHex(id)); + pstmt.setLong(2, size); + pstmt.setCharacterStream(3, reader, (int)size); + + CDODBUtil.sqlUpdate(pstmt, true); + } + catch (SQLException ex) + { + throw new DBException(ex); + } + finally + { + statementCache.releasePreparedStatement(pstmt); + } + } + @Override protected final void doCommit(OMMonitor monitor) { @@ -845,7 +935,7 @@ public class DBStoreAccessor extends LongIDStoreAccessor implements IDBStoreAcce *
  • The timeStamp parameter is {@link CDOBranchPoint#UNSPECIFIED_DATE} or equal to * revision.getTimeStamp(). * - * + * * @since 3.0 */ public void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, CDORevisionHandler handler) diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMapping.java index cbcfbc65c0..2e3903535f 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMapping.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMapping.java @@ -17,6 +17,9 @@ package org.eclipse.emf.cdo.server.internal.db.mapping; import org.eclipse.emf.cdo.common.id.CDOID; +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.common.model.lob.CDOLobUtil; import org.eclipse.emf.cdo.common.revision.CDORevisionData; import org.eclipse.emf.cdo.server.IStoreAccessor; import org.eclipse.emf.cdo.server.IStoreAccessor.CommitContext; @@ -36,6 +39,7 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision; import org.eclipse.net4j.db.DBType; import org.eclipse.net4j.db.ddl.IDBField; import org.eclipse.net4j.db.ddl.IDBTable; +import org.eclipse.net4j.util.HexUtil; import org.eclipse.net4j.util.om.trace.ContextTracer; import org.eclipse.emf.common.util.Enumerator; @@ -330,6 +334,64 @@ public abstract class TypeMapping implements ITypeMapping } } + /** + * @author Eike Stepper + */ + public static class TMBlob extends TypeMapping + { + public TMBlob(IMappingStrategy strategy, EStructuralFeature feature, DBType type) + { + super(strategy, feature, type); + } + + @Override + protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException + { + CDOBlob blob = (CDOBlob)value; + stmt.setString(index, HexUtil.bytesToHex(blob.getID()) + "-" + blob.getSize()); + } + + @Override + public Object getResultSetValue(ResultSet resultSet) throws SQLException + { + String str = resultSet.getString(getField().getName()); + int pos = str.indexOf('-'); + + byte[] id = HexUtil.hexToBytes(str.substring(0, pos)); + long size = Long.parseLong(str.substring(pos + 1)); + return CDOLobUtil.createBlob(id, size); + } + } + + /** + * @author Eike Stepper + */ + public static class TMClob extends TypeMapping + { + public TMClob(IMappingStrategy strategy, EStructuralFeature feature, DBType type) + { + super(strategy, feature, type); + } + + @Override + protected void doSetValue(PreparedStatement stmt, int index, Object value) throws SQLException + { + CDOClob clob = (CDOClob)value; + stmt.setString(index, HexUtil.bytesToHex(clob.getID()) + "-" + clob.getSize()); + } + + @Override + public Object getResultSetValue(ResultSet resultSet) throws SQLException + { + String str = resultSet.getString(getField().getName()); + int pos = str.indexOf('-'); + + byte[] id = HexUtil.hexToBytes(str.substring(0, pos)); + long size = Long.parseLong(str.substring(pos + 1)); + return CDOLobUtil.createClob(id, size); + } + } + /** * @author Eike Stepper */ diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java index 89739c9d44..882e425dcf 100644 --- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OStoreAccessor.java @@ -55,6 +55,8 @@ import com.db4o.ObjectSet; import com.db4o.query.Predicate; import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -371,6 +373,23 @@ public class DB4OStoreAccessor extends LongIDStoreAccessor throw new UnsupportedOperationException(); } + public void queryLobs(List ids) + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeClob(byte[] id, long size, Reader reader) throws IOException + { + throw new UnsupportedOperationException(); + } + public int createBranch(int branchID, BranchInfo branchInfo) { throw new UnsupportedOperationException(); diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java index 5b3160b2ff..9834b805d7 100644 --- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateStoreAccessor.java @@ -61,6 +61,8 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -719,6 +721,23 @@ public class HibernateStoreAccessor extends StoreAccessor implements IHibernateS throw new UnsupportedOperationException(); } + public void queryLobs(List ids) + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeClob(byte[] id, long size, Reader reader) throws IOException + { + throw new UnsupportedOperationException(); + } + @Override protected void doDeactivate() throws Exception { diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java index 7669b0131b..8e6713829f 100644 --- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java +++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java @@ -200,6 +200,12 @@ public class CDOServerProtocol extends SignalProtocol implement case CDOProtocolConstants.SIGNAL_LOAD_CHUNK: return new LoadChunkIndication(this); + case CDOProtocolConstants.SIGNAL_QUERY_LOBS: + return new QueryLobsIndication(this); + + case CDOProtocolConstants.SIGNAL_LOAD_LOB: + return new LoadLobIndication(this); + case CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION: return new CommitTransactionIndication(this); diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java index b0d3c8325a..c6a694ce58 100644 --- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java +++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java @@ -294,6 +294,7 @@ public class CommitTransactionIndication extends IndicationWithMonitoring commitContext.setDetachedObjects(detachedObjects); commitContext.setDetachedObjectTypes(detachedObjectTypes); commitContext.setCommitComment(commitComment); + commitContext.setLobs(in); } finally { diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadLobIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadLobIndication.java new file mode 100644 index 0000000000..77bfc9d623 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LoadLobIndication.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.server.internal.net4j.protocol; + +import org.eclipse.emf.cdo.common.protocol.CDODataInput; +import org.eclipse.emf.cdo.common.protocol.CDODataOutput; +import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; + +import java.io.IOException; + +/** + * @author Eike Stepper + */ +public class LoadLobIndication extends CDOReadIndication +{ + private byte[] id; + + public LoadLobIndication(CDOServerProtocol protocol) + { + super(protocol, CDOProtocolConstants.SIGNAL_LOAD_LOB); + } + + @Override + protected void indicating(CDODataInput in) throws IOException + { + id = in.readByteArray(); + } + + @Override + protected void responding(CDODataOutput out) throws IOException + { + } +} diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/QueryLobsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/QueryLobsIndication.java new file mode 100644 index 0000000000..484528b664 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/QueryLobsIndication.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.server.internal.net4j.protocol; + +import org.eclipse.emf.cdo.common.protocol.CDODataInput; +import org.eclipse.emf.cdo.common.protocol.CDODataOutput; +import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author Eike Stepper + */ +public class QueryLobsIndication extends CDOReadIndication +{ + private List ids = new ArrayList(); + + public QueryLobsIndication(CDOServerProtocol protocol) + { + super(protocol, CDOProtocolConstants.SIGNAL_QUERY_LOBS); + } + + @Override + protected void indicating(CDODataInput in) throws IOException + { + int size = in.readInt(); + for (int i = 0; i < size; i++) + { + ids.add(in.readByteArray()); + } + } + + @Override + protected void responding(CDODataOutput out) throws IOException + { + getRepository().queryLobs(ids); + out.writeInt(ids.size()); + for (byte[] id : ids) + { + out.writeByteArray(id); + } + } +} diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java index ab61ce12dd..cb7e40f29f 100644 --- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/ObjectivityStoreAccessor.java @@ -77,6 +77,8 @@ import com.objy.db.app.ooId; import com.objy.db.app.ooObj; import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; @@ -1240,4 +1242,20 @@ public class ObjectivityStoreAccessor extends StoreAccessor implements IObjectiv throw new UnsupportedOperationException(); } + public void queryLobs(List ids) + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException + { + throw new UnsupportedOperationException(); + } + + @Override + protected void writeClob(byte[] id, long size, Reader reader) throws IOException + { + throw new UnsupportedOperationException(); + } } diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java index 97fc58b404..40230b0dc9 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java @@ -1238,6 +1238,12 @@ public class Repository extends Container implements InternalRepository return revision; } + public void queryLobs(List ids) + { + IStoreAccessor accessor = StoreThreadLocal.getAccessor(); + accessor.queryLobs(ids); + } + @Override public String toString() { diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java index b00dac90bc..da23556986 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java @@ -24,6 +24,7 @@ import org.eclipse.emf.cdo.common.id.CDOIDTemp; import org.eclipse.emf.cdo.common.id.CDOIDUtil; import org.eclipse.emf.cdo.common.model.CDOModelUtil; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -138,6 +139,8 @@ public class TransactionCommitContext implements InternalCommitContext private boolean autoReleaseLocksEnabled; + private CDODataInput lobs; + public TransactionCommitContext(InternalTransaction transaction) { this.transaction = transaction; @@ -362,6 +365,16 @@ public class TransactionCommitContext implements InternalCommitContext this.commitComment = commitComment; } + public CDODataInput getLobs() + { + return lobs; + } + + public void setLobs(CDODataInput in) + { + lobs = in; + } + /** * @since 2.0 */ diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java index 3d27598638..56c70f1e1c 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/embedded/EmbeddedClientSessionProtocol.java @@ -24,6 +24,7 @@ import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDAndVersion; import org.eclipse.emf.cdo.common.id.CDOIDProvider; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDOAuthenticationResult; import org.eclipse.emf.cdo.common.protocol.CDOAuthenticator; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -312,8 +313,14 @@ public class EmbeddedClientSessionProtocol extends Lifecycle implements CDOSessi throw new UnsupportedOperationException(); } + public List queryLobs(Set ids) + { + // TODO: implement EmbeddedClientSessionProtocol.queryLobs(ids) + throw new UnsupportedOperationException(); + } + public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks, - CDOIDProvider idProvider, CDOCommitData commitData, OMMonitor monitor) + CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs, OMMonitor monitor) { monitor.begin(2); boolean success = false; @@ -380,7 +387,7 @@ public class EmbeddedClientSessionProtocol extends Lifecycle implements CDOSessi } public CommitTransactionResult commitDelegation(CDOBranch branch, String userID, String comment, - CDOCommitData commitData, Map detachedObjectTypes, OMMonitor monitor) + CDOCommitData commitData, Map detachedObjectTypes, Collection> lobs, OMMonitor monitor) { throw new UnsupportedOperationException(); } diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java index 72ae79a532..da5542b440 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStoreAccessor.java @@ -42,6 +42,8 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EStructuralFeature; import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -353,6 +355,26 @@ public class MEMStoreAccessor extends LongIDStoreAccessor throw new UnsupportedOperationException(); } + public void queryLobs(List ids) + { + // TODO: implement MEMStoreAccessor.queryLobs(ids) + throw new UnsupportedOperationException(); + } + + @Override + protected void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException + { + // TODO: implement MEMStoreAccessor.writeBlob(id, size, in) + throw new UnsupportedOperationException(); + } + + @Override + protected void writeClob(byte[] id, long size, Reader reader) throws IOException + { + // TODO: implement MEMStoreAccessor.writeClob(id, size, reader) + throw new UnsupportedOperationException(); + } + @Override protected void doActivate() throws Exception { diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java index c3bb10ede7..48bfa706a8 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/syncing/SynchronizableRepository.java @@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDAndVersion; import org.eclipse.emf.cdo.common.model.CDOPackageInfo; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -52,6 +53,7 @@ import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult; import java.io.IOException; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -501,11 +503,12 @@ public abstract class SynchronizableRepository extends Repository.Default implem String userID = getUserID(); String comment = getCommitComment(); CDOCommitData commitData = new CommitContextData(this); + Collection> lobs = Collections.emptySet(); // Delegate commit to the master CDOSessionProtocol sessionProtocol = getSynchronizer().getRemoteSession().getSessionProtocol(); CommitTransactionResult result = sessionProtocol.commitDelegation(branch, userID, comment, commitData, - getDetachedObjectTypes(), monitor); + getDetachedObjectTypes(), lobs, monitor); // Stop if commit to master failed String rollbackMessage = result.getRollbackMessage(); diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java index 7e1678d7c3..75ddbf29e8 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java @@ -15,6 +15,9 @@ import org.eclipse.emf.cdo.common.branch.CDOBranchPoint; import org.eclipse.emf.cdo.common.branch.CDOBranchVersion; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDMetaRange; +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.protocol.CDODataOutput; import org.eclipse.emf.cdo.common.revision.CDORevisionHandler; @@ -31,6 +34,7 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta; import org.eclipse.emf.cdo.spi.server.InternalCommitContext; import org.eclipse.emf.cdo.spi.server.InternalSession; +import org.eclipse.net4j.util.io.IOUtil; import org.eclipse.net4j.util.om.monitor.OMMonitor; import org.eclipse.emf.ecore.EClass; @@ -152,6 +156,11 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com */ public void queryXRefs(QueryXRefsContext context); + /** + * @since 4.0 + */ + public void queryLobs(List ids); + /** * @since 2.0 */ @@ -298,6 +307,29 @@ public interface IStoreAccessor extends IQueryHandlerProvider, BranchLoader, Com */ public Map getDetachedObjectTypes(); + /** + * Returns a stream that all {@link CDOLob lobs} can be read from. The format of the data delivered through the + * stream is: + *

    + *

      + *
    1. {@link CDODataInput#readInt() int}: the number of lobs to be read from the stream. + *
    2. The following data can be read from the stream in a loop with one iteration per lob in the stream: + *
        + *
      1. {@link CDODataInput#readByteArray() int + byte[]}: the id of the lob (prepended by the size of the id). + *
      2. {@link CDODataInput#readLong() long}: the size of the lob. The foollowing interpretation applies: + *
          + *
        • A positive size indicates a {@link CDOBlob blob} and means the number of bytes that can be + * {@link IOUtil#copyBinary(java.io.InputStream, java.io.OutputStream) read}. + *
        • A negative size indicates a {@link CDOClob clob} and means the number of characters that can be + * {@link IOUtil#copyCharacter(java.io.InputStream, java.io.Writer) read}. + *
        + *
      + *
    + * + * @since 4.0 + */ + public CDODataInput getLobs(); + /** * Returns an unmodifiable map from all temporary IDs (meta or not) to their persistent counter parts. It is * initially populated with the mappings of all new meta objects. diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java index 03ede81086..dec1e06798 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java @@ -11,6 +11,7 @@ package org.eclipse.emf.cdo.spi.server; import org.eclipse.emf.cdo.common.id.CDOID; +import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.server.IStoreAccessor; import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit; import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision; @@ -84,6 +85,11 @@ public interface InternalCommitContext extends IStoreAccessor.CommitContext public void setCommitComment(String comment); + /** + * @since 4.0 + */ + public void setLobs(CDODataInput in); + public void addIDMapping(CDOID oldID, CDOID newID); public void applyIDMappings(OMMonitor monitor); diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java index 2175efb85b..941fead6c1 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java @@ -114,4 +114,9 @@ public interface InternalRepository extends IRepository, PackageLoader, BranchLo public Set getMergeData(CDORevisionAvailabilityInfo ancestorInfo, CDORevisionAvailabilityInfo targetInfo, CDORevisionAvailabilityInfo sourceInfo); + + /** + * @since 4.0 + */ + public void queryLobs(List ids); } diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java index 33ff8c306f..05aaa2f952 100644 --- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java +++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java @@ -20,6 +20,7 @@ import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDAndVersion; import org.eclipse.emf.cdo.common.id.CDOIDTemp; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionHandler; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -37,10 +38,15 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision; import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta; import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager; +import org.eclipse.net4j.util.WrappedException; import org.eclipse.net4j.util.lifecycle.Lifecycle; import org.eclipse.net4j.util.om.monitor.OMMonitor; import org.eclipse.net4j.util.om.trace.ContextTracer; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.util.ArrayList; import java.util.List; @@ -191,6 +197,32 @@ public abstract class StoreAccessor extends Lifecycle implements IStoreAccessor writeRevisions(context.getDirtyObjects(), branch, monitor.fork(dirtyCount)); } } + + CDODataInput in = context.getLobs(); + if (in != null) + { + try + { + int count = in.readInt(); + for (int i = 0; i < count; i++) + { + byte[] id = in.readByteArray(); + long size = in.readLong(); + if (size > 0) + { + writeBlob(id, size, (InputStream)in); + } + else + { + writeClob(id, -size, new InputStreamReader((InputStream)in)); + } + } + } + catch (IOException ex) + { + throw WrappedException.wrap(ex); + } + } } finally { @@ -295,6 +327,16 @@ public abstract class StoreAccessor extends Lifecycle implements IStoreAccessor */ protected abstract void detachObjects(CDOID[] detachedObjects, CDOBranch branch, long timeStamp, OMMonitor monitor); + /** + * @since 4.0 + */ + protected abstract void writeBlob(byte[] id, long size, InputStream inputStream) throws IOException; + + /** + * @since 4.0 + */ + protected abstract void writeClob(byte[] id, long size, Reader reader) throws IOException; + @Override protected abstract void doActivate() throws Exception; diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java index 5b9ca965fa..b098fa0f0a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java +++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/DBConfigs.java @@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.tests.BranchingTest; import org.eclipse.emf.cdo.tests.BranchingTestSameSession; import org.eclipse.emf.cdo.tests.ExternalReferenceTest; import org.eclipse.emf.cdo.tests.FeatureMapTest; +import org.eclipse.emf.cdo.tests.LobTest; import org.eclipse.emf.cdo.tests.MEMStoreQueryTest; import org.eclipse.emf.cdo.tests.MergingTest; import org.eclipse.emf.cdo.tests.XATransactionTest; @@ -37,6 +38,7 @@ public abstract class DBConfigs extends AllConfigs @Override protected void initTestClasses(List> testClasses) { + testClasses.add(LobTest.class); testClasses.add(Net4jDBTest.class); testClasses.add(DBAnnotationsTest.class); testClasses.add(DBStoreTest.class); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3-legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3-legacy.genmodel new file mode 100644 index 0000000000..a7efe273a8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3-legacy.genmodel @@ -0,0 +1,67 @@ + + + model3.ecore + CDO=org.eclipse.emf.cdo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore index 0fc468f2f6..93df85d14f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore +++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore @@ -55,6 +55,15 @@ + + + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel index ce55e35c5f..b2e4808898 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel +++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel @@ -5,19 +5,54 @@ modelDirectory="/org.eclipse.emf.cdo.tests.model3/src" editDirectory="" editorDirectory="" modelPluginID="org.eclipse.emf.cdo.tests.model3" modelName="Model3" updateClasspath="false" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true" - codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.cdo" - featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"> + codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore" + featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.emf.cdo/model/etypes.genmodel#//etypes"> model3.ecore CDO=org.eclipse.emf.cdo + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy-genmodel b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy-genmodel deleted file mode 100644 index c5118bbbc6..0000000000 --- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy-genmodel +++ /dev/null @@ -1,26 +0,0 @@ - - - model3.ecore - CDO=org.eclipse.emf.cdo - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java index 5913fe31a2..4d3c6b02bb 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java @@ -11,6 +11,8 @@ package org.eclipse.emf.cdo.tests.legacy.model3; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; @@ -99,6 +101,22 @@ public interface Model3Factory extends org.eclipse.emf.cdo.tests.model3.Model3Fa */ NodeD createNodeD(); + /** + * Returns a new object of class 'Image'. + * + * @return a new object of class 'Image'. + * @generated + */ + Image createImage(); + + /** + * Returns a new object of class 'File'. + * + * @return a new object of class 'File'. + * @generated + */ + File createFile(); + /** * Returns the package supported by this factory. * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java index 1640dad4ef..a2229a26f0 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java @@ -24,7 +24,6 @@ import org.eclipse.emf.ecore.EReference; *
  • and each data type
  • * * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.Model3Factory * @model kind="package" * @generated @@ -32,8 +31,8 @@ import org.eclipse.emf.ecore.EReference; public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Package { /** - * The package name. - * + * The package name. + * * @generated */ String eNAME = "model3"; @@ -46,15 +45,15 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/model3/1.0.0"; /** - * The package namespace name. - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "model3"; /** - * The singleton instance of the package. - * + * The singleton instance of the package. + * * @generated */ Model3Package eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl.init(); @@ -62,7 +61,6 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl Class1}' class. * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getClass1() * @generated @@ -70,25 +68,24 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int CLASS1 = 0; /** - * The feature id for the 'Class2' reference list. - * + * The feature id for the 'Class2' reference list. + * * @generated * @ordered */ int CLASS1__CLASS2 = 0; /** - * The number of structural features of the 'Class1' class. - * + * The number of structural features of the 'Class1' class. + * * @generated * @ordered */ int CLASS1_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl Meta Ref}' - * class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl Meta Ref}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getMetaRef() * @generated @@ -96,25 +93,24 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int META_REF = 1; /** - * The feature id for the 'EPackage Ref' reference. - * + * The feature id for the 'EPackage Ref' reference. + * * @generated * @ordered */ int META_REF__EPACKAGE_REF = 0; /** - * The number of structural features of the 'Meta Ref' class. - * + * The number of structural features of the 'Meta Ref' class. + * * @generated * @ordered */ int META_REF_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl Polygon}' - * class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl Polygon}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPolygon() * @generated @@ -122,25 +118,24 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int POLYGON = 2; /** - * The feature id for the 'Points' attribute list. - * + * The feature id for the 'Points' attribute list. + * * @generated * @ordered */ int POLYGON__POINTS = 0; /** - * The number of structural features of the 'Polygon' class. - * + * The number of structural features of the 'Polygon' class. + * * @generated * @ordered */ int POLYGON_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl - * Polygon With Duplicates}' class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl Polygon With Duplicates}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPolygonWithDuplicates() * @generated @@ -148,17 +143,17 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int POLYGON_WITH_DUPLICATES = 3; /** - * The feature id for the 'Points' attribute list. - * + * The feature id for the 'Points' attribute list. + * * @generated * @ordered */ int POLYGON_WITH_DUPLICATES__POINTS = 0; /** - * The number of structural features of the 'Polygon With Duplicates' class. - * * @generated * @ordered */ @@ -167,7 +162,6 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl Node A}' class. * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeA() * @generated @@ -175,33 +169,33 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int NODE_A = 4; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_A__CHILDREN = 0; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_A__NAME = 1; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ int NODE_A__OTHER_NODES = 2; /** - * The number of structural features of the 'Node A' class. - * + * The number of structural features of the 'Node A' class. + * * @generated * @ordered */ @@ -210,7 +204,6 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl Node B}' class. * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeB() * @generated @@ -218,33 +211,33 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int NODE_B = 5; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_B__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_B__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_B__NAME = 2; /** - * The number of structural features of the 'Node B' class. - * + * The number of structural features of the 'Node B' class. + * * @generated * @ordered */ @@ -253,7 +246,6 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl Node C}' class. * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeC() * @generated @@ -261,33 +253,33 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int NODE_C = 6; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_C__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_C__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_C__NAME = 2; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ @@ -303,8 +295,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int NODE_C__OPPOSITE_NODES = 4; /** - * The number of structural features of the 'Node C' class. - * + * The number of structural features of the 'Node C' class. + * * @generated * @ordered */ @@ -313,7 +305,6 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl Node D}' class. * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeD() * @generated @@ -321,62 +312,145 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa int NODE_D = 7; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_D__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_D__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_D__NAME = 2; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ int NODE_D__OTHER_NODES = 3; /** - * The feature id for the 'Opposite Node' reference. - * + * The feature id for the 'Opposite Node' reference. + * * @generated * @ordered */ int NODE_D__OPPOSITE_NODE = 4; /** - * The number of structural features of the 'Node D' class. - * + * The number of structural features of the 'Node D' class. + * * @generated * @ordered */ int NODE_D_FEATURE_COUNT = 5; /** - * The meta object id for the 'Point' data type. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl Image}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getImage() + * @generated + */ + int IMAGE = 8; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__WIDTH = 0; + + /** + * The feature id for the 'Height' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__HEIGHT = 1; + + /** + * The feature id for the 'Data' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__DATA = 2; + + /** + * The number of structural features of the 'Image' class. + * + * + * @generated + * @ordered + */ + int IMAGE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl File}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getFile() + * @generated + */ + int FILE = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int FILE__NAME = 0; + + /** + * The feature id for the 'Data' attribute. + * + * + * @generated + * @ordered + */ + int FILE__DATA = 1; + + /** + * The number of structural features of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_FEATURE_COUNT = 2; + + /** + * The meta object id for the 'Point' data type. + * * @see org.eclipse.emf.cdo.tests.model3.Point * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPoint() * @generated */ - int POINT = 8; + int POINT = 10; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Class1 Class1}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.Class1#getClass2 Class2}'. + * * @return the meta object for the reference list 'Class2'. * @see org.eclipse.emf.cdo.tests.legacy.model3.Class1#getClass2() * @see #getClass1() @@ -410,9 +483,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getMetaRef(); /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model3.MetaRef#getEPackageRef - * EPackage Ref}'. - * + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model3.MetaRef#getEPackageRef EPackage Ref}'. + * * @return the meta object for the reference 'EPackage Ref'. * @see org.eclipse.emf.cdo.tests.legacy.model3.MetaRef#getEPackageRef() * @see #getMetaRef() @@ -431,9 +503,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getPolygon(); /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.legacy.model3.Polygon#getPoints - * Points}'. - * + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.legacy.model3.Polygon#getPoints Points}'. + * * @return the meta object for the attribute list 'Points'. * @see org.eclipse.emf.cdo.tests.legacy.model3.Polygon#getPoints() * @see #getPolygon() @@ -442,9 +513,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EAttribute getPolygon_Points(); /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.PolygonWithDuplicates - * Polygon With Duplicates}'. - * + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.PolygonWithDuplicates Polygon With Duplicates}'. + * * @return the meta object for class 'Polygon With Duplicates'. * @see org.eclipse.emf.cdo.tests.legacy.model3.PolygonWithDuplicates * @generated @@ -474,10 +544,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getNodeA(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getChildren() * @see #getNodeA() @@ -486,9 +555,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeA_Children(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getName() * @see #getNodeA() @@ -497,9 +565,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EAttribute getNodeA_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getOtherNodes() * @see #getNodeA() @@ -518,10 +585,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getNodeB(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getChildren() * @see #getNodeB() @@ -530,10 +596,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeB_Children(); /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getParent Parent}'. - * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getParent() * @see #getNodeB() @@ -542,9 +607,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeB_Parent(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeB#getName() * @see #getNodeB() @@ -563,10 +627,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getNodeC(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getChildren() * @see #getNodeC() @@ -575,10 +638,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeC_Children(); /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getParent Parent}'. - * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getParent() * @see #getNodeC() @@ -587,9 +649,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeC_Parent(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getName() * @see #getNodeC() @@ -598,9 +659,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EAttribute getNodeC_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOtherNodes() * @see #getNodeC() @@ -631,10 +691,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass getNodeD(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getChildren() * @see #getNodeD() @@ -643,10 +702,9 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeD_Children(); /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getParent Parent}'. - * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getParent() * @see #getNodeD() @@ -655,9 +713,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeD_Parent(); /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getName - * Name}'. - * + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getName Name}'. + * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getName() * @see #getNodeD() @@ -666,9 +723,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EAttribute getNodeD_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOtherNodes() * @see #getNodeD() @@ -677,9 +733,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference getNodeD_OtherNodes(); /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOppositeNode - * Opposite Node}'. - * + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOppositeNode Opposite Node}'. + * * @return the meta object for the reference 'Opposite Node'. * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOppositeNode() * @see #getNodeD() @@ -687,6 +742,81 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ EReference getNodeD_OppositeNode(); + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image Image}'. + * + * + * @return the meta object for class 'Image'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.Image + * @generated + */ + EClass getImage(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image#getWidth Width}'. + * + * + * @return the meta object for the attribute 'Width'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.Image#getWidth() + * @see #getImage() + * @generated + */ + EAttribute getImage_Width(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image#getHeight Height}'. + * + * + * @return the meta object for the attribute 'Height'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.Image#getHeight() + * @see #getImage() + * @generated + */ + EAttribute getImage_Height(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image#getData Data}'. + * + * + * @return the meta object for the attribute 'Data'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.Image#getData() + * @see #getImage() + * @generated + */ + EAttribute getImage_Data(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.File File}'. + * + * + * @return the meta object for class 'File'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.File + * @generated + */ + EClass getFile(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.File#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.File#getName() + * @see #getFile() + * @generated + */ + EAttribute getFile_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.File#getData Data}'. + * + * + * @return the meta object for the attribute 'Data'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.File#getData() + * @see #getFile() + * @generated + */ + EAttribute getFile_Data(); + /** * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model3.Point Point}'. @@ -699,8 +829,8 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EDataType getPoint(); /** - * Returns the factory that creates the instances of the model. - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ @@ -715,15 +845,13 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa *
  • and each data type
  • * * - * * @generated */ interface Literals { /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl Class1}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl Class1}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getClass1() * @generated @@ -731,17 +859,16 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass CLASS1 = eINSTANCE.getClass1(); /** - * The meta object literal for the 'Class2' reference list feature. - * * @generated */ EReference CLASS1__CLASS2 = eINSTANCE.getClass1_Class2(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl - * Meta Ref}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl Meta Ref}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getMetaRef() * @generated @@ -749,17 +876,16 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass META_REF = eINSTANCE.getMetaRef(); /** - * The meta object literal for the 'EPackage Ref' reference feature. - * * @generated */ EReference META_REF__EPACKAGE_REF = eINSTANCE.getMetaRef_EPackageRef(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl - * Polygon}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl Polygon}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPolygon() * @generated @@ -767,17 +893,16 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass POLYGON = eINSTANCE.getPolygon(); /** - * The meta object literal for the 'Points' attribute list feature. - * * @generated */ EAttribute POLYGON__POINTS = eINSTANCE.getPolygon_Points(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl - * Polygon With Duplicates}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl Polygon With Duplicates}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPolygonWithDuplicates() * @generated @@ -785,17 +910,16 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EClass POLYGON_WITH_DUPLICATES = eINSTANCE.getPolygonWithDuplicates(); /** - * The meta object literal for the 'Points' attribute list feature. - * * @generated */ EAttribute POLYGON_WITH_DUPLICATES__POINTS = eINSTANCE.getPolygonWithDuplicates_Points(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl Node A}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl Node A}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeA() * @generated @@ -811,25 +935,24 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference NODE_A__CHILDREN = eINSTANCE.getNodeA_Children(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl Node B}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl Node B}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeB() * @generated @@ -845,25 +968,24 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference NODE_B__CHILDREN = eINSTANCE.getNodeB_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_B__PARENT = eINSTANCE.getNodeB_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_B__NAME = eINSTANCE.getNodeB_Name(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl Node C}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl Node C}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeC() * @generated @@ -879,41 +1001,40 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes(); /** - * The meta object literal for the 'Opposite Nodes' reference list feature. + * The meta object literal for the 'Opposite Nodes' reference list feature. + * * - * * @generated */ EReference NODE_C__OPPOSITE_NODES = eINSTANCE.getNodeC_OppositeNodes(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl Node D}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl Node D}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeD() * @generated @@ -929,40 +1050,100 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes(); /** - * The meta object literal for the 'Opposite Node' reference feature. - * * @generated */ EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode(); /** - * The meta object literal for the 'Point' data type. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl Image}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getImage() + * @generated + */ + EClass IMAGE = eINSTANCE.getImage(); + + /** + * The meta object literal for the 'Width' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__WIDTH = eINSTANCE.getImage_Width(); + + /** + * The meta object literal for the 'Height' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__HEIGHT = eINSTANCE.getImage_Height(); + + /** + * The meta object literal for the 'Data' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__DATA = eINSTANCE.getImage_Data(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl File}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getFile() + * @generated + */ + EClass FILE = eINSTANCE.getFile(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute FILE__NAME = eINSTANCE.getFile_Name(); + + /** + * The meta object literal for the 'Data' attribute feature. + * + * + * @generated + */ + EAttribute FILE__DATA = eINSTANCE.getFile_Data(); + + /** + * The meta object literal for the 'Point' data type. + * * @see org.eclipse.emf.cdo.tests.model3.Point * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPoint() * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java index 6837d39b32..679c7bdbb7 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java @@ -30,18 +30,18 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl#getClass2 Class2}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.Class1Impl#getClass2 Class2}
    • *
    *

    - * + * * @generated */ public class Class1Impl extends EObjectImpl implements Class1 { /** - * The cached value of the '{@link #getClass2() Class2}' reference list. - * * @see #getClass2() * @generated * @ordered @@ -50,7 +50,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ protected Class1Impl() @@ -60,7 +59,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -71,7 +69,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ public EList getClass2() @@ -86,7 +83,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ public void unsetClass2() @@ -97,7 +93,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ public boolean isSetClass2() @@ -107,7 +102,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -124,7 +118,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -140,7 +133,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -156,7 +148,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -175,7 +166,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -192,7 +182,6 @@ public class Class1Impl extends EObjectImpl implements Class1 /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/FileImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/FileImpl.java new file mode 100644 index 0000000000..7f4a9f236d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/FileImpl.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.legacy.model3.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.File; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'File'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.FileImpl#getData Data}
    • + *
    + *

    + * + * @generated + */ +public class FileImpl extends EObjectImpl implements File +{ + /** + * 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 #getData() Data}' attribute. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected static final CDOClob DATA_EDEFAULT = null; + + /** + * The cached value of the '{@link #getData() Data}' attribute. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected CDOClob data = DATA_EDEFAULT; + + /** + * + * + * @generated + */ + protected FileImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.FILE; + } + + /** + * + * + * @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, Model3Package.FILE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public CDOClob getData() + { + return data; + } + + /** + * + * + * @generated + */ + public void setData(CDOClob newData) + { + CDOClob oldData = data; + data = newData; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.FILE__DATA, oldData, data)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model3Package.FILE__NAME: + return getName(); + case Model3Package.FILE__DATA: + return getData(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model3Package.FILE__NAME: + setName((String)newValue); + return; + case Model3Package.FILE__DATA: + setData((CDOClob)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model3Package.FILE__NAME: + setName(NAME_EDEFAULT); + return; + case Model3Package.FILE__DATA: + setData(DATA_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model3Package.FILE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model3Package.FILE__DATA: + return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", data: "); + result.append(data); + result.append(')'); + return result.toString(); + } + +} //FileImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/ImageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/ImageImpl.java new file mode 100644 index 0000000000..0389d2e0f8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/ImageImpl.java @@ -0,0 +1,297 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.legacy.model3.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.Image; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * + * An implementation of the model object 'Image'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl#getWidth Width}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl#getHeight Height}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.ImageImpl#getData Data}
    • + *
    + *

    + * + * @generated + */ +public class ImageImpl extends EObjectImpl implements Image +{ + /** + * The default value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected static final int WIDTH_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected int width = WIDTH_EDEFAULT; + + /** + * The default value of the '{@link #getHeight() Height}' attribute. + * + * + * @see #getHeight() + * @generated + * @ordered + */ + protected static final int HEIGHT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getHeight() Height}' attribute. + * + * + * @see #getHeight() + * @generated + * @ordered + */ + protected int height = HEIGHT_EDEFAULT; + + /** + * The default value of the '{@link #getData() Data}' attribute. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected static final CDOBlob DATA_EDEFAULT = null; + + /** + * The cached value of the '{@link #getData() Data}' attribute. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected CDOBlob data = DATA_EDEFAULT; + + /** + * + * + * @generated + */ + protected ImageImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.IMAGE; + } + + /** + * + * + * @generated + */ + public int getWidth() + { + return width; + } + + /** + * + * + * @generated + */ + public void setWidth(int newWidth) + { + int oldWidth = width; + width = newWidth; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.IMAGE__WIDTH, oldWidth, width)); + } + + /** + * + * + * @generated + */ + public int getHeight() + { + return height; + } + + /** + * + * + * @generated + */ + public void setHeight(int newHeight) + { + int oldHeight = height; + height = newHeight; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.IMAGE__HEIGHT, oldHeight, height)); + } + + /** + * + * + * @generated + */ + public CDOBlob getData() + { + return data; + } + + /** + * + * + * @generated + */ + public void setData(CDOBlob newData) + { + CDOBlob oldData = data; + data = newData; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.IMAGE__DATA, oldData, data)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model3Package.IMAGE__WIDTH: + return getWidth(); + case Model3Package.IMAGE__HEIGHT: + return getHeight(); + case Model3Package.IMAGE__DATA: + return getData(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model3Package.IMAGE__WIDTH: + setWidth((Integer)newValue); + return; + case Model3Package.IMAGE__HEIGHT: + setHeight((Integer)newValue); + return; + case Model3Package.IMAGE__DATA: + setData((CDOBlob)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model3Package.IMAGE__WIDTH: + setWidth(WIDTH_EDEFAULT); + return; + case Model3Package.IMAGE__HEIGHT: + setHeight(HEIGHT_EDEFAULT); + return; + case Model3Package.IMAGE__DATA: + setData(DATA_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model3Package.IMAGE__WIDTH: + return width != WIDTH_EDEFAULT; + case Model3Package.IMAGE__HEIGHT: + return height != HEIGHT_EDEFAULT; + case Model3Package.IMAGE__DATA: + return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (width: "); + result.append(width); + result.append(", height: "); + result.append(height); + result.append(", data: "); + result.append(data); + result.append(')'); + return result.toString(); + } + +} //ImageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java index 34596e57e4..045ab7435e 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java @@ -25,18 +25,18 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl#getEPackageRef EPackage Ref}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.MetaRefImpl#getEPackageRef EPackage Ref}
    • *
    *

    - * + * * @generated */ public class MetaRefImpl extends EObjectImpl implements MetaRef { /** - * The cached value of the '{@link #getEPackageRef() EPackage Ref}' reference. - * * @see #getEPackageRef() * @generated * @ordered @@ -45,7 +45,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ protected MetaRefImpl() @@ -55,7 +54,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -66,7 +64,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ public EPackage getEPackageRef() @@ -87,7 +84,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ public EPackage basicGetEPackageRef() @@ -97,7 +93,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ public void setEPackageRef(EPackage newEPackageRef) @@ -111,7 +106,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -129,7 +123,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -146,7 +139,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -163,7 +155,6 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java index a676eecaa9..453a900c02 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java @@ -13,6 +13,8 @@ package org.eclipse.emf.cdo.tests.legacy.model3.impl; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Factory; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; @@ -95,6 +97,10 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return createNodeC(); case Model3Package.NODE_D: return createNodeD(); + case Model3Package.IMAGE: + return createImage(); + case Model3Package.FILE: + return createFile(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -222,6 +228,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return nodeD; } + /** + * + * + * @generated + */ + public Image createImage() + { + ImageImpl image = new ImageImpl(); + return image; + } + + /** + * + * + * @generated + */ + public File createFile() + { + FileImpl file = new FileImpl(); + return file; + } + /** * * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java index 1540a1d8a2..a5895c773b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java @@ -10,11 +10,14 @@ */ package org.eclipse.emf.cdo.tests.legacy.model3.impl; +import org.eclipse.emf.cdo.etypes.EtypesPackage; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Factory; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackagePackage; import org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.SubpackagePackageImpl; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; @@ -95,6 +98,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package */ private EClass nodeDEClass = null; + /** + * + * + * @generated + */ + private EClass imageEClass = null; + + /** + * + * + * @generated + */ + private EClass fileEClass = null; + /** * * @@ -142,7 +159,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public static Model3Package init() { if (isInited) + { return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI); + } // Obtain or create and register package Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE @@ -152,6 +171,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package // Initialize simple dependencies EcorePackage.eINSTANCE.eClass(); + EtypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE @@ -454,6 +474,76 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EReference)nodeDEClass.getEStructuralFeatures().get(4); } + /** + * + * + * @generated + */ + public EClass getImage() + { + return imageEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Width() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Height() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Data() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getFile() + { + return fileEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFile_Name() + { + return (EAttribute)fileEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFile_Data() + { + return (EAttribute)fileEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -490,7 +580,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void createPackageContents() { if (isCreated) + { return; + } isCreated = true; // Create classes and their features @@ -530,6 +622,15 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package createEReference(nodeDEClass, NODE_D__OTHER_NODES); createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE); + imageEClass = createEClass(IMAGE); + createEAttribute(imageEClass, IMAGE__WIDTH); + createEAttribute(imageEClass, IMAGE__HEIGHT); + createEAttribute(imageEClass, IMAGE__DATA); + + fileEClass = createEClass(FILE); + createEAttribute(fileEClass, FILE__NAME); + createEAttribute(fileEClass, FILE__DATA); + // Create data types pointEDataType = createEDataType(POINT); } @@ -550,7 +651,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void initializePackageContents() { if (isInitialized) + { return; + } isInitialized = true; // Initialize package @@ -562,6 +665,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package SubpackagePackage theSubpackagePackage = (SubpackagePackage)EPackage.Registry.INSTANCE .getEPackage(SubpackagePackage.eNS_URI); EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + EtypesPackage theEtypesPackage = (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI); // Add subpackages getESubpackages().add(theSubpackagePackage); @@ -584,66 +688,79 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(polygonEClass, Polygon.class, "Polygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPolygon_Points(), this.getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPolygon_Points(), getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(polygonWithDuplicatesEClass, PolygonWithDuplicates.class, "PolygonWithDuplicates", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPolygonWithDuplicates_Points(), this.getPoint(), "points", null, 1, -1, - PolygonWithDuplicates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); + initEAttribute(getPolygonWithDuplicates_Points(), getPoint(), "points", null, 1, -1, PolygonWithDuplicates.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeAEClass, NodeA.class, "NodeA", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeA_Children(), this.getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT, + initEReference(getNodeA_Children(), getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeA_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeA_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT, + initEReference(getNodeA_OtherNodes(), getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeBEClass, NodeB.class, "NodeB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeB_Children(), this.getNodeB(), this.getNodeB_Parent(), "children", null, 0, -1, NodeB.class, + initEReference(getNodeB_Children(), getNodeB(), getNodeB_Parent(), "children", null, 0, -1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeB_Parent(), this.getNodeB(), this.getNodeB_Children(), "parent", null, 0, 1, NodeB.class, + initEReference(getNodeB_Parent(), getNodeB(), getNodeB_Children(), "parent", null, 0, 1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeB_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeCEClass, NodeC.class, "NodeC", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeC_Children(), this.getNodeC(), this.getNodeC_Parent(), "children", null, 0, -1, NodeC.class, + initEReference(getNodeC_Children(), getNodeC(), getNodeC_Parent(), "children", null, 0, -1, NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeC_Parent(), this.getNodeC(), this.getNodeC_Children(), "parent", null, 0, 1, NodeC.class, + initEReference(getNodeC_Parent(), getNodeC(), getNodeC_Children(), "parent", null, 0, 1, NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeC_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeC_OtherNodes(), this.getNodeC(), this.getNodeC_OppositeNodes(), "otherNodes", null, 0, -1, - NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeC_OppositeNodes(), this.getNodeC(), this.getNodeC_OtherNodes(), "oppositeNodes", null, 0, -1, + initEReference(getNodeC_OtherNodes(), getNodeC(), getNodeC_OppositeNodes(), "otherNodes", null, 0, -1, NodeC.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_OppositeNodes(), getNodeC(), getNodeC_OtherNodes(), "oppositeNodes", null, 0, -1, NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nodeDEClass, NodeD.class, "NodeD", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeD_Children(), this.getNodeD(), this.getNodeD_Parent(), "children", null, 0, -1, NodeD.class, + initEReference(getNodeD_Children(), getNodeD(), getNodeD_Parent(), "children", null, 0, -1, NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeD_Parent(), this.getNodeD(), this.getNodeD_Children(), "parent", null, 0, 1, NodeD.class, + initEReference(getNodeD_Parent(), getNodeD(), getNodeD_Children(), "parent", null, 0, 1, NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeD_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeD_OtherNodes(), this.getNodeD(), this.getNodeD_OppositeNode(), "otherNodes", null, 0, -1, - NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeD_OppositeNode(), this.getNodeD(), this.getNodeD_OtherNodes(), "oppositeNode", null, 0, 1, - NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OtherNodes(), getNodeD(), getNodeD_OppositeNode(), "otherNodes", null, 0, -1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OppositeNode(), getNodeD(), getNodeD_OtherNodes(), "oppositeNode", null, 0, 1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getImage_Width(), theEcorePackage.getEInt(), "width", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImage_Height(), theEcorePackage.getEInt(), "height", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImage_Data(), theEtypesPackage.getBlob(), "data", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFile_Name(), theEcorePackage.getEString(), "name", null, 0, 1, File.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFile_Data(), theEtypesPackage.getClob(), "data", null, 0, 1, File.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize data types initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java index 06fb1c8655..a73b145618 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java @@ -31,20 +31,20 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
    • *
    *

    - * + * * @generated */ public class NodeAImpl extends EObjectImpl implements NodeA { /** - * The cached value of the '{@link #getChildren() Children}' containment reference list. - * * @see #getChildren() * @generated * @ordered @@ -62,8 +62,8 @@ public class NodeAImpl extends EObjectImpl implements NodeA protected static final String NAME_EDEFAULT = null; /** - * The cached value of the '{@link #getName() Name}' attribute. - * + * The cached value of the '{@link #getName() Name}' attribute. + * * @see #getName() * @generated * @ordered @@ -71,9 +71,9 @@ public class NodeAImpl extends EObjectImpl implements NodeA protected String name = NAME_EDEFAULT; /** - * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * * - * * @see #getOtherNodes() * @generated * @ordered @@ -82,7 +82,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ protected NodeAImpl() @@ -92,7 +91,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -103,7 +101,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ public EList getChildren() @@ -117,7 +114,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ public String getName() @@ -127,7 +123,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ public void setName(String newName) @@ -140,7 +135,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ public EList getOtherNodes() @@ -154,7 +148,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -170,7 +163,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -190,7 +182,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -216,7 +207,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -239,7 +229,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -259,7 +248,6 @@ public class NodeAImpl extends EObjectImpl implements NodeA /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeBImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeBImpl.java index 7e91205124..f25d50c897 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeBImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeBImpl.java @@ -31,20 +31,20 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl#getName Name}
    • *
    *

    - * + * * @generated */ public class NodeBImpl extends EObjectImpl implements NodeB { /** - * The cached value of the '{@link #getChildren() Children}' containment reference list. - * * @see #getChildren() * @generated * @ordered @@ -62,8 +62,8 @@ public class NodeBImpl extends EObjectImpl implements NodeB protected static final String NAME_EDEFAULT = null; /** - * The cached value of the '{@link #getName() Name}' attribute. - * + * The cached value of the '{@link #getName() Name}' attribute. + * * @see #getName() * @generated * @ordered @@ -72,7 +72,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ protected NodeBImpl() @@ -82,7 +81,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -93,7 +91,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public EList getChildren() @@ -108,7 +105,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public NodeB getParent() @@ -120,7 +116,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public NotificationChain basicSetParent(NodeB newParent, NotificationChain msgs) @@ -131,7 +126,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public void setParent(NodeB newParent) @@ -156,7 +150,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public String getName() @@ -166,7 +159,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ public void setName(String newName) @@ -179,7 +171,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -200,7 +191,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -218,7 +208,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -234,7 +223,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -254,7 +242,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -279,7 +266,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -302,7 +288,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -322,7 +307,6 @@ public class NodeBImpl extends EObjectImpl implements NodeB /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java index d2e5c68e8e..acfdd5290d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java @@ -32,22 +32,22 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
    • *
    *

    - * + * * @generated */ public class NodeCImpl extends EObjectImpl implements NodeC { /** - * The cached value of the '{@link #getChildren() Children}' containment reference list. - * * @see #getChildren() * @generated * @ordered @@ -65,8 +65,8 @@ public class NodeCImpl extends EObjectImpl implements NodeC protected static final String NAME_EDEFAULT = null; /** - * The cached value of the '{@link #getName() Name}' attribute. - * + * The cached value of the '{@link #getName() Name}' attribute. + * * @see #getName() * @generated * @ordered @@ -74,9 +74,9 @@ public class NodeCImpl extends EObjectImpl implements NodeC protected String name = NAME_EDEFAULT; /** - * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * * - * * @see #getOtherNodes() * @generated * @ordered @@ -84,9 +84,9 @@ public class NodeCImpl extends EObjectImpl implements NodeC protected EList otherNodes; /** - * The cached value of the '{@link #getOppositeNodes() Opposite Nodes}' reference list. - * * @see #getOppositeNodes() * @generated * @ordered @@ -95,7 +95,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ protected NodeCImpl() @@ -105,7 +104,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -116,7 +114,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public EList getChildren() @@ -131,7 +128,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public NodeC getParent() @@ -143,7 +139,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public NotificationChain basicSetParent(NodeC newParent, NotificationChain msgs) @@ -154,7 +149,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public void setParent(NodeC newParent) @@ -179,7 +173,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public String getName() @@ -189,7 +182,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public void setName(String newName) @@ -202,7 +194,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public EList getOtherNodes() @@ -217,7 +208,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ public EList getOppositeNodes() @@ -232,7 +222,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -257,7 +246,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -279,7 +267,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -295,7 +282,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -319,7 +305,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -352,7 +337,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -381,7 +365,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -405,7 +388,6 @@ public class NodeCImpl extends EObjectImpl implements NodeC /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java index c40b36fbf2..103aaf6649 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java @@ -32,22 +32,22 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
    • *
    *

    - * + * * @generated */ public class NodeDImpl extends EObjectImpl implements NodeD { /** - * The cached value of the '{@link #getChildren() Children}' containment reference list. - * * @see #getChildren() * @generated * @ordered @@ -65,8 +65,8 @@ public class NodeDImpl extends EObjectImpl implements NodeD protected static final String NAME_EDEFAULT = null; /** - * The cached value of the '{@link #getName() Name}' attribute. - * + * The cached value of the '{@link #getName() Name}' attribute. + * * @see #getName() * @generated * @ordered @@ -74,9 +74,9 @@ public class NodeDImpl extends EObjectImpl implements NodeD protected String name = NAME_EDEFAULT; /** - * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * * - * * @see #getOtherNodes() * @generated * @ordered @@ -84,9 +84,9 @@ public class NodeDImpl extends EObjectImpl implements NodeD protected EList otherNodes; /** - * The cached value of the '{@link #getOppositeNode() Opposite Node}' reference. - * * @see #getOppositeNode() * @generated * @ordered @@ -95,7 +95,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ protected NodeDImpl() @@ -105,7 +104,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -116,7 +114,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public EList getChildren() @@ -131,7 +128,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public NodeD getParent() @@ -143,7 +139,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public NotificationChain basicSetParent(NodeD newParent, NotificationChain msgs) @@ -154,7 +149,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public void setParent(NodeD newParent) @@ -179,7 +173,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public String getName() @@ -189,7 +182,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public void setName(String newName) @@ -202,7 +194,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public EList getOtherNodes() @@ -217,7 +208,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public NodeD getOppositeNode() @@ -238,7 +228,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public NodeD basicGetOppositeNode() @@ -248,7 +237,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public NotificationChain basicSetOppositeNode(NodeD newOppositeNode, NotificationChain msgs) @@ -269,7 +257,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ public void setOppositeNode(NodeD newOppositeNode) @@ -294,7 +281,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -322,7 +308,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -344,7 +329,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -360,7 +344,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -386,7 +369,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -418,7 +400,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -447,7 +428,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -471,7 +451,6 @@ public class NodeDImpl extends EObjectImpl implements NodeD /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java index db6b4af643..d482160812 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java @@ -26,18 +26,18 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonImpl#getPoints Points}
    • *
    *

    - * + * * @generated */ public class PolygonImpl extends EObjectImpl implements Polygon { /** - * The cached value of the '{@link #getPoints() Points}' attribute list. - * * @see #getPoints() * @generated * @ordered @@ -46,7 +46,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ protected PolygonImpl() @@ -56,7 +55,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -67,7 +65,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ public EList getPoints() @@ -81,7 +78,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -97,7 +93,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -116,7 +111,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -133,7 +127,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -149,7 +142,6 @@ public class PolygonImpl extends EObjectImpl implements Polygon /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java index 9d066d95e3..0917e37ba0 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java @@ -27,18 +27,18 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.PolygonWithDuplicatesImpl#getPoints Points}
    • *
    *

    - * + * * @generated */ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWithDuplicates { /** - * The cached value of the '{@link #getPoints() Points}' attribute list. - * * @see #getPoints() * @generated * @ordered @@ -47,7 +47,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ protected PolygonWithDuplicatesImpl() @@ -57,7 +56,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @Override @@ -68,7 +66,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ public EList getPoints() @@ -82,7 +79,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @Override @@ -98,7 +94,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -117,7 +112,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @Override @@ -134,7 +128,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @Override @@ -150,7 +143,6 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackageFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackageFactory.java index c4a9936633..d617a67ccb 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackageFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackageFactory.java @@ -15,30 +15,29 @@ import org.eclipse.emf.cdo.tests.model3.subpackage.Class2; /** * The Factory for the model. It provides a create method for each non-abstract class of * the model. - * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackagePackage * @generated */ public interface SubpackageFactory extends org.eclipse.emf.cdo.tests.model3.subpackage.SubpackageFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * @generated */ SubpackageFactory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.SubpackageFactoryImpl.init(); /** - * Returns a new object of class 'Class2'. - * + * Returns a new object of class 'Class2'. + * * @return a new object of class 'Class2'. * @generated */ Class2 createClass2(); /** - * Returns the package supported by this factory. - * + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackagePackage.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackagePackage.java index d68bcf649f..5093884cb1 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackagePackage.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/SubpackagePackage.java @@ -22,7 +22,6 @@ import org.eclipse.emf.ecore.EReference; *
  • and each data type
  • * * - * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackageFactory * @model kind="package" * @generated @@ -30,8 +29,8 @@ import org.eclipse.emf.ecore.EReference; public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage { /** - * The package name. - * + * The package name. + * * @generated */ String eNAME = "subpackage"; @@ -44,23 +43,22 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/subpackage/1.0.0"; /** - * The package namespace name. - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "subpackage"; /** - * The singleton instance of the package. - * + * The singleton instance of the package. + * * @generated */ SubpackagePackage eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.SubpackagePackageImpl.init(); /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl - * Class2}' class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl Class2}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.SubpackagePackageImpl#getClass2() * @generated @@ -68,25 +66,24 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp int CLASS2 = 0; /** - * The feature id for the 'Class1' reference list. - * + * The feature id for the 'Class1' reference list. + * * @generated * @ordered */ int CLASS2__CLASS1 = 0; /** - * The number of structural features of the 'Class2' class. - * + * The number of structural features of the 'Class2' class. + * * @generated * @ordered */ int CLASS2_FEATURE_COUNT = 1; /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 - * Class2}'. - * + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 Class2}'. + * * @return the meta object for class 'Class2'. * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 * @generated @@ -94,10 +91,9 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp EClass getClass2(); /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2#getClass1 Class1}'. - * * @return the meta object for the reference list 'Class1'. * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2#getClass1() * @see #getClass2() @@ -106,8 +102,8 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp EReference getClass2_Class1(); /** - * Returns the factory that creates the instances of the model. - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ @@ -122,15 +118,13 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp *
  • and each data type
  • * * - * * @generated */ interface Literals { /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl - * Class2}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl Class2}' class. + * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.SubpackagePackageImpl#getClass2() * @generated @@ -138,9 +132,9 @@ public interface SubpackagePackage extends org.eclipse.emf.cdo.tests.model3.subp EClass CLASS2 = eINSTANCE.getClass2(); /** - * The meta object literal for the 'Class1' reference list feature. - * * @generated */ EReference CLASS2__CLASS1 = eINSTANCE.getClass2_Class1(); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/Class2Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/Class2Impl.java index de2e45241f..0c1b861f2a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/Class2Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/Class2Impl.java @@ -30,18 +30,18 @@ import java.util.Collection; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl#getClass1 Class1}
    • + *
    • {@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl.Class2Impl#getClass1 Class1}
    • *
    *

    - * + * * @generated */ public class Class2Impl extends EObjectImpl implements Class2 { /** - * The cached value of the '{@link #getClass1() Class1}' reference list. - * * @see #getClass1() * @generated * @ordered @@ -50,7 +50,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ protected Class2Impl() @@ -60,7 +59,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -71,7 +69,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ public EList getClass1() @@ -86,7 +83,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -103,7 +99,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -119,7 +114,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -135,7 +129,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -154,7 +147,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -171,7 +163,6 @@ public class Class2Impl extends EObjectImpl implements Class2 /** * - * * @generated */ @Override diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackageFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackageFactoryImpl.java index 0b93779c7b..e030ee4ef3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackageFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackageFactoryImpl.java @@ -22,7 +22,6 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * An implementation of the model Factory. - * * @generated */ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFactory @@ -51,8 +50,8 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac } /** - * Creates an instance of the factory. - * + * Creates an instance of the factory. + * * @generated */ public SubpackageFactoryImpl() @@ -62,7 +61,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ @Override @@ -79,7 +77,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ public Class2 createClass2() @@ -90,7 +87,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ public SubpackagePackage getSubpackagePackage() @@ -100,7 +96,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @deprecated * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java index 1c3f85cfe8..3c053b4e7a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl; +import org.eclipse.emf.cdo.etypes.EtypesPackage; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl; import org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackageFactory; @@ -24,14 +25,12 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; /** * An implementation of the model Package. - * * @generated */ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePackage { /** * - * * @generated */ private EClass class2EClass = null; @@ -56,18 +55,17 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

    - * This method is used to initialize {@link SubpackagePackage#eINSTANCE} when that field is accessed. Clients should - * not invoke it directly. Instead, they should simply access that field to obtain the package. * + *

    This method is used to initialize {@link SubpackagePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -86,6 +84,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac // Initialize simple dependencies EcorePackage.eINSTANCE.eClass(); + EtypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE @@ -110,7 +109,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public EClass getClass2() @@ -120,7 +118,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public EReference getClass2_Class1() @@ -130,7 +127,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public SubpackageFactory getSubpackageFactory() @@ -140,15 +136,14 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @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. - * + * 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() @@ -164,15 +159,14 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @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. - * + * 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() diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageAdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageAdapterFactory.java index 1a240438ea..a6bb2be8a1 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageAdapterFactory.java @@ -21,22 +21,21 @@ import org.eclipse.emf.ecore.EObject; /** * The Adapter Factory for the model. It provides an adapter createXXX * method for each class of the model. - * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackagePackage * @generated */ public class SubpackageAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * + * The cached model package. + * * @generated */ protected static SubpackagePackage modelPackage; /** - * Creates an instance of the adapter factory. - * + * Creates an instance of the adapter factory. + * * @generated */ public SubpackageAdapterFactory() @@ -48,10 +47,10 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. This implementation + * Returns whether this factory is applicable for the type of the object. + * This implementation * returns true if the object is either the model's package or is an instance object of the model. - * * @return whether this factory is applicable for the type of the object. * @generated */ @@ -70,8 +69,8 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the createXXX methods. - * + * The switch that delegates to the createXXX methods. + * * @generated */ protected SubpackageSwitch modelSwitch = new SubpackageSwitch() @@ -90,10 +89,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. + * Creates an adapter for the target. + * + * @param target the object to adapt. * @return the adapter for the target. * @generated */ @@ -104,10 +102,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 - * Class2}'. This default implementation returns null so that we can easily ignore + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 Class2}'. + * This default implementation returns null so that we can easily ignore * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.Class2 * @generated @@ -118,9 +115,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. This default implementation returns null. This default implementation returns null. - * * @return the new adapter. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java index 173208ba4f..e1e2fc58bd 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java @@ -23,22 +23,21 @@ import java.util.List; * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is * returned, which is the result of the switch. - * * @see org.eclipse.emf.cdo.tests.legacy.model3.subpackage.SubpackagePackage * @generated */ public class SubpackageSwitch { /** - * The cached model package - * + * The cached model package + * * @generated */ protected static SubpackagePackage modelPackage; /** - * Creates an instance of the switch. - * + * Creates an instance of the switch. + * * @generated */ public SubpackageSwitch() @@ -52,7 +51,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -64,7 +62,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -84,7 +81,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -106,11 +102,10 @@ public class SubpackageSwitch } /** - * Returns the result of interpreting the object as an instance of 'Class2'. This + * Returns the result of interpreting the object as an instance of 'Class2'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Class2'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -121,12 +116,11 @@ public class SubpackageSwitch } /** - * Returns the result of interpreting the object as an instance of 'EObject'. This + * Returns the result of interpreting the object as an instance of 'EObject'. + * This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java index 97da57b11e..dbf6f4dda6 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java @@ -12,6 +12,8 @@ package org.eclipse.emf.cdo.tests.legacy.model3.util; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; @@ -131,6 +133,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return createNodeDAdapter(); } + @Override + public Adapter caseImage(Image object) + { + return createImageAdapter(); + } + + @Override + public Adapter caseFile(File object) + { + return createFileAdapter(); + } + @Override public Adapter defaultCase(EObject object) { @@ -265,6 +279,34 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image Image} + * '. This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.legacy.model3.Image + * @generated + */ + public Adapter createImageAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.File File}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.legacy.model3.File + * @generated + */ + public Adapter createFileAdapter() + { + return null; + } + /** * Creates a new adapter for the default case. This default implementation returns null. diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java index 0ab8e39b1d..09968869ad 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java @@ -12,6 +12,8 @@ package org.eclipse.emf.cdo.tests.legacy.model3.util; import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; @@ -104,7 +106,9 @@ public class Model3Switch Class1 class1 = (Class1)theEObject; T result = caseClass1(class1); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.META_REF: @@ -112,7 +116,9 @@ public class Model3Switch MetaRef metaRef = (MetaRef)theEObject; T result = caseMetaRef(metaRef); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.POLYGON: @@ -120,7 +126,9 @@ public class Model3Switch Polygon polygon = (Polygon)theEObject; T result = casePolygon(polygon); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.POLYGON_WITH_DUPLICATES: @@ -128,7 +136,9 @@ public class Model3Switch PolygonWithDuplicates polygonWithDuplicates = (PolygonWithDuplicates)theEObject; T result = casePolygonWithDuplicates(polygonWithDuplicates); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.NODE_A: @@ -136,7 +146,9 @@ public class Model3Switch NodeA nodeA = (NodeA)theEObject; T result = caseNodeA(nodeA); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.NODE_B: @@ -144,7 +156,9 @@ public class Model3Switch NodeB nodeB = (NodeB)theEObject; T result = caseNodeB(nodeB); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.NODE_C: @@ -152,7 +166,9 @@ public class Model3Switch NodeC nodeC = (NodeC)theEObject; T result = caseNodeC(nodeC); if (result == null) + { result = defaultCase(theEObject); + } return result; } case Model3Package.NODE_D: @@ -160,7 +176,29 @@ public class Model3Switch NodeD nodeD = (NodeD)theEObject; T result = caseNodeD(nodeD); if (result == null) + { result = defaultCase(theEObject); + } + return result; + } + case Model3Package.IMAGE: + { + Image image = (Image)theEObject; + T result = caseImage(image); + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case Model3Package.FILE: + { + File file = (File)theEObject; + T result = caseFile(file); + if (result == null) + { + result = defaultCase(theEObject); + } return result; } default: @@ -289,6 +327,36 @@ public class Model3Switch return null; } + /** + * Returns the result of interpreting the object as an instance of 'Image'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Image'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImage(Image object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'File'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFile(File object) + { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Class1.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Class1.java index c607d5a7f7..f957520841 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Class1.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Class1.java @@ -17,13 +17,14 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Class1'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getClass1() * @model * @generated @@ -31,15 +32,15 @@ import org.eclipse.emf.ecore.EObject; public interface Class1 extends EObject { /** - * Returns the value of the 'Class2' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1 Class1}'. + * Returns the value of the 'Class2' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1 Class1}'. + * *

    * If the meaning of the 'Class2' reference list isn't clear, there really should be more of a description * here... *

    * - * * @return the value of the 'Class2' reference list. * @see #isSetClass2() * @see #unsetClass2() @@ -53,7 +54,6 @@ public interface Class1 extends EObject /** * Unsets the value of the '{@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}' reference list. * - * * @see #isSetClass2() * @see #getClass2() * @generated @@ -61,9 +61,8 @@ public interface Class1 extends EObject void unsetClass2(); /** - * Returns whether the value of the '{@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}' - * reference list is set. - * + * Returns whether the value of the '{@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}' reference list is set. + * * @return whether the value of the 'Class2' reference list is set. * @see #unsetClass2() * @see #getClass2() diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/File.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/File.java new file mode 100644 index 0000000000..27f57d2e66 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/File.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3; + +import org.eclipse.emf.cdo.common.model.lob.CDOClob; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'File'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.model3.File#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.File#getData Data}
    • + *
    + *

    + * + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getFile() + * @model + * @generated + */ +public interface File extends EObject +{ + /** + * 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) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getFile_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.File#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Data' attribute. + * + *

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

    + * + * @return the value of the 'Data' attribute. + * @see #setData(CDOClob) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getFile_Data() + * @model dataType="org.eclipse.emf.cdo.etypes.Clob" + * @generated + */ + CDOClob getData(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.File#getData Data}' attribute. + * + * + * @param value the new value of the 'Data' attribute. + * @see #getData() + * @generated + */ + void setData(CDOClob value); + +} // File diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Image.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Image.java new file mode 100644 index 0000000000..aea7b77297 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Image.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3; + +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Image'. + * + * + *

    + * The following features are supported: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.model3.Image#getWidth Width}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.Image#getHeight Height}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.Image#getData Data}
    • + *
    + *

    + * + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getImage() + * @model + * @generated + */ +public interface Image extends EObject +{ + /** + * Returns the value of the 'Width' attribute. + * + *

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

    + * + * @return the value of the 'Width' attribute. + * @see #setWidth(int) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getImage_Width() + * @model + * @generated + */ + int getWidth(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.Image#getWidth Width}' attribute. + * + * + * @param value the new value of the 'Width' attribute. + * @see #getWidth() + * @generated + */ + void setWidth(int value); + + /** + * Returns the value of the 'Height' attribute. + * + *

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

    + * + * @return the value of the 'Height' attribute. + * @see #setHeight(int) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getImage_Height() + * @model + * @generated + */ + int getHeight(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.Image#getHeight Height}' attribute. + * + * + * @param value the new value of the 'Height' attribute. + * @see #getHeight() + * @generated + */ + void setHeight(int value); + + /** + * Returns the value of the 'Data' attribute. + * + *

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

    + * + * @return the value of the 'Data' attribute. + * @see #setData(CDOBlob) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getImage_Data() + * @model dataType="org.eclipse.emf.cdo.etypes.Blob" + * @generated + */ + CDOBlob getData(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.Image#getData Data}' attribute. + * + * + * @param value the new value of the 'Data' attribute. + * @see #getData() + * @generated + */ + void setData(CDOBlob value); + +} // Image diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java index 7865ee76b2..596235f584 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java @@ -15,86 +15,103 @@ import org.eclipse.emf.ecore.EFactory; /** * The Factory for the model. It provides a create method for each non-abstract class of * the model. - * * @see org.eclipse.emf.cdo.tests.model3.Model3Package * @generated */ public interface Model3Factory extends EFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * @generated */ Model3Factory eINSTANCE = org.eclipse.emf.cdo.tests.model3.impl.Model3FactoryImpl.init(); /** - * Returns a new object of class 'Class1'. - * + * Returns a new object of class 'Class1'. + * * @return a new object of class 'Class1'. * @generated */ Class1 createClass1(); /** - * Returns a new object of class 'Meta Ref'. - * + * Returns a new object of class 'Meta Ref'. + * * @return a new object of class 'Meta Ref'. * @generated */ MetaRef createMetaRef(); /** - * Returns a new object of class 'Polygon'. - * + * Returns a new object of class 'Polygon'. + * * @return a new object of class 'Polygon'. * @generated */ Polygon createPolygon(); /** - * Returns a new object of class 'Polygon With Duplicates'. - * + * Returns a new object of class 'Polygon With Duplicates'. + * * @return a new object of class 'Polygon With Duplicates'. * @generated */ PolygonWithDuplicates createPolygonWithDuplicates(); /** - * Returns a new object of class 'Node A'. - * + * Returns a new object of class 'Node A'. + * * @return a new object of class 'Node A'. * @generated */ NodeA createNodeA(); /** - * Returns a new object of class 'Node B'. - * + * Returns a new object of class 'Node B'. + * * @return a new object of class 'Node B'. * @generated */ NodeB createNodeB(); /** - * Returns a new object of class 'Node C'. - * + * Returns a new object of class 'Node C'. + * * @return a new object of class 'Node C'. * @generated */ NodeC createNodeC(); /** - * Returns a new object of class 'Node D'. - * + * Returns a new object of class 'Node D'. + * * @return a new object of class 'Node D'. * @generated */ NodeD createNodeD(); /** - * Returns the package supported by this factory. - * + * Returns a new object of class 'Image'. + * + * + * @return a new object of class 'Image'. + * @generated + */ + Image createImage(); + + /** + * Returns a new object of class 'File'. + * + * + * @return a new object of class 'File'. + * @generated + */ + File createFile(); + + /** + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java index 6ba25c4e7d..b2c2918899 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java @@ -25,7 +25,6 @@ import org.eclipse.emf.ecore.EReference; *
  • and each data type
  • * * - * * @see org.eclipse.emf.cdo.tests.model3.Model3Factory * @model kind="package" * @generated @@ -33,29 +32,29 @@ import org.eclipse.emf.ecore.EReference; public interface Model3Package extends EPackage { /** - * The package name. - * + * The package name. + * * @generated */ String eNAME = "model3"; /** - * The package namespace URI. - * + * The package namespace URI. + * * @generated */ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model3/1.0.0"; /** - * The package namespace name. - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "model3"; /** - * The singleton instance of the package. - * + * The singleton instance of the package. + * * @generated */ Model3Package eINSTANCE = org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl.init(); @@ -71,16 +70,16 @@ public interface Model3Package extends EPackage int CLASS1 = 0; /** - * The feature id for the 'Class2' reference list. - * + * The feature id for the 'Class2' reference list. + * * @generated * @ordered */ int CLASS1__CLASS2 = 0; /** - * The number of structural features of the 'Class1' class. - * + * The number of structural features of the 'Class1' class. + * * @generated * @ordered */ @@ -89,7 +88,6 @@ public interface Model3Package extends EPackage /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.MetaRefImpl Meta Ref}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.MetaRefImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getMetaRef() * @generated @@ -97,16 +95,16 @@ public interface Model3Package extends EPackage int META_REF = 1; /** - * The feature id for the 'EPackage Ref' reference. - * + * The feature id for the 'EPackage Ref' reference. + * * @generated * @ordered */ int META_REF__EPACKAGE_REF = 0; /** - * The number of structural features of the 'Meta Ref' class. - * + * The number of structural features of the 'Meta Ref' class. + * * @generated * @ordered */ @@ -123,25 +121,24 @@ public interface Model3Package extends EPackage int POLYGON = 2; /** - * The feature id for the 'Points' attribute list. - * + * The feature id for the 'Points' attribute list. + * * @generated * @ordered */ int POLYGON__POINTS = 0; /** - * The number of structural features of the 'Polygon' class. - * + * The number of structural features of the 'Polygon' class. + * * @generated * @ordered */ int POLYGON_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl - * Polygon With Duplicates}' class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl Polygon With Duplicates}' class. + * * @see org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPolygonWithDuplicates() * @generated @@ -149,17 +146,17 @@ public interface Model3Package extends EPackage int POLYGON_WITH_DUPLICATES = 3; /** - * The feature id for the 'Points' attribute list. - * + * The feature id for the 'Points' attribute list. + * * @generated * @ordered */ int POLYGON_WITH_DUPLICATES__POINTS = 0; /** - * The number of structural features of the 'Polygon With Duplicates' class. - * * @generated * @ordered */ @@ -176,33 +173,33 @@ public interface Model3Package extends EPackage int NODE_A = 4; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_A__CHILDREN = 0; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_A__NAME = 1; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ int NODE_A__OTHER_NODES = 2; /** - * The number of structural features of the 'Node A' class. - * + * The number of structural features of the 'Node A' class. + * * @generated * @ordered */ @@ -219,33 +216,33 @@ public interface Model3Package extends EPackage int NODE_B = 5; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_B__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_B__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_B__NAME = 2; /** - * The number of structural features of the 'Node B' class. - * + * The number of structural features of the 'Node B' class. + * * @generated * @ordered */ @@ -262,33 +259,33 @@ public interface Model3Package extends EPackage int NODE_C = 6; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_C__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_C__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_C__NAME = 2; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ @@ -304,8 +301,8 @@ public interface Model3Package extends EPackage int NODE_C__OPPOSITE_NODES = 4; /** - * The number of structural features of the 'Node C' class. - * + * The number of structural features of the 'Node C' class. + * * @generated * @ordered */ @@ -322,62 +319,145 @@ public interface Model3Package extends EPackage int NODE_D = 7; /** - * The feature id for the 'Children' containment reference list. - * * @generated * @ordered */ int NODE_D__CHILDREN = 0; /** - * The feature id for the 'Parent' container reference. - * + * The feature id for the 'Parent' container reference. + * * @generated * @ordered */ int NODE_D__PARENT = 1; /** - * The feature id for the 'Name' attribute. - * + * The feature id for the 'Name' attribute. + * * @generated * @ordered */ int NODE_D__NAME = 2; /** - * The feature id for the 'Other Nodes' reference list. - * + * The feature id for the 'Other Nodes' reference list. + * * @generated * @ordered */ int NODE_D__OTHER_NODES = 3; /** - * The feature id for the 'Opposite Node' reference. - * + * The feature id for the 'Opposite Node' reference. + * * @generated * @ordered */ int NODE_D__OPPOSITE_NODE = 4; /** - * The number of structural features of the 'Node D' class. - * + * The number of structural features of the 'Node D' class. + * * @generated * @ordered */ int NODE_D_FEATURE_COUNT = 5; /** - * The meta object id for the 'Point' data type. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl Image}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.ImageImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getImage() + * @generated + */ + int IMAGE = 8; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__WIDTH = 0; + + /** + * The feature id for the 'Height' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__HEIGHT = 1; + + /** + * The feature id for the 'Data' attribute. + * + * + * @generated + * @ordered + */ + int IMAGE__DATA = 2; + + /** + * The number of structural features of the 'Image' class. + * + * + * @generated + * @ordered + */ + int IMAGE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.FileImpl File}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.FileImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getFile() + * @generated + */ + int FILE = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int FILE__NAME = 0; + + /** + * The feature id for the 'Data' attribute. + * + * + * @generated + * @ordered + */ + int FILE__DATA = 1; + + /** + * The number of structural features of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_FEATURE_COUNT = 2; + + /** + * The meta object id for the 'Point' data type. + * * @see org.eclipse.emf.cdo.tests.model3.Point * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPoint() * @generated */ - int POINT = 8; + int POINT = 10; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.Class1 Class1}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}'. + * * @return the meta object for the reference list 'Class2'. * @see org.eclipse.emf.cdo.tests.model3.Class1#getClass2() * @see #getClass1() @@ -411,9 +490,8 @@ public interface Model3Package extends EPackage EClass getMetaRef(); /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.MetaRef#getEPackageRef - * EPackage Ref}'. - * + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.MetaRef#getEPackageRef EPackage Ref}'. + * * @return the meta object for the reference 'EPackage Ref'. * @see org.eclipse.emf.cdo.tests.model3.MetaRef#getEPackageRef() * @see #getMetaRef() @@ -432,9 +510,8 @@ public interface Model3Package extends EPackage EClass getPolygon(); /** - * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.model3.Polygon#getPoints - * Points}'. - * + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.model3.Polygon#getPoints Points}'. + * * @return the meta object for the attribute list 'Points'. * @see org.eclipse.emf.cdo.tests.model3.Polygon#getPoints() * @see #getPolygon() @@ -443,9 +520,8 @@ public interface Model3Package extends EPackage EAttribute getPolygon_Points(); /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates - * Polygon With Duplicates}'. - * + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates Polygon With Duplicates}'. + * * @return the meta object for class 'Polygon With Duplicates'. * @see org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates * @generated @@ -453,10 +529,9 @@ public interface Model3Package extends EPackage EClass getPolygonWithDuplicates(); /** - * Returns the meta object for the attribute list ' - * {@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates#getPoints Points}'. + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates#getPoints Points}'. + * * - * * @return the meta object for the attribute list 'Points'. * @see org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates#getPoints() * @see #getPolygonWithDuplicates() @@ -475,10 +550,9 @@ public interface Model3Package extends EPackage EClass getNodeA(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.model3.NodeA#getChildren() * @see #getNodeA() @@ -489,7 +563,6 @@ public interface Model3Package extends EPackage /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeA#getName Name}'. * - * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.model3.NodeA#getName() * @see #getNodeA() @@ -498,9 +571,8 @@ public interface Model3Package extends EPackage EAttribute getNodeA_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes() * @see #getNodeA() @@ -519,10 +591,9 @@ public interface Model3Package extends EPackage EClass getNodeB(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeB#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.model3.NodeB#getChildren() * @see #getNodeB() @@ -531,9 +602,8 @@ public interface Model3Package extends EPackage EReference getNodeB_Children(); /** - * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent - * Parent}'. - * + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}'. + * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.model3.NodeB#getParent() * @see #getNodeB() @@ -544,7 +614,6 @@ public interface Model3Package extends EPackage /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getName Name}'. * - * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.model3.NodeB#getName() * @see #getNodeB() @@ -563,10 +632,9 @@ public interface Model3Package extends EPackage EClass getNodeC(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.model3.NodeC#getChildren() * @see #getNodeC() @@ -575,9 +643,8 @@ public interface Model3Package extends EPackage EReference getNodeC_Children(); /** - * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent - * Parent}'. - * + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}'. + * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.model3.NodeC#getParent() * @see #getNodeC() @@ -588,7 +655,6 @@ public interface Model3Package extends EPackage /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}'. * - * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.model3.NodeC#getName() * @see #getNodeC() @@ -597,9 +663,8 @@ public interface Model3Package extends EPackage EAttribute getNodeC_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes() * @see #getNodeC() @@ -608,9 +673,8 @@ public interface Model3Package extends EPackage EReference getNodeC_OtherNodes(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes - * Opposite Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}'. + * * @return the meta object for the reference list 'Opposite Nodes'. * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes() * @see #getNodeC() @@ -629,10 +693,9 @@ public interface Model3Package extends EPackage EClass getNodeD(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}'. - * * @return the meta object for the containment reference list 'Children'. * @see org.eclipse.emf.cdo.tests.model3.NodeD#getChildren() * @see #getNodeD() @@ -641,9 +704,8 @@ public interface Model3Package extends EPackage EReference getNodeD_Children(); /** - * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent - * Parent}'. - * + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}'. + * * @return the meta object for the container reference 'Parent'. * @see org.eclipse.emf.cdo.tests.model3.NodeD#getParent() * @see #getNodeD() @@ -654,7 +716,6 @@ public interface Model3Package extends EPackage /** * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}'. * - * * @return the meta object for the attribute 'Name'. * @see org.eclipse.emf.cdo.tests.model3.NodeD#getName() * @see #getNodeD() @@ -663,9 +724,8 @@ public interface Model3Package extends EPackage EAttribute getNodeD_Name(); /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes - * Other Nodes}'. - * + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}'. + * * @return the meta object for the reference list 'Other Nodes'. * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes() * @see #getNodeD() @@ -674,9 +734,8 @@ public interface Model3Package extends EPackage EReference getNodeD_OtherNodes(); /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode - * Opposite Node}'. - * + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}'. + * * @return the meta object for the reference 'Opposite Node'. * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode() * @see #getNodeD() @@ -684,6 +743,81 @@ public interface Model3Package extends EPackage */ EReference getNodeD_OppositeNode(); + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.Image Image}'. + * + * + * @return the meta object for class 'Image'. + * @see org.eclipse.emf.cdo.tests.model3.Image + * @generated + */ + EClass getImage(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.Image#getWidth Width}'. + * + * + * @return the meta object for the attribute 'Width'. + * @see org.eclipse.emf.cdo.tests.model3.Image#getWidth() + * @see #getImage() + * @generated + */ + EAttribute getImage_Width(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.Image#getHeight Height}'. + * + * + * @return the meta object for the attribute 'Height'. + * @see org.eclipse.emf.cdo.tests.model3.Image#getHeight() + * @see #getImage() + * @generated + */ + EAttribute getImage_Height(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.Image#getData Data}'. + * + * + * @return the meta object for the attribute 'Data'. + * @see org.eclipse.emf.cdo.tests.model3.Image#getData() + * @see #getImage() + * @generated + */ + EAttribute getImage_Data(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.File File}'. + * + * + * @return the meta object for class 'File'. + * @see org.eclipse.emf.cdo.tests.model3.File + * @generated + */ + EClass getFile(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.File#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model3.File#getName() + * @see #getFile() + * @generated + */ + EAttribute getFile_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.File#getData Data}'. + * + * + * @return the meta object for the attribute 'Data'. + * @see org.eclipse.emf.cdo.tests.model3.File#getData() + * @see #getFile() + * @generated + */ + EAttribute getFile_Data(); + /** * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model3.Point Point}'. @@ -696,8 +830,8 @@ public interface Model3Package extends EPackage EDataType getPoint(); /** - * Returns the factory that creates the instances of the model. - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ @@ -712,7 +846,6 @@ public interface Model3Package extends EPackage *
  • and each data type
  • * * - * * @generated */ interface Literals @@ -720,7 +853,6 @@ public interface Model3Package extends EPackage /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.Class1Impl Class1}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.Class1Impl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getClass1() * @generated @@ -728,17 +860,16 @@ public interface Model3Package extends EPackage EClass CLASS1 = eINSTANCE.getClass1(); /** - * The meta object literal for the 'Class2' reference list feature. - * * @generated */ EReference CLASS1__CLASS2 = eINSTANCE.getClass1_Class2(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.MetaRefImpl Meta Ref}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.MetaRefImpl Meta Ref}' class. + * * @see org.eclipse.emf.cdo.tests.model3.impl.MetaRefImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getMetaRef() * @generated @@ -746,17 +877,16 @@ public interface Model3Package extends EPackage EClass META_REF = eINSTANCE.getMetaRef(); /** - * The meta object literal for the 'EPackage Ref' reference feature. - * * @generated */ EReference META_REF__EPACKAGE_REF = eINSTANCE.getMetaRef_EPackageRef(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonImpl Polygon}' - * class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonImpl Polygon}' class. + * * @see org.eclipse.emf.cdo.tests.model3.impl.PolygonImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPolygon() * @generated @@ -764,17 +894,16 @@ public interface Model3Package extends EPackage EClass POLYGON = eINSTANCE.getPolygon(); /** - * The meta object literal for the 'Points' attribute list feature. - * * @generated */ EAttribute POLYGON__POINTS = eINSTANCE.getPolygon_Points(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl - * Polygon With Duplicates}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl Polygon With Duplicates}' class. + * * @see org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPolygonWithDuplicates() * @generated @@ -782,9 +911,9 @@ public interface Model3Package extends EPackage EClass POLYGON_WITH_DUPLICATES = eINSTANCE.getPolygonWithDuplicates(); /** - * The meta object literal for the 'Points' attribute list feature. - * * @generated */ EAttribute POLYGON_WITH_DUPLICATES__POINTS = eINSTANCE.getPolygonWithDuplicates_Points(); @@ -792,7 +921,6 @@ public interface Model3Package extends EPackage /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl Node A}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeA() * @generated @@ -808,17 +936,17 @@ public interface Model3Package extends EPackage EReference NODE_A__CHILDREN = eINSTANCE.getNodeA_Children(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes(); @@ -826,7 +954,6 @@ public interface Model3Package extends EPackage /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl Node B}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeB() * @generated @@ -842,17 +969,17 @@ public interface Model3Package extends EPackage EReference NODE_B__CHILDREN = eINSTANCE.getNodeB_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_B__PARENT = eINSTANCE.getNodeB_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_B__NAME = eINSTANCE.getNodeB_Name(); @@ -860,7 +987,6 @@ public interface Model3Package extends EPackage /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl Node C}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeC() * @generated @@ -876,33 +1002,33 @@ public interface Model3Package extends EPackage EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes(); /** - * The meta object literal for the 'Opposite Nodes' reference list feature. + * The meta object literal for the 'Opposite Nodes' reference list feature. + * * - * * @generated */ EReference NODE_C__OPPOSITE_NODES = eINSTANCE.getNodeC_OppositeNodes(); @@ -910,7 +1036,6 @@ public interface Model3Package extends EPackage /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl Node D}' class. * - * * @see org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeD() * @generated @@ -926,40 +1051,100 @@ public interface Model3Package extends EPackage EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children(); /** - * The meta object literal for the 'Parent' container reference feature. + * The meta object literal for the 'Parent' container reference feature. + * * - * * @generated */ EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent(); /** - * The meta object literal for the 'Name' attribute feature. - * * @generated */ EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name(); /** - * The meta object literal for the 'Other Nodes' reference list feature. + * The meta object literal for the 'Other Nodes' reference list feature. + * * - * * @generated */ EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes(); /** - * The meta object literal for the 'Opposite Node' reference feature. - * * @generated */ EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode(); /** - * The meta object literal for the 'Point' data type. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl Image}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.ImageImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getImage() + * @generated + */ + EClass IMAGE = eINSTANCE.getImage(); + + /** + * The meta object literal for the 'Width' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__WIDTH = eINSTANCE.getImage_Width(); + + /** + * The meta object literal for the 'Height' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__HEIGHT = eINSTANCE.getImage_Height(); + + /** + * The meta object literal for the 'Data' attribute feature. + * + * + * @generated + */ + EAttribute IMAGE__DATA = eINSTANCE.getImage_Data(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.FileImpl File}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.FileImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getFile() + * @generated + */ + EClass FILE = eINSTANCE.getFile(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute FILE__NAME = eINSTANCE.getFile_Name(); + + /** + * The meta object literal for the 'Data' attribute feature. + * + * + * @generated + */ + EAttribute FILE__DATA = eINSTANCE.getFile_Data(); + + /** + * The meta object literal for the 'Point' data type. + * * @see org.eclipse.emf.cdo.tests.model3.Point * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPoint() * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java index e719db9c4b..c80fa4c226 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java @@ -15,15 +15,16 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Node A'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes Other Nodes}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA() * @model * @generated @@ -31,14 +32,14 @@ import org.eclipse.emf.ecore.EObject; public interface NodeA extends EObject { /** - * Returns the value of the 'Children' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeA}. + * Returns the value of the 'Children' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeA}. + * *

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

    * - * * @return the value of the 'Children' containment reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_Children() * @model containment="true" @@ -47,12 +48,12 @@ public interface NodeA extends EObject EList getChildren(); /** - * Returns the value of the 'Name' attribute. + * 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) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_Name() @@ -73,14 +74,14 @@ public interface NodeA extends EObject void setName(String value); /** - * Returns the value of the 'Other Nodes' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeA}. + * Returns the value of the 'Other Nodes' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeA}. + * *

    * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Other Nodes' reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_OtherNodes() * @model diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeB.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeB.java index 1bdc4ed1cc..10dfc88391 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeB.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeB.java @@ -15,15 +15,16 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Node B'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeB#getName Name}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeB() * @model * @generated @@ -31,15 +32,15 @@ import org.eclipse.emf.ecore.EObject; public interface NodeB extends EObject { /** - * Returns the value of the 'Children' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeB}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}'. + * Returns the value of the 'Children' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeB}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}'. + * *

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

    * - * * @return the value of the 'Children' containment reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeB_Children() * @see org.eclipse.emf.cdo.tests.model3.NodeB#getParent @@ -49,14 +50,14 @@ public interface NodeB extends EObject EList getChildren(); /** - * Returns the value of the 'Parent' container reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeB#getChildren Children}'. + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getChildren Children}'. + * *

    * If the meaning of the 'Parent' container reference isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Parent' container reference. * @see #setParent(NodeB) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeB_Parent() @@ -67,23 +68,21 @@ public interface NodeB extends EObject NodeB getParent(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}' container - * reference. - * - * @param value - * the new value of the 'Parent' container reference. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeB#getParent Parent}' container reference. + * + * @param value the new value of the 'Parent' container reference. * @see #getParent() * @generated */ void setParent(NodeB value); /** - * Returns the value of the 'Name' attribute. + * 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) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeB_Name() diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java index d2455ef3a8..c9ed903359 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java @@ -15,17 +15,18 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Node C'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC() * @model * @generated @@ -33,15 +34,15 @@ import org.eclipse.emf.ecore.EObject; public interface NodeC extends EObject { /** - * Returns the value of the 'Children' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}'. + * Returns the value of the 'Children' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeC}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}'. + * *

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

    * - * * @return the value of the 'Children' containment reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Children() * @see org.eclipse.emf.cdo.tests.model3.NodeC#getParent @@ -51,14 +52,14 @@ public interface NodeC extends EObject EList getChildren(); /** - * Returns the value of the 'Parent' container reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}'. + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}'. + * *

    * If the meaning of the 'Parent' container reference isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Parent' container reference. * @see #setParent(NodeC) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Parent() @@ -69,23 +70,21 @@ public interface NodeC extends EObject NodeC getParent(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}' container - * reference. - * - * @param value - * the new value of the 'Parent' container reference. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}' container reference. + * + * @param value the new value of the 'Parent' container reference. * @see #getParent() * @generated */ void setParent(NodeC value); /** - * Returns the value of the 'Name' attribute. + * 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) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Name() @@ -106,15 +105,15 @@ public interface NodeC extends EObject void setName(String value); /** - * Returns the value of the 'Other Nodes' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}'. + * Returns the value of the 'Other Nodes' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeC}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}'. + * *

    * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Other Nodes' reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_OtherNodes() * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes @@ -124,15 +123,15 @@ public interface NodeC extends EObject EList getOtherNodes(); /** - * Returns the value of the 'Opposite Nodes' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}'. + * Returns the value of the 'Opposite Nodes' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeC}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}'. + * *

    * If the meaning of the 'Opposite Nodes' reference list isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Opposite Nodes' reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_OppositeNodes() * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java index 4209fe3424..79dee2fa23 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java @@ -15,17 +15,18 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Node D'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD() * @model * @generated @@ -33,15 +34,15 @@ import org.eclipse.emf.ecore.EObject; public interface NodeD extends EObject { /** - * Returns the value of the 'Children' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeD}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}'. + * Returns the value of the 'Children' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeD}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}'. + * *

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

    * - * * @return the value of the 'Children' containment reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Children() * @see org.eclipse.emf.cdo.tests.model3.NodeD#getParent @@ -51,14 +52,14 @@ public interface NodeD extends EObject EList getChildren(); /** - * Returns the value of the 'Parent' container reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}'. + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}'. + * *

    * If the meaning of the 'Parent' container reference isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Parent' container reference. * @see #setParent(NodeD) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Parent() @@ -69,23 +70,21 @@ public interface NodeD extends EObject NodeD getParent(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}' container - * reference. - * - * @param value - * the new value of the 'Parent' container reference. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}' container reference. + * + * @param value the new value of the 'Parent' container reference. * @see #getParent() * @generated */ void setParent(NodeD value); /** - * Returns the value of the 'Name' attribute. + * 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) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Name() @@ -106,15 +105,15 @@ public interface NodeD extends EObject void setName(String value); /** - * Returns the value of the 'Other Nodes' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.NodeD}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}'. + * Returns the value of the 'Other Nodes' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.NodeD}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}'. + * *

    * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a * description here... *

    * - * * @return the value of the 'Other Nodes' reference list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_OtherNodes() * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode @@ -124,14 +123,14 @@ public interface NodeD extends EObject EList getOtherNodes(); /** - * Returns the value of the 'Opposite Node' reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}'. + * Returns the value of the 'Opposite Node' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}'. + * *

    * If the meaning of the 'Opposite Node' reference isn't clear, there really should be more of a description * here... *

    * - * * @return the value of the 'Opposite Node' reference. * @see #setOppositeNode(NodeD) * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_OppositeNode() @@ -142,11 +141,9 @@ public interface NodeD extends EObject NodeD getOppositeNode(); /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}' - * reference. - * - * @param value - * the new value of the 'Opposite Node' reference. + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}' reference. + * + * @param value the new value of the 'Opposite Node' reference. * @see #getOppositeNode() * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Polygon.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Polygon.java index 1146a5731c..8c78c99e17 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Polygon.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Polygon.java @@ -15,13 +15,14 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Polygon'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.Polygon#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.Polygon#getPoints Points}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getPolygon() * @model * @generated @@ -29,14 +30,14 @@ import org.eclipse.emf.ecore.EObject; public interface Polygon extends EObject { /** - * Returns the value of the 'Points' attribute list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.Point}. + * Returns the value of the 'Points' attribute list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.Point}. + * *

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

    * - * * @return the value of the 'Points' attribute list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getPolygon_Points() * @model dataType="org.eclipse.emf.cdo.tests.model3.Point" required="true" diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/PolygonWithDuplicates.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/PolygonWithDuplicates.java index e21ed0b263..38343944b3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/PolygonWithDuplicates.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/PolygonWithDuplicates.java @@ -16,13 +16,14 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Polygon With Duplicates'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates#getPoints Points}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getPolygonWithDuplicates() * @model * @generated @@ -30,14 +31,14 @@ import org.eclipse.emf.ecore.EObject; public interface PolygonWithDuplicates extends EObject { /** - * Returns the value of the 'Points' attribute list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.Point}. + * Returns the value of the 'Points' attribute list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.Point}. + * *

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

    * - * * @return the value of the 'Points' attribute list. * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getPolygonWithDuplicates_Points() * @model unique="false" dataType="org.eclipse.emf.cdo.tests.model3.Point" required="true" diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Class1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Class1Impl.java index d5f9ef44b9..9f66aec814 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Class1Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Class1Impl.java @@ -24,17 +24,16 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.Class1Impl#getClass2 Class2}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.Class1Impl#getClass2 Class2}
    • *
    *

    - * + * * @generated */ public class Class1Impl extends CDOObjectImpl implements Class1 { /** * - * * @generated */ protected Class1Impl() @@ -44,7 +43,6 @@ public class Class1Impl extends CDOObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -55,7 +53,6 @@ public class Class1Impl extends CDOObjectImpl implements Class1 /** * - * * @generated */ @Override @@ -66,7 +63,6 @@ public class Class1Impl extends CDOObjectImpl implements Class1 /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -77,7 +73,6 @@ public class Class1Impl extends CDOObjectImpl implements Class1 /** * - * * @generated */ public void unsetClass2() @@ -87,7 +82,6 @@ public class Class1Impl extends CDOObjectImpl implements Class1 /** * - * * @generated */ public boolean isSetClass2() diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/FileImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/FileImpl.java new file mode 100644 index 0000000000..3debe94ac9 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/FileImpl.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Model3Package; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'File'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.FileImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.FileImpl#getData Data}
    • + *
    + *

    + * + * @generated + */ +public class FileImpl extends CDOObjectImpl implements File +{ + /** + * + * + * @generated + */ + protected FileImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.FILE; + } + + /** + * + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * + * @generated + */ + public String getName() + { + return (String)eGet(Model3Package.Literals.FILE__NAME, true); + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + eSet(Model3Package.Literals.FILE__NAME, newName); + } + + /** + * + * + * @generated + */ + public CDOClob getData() + { + return (CDOClob)eGet(Model3Package.Literals.FILE__DATA, true); + } + + /** + * + * + * @generated + */ + public void setData(CDOClob newData) + { + eSet(Model3Package.Literals.FILE__DATA, newData); + } + +} //FileImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/ImageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/ImageImpl.java new file mode 100644 index 0000000000..c095dbd032 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/ImageImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.tests.model3.Image; +import org.eclipse.emf.cdo.tests.model3.Model3Package; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Image'. + * + *

    + * The following features are implemented: + *

      + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl#getWidth Width}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl#getHeight Height}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl#getData Data}
    • + *
    + *

    + * + * @generated + */ +public class ImageImpl extends CDOObjectImpl implements Image +{ + /** + * + * + * @generated + */ + protected ImageImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.IMAGE; + } + + /** + * + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * + * @generated + */ + public int getWidth() + { + return (Integer)eGet(Model3Package.Literals.IMAGE__WIDTH, true); + } + + /** + * + * + * @generated + */ + public void setWidth(int newWidth) + { + eSet(Model3Package.Literals.IMAGE__WIDTH, newWidth); + } + + /** + * + * + * @generated + */ + public int getHeight() + { + return (Integer)eGet(Model3Package.Literals.IMAGE__HEIGHT, true); + } + + /** + * + * + * @generated + */ + public void setHeight(int newHeight) + { + eSet(Model3Package.Literals.IMAGE__HEIGHT, newHeight); + } + + /** + * + * + * @generated + */ + public CDOBlob getData() + { + return (CDOBlob)eGet(Model3Package.Literals.IMAGE__DATA, true); + } + + /** + * + * + * @generated + */ + public void setData(CDOBlob newData) + { + eSet(Model3Package.Literals.IMAGE__DATA, newData); + } + +} //ImageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/MetaRefImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/MetaRefImpl.java index 6ee14721a6..0897d5fc65 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/MetaRefImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/MetaRefImpl.java @@ -34,7 +34,6 @@ public class MetaRefImpl extends CDOObjectImpl implements MetaRef { /** * - * * @generated */ protected MetaRefImpl() @@ -44,7 +43,6 @@ public class MetaRefImpl extends CDOObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -55,7 +53,6 @@ public class MetaRefImpl extends CDOObjectImpl implements MetaRef /** * - * * @generated */ @Override @@ -66,7 +63,6 @@ public class MetaRefImpl extends CDOObjectImpl implements MetaRef /** * - * * @generated */ public EPackage getEPackageRef() @@ -76,7 +72,6 @@ public class MetaRefImpl extends CDOObjectImpl implements MetaRef /** * - * * @generated */ public void setEPackageRef(EPackage newEPackageRef) diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java index 469503c9ca..3e9fdd2092 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java @@ -11,6 +11,8 @@ package org.eclipse.emf.cdo.tests.model3.impl; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Factory; import org.eclipse.emf.cdo.tests.model3.Model3Package; @@ -31,14 +33,13 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * An implementation of the model Factory. - * * @generated */ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory { /** - * Creates the default factory implementation. - * + * Creates the default factory implementation. + * * @generated */ public static Model3Factory init() @@ -60,8 +61,8 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory } /** - * Creates an instance of the factory. - * + * Creates an instance of the factory. + * * @generated */ public Model3FactoryImpl() @@ -71,7 +72,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ @Override @@ -95,6 +95,10 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return createNodeC(); case Model3Package.NODE_D: return createNodeD(); + case Model3Package.IMAGE: + return createImage(); + case Model3Package.FILE: + return createFile(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -102,7 +106,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ @Override @@ -119,7 +122,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ @Override @@ -136,7 +138,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public Class1 createClass1() @@ -147,7 +148,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public MetaRef createMetaRef() @@ -158,7 +158,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public Polygon createPolygon() @@ -169,7 +168,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public PolygonWithDuplicates createPolygonWithDuplicates() @@ -180,7 +178,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public NodeA createNodeA() @@ -191,7 +188,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public NodeB createNodeB() @@ -202,7 +198,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public NodeC createNodeC() @@ -213,7 +208,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public NodeD createNodeD() @@ -222,6 +216,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return nodeD; } + /** + * + * + * @generated + */ + public Image createImage() + { + ImageImpl image = new ImageImpl(); + return image; + } + + /** + * + * + * @generated + */ + public File createFile() + { + FileImpl file = new FileImpl(); + return file; + } + /** * * @@ -244,7 +260,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @generated */ public Model3Package getModel3Package() @@ -254,7 +269,6 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory /** * - * * @deprecated * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java index ddcb08dd06..353aba413f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java @@ -10,7 +10,10 @@ */ package org.eclipse.emf.cdo.tests.model3.impl; +import org.eclipse.emf.cdo.etypes.EtypesPackage; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Factory; import org.eclipse.emf.cdo.tests.model3.Model3Package; @@ -34,70 +37,74 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; /** * An implementation of the model Package. - * * @generated */ public class Model3PackageImpl extends EPackageImpl implements Model3Package { /** * - * * @generated */ private EClass class1EClass = null; /** * - * * @generated */ private EClass metaRefEClass = null; /** * - * * @generated */ private EClass polygonEClass = null; /** * - * * @generated */ private EClass polygonWithDuplicatesEClass = null; /** * - * * @generated */ private EClass nodeAEClass = null; /** * - * * @generated */ private EClass nodeBEClass = null; /** * - * * @generated */ private EClass nodeCEClass = null; /** * - * * @generated */ private EClass nodeDEClass = null; + /** + * + * + * @generated + */ + private EClass imageEClass = null; + + /** + * + * + * @generated + */ + private EClass fileEClass = null; + /** * - * * @generated */ private EDataType pointEDataType = null; @@ -122,18 +129,17 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

    - * This method is used to initialize {@link Model3Package#eINSTANCE} when that field is accessed. Clients should not - * invoke it directly. Instead, they should simply access that field to obtain the package. - * * + *

    This method is used to initialize {@link Model3Package#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -152,6 +158,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package // Initialize simple dependencies EcorePackage.eINSTANCE.eClass(); + EtypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE @@ -176,7 +183,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getClass1() @@ -186,7 +192,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getClass1_Class2() @@ -196,7 +201,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getMetaRef() @@ -206,7 +210,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getMetaRef_EPackageRef() @@ -216,7 +219,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getPolygon() @@ -226,7 +228,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getPolygon_Points() @@ -236,7 +237,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getPolygonWithDuplicates() @@ -246,7 +246,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getPolygonWithDuplicates_Points() @@ -256,7 +255,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getNodeA() @@ -266,7 +264,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeA_Children() @@ -276,7 +273,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getNodeA_Name() @@ -286,7 +282,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeA_OtherNodes() @@ -296,7 +291,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getNodeB() @@ -306,7 +300,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeB_Children() @@ -316,7 +309,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeB_Parent() @@ -326,7 +318,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getNodeB_Name() @@ -336,7 +327,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getNodeC() @@ -346,7 +336,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeC_Children() @@ -356,7 +345,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeC_Parent() @@ -366,7 +354,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getNodeC_Name() @@ -376,7 +363,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeC_OtherNodes() @@ -386,7 +372,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeC_OppositeNodes() @@ -396,7 +381,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EClass getNodeD() @@ -406,7 +390,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeD_Children() @@ -416,7 +399,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeD_Parent() @@ -426,7 +408,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EAttribute getNodeD_Name() @@ -436,7 +417,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeD_OtherNodes() @@ -446,7 +426,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public EReference getNodeD_OppositeNode() @@ -454,9 +433,78 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EReference)nodeDEClass.getEStructuralFeatures().get(4); } + /** + * + * + * @generated + */ + public EClass getImage() + { + return imageEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Width() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Height() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getImage_Data() + { + return (EAttribute)imageEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getFile() + { + return fileEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFile_Name() + { + return (EAttribute)fileEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFile_Data() + { + return (EAttribute)fileEClass.getEStructuralFeatures().get(1); + } + /** * - * * @generated */ public EDataType getPoint() @@ -466,7 +514,6 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @generated */ public Model3Factory getModel3Factory() @@ -476,15 +523,14 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package /** * - * * @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. - * + * 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() @@ -530,21 +576,29 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package createEReference(nodeDEClass, NODE_D__OTHER_NODES); createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE); + imageEClass = createEClass(IMAGE); + createEAttribute(imageEClass, IMAGE__WIDTH); + createEAttribute(imageEClass, IMAGE__HEIGHT); + createEAttribute(imageEClass, IMAGE__DATA); + + fileEClass = createEClass(FILE); + createEAttribute(fileEClass, FILE__NAME); + createEAttribute(fileEClass, FILE__DATA); + // Create data types pointEDataType = createEDataType(POINT); } /** * - * * @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. - * + * 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() @@ -562,6 +616,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package SubpackagePackage theSubpackagePackage = (SubpackagePackage)EPackage.Registry.INSTANCE .getEPackage(SubpackagePackage.eNS_URI); EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + EtypesPackage theEtypesPackage = (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI); // Add subpackages getESubpackages().add(theSubpackagePackage); @@ -645,6 +700,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getImage_Width(), theEcorePackage.getEInt(), "width", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImage_Height(), theEcorePackage.getEInt(), "height", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getImage_Data(), theEtypesPackage.getBlob(), "data", null, 0, 1, Image.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFile_Name(), theEcorePackage.getEString(), "name", null, 0, 1, File.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFile_Data(), theEtypesPackage.getClob(), "data", null, 0, 1, File.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize data types initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java index 2e1dd9b65c..a8fd7edbe5 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java @@ -23,19 +23,18 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
    • *
    *

    - * + * * @generated */ public class NodeAImpl extends CDOObjectImpl implements NodeA { /** * - * * @generated */ protected NodeAImpl() @@ -45,7 +44,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -56,7 +54,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ @Override @@ -67,7 +64,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -78,7 +74,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ public String getName() @@ -88,7 +83,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ public void setName(String newName) @@ -98,7 +92,6 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeBImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeBImpl.java index d59f4e3b03..ee0c89fd4b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeBImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeBImpl.java @@ -23,19 +23,18 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl#getName Name}
    • *
    *

    - * + * * @generated */ public class NodeBImpl extends CDOObjectImpl implements NodeB { /** * - * * @generated */ protected NodeBImpl() @@ -45,7 +44,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -56,7 +54,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ @Override @@ -67,7 +64,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -78,7 +74,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ public NodeB getParent() @@ -88,7 +83,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ public void setParent(NodeB newParent) @@ -98,7 +92,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ public String getName() @@ -108,7 +101,6 @@ public class NodeBImpl extends CDOObjectImpl implements NodeB /** * - * * @generated */ public void setName(String newName) diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java index 7f179afdf1..9fd1f25758 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java @@ -23,21 +23,20 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
    • *
    *

    - * + * * @generated */ public class NodeCImpl extends CDOObjectImpl implements NodeC { /** * - * * @generated */ protected NodeCImpl() @@ -47,7 +46,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -58,7 +56,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ @Override @@ -69,7 +66,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -80,7 +76,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ public NodeC getParent() @@ -90,7 +85,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ public void setParent(NodeC newParent) @@ -100,7 +94,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ public String getName() @@ -110,7 +103,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ public void setName(String newName) @@ -120,7 +112,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -131,7 +122,6 @@ public class NodeCImpl extends CDOObjectImpl implements NodeC /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java index 4e90a8c9cc..be9fec0973 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java @@ -23,21 +23,20 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getChildren Children}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getParent Parent}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getName Name}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
    • - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getChildren Children}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getParent Parent}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getName Name}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
    • *
    *

    - * + * * @generated */ public class NodeDImpl extends CDOObjectImpl implements NodeD { /** * - * * @generated */ protected NodeDImpl() @@ -47,7 +46,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -58,7 +56,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ @Override @@ -69,7 +66,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -80,7 +76,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public NodeD getParent() @@ -90,7 +85,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public void setParent(NodeD newParent) @@ -100,7 +94,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public String getName() @@ -110,7 +103,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public void setName(String newName) @@ -120,7 +112,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ @SuppressWarnings("unchecked") @@ -131,7 +122,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public NodeD getOppositeNode() @@ -141,7 +131,6 @@ public class NodeDImpl extends CDOObjectImpl implements NodeD /** * - * * @generated */ public void setOppositeNode(NodeD newOppositeNode) diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonImpl.java index f30ef43713..265a5f6b1f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonImpl.java @@ -24,17 +24,16 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.PolygonImpl#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.PolygonImpl#getPoints Points}
    • *
    *

    - * + * * @generated */ public class PolygonImpl extends CDOObjectImpl implements Polygon { /** * - * * @generated */ protected PolygonImpl() @@ -44,7 +43,6 @@ public class PolygonImpl extends CDOObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -55,7 +53,6 @@ public class PolygonImpl extends CDOObjectImpl implements Polygon /** * - * * @generated */ @Override @@ -66,7 +63,6 @@ public class PolygonImpl extends CDOObjectImpl implements Polygon /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonWithDuplicatesImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonWithDuplicatesImpl.java index 12c908b90b..172c9e12df 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonWithDuplicatesImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/PolygonWithDuplicatesImpl.java @@ -25,17 +25,16 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl#getPoints Points}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.impl.PolygonWithDuplicatesImpl#getPoints Points}
    • *
    *

    - * + * * @generated */ public class PolygonWithDuplicatesImpl extends CDOObjectImpl implements PolygonWithDuplicates { /** * - * * @generated */ protected PolygonWithDuplicatesImpl() @@ -45,7 +44,6 @@ public class PolygonWithDuplicatesImpl extends CDOObjectImpl implements PolygonW /** * - * * @generated */ @Override @@ -56,7 +54,6 @@ public class PolygonWithDuplicatesImpl extends CDOObjectImpl implements PolygonW /** * - * * @generated */ @Override @@ -67,7 +64,6 @@ public class PolygonWithDuplicatesImpl extends CDOObjectImpl implements PolygonW /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/Class2.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/Class2.java index 3bec753635..862fd7ceb7 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/Class2.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/Class2.java @@ -17,13 +17,14 @@ import org.eclipse.emf.ecore.EObject; /** * A representation of the model object 'Class2'. + * *

    * The following features are supported: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1 Class1}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1 Class1}
    • *
    *

    - * + * * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage#getClass2() * @model * @generated @@ -31,15 +32,15 @@ import org.eclipse.emf.ecore.EObject; public interface Class2 extends EObject { /** - * Returns the value of the 'Class1' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model3.Class1}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}'. + * Returns the value of the 'Class1' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model3.Class1}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model3.Class1#getClass2 Class2}'. + * *

    * If the meaning of the 'Class1' reference list isn't clear, there really should be more of a description * here... *

    * - * * @return the value of the 'Class1' reference list. * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage#getClass2_Class1() * @see org.eclipse.emf.cdo.tests.model3.Class1#getClass2 diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackageFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackageFactory.java index 62a05286d8..447b7f0df3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackageFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackageFactory.java @@ -15,30 +15,29 @@ import org.eclipse.emf.ecore.EFactory; /** * The Factory for the model. It provides a create method for each non-abstract class of * the model. - * * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage * @generated */ public interface SubpackageFactory extends EFactory { /** - * The singleton instance of the factory. - * + * The singleton instance of the factory. + * * @generated */ SubpackageFactory eINSTANCE = org.eclipse.emf.cdo.tests.model3.subpackage.impl.SubpackageFactoryImpl.init(); /** - * Returns a new object of class 'Class2'. - * + * Returns a new object of class 'Class2'. + * * @return a new object of class 'Class2'. * @generated */ Class2 createClass2(); /** - * Returns the package supported by this factory. - * + * Returns the package supported by this factory. + * * @return the package supported by this factory. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackagePackage.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackagePackage.java index 46c170f32e..d9c2564cb0 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackagePackage.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/SubpackagePackage.java @@ -23,7 +23,6 @@ import org.eclipse.emf.ecore.EReference; *
  • and each data type
  • * * - * * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackageFactory * @model kind="package" * @generated @@ -31,37 +30,36 @@ import org.eclipse.emf.ecore.EReference; public interface SubpackagePackage extends EPackage { /** - * The package name. - * + * The package name. + * * @generated */ String eNAME = "subpackage"; /** - * The package namespace URI. - * + * The package namespace URI. + * * @generated */ String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/subpackage/1.0.0"; /** - * The package namespace name. - * + * The package namespace name. + * * @generated */ String eNS_PREFIX = "subpackage"; /** - * The singleton instance of the package. - * + * The singleton instance of the package. + * * @generated */ SubpackagePackage eINSTANCE = org.eclipse.emf.cdo.tests.model3.subpackage.impl.SubpackagePackageImpl.init(); /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl Class2}' - * class. - * + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl Class2}' class. + * * @see org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl * @see org.eclipse.emf.cdo.tests.model3.subpackage.impl.SubpackagePackageImpl#getClass2() * @generated @@ -69,16 +67,16 @@ public interface SubpackagePackage extends EPackage int CLASS2 = 0; /** - * The feature id for the 'Class1' reference list. - * + * The feature id for the 'Class1' reference list. + * * @generated * @ordered */ int CLASS2__CLASS1 = 0; /** - * The number of structural features of the 'Class2' class. - * + * The number of structural features of the 'Class2' class. + * * @generated * @ordered */ @@ -87,7 +85,6 @@ public interface SubpackagePackage extends EPackage /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2 Class2}'. * - * * @return the meta object for class 'Class2'. * @see org.eclipse.emf.cdo.tests.model3.subpackage.Class2 * @generated @@ -95,10 +92,9 @@ public interface SubpackagePackage extends EPackage EClass getClass2(); /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1 Class1}'. - * * @return the meta object for the reference list 'Class1'. * @see org.eclipse.emf.cdo.tests.model3.subpackage.Class2#getClass1() * @see #getClass2() @@ -107,8 +103,8 @@ public interface SubpackagePackage extends EPackage EReference getClass2_Class1(); /** - * Returns the factory that creates the instances of the model. - * + * Returns the factory that creates the instances of the model. + * * @return the factory that creates the instances of the model. * @generated */ @@ -123,15 +119,13 @@ public interface SubpackagePackage extends EPackage *
  • and each data type
  • * * - * * @generated */ interface Literals { /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl - * Class2}' class. - * + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl Class2}' class. + * * @see org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl * @see org.eclipse.emf.cdo.tests.model3.subpackage.impl.SubpackagePackageImpl#getClass2() * @generated @@ -139,9 +133,9 @@ public interface SubpackagePackage extends EPackage EClass CLASS2 = eINSTANCE.getClass2(); /** - * The meta object literal for the 'Class1' reference list feature. - * * @generated */ EReference CLASS2__CLASS1 = eINSTANCE.getClass2_Class1(); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/Class2Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/Class2Impl.java index 5172e6c0c4..7c9cdb34eb 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/Class2Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/Class2Impl.java @@ -24,17 +24,16 @@ import org.eclipse.emf.ecore.EClass; *

    * The following features are implemented: *

      - *
    • {@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl#getClass1 Class1}
    • + *
    • {@link org.eclipse.emf.cdo.tests.model3.subpackage.impl.Class2Impl#getClass1 Class1}
    • *
    *

    - * + * * @generated */ public class Class2Impl extends CDOObjectImpl implements Class2 { /** * - * * @generated */ protected Class2Impl() @@ -44,7 +43,6 @@ public class Class2Impl extends CDOObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -55,7 +53,6 @@ public class Class2Impl extends CDOObjectImpl implements Class2 /** * - * * @generated */ @Override @@ -66,7 +63,6 @@ public class Class2Impl extends CDOObjectImpl implements Class2 /** * - * * @generated */ @SuppressWarnings("unchecked") diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackageFactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackageFactoryImpl.java index 66afab1f7b..840aa03dad 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackageFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackageFactoryImpl.java @@ -22,14 +22,13 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * An implementation of the model Factory. - * * @generated */ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFactory { /** - * Creates the default factory implementation. - * + * Creates the default factory implementation. + * * @generated */ public static SubpackageFactory init() @@ -51,8 +50,8 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac } /** - * Creates an instance of the factory. - * + * Creates an instance of the factory. + * * @generated */ public SubpackageFactoryImpl() @@ -62,7 +61,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ @Override @@ -79,7 +77,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ public Class2 createClass2() @@ -90,7 +87,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @generated */ public SubpackagePackage getSubpackagePackage() @@ -100,7 +96,6 @@ public class SubpackageFactoryImpl extends EFactoryImpl implements SubpackageFac /** * - * * @deprecated * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java index aca6da147e..3f936336ce 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.cdo.tests.model3.subpackage.impl; +import org.eclipse.emf.cdo.etypes.EtypesPackage; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl; import org.eclipse.emf.cdo.tests.model3.subpackage.Class2; @@ -24,14 +25,12 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; /** * An implementation of the model Package. - * * @generated */ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePackage { /** * - * * @generated */ private EClass class2EClass = null; @@ -56,18 +55,17 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

    - * This method is used to initialize {@link SubpackagePackage#eINSTANCE} when that field is accessed. Clients should - * not invoke it directly. Instead, they should simply access that field to obtain the package. * + *

    This method is used to initialize {@link SubpackagePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() @@ -86,6 +84,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac // Initialize simple dependencies EcorePackage.eINSTANCE.eClass(); + EtypesPackage.eINSTANCE.eClass(); // Obtain or create and register interdependencies Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE @@ -110,7 +109,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public EClass getClass2() @@ -120,7 +118,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public EReference getClass2_Class1() @@ -130,7 +127,6 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @generated */ public SubpackageFactory getSubpackageFactory() @@ -140,15 +136,14 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @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. - * + * 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() @@ -164,15 +159,14 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac /** * - * * @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. - * + * 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() diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageAdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageAdapterFactory.java index ebf6ba3c23..9526de04a9 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageAdapterFactory.java @@ -21,22 +21,21 @@ import org.eclipse.emf.ecore.EObject; /** * The Adapter Factory for the model. It provides an adapter createXXX * method for each class of the model. - * * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage * @generated */ public class SubpackageAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * + * The cached model package. + * * @generated */ protected static SubpackagePackage modelPackage; /** - * Creates an instance of the adapter factory. - * + * Creates an instance of the adapter factory. + * * @generated */ public SubpackageAdapterFactory() @@ -48,10 +47,10 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. This implementation + * Returns whether this factory is applicable for the type of the object. + * This implementation * returns true if the object is either the model's package or is an instance object of the model. - * * @return whether this factory is applicable for the type of the object. * @generated */ @@ -70,8 +69,8 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the createXXX methods. - * + * The switch that delegates to the createXXX methods. + * * @generated */ protected SubpackageSwitch modelSwitch = new SubpackageSwitch() @@ -90,10 +89,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. + * Creates an adapter for the target. + * + * @param target the object to adapt. * @return the adapter for the target. * @generated */ @@ -104,10 +102,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2 - * Class2}'. This default implementation returns null so that we can easily ignore + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.subpackage.Class2 Class2}'. + * This default implementation returns null so that we can easily ignore * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.model3.subpackage.Class2 * @generated @@ -118,9 +115,9 @@ public class SubpackageAdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. This default implementation returns null. This default implementation returns null. - * * @return the new adapter. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java index 868ca1f276..4398e21031 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java @@ -23,22 +23,21 @@ import java.util.List; * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is * returned, which is the result of the switch. - * * @see org.eclipse.emf.cdo.tests.model3.subpackage.SubpackagePackage * @generated */ public class SubpackageSwitch { /** - * The cached model package - * + * The cached model package + * * @generated */ protected static SubpackagePackage modelPackage; /** - * Creates an instance of the switch. - * + * Creates an instance of the switch. + * * @generated */ public SubpackageSwitch() @@ -52,7 +51,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -64,7 +62,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -84,7 +81,6 @@ public class SubpackageSwitch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -106,11 +102,10 @@ public class SubpackageSwitch } /** - * Returns the result of interpreting the object as an instance of 'Class2'. This + * Returns the result of interpreting the object as an instance of 'Class2'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Class2'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -121,12 +116,11 @@ public class SubpackageSwitch } /** - * Returns the result of interpreting the object as an instance of 'EObject'. This + * Returns the result of interpreting the object as an instance of 'EObject'. + * This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java index fa26d8382d..f1da3eee4b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java @@ -11,6 +11,8 @@ package org.eclipse.emf.cdo.tests.model3.util; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; @@ -28,22 +30,21 @@ import org.eclipse.emf.ecore.EObject; /** * The Adapter Factory for the model. It provides an adapter createXXX * method for each class of the model. - * * @see org.eclipse.emf.cdo.tests.model3.Model3Package * @generated */ public class Model3AdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * + * The cached model package. + * * @generated */ protected static Model3Package modelPackage; /** - * Creates an instance of the adapter factory. - * + * Creates an instance of the adapter factory. + * * @generated */ public Model3AdapterFactory() @@ -55,10 +56,10 @@ public class Model3AdapterFactory extends AdapterFactoryImpl } /** - * Returns whether this factory is applicable for the type of the object. This implementation + * Returns whether this factory is applicable for the type of the object. + * This implementation * returns true if the object is either the model's package or is an instance object of the model. - * * @return whether this factory is applicable for the type of the object. * @generated */ @@ -77,8 +78,8 @@ public class Model3AdapterFactory extends AdapterFactoryImpl } /** - * The switch that delegates to the createXXX methods. - * + * The switch that delegates to the createXXX methods. + * * @generated */ protected Model3Switch modelSwitch = new Model3Switch() @@ -131,6 +132,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return createNodeDAdapter(); } + @Override + public Adapter caseImage(Image object) + { + return createImageAdapter(); + } + + @Override + public Adapter caseFile(File object) + { + return createFileAdapter(); + } + @Override public Adapter defaultCase(EObject object) { @@ -139,10 +152,9 @@ public class Model3AdapterFactory extends AdapterFactoryImpl }; /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. + * Creates an adapter for the target. + * + * @param target the object to adapt. * @return the adapter for the target. * @generated */ @@ -156,7 +168,6 @@ public class Model3AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.Class1 Class1}'. * This default implementation returns null so that we can easily ignore cases; it's useful to * ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.model3.Class1 * @generated @@ -170,7 +181,6 @@ public class Model3AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.MetaRef Meta Ref}'. * This default implementation returns null so that we can easily ignore cases; it's useful to * ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.model3.MetaRef * @generated @@ -184,7 +194,6 @@ public class Model3AdapterFactory extends AdapterFactoryImpl * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.Polygon Polygon}'. * This default implementation returns null so that we can easily ignore cases; it's useful to * ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.model3.Polygon * @generated @@ -195,11 +204,10 @@ public class Model3AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates - * Polygon With Duplicates}'. This default implementation returns null so that we can + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates Polygon With Duplicates}'. + * This default implementation returns null so that we can * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * * @return the new adapter. * @see org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates * @generated @@ -266,9 +274,39 @@ public class Model3AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. This default implementation returns null. + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model3.Image + * @generated + */ + public Adapter createImageAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.File File}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model3.File + * @generated + */ + public Adapter createFileAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * This default implementation returns null. - * * @return the new adapter. * @generated */ diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java index f6b41bcd30..fc6a46f055 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java @@ -11,6 +11,8 @@ package org.eclipse.emf.cdo.tests.model3.util; import org.eclipse.emf.cdo.tests.model3.Class1; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.tests.model3.Image; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; @@ -30,22 +32,21 @@ import java.util.List; * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is * returned, which is the result of the switch. - * * @see org.eclipse.emf.cdo.tests.model3.Model3Package * @generated */ public class Model3Switch { /** - * The cached model package - * + * The cached model package + * * @generated */ protected static Model3Package modelPackage; /** - * Creates an instance of the switch. - * + * Creates an instance of the switch. + * * @generated */ public Model3Switch() @@ -59,7 +60,6 @@ public class Model3Switch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -71,7 +71,6 @@ public class Model3Switch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -91,7 +90,6 @@ public class Model3Switch /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * - * * @return the first non-null result returned by a caseXXX call. * @generated */ @@ -163,17 +161,32 @@ public class Model3Switch result = defaultCase(theEObject); return result; } + case Model3Package.IMAGE: + { + Image image = (Image)theEObject; + T result = caseImage(image); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model3Package.FILE: + { + File file = (File)theEObject; + T result = caseFile(file); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } /** - * Returns the result of interpreting the object as an instance of 'Class1'. This + * Returns the result of interpreting the object as an instance of 'Class1'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Class1'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -184,11 +197,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Meta Ref'. This + * Returns the result of interpreting the object as an instance of 'Meta Ref'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Meta Ref'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -199,11 +211,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Polygon'. This + * Returns the result of interpreting the object as an instance of 'Polygon'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Polygon'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -230,11 +241,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Node A'. This + * Returns the result of interpreting the object as an instance of 'Node A'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Node A'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -245,11 +255,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Node B'. This + * Returns the result of interpreting the object as an instance of 'Node B'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Node B'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -260,11 +269,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Node C'. This + * Returns the result of interpreting the object as an instance of 'Node C'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Node C'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -275,11 +283,10 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'Node D'. This + * Returns the result of interpreting the object as an instance of 'Node D'. + * This * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Node D'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -290,12 +297,43 @@ public class Model3Switch } /** - * Returns the result of interpreting the object as an instance of 'EObject'. This + * Returns the result of interpreting the object as an instance of 'Image'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Image'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseImage(Image object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFile(File object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. - * - * @param object - * the target of the switch. + * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java new file mode 100644 index 0000000000..b3573fbfe2 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests; + +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.tests.bundle.OM; +import org.eclipse.emf.cdo.tests.model3.File; +import org.eclipse.emf.cdo.transaction.CDOTransaction; + +import org.eclipse.net4j.util.io.IOUtil; + +import java.io.InputStream; +import java.io.InputStreamReader; + +/** + * @author Eike Stepper + */ +public class LobTest extends AbstractCDOTest +{ + public void testCommitClob() throws Exception + { + InputStream inputStream = null; + + try + { + inputStream = OM.BUNDLE.getInputStream("copyright.txt"); + CDOClob clob = new CDOClob(new InputStreamReader(inputStream)); + + File file = getModel3Factory().createFile(); + file.setName("copyright.txt"); + file.setData(clob); + + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + CDOResource resource = transaction.createResource("res"); + resource.getContents().add(file); + + transaction.commit(); + } + finally + { + IOUtil.close(inputStream); + } + } +} diff --git a/plugins/org.eclipse.emf.cdo/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo/.settings/org.eclipse.core.resources.prefs index f41b5ffb46..ba2a6694fd 100644 --- a/plugins/org.eclipse.emf.cdo/.settings/org.eclipse.core.resources.prefs +++ b/plugins/org.eclipse.emf.cdo/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,6 @@ -#Thu Sep 23 20:11:11 CEST 2010 +#Sat Sep 25 05:35:25 CEST 2010 eclipse.preferences.version=1 encoding//model/eresource.ecorediag=UTF-8 +encoding//model/etypes.ecore=UTF-8 +encoding//model/etypes.ecorediag=UTF-8 encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8 diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF index d748a0f9e2..cb4303d5cd 100644 --- a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF @@ -18,6 +18,8 @@ Export-Package: org.eclipse.emf.cdo;version="4.0.0", org.eclipse.emf.cdo.eresource.impl;version="4.0.0", org.eclipse.emf.cdo.eresource.util;version="4.0.0", org.eclipse.emf.cdo.eresource.validation;version="4.0.0", + org.eclipse.emf.cdo.etypes;version="4.0.0", + org.eclipse.emf.cdo.etypes.impl;version="4.0.0", org.eclipse.emf.cdo.session;version="4.0.0", org.eclipse.emf.cdo.session.remote;version="4.0.0", org.eclipse.emf.cdo.transaction;version="4.0.0", diff --git a/plugins/org.eclipse.emf.cdo/model/eresource.genmodel b/plugins/org.eclipse.emf.cdo/model/eresource.genmodel index e4f4019537..b92f660d9a 100644 --- a/plugins/org.eclipse.emf.cdo/model/eresource.genmodel +++ b/plugins/org.eclipse.emf.cdo/model/eresource.genmodel @@ -7,7 +7,9 @@ editorPluginClass="" updateClasspath="false" nonNLSMarkers="true" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true" codeFormatting="true" testsDirectory="" importerID="org.eclipse.emf.importer.ecore" - featureDelegation="Reflective" complianceLevel="5.0" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"> + featureDelegation="Reflective" complianceLevel="5.0" copyrightFields="false" testsPluginID="org.eclipse.emf.cdo.editor" + optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true" + usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"> eresource.ecore @@ -21,6 +23,12 @@ + + + + + + diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.ecore b/plugins/org.eclipse.emf.cdo/model/etypes.ecore new file mode 100644 index 0000000000..8a88292678 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/model/etypes.ecore @@ -0,0 +1,8 @@ + + + + + diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.ecorediag b/plugins/org.eclipse.emf.cdo/model/etypes.ecorediag new file mode 100644 index 0000000000..d8edae22a3 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/model/etypes.ecorediag @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo/model/etypes.genmodel b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel new file mode 100644 index 0000000000..fae45504b0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/model/etypes.genmodel @@ -0,0 +1,15 @@ + + + etypes.ecore + + + + + diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java new file mode 100644 index 0000000000..44eaba6767 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesFactory.java @@ -0,0 +1,36 @@ +/** + * + * + * + * $Id: EtypesFactory.java,v 1.1.2.1 2010-09-27 16:17:21 estepper Exp $ + */ +package org.eclipse.emf.cdo.etypes; + +import org.eclipse.emf.ecore.EFactory; + +/** + * The Factory for the model. It provides a create method for each non-abstract class of + * the model. + * + * @since 4.0 + * @see org.eclipse.emf.cdo.etypes.EtypesPackage + * @generated + */ +public interface EtypesFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * + * @generated + */ + EtypesFactory eINSTANCE = org.eclipse.emf.cdo.etypes.impl.EtypesFactoryImpl.init(); + + /** + * Returns the package supported by this factory. + * + * @return the package supported by this factory. + * @generated + */ + EtypesPackage getEtypesPackage(); + +} // EtypesFactory diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java new file mode 100644 index 0000000000..cac3d8c6d0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/EtypesPackage.java @@ -0,0 +1,138 @@ +/** + * + * + * + * $Id: EtypesPackage.java,v 1.1.2.1 2010-09-27 16:17:21 estepper Exp $ + */ +package org.eclipse.emf.cdo.etypes; + +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EPackage; + +/** + * 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
    • + *
    + * + * @since 4.0 + * @see org.eclipse.emf.cdo.etypes.EtypesFactory + * @model kind="package" + * @generated + */ +public interface EtypesPackage extends EPackage +{ + /** + * The package name. + * + * @generated + */ + String eNAME = "etypes"; //$NON-NLS-1$ + + /** + * The package namespace URI. + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/Etypes/4.0.0"; //$NON-NLS-1$ + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "etypes"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. + * + * @generated + */ + EtypesPackage eINSTANCE = org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl.init(); + + /** + * The meta object id for the 'Blob' data type. + * + * @see org.eclipse.emf.cdo.common.model.lob.CDOBlob + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBlob() + * @generated + */ + int BLOB = 0; + + /** + * The meta object id for the 'Clob' data type. + * + * @see org.eclipse.emf.cdo.common.model.lob.CDOClob + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClob() + * @generated + */ + int CLOB = 1; + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.cdo.common.model.lob.CDOBlob Blob}'. + * + * @return the meta object for data type 'Blob'. + * @see org.eclipse.emf.cdo.common.model.lob.CDOBlob + * @model instanceClass="org.eclipse.emf.cdo.etypes.CDOBlob" + * @generated + */ + EDataType getBlob(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.cdo.common.model.lob.CDOClob Clob}'. + * + * @return the meta object for data type 'Clob'. + * @see org.eclipse.emf.cdo.common.model.lob.CDOClob + * @model instanceClass="org.eclipse.emf.cdo.etypes.CDOClob" + * @generated + */ + EDataType getClob(); + + /** + * Returns the factory that creates the instances of the model. + * + * @return the factory that creates the instances of the model. + * @generated + */ + EtypesFactory getEtypesFactory(); + + /** + * Defines literals for the meta objects that represent + *
      + *
    • each class,
    • + *
    • each feature of each class,
    • + *
    • each enum,
    • + *
    • and each data type
    • + *
    + * + * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the 'Blob' data type. + * + * @see org.eclipse.emf.cdo.common.model.lob.CDOBlob + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getBlob() + * @generated + */ + EDataType BLOB = eINSTANCE.getBlob(); + + /** + * The meta object literal for the 'Clob' data type. + * + * @see org.eclipse.emf.cdo.common.model.lob.CDOClob + * @see org.eclipse.emf.cdo.etypes.impl.EtypesPackageImpl#getClob() + * @generated + */ + EDataType CLOB = eINSTANCE.getClob(); + + } + +} // EtypesPackage diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java new file mode 100644 index 0000000000..3999f4a2a3 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesFactoryImpl.java @@ -0,0 +1,177 @@ +/** + * + * + * + * $Id: EtypesFactoryImpl.java,v 1.1.2.1 2010-09-27 16:17:21 estepper Exp $ + */ +package org.eclipse.emf.cdo.etypes.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.etypes.EtypesFactory; +import org.eclipse.emf.cdo.etypes.EtypesPackage; + +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; + +/** + * An implementation of the model Factory. + * + * @since 4.0 + * @generated + */ +public class EtypesFactoryImpl extends EFactoryImpl implements EtypesFactory +{ + /** + * Creates the default factory implementation. + * + * @generated + */ + public static EtypesFactory init() + { + try + { + EtypesFactory theEtypesFactory = (EtypesFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/Etypes/4.0.0"); //$NON-NLS-1$ + if (theEtypesFactory != null) + { + return theEtypesFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new EtypesFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public EtypesFactoryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case EtypesPackage.BLOB: + return createBlobFromString(eDataType, initialValue); + case EtypesPackage.CLOB: + return createClobFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case EtypesPackage.BLOB: + return convertBlobToString(eDataType, instanceValue); + case EtypesPackage.CLOB: + return convertClobToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public CDOBlob createBlobFromString(EDataType eDataType, String initialValue) + { + return (CDOBlob)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertBlobToString(EDataType eDataType, Object instanceValue) + { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public CDOClob createClobFromString(EDataType eDataType, String initialValue) + { + return (CDOClob)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertClobToString(EDataType eDataType, Object instanceValue) + { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public EtypesPackage getEtypesPackage() + { + return (EtypesPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static EtypesPackage getPackage() + { + return EtypesPackage.eINSTANCE; + } + +} // EtypesFactoryImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java new file mode 100644 index 0000000000..f05d76a437 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/etypes/impl/EtypesPackageImpl.java @@ -0,0 +1,194 @@ +/** + * + * + * + * $Id: EtypesPackageImpl.java,v 1.1.2.1 2010-09-27 16:17:21 estepper Exp $ + */ +package org.eclipse.emf.cdo.etypes.impl; + +import org.eclipse.emf.cdo.common.model.lob.CDOBlob; +import org.eclipse.emf.cdo.common.model.lob.CDOClob; +import org.eclipse.emf.cdo.etypes.EtypesFactory; +import org.eclipse.emf.cdo.etypes.EtypesPackage; + +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * An implementation of the model Package. + * + * @since 4.0 + * @generated + */ +public class EtypesPackageImpl extends EPackageImpl implements EtypesPackage +{ + /** + * + * + * @generated + */ + private EDataType blobEDataType = null; + + /** + * + * + * @generated + */ + private EDataType clobEDataType = 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.eclipse.emf.cdo.etypes.EtypesPackage#eNS_URI + * @see #init() + * @generated + */ + private EtypesPackageImpl() + { + super(eNS_URI, EtypesFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + *

    + * This method is used to initialize {@link EtypesPackage#eINSTANCE} when that field is accessed. Clients should not + * invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static EtypesPackage init() + { + if (isInited) + { + return (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI); + } + + // Obtain or create and register package + EtypesPackageImpl theEtypesPackage = (EtypesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EtypesPackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new EtypesPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theEtypesPackage.createPackageContents(); + + // Initialize created meta-data + theEtypesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theEtypesPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(EtypesPackage.eNS_URI, theEtypesPackage); + return theEtypesPackage; + } + + /** + * + * + * @generated + */ + public EDataType getBlob() + { + return blobEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getClob() + { + return clobEDataType; + } + + /** + * + * + * @generated + */ + public EtypesFactory getEtypesFactory() + { + return (EtypesFactory)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 data types + blobEDataType = createEDataType(BLOB); + clobEDataType = createEDataType(CLOB); + } + + /** + * + * + * @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); + + // Initialize data types + initEDataType(blobEDataType, CDOBlob.class, "Blob", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(clobEDataType, CDOClob.class, "Clob", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } + +} // EtypesPackageImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java index 5e2cf48af8..7449193ffa 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOCommitContext.java @@ -14,8 +14,10 @@ package org.eclipse.emf.cdo.transaction; import org.eclipse.emf.cdo.CDOObject; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta; +import java.util.Collection; import java.util.List; import java.util.Map; @@ -57,6 +59,11 @@ public interface CDOCommitContext */ public Map getRevisionDeltas(); + /** + * @since 4.0 + */ + public Collection> getLobs(); + /** * @since 4.0 */ diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java index 56ebe8f7ce..9752268658 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java @@ -32,6 +32,7 @@ import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDAndVersion; import org.eclipse.emf.cdo.common.id.CDOIDProvider; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDOAuthenticator; import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -1540,15 +1541,32 @@ public abstract class CDOSessionImpl extends Container implements Inter } } + public List queryLobs(Set ids) + { + int attempt = 0; + for (;;) + { + try + { + return delegate.queryLobs(ids); + } + catch (Exception ex) + { + handleException(++attempt, ex); + } + } + } + public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks, - CDOIDProvider idProvider, CDOCommitData commitData, OMMonitor monitor) + CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs, OMMonitor monitor) { int attempt = 0; for (;;) { try { - return delegate.commitTransaction(transactionID, comment, releaseLocks, idProvider, commitData, monitor); + return delegate + .commitTransaction(transactionID, comment, releaseLocks, idProvider, commitData, lobs, monitor); } catch (Exception ex) { @@ -1558,14 +1576,15 @@ public abstract class CDOSessionImpl extends Container implements Inter } public CommitTransactionResult commitDelegation(CDOBranch branch, String userID, String comment, - CDOCommitData commitData, Map detachedObjectTypes, OMMonitor monitor) + CDOCommitData commitData, Map detachedObjectTypes, Collection> lobs, + OMMonitor monitor) { int attempt = 0; for (;;) { try { - return delegate.commitDelegation(branch, userID, comment, commitData, detachedObjectTypes, monitor); + return delegate.commitDelegation(branch, userID, comment, commitData, detachedObjectTypes, lobs, monitor); } catch (Exception ex) { diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java index 97cb0af48b..aca696f5f3 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java @@ -13,6 +13,7 @@ package org.eclipse.emf.internal.cdo.transaction; import org.eclipse.emf.cdo.common.branch.CDOBranch; import org.eclipse.emf.cdo.common.commit.CDOCommitData; import org.eclipse.emf.cdo.common.commit.CDOCommitInfo; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager; import org.eclipse.emf.cdo.util.CommitException; @@ -33,6 +34,8 @@ import org.eclipse.emf.spi.cdo.InternalCDOUserSavepoint; import org.eclipse.core.runtime.IProgressMonitor; +import java.util.Collection; + /** * @author Simon McDuff * @since 2.0 @@ -60,6 +63,7 @@ public class CDOSingleTransactionStrategyImpl implements CDOTransactionStrategy commitContext.preCommit(); CDOCommitData commitData = commitContext.getCommitData(); + Collection> lobs = commitContext.getLobs(); InternalCDOSession session = transaction.getSession(); CommitTransactionResult result = null; @@ -70,7 +74,7 @@ public class CDOSingleTransactionStrategyImpl implements CDOTransactionStrategy OMMonitor monitor = new EclipseMonitor(progressMonitor); CDOSessionProtocol sessionProtocol = session.getSessionProtocol(); - result = sessionProtocol.commitTransaction(viewID, comment, releaseLocks, transaction, commitData, monitor); + result = sessionProtocol.commitTransaction(viewID, comment, releaseLocks, transaction, commitData, lobs, monitor); String rollbackMessage = result.getRollbackMessage(); if (rollbackMessage != null) diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java index d1d8331980..c65055b325 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java @@ -34,6 +34,7 @@ import org.eclipse.emf.cdo.common.model.CDOModelUtil; import org.eclipse.emf.cdo.common.model.CDOPackageRegistry; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; import org.eclipse.emf.cdo.common.model.EMFUtil; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDODataInput; import org.eclipse.emf.cdo.common.protocol.CDODataOutput; import org.eclipse.emf.cdo.common.revision.CDOList; @@ -113,6 +114,7 @@ import org.eclipse.emf.common.util.URI; 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.EStructuralFeature.Setting; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.InternalEObject.EStore; @@ -2022,6 +2024,8 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa */ private boolean isPartialCommit; + private Map> lobs = new HashMap>(); + public CDOCommitContextImpl(InternalCDOTransaction transaction) { this.transaction = transaction; @@ -2068,12 +2072,13 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa } Map newMap = new HashMap(); - for (CDOID id : map.keySet()) + for (Entry entry : map.entrySet()) { + CDOID id = entry.getKey(); CDOObject o = getObject(id); if (committables.contains(o)) { - newMap.put(id, map.get(id)); + newMap.put(id, entry.getValue()); } else { @@ -2119,6 +2124,11 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa return revisionDeltas; } + public Collection> getLobs() + { + return lobs.values(); + } + public void preCommit() { if (isDirty()) @@ -2171,8 +2181,19 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa new CommitIntegrityCheck(this, CommitIntegrityCheck.Style.EXCEPTION_FAST).check(); } - preCommit(getNewObjects()); - preCommit(getDirtyObjects()); + preCommit(getNewObjects(), lobs); + preCommit(getDirtyObjects(), lobs); + + if (!lobs.isEmpty()) + { + CDOSessionProtocol sessionProtocol = getSession().getSessionProtocol(); + List alreadyKnown = sessionProtocol.queryLobs(lobs.keySet()); + + for (byte[] id : alreadyKnown) + { + lobs.remove(id); + } + } } catch (RuntimeException ex) { @@ -2278,7 +2299,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa return commitInfoManager.createCommitInfo(branch, timeStamp, userID, comment, commitData); } - private void preCommit(Map objects) + private void preCommit(Map objects, Map> lobs) { if (!objects.isEmpty()) { @@ -2290,11 +2311,29 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa throw new LegacyModeNotEnabledException(); } + collectLobs((InternalCDORevision)object.cdoRevision(), lobs); ((InternalCDOObject)object).cdoInternalPreCommit(); } } } + private void collectLobs(InternalCDORevision revision, Map> lobs) + { + EStructuralFeature[] features = revision.getClassInfo().getAllPersistentFeatures(); + for (int i = 0; i < features.length; i++) + { + EStructuralFeature feature = features[i]; + if (CDOModelUtil.isLob(feature.getEType())) + { + CDOLob lob = (CDOLob)revision.getValue(feature); + if (lob != null) + { + lobs.put(lob.getID(), lob); + } + } + } + } + private void postCommit(Map objects, CommitTransactionResult result) { if (!objects.isEmpty()) diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java index 03c69200b3..5bc0d85138 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java @@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.CDOObject; import org.eclipse.emf.cdo.common.commit.CDOCommitData; import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster; import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta; import org.eclipse.emf.cdo.internal.common.id.CDOIDTempObjectExternalImpl; @@ -34,6 +35,7 @@ import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitConte import org.eclipse.core.runtime.IProgressMonitor; import java.text.MessageFormat; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -134,6 +136,11 @@ public class CDOXACommitContextImpl implements InternalCDOXACommitContext return delegateCommitContext.getCommitData(); } + public Collection> getLobs() + { + return delegateCommitContext.getLobs(); + } + public boolean isPartialCommit() { return delegateCommitContext.isPartialCommit(); diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java index 7d6e3986b6..dfd22290bc 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java @@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.common.id.CDOID; import org.eclipse.emf.cdo.common.id.CDOIDAndVersion; import org.eclipse.emf.cdo.common.id.CDOIDProvider; import org.eclipse.emf.cdo.common.model.CDOPackageUnit; +import org.eclipse.emf.cdo.common.model.lob.CDOLob; import org.eclipse.emf.cdo.common.protocol.CDOProtocol; import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster; import org.eclipse.emf.cdo.common.revision.CDORevisionKey; @@ -134,16 +135,21 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo public boolean isObjectLocked(CDOView view, CDOObject object, LockType lockType, boolean byOthers); /** - * @since 3.0 + * @since 4.0 + */ + public List queryLobs(Set ids); + + /** + * @since 4.0 */ public CommitTransactionResult commitTransaction(int transactionID, String comment, boolean releaseLocks, - CDOIDProvider idProvider, CDOCommitData commitData, OMMonitor monitor); + CDOIDProvider idProvider, CDOCommitData commitData, Collection> lobs, OMMonitor monitor); /** * @since 4.0 */ public CommitTransactionResult commitDelegation(CDOBranch branch, String userID, String comment, - CDOCommitData commitData, Map detachedObjectTypes, OMMonitor monitor); + CDOCommitData commitData, Map detachedObjectTypes, Collection> lobs, OMMonitor monitor); /** * @since 3.0 diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/DigestWriter.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/DigestWriter.java new file mode 100644 index 0000000000..420dbc3296 --- /dev/null +++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/DigestWriter.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.util.io; + +import java.io.FilterWriter; +import java.io.IOException; +import java.io.Writer; +import java.security.MessageDigest; + +/** + * @author Eike Stepper + * @since 3.1 + */ +public class DigestWriter extends FilterWriter +{ + private boolean on = true; + + /** + * The message digest associated with this stream. + */ + protected MessageDigest digest; + + /** + * Creates a digest writer, using the specified writer and message digest. + * + * @param writer + * the writer. + * @param digest + * the message digest to associate with this writer. + */ + public DigestWriter(Writer writer, MessageDigest digest) + { + super(writer); + setMessageDigest(digest); + } + + /** + * Returns the message digest associated with this writer. + * + * @return the message digest associated with this writer. + * @see #setMessageDigest(java.security.MessageDigest) + */ + public MessageDigest getMessageDigest() + { + return digest; + } + + /** + * Associates the specified message digest with this writer. + * + * @param digest + * the message digest to be associated with this writer. + * @see #getMessageDigest() + */ + public void setMessageDigest(MessageDigest digest) + { + this.digest = digest; + } + + @Override + public void write(int c) throws IOException + { + if (on) + { + updateDigest(c); + } + + out.write(c); + } + + @Override + public void write(char cbuf[], int off, int len) throws IOException + { + if (on) + { + int end = off + len; + for (int i = off; i < end; i++) + { + updateDigest(cbuf[i]); + } + } + + out.write(cbuf, off, len); + } + + @Override + public void write(String str, int off, int len) throws IOException + { + if (on) + { + int end = off + len; + for (int i = off; i < end; i++) + { + updateDigest(str.charAt(i)); + } + } + + out.write(str, off, len); + } + + private void updateDigest(int c) + { + digest.update((byte)(c >>> 8 & 0xFF)); + digest.update((byte)(c >>> 0 & 0xFF)); + } + + /** + * Turns the digest function on or off. The default is on. When it is on, a call to one of the write + * methods results in an update on the message digest. But when it is off, the message digest is not updated. + * + * @param on + * true to turn the digest function on, false to turn it off. + */ + public void on(boolean on) + { + this.on = on; + } + + /** + * Prints a string representation of this digest output stream and its associated message digest object. + */ + @Override + public String toString() + { + return "[Digest Writer] " + digest.toString(); + } +} diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOUtil.java index 6764f294e0..08d03e1127 100644 --- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOUtil.java +++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOUtil.java @@ -14,10 +14,14 @@ import org.eclipse.net4j.internal.util.bundle.OM; import org.eclipse.net4j.util.StringUtil; import org.eclipse.net4j.util.WrappedException; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.CharArrayReader; +import java.io.CharArrayWriter; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; @@ -26,8 +30,12 @@ import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.io.PrintStream; +import java.io.Reader; +import java.io.Writer; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -60,6 +68,8 @@ public final class IOUtil private static final char SEP_WINDOWS = '\\'; + private static final int EOF = -1; + private IOUtil() { } @@ -376,6 +386,74 @@ public final class IOUtil } } + /** + * @since 3.1 + */ + public static long copyBinary(InputStream inputStream, OutputStream outputStream) throws IOException + { + if (!(inputStream instanceof BufferedInputStream) && !(inputStream instanceof ByteArrayInputStream)) + { + inputStream = new BufferedInputStream(inputStream); + } + + if (!(outputStream instanceof BufferedOutputStream) && !(outputStream instanceof ByteArrayOutputStream)) + { + outputStream = new BufferedOutputStream(outputStream); + } + + long size = 0; + int b; + while ((b = inputStream.read()) != EOF) + { + outputStream.write(b); + } + + outputStream.flush(); + return size; + } + + /** + * @since 3.1 + */ + public static long copyCharacter(Reader reader, OutputStream outputStream) throws IOException + { + return copyCharacter(reader, new OutputStreamWriter(outputStream)); + } + + /** + * @since 3.1 + */ + public static long copyCharacter(InputStream inputStream, Writer writer) throws IOException + { + return copyCharacter(new InputStreamReader(inputStream), writer); + } + + /** + * @since 3.1 + */ + public static long copyCharacter(Reader reader, Writer writer) throws IOException + { + if (!(reader instanceof BufferedReader) && !(reader instanceof CharArrayReader)) + { + reader = new BufferedReader(reader); + } + + if (!(writer instanceof BufferedWriter) && !(writer instanceof CharArrayWriter)) + { + writer = new BufferedWriter(writer); + } + + long size = 0; + int c; + while ((c = reader.read()) != EOF) + { + writer.write(c); + } + + writer.flush(); + return size; + } + public static int copy(InputStream input, OutputStream output, int size, byte buffer[]) throws IORuntimeException { try -- cgit v1.2.3