[Swift-commit] r2960 - trunk/src/org/griphyn/vdl/karajan/lib

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jun 16 11:06:23 CDT 2009


Author: benc
Date: 2009-06-16 11:06:23 -0500 (Tue, 16 Jun 2009)
New Revision: 2960

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java
Log:
provenance information for explicitly constructed arrays made with
vdl:createarray

Modified: trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java	2009-06-16 15:20:21 UTC (rev 2959)
+++ trunk/src/org/griphyn/vdl/karajan/lib/CreateArray.java	2009-06-16 16:06:23 UTC (rev 2960)
@@ -3,6 +3,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.log4j.Logger;
+
 import org.globus.cog.karajan.arguments.Arg;
 import org.globus.cog.karajan.stack.VariableStack;
 import org.globus.cog.karajan.workflow.ExecutionException;
@@ -12,6 +14,9 @@
 import org.griphyn.vdl.type.Type;
 
 public class CreateArray extends VDLFunction {
+
+	public static final Logger logger = Logger.getLogger(CreateArray.class);
+
 	public static final Arg PA_VALUE = new Arg.Positional("value");
 	
 	static {
@@ -54,20 +59,24 @@
 
 			DSHandle handle = new RootArrayDataNode(type.arrayType());
 
+			logger.info("CREATEARRAY START array="+handle.getIdentifier());
+
 			int index = 0;
 			i = ((List) value).iterator();
 			while (i.hasNext()) {
 				// TODO check type consistency of elements with
 				// the type of the array
-				Object n = i.next();
+				DSHandle n = (DSHandle) i.next();
+				// we know this DSHandle cast will work because we checked
+				// it in the previous scan of the array contents
 				Path p = Path.EMPTY_PATH.addLast(String.valueOf(index), true);
 
-				// we know this DSHandle cast will work because we checked
-				// it in the previous scan of the array contents
-				handle.getField(p).set((DSHandle) n);
+				handle.getField(p).set(n);
+				logger.info("CREATEARRAY MEMBER array="+handle.getIdentifier()+" index="+index+" member="+n.getIdentifier());
 				index++;
 			}
 			closeShallow(stack, handle);
+			logger.info("CREATEARRAY COMPLETED array="+handle.getIdentifier());
 
 			return handle;
 		}




More information about the Swift-commit mailing list