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>
+{
+ private Collection
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
+ * The following features are implemented: + *
+ * The following features are implemented: + *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
- * 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
* The following features are supported:
* 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 SubpackageSwitchtarget
.
- *
- * @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 SubpackageSwitchcaseXXX
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 SubpackageSwitchcaseXXX
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 SubpackageSwitchcaseXXX
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
- *
*
* 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: + *
+ * 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: + *
+ * 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; ** The following features are supported: *
* 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* 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: *
* 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* 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: *
* 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* 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* 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: *
* 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* 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* 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: *
* 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: *
* 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: *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
- * 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: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are implemented: *
* The following features are supported: *
* 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; ** The following features are implemented: *
- * 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
+ * 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 MapcreateXXX
* 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 SubpackageSwitchtarget
.
- *
- * @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 SubpackageSwitchcaseXXX
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 SubpackageSwitchcaseXXX
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 SubpackageSwitchcaseXXX
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 SubpackageSwitchcreateXXX
* 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 Model3Switchtarget
.
- *
- * @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 Model3SwitchcaseXXX
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 Model3SwitchcaseXXX
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 Model3SwitchcaseXXX
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
+ *
+ *
+ * @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
+ *
+ *
+ *
+ *
+ * @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 @@
+/**
+ * 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