You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by fr...@apache.org on 2006/09/07 02:45:49 UTC
svn commit: r440915 -
/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
Author: frankb
Date: Wed Sep 6 17:45:48 2006
New Revision: 440915
URL: http://svn.apache.org/viewvc?view=rev&rev=440915
Log:
One more small change for TUSCANY-670
Modified:
incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java?view=diff&rev=440915&r1=440914&r2=440915
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java (original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java Wed Sep 6 17:45:48 2006
@@ -234,20 +234,25 @@
/**
* Registers the specified {@link Type type}(s) to be serialized along with
- * the {@link DataObject data object}(s) in the graph.
- * @param dataGraph The DataGraph in which to register the specified type(s)
- * @param types A list containing the type(s) to be registered or null to automatically register all
- * types used by the objects in the DataGraph.
+ * the {@link DataObject data object}(s) in the graph. For example, the list of types returned from
+ * {@link TypeHelper#define} can be registered with this method, allowing deserialization of
+ * instances of a dynamically defined model.
+ * @param dataGraph the DataGraph in which to register the specified type(s).
+ * @param types a list containing the type(s) to be registered (TBD or null to automatically register all
+ * types used by the objects in the DataGraph).
*/
public static void registerDataGraphTypes(DataGraph dataGraph, List/*Type*/ types)
{
- ResourceSet resourceSet = ((DataGraphImpl)dataGraph).getResourceSet();
-
+ //if (types == null)
+ // types = SDOUtil.getDataGraphTypes(dataGraph);
+
Set/*EPackage*/ packages = new HashSet();
for (final Iterator iterator = types.iterator(); iterator.hasNext(); ) {
EClassifier type = (EClassifier)iterator.next();
packages.add(type.getEPackage());
}
+
+ ResourceSet resourceSet = ((DataGraphImpl)dataGraph).getResourceSet();
for (Iterator iterator = packages.iterator(); iterator.hasNext(); ) {
EPackage typePackage = (EPackage)iterator.next();
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org