[Swift-commit] r2559 - in trunk: libexec src/org/griphyn/vdl/karajan/lib
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Tue Feb 17 09:11:46 CST 2009
Author: benc
Date: 2009-02-17 09:11:43 -0600 (Tue, 17 Feb 2009)
New Revision: 2559
Removed:
trunk/src/org/griphyn/vdl/karajan/lib/Assign.java
Modified:
trunk/libexec/vdl-lib.xml
Log:
Assign karajan function is not used, so remove.
Modified: trunk/libexec/vdl-lib.xml
===================================================================
--- trunk/libexec/vdl-lib.xml 2009-02-17 15:10:21 UTC (rev 2558)
+++ trunk/libexec/vdl-lib.xml 2009-02-17 15:11:43 UTC (rev 2559)
@@ -51,7 +51,6 @@
<export name="isFileBound"><elementDef classname="org.griphyn.vdl.karajan.lib.IsFileBound"/></export>
<export name="isRestartable"><elementDef classname="org.griphyn.vdl.karajan.lib.IsRestartable"/></export>
<export name="fringePaths"><elementDef classname="org.griphyn.vdl.karajan.lib.FringePaths"/></export>
- <export name="assign"><elementDef classname="org.griphyn.vdl.karajan.lib.Assign"/></export>
<export name="closeDataset"><elementDef classname="org.griphyn.vdl.karajan.lib.CloseDataset"/></export>
<export name="partialCloseDataset"><elementDef classname="org.griphyn.vdl.karajan.lib.PartialCloseDataset"/></export>
<export name="range"><elementDef classname="org.griphyn.vdl.karajan.lib.Range"/></export>
Deleted: trunk/src/org/griphyn/vdl/karajan/lib/Assign.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/Assign.java 2009-02-17 15:10:21 UTC (rev 2558)
+++ trunk/src/org/griphyn/vdl/karajan/lib/Assign.java 2009-02-17 15:11:43 UTC (rev 2559)
@@ -1,79 +0,0 @@
-/*
- * Created on Dec 26, 2006
- */
-package org.griphyn.vdl.karajan.lib;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.globus.cog.karajan.arguments.Arg;
-import org.globus.cog.karajan.stack.VariableStack;
-import org.globus.cog.karajan.workflow.ExecutionException;
-import org.griphyn.vdl.mapping.DSHandle;
-import org.griphyn.vdl.mapping.InvalidPathException;
-import org.griphyn.vdl.mapping.Path;
-
-public class Assign extends VDLFunction {
- public static final Arg A_DVAR = new Arg.TypedPositional("dvar", DSHandle.class, "handle");
- public static final Arg A_SVAR = new Arg.Positional("svar");
- public static final Arg A_DPATH = new Arg.Optional("dpath", "");
- public static final Arg A_SPATH = new Arg.Optional("spath", "");
-
- static {
- setArguments(Assign.class, new Arg[] { A_DVAR, A_SVAR, A_DPATH, A_SPATH });
- }
-
- public Object function(VariableStack stack) throws ExecutionException {
- Path dpath = parsePath(A_DPATH.getValue(stack), stack);
- Path spath = parsePath(A_SPATH.getValue(stack), stack);
- DSHandle dvar = (DSHandle) A_DVAR.getValue(stack);
- Object s = A_SVAR.getValue(stack);
- if (s == null) {
- throw new ExecutionException("Source variable is null");
- }
- try {
- dvar = dvar.getField(dpath);
- if (s instanceof List) {
- if (!Path.EMPTY_PATH.equals(spath)) {
- throw new ExecutionException(
- "If the source is an array there can be no source path (" + spath + ")");
- }
- int index = 0;
- Iterator i = ((List) s).iterator();
- while (i.hasNext()) {
- Object n = i.next();
- Path p = Path.EMPTY_PATH.addLast(String.valueOf(index), true);
- if (n instanceof DSHandle) {
- dvar.getField(p).set((DSHandle) n);
- }
- else {
- DSHandle field = dvar.getField(p);
- field.setValue(n);
- closeShallow(stack, field);
- }
- index++;
- }
- closeShallow(stack, dvar);
- }
- else if (s instanceof DSHandle) {
- DSHandle svar = (DSHandle) s;
- svar = svar.getField(spath);
- /*
- * Iterator i = svar.getFringePaths().iterator(); while
- * (i.hasNext()) { String leafSPath = (String) i.next(); Path
- * leafPath = Path.parse(leafSPath); mergeListeners(stack,
- * dvar.getField(leafPath), svar.getField(leafPath)); }
- */
- dvar.set(svar);
- }
- else {
- dvar.setValue(s);
- closeShallow(stack, dvar);
- }
- }
- catch (InvalidPathException e) {
- throw new ExecutionException(e);
- }
- return null;
- }
-}
More information about the Swift-commit
mailing list