Index: test/clienttestfiles/tpc02-water-flow-base.xml
===================================================================
--- test/clienttestfiles/tpc02-water-flow-base.xml	(nonexistent)
+++ test/clienttestfiles/tpc02-water-flow-base.xml	(revision 5139)
@@ -0,0 +1,2198 @@
+<?xml version="1.0"?>
+<entity name="tpc02-water-flow-base" class="org.kepler.moml.CompositeClassEntity">
+<property name="entityId"  value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:888:40:1" class="org.kepler.moml.NamedObjId"/>
+<property name="class" value="ptolemy.actor.TypedCompositeActor" class="ptolemy.kernel.util.StringAttribute">
+  <property name="id" value="null" class="ptolemy.kernel.util.StringAttribute"/>
+</property>
+
+
+
+<property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.1.devel">
+</property>
+
+<property name="SDF Director" class="ptolemy.domains.sdf.kernel.SDFDirector">
+    <property name="iterations" class="ptolemy.data.expr.Parameter" value="1">
+    </property>
+    <property name="vectorizationFactor" class="ptolemy.data.expr.Parameter" value="1">
+    </property>
+    <property name="allowDisconnectedGraphs" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+    <property name="allowRateChanges" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="constrainBufferSizes" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+    <property name="period" class="ptolemy.data.expr.Parameter" value="0.0">
+    </property>
+    <property name="synchronizeToRealTime" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="timeResolution" class="ptolemy.actor.parameters.SharedParameter" value="1E-10">
+    </property>
+    <property name="Scheduler" class="ptolemy.domains.sdf.kernel.SDFScheduler">
+        <property name="constrainBufferSizes" class="ptolemy.data.expr.Parameter" value="constrainBufferSizes">
+        </property>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Steve Neuendorffer</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&#10;&lt;p&gt;The SDF Director is often used to oversee fairly simple, sequential workflows in which the director can determine the order of actor invocation from the workflow. Types of workflows that would run well under an SDF Director include processing and reformatting tabular data, converting one data type to another, and reading and plotting a series of data points. A workflow in which an image is read, processed (rotated, scaled, clipped, filtered, etc.), and then displayed, is also an example of a sequential workflow that requires a director simply to ensure that each actor fires in the proper order (i.e., that each actor executes only after it receives its required inputs).&lt;/p&gt;&#10;&#10;&lt;p&gt;The SDF Director is very efficient and will not tax system resources with overhead. However, this efficiency requires that certain conditions be met, namely that the data consumption and production rate of each actor in an SDF workflow be constant and declared. If an actor reads one piece of data and calculates and outputs a single result, it must always read and output a single token of data. This data rate cannot change during workflow execution and, in general, workflows that require dynamic scheduling and/or flow control cannot use this director. Additionally, the SDF Director has no understanding of passing time (at least by default), and actors that depend on a notion of time may not work as expected. For example, a TimedPlotter actor will plot all values at time zero when used in SDF. &lt;/p&gt;&#10;&#10;&lt;p&gt;By default, the SDF Director requires that all actors in its workflow be connected. Otherwise, the director cannot account for concurrency between disconnected workflow parts. Usually, a PN Director should be used for workflows that contain disconnected actors; however, the SDF Director's allowDisconnectedGraphs parameter may also be set to true. The SDF Director will then schedule each disconnected &quot;island&quot; independently. The director cannot infer the sequential relationship between disconnected actors (i.e., nothing forces the director to finish executing all actors on one island before firing actors on another). However, the order of execution within each island should be correct. Usually, disconnected graphs in an SDF model indicate an error.&lt;/p&gt;&#10; &#10;&lt;p&gt;Because SDF Directors schedule actors to fire only after they receive their inputs, workflows that require loops (feeding an actor's output back into its input port for further processing) can cause &quot;deadlock&quot; errors. The deadlock errors occur because the actor depends on its own output value as an initial input. To fix this problem, use a SampleDelay actor to generate and inject an initial input value into the workflow.&lt;/p&gt;&#10;&#10;&lt;p&gt;The SDF Director determines the order in which actors execute and how many times each actor needs to be fired to complete a single iteration of the workflow. This schedule is calculated BEFORE the director begins to iterate the workflow. Because the SDF Director calculates a schedule in advance, it is quite efficient. However, SDF workflows must be static. In other words, the same number of tokens must be consumed/produced at every iteration of the workflow. Workflows that require dynamic control structures, such as a BooleanSwitch actor that sends output on one of two ports depending on the value of a 'control', cannot be used with an SDF Director because the number of tokens on each output can change for each execution.&lt;/p&gt;&#10;&#10;&lt;p&gt;Unless otherwise specified, the SDF Director assumes that each actor consumes and produces exactly one token per channel on each firing. Actors that do not follow the one-token-per-channel firing convention (e.g., Repeat or Ramp) must declare the number of tokens they produce or consume via the appropriate parameters. &lt;/p&gt;&#10;&#10;&lt;p&gt;The number of times a workflow is iterated is controlled by the director's iterations parameter. By default, this parameter is set to &quot;0&quot;. Note that &quot;0&quot; does not mean &quot;no iterations.&quot; Rather, &quot;0&quot; means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. A value of 1, meaning that the director will run the workflow once, is often the best setting when building an SDF workflow. &lt;/p&gt;&#10;&#10;&lt;p&gt;The amount of data processed by an SDF workflow is a function of both the number of times the workflow iterates and the value of the director's vectorizationFactor parameter. The vectorizationFactor is used to increase the efficiency of a workflow by increasing the number of times actors fire each time the workflow iterates. If the parameter is set to a positive integer (other than 1), the director will fire each actor the specified number of times more than normal. The default is 1, indicating that no vectorization should be performed. Keep in mind that changing the vectorizationFactor parameter changes the meaning of a nested SDF workflow and may cause deadlock in a workflow that uses it. &lt;/p&gt;&#10;&#10;&lt;p&gt;The SDF Director has several advanced parameters that are generally only relevant when an SDF workflow contains composite components. In most cases the period, timeResolution, synchronizeToRealTime, allowRateChanges, timeResolution, and constrainBufferSizes parameters can be left at their default values.&lt;/p&gt;&#10;&#10;&lt;p&gt;For more information about the SDF Director, see the Ptolemy documentation (http://ptolemy.eecs.berkeley.edu/papers/05/ptIIdesign3-domains/ptIIdesign3-domains.pdf).&lt;/p&gt;&#10;&#10;</configure></property>
+<property name="prop:allowDisconnectedGraphs" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether to allow disconnected actors in the workflow (by default, all actors are required to be connected). If disconnected actors are permitted, the SDF Director will schedule each disconnected 'island' independently. Nothing &quot;forces&quot; the director to finish executing all actors on one island before firing actors on another. However, the order of execution within each island should be correct. Usually, disconnected graphs in an SDF workflow indicate an error.</configure></property>
+<property name="prop:allowRateChanges" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether dynamic rate changes are permitted or not. By default, rate changes are not permitted, and the director will perform a check to disallow such workflows. If the parameter is selected, then workflows that require rate parameters to be modified during execution are valid, and the SDF Director will dynamically compute a new schedule at runtime. This is an advanced parameter that can usually be left at its default value.</configure></property>
+<property name="prop:constrainBufferSizes" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether buffer sizes are fixed. By default, buffers are fixed, and attempts to write to the buffer that cause the buffer to exceed its scheduled size result in an error. This is an advanced parameter that can usually be left at its default value.</configure></property>
+<property name="prop:timeResolution" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The time precision used by this director. All time values are rounded to the nearest multiple of this number. The value is a double that defaults to &quot;1E-10&quot; (which is 10-10). This is an advanced parameter that can usually be left at its default value.</configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to &quot;0&quot;. Note that &quot;0&quot; does not mean &quot;no iterations.&quot; Rather, &quot;0&quot; means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. A value of 1, meaning that the director will run the workflow once, is often the best setting when building an SDF workflow. </configure></property>
+<property name="prop:vectorizationFactor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vectorizationFactor is used to increase the efficiency of a workflow by increasing the number of times actors fire each time the workflow iterates. If the parameter is set to a positive integer (other than 1), the director will fire each actor the specified number of times more than normal. The default is 1, indicating that no vectorization should be performed. Keep in mind that changing the vectorizationFactor parameter changes the meaning of a nested SDF workflow and may cause deadlock in a workflow that uses it. </configure></property>
+<property name="prop:synchronizeToRealTime" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether the execution should synchronize to real time or not. By default, the director does not synchronize to real time. If synchronize is selected, the director will only process the workflow when elapsed real time matches the product of the period parameter and the iteration count. Note: if the period parameter has a value of 0.0 (the default), then selecting this parameter has no effect. This is an advanced parameter that can usually be left at its default value.</configure></property>
+<property name="prop:period" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The time period of each iteration. The value is a double that defaults to 0.0, which means that the director does not increment workflow time. If the value greater than 0.0, the actor will increment workflow time each time it fires. This is an advanced parameter that can usually be left at its default value. </configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:director:1:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.domains.sdf.kernel.SDFDirector">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:directorclass:1:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Director">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Director">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[-200.0, -215.0]">
+    </property>
+</property>
+
+<property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={16, 25, 1264, 974}, maximized=false}">
+</property>
+
+<property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[955, 682]">
+</property>
+
+<property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+</property>
+
+<property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{215.4999999999999, 59.0}">
+</property>
+
+<property name="Annotation3" class="ptolemy.vergil.kernel.attributes.TextAttribute">
+    <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+    </property>
+    <property name="_hideAllParameters" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+    <property name="textSize" class="ptolemy.data.expr.Parameter" value="14">
+    </property>
+    <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
+    </property>
+    <property name="fontFamily" class="ptolemy.data.expr.StringParameter" value="SansSerif">
+    </property>
+    <property name="bold" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Workflow design:&#10;Jim Regetz, &#10;Kevin Drury, &#10;Mark Schildhauer, &#10;Judith Kruger, &#10;Ben Leinfelder,&#10;Matt Jones">
+        <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="20">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="80">
+            </property>
+        </property>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Use the Annotation attribute to annotate a workflow. Double-click the attribute to customize the content, font size, color, and basic formatting (bold and italics).</configure></property>
+<property name="prop:fontFamily" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font face. Select a font from the drop-down menu. The default is &quot;SansSerif&quot;.</configure></property>
+<property name="prop:italic" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be italics. By default, type will not be italicized.</configure></property>
+<property name="prop:bold" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be bold. By default, type will not be bold.</configure></property>
+<property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
+<property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
+<property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:22:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[-205.0, -10.0]">
+    </property>
+    <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+    </property>
+</property>
+
+<property name="reportTitle" class="ptolemy.data.expr.StringParameter" value="River Flow TPCs">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;StringParameter specifies a persistent string. &lt;/p&gt;&#10;&#10;&lt;p&gt;Change the name of the StringParameter to better identify the specified value (right-click the parameter and select &quot;Customize Name&quot; from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).&#10;&lt;/p&gt;</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:421:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+    </property>
+    <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+    </property>
+    <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+        <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+        </property>
+    </property>
+    <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+        <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+    </property>
+    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[-65.0, -155.0]">
+    </property>
+</property>
+
+<property name="year" class="ptolemy.data.expr.Parameter" value="2007">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:420:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.Parameter">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1184:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+    </property>
+    <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+    </property>
+    <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+        <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
+        </property>
+    </property>
+    <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+        <configure>
+      <svg>
+        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
+      </svg>
+    </configure>
+    </property>
+    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[-65.0, -175.0]">
+    </property>
+</property>
+
+<property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:27:13:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:972:28:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:5:27:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2083:53:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:119:5:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:379:26:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:357:1030:4">
+</property>
+
+<property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
+    <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+    </property>
+    <property name="_hideAllParameters" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+    <property name="textSize" class="ptolemy.data.expr.Parameter" value="14">
+    </property>
+    <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
+    </property>
+    <property name="fontFamily" class="ptolemy.data.expr.StringParameter" value="SansSerif">
+    </property>
+    <property name="bold" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="center" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Year parameter can either be a single year (e.g., 2007) or null,&#10;in which case the year will be based on current calendar year.">
+        <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="20">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="80">
+            </property>
+        </property>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Use the Annotation attribute to annotate a workflow. Double-click the attribute to customize the content, font size, color, and basic formatting (bold and italics).</configure></property>
+<property name="prop:fontFamily" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font face. Select a font from the drop-down menu. The default is &quot;SansSerif&quot;.</configure></property>
+<property name="prop:italic" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be italics. By default, type will not be italicized.</configure></property>
+<property name="prop:bold" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be bold. By default, type will not be bold.</configure></property>
+<property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
+<property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
+<property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:17:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[-80.0, -225.0]">
+    </property>
+    <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+    </property>
+</property>
+
+<property name="TOP Provenance Recorder" class="org.kepler.provenance.ProvenanceRecorder">
+    <property name="Recording Type" class="ptolemy.data.expr.StringParameter" value="SQL-SPA-v8">
+    </property>
+    <property name="Record Token Values" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+</property>
+
+<property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
+    <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+    </property>
+    <property name="_hideAllParameters" class="ptolemy.data.expr.Parameter" value="true">
+    </property>
+    <property name="textSize" class="ptolemy.data.expr.Parameter" value="14">
+    </property>
+    <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
+    </property>
+    <property name="fontFamily" class="ptolemy.data.expr.StringParameter" value="SansSerif">
+    </property>
+    <property name="bold" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="center" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Expose TPC status for reporting">
+        <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="20">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="80">
+            </property>
+        </property>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Use the Annotation attribute to annotate a workflow. Double-click the attribute to customize the content, font size, color, and basic formatting (bold and italics).</configure></property>
+<property name="prop:fontFamily" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font face. Select a font from the drop-down menu. The default is &quot;SansSerif&quot;.</configure></property>
+<property name="prop:italic" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be italics. By default, type will not be italicized.</configure></property>
+<property name="prop:bold" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be bold. By default, type will not be bold.</configure></property>
+<property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
+<property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
+<property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
+</property>    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[205.0, 150.0]">
+    </property>
+</property>
+
+<property name="Reporting Listener" class="org.kepler.module.reporting.ReportingListener">
+</property>
+
+
+
+
+
+<relation name="relation" class="ptolemy.actor.TypedIORelation">
+    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+    </property>
+</relation>
+
+<relation name="relation2" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<relation name="relation3" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<relation name="relation6" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<relation name="relation5" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<relation name="relation4" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<relation name="relation7" class="ptolemy.actor.TypedIORelation">
+</relation>
+
+<entity name="Base IFR table" class="org.ecoinformatics.seek.datasource.eml.eml2.Eml200DataSource">
+    <display name="Base IFR&#10;   table"/>
+    <property name="emlFilePath" class="ptolemy.data.expr.FileParameter" value="">
+        <display name="EML File"/>
+    </property>
+    <property name="dataFilePath" class="ptolemy.data.expr.FileParameter" value="">
+        <display name="Data File"/>
+    </property>
+    <property name="schemaDef" class="ptolemy.kernel.util.StringAttribute" value="&lt;schema&gt;&#10;  &lt;table name=&quot;ifrHiTable.txt&quot;&gt;&#10;    &lt;field name=&quot;river&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jan&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Feb&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Mar&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Apr&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;May&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jun&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jul&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Aug&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Sep&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Oct&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Nov&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Dec&quot; dataType=&quot;STRING&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;ifrLowTable.txt&quot;&gt;&#10;    &lt;field name=&quot;river&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jan&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Feb&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Mar&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Apr&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;May&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jun&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Jul&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Aug&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Sep&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Oct&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Nov&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Dec&quot; dataType=&quot;STRING&quot;/&gt;&#10;  &lt;/table&gt;&#10;&lt;/schema&gt;&#10;">
+        <display name="Schema Definition"/>
+        <property name="schemaDef" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+            </property>
+        </property>
+    </property>
+    <property name="sqlDef" class="ptolemy.kernel.util.StringAttribute">
+        <display name="SQL Command"/>
+        <property name="sqlDef" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+            </property>
+        </property>
+    </property>
+    <property name="selectedEntity" class="ptolemy.data.expr.StringParameter" value="ifrLowTable.txt">
+        <display name="Selected Entity"/>
+    </property>
+    <property name="dataOutputFormat" class="ptolemy.data.expr.StringParameter" value="As Cache File Name">
+        <display name="Data Output Format"/>
+    </property>
+    <property name="fileExtensionFilter" class="ptolemy.data.expr.StringParameter" value="">
+        <display name="File Extension Filter"/>
+    </property>
+    <property name="isLenient" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Allow lenient data parsing"/>
+    </property>
+    <property name="checkVersion" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Check for latest version"/>
+    </property>
+    <property name="_tableauFactory" class="org.kepler.objectmanager.data.db.QBTableauFactory">
+        <property name="sqlName" class="ptolemy.kernel.util.StringAttribute" value="sqlDef">
+        </property>
+        <property name="schemaName" class="ptolemy.kernel.util.StringAttribute" value="schemaDef">
+        </property>
+    </property>
+    <property name="recordid" class="ptolemy.kernel.util.StringAttribute" value="knb.218.2">
+    </property>
+    <property name="endpoint" class="ptolemy.kernel.util.StringAttribute" value="http://ecogrid.ecoinformatics.org/knb/services/QueryService">
+    </property>
+    <property name="namespace" class="ptolemy.kernel.util.StringAttribute" value="eml://ecoinformatics.org/eml-2.0.1">
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>matt jones, jing tao, chad</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The EML2Dataset actor provides access to a wide variety of data packages that have been described using EML (Ecological Metadata Language). The actor accesses an EML dataset and handles the mechanical issues involved in parsing metadata, downloading the dataset (if applicable), and emitting data to downstream actors.&lt;/p&gt;&#10;&#10;&lt;p&gt;Each data package contains an EML metadata description and one or more data entities (e.g., data tables, spatial raster images, spatial vector images). The EML metadata allows the described data to be easily ingested into Kepler and exposed for use in downstream components. The data packages can be accessed from the local file system or through any EcoGrid server that provides access to its collection of data objects. The supported data transfer protocols include http, ftp, file, ecogrid, and srb. &lt;/p&gt;&#10;&#10;&lt;p&gt;After parsing the EML metadata, the actor automatically reconfigures its exposed ports to provide one port for each attribute described by the first entity of the EML description. For example, if the first entity is a data table with four columns, the ports might be &quot;Site&quot;, &quot;Date&quot;, &quot;Plot&quot;, and &quot;Rainfall.&quot; These details are obtained from the EML document. To preview the data, right-click the actor icon and select Preview from the drop-down menu.&lt;/p&gt;&#10;&#10;&lt;p&gt;By default, the ports created by the EML2Dataset actor represent data fields, and one tuple of data (e.g., one database row) is emitted on these ports each time the actor fires. Alternatively, the actor can be configured so that the ports represent an array of field values (&quot;AsColumnVector&quot;), or so that the ports represent an entire table of data (&quot;AsTable&quot;). Data tables are formatted in comma-separated-value (CSV) format.&lt;/p&gt;&#10;&#10;&lt;p&gt;If more than one data entity is described in the EML metadata, then the output of the actor defaults to the first entity listed in the EML. To select the other entities, specify an entity with the Selected parameter, or use the Query Builder to describe the filter and join that should be used to produce the data output. To use the Query Builder, right-click the actor and select &quot;Open Actor.&quot; Specify the fields to be output and any filtering constraints to be applied.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Output ports are automatically configured to provide one port for each attribute in the first entity described in the EML description. For example, if the first entity is a data table with four columns, the ports might be &quot;Site&quot;, &quot;Date&quot;, &quot;Plot&quot;, and &quot;Rainfall.&quot; These details are obtained from the EML document.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:isLenient" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If this parameter is selected, &quot;extra&quot; columns of data (e.g., comments that people have entered on a line or something of that nature) that are not described in the metadata are ignored, allowing the workflow to execute. If the option is unchecked (the default), the workflow execution will halt until the discrepancy between the data and metadata is corrected.</configure></property>
+<property name="prop:checkVersion" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select this parameter to check the EarthGrid for updates to the data. If the actor finds a version of the data that is more recent than the cached data on your local system, the actor will prompt the user to either download the latest data and metadata or ignore the newer version. Note that different versions of the data can have vastly different structures (new columns, or even new tables of data might be included or removed). If this parameter is selected, users should be prepared to handle changes that might arise from differences in the data structure.</configure></property>
+<property name="prop:selectedEntity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If this EML data package has multiple entities, the selectedEntity parameter specifies which entity should be output. When this parameter is unset (the default), data from the first entity described in an EML package is output. This parameter is only used if no query statement is specified, or if a query statement is used and the output format is one of &quot;As Table&quot;, &quot;As Byte Array&quot;, &quot;As Uncompressed File Name&quot;, and &quot;As Cache File Name&quot;. To specify a query statement, right-click the actor and select Open Actor.</configure></property>
+<property name="prop:dataOutputFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify which ports are created for the actor and what data is emitted on those ports during each fire cycle. For example, this field can be configured to produce one port for each column in a data table, or one port that emits the entire data table at once in CSV format. Specifically, the output format choices are:&#10;&lt;table&gt;&#10;&lt;tr&gt;&lt;td&gt;As Field (the default)&lt;/td&gt;&lt;td&gt; The actor creates one output port for each field (i.e., column/attribute/variable) that is described in the EML metadata for the data package. The type of each port (e.g., string, int, double, etc.) matches the base type of the field. If a query statement has been used to subset the data, then only those fields selected in the query statement will be configured as ports. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Table&lt;/td&gt;&lt;td&gt; The selected data will be output as a string that contains the entire entity data. The actor creates three output ports: DataTable - the data itself, Delimiter - delimiter to separate fields, and NumColumns - the number of fields in the table. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Row&lt;/td&gt;&lt;td&gt;  One tuple of selected data is formatted as an array and output. The actor creates one output port (DataRow), and the data type is a record containing each of the individual data fields. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Byte Array&lt;/td&gt;&lt;td&gt; Selected data will be output as an array of bytes. The actor creates two output ports: BinaryData - contains the raw data itself, and EndOfStream - indicates whether the end of data stream has been reached.&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As UnCompressed File Name&lt;/td&gt;&lt;td&gt; This format is only used when the data package is a compressed file (zip, tar, et al). The compressed archive file is uncompressed after it is downloaded. The actor creates one output port, which contains an array of the filenames of all of the uncompressed archive files. If a FileExtensionFilter is specified, then the array will only contain files that match the specified extension.&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As Cache File Name&lt;/td&gt;&lt;td&gt;   Kepler stores data files downloaded from remote sites into its cache system. This output format will send the local cache file path for the data package so that workflow designers can directly access the cache files. The actor creates two output ports: CacheLocalFileName (the local file path) and CacheResourceName (the EML data link. e.g., ecogrid://knb/tao.2.1).&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As Column Vector&lt;/td&gt;&lt;td&gt; This output format is similar to &quot;As Field&quot;, except instead of sending out a single value on each port, the actor sends out an array of all of the data for each field. The type of each port is an array of the base type for the field.&lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As ColumnBased Record&lt;/td&gt;&lt;td&gt;  This output format sends all data on one port using a record structure that encapsulates the entire data entity. The record will contain one array for each data field, and the type of each array will be determined by the type of the field it represents.&lt;/td&gt;&lt;/tr&gt;&#10;&lt;/table&gt;&#10;&#10;</configure></property>
+<property name="prop:emlFilePath" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The file path of a local EML metadata file used to describe and access an EML data set.</configure></property>
+<property name="prop:fileExtensionFilter" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A file extension used to limit the array of file names returned by the actor when the selected output type is &quot;As UnCompressed File Name&quot;. This parameter is ignored for other output types.</configure></property>
+<property name="prop:dataFilePath" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The path to a local data file described by EML (must be used in conjunction with a local EML file). The actor will retrieve the data and automatically configure its ports to output it.</configure></property>
+</property>    <property name="_location" class="ptolemy.kernel.util.Location" value="[-25.0, 30.0]">
+    </property>
+    <port name="CacheLocalFileName" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+    </port>
+    <port name="CacheResourceName" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+    </port>
+</entity>
+<entity name="BaseFlow" class="org.ecoinformatics.seek.R.RExpression">
+    <display name="Assess base flow"/>
+    <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="# The Base flow analysis RExpression actor R code&#10;baseFlowAnalysis &lt;- function(flowThisYear, stations, ifrBase,&#10;  USING_KEPLER=FALSE) {&#10;&#10;  KEEPING_RECORDS &lt;- FALSE&#10;&#10;  # river flow data&#10;  df &lt;- flowThisYear&#10;&#10;  # read the Base flow IFR table and exclude rivers lacking IFR data&#10;  if (USING_KEPLER) {&#10;    # read base ifr from file&#10;    ifrBase &lt;- read.table(ifrBase, sep=&quot;,&quot;, header=TRUE, row.names=1)&#10;  } else {&#10;    baseURL &lt;- &quot;http://knb.ecoinformatics.org/knb/metacat?action=read&amp;docid=&quot;&#10;    ifrBase &lt;- read.csv(paste(baseURL, &quot;nceasadmin.909&quot;, sep=&quot;&quot;),&#10;      row.names=1, na.strings=&quot;&quot;, stringsAsFactors=FALSE)&#10;  }&#10;  stations &lt;- stations[stations$River %in% row.names(ifrBase), ]&#10;&#10;  # Because we have data from many more stations than we have IFRs for,&#10;  # here we restrict the data set to relevant sites (i.e., data sites&#10;  # that are elements of the set of IFR sites).&#10;  df &lt;- subset(df, site %in% stations$Station.code)&#10;  # merge in river names&#10;  df &lt;- merge(df, stations[c(&quot;Station.code&quot;, &quot;River&quot;)], by.x=&quot;site&quot;,&#10;    by.y=&quot;Station.code&quot;, all.x=TRUE, sort=FALSE)&#10;  names(df) &lt;- tolower(names(df))&#10;  # clean up factor levels&#10;  df$site &lt;- factor(df$site)&#10;&#10;  # Average across multiple flow readings on a river*day&#10;  aggdf &lt;- aggregate(df[&quot;flow&quot;], df[c(&quot;date&quot;, &quot;river&quot;)], mean)&#10;  # add an explicit month column&#10;  aggdf$month &lt;- months(aggdf$date, abb=TRUE)&#10;  # look up base ifr for each river/month combo&#10;  aggdf$ifr &lt;- ifrBase[cbind(match(aggdf$river, rownames(ifrBase)),&#10;    match(aggdf$month, colnames(ifrBase)))]&#10;&#10;  # Detecting TPC exceedances requires comparing the observed flow to&#10;  # the base flow requirements (ifrBase). We store the difference&#10;  # between these two, then count up the negative and positive vals&#10;&#10;  # subset days with observed flow less than base flow&#10;  negdf &lt;- subset(within(aggdf, diff &lt;- flow-ifr), diff&lt;=0,&#10;    select=c(month, river, diff))&#10;&#10;  # report number and mean of negative flow days, by month*river&#10;  # [regetz] I'm not restricting signif digits like Kevin did&#10;  idf &lt;- aggregate(list(days=negdf$diff), negdf[c(&quot;month&quot;, &quot;river&quot;)],&#10;    length)&#10;  idf$avg &lt;- aggregate(negdf$diff, negdf[c(&quot;month&quot;, &quot;river&quot;)], mean)$x&#10;  idf$month &lt;- factor(as.character(idf$month), levels = month.abb)&#10;  # sort by river, then month&#10;  idf &lt;- idf[order(idf$river, idf$month),]&#10;&#10;  # construct the TPC exceedance data frame, which will have the month,&#10;  # river, number of days below IFR, and mean flow below IFR, ordered by&#10;  # month (chronologically) and river&#10;  baseTPC &lt;- subset(idf, river %in% unique(aggdf$river) &amp; days!=0)&#10;  baseTPC &lt;- idf[idf$days &gt; 0, ]&#10;  baseTPC$baseIFR &lt;- ifrBase[cbind(match(baseTPC$river,&#10;    rownames(ifrBase)), match(baseTPC$month, colnames(ifrBase)))]&#10;  baseTPC$percentIFR &lt;- round(100*(baseTPC$avg/baseTPC$baseIFR),&#10;    digits=2)&#10;&#10;  # functions to set custom 'caption' and 'title' attributes&#10;  'caption&lt;-' &lt;- function(x, value) {&#10;    attr(x, &quot;caption&quot;) &lt;- value&#10;    return(x)&#10;  }&#10;  'title&lt;-' &lt;- function(x, value) {&#10;    attr(x, &quot;title&quot;) &lt;- value&#10;    return(x)&#10;  }&#10;  caption(ifrBase) &lt;- paste(&quot;Base inflow requirements (IFR) by river and&quot;,&#10;    &quot;month, in m^3/s. Any day for which observed flow does not at&quot;,&#10;    &quot;least meet the base IFR is a TPC exceedance.&quot;, sep=&quot; &quot;)&#10;  title(baseTPC) &lt;- &quot;Base Flow TPC summary&quot;&#10;  caption(baseTPC) &lt;- paste(&quot;Rivers, months, and number of days that&quot;,&#10;    &quot;observed flow fell below the base IFR, during the date range of&quot;,&#10;    &quot;this analysis. The &lt;b&gt;avg&lt;/b&gt; column shows the mean shortfall of&quot;,&#10;    &quot;flow across these days. &lt;b&gt;baseIFR&lt;/b&gt; is the instream flow&quot;,&#10;    &quot;requirement for this river and month, and &lt;b&gt;percentIFR&lt;/b&gt; shows&quot;,&#10;    &quot;the percent of the IFR represented by the mean shortfall.&quot;, sep=&quot; &quot;)&#10;&#10; if (KEEPING_RECORDS) {&#10;  filedf &lt;- filetable_in&#10;  inputdf &lt;- inputdf_in&#10;  # function for registering data files used&#10;  addToRegistry &lt;- function(registry, obj, name, type = c(&quot;table&quot;,&#10;    &quot;figure&quot;), write=FALSE, ...) {&#10;    type &lt;- match.arg(type)&#10;    fname &lt;- paste(format(Sys.Date(), &quot;%Y%b%d&quot;), name, &quot;.csv&quot;, sep=&quot;&quot;)&#10;    description &lt;- paste(name, type)&#10;    if (write) {&#10;      if (!is.matrix(obj) &amp; !is.data.frame(obj)) {&#10;        stop(&quot;can only write tabular data to CSV&quot;)&#10;      }&#10;      write.csv(obj, fname, ...)&#10;    }&#10;    rbind(registry, data.frame(description, fname))&#10;  }&#10;  filedf &lt;- rbind(filedf, data.frame(description=&quot;BaseFlowTPC Graphs&quot;,&#10;    fname=fname))&#10;  # write tables to CSV files and add file # names to our list&#10;  filedf &lt;- addToRegistry(filedf, baseTPC, &quot;BaseExceedances&quot;, write=TRUE)&#10;  filedf &lt;- addToRegistry(filedf, ifrBase, &quot;BaseIFR&quot;, write=TRUE)&#10;  return(list(flowData=df, aggFlowData=aggdf, inputdf_out=inputdf,&#10;    filetable_out=filedf))&#10; }&#10;&#10;  return(list(aggFlowData=aggdf, baseTPC=baseTPC))&#10;&#10;}&#10;&#10;ans &lt;- baseFlowAnalysis(flowThisYear, stations, ifrBase, USING_KEPLER=TRUE)&#10;invisible(lapply(names(ans), function(nm) assign(nm, ans[[nm]], envir=.GlobalEnv)))&#10;">
+        <display name="R function or script"/>
+        <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="30">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="60">
+            </property>
+        </property>
+    </property>
+    <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+        <display name="R working directory"/>
+    </property>
+    <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+        <display name="Save or not"/>
+    </property>
+    <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+        <display name="Graphics Format"/>
+    </property>
+    <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Graphics Output"/>
+    </property>
+    <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Automatically display graphics"/>
+    </property>
+    <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="800">
+        <display name="Number of X pixels in image"/>
+    </property>
+    <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="600">
+        <display name="Number of Y pixels in image"/>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:605:3">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[25.0, -75.0]">
+    </property>
+    <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+    </property>
+    <port name="graphicsFileName" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+        <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+        </property>
+        <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+        </property>
+    </port>
+    <port name="output" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+        <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+        </property>
+    </port>
+    <port name="ifrBase" class="ptolemy.actor.TypedIOPort">
+        <property name="input"/>
+        <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+        </property>
+        <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+        </property>
+    </port>
+    <port name="baseTPC" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+    </port>
+    <port name="flowThisYear" class="ptolemy.actor.TypedIOPort">
+        <property name="input"/>
+        <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="WEST">
+        </property>
+    </port>
+    <port name="stations" class="ptolemy.actor.TypedIOPort">
+        <property name="input"/>
+    </port>
+    <port name="aggFlowData" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+    </port>
+</entity>
+<entity name="Get water flow data" class="ptolemy.actor.TypedCompositeActor">
+    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.0.beta">
+    </property>
+    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:20:12">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+    </property>
+    <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>    <property name="_location" class="ptolemy.kernel.util.Location" value="[-145.0, -95.0]">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1">
+    </property>
+    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={2261, 250, 905, 637}, maximized=false}">
+    </property>
+    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 478]">
+    </property>
+    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+    </property>
+    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{-24.0, -31.2151816273463}">
+    </property>
+    <port name="port" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{175.0, -50.0}">
+        </property>
+    </port>
+    <port name="port2" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{210.0, -20.0}">
+        </property>
+    </port>
+    <entity name="Get year" class="ptolemy.actor.TypedCompositeActor">
+        <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.0.beta">
+        </property>
+        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:16:11">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="{-105.0, 50.0}">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1">
+        </property>
+        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={695, 219, 905, 637}, maximized=false}">
+        </property>
+        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 478]">
+        </property>
+        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+        </property>
+        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{-141.5648854961832, 309.0}">
+        </property>
+        <port name="port" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{25.0, 285.0}">
+            </property>
+        </port>
+        <entity name="Current year" class="org.ecoinformatics.seek.R.RExpression">
+            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="if(exists(&quot;yearParam&quot;) &amp;&amp; is.numeric(yearParam)) {&#10;  year &lt;- yearParam&#10;} else {&#10;  year &lt;- substr(currentTime, 1, 4)&#10;}">
+                <display name="R function or script"/>
+                <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                </property>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
+                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
+                </property>
+                <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
+                </property>
+                <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+                </property>
+            </property>
+            <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+                <display name="R working directory"/>
+            </property>
+            <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+                <display name="Save or not"/>
+            </property>
+            <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+                <display name="Graphics Format"/>
+            </property>
+            <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="true">
+                <display name="Graphics Output"/>
+            </property>
+            <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Automatically display graphics"/>
+            </property>
+            <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of X pixels in image"/>
+            </property>
+            <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of Y pixels in image"/>
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:15:8">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-135.0, 285.0}">
+            </property>
+            <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <port name="graphicsFileName" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+                </property>
+            </port>
+            <port name="output" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="false">
+                </property>
+            </port>
+            <port name="currentTime" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="year" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="yearParam" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+        </entity>
+        <entity name="Time Stamp" class="org.sdm.spa.Timestamp">
+            <property name="format" class="ptolemy.data.expr.StringParameter" value="yyyy-MM-dd z HH:mm:ss">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Ilkay Altintas</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The TimeStamp actor outputs the current date and time.&lt;/p&gt;&#10;&#10;&lt;p&gt;Dates and times can be formatted in a variety of ways. Select a format from the drop-down menu beside the format parameter, or enter a pattern directly into the format field. For more information about date format patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the current time stamp as a string.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:format" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The date format. Select a format string from the drop-down menu or type in a custom format string directly into the field. For more information about date formatting patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:370:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.sdm.spa.Timestamp">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1136:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ClockActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#LocalInput">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-280.0, 300.0}">
+            </property>
+            <property name="" class="ptolemy.vergil.basic.DocAttribute">
+                <property name="description" class="ptolemy.data.expr.StringParameter" value="&lt;p&gt;The TimeStamp actor outputs the current date and time.&lt;/p&gt;&#10;&#10;&lt;p&gt;Dates and times can be formatted in a variety of ways. Select a format from the drop-down menu beside the format parameter, or enter a pattern directly into the format field. For more information about date format patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html.&lt;/p&gt;">
+                </property>
+                <property name="author" class="ptolemy.kernel.util.StringAttribute" value="Ilkay Altintas">
+                </property>
+                <property name="version" class="ptolemy.kernel.util.StringAttribute" value="null">
+                </property>
+                <property name="format (parameter)" class="ptolemy.data.expr.StringParameter" value="The date format. Select a format string from the drop-down menu or type in a custom format string directly into the field. For more information about date formatting patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html">
+                </property>
+                <property name="output (port)" class="ptolemy.kernel.util.StringAttribute" value="An output port that broadcasts the current time stamp as a string.">
+                </property>
+                <property name="trigger (port)" class="ptolemy.kernel.util.StringAttribute" value="A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.">
+                </property>
+            </property>
+        </entity>
+        <entity name="Constant" class="ptolemy.actor.lib.Const">
+            <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
+            </property>
+            <property name="NONE" class="ptolemy.data.expr.Parameter" value="0">
+            </property>
+            <property name="value" class="ptolemy.data.expr.Parameter" value="year">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Constant actor outputs a constant, which is specified by the value parameter. By default, the actor outputs the integer 1.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor can be used to output other types of values, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The actor'&#10;s output type matches the type of the specified value.&lt;/p&gt;&#10;&#10;&lt;p&gt;NOTE: If using a PN Director, the 'firingCountLimit' parameter is often set to a finite integer (e.g. '1') so that the workflow will terminate. &lt;/p&gt;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the specified constant. By default, the output is 1.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The limit on the number of times the actor will fire. The default value is 'NONE', meaning there is no limit on the number of time the constant will be provided to the output port. Any integer can be provided as a value for this parameter.</configure></property>
+<property name="prop:value" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the Constant actor. By default, the value is the integer token 1. The value can be set to another type, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The  output type matches the type of the value specified here.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:1:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
+            </property>
+            <property name="kar" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:kar:57:1">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
+                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
+                </property>
+                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
+                </property>
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-220.0, 400.0}">
+            </property>
+            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <port name="trigger" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="multiport"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+                </property>
+            </port>
+        </entity>
+        <relation name="relation" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <link port="port" relation="relation2"/>
+        <link port="Current year.currentTime" relation="relation"/>
+        <link port="Current year.year" relation="relation2"/>
+        <link port="Current year.yearParam" relation="relation3"/>
+        <link port="Time Stamp.output" relation="relation"/>
+        <link port="Constant.output" relation="relation3"/>
+    </entity>
+    <entity name="River name lookup table" class="org.ecoinformatics.seek.datasource.eml.eml2.Eml200DataSource">
+        <display name="River name&#10;lookup table"/>
+        <property name="emlFilePath" class="ptolemy.data.expr.FileParameter" value="">
+            <display name="EML File"/>
+        </property>
+        <property name="dataFilePath" class="ptolemy.data.expr.FileParameter" value="">
+            <display name="Data File"/>
+        </property>
+        <property name="schemaDef" class="ptolemy.kernel.util.StringAttribute" value="&lt;schema&gt;&#10;  &lt;table name=&quot;Flowstations.txt&quot;&gt;&#10;    &lt;field name=&quot;Station_code&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Station_name&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;River&quot; dataType=&quot;STRING&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2000_2004.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Volumetric_rate&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow90_1999.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow_amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow80_1989.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow50_1959.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow70_1979.txt&quot;&gt;&#10;    &lt;field name=&quot;gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow_amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow1940_1949.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow1960_1969.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2008.txt&quot;&gt;&#10;    &lt;field name=&quot;STATION&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;DATUM&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;READING&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2005-2007.txt&quot;&gt;&#10;    &lt;field name=&quot;STATION&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;DATUM&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;READING&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;&lt;/schema&gt;&#10;">
+            <display name="Schema Definition"/>
+            <property name="schemaDef" class="ptolemy.actor.gui.style.TextStyle">
+                <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                </property>
+                <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                </property>
+            </property>
+        </property>
+        <property name="sqlDef" class="ptolemy.kernel.util.StringAttribute">
+            <display name="SQL Command"/>
+            <property name="sqlDef" class="ptolemy.actor.gui.style.TextStyle">
+                <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                </property>
+                <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                </property>
+            </property>
+        </property>
+        <property name="selectedEntity" class="ptolemy.data.expr.StringParameter" value="Flowstations.txt">
+            <display name="Selected Entity"/>
+        </property>
+        <property name="dataOutputFormat" class="ptolemy.data.expr.StringParameter" value="As Cache File Name">
+            <display name="Data Output Format"/>
+        </property>
+        <property name="fileExtensionFilter" class="ptolemy.data.expr.StringParameter" value="">
+            <display name="File Extension Filter"/>
+        </property>
+        <property name="isLenient" class="ptolemy.data.expr.Parameter" value="false">
+            <display name="Allow lenient data parsing"/>
+        </property>
+        <property name="checkVersion" class="ptolemy.data.expr.Parameter" value="false">
+            <display name="Check for latest version"/>
+        </property>
+        <property name="_tableauFactory" class="org.kepler.objectmanager.data.db.QBTableauFactory">
+            <property name="sqlName" class="ptolemy.kernel.util.StringAttribute" value="sqlDef">
+            </property>
+            <property name="schemaName" class="ptolemy.kernel.util.StringAttribute" value="schemaDef">
+            </property>
+        </property>
+        <property name="recordid" class="ptolemy.kernel.util.StringAttribute" value="judithk.895.2">
+        </property>
+        <property name="endpoint" class="ptolemy.kernel.util.StringAttribute" value="http://ecogrid.ecoinformatics.org/knb/services/QueryService">
+        </property>
+        <property name="namespace" class="ptolemy.kernel.util.StringAttribute" value="eml://ecoinformatics.org/eml-2.0.1">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>matt jones, jing tao, chad</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The EML2Dataset actor provides access to a wide variety of data packages that have been described using EML (Ecological Metadata Language). The actor accesses an EML dataset and handles the mechanical issues involved in parsing metadata, downloading the dataset (if applicable), and emitting data to downstream actors.&lt;/p&gt;&#10;&#10;&lt;p&gt;Each data package contains an EML metadata description and one or more data entities (e.g., data tables, spatial raster images, spatial vector images). The EML metadata allows the described data to be easily ingested into Kepler and exposed for use in downstream components. The data packages can be accessed from the local file system or through any EcoGrid server that provides access to its collection of data objects. The supported data transfer protocols include http, ftp, file, ecogrid, and srb. &lt;/p&gt;&#10;&#10;&lt;p&gt;After parsing the EML metadata, the actor automatically reconfigures its exposed ports to provide one port for each attribute described by the first entity of the EML description. For example, if the first entity is a data table with four columns, the ports might be &quot;Site&quot;, &quot;Date&quot;, &quot;Plot&quot;, and &quot;Rainfall.&quot; These details are obtained from the EML document. To preview the data, right-click the actor icon and select Preview from the drop-down menu.&lt;/p&gt;&#10;&#10;&lt;p&gt;By default, the ports created by the EML2Dataset actor represent data fields, and one tuple of data (e.g., one database row) is emitted on these ports each time the actor fires. Alternatively, the actor can be configured so that the ports represent an array of field values (&quot;AsColumnVector&quot;), or so that the ports represent an entire table of data (&quot;AsTable&quot;). Data tables are formatted in comma-separated-value (CSV) format.&lt;/p&gt;&#10;&#10;&lt;p&gt;If more than one data entity is described in the EML metadata, then the output of the actor defaults to the first entity listed in the EML. To select the other entities, specify an entity with the Selected parameter, or use the Query Builder to describe the filter and join that should be used to produce the data output. To use the Query Builder, right-click the actor and select &quot;Open Actor.&quot; Specify the fields to be output and any filtering constraints to be applied.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Output ports are automatically configured to provide one port for each attribute in the first entity described in the EML description. For example, if the first entity is a data table with four columns, the ports might be &quot;Site&quot;, &quot;Date&quot;, &quot;Plot&quot;, and &quot;Rainfall.&quot; These details are obtained from the EML document.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:isLenient" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If this parameter is selected, &quot;extra&quot; columns of data (e.g., comments that people have entered on a line or something of that nature) that are not described in the metadata are ignored, allowing the workflow to execute. If the option is unchecked (the default), the workflow execution will halt until the discrepancy between the data and metadata is corrected.</configure></property>
+<property name="prop:checkVersion" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select this parameter to check the EarthGrid for updates to the data. If the actor finds a version of the data that is more recent than the cached data on your local system, the actor will prompt the user to either download the latest data and metadata or ignore the newer version. Note that different versions of the data can have vastly different structures (new columns, or even new tables of data might be included or removed). If this parameter is selected, users should be prepared to handle changes that might arise from differences in the data structure.</configure></property>
+<property name="prop:selectedEntity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If this EML data package has multiple entities, the selectedEntity parameter specifies which entity should be output. When this parameter is unset (the default), data from the first entity described in an EML package is output. This parameter is only used if no query statement is specified, or if a query statement is used and the output format is one of &quot;As Table&quot;, &quot;As Byte Array&quot;, &quot;As Uncompressed File Name&quot;, and &quot;As Cache File Name&quot;. To specify a query statement, right-click the actor and select Open Actor.</configure></property>
+<property name="prop:dataOutputFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify which ports are created for the actor and what data is emitted on those ports during each fire cycle. For example, this field can be configured to produce one port for each column in a data table, or one port that emits the entire data table at once in CSV format. Specifically, the output format choices are:&#10;&lt;table&gt;&#10;&lt;tr&gt;&lt;td&gt;As Field (the default)&lt;/td&gt;&lt;td&gt; The actor creates one output port for each field (i.e., column/attribute/variable) that is described in the EML metadata for the data package. The type of each port (e.g., string, int, double, etc.) matches the base type of the field. If a query statement has been used to subset the data, then only those fields selected in the query statement will be configured as ports. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Table&lt;/td&gt;&lt;td&gt; The selected data will be output as a string that contains the entire entity data. The actor creates three output ports: DataTable - the data itself, Delimiter - delimiter to separate fields, and NumColumns - the number of fields in the table. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Row&lt;/td&gt;&lt;td&gt;  One tuple of selected data is formatted as an array and output. The actor creates one output port (DataRow), and the data type is a record containing each of the individual data fields. &lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As Byte Array&lt;/td&gt;&lt;td&gt; Selected data will be output as an array of bytes. The actor creates two output ports: BinaryData - contains the raw data itself, and EndOfStream - indicates whether the end of data stream has been reached.&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As UnCompressed File Name&lt;/td&gt;&lt;td&gt; This format is only used when the data package is a compressed file (zip, tar, et al). The compressed archive file is uncompressed after it is downloaded. The actor creates one output port, which contains an array of the filenames of all of the uncompressed archive files. If a FileExtensionFilter is specified, then the array will only contain files that match the specified extension.&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As Cache File Name&lt;/td&gt;&lt;td&gt;   Kepler stores data files downloaded from remote sites into its cache system. This output format will send the local cache file path for the data package so that workflow designers can directly access the cache files. The actor creates two output ports: CacheLocalFileName (the local file path) and CacheResourceName (the EML data link. e.g., ecogrid://knb/tao.2.1).&lt;/td&gt;&lt;/tr&gt; &#10;&#10;&lt;tr&gt;&lt;td&gt;As Column Vector&lt;/td&gt;&lt;td&gt; This output format is similar to &quot;As Field&quot;, except instead of sending out a single value on each port, the actor sends out an array of all of the data for each field. The type of each port is an array of the base type for the field.&lt;/td&gt;&lt;/tr&gt;&#10;&#10;&lt;tr&gt;&lt;td&gt;As ColumnBased Record&lt;/td&gt;&lt;td&gt;  This output format sends all data on one port using a record structure that encapsulates the entire data entity. The record will contain one array for each data field, and the type of each array will be determined by the type of the field it represents.&lt;/td&gt;&lt;/tr&gt;&#10;&lt;/table&gt;&#10;&#10;</configure></property>
+<property name="prop:emlFilePath" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The file path of a local EML metadata file used to describe and access an EML data set.</configure></property>
+<property name="prop:fileExtensionFilter" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A file extension used to limit the array of file names returned by the actor when the selected output type is &quot;As UnCompressed File Name&quot;. This parameter is ignored for other output types.</configure></property>
+<property name="prop:dataFilePath" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The path to a local data file described by EML (must be used in conjunction with a local EML file). The actor will retrieve the data and automatically configure its ports to output it.</configure></property>
+</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="{-195.0, 25.0}">
+        </property>
+        <port name="CacheLocalFileName" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="CacheResourceName" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+    </entity>
+    <entity name="PrepareData" class="org.ecoinformatics.seek.R.RExpression">
+        <display name="Prepare Data"/>
+        <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="# The PrepareData RExpression Actor R code&#10;prepareData &lt;- function(allFlowData, year, rivers, USING_KEPLER=FALSE) {&#10;&#10;  KEEPING_RECORDS &lt;- FALSE&#10;&#10;  # river flow data&#10;  df &lt;- allFlowData&#10;&#10;  # Here, we reduce the data by excluding non-flows - we should be able&#10;  # to find these by opening the &quot;Get input files&quot; composite actor,&#10;  # right-clicking on a datasource actor, choosing &quot;Get metadata&quot;, and&#10;  # looking for the &quot;Missing Value Code&quot;. For this data, however, we&#10;  # must discover missing value codes by inspection.  They include&#10;  # variations on -99 and 9999.9...&#10;&#10;  # [regetz] it seems like only 9999.99 is supposed to indicated NA?&#10;  # replace NA codes with NA and exclude records w/NA flow&#10;  df$flow[ df$flow&lt;0 | abs(df$flow)==9999.99 ] &lt;- NA&#10;  df &lt;- df[ !is.na(df$flow), ]&#10;&#10;  # Next, read supplementary data from a lookup table included with the&#10;  # data package that will allow us to match flow monitoring stations&#10;  # with river names and add those names to a column of our dataframe.&#10;  if (USING_KEPLER) {&#10;    stations &lt;- read.table(rivers, sep=&quot;\t&quot;, header=T,&#10;      na.strings=&quot;&quot;, stringsAsFactors=FALSE)&#10;  } else {&#10;    baseURL &lt;- &quot;http://knb.ecoinformatics.org/knb/metacat?action=read&amp;docid=&quot;&#10;    stations &lt;- read.delim(paste(baseURL, &quot;judithk.894&quot;, sep=&quot;&quot;),&#10;      na.strings=&quot;&quot;, stringsAsFactors=FALSE)&#10;  }&#10;&#10;  # exclude row with blank station code&#10;  stations &lt;- stations[!is.na(stations$Station.code), ]&#10;&#10;  # Some stations in the stations table have no IFR. No IFR = no TPC.&#10;  # For now, remove these records (at least until IFR available)&#10;  b9 &lt;- c(&quot;B9H001-A01&quot;, &quot;B9H002-A01&quot;, &quot;B9H003-A01&quot;, &quot;B9H004-A01&quot;,&#10;    &quot;X4H004-A01&quot;)&#10;  stations &lt;- stations[!(stations$Station.code %in% b9), ]&#10;&#10;  # in the included stations table, only the 1st station on a river is&#10;  # given a name - stations below this, but on the same river have&#10;  # blanks in the river name column.  We must therefore use the river&#10;  # name of the first station to fill in empty river names for the&#10;  # stations below them&#10;  stations$River &lt;- na.omit(stations$River)[cumsum(!is.na(stations$River))]&#10;&#10;  # Clean dates. Date format can be either yy.mm.dd or yyyy.mm.dd&#10;  # ...but first fix a faulty date entry&#10;  df$date[df$date==&quot;96.02 19&quot;] &lt;- &quot;96.02.19&quot;&#10;  # If year is only two digits, first append the century (i.e. 19 or 20)&#10;  # under assumption that any two digit years &gt;40 are in the 1900s&#10;  dates &lt;- levels(df$date)&#10;  clean.date.levels &lt;- ifelse(substr(dates, 3, 3) == &quot;.&quot;,&#10;    paste(ifelse(as.numeric(substr(dates, 1, 2))&gt;40, 19, 20), dates,&#10;    sep=&quot;&quot;), dates)&#10;  levels(df$date) &lt;- clean.date.levels&#10;  #Converting to Date type would be nice, but can be slow on big vectors&#10;  #df$date &lt;- as.Date(df$date, format=&quot;%Y.%m.%d&quot;)&#10;&#10;  # Subset data for the desired year&#10;  df &lt;- df[substr(df$date, 1, 4)==year,]&#10;&#10;  if (nrow(df)==0) {&#10;    return(list(dataNotFound=TRUE))&#10;  }&#10;&#10;  levels(df$date) &lt;- gsub(&quot;\\.&quot;, &quot;-&quot;, levels(df$date))&#10;  df$date &lt;- as.Date(df$date)&#10;&#10;  # clean up factor levels&#10;  df$site &lt;- factor(df$site)&#10;&#10;  # setter and getter functions for custom 'caption' attribute&#10;  'caption&lt;-' &lt;- function(x, value) {&#10;    attr(x, &quot;caption&quot;) &lt;- value&#10;    return(x)&#10;  }&#10;  caption &lt;- function(x) {&#10;    attr(x, &quot;caption&quot;)&#10;  }&#10;  caption(stations) &lt;- paste(&quot;River monitoring station codes, location&quot;,&#10;    &quot;names, and river names used in this analysis.&quot;, sep=&quot; &quot;)&#10;&#10; if (KEEPING_RECORDS) {&#10;  # function for registering data files used&#10;  addToRegistry &lt;- function(registry, obj, name, type = c(&quot;table&quot;,&#10;    &quot;figure&quot;), write=FALSE, ...) {&#10;    type &lt;- match.arg(type)&#10;    fname &lt;- paste(format(Sys.Date(), &quot;%Y%b%d&quot;), name, &quot;.csv&quot;, sep=&quot;&quot;)&#10;    description &lt;- paste(name, type)&#10;    if (write) {&#10;      if (!is.matrix(obj) &amp; !is.data.frame(obj)) {&#10;        stop(&quot;can only write tabular data to CSV&quot;)&#10;      }&#10;      write.csv(obj, fname, ...)&#10;    }&#10;    rbind(registry, data.frame(description, fname))&#10;  }&#10;  # the list of files imported into the workflow as input thus far&#10;  inputdf &lt;- inputdf_in&#10;  inputdf &lt;- rbind(inputdf, data.frame(package=&quot;judithk.895.2&quot;,&#10;    fname=&quot;Flowstations.txt&quot;))&#10;  inputdf &lt;- rbind(inputdf, data.frame(package=&quot;knb.218.2&quot;,&#10;    fname=&quot;ifrLowTable.txt&quot;))&#10;  # create filedf registry of outputs written to file &#10;  # Write stations table to a file and add the file name to the list&#10;  # in filetable_out&#10;  filedf &lt;- addToRegistry(NULL, stations, &quot;RiverStations&quot;, write=TRUE)&#10;  caption(filedf) &lt;- paste(&quot;Output files generated&quot;,&#10;    &quot;during execution of this workflow, in the order they were&quot;,&#10;    &quot;generated. By default, these files reside in the user's .kepler&quot;,&#10;    &quot;directory.&quot;, sep=&quot; &quot;)&#10;  return(list(data_out=df, ifrBase=ifrBase, filetable_out=filetable_out,&#10;    inputdf_out=inputdf))&#10; }&#10;&#10;  return(list(flowData=df, stations=stations))&#10;&#10;}&#10;&#10;ans &lt;- prepareData(allFlowData, year, rivers, USING_KEPLER=TRUE) &#10;invisible(lapply(names(ans), function(nm) assign(nm, ans[[nm]], envir=.GlobalEnv)))">
+            <display name="R function or script"/>
+            <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                </property>
+                <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                </property>
+            </property>
+        </property>
+        <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
+            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
+            </property>
+            <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
+            </property>
+            <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+            </property>
+        </property>
+        <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="C:\Documents and Settings\drury\.kepler\">
+            <display name="R working directory"/>
+        </property>
+        <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+            <display name="Save or not"/>
+        </property>
+        <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+            <display name="Graphics Format"/>
+        </property>
+        <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="true">
+            <display name="Graphics Output"/>
+        </property>
+        <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+            <display name="Automatically display graphics"/>
+        </property>
+        <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+            <display name="Number of X pixels in image"/>
+        </property>
+        <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+            <display name="Number of Y pixels in image"/>
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:8:11">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{-35.0, -45.0}">
+        </property>
+        <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+        </property>
+        <port name="graphicsFileName" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+        <port name="output" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="false">
+            </property>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+        <port name="allFlowData" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+            </property>
+        </port>
+        <port name="flowData" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+            </property>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="EAST">
+            </property>
+        </port>
+        <port name="rivers" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="WEST">
+            </property>
+        </port>
+        <port name="year" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+        <port name="stations" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="dataNotFound" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_type" class="ptolemy.actor.TypeAttribute" value="boolean">
+            </property>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+    </entity>
+    <entity name="FlowDataEML" class="ptolemy.actor.TypedCompositeActor">
+        <display name="Get water flow data from KNB"/>
+        <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="7.0.beta">
+        </property>
+        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:7:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="{-225.0, -95.0}">
+        </property>
+        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={544, 96, 1056, 911}, maximized=false}">
+        </property>
+        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[751, 752]">
+        </property>
+        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+        </property>
+        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{-49.5, -408.28125}">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:28:5">
+        </property>
+        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
+            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <property name="_hideAllParameters" class="ptolemy.data.expr.Parameter" value="true">
+            </property>
+            <property name="textSize" class="ptolemy.data.expr.Parameter" value="14">
+            </property>
+            <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
+            </property>
+            <property name="fontFamily" class="ptolemy.data.expr.StringParameter" value="SansSerif">
+            </property>
+            <property name="bold" class="ptolemy.data.expr.Parameter" value="false">
+            </property>
+            <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
+            </property>
+            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Here, water flow data is downloaded from the repository, combined&#10;into an R dataframe, and passed to the next stage of the analysis. ">
+                <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="20">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="80">
+                    </property>
+                </property>
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Use the Annotation attribute to annotate a workflow. Double-click the attribute to customize the content, font size, color, and basic formatting (bold and italics).</configure></property>
+<property name="prop:fontFamily" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font face. Select a font from the drop-down menu. The default is &quot;SansSerif&quot;.</configure></property>
+<property name="prop:italic" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be italics. By default, type will not be italicized.</configure></property>
+<property name="prop:bold" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be bold. By default, type will not be bold.</configure></property>
+<property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
+<property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
+<property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:24:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-270.0, -320.0}">
+            </property>
+            <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1">
+            </property>
+        </property>
+        <port name="allFlowData" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{165.0, -435.0}">
+            </property>
+        </port>
+        <port name="currentTime" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{40.0, 220.0}">
+            </property>
+        </port>
+        <entity name="Kruger National Park river flow data" class="org.ecoinformatics.seek.datasource.eml.eml2.Eml200DataSource">
+            <property name="emlFilePath" class="ptolemy.data.expr.FileParameter" value="">
+                <display name="EML File"/>
+            </property>
+            <property name="dataFilePath" class="ptolemy.data.expr.FileParameter" value="">
+                <display name="Data File"/>
+            </property>
+            <property name="schemaDef" class="ptolemy.kernel.util.StringAttribute" value="&lt;schema&gt;&#10;  &lt;table name=&quot;Flowstations.txt&quot;&gt;&#10;    &lt;field name=&quot;Station_code&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Station_name&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;River&quot; dataType=&quot;STRING&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2000_2004.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Volumetric_rate&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow90_1999.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow_amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow80_1989.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow50_1959.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow70_1979.txt&quot;&gt;&#10;    &lt;field name=&quot;gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow_amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow1940_1949.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Amount&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow1960_1969.txt&quot;&gt;&#10;    &lt;field name=&quot;Gauging_weir&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;Date_of_flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;    &lt;field name=&quot;Flow&quot; dataType=&quot;INTEGER&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2008.txt&quot;&gt;&#10;    &lt;field name=&quot;STATION&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;DATUM&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;READING&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;  &lt;table name=&quot;flow2005-2007.txt&quot;&gt;&#10;    &lt;field name=&quot;STATION&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;DATUM&quot; dataType=&quot;STRING&quot;/&gt;&#10;    &lt;field name=&quot;READING&quot; dataType=&quot;FLOAT&quot;/&gt;&#10;  &lt;/table&gt;&#10;&lt;/schema&gt;&#10;">
+                <display name="Schema Definition"/>
+                <property name="schemaDef" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                </property>
+            </property>
+            <property name="sqlDef" class="ptolemy.kernel.util.StringAttribute">
+                <display name="SQL Command"/>
+                <property name="sqlDef" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                </property>
+            </property>
+            <property name="selectedEntity" class="ptolemy.data.expr.StringParameter" value="Flowstations.txt">
+                <display name="Selected Entity"/>
+            </property>
+            <property name="dataOutputFormat" class="ptolemy.data.expr.StringParameter" value="As All Cache File Names">
+                <display name="Data Output Format"/>
+            </property>
+            <property name="fileExtensionFilter" class="ptolemy.data.expr.StringParameter" value="">
+                <display name="File Extension Filter"/>
+            </property>
+            <property name="isLenient" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Allow lenient data parsing"/>
+            </property>
+            <property name="checkVersion" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Check for latest version"/>
+            </property>
+            <property name="_tableauFactory" class="org.kepler.objectmanager.data.db.QBTableauFactory">
+                <property name="sqlName" class="ptolemy.kernel.util.StringAttribute" value="sqlDef">
+                </property>
+                <property name="schemaName" class="ptolemy.kernel.util.StringAttribute" value="schemaDef">
+                </property>
+            </property>
+            <property name="recordid" class="ptolemy.kernel.util.StringAttribute" value="judithk.895.2">
+            </property>
+            <property name="endpoint" class="ptolemy.kernel.util.StringAttribute" value="http://ecogrid.ecoinformatics.org/knb/services/QueryService">
+            </property>
+            <property name="namespace" class="ptolemy.kernel.util.StringAttribute" value="eml://ecoinformatics.org/eml-2.0.1">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-245.0, -430.0}">
+            </property>
+            <port name="CacheLocalFileNames" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="CacheResourceNames" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="Delimiters" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="HeaderLines" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="FieldNames" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+        </entity>
+        <entity name="Data Combiner" class="org.ecoinformatics.seek.R.RExpression">
+            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="# The FileCombiner RExpression actor R code&#10;fileCombiner &lt;- function(datalist, USING_KEPLER=FALSE) {&#10;&#10;  # Workflow assumes that all river data tables have three columns,&#10;  # representing (*in order*): site, date, flow. It does *not* match columns&#10;  # using attribute names, because these have historically been&#10;  # inconsistent across the river flow data sets&#10;&#10; if (USING_KEPLER) {&#10;&#10;  # exclude the Flowstations lookup table from this list of data frames&#10;  datalist &lt;- datalist[names(datalist) != &quot;Flowstations.txt&quot;]&#10;  datalist &lt;- lapply(datalist, function(dat) {&#10;    names(dat) &lt;- c(&quot;site&quot;, &quot;date&quot;, &quot;flow&quot;)&#10;    return(dat)&#10;  })&#10;&#10; } else {&#10;&#10;  # Note these idiosyncracies in the flow data tables:&#10;  #   - the 7th data table is TAB-separated&#10;  #   - the 8th and 9th data table DO have a header row&#10;&#10;  # Construct metacat URLs for flow data stored on KNB. Also need to&#10;  # specify tab-delimited vs CSV, and presence of headers&#10;  docIDs &lt;- paste(&quot;judithk&quot;, c(625:630, 892, 904:905), sep=&quot;.&quot;)&#10;  separators &lt;- ifelse(docIDs==&quot;judithk.892&quot;, &quot;\t&quot;, &quot;,&quot;)&#10;  headers &lt;- ifelse(docIDs %in% c(&quot;judithk.904&quot;, &quot;judithk.905&quot;), TRUE,&#10;    FALSE)&#10;  baseURL &lt;- &quot;http://knb.ecoinformatics.org/knb/metacat?action=read&amp;docid=&quot;&#10;  dataURLs &lt;- paste(baseURL, docIDs, sep=&quot;&quot;)&#10;&#10;  datalist &lt;- mapply(function(url, sep, hdr) {&#10;      dat &lt;- read.table(url, sep=sep, header=hdr)&#10;      names(dat) &lt;- c(&quot;site&quot;, &quot;date&quot;, &quot;flow&quot;)&#10;      return(dat)&#10;    }, url=dataURLs, sep=separators, hdr=headers, SIMPLIFY=FALSE,&#10;      USE.NAMES=FALSE)&#10; }&#10;&#10;  # Load data&#10;  df &lt;- do.call(&quot;rbind&quot;, datalist)&#10;&#10;  # One part of me wants all such transfers to occur together at the end&#10;  # of the script.  The other part of me wants the transfer to occur in&#10;  # close proximity to where the transferred table was generated so that&#10;  # reference to a data frame doesn't occur 100 lines later and seem to&#10;  # &quot;appear out of the blue&quot;.  Here, it seemed best to create &quot;df&quot;, and&#10;  # pass it on immediately.&#10;&#10;  # some functions, which are used below,  These are a bit overkill for&#10;  # this script, but are included for consistency with how the same&#10;  # issues are handled in later steps&#10;&#10;  # [regetz] This is a much simpler way to get what Kevin's original&#10;  # 'mydate' function produces, without requiring the chron package&#10;  mydate &lt;- function() format(Sys.Date(), &quot;%Y%b%d&quot;)&#10;&#10;  ######################################################################&#10;  #writefile &lt;- function(data, filename, s=&quot;, &quot;) {&#10;  #  myd &lt;- mydate()  # returns a date to prepend to file name&#10;  #  fname &lt;- paste(myd, filename, &quot;.csv&quot;, sep=&quot;&quot;)&#10;  #  write.table(data, fname, sep=s)&#10;  #  df &lt;- data.frame(description=paste(filename, &quot;Table&quot;, sep=&quot; &quot;), fname=fname)&#10;  #&#10;  #  # return a data frame &quot;row&quot; that can be added to the growing list&#10;  #  # of files written during analysis&#10;  #  return(df)&#10;  #}&#10;  ######################################################################&#10;  # seems good to have a record of the data used (besides what is&#10;  # visible on the canvas), for one thing, this can be kept with the&#10;  # results report, which includes all figures and tables generated&#10;  # during the analysis It would definitely be best if this data were&#10;  # available programmatically.  And, maybe it is - the package name is&#10;  # the &quot;recordid&quot; and the file name is the &quot;selected entity&quot;, of the&#10;  # eml data source.  But how to access these???  All I &quot;see&quot; from here&#10;  # is the input port, and it only carries cache file name.  So, the&#10;  # package and file name must be entered manually after inspecting the&#10;  # recordid and Selected Entity via &quot;Configue Actor&quot;.  Other files will&#10;  # be added to this list downstream, again, by hand so, building by&#10;  # hand...&#10;  ######################################################################&#10;&#10;  return(list(allFlowData=df))&#10;&#10;}&#10;&#10;ans &lt;- fileCombiner(datalist, USING_KEPLER=TRUE)&#10;invisible(lapply(names(ans), function(nm) assign(nm, ans[[nm]], envir=.GlobalEnv)))&#10;">
+                <display name="R function or script"/>
+                <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="60">
+                    </property>
+                </property>
+            </property>
+            <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+                <display name="R working directory"/>
+            </property>
+            <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+                <display name="Save or not"/>
+            </property>
+            <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="pdf">
+                <display name="Graphics Format"/>
+            </property>
+            <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Graphics Output"/>
+            </property>
+            <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Automatically display graphics"/>
+            </property>
+            <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of X pixels in image"/>
+            </property>
+            <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of Y pixels in image"/>
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:21:4">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{40.0, -400.0}">
+            </property>
+            <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <port name="datalist" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+                </property>
+            </port>
+            <port name="allFlowData" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+                </property>
+                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="NORTH">
+                </property>
+            </port>
+        </entity>
+        <entity name="Get all EML tables" class="org.ecoinformatics.seek.R.RExpression">
+            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="#&#10;# Convert all tables in a EML DP to a list of data frames &#10;#&#10;&#10;# convert EML tab indicator to &quot;\t&quot;&#10;delimiters &lt;- sub(&quot;#x09&quot;, &quot;\t&quot;, delimiters)&#10;&#10;# note that any header lines in the original data tables are dropped, and&#10;# the data frame headers are instead constructed from the corresponding&#10;# Attribute Names pulled from the EML document &#10;&#10;# create empty list to store data frames&#10;datalist &lt;- list()&#10;&#10;# loop through the files&#10;for (i in seq_along(files)) {&#10;  datafile &lt;- files[[i]]&#10;  sep &lt;- delimiters[[i]]&#10;  skip &lt;- headers[[i]]&#10;  col.names &lt;- fields[[i]]&#10;  datalist[[i]] &lt;- read.table(datafile, comment.char=&quot;&quot;, header=FALSE,&#10;    skip=skip, sep=sep, col.names=col.names)&#10;}&#10;&#10;names(datalist) &lt;- tables&#10;&#10;">
+                <display name="R function or script"/>
+                <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                </property>
+            </property>
+            <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="C:\Documents and Settings\Dan Higgins\.kepler\">
+                <display name="R working directory"/>
+            </property>
+            <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+                <display name="Save or not"/>
+            </property>
+            <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="true">
+                <display name="Graphics Output"/>
+            </property>
+            <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Automatically display graphics"/>
+            </property>
+            <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of X pixels in image"/>
+            </property>
+            <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of Y pixels in image"/>
+            </property>
+            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:13:20">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+                </property>
+            </property>
+            <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+            </property>
+            <property name="semanticType111" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-115.0, -445.0}">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&#10;&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;&#10;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>            <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:838:25">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:838:25">
+            </property>
+            <port name="files" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="tables" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="delimiters" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="headers" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="fields" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="datalist" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+        </entity>
+        <relation name="relation" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <relation name="relation7" class="ptolemy.actor.TypedIORelation">
+            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+            </property>
+        </relation>
+        <link port="allFlowData" relation="relation7"/>
+        <link port="Kruger National Park river flow data.CacheLocalFileNames" relation="relation4"/>
+        <link port="Kruger National Park river flow data.CacheResourceNames" relation="relation"/>
+        <link port="Kruger National Park river flow data.Delimiters" relation="relation6"/>
+        <link port="Kruger National Park river flow data.HeaderLines" relation="relation2"/>
+        <link port="Kruger National Park river flow data.FieldNames" relation="relation3"/>
+        <link port="Data Combiner.datalist" relation="relation5"/>
+        <link port="Data Combiner.allFlowData" relation="relation7"/>
+        <link port="Get all EML tables.files" relation="relation4"/>
+        <link port="Get all EML tables.tables" relation="relation"/>
+        <link port="Get all EML tables.delimiters" relation="relation6"/>
+        <link port="Get all EML tables.headers" relation="relation2"/>
+        <link port="Get all EML tables.fields" relation="relation3"/>
+        <link port="Get all EML tables.datalist" relation="relation5"/>
+    </entity>
+    <entity name="CheckData" class="ptolemy.actor.TypedCompositeActor">
+        <display name="Check data availability"/>
+        <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.0.beta">
+        </property>
+        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:12:10">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="{25.0, 75.0}">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1">
+        </property>
+        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={695, 290, 905, 637}, maximized=false}">
+        </property>
+        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 478]">
+        </property>
+        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+        </property>
+        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 239.0}">
+        </property>
+        <port name="port" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{155.0, 265.0}">
+            </property>
+            <property name="_type" class="ptolemy.actor.TypeAttribute" value="boolean">
+            </property>
+        </port>
+        <entity name="Throw Exception" class="ptolemy.actor.lib.ThrowException">
+            <property name="message" class="ptolemy.kernel.util.StringAttribute" value="No data available for selected year">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The ThrowException actor generates an error when it receives a true Boolean token on any channel of its input multiport. The text of the error message is specified by the message parameter.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor is similar to ThrowModelError, except that the ThrowException actor's generated error is local (i.e., it is thrown at the local hierarchy level). The ThrowModelError will pass the exception up the workflow hierarchy rather than immediately throwing it.&lt;/p&gt;</configure></property>
+<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that receives Boolean tokens. The actor will generate an error message whenever a true token is received on any channel.</configure></property>
+<property name="prop:message" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The error message that will be reported.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:13:2">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.ThrowException">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:932:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ExceptionControlActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#ExceptionControl">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{335.0, 295.0}">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:56:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:211:143:276">
+            </property>
+            <property name="" class="ptolemy.vergil.basic.DocAttribute">
+                <property name="description" class="ptolemy.data.expr.StringParameter" value="&lt;p&gt;The ThrowException actor generates an error when it receives a true Boolean token on any channel of its input multiport. The text of the error message is specified by the message parameter.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor is similar to ThrowModelError, except that the ThrowException actor's generated error is local (i.e., it is thrown at the local hierarchy level). The ThrowModelError will pass the exception up the workflow hierarchy rather than immediately throwing it.&lt;/p&gt;">
+                </property>
+                <property name="author" class="ptolemy.kernel.util.StringAttribute" value="Edward A. Lee">
+                </property>
+                <property name="version" class="ptolemy.kernel.util.StringAttribute" value="null">
+                </property>
+                <property name="message (parameter)" class="ptolemy.data.expr.StringParameter" value="The error message that will be reported.">
+                </property>
+                <property name="input (port)" class="ptolemy.kernel.util.StringAttribute" value="A multiport that receives Boolean tokens. The actor will generate an error message whenever a true token is received on any channel.">
+                </property>
+            </property>
+        </entity>
+        <relation name="relation" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <link port="port" relation="relation"/>
+        <link port="Throw Exception.input" relation="relation"/>
+    </entity>
+    <relation name="relation" class="ptolemy.actor.TypedIORelation">
+        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+        </property>
+    </relation>
+    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
+        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+        </property>
+    </relation>
+    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation6" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <link port="port" relation="relation5"/>
+    <link port="port2" relation="relation6"/>
+    <link port="Get year.port" relation="relation2"/>
+    <link port="River name lookup table.CacheLocalFileName" relation="relation4"/>
+    <link port="PrepareData.allFlowData" relation="relation"/>
+    <link port="PrepareData.flowData" relation="relation5"/>
+    <link port="PrepareData.rivers" relation="relation4"/>
+    <link port="PrepareData.year" relation="relation2"/>
+    <link port="PrepareData.stations" relation="relation6"/>
+    <link port="PrepareData.dataNotFound" relation="relation3"/>
+    <link port="FlowDataEML.allFlowData" relation="relation"/>
+    <link port="CheckData.port" relation="relation3"/>
+</entity>
+<entity name="DisplayFileNames" class="ptolemy.actor.lib.gui.Display">
+    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={326, 527, 869, 95}, maximized=false}">
+    </property>
+    <property name="_paneSize" class="ptolemy.actor.gui.SizeAttribute" value="[869, 73]">
+    </property>
+    <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="10">
+    </property>
+    <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+    </property>
+    <property name="suppressBlankLines" class="ptolemy.data.expr.Parameter" value="false">
+    </property>
+    <property name="title" class="ptolemy.data.expr.StringParameter" value="">
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong, Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Display actor reads tokens of any type via its input multiport, and displays each token on a separate line in a text display window.&lt;/p&gt;&#10;&#10;&lt;p&gt;Specify the size of the text display window with the rowsDisplayed and columnsDisplayed parameters. Simply resizing the window onscreen does not persistently change the size when the workflow is saved, closed, and then re-opened. &lt;/p&gt;&#10;&#10;&lt;p&gt;If the input is a string token, then the actor strips the surrounding quotation marks before displaying the value.&lt;/p&gt; &#10;&#10;&lt;p&gt;Select the suppressBlankLines parameter to specify that the actor not add blank lines to the display. By default, the actor will add blank lines.&lt;/p&gt;&#10;&#10;&lt;p&gt;Note: this actor can consume large amounts of memory. It is not advisable to use it to display large output streams.&lt;/p&gt;</configure></property>
+<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that accepts tokens of any type.</configure></property>
+<property name="prop:suppressBlankLines" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether the actor should display blank lines (the default) or suppress them.</configure></property>
+<property name="prop:rowsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical size of the display, in rows. The value is an integer that defaults to 10.</configure></property>
+<property name="prop:columnsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal size of the display, in columns. The value is an integer that defaults to 40.</configure></property>
+<property name="prop:title" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The title of the text display window. If specified, the value will appear in the title bar of the text display window.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:7:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.gui.Display">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:883:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#TextualOutputActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#TextualOutput">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[375.0, -15.0]">
+    </property>
+</entity>
+<entity name="Plot base flow" class="org.ecoinformatics.seek.R.RExpression">
+    <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="plotBaseFlow &lt;- function(aggdf, USING_KEPLER=FALSE) {&#10;	# Plot InFlowRequirements of each river along with the observed flow&#10;	# for that river, during the date range of interest.  We generate 2&#10;	# summary graphs for each river.  First, a RegetzPolygonPlot showing&#10;	# daily flow in relation to the IFR, with acceptable flow shown in&#10;	# gray, and TPC exceedances (or, alternatively unacceptable flow as&#10;	# defined by the IFR) shown in red.  Immediately following this is a&#10;	# boxplot showing the distribution of observed flow by month.  &#10;	&#10;	&#10;	# make list of aggdf by month (but only for for rivers in df)&#10;	flowByMonth &lt;- split(subset(aggdf, select=-river),&#10;			aggdf$river)[unique(aggdf$river)]&#10;	&#10;	# determine year of analysis from the data&#10;	year &lt;- unique(format(aggdf$date, &quot;%Y&quot;))&#10;	if (length(year)!=1) {&#10;		stop(&quot;more than one year included in flow data&quot;)&#10;	}&#10;	&#10;	# define the plot creation function&#10;	ifrplot &lt;- function(dat, river, year, ...) {&#10;		&#10;		# construct plot title&#10;		m &lt;- paste(&quot;River Flow TPC, Base IFR: &quot;, river, &quot; River\n&quot;, sep=&quot;&quot;)&#10;		s &lt;- paste(c(&quot;01-Jan-&quot;, &quot;to 31-Dec-&quot;), year, sep=&quot;&quot;, collapse=&quot; &quot;)&#10;		mtxt &lt;- paste(m, s)&#10;		&#10;		# insert any missing days, then fill in IFR for corresponding month&#10;		allDates &lt;- data.frame(date=seq(min(dat$date), max(dat$date), by=1))&#10;		dat &lt;- merge(allDates, dat, all.x=TRUE)&#10;		ifrToFill &lt;- months(dat$date[is.na(dat$ifr)], abbreviate=TRUE)&#10;		dat$ifr[is.na(dat$ifr)] &lt;- dat$ifr[match(ifrToFill, dat$month)]&#10;		&#10;		# if max flow &gt;200, plot log10 values instead&#10;		if(max(dat$flow, na.rm=TRUE)&lt;=200) {&#10;			ytxt &lt;- expression(paste(&quot;flow &quot;, bgroup(&quot;(&quot;, frac(m^3, s), &quot;)&quot; ) ) )&#10;			flow &lt;- dat$flow&#10;			ifr &lt;- dat$ifr&#10;		} else {&#10;			ytxt &lt;- expression(paste(log[10], &quot; flow + 1&quot;,&#10;							bgroup(&quot;(&quot;, frac(m^3, s), &quot;)&quot; ) ) )&#10;			flow &lt;- log10(dat$flow + 1)&#10;			ifr &lt;- log10(dat$ifr + 1)&#10;		}&#10;		&#10;		plot(dat$date, flow, type=&quot;n&quot;, main=mtxt, ylab=ytxt)&#10;		&#10;		# color area between observed flow and IFR, using red if observed&#10;		# flow is below IFR and gray if it is above. if flow is NA, use IFR&#10;		# value (thus no shading will appear)&#10;		flow[is.na(dat$flow)] &lt;- ifr[is.na(dat$flow)]&#10;		polygon(c(dat$date, rev(dat$date)), c(ifr,&#10;						rev(ifelse(flow &lt; ifr, flow, ifr))), border=NA,&#10;				col=&quot;red&quot;)&#10;		polygon(c(dat$date, rev(dat$date)), c(ifr,&#10;						rev(ifelse(flow &gt; ifr, flow, ifr))), border=NA,&#10;				col=&quot;gray&quot;)&#10;		&#10;		# add lines for the flow and ifr, but skipping NA values&#10;		ifr[is.na(dat$flow)] &lt;- NA&#10;		flow[is.na(dat$flow)] &lt;- NA&#10;		lines(dat$date, flow)&#10;		lines(dat$date, ifr, lwd=2)&#10;		&#10;		# create and place a legend&#10;		legend(&quot;topright&quot;, legend=c(&quot;base IFR&quot;, &quot;below IFR&quot;, &quot;above IFR&quot;),&#10;				lty=c(1, NA, NA), lwd=c(2, NA, NA), pch=c(NA, 22, 22),&#10;				pt.bg=c(NA, &quot;red&quot;, &quot;gray&quot;), pt.cex=c(NA, 2, 2),  bty=&quot;n&quot; )&#10;		&#10;	}&#10;	&#10;	# define the plot creation function&#10;	ifrboxplot &lt;- function(dat, river, year, ...) {&#10;		&#10;		# construct plot title&#10;		m &lt;- paste(&quot;River Flow TPC, Base IFR: &quot;, river, &quot; River\n&quot;, sep=&quot;&quot;)&#10;		s &lt;- paste(c(&quot;01-Jan-&quot;, &quot;to 31-Dec-&quot;), year, sep=&quot;&quot;, collapse=&quot; &quot;)&#10;		mtxt &lt;- paste(m, s)&#10;		&#10;		# insert any missing days, then fill in IFR for corresponding month&#10;		allDates &lt;- data.frame(date=seq(min(dat$date), max(dat$date), by=1))&#10;		dat &lt;- merge(allDates, dat, all.x=TRUE)&#10;		ifrToFill &lt;- months(dat$date[is.na(dat$ifr)], abbreviate=TRUE)&#10;		dat$ifr[is.na(dat$ifr)] &lt;- dat$ifr[match(ifrToFill, dat$month)]&#10;		&#10;		# if max flow &gt;200, plot log10 values instead&#10;		if(max(dat$flow, na.rm=TRUE)&lt;=200) {&#10;			ytxt &lt;- expression(paste(&quot;flow &quot;, bgroup(&quot;(&quot;, frac(m^3, s), &quot;)&quot; ) ) )&#10;			flow &lt;- dat$flow&#10;			ifr &lt;- dat$ifr&#10;		} else {&#10;			ytxt &lt;- expression(paste(log[10], &quot; flow + 1&quot;,&#10;							bgroup(&quot;(&quot;, frac(m^3, s), &quot;)&quot; ) ) )&#10;			flow &lt;- log10(dat$flow + 1)&#10;			ifr &lt;- log10(dat$ifr + 1)&#10;		}&#10;				&#10;		# color area between observed flow and IFR, using red if observed&#10;		# flow is below IFR and gray if it is above. if flow is NA, use IFR&#10;		# value (thus no shading will appear)&#10;		flow[is.na(dat$flow)] &lt;- ifr[is.na(dat$flow)]&#10;&#10;		#### new plot here ############&#10;		&#10;		# reorder the levels of month in dat so that boxplot doesn't plot&#10;		# monthly data alphabetically&#10;		dat$month &lt;- factor(dat$month, levels = month.abb)&#10;		boxplot(flow~dat$month, main=mtxt, ylab=ytxt)&#10;		&#10;		# add asterices for monthly ifrs&#10;		points(dat$month, ifr, pch=8, col=&quot;red&quot;)&#10;		legend(&quot;topright&quot;, legend=c(&quot;Monthly flow summary&quot;, &quot;Monthly IFR&quot;),&#10;				pch=c(22, 8), col=c(&quot;black&quot;, &quot;red&quot;), pt.cex=c(2, 1), bty=&quot;n&quot; )&#10;		&#10;	}&#10;	&#10;	# plot graphs of daily flow, along with flow boxplots&#10;	i &lt;- 1&#10;	fnames &lt;- c()&#10;	for (river in names(flowByMonth)) {&#10;		# first plot&#10;		fname &lt;- paste(getwd(), &quot;/plot_&quot;, river, &quot;_&quot;, i, &quot;.png&quot;, sep=&quot;&quot;)&#10;		fnames[i] &lt;- fname&#10;		# open png device with river-specific filename&#10;		png(file=fname, width=792, height=612)&#10;		par(mai=c(0.75, 1.25, 0.75, 0.75))&#10;		# plot&#10;		ifrplot(flowByMonth[[river]], river, year)&#10;		# Close output device&#10;		dev.off()&#10;		i &lt;- i + 1&#10;		&#10;		# second plot&#10;		fname &lt;- paste(getwd(), &quot;/plot_&quot;, river, &quot;_&quot;, i, &quot;.png&quot;, sep=&quot;&quot;)&#10;		fnames[i] &lt;- fname&#10;		# open png device with river-specific filename&#10;		png(file=fname)&#10;		par(mai=c(0.75, 1.25, 0.75, 0.75))&#10;		# plot&#10;		ifrboxplot(flowByMonth[[river]], river, year)&#10;		# Close output device&#10;		dev.off()&#10;		i &lt;- i + 1&#10;	}&#10;	&#10;	return(list(fnames=fnames))&#10;}&#10;&#10;ans &lt;- plotBaseFlow(aggFlowData, USING_KEPLER=TRUE) &#10;invisible(lapply(names(ans), function(nm) assign(nm, ans[[nm]], envir=.GlobalEnv)))">
+        <display name="R function or script"/>
+        <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+            <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+            </property>
+            <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+            </property>
+        </property>
+    </property>
+    <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
+        <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
+        </property>
+        <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
+        </property>
+        <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+        </property>
+    </property>
+    <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+        <display name="R working directory"/>
+    </property>
+    <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+        <display name="Save or not"/>
+    </property>
+    <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+        <display name="Graphics Format"/>
+    </property>
+    <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Graphics Output"/>
+    </property>
+    <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+        <display name="Automatically display graphics"/>
+    </property>
+    <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="792">
+        <display name="Number of X pixels in image"/>
+    </property>
+    <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="612">
+        <display name="Number of Y pixels in image"/>
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:604:2">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[210.0, 10.0]">
+    </property>
+    <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:977:11">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:977:11">
+    </property>
+    <port name="aggFlowData" class="ptolemy.actor.TypedIOPort">
+        <property name="input"/>
+    </port>
+    <port name="fnames" class="ptolemy.actor.TypedIOPort">
+        <property name="output"/>
+    </port>
+</entity>
+<entity name="Flow Data Table" class="ptolemy.actor.TypedCompositeActor">
+    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="7.1.devel">
+    </property>
+    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:623:7">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+    </property>
+    <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>    <property name="_location" class="ptolemy.kernel.util.Location" value="[205.0, -125.0]">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:31:3:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:21:4:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2092:33:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:121:3">
+    </property>
+    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={34, 22, 1124, 1028}, maximized=false}">
+    </property>
+    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[785, 640]">
+    </property>
+    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+    </property>
+    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{332.5, 357.0}">
+    </property>
+    <port name="datatable" class="ptolemy.actor.TypedIOPort">
+        <property name="input"/>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{160.0, 240.0}">
+        </property>
+    </port>
+    <entity name="data2list" class="org.ecoinformatics.seek.R.RExpression">
+        <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="# The htmlTableMaker RExpression actor R code&#10;data2list &lt;- function(dtable, tableName, year, reportTitle,&#10;		USING_KEPLER=FALSE) {&#10;&#10;	# convert any factor columns to character&#10;	columnIsFactor &lt;- sapply(dtable, is.factor)&#10;	dtable[columnIsFactor] &lt;- lapply(dtable[columnIsFactor], as.character)	&#10;&#10;	month &lt;- dtable[[1]]&#10;	river &lt;- dtable[[2]]&#10;	days &lt;- dtable[[3]]&#10;	avg &lt;- round(dtable[[4]], digits=4)&#10;	baseIFR &lt;- dtable[[5]]&#10;	percentIFR &lt;- dtable[[6]]&#10;&#10;	return(list(month=month,river=river,days=days,avg=avg,baseIFR=baseIFR,percentIFR=percentIFR))&#10;&#10;}&#10;&#10;ans &lt;- data2list(datatable, tableName, year, reportTitle)&#10;invisible(lapply(names(ans), function(nm) assign(nm, ans[[nm]], envir=.GlobalEnv)))&#10;">
+            <display name="R function or script"/>
+            <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                </property>
+                <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                </property>
+            </property>
+        </property>
+        <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
+            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
+            </property>
+            <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
+            </property>
+            <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+            </property>
+        </property>
+        <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+            <display name="R working directory"/>
+        </property>
+        <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+            <display name="Save or not"/>
+        </property>
+        <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+            <display name="Graphics Format"/>
+        </property>
+        <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="true">
+            <display name="Graphics Output"/>
+        </property>
+        <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+            <display name="Automatically display graphics"/>
+        </property>
+        <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+            <display name="Number of X pixels in image"/>
+        </property>
+        <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+            <display name="Number of Y pixels in image"/>
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:328:123:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[265.0, 225.0]">
+        </property>
+        <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2096:8">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2096:8">
+        </property>
+        <port name="graphicsFileName" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+        </port>
+        <port name="output" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+        </port>
+        <port name="datatable" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="year" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+        <port name="reportTitle" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
+            </property>
+        </port>
+        <port name="tableName" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="month" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="river" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="days" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="avg" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="baseIFR" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+        <port name="percentIFR" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+        </port>
+    </entity>
+    <entity name="Constant2" class="ptolemy.actor.lib.Const">
+        <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
+        </property>
+        <property name="NONE" class="ptolemy.data.expr.Parameter" value="0">
+        </property>
+        <property name="value" class="ptolemy.data.expr.Parameter" value="reportTitle">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Constant actor outputs a constant, which is specified by the value parameter. By default, the actor outputs the integer 1.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor can be used to output other types of values, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The actor'&#10;s output type matches the type of the specified value.&lt;/p&gt;&#10;&#10;&lt;p&gt;NOTE: If using a PN Director, the 'firingCountLimit' parameter is often set to a finite integer (e.g. '1') so that the workflow will terminate. &lt;/p&gt;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the specified constant. By default, the output is 1.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The limit on the number of times the actor will fire. The default value is 'NONE', meaning there is no limit on the number of time the constant will be provided to the output port. Any integer can be provided as a value for this parameter.</configure></property>
+<property name="prop:value" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the Constant actor. By default, the value is the integer token 1. The value can be set to another type, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The  output type matches the type of the value specified here.</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:1:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
+        </property>
+        <property name="kar" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:kar:57:1">
+        </property>
+        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
+            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
+            </property>
+            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
+            </property>
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{175.0, 370.0}">
+        </property>
+        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+        </property>
+        <port name="trigger" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="multiport"/>
+            <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+        </port>
+    </entity>
+    <entity name="String Constant" class="ptolemy.actor.lib.StringConst">
+        <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
+        </property>
+        <property name="NONE" class="ptolemy.data.expr.Parameter" value="0">
+        </property>
+        <property name="value" class="ptolemy.data.expr.Parameter" value="FlowData">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The StringConstant actor outputs a string specified via the actor's value parameter.&lt;/p&gt;&#10;&#10;&lt;p&gt;Specifying strings with the StringConstant actor is convenient, as the actor does not require that strings be surrounded by quotes. The actor is often used to specify file paths, which can be selected using the Browse button available in the actor's parameters.&lt;/p&gt;&#10;&#10;&lt;p&gt;Specified string values can include references to parameters within scope (i.e., parameters defined at the same level of the hierarchy or higher). &lt;/p&gt;&#10;&#10;&lt;p&gt;NOTE: If using a PN Director, the 'firingCountLimit' parameter is often set to a finite integer (e.g. '1') so that the workflow will terminate. &lt;/p&gt;&#10;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a string constant specified by the value parameter.  </configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time. </configure></property>
+<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The limit on the number of times the actor will fire. The default value is 'NONE', meaning there is no limit on the number of time the constant will be provided to the output port. Any integer can be provided as a value for this parameter.</configure></property>
+<property name="prop:value" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the actor. Specified strings do not require enclosing quotes. (To include a '$' sign in the string, enter '$$'.)</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:204:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.StringConst">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1052:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#StringFunctionActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
+        </property>
+        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
+            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
+            </property>
+            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
+            </property>
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="{175.0, 305.0}">
+        </property>
+    </entity>
+    <entity name="Get year" class="ptolemy.actor.TypedCompositeActor">
+        <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.0.beta">
+        </property>
+        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2094:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.TypedCompositeActor">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:449:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Actor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+        </property>
+        <property name="semanticType22" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Workflow">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;A Composite actor is an aggregation of actors. It may have a local director that is responsible for executing the contained actors. A Composite actor with a local director is called an opaque actor. Composite actors do not require a local director. Composite actors with no local director &quot;inherit&quot; the director from the containing workflow and are called non-opaque.&lt;/p&gt;&#10;&#10;&lt;p&gt;To create a composite actor, drag and drop the Composite actor onto the Workflow canvas. Right-click the actor and select Open Actor from the drop-down menu. A new Kepler application window will open for designing the composite.&lt;/p&gt;</configure></property>
+</property>        <property name="_location" class="ptolemy.kernel.util.Location" value="{60.0, 310.0}">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:449:1:urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:16:11">
+        </property>
+        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={535, 22, 1124, 1028}, maximized=false}">
+        </property>
+        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 478]">
+        </property>
+        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
+        </property>
+        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{-128.9389312977099, 316.3983778625954}">
+        </property>
+        <port name="port" class="ptolemy.actor.TypedIOPort">
+            <property name="output"/>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{35.0, 295.0}">
+            </property>
+        </port>
+        <entity name="Current year" class="org.ecoinformatics.seek.R.RExpression">
+            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="if(exists(&quot;yearParam&quot;) &amp;&amp; is.numeric(yearParam)) {&#10;  year &lt;- yearParam&#10;} else {&#10;  year &lt;- substr(currentTime, 1, 4)&#10;}">
+                <display name="R function or script"/>
+                <property name="R Expression" class="ptolemy.actor.gui.style.TextStyle">
+                    <property name="height" class="ptolemy.data.expr.Parameter" value="10">
+                    </property>
+                    <property name="width" class="ptolemy.data.expr.Parameter" value="30">
+                    </property>
+                </property>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorTableauFactory">
+                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
+                </property>
+                <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="80">
+                </property>
+                <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+                </property>
+            </property>
+            <property name="Rcwd" class="ptolemy.data.expr.StringParameter" value="/home/regetz/.kepler/">
+                <display name="R working directory"/>
+            </property>
+            <property name="save_nosave" class="ptolemy.data.expr.StringParameter" value="--no-save">
+                <display name="Save or not"/>
+            </property>
+            <property name="graphicsFormat" class="ptolemy.data.expr.StringParameter" value="png">
+                <display name="Graphics Format"/>
+            </property>
+            <property name="graphicsOutput" class="ptolemy.data.expr.Parameter" value="true">
+                <display name="Graphics Output"/>
+            </property>
+            <property name="displayGraphicsOutput" class="ptolemy.data.expr.Parameter" value="false">
+                <display name="Automatically display graphics"/>
+            </property>
+            <property name="numXPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of X pixels in image"/>
+            </property>
+            <property name="numYPixels" class="ptolemy.data.expr.StringParameter" value="480">
+                <display name="Number of Y pixels in image"/>
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Dan Higgins</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The RExpression actor runs an R script or function. Input and output port are created by the user and correspond to R variables used in the specified R script. The actor outputs the result of the evaluated script.&lt;/p&gt;&#10;&#10;&lt;p&gt;The R application must be installed on the local system to use this actor. R is a language and environment for statistical computing and graphics. For more information about R, see http://www.r-project.org/.&lt;/p&gt;&#10;&#10;&lt;p&gt;Kepler contains a number of preconfigured R-actors: Barplot, Boxplot, Scatterplot, Summary, RandomNormal, RandomUniform, Correlation, LinearModel, Regression, RMean, RMedian, RQuantile, and  SummaryStatistics.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts a copy of the text output that R generates. As the actor communicates with R to run the R function or script, the output port sends back the response (i.e., the values and statistical outputs).</configure></property>
+<property name="port:graphicsFileName" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the file name of the generated graph of the results.</configure></property>
+<property name="prop:Rcwd" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 'R' working directory (the home directory by default). </configure></property>
+<property name="prop:displayGraphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to display the plot once the actor has generated it.</configure></property>
+<property name="prop:graphicsFormat" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The graphics output format. Currently the actor supports either  *.pdf or  *.png.</configure></property>
+<property name="prop:numXPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The width of the output graphic in pixels.</configure></property>
+<property name="prop:numYPixels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The height of the output graphic in pixels.</configure></property>
+<property name="prop:expression" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The expression that is evaluated to produce the output.</configure></property>
+<property name="prop:save_nosave" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to save the R workspace when R is closed; set to '--save' to retrieve the workspace later in a workflow in another R-actor.</configure></property>
+<property name="prop:graphicsOutput" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether or not to create a graphics output port. By default, the actor will create a graphics output port.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:379:15:8">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.ecoinformatics.seek.R.RExpression">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1126:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#MathOperationActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#GeneralPurpose">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-140.0, 295.0}">
+            </property>
+            <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:360:1">
+            </property>
+            <port name="graphicsFileName" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+                </property>
+            </port>
+            <port name="output" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="false">
+                </property>
+            </port>
+            <port name="currentTime" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+            <port name="year" class="ptolemy.actor.TypedIOPort">
+                <property name="output"/>
+            </port>
+            <port name="yearParam" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+            </port>
+        </entity>
+        <entity name="Time Stamp" class="org.sdm.spa.Timestamp">
+            <property name="format" class="ptolemy.data.expr.StringParameter" value="yyyy-MM-dd z HH:mm:ss">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Ilkay Altintas</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The TimeStamp actor outputs the current date and time.&lt;/p&gt;&#10;&#10;&lt;p&gt;Dates and times can be formatted in a variety of ways. Select a format from the drop-down menu beside the format parameter, or enter a pattern directly into the format field. For more information about date format patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html.&lt;/p&gt;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the current time stamp as a string.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:format" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The date format. Select a format string from the drop-down menu or type in a custom format string directly into the field. For more information about date formatting patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:370:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.sdm.spa.Timestamp">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1136:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ClockActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#LocalInput">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-270.0, 310.0}">
+            </property>
+            <property name="" class="ptolemy.vergil.basic.DocAttribute">
+                <property name="description" class="ptolemy.data.expr.StringParameter" value="&lt;p&gt;The TimeStamp actor outputs the current date and time.&lt;/p&gt;&#10;&#10;&lt;p&gt;Dates and times can be formatted in a variety of ways. Select a format from the drop-down menu beside the format parameter, or enter a pattern directly into the format field. For more information about date format patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html.&lt;/p&gt;">
+                </property>
+                <property name="author" class="ptolemy.kernel.util.StringAttribute" value="Ilkay Altintas">
+                </property>
+                <property name="version" class="ptolemy.kernel.util.StringAttribute" value="null">
+                </property>
+                <property name="format (parameter)" class="ptolemy.data.expr.StringParameter" value="The date format. Select a format string from the drop-down menu or type in a custom format string directly into the field. For more information about date formatting patterns, see http://java.sun.com/docs/books/tutorial/i18n/format/datepattern.html">
+                </property>
+                <property name="output (port)" class="ptolemy.kernel.util.StringAttribute" value="An output port that broadcasts the current time stamp as a string.">
+                </property>
+                <property name="trigger (port)" class="ptolemy.kernel.util.StringAttribute" value="A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.">
+                </property>
+            </property>
+        </entity>
+        <entity name="Constant" class="ptolemy.actor.lib.Const">
+            <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
+            </property>
+            <property name="NONE" class="ptolemy.data.expr.Parameter" value="0">
+            </property>
+            <property name="value" class="ptolemy.data.expr.Parameter" value="year">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Constant actor outputs a constant, which is specified by the value parameter. By default, the actor outputs the integer 1.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor can be used to output other types of values, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The actor'&#10;s output type matches the type of the specified value.&lt;/p&gt;&#10;&#10;&lt;p&gt;NOTE: If using a PN Director, the 'firingCountLimit' parameter is often set to a finite integer (e.g. '1') so that the workflow will terminate. &lt;/p&gt;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the specified constant. By default, the output is 1.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The limit on the number of times the actor will fire. The default value is 'NONE', meaning there is no limit on the number of time the constant will be provided to the output port. Any integer can be provided as a value for this parameter.</configure></property>
+<property name="prop:value" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the Constant actor. By default, the value is the integer token 1. The value can be set to another type, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The  output type matches the type of the value specified here.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:1:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
+            </property>
+            <property name="kar" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:kar:57:1">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
+                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
+                </property>
+                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
+                </property>
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="{-210.0, 410.0}">
+            </property>
+            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <port name="trigger" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="multiport"/>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+                </property>
+            </port>
+        </entity>
+        <relation name="relation" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <link port="port" relation="relation2"/>
+        <link port="Current year.currentTime" relation="relation"/>
+        <link port="Current year.year" relation="relation2"/>
+        <link port="Current year.yearParam" relation="relation3"/>
+        <link port="Time Stamp.output" relation="relation"/>
+        <link port="Constant.output" relation="relation3"/>
+    </entity>
+    <entity name="Display" class="ptolemy.actor.lib.gui.Display">
+        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={326, 411, 870, 101}, maximized=false}">
+        </property>
+        <property name="_paneSize" class="ptolemy.actor.gui.SizeAttribute" value="[870, 79]">
+        </property>
+        <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="10">
+        </property>
+        <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
+        </property>
+        <property name="suppressBlankLines" class="ptolemy.data.expr.Parameter" value="false">
+        </property>
+        <property name="title" class="ptolemy.data.expr.StringParameter" value="">
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong, Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Display actor reads tokens of any type via its input multiport, and displays each token on a separate line in a text display window.&lt;/p&gt;&#10;&#10;&lt;p&gt;Specify the size of the text display window with the rowsDisplayed and columnsDisplayed parameters. Simply resizing the window onscreen does not persistently change the size when the workflow is saved, closed, and then re-opened. &lt;/p&gt;&#10;&#10;&lt;p&gt;If the input is a string token, then the actor strips the surrounding quotation marks before displaying the value.&lt;/p&gt; &#10;&#10;&lt;p&gt;Select the suppressBlankLines parameter to specify that the actor not add blank lines to the display. By default, the actor will add blank lines.&lt;/p&gt;&#10;&#10;&lt;p&gt;Note: this actor can consume large amounts of memory. It is not advisable to use it to display large output streams.&lt;/p&gt;</configure></property>
+<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that accepts tokens of any type.</configure></property>
+<property name="prop:suppressBlankLines" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify whether the actor should display blank lines (the default) or suppress them.</configure></property>
+<property name="prop:rowsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical size of the display, in rows. The value is an integer that defaults to 10.</configure></property>
+<property name="prop:columnsDisplayed" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal size of the display, in columns. The value is an integer that defaults to 40.</configure></property>
+<property name="prop:title" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The title of the text display window. If specified, the value will appear in the title bar of the text display window.</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:7:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.gui.Display">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:883:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#TextualOutputActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#TextualOutput">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[605.0, 265.0]">
+        </property>
+    </entity>
+    <entity name="Record Assembler" class="ptolemy.actor.lib.OrderedRecordAssembler">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Yuhong Xiong</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&#10;&lt;p&gt;The RecordAssembler actor receives tokens of various types on user-defined input ports and assembles those tokens into a record, which it outputs. The actor reads and converts one token from each port every time it fires.&lt;/p&gt;&#10;&#10;&lt;p&gt;A record is a composite data type consisting of one or more elements. Each element is named and can have a distinct type. For example, {number=1, name=&quot;dog&quot;} is a record containing two elements. The first element, named &quot;number&quot;, contains an integer value. The second element, named &quot;name&quot;, contains a string value. &lt;/p&gt;&#10;&#10;&lt;p&gt;The name of each record element generated by the actor is the name of the input port from which the value was received. An actor customized to use three input ports named &quot;day&quot;, &quot;week&quot;, &quot;month&quot; could output the following record {day=&quot;Monday&quot;, week=5, month=12}.&lt;/p&gt;&#10;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the generated records. </configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2101:5">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.OrderedRecordAssembler">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:923:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#RecordActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#DataStructureOperation">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[440.0, 235.0]">
+        </property>
+        <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:47:1">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:47:1">
+        </property>
+        <port name="Month" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="River" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="Days" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="Average" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="BaseIFR" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+        <port name="PercentIFR" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+        </port>
+    </entity>
+    <relation name="relation" class="ptolemy.actor.TypedIORelation">
+        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+        </property>
+    </relation>
+    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
+        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+        </property>
+    </relation>
+    <relation name="relation6" class="ptolemy.actor.TypedIORelation">
+        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
+        </property>
+    </relation>
+    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation8" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation9" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation10" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation11" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <relation name="relation7" class="ptolemy.actor.TypedIORelation">
+    </relation>
+    <link port="datatable" relation="relation4"/>
+    <link port="data2list.datatable" relation="relation4"/>
+    <link port="data2list.year" relation="relation3"/>
+    <link port="data2list.reportTitle" relation="relation"/>
+    <link port="data2list.tableName" relation="relation6"/>
+    <link port="data2list.month" relation="relation2"/>
+    <link port="data2list.river" relation="relation5"/>
+    <link port="data2list.days" relation="relation8"/>
+    <link port="data2list.avg" relation="relation9"/>
+    <link port="data2list.baseIFR" relation="relation10"/>
+    <link port="data2list.percentIFR" relation="relation11"/>
+    <link port="Constant2.output" relation="relation"/>
+    <link port="String Constant.output" relation="relation6"/>
+    <link port="Get year.port" relation="relation3"/>
+    <link port="Display.input" relation="relation7"/>
+    <link port="Record Assembler.output" relation="relation7"/>
+    <link port="Record Assembler.Month" relation="relation2"/>
+    <link port="Record Assembler.River" relation="relation5"/>
+    <link port="Record Assembler.Days" relation="relation8"/>
+    <link port="Record Assembler.Average" relation="relation9"/>
+    <link port="Record Assembler.BaseIFR" relation="relation10"/>
+    <link port="Record Assembler.PercentIFR" relation="relation11"/>
+</entity>
+<entity name="Constant" class="ptolemy.actor.lib.Const">
+    <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="NONE">
+    </property>
+    <property name="NONE" class="ptolemy.data.expr.Parameter" value="0">
+    </property>
+    <property name="value" class="ptolemy.data.expr.Parameter" value="&quot;Normal&quot;">
+    </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>&lt;p&gt;The Constant actor outputs a constant, which is specified by the value parameter. By default, the actor outputs the integer 1.&lt;/p&gt;&#10;&#10;&lt;p&gt;The actor can be used to output other types of values, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The actor'&#10;s output type matches the type of the specified value.&lt;/p&gt;&#10;&#10;&lt;p&gt;NOTE: If using a PN Director, the 'firingCountLimit' parameter is often set to a finite integer (e.g. '1') so that the workflow will terminate. &lt;/p&gt;&#10;</configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the specified constant. By default, the output is 1.</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that has no declared type (in other words, the port can accept any data type: double, int, array, etc.) If the port is connected, the actor will not fire until the trigger port receives an input token. Connecting the port is optional, but useful when scheduling the actor to perform at a certain time.</configure></property>
+<property name="prop:firingCountLimit" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The limit on the number of times the actor will fire. The default value is 'NONE', meaning there is no limit on the number of time the constant will be provided to the output port. Any integer can be provided as a value for this parameter.</configure></property>
+<property name="prop:value" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The value produced by the Constant actor. By default, the value is the integer token 1. The value can be set to another type, e.g., a string (such as &quot;Hello&quot;) or a double (such as 1.2). The  output type matches the type of the value specified here.</configure></property>
+</property>    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:287:2302:1">
+    </property>
+    <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
+        <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
+        </property>
+    </property>
+    <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
+    </property>
+    <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Constant">
+    </property>
+    <property name="kar" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:kar:57:1">
+    </property>
+    <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
+        <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
+        </property>
+        <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
+        </property>
+    </property>
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[250.0, 200.0]">
+    </property>
+    <property name="" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:1:1">
+    </property>
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:1:1">
+    </property>
+</entity>
+<entity name="status" class="ptolemy.actor.lib.Discard">
+    <property name="_location" class="ptolemy.kernel.util.Location" value="[375.0, 215.0]">
+    </property>
+</entity>
+    <link port="Base IFR table.CacheLocalFileName" relation="relation"/>
+    <link port="BaseFlow.ifrBase" relation="relation"/>
+    <link port="BaseFlow.baseTPC" relation="relation5"/>
+    <link port="BaseFlow.flowThisYear" relation="relation2"/>
+    <link port="BaseFlow.stations" relation="relation3"/>
+    <link port="BaseFlow.aggFlowData" relation="relation7"/>
+    <link port="Get water flow data.port" relation="relation2"/>
+    <link port="Get water flow data.port2" relation="relation3"/>
+    <link port="DisplayFileNames.input" relation="relation4"/>
+    <link port="Plot base flow.aggFlowData" relation="relation7"/>
+    <link port="Plot base flow.fnames" relation="relation4"/>
+    <link port="Flow Data Table.datatable" relation="relation5"/>
+    <link port="Constant.output" relation="relation6"/>
+    <link port="status.input" relation="relation6"/>
+</entity>
Index: test/clienttestfiles/888.42.1-tpc02-water-flow-base-10.kar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: test/clienttestfiles/888.42.1-tpc02-water-flow-base-10.kar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: test/edu/ucsb/nceas/workflowschedulertest/WorkflowSchedulerTest.java
===================================================================
--- test/edu/ucsb/nceas/workflowschedulertest/WorkflowSchedulerTest.java	(revision 5138)
+++ test/edu/ucsb/nceas/workflowschedulertest/WorkflowSchedulerTest.java	(revision 5139)
@@ -25,6 +25,7 @@
  */
 package edu.ucsb.nceas.workflowschedulertest;
 
+import java.io.IOException;
 import java.io.StringReader;
 import java.util.Hashtable;
 
@@ -34,6 +35,8 @@
 import org.xml.sax.InputSource;
 
 import edu.ucsb.nceas.MCTestCase;
+import edu.ucsb.nceas.metacat.client.MetacatAuthException;
+import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
 import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
@@ -48,17 +51,22 @@
  */
 public class WorkflowSchedulerTest extends MCTestCase {
 	// Constants
+	private static String docId = null;
+	private static String dataDocId = null;
+	private static String sessionId = null;
 	private static String workflowJobName;
 	private static String workflowSchedulerUrl;
 	private static XPathFactory xPathFactory = null;
 	
-	private static final String WORKFLOW_ID = "urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:379:29";
-	private static final String KAR_ID = "urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:423:715:1";
+	private static final String WORKFLOW_ID_BASE = "urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:";
+	private static String WORKFLOW_ID = null;
+	private static final String KAR_ID_BASE = "urn:lsid:gamma.msi.ucsb.edu/OpenAuth/:";
+	private static String KAR_ID = null;
 	private static final String WORKFLOW_NAME = "tpc02-water-flow-base";
 	private static final String START_TIME = "10/10/2008 10:10:10";
 	private static final String END_TIME = "10/10/2009 10:10:10";
 	private static final String INTERVAL_VALUE = "100";
-	private static final String INTERVAL_UNIT = "s";
+	private static final String INTERVAL_UNIT = "min";
 
 	static {
 		try {
@@ -85,7 +93,64 @@
 		xPathFactory = XPathFactory.newInstance();
 
 	}
+	
+	/**
+	 * Establish a testing framework by initializing appropriate objects
+	 */
+	public void setUp() throws Exception {
+		metacatConnectionNeeded = true;
+		
+		super.setUp();	
+		//debug("session id: " + sessionId);
+		//debug("doc id: " + docId);
+		//debug("data doc id: " + dataDocId);
+		
+		try {
+			if (sessionId == null) {
+				String loginResult = m.login(username, password);
+				//debug("WorkflowSchedulerTest.initialize - login result: " + loginResult);
+				if (loginResult.contains("<sessionId>")) {
+					int startIndex = loginResult.indexOf("<sessionId>") + 11;
+					int endIndex = loginResult.indexOf("</sessionId>");
+					sessionId = loginResult.substring(startIndex, endIndex);
+					//debug("WorkflowSchedulerTest.initialize - session id: " + sessionId);
+				} else {
+					fail("could not get session ID from login results");
+				}
+			}
 
+			if (docId == null) {
+				// insert a document for us to test with
+				docId = generateDocumentId() + ".1";
+
+				String testDoc = 
+					getTestDocFromFile(testdatadir + "tpc02-water-flow-base.xml");
+				// debug("test doc: " + testDoc);
+				insertDocumentId(docId, testDoc, SUCCESS, false);
+
+				WORKFLOW_ID = WORKFLOW_ID_BASE + docId.replace('.', ':');
+			}
+			
+			if (dataDocId == null) {
+				// insert a data document (kar file) for us to test with
+				dataDocId = generateDocumentId() + ".1";
+
+				String filePath = testdatadir + "888.42.1-tpc02-water-flow-base-10.kar";
+				// debug("test doc: " + testDoc);
+				uploadDocumentId(dataDocId, filePath, SUCCESS, false);
+
+				KAR_ID = KAR_ID_BASE + dataDocId.replace('.', ':');
+			}
+		} catch (IOException ioe) {
+			fail("WorkflowSchedulerTest.initialize - I/O exception: " + ioe.getMessage());
+		} catch (MetacatInaccessibleException mie) {
+			fail("WorkflowSchedulerTest.initialize - Metacat Inaccessible: " + mie.getMessage());
+		} catch (MetacatAuthException mae) {
+			fail("WorkflowSchedulerTest.initialize - Metacat auth issue: " + mae.getMessage());
+		}	
+
+	}
+
 	/**
 	 * Create a suite of tests to be run together
 	 */
@@ -108,8 +173,7 @@
 	}
     
     public void scheduleJobTest() {
-		try {
-			
+		try {	
 			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
 
 			params.put("action", new String[] { "scheduleWorkflow" });
@@ -122,6 +186,7 @@
 			params.put("endtime", new String[] { END_TIME });
 			params.put("intervalvalue", new String[] { INTERVAL_VALUE });
 			params.put("intervalunit", new String[] { INTERVAL_UNIT });	
+			params.put("sessionid", new String[] { sessionId });
 
 			String schedulerResponse = RequestUtil.get(workflowSchedulerUrl, params);
 			debug("WorkflowSchedulerTest.scheduleJobTest - response: " + schedulerResponse);
@@ -158,6 +223,16 @@
     
     public void unscheduleJobTest() {
 		try {
+			String loginResult = m.login(username, password);
+			String sessionId = null;
+			if (loginResult.contains("<sessionId>")) {
+				int startIndex = loginResult.indexOf("<sessionId>") + 11;
+				int endIndex = loginResult.indexOf("</sessionId>");
+				sessionId = loginResult.substring(startIndex, endIndex);
+			} else {
+				fail("could not get session ID from login results");
+			}
+			
 			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
 
 			params.put("action", new String[] { "unscheduleWorkflow" });
@@ -164,6 +239,7 @@
 			params.put("workflowjobname", new String[] { workflowJobName });
 			params.put("workflowid", new String[] { WORKFLOW_ID });
 			params.put("workflowname", new String[] { "tpc02-water-flow-base" });
+			params.put("sessionid", new String[] { sessionId });
 
 			String schedulerResponse = RequestUtil.get(workflowSchedulerUrl, params);
 			debug("WorkflowSchedulerTest.unScheduleJobTest - response: " + schedulerResponse);
@@ -195,6 +271,16 @@
     
     public void rescheduleJobTest() {
 		try {
+			String loginResult = m.login(username, password);
+			String sessionId = null;
+			if (loginResult.contains("<sessionId>")) {
+				int startIndex = loginResult.indexOf("<sessionId>") + 11;
+				int endIndex = loginResult.indexOf("</sessionId>");
+				sessionId = loginResult.substring(startIndex, endIndex);
+			} else {
+				fail("could not get session ID from login results");
+			}
+			
 			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
 
 			params.put("action", new String[] { "rescheduleWorkflow" });
@@ -202,6 +288,7 @@
 			params.put("workflowid",
 					new String[] { WORKFLOW_ID });
 			params.put("workflowname", new String[] { "tpc02-water-flow-base" });
+			params.put("sessionid", new String[] { sessionId });
 
 			String schedulerResponse = RequestUtil.get(workflowSchedulerUrl, params);
 			debug("WorkflowSchedulerTest.reScheduleJobTest - response: " + schedulerResponse);
@@ -233,10 +320,21 @@
     
     public void deleteJobTest() {
 		try {
+			String loginResult = m.login(username, password);
+			String sessionId = null;
+			if (loginResult.contains("<sessionId>")) {
+				int startIndex = loginResult.indexOf("<sessionId>") + 11;
+				int endIndex = loginResult.indexOf("</sessionId>");
+				sessionId = loginResult.substring(startIndex, endIndex);
+			} else {
+				fail("could not get session ID from login results");
+			}
+			
 			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
 
 			params.put("action", new String[] { "deleteScheduledWorkflow" });
 			params.put("workflowjobname", new String[] { workflowJobName });
+			params.put("sessionid", new String[] { sessionId });
 
 			String schedulerResponse = RequestUtil.get(workflowSchedulerUrl, params);
 			debug("WorkflowSchedulerTest.deleteJobTest - response: " + schedulerResponse);
Index: test/edu/ucsb/nceas/MCTestCase.java
===================================================================
--- test/edu/ucsb/nceas/MCTestCase.java	(revision 5138)
+++ test/edu/ucsb/nceas/MCTestCase.java	(revision 5139)
@@ -82,6 +82,7 @@
 	protected static final String ALLOWFIRST = "allowFirst";
 	protected static final String DENYFIRST = "denyFirst";
 	
+	protected String testdatadir = "test/clienttestfiles/";
 	protected String prefix = "test";
 	protected String testdocument = "";
 	
@@ -400,9 +401,10 @@
 	 */
 	protected void setUp() throws Exception {
 		try {
-			if (metacatConnectionNeeded)
-			debug("setUp() - Testing Metacat Url: " + metacatUrl);
-			m = MetacatFactory.createMetacatConnection(metacatUrl);
+			if (metacatConnectionNeeded) {
+				debug("setUp() - Testing Metacat Url: " + metacatUrl);
+				m = MetacatFactory.createMetacatConnection(metacatUrl);
+			}
 		} catch (MetacatInaccessibleException mie) {
 			System.err.println("Metacat is: " + metacatUrl);
 			fail("Metacat connection failed." + mie.getMessage());
Index: test/edu/ucsb/nceas/metacattest/AccessAPITest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/AccessAPITest.java	(revision 5138)
+++ test/edu/ucsb/nceas/metacattest/AccessAPITest.java	(revision 5139)
@@ -60,8 +60,6 @@
  */
 public class AccessAPITest extends MCTestCase {
 
-	private String testdatadir = "test/clienttestfiles/";
-
 	/**
 	 * Constructor to build the test
 	 * 
Index: src/edu/ucsb/nceas/workflowscheduler/WorkflowScheduler.java
===================================================================
--- src/edu/ucsb/nceas/workflowscheduler/WorkflowScheduler.java	(revision 5138)
+++ src/edu/ucsb/nceas/workflowscheduler/WorkflowScheduler.java	(revision 5139)
@@ -484,9 +484,8 @@
 			String authStatusXML = authorizationServiceClient.is_authorized_action(sessionId, resourceLsid, permission);
 			
 			authStatus = 
-				xpath.evaluate("/resourceAuthorization/isAuthorized",  new InputSource(new StringReader(authStatusXML)));
+				xpath.evaluate("/resourceAuthorization/isAuthorized",  new InputSource(new StringReader(authStatusXML)));		
 			
-			
 		} catch (PropertyNotFoundException pnfe) {
 			throw new MetacatSchedulerException("WorkflowScheduler.authorizeRemoteSession - Could not " 
 					+ "find property: " + pnfe.getMessage());
Index: src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java	(revision 5138)
+++ src/edu/ucsb/nceas/metacat/scheduler/SchedulerService.java	(revision 5139)
@@ -683,7 +683,7 @@
 			scheduleMonthlyJob(jobName, jobClass, startCal, endCal, intervalValue, jobGroup, jobDetail);
 		} else {
 			throw new ServiceException("SchedulerService.scheduleJob - Could not interpret interval unit: " 
-					+ intervalUnit + ". Unit must be s, m, h or d");	
+					+ intervalUnit + ". Unit must be sec, min, hour, day, week or mon");	
 		}	
 	}
 	
