You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/12 17:23:08 UTC

svn commit: r232310 [87/92] - in /beehive/trunk/controls/test: common/ infra/gtlf/ infra/gtlf/xsl/ infra/mantis/ infra/tch/ infra/tch/messages/ infra/tch/runtime/ infra/tch/schema/ perf/ perf/bin/ perf/cases/ perf/ctlsrc/org/apache/beehive/controls/per...

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/GTLFTestResultAdapter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/GTLFTestResultAdapter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/GTLFTestResultAdapter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/GTLFTestResultAdapter.java Fri Aug 12 08:12:28 2005
@@ -1,396 +1,396 @@
-package org.apache.beehive.test.tools.tch.util.gtlf;
-
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.apache.beehive.test.tools.tch.logger.LoggerUtils;
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-import org.apache.beehive.test.tools.tch.util.DomAsMap;
-import org.apache.beehive.test.tools.tch.util.TestResult;
-import org.apache.beehive.test.tools.tch.util.TestResultAdapter;
-import org.apache.beehive.test.tools.tch.util.xml.DomUtils;
-
-/**
- * Like a TestResult, but has GTLF specific methods.
- * <p>
- * 
- * @version 1.0, Feb 3, 2002
- */
-public class GTLFTestResultAdapter
-  extends TestResultAdapter
-  implements GTLFConstants
-{
-
-  public String execTimeFormat = "yyyy-MM-dd hh:mm:ss.S";
-  public static String sep = System.getProperty("line.separator");
-
-  private Map environment = new TreeMap();
-
-  // the following are also stored in parent class, but in their native type
-  // store them as Strings here for more flexibility
-  private String durationStr = null;
-  private String outcomeStr = null;
-  private String timeStampStr = null;
-
-  /**
-  * Init from an existing TestResult object
-  */
-  public void init(TestResult inResult)
-  {
-    setThrowable(inResult.getThrowable());
-
-    setFilterThrowable(inResult.getFilterThrowable());
-
-    // Log validation skips in GTLF as skips for now
-    if (inResult.getType() == VALIDATION_SKIP_LEVEL_INT)
-    {
-      setType(SKIP_LEVEL_INT);
-      setErrorName("Validation Skip");
-    }
-    else
-    {
-      setType(inResult.getType());
-      setErrorName(inResult.getErrorName());
-    }
-
-    setOutcome(inResult.isOutcome());
-    outcomeStr = String.valueOf(isOutcome());
-
-    setTimeStamp(inResult.getTimeStamp());
-    timeStampStr =
-      new java.sql.Timestamp(inResult.getTimeStamp().getTime()).toString();
-
-    setSourcePath(inResult.getSourcePath());
-
-    setOutputMsg(inResult.getOutputMessage());
-
-    setDetails(inResult.getDetails());
-
-    setTestUnitName(inResult.getTestUnitName());
-
-    setName(inResult.getName());
-
-    setReviewState(inResult.getReviewState());
-
-    setBugID(inResult.getBugID());
-
-    setComments(inResult.getComments());
-
-    setTestCaseName(inResult.getTestCaseName());
-
-    setSubtestName(inResult.getSubtestName());
-
-    setCommandLine(inResult.getCommandLine());
-    setWinCommandLine(inResult.getWinCommandLine());
-    setVerboseCommandLine(inResult.getVerboseCommandLine());
-    setVerboseWinCommandLine(inResult.getVerboseWinCommandLine());
-    
-    setReplicationInfo(inResult.getReplicationInfo());
-
-    if (inResult.getParameters() != null)
-    {
-      setParameters(new TreeMap(inResult.getParameters()));
-    }
-
-    if (inResult instanceof GTLFTestResultAdapter)
-    {
-      setEnvironment(((GTLFTestResultAdapter)inResult).getEnvironment());
-    }
-
-    setDuration(inResult.getDuration());
-    durationStr = String.valueOf(inResult.getDuration());
-
-    setResultInfo(inResult.getResultInfo());
-    Iterator i = inResult.getInnerResultsIterator();
-    if (i != null)
-    {
-      while (i.hasNext())
-      {
-        GTLFTestResultAdapter nested = new GTLFTestResultAdapter();
-        nested.clear();
-        nested.init((TestResult)i.next());
-        addInnerResult(nested);
-      }
-    }
-  }
-
-  /**
-   * Init from a Node list - create inner result.
-   */
-  public void init(NodeList l)
-  {
-    clear();
-    for (int length = l.getLength(), i = 0; i < length; i++)
-    {
-      if (i == 0)
-      {
-        init(l.item(i));
-      }
-      else
-      {
-        GTLFTestResultAdapter nested = new GTLFTestResultAdapter();
-        nested.clear();
-        nested.init(l.item(i));
-        addInnerResult(nested);
-      }
-    }
-  }
-
-  /**
-   * Init Result Object from a Node.
-   */
-  public void init(Node n)
-  {
-    Map data = new HashMap();
-    DomAsMap.load(n, data);
-
-    // stuff the test result
-    String s = (String)data.get("#" + PARAM_RESULT_EXECTIME);
-    if (s != null)
-    {
-      try
-      {
-        timeStampStr = s;
-        setTimeStamp(new SimpleDateFormat(execTimeFormat).parse(s));
-      }
-      catch (Exception e)
-      {
-        setTimeStamp(null);
-      }
-    }
-
-    s = (String)data.get("#" + PARAM_RESULT_RESULT);
-    if (s != null)
-      setType(LoggerUtils.asLogLevelInt(s));
-
-    s = (String)data.get("#" + PARAM_RESULT_ISDONE);
-    if (s != null)
-    {
-      outcomeStr = s;
-      setOutcome(Boolean.valueOf(s).booleanValue());
-    }
-
-    s = (String)data.get("#" + PARAM_RESULT_DURATION);
-    if (s != null)
-      try
-      {
-        durationStr = s;
-        setDuration(new Long(s));
-      }
-      catch (NumberFormatException nfe)
-      {
-        setDuration(null);
-      }
-
-    s = (String)data.get("#" + PARAM_RESULT_REVIEWSTATE);
-    if (s != null)
-      setReviewState(s);
-
-    s = (String)data.get("#" + PARAM_RESULT_CRLIST);
-    if (s != null)
-      setBugID(s);
-
-    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_CASE_NAME);
-    if (s != null)
-      setName(s);
-
-    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_UNIT);
-    if (s != null)
-      setTestUnitName(s);
-
-    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_PATH);
-    if (s != null)
-      setSourcePath(s);
-
-    s =
-      (String)data.get(
-        EXECUTION_OUTPUT_ELEMENT + "!1:" + OUTPUT_DETAILS_ELEMENT + "!1");
-    if (s != null)
-      setOutputMsg(s);
-
-    // on to parameters...
-    Map paramsMap = new TreeMap();
-
-    // check if there is an environment
-    int numEnvValues =
-      DomAsMap.getSizeForEntry(
-        data,
-        ENVIRONMENT_ELEMENT + "!1:" + ENV_ATT_ELEMENT);
-    for (int i = 1; i <= numEnvValues; i++)
-    {
-      String key =
-        ENVIRONMENT_ELEMENT + "!1:" + ENV_ATT_ELEMENT + "!" + i + "#";
-      String name = (String)data.get(key + PARAM_NAME);
-      String value = (String)data.get(key + PARAM_VALUE);
-      // save env values in regular params and also in 'environment' map
-      // so they are easy to get later
-      environment.put(name, value);
-    }
-
-    // get other params
-    String params = (String)data.get(TEST_PARAMETERS_ELEMENT + "!1");
-    if (params != null)
-    {
-      StringTokenizer pairsTokenizer = new StringTokenizer(params.trim(), sep);
-      while (pairsTokenizer.hasMoreTokens())
-      {
-        String pair = pairsTokenizer.nextToken().trim();
-        // now split by '='
-        StringTokenizer nameValueSplitter = new StringTokenizer(pair, "=");
-        while (nameValueSplitter.hasMoreTokens())
-        {
-          String name = nameValueSplitter.nextToken();
-          String value = "";
-          // assuming there is always one token here for the value,
-          // just check to make sure
-          if (nameValueSplitter.hasMoreTokens())
-          {
-            value = nameValueSplitter.nextToken();
-          }
-          paramsMap.put(name, value);
-        }
-      }
-    }
-
-    setParameters(paramsMap);
-  }
-
-  /**
-   * Map representation of this Result Object.
-   */
-  public Map toMap()
-  {
-    Map params = new HashMap();
-    // add the usual test result stuff
-    params.put(PARAM_RESULT_RESULT, LoggerUtils.asLogLevelString(getType()));
-    params.put(PARAM_RESULT_EXECTIME, timeStampStr);
-    params.put(PARAM_RESULT_ISDONE, outcomeStr);
-    params.put(PARAM_RESULT_DURATION, durationStr);
-    params.put(PARAM_RESULT_REVIEWSTATE, getReviewState());
-    params.put(PARAM_RESULT_CRLIST, getBugID());
-    params.put(PARAM_TEST_CASE_NAME, getName());
-    params.put(PARAM_TEST_UNIT, getTestUnitName());
-    params.put(PARAM_TEST_PATH, getSourcePath());
-    params.put(TEST_PARAMETERS_ELEMENT, getParameters().toString());
-    params.put(OUTPUT_DETAILS_ELEMENT, getOutputMessage());
-    // ... and the environement ...
-    params.putAll(getEnvironment());
-
-    return params;
-  }
-
-  /**
-   * Get Test Result Environment.
-   */
-  public Map getEnvironment()
-  {
-    return environment;
-  }
-
-  /**
-  * Set Test Result Environment.
-  */
-  public void setEnvironment(Map inMap)
-  {
-    if (inMap != null)
-    {
-      environment.putAll(inMap);
-    }
-  }
-
-  /**
-   * String representation of this Result Object.
-   */
-  public String toString()
-  {
-    StringBuffer buf = new StringBuffer();
-    buf
-      .append(PARAM_RESULT_RESULT)
-      .append(": ")
-      .append(LoggerUtils.asLogLevelString(getType()))
-      .append(sep);
-    buf.append(PARAM_RESULT_EXECTIME).append(": ").append(timeStampStr).append(
-      sep);
-    buf.append(PARAM_RESULT_ISDONE).append(": ").append(outcomeStr).append(sep);
-    buf.append(PARAM_RESULT_DURATION).append(": ").append(durationStr).append(
-      sep);
-    buf
-      .append(PARAM_RESULT_REVIEWSTATE)
-      .append(": ")
-      .append(getReviewState())
-      .append(sep);
-    buf.append(PARAM_RESULT_CRLIST).append(": ").append(getBugID()).append(sep);
-    buf.append(PARAM_TEST_CASE_NAME).append(": ").append(getName()).append(sep);
-    buf.append(PARAM_TEST_UNIT).append(": ").append(getTestUnitName()).append(
-      sep);
-    buf.append(PARAM_TEST_PATH).append(": ").append(getSourcePath()).append(
-      sep);
-    buf.append(TEST_PARAMETERS_ELEMENT).append(": ").append(
-      getParameters()).append(
-      sep);
-    buf.append(ENVIRONMENT_ELEMENT).append(": ").append(
-      getEnvironment()).append(
-      sep);
-    buf.append(OUTPUT_DETAILS_ELEMENT).append(": ").append(getOutputMessage());
-
-    return buf.toString();
-  }
-
-  /**
-   * String representation of this Result Object, less details as toString()
-   */
-  public String toShortString()
-  {
-    StringBuffer buf = new StringBuffer();
-    buf
-      .append(PARAM_RESULT_RESULT)
-      .append(": ")
-      .append(LoggerUtils.asLogLevelString(getType()))
-      .append(sep);
-    buf.append(PARAM_RESULT_EXECTIME).append(": ").append(timeStampStr).append(
-      sep);
-    buf.append(PARAM_TEST_CASE_NAME).append(": ").append(getName()).append(sep);
-    buf.append(PARAM_TEST_UNIT).append(": ").append(getTestUnitName()).append(
-      sep);
-    buf.append(PARAM_TEST_PATH).append(": ").append(getSourcePath()).append(
-      sep);
-    buf.append(ENVIRONMENT_ELEMENT).append(": ").append(
-      getEnvironment()).append(
-      sep);
-
-    return buf.toString();
-  }
-
-  //=========================================================================
-  // Testing
-
-  public static void main(String[] args) throws Exception
-  {
-    if (args.length == 0)
-    {
-      TchUtils.log("Specify GTLF file to read");
-    }
-    else
-    {
-      Document d = DomUtils.instantiateDom(new File(args[0]), true);
-      // get results
-      NodeList nodes = d.getElementsByTagName(TEST_RESULT_ELEMENT);
-      if (nodes.getLength() > 0)
-      {
-        TchUtils.log("Found some " + TEST_RESULT_ELEMENT + "(s)");
-        GTLFTestResultAdapter foo = new GTLFTestResultAdapter();
-        foo.init(nodes);
-        TchUtils.log(sep + "Result is: " + foo.toString());
-      }
-    }
-  }
-}
+package org.apache.beehive.test.tools.tch.util.gtlf;
+
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.beehive.test.tools.tch.logger.LoggerUtils;
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+import org.apache.beehive.test.tools.tch.util.DomAsMap;
+import org.apache.beehive.test.tools.tch.util.TestResult;
+import org.apache.beehive.test.tools.tch.util.TestResultAdapter;
+import org.apache.beehive.test.tools.tch.util.xml.DomUtils;
+
+/**
+ * Like a TestResult, but has GTLF specific methods.
+ * <p>
+ * 
+ * @version 1.0, Feb 3, 2002
+ */
+public class GTLFTestResultAdapter
+  extends TestResultAdapter
+  implements GTLFConstants
+{
+
+  public String execTimeFormat = "yyyy-MM-dd hh:mm:ss.S";
+  public static String sep = System.getProperty("line.separator");
+
+  private Map environment = new TreeMap();
+
+  // the following are also stored in parent class, but in their native type
+  // store them as Strings here for more flexibility
+  private String durationStr = null;
+  private String outcomeStr = null;
+  private String timeStampStr = null;
+
+  /**
+  * Init from an existing TestResult object
+  */
+  public void init(TestResult inResult)
+  {
+    setThrowable(inResult.getThrowable());
+
+    setFilterThrowable(inResult.getFilterThrowable());
+
+    // Log validation skips in GTLF as skips for now
+    if (inResult.getType() == VALIDATION_SKIP_LEVEL_INT)
+    {
+      setType(SKIP_LEVEL_INT);
+      setErrorName("Validation Skip");
+    }
+    else
+    {
+      setType(inResult.getType());
+      setErrorName(inResult.getErrorName());
+    }
+
+    setOutcome(inResult.isOutcome());
+    outcomeStr = String.valueOf(isOutcome());
+
+    setTimeStamp(inResult.getTimeStamp());
+    timeStampStr =
+      new java.sql.Timestamp(inResult.getTimeStamp().getTime()).toString();
+
+    setSourcePath(inResult.getSourcePath());
+
+    setOutputMsg(inResult.getOutputMessage());
+
+    setDetails(inResult.getDetails());
+
+    setTestUnitName(inResult.getTestUnitName());
+
+    setName(inResult.getName());
+
+    setReviewState(inResult.getReviewState());
+
+    setBugID(inResult.getBugID());
+
+    setComments(inResult.getComments());
+
+    setTestCaseName(inResult.getTestCaseName());
+
+    setSubtestName(inResult.getSubtestName());
+
+    setCommandLine(inResult.getCommandLine());
+    setWinCommandLine(inResult.getWinCommandLine());
+    setVerboseCommandLine(inResult.getVerboseCommandLine());
+    setVerboseWinCommandLine(inResult.getVerboseWinCommandLine());
+    
+    setReplicationInfo(inResult.getReplicationInfo());
+
+    if (inResult.getParameters() != null)
+    {
+      setParameters(new TreeMap(inResult.getParameters()));
+    }
+
+    if (inResult instanceof GTLFTestResultAdapter)
+    {
+      setEnvironment(((GTLFTestResultAdapter)inResult).getEnvironment());
+    }
+
+    setDuration(inResult.getDuration());
+    durationStr = String.valueOf(inResult.getDuration());
+
+    setResultInfo(inResult.getResultInfo());
+    Iterator i = inResult.getInnerResultsIterator();
+    if (i != null)
+    {
+      while (i.hasNext())
+      {
+        GTLFTestResultAdapter nested = new GTLFTestResultAdapter();
+        nested.clear();
+        nested.init((TestResult)i.next());
+        addInnerResult(nested);
+      }
+    }
+  }
+
+  /**
+   * Init from a Node list - create inner result.
+   */
+  public void init(NodeList l)
+  {
+    clear();
+    for (int length = l.getLength(), i = 0; i < length; i++)
+    {
+      if (i == 0)
+      {
+        init(l.item(i));
+      }
+      else
+      {
+        GTLFTestResultAdapter nested = new GTLFTestResultAdapter();
+        nested.clear();
+        nested.init(l.item(i));
+        addInnerResult(nested);
+      }
+    }
+  }
+
+  /**
+   * Init Result Object from a Node.
+   */
+  public void init(Node n)
+  {
+    Map data = new HashMap();
+    DomAsMap.load(n, data);
+
+    // stuff the test result
+    String s = (String)data.get("#" + PARAM_RESULT_EXECTIME);
+    if (s != null)
+    {
+      try
+      {
+        timeStampStr = s;
+        setTimeStamp(new SimpleDateFormat(execTimeFormat).parse(s));
+      }
+      catch (Exception e)
+      {
+        setTimeStamp(null);
+      }
+    }
+
+    s = (String)data.get("#" + PARAM_RESULT_RESULT);
+    if (s != null)
+      setType(LoggerUtils.asLogLevelInt(s));
+
+    s = (String)data.get("#" + PARAM_RESULT_ISDONE);
+    if (s != null)
+    {
+      outcomeStr = s;
+      setOutcome(Boolean.valueOf(s).booleanValue());
+    }
+
+    s = (String)data.get("#" + PARAM_RESULT_DURATION);
+    if (s != null)
+      try
+      {
+        durationStr = s;
+        setDuration(new Long(s));
+      }
+      catch (NumberFormatException nfe)
+      {
+        setDuration(null);
+      }
+
+    s = (String)data.get("#" + PARAM_RESULT_REVIEWSTATE);
+    if (s != null)
+      setReviewState(s);
+
+    s = (String)data.get("#" + PARAM_RESULT_CRLIST);
+    if (s != null)
+      setBugID(s);
+
+    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_CASE_NAME);
+    if (s != null)
+      setName(s);
+
+    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_UNIT);
+    if (s != null)
+      setTestUnitName(s);
+
+    s = (String)data.get(TEST_CASE_ELEMENT + "!1#" + PARAM_TEST_PATH);
+    if (s != null)
+      setSourcePath(s);
+
+    s =
+      (String)data.get(
+        EXECUTION_OUTPUT_ELEMENT + "!1:" + OUTPUT_DETAILS_ELEMENT + "!1");
+    if (s != null)
+      setOutputMsg(s);
+
+    // on to parameters...
+    Map paramsMap = new TreeMap();
+
+    // check if there is an environment
+    int numEnvValues =
+      DomAsMap.getSizeForEntry(
+        data,
+        ENVIRONMENT_ELEMENT + "!1:" + ENV_ATT_ELEMENT);
+    for (int i = 1; i <= numEnvValues; i++)
+    {
+      String key =
+        ENVIRONMENT_ELEMENT + "!1:" + ENV_ATT_ELEMENT + "!" + i + "#";
+      String name = (String)data.get(key + PARAM_NAME);
+      String value = (String)data.get(key + PARAM_VALUE);
+      // save env values in regular params and also in 'environment' map
+      // so they are easy to get later
+      environment.put(name, value);
+    }
+
+    // get other params
+    String params = (String)data.get(TEST_PARAMETERS_ELEMENT + "!1");
+    if (params != null)
+    {
+      StringTokenizer pairsTokenizer = new StringTokenizer(params.trim(), sep);
+      while (pairsTokenizer.hasMoreTokens())
+      {
+        String pair = pairsTokenizer.nextToken().trim();
+        // now split by '='
+        StringTokenizer nameValueSplitter = new StringTokenizer(pair, "=");
+        while (nameValueSplitter.hasMoreTokens())
+        {
+          String name = nameValueSplitter.nextToken();
+          String value = "";
+          // assuming there is always one token here for the value,
+          // just check to make sure
+          if (nameValueSplitter.hasMoreTokens())
+          {
+            value = nameValueSplitter.nextToken();
+          }
+          paramsMap.put(name, value);
+        }
+      }
+    }
+
+    setParameters(paramsMap);
+  }
+
+  /**
+   * Map representation of this Result Object.
+   */
+  public Map toMap()
+  {
+    Map params = new HashMap();
+    // add the usual test result stuff
+    params.put(PARAM_RESULT_RESULT, LoggerUtils.asLogLevelString(getType()));
+    params.put(PARAM_RESULT_EXECTIME, timeStampStr);
+    params.put(PARAM_RESULT_ISDONE, outcomeStr);
+    params.put(PARAM_RESULT_DURATION, durationStr);
+    params.put(PARAM_RESULT_REVIEWSTATE, getReviewState());
+    params.put(PARAM_RESULT_CRLIST, getBugID());
+    params.put(PARAM_TEST_CASE_NAME, getName());
+    params.put(PARAM_TEST_UNIT, getTestUnitName());
+    params.put(PARAM_TEST_PATH, getSourcePath());
+    params.put(TEST_PARAMETERS_ELEMENT, getParameters().toString());
+    params.put(OUTPUT_DETAILS_ELEMENT, getOutputMessage());
+    // ... and the environement ...
+    params.putAll(getEnvironment());
+
+    return params;
+  }
+
+  /**
+   * Get Test Result Environment.
+   */
+  public Map getEnvironment()
+  {
+    return environment;
+  }
+
+  /**
+  * Set Test Result Environment.
+  */
+  public void setEnvironment(Map inMap)
+  {
+    if (inMap != null)
+    {
+      environment.putAll(inMap);
+    }
+  }
+
+  /**
+   * String representation of this Result Object.
+   */
+  public String toString()
+  {
+    StringBuffer buf = new StringBuffer();
+    buf
+      .append(PARAM_RESULT_RESULT)
+      .append(": ")
+      .append(LoggerUtils.asLogLevelString(getType()))
+      .append(sep);
+    buf.append(PARAM_RESULT_EXECTIME).append(": ").append(timeStampStr).append(
+      sep);
+    buf.append(PARAM_RESULT_ISDONE).append(": ").append(outcomeStr).append(sep);
+    buf.append(PARAM_RESULT_DURATION).append(": ").append(durationStr).append(
+      sep);
+    buf
+      .append(PARAM_RESULT_REVIEWSTATE)
+      .append(": ")
+      .append(getReviewState())
+      .append(sep);
+    buf.append(PARAM_RESULT_CRLIST).append(": ").append(getBugID()).append(sep);
+    buf.append(PARAM_TEST_CASE_NAME).append(": ").append(getName()).append(sep);
+    buf.append(PARAM_TEST_UNIT).append(": ").append(getTestUnitName()).append(
+      sep);
+    buf.append(PARAM_TEST_PATH).append(": ").append(getSourcePath()).append(
+      sep);
+    buf.append(TEST_PARAMETERS_ELEMENT).append(": ").append(
+      getParameters()).append(
+      sep);
+    buf.append(ENVIRONMENT_ELEMENT).append(": ").append(
+      getEnvironment()).append(
+      sep);
+    buf.append(OUTPUT_DETAILS_ELEMENT).append(": ").append(getOutputMessage());
+
+    return buf.toString();
+  }
+
+  /**
+   * String representation of this Result Object, less details as toString()
+   */
+  public String toShortString()
+  {
+    StringBuffer buf = new StringBuffer();
+    buf
+      .append(PARAM_RESULT_RESULT)
+      .append(": ")
+      .append(LoggerUtils.asLogLevelString(getType()))
+      .append(sep);
+    buf.append(PARAM_RESULT_EXECTIME).append(": ").append(timeStampStr).append(
+      sep);
+    buf.append(PARAM_TEST_CASE_NAME).append(": ").append(getName()).append(sep);
+    buf.append(PARAM_TEST_UNIT).append(": ").append(getTestUnitName()).append(
+      sep);
+    buf.append(PARAM_TEST_PATH).append(": ").append(getSourcePath()).append(
+      sep);
+    buf.append(ENVIRONMENT_ELEMENT).append(": ").append(
+      getEnvironment()).append(
+      sep);
+
+    return buf.toString();
+  }
+
+  //=========================================================================
+  // Testing
+
+  public static void main(String[] args) throws Exception
+  {
+    if (args.length == 0)
+    {
+      TchUtils.log("Specify GTLF file to read");
+    }
+    else
+    {
+      Document d = DomUtils.instantiateDom(new File(args[0]), true);
+      // get results
+      NodeList nodes = d.getElementsByTagName(TEST_RESULT_ELEMENT);
+      if (nodes.getLength() > 0)
+      {
+        TchUtils.log("Found some " + TEST_RESULT_ELEMENT + "(s)");
+        GTLFTestResultAdapter foo = new GTLFTestResultAdapter();
+        foo.init(nodes);
+        TchUtils.log(sep + "Result is: " + foo.toString());
+      }
+    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/GTLFTestResultAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/RealtimeLogGTLFValidator.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/RealtimeLogGTLFValidator.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/RealtimeLogGTLFValidator.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/RealtimeLogGTLFValidator.java Fri Aug 12 08:12:28 2005
@@ -1,58 +1,58 @@
-package org.apache.beehive.test.tools.tch.util.gtlf;
-
-import java.security.InvalidParameterException;
-import java.util.Map;
-
-import org.apache.beehive.test.tools.tch.util.AbstractResultProcessor;
-import org.apache.beehive.test.tools.tch.util.ParamValidator;
-import org.apache.beehive.test.tools.tch.util.TestResult;
-
-/**
- *
- */
-public class RealtimeLogGTLFValidator
-  extends AbstractResultProcessor
-  implements GTLFConstants {
-
-  private ParamValidator headerValidator = null;
-  private ParamValidator resultValidator = null;
-
-  public TestResult processResult(TestResult inResult) {
-    GTLFTestResultAdapter res = null;
-    if (inResult != null) {
-      try {
-        res = (GTLFTestResultAdapter)inResult;
-      } catch (ClassCastException cce) {
-        // TestResult must be instance of GTLFTestResultAdapter
-        ex = cce;
-      }
-      resultValidator.setValidatingSubject(res);
-      boolean valid = resultValidator.validate(res.toMap(), true);
-      if (!valid) { 
-	// borrow this exception from Java for now since its name fits well
-        ex = new InvalidParameterException("GTLF Result Validation failed");
-      }
-    }
-    if (res == null)  
-      return null;
-    return super.processResult(res);
-  }
-
-  public Map processGeneric(Map inMap) {
-    headerValidator.setValidatingSubject(inMap);
-    boolean valid = headerValidator.validate(inMap, true);
-    if (!valid) { 
-      ex = new InvalidParameterException("GTLF Header Validation failed");
-    }
-    return super.processGeneric(inMap);
-  }
-
-  public void setResultValidator(ParamValidator inValidator) {
-    resultValidator = inValidator;
-  }
-
-  public void setHeaderValidator(ParamValidator inValidator) {
-    headerValidator = inValidator;
-  }
-}
-
+package org.apache.beehive.test.tools.tch.util.gtlf;
+
+import java.security.InvalidParameterException;
+import java.util.Map;
+
+import org.apache.beehive.test.tools.tch.util.AbstractResultProcessor;
+import org.apache.beehive.test.tools.tch.util.ParamValidator;
+import org.apache.beehive.test.tools.tch.util.TestResult;
+
+/**
+ *
+ */
+public class RealtimeLogGTLFValidator
+  extends AbstractResultProcessor
+  implements GTLFConstants {
+
+  private ParamValidator headerValidator = null;
+  private ParamValidator resultValidator = null;
+
+  public TestResult processResult(TestResult inResult) {
+    GTLFTestResultAdapter res = null;
+    if (inResult != null) {
+      try {
+        res = (GTLFTestResultAdapter)inResult;
+      } catch (ClassCastException cce) {
+        // TestResult must be instance of GTLFTestResultAdapter
+        ex = cce;
+      }
+      resultValidator.setValidatingSubject(res);
+      boolean valid = resultValidator.validate(res.toMap(), true);
+      if (!valid) { 
+	// borrow this exception from Java for now since its name fits well
+        ex = new InvalidParameterException("GTLF Result Validation failed");
+      }
+    }
+    if (res == null)  
+      return null;
+    return super.processResult(res);
+  }
+
+  public Map processGeneric(Map inMap) {
+    headerValidator.setValidatingSubject(inMap);
+    boolean valid = headerValidator.validate(inMap, true);
+    if (!valid) { 
+      ex = new InvalidParameterException("GTLF Header Validation failed");
+    }
+    return super.processGeneric(inMap);
+  }
+
+  public void setResultValidator(ParamValidator inValidator) {
+    resultValidator = inValidator;
+  }
+
+  public void setHeaderValidator(ParamValidator inValidator) {
+    headerValidator = inValidator;
+  }
+}
+

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/gtlf/RealtimeLogGTLFValidator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/AbstractDelegationPrintWriter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/AbstractDelegationPrintWriter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/AbstractDelegationPrintWriter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/AbstractDelegationPrintWriter.java Fri Aug 12 08:12:28 2005
@@ -1,34 +1,34 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.PrintWriter;
-
-public abstract class AbstractDelegationPrintWriter
-  extends PrintWriter
-{
-  private PrintWriter printWriter = null;
-
-  public AbstractDelegationPrintWriter(PrintWriter inPrintWriter)
-  {
-    super(inPrintWriter);
-    printWriter = inPrintWriter;
-  }
-
-  public void print(String s)
-  {
-    doSomething(s);
-    printWriter.print(s);
-    printWriter.flush();
-  }
-
-  public void println(String s)
-  {
-    doSomething(s);
-    printWriter.println(s);
-    printWriter.flush();
-  }
-
-  protected abstract void doSomething(String in);
-}
-
-
-
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.PrintWriter;
+
+public abstract class AbstractDelegationPrintWriter
+  extends PrintWriter
+{
+  private PrintWriter printWriter = null;
+
+  public AbstractDelegationPrintWriter(PrintWriter inPrintWriter)
+  {
+    super(inPrintWriter);
+    printWriter = inPrintWriter;
+  }
+
+  public void print(String s)
+  {
+    doSomething(s);
+    printWriter.print(s);
+    printWriter.flush();
+  }
+
+  public void println(String s)
+  {
+    doSomething(s);
+    printWriter.println(s);
+    printWriter.flush();
+  }
+
+  protected abstract void doSomething(String in);
+}
+
+
+

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/AbstractDelegationPrintWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/CompositeOutputStream.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/CompositeOutputStream.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/CompositeOutputStream.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/CompositeOutputStream.java Fri Aug 12 08:12:28 2005
@@ -1,72 +1,72 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- * Composite.
- * 
- */
-public class CompositeOutputStream extends OutputStream
-{
-  // Collection of OutputStream Objects
-  private Collection outputStreams = new ArrayList();
-
-  public CompositeOutputStream()
-  {
-  }
-
-  public CompositeOutputStream(OutputStream[] streams)
-  {
-    for (int i = 0; i < streams.length; i++)
-      addOutputStream(streams[i]);  
-  }
-
-  public void addOutputStream(OutputStream in)
-  {
-    outputStreams.add(in);
-  }
-
-  public void close() throws java.io.IOException
-  {
-    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
-    {
-      ((OutputStream)iter.next()).close();
-    }
-  }
-
-  public void flush() throws java.io.IOException
-  {
-    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
-    {
-      ((OutputStream)iter.next()).flush();
-    }
-  }
-
-  public void write(byte[] b) throws java.io.IOException
-  {
-    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
-    {
-      ((OutputStream)iter.next()).write(b);
-    }
-  }
-
-  public void write(byte[] b, int off, int len) throws java.io.IOException
-  {
-    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
-    {
-      ((OutputStream)iter.next()).write(b, off, len);
-    }
-  }
-
-  public void write(int b) throws java.io.IOException
-  {
-    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
-    {
-      ((OutputStream)iter.next()).write(b);
-    }
-  }
-
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * Composite.
+ * 
+ */
+public class CompositeOutputStream extends OutputStream
+{
+  // Collection of OutputStream Objects
+  private Collection outputStreams = new ArrayList();
+
+  public CompositeOutputStream()
+  {
+  }
+
+  public CompositeOutputStream(OutputStream[] streams)
+  {
+    for (int i = 0; i < streams.length; i++)
+      addOutputStream(streams[i]);  
+  }
+
+  public void addOutputStream(OutputStream in)
+  {
+    outputStreams.add(in);
+  }
+
+  public void close() throws java.io.IOException
+  {
+    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
+    {
+      ((OutputStream)iter.next()).close();
+    }
+  }
+
+  public void flush() throws java.io.IOException
+  {
+    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
+    {
+      ((OutputStream)iter.next()).flush();
+    }
+  }
+
+  public void write(byte[] b) throws java.io.IOException
+  {
+    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
+    {
+      ((OutputStream)iter.next()).write(b);
+    }
+  }
+
+  public void write(byte[] b, int off, int len) throws java.io.IOException
+  {
+    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
+    {
+      ((OutputStream)iter.next()).write(b, off, len);
+    }
+  }
+
+  public void write(int b) throws java.io.IOException
+  {
+    for (Iterator iter = outputStreams.iterator(); iter.hasNext();)
+    {
+      ((OutputStream)iter.next()).write(b);
+    }
+  }
+
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/CompositeOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/Drainer.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/Drainer.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/Drainer.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/Drainer.java Fri Aug 12 08:12:28 2005
@@ -1,62 +1,62 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-
-/**
- * A helper class typically used for draining a java.lang.Process's output and 
- * error streams.
- *
- */
-
-public class Drainer 
-  implements Runnable
-{
-
-  // ============================================================
-  // Variables
-  
-  private PrintWriter printWriter = null;
-  private InputStream inputStream = null;
-  private boolean verbose = false;
-
-  // ============================================================
-  // Constructors
-
-  public Drainer(InputStream inInputStream, PrintWriter inPrintWriter)
-  {
-  	this(inInputStream, inPrintWriter, false);
-  }
-
-  public Drainer(InputStream inInputStream, PrintWriter inPrintWriter, boolean inVerbose) 
-  {
-  	verbose = inVerbose;
-    inputStream = inInputStream;
-    printWriter = inPrintWriter;
-    if (verbose)
-	  System.out.println("Instantiating drainer with input stream: " + inputStream.getClass().getName());
-  }
-
-  // ============================================================
-  // Thread implementation
-  
-  public void run() 
-  {
-    String line;
-    BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
-    try 
-    {
-      while((line = br.readLine()) != null) 
-      {
-        printWriter.println(line);
-        printWriter.flush();
-      }
-    } catch(IOException ioe) 
-    {
-      ioe.printStackTrace();
-    }
-  }
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+
+/**
+ * A helper class typically used for draining a java.lang.Process's output and 
+ * error streams.
+ *
+ */
+
+public class Drainer 
+  implements Runnable
+{
+
+  // ============================================================
+  // Variables
+  
+  private PrintWriter printWriter = null;
+  private InputStream inputStream = null;
+  private boolean verbose = false;
+
+  // ============================================================
+  // Constructors
+
+  public Drainer(InputStream inInputStream, PrintWriter inPrintWriter)
+  {
+  	this(inInputStream, inPrintWriter, false);
+  }
+
+  public Drainer(InputStream inInputStream, PrintWriter inPrintWriter, boolean inVerbose) 
+  {
+  	verbose = inVerbose;
+    inputStream = inInputStream;
+    printWriter = inPrintWriter;
+    if (verbose)
+	  System.out.println("Instantiating drainer with input stream: " + inputStream.getClass().getName());
+  }
+
+  // ============================================================
+  // Thread implementation
+  
+  public void run() 
+  {
+    String line;
+    BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
+    try 
+    {
+      while((line = br.readLine()) != null) 
+      {
+        printWriter.println(line);
+        printWriter.flush();
+      }
+    } catch(IOException ioe) 
+    {
+      ioe.printStackTrace();
+    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/Drainer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/MemPrintWriter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/MemPrintWriter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/MemPrintWriter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/MemPrintWriter.java Fri Aug 12 08:12:28 2005
@@ -1,39 +1,39 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.PrintWriter;
-
-import org.apache.beehive.test.tools.tch.util.FixedLengthQueue;
-
-public class MemPrintWriter 
-  extends AbstractDelegationPrintWriter
-{
-  private FixedLengthQueue queue = null;
-
-  public MemPrintWriter(PrintWriter out, int capacity)
-  {
-    this(out, new FixedLengthQueue(capacity));
-  }
-
-  public MemPrintWriter(PrintWriter out, FixedLengthQueue inQueue)
-  {
-    super(out);
-    queue = inQueue;
-  }
-
-  public String[] toArray()
-  {
-    String[] output = new String[queue.size()];
-    return (String[])queue.toArray(output);
-  }
-
-  public String toString()
-  {
-    return queue.toString();
-  }
-  
-  protected void doSomething(String in)
-  {
-    queue.enqueue(in);
-  }
-
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.PrintWriter;
+
+import org.apache.beehive.test.tools.tch.util.FixedLengthQueue;
+
+public class MemPrintWriter 
+  extends AbstractDelegationPrintWriter
+{
+  private FixedLengthQueue queue = null;
+
+  public MemPrintWriter(PrintWriter out, int capacity)
+  {
+    this(out, new FixedLengthQueue(capacity));
+  }
+
+  public MemPrintWriter(PrintWriter out, FixedLengthQueue inQueue)
+  {
+    super(out);
+    queue = inQueue;
+  }
+
+  public String[] toArray()
+  {
+    String[] output = new String[queue.size()];
+    return (String[])queue.toArray(output);
+  }
+
+  public String toString()
+  {
+    return queue.toString();
+  }
+  
+  protected void doSomething(String in)
+  {
+    queue.enqueue(in);
+  }
+
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/MemPrintWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NoOpOutputStream.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NoOpOutputStream.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NoOpOutputStream.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NoOpOutputStream.java Fri Aug 12 08:12:28 2005
@@ -1,16 +1,16 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.OutputStream;
-
-/**
- * Provides no-op operations for an OutputStream.
- */
-public  class NoOpOutputStream
-  extends OutputStream
-{
-  public void close() {}
-  public void flush() {} 
-  public void write(byte[] b) {} 
-  public void write(byte[] b, int off, int len) {} 
-  public void write(int b) {} 
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.OutputStream;
+
+/**
+ * Provides no-op operations for an OutputStream.
+ */
+public  class NoOpOutputStream
+  extends OutputStream
+{
+  public void close() {}
+  public void flush() {} 
+  public void write(byte[] b) {} 
+  public void write(byte[] b, int off, int len) {} 
+  public void write(int b) {} 
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NoOpOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NotifyPrintWriter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NotifyPrintWriter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NotifyPrintWriter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NotifyPrintWriter.java Fri Aug 12 08:12:28 2005
@@ -1,50 +1,50 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.Map;
-
-public class NotifyPrintWriter
-  extends AbstractDelegationPrintWriter
-{
-  private Map subscriberMap = null;
-  // Maps 'searchString' String Objects to StreamOutputSubscriber Objects 
-
-  public NotifyPrintWriter(PrintWriter inPrintWriter)
-  {
-    this(inPrintWriter, null);
-  }
-
-  public NotifyPrintWriter(PrintWriter inPrintWriter, Map inSubscriberMap)
-  {
-    super(inPrintWriter);
-    subscriberMap = inSubscriberMap;
-  }
-
-  public void registerSubscriber(OutputStreamSubscriber inSubscriber,
-                                 String inSearchString)
-  {
-    subscriberMap.put(inSearchString, inSubscriber);
-  }
-
-  public void setSubscriberMap(Map in)
-  {
-    subscriberMap = in;
-  }
-
-  protected void doSomething(String in)
-  {
-    if (subscriberMap != null)
-    {
-      for (Iterator iter = subscriberMap.entrySet().iterator(); iter.hasNext();)
-      {
-        Map.Entry entry = (Map.Entry)iter.next();      
-        if (in.indexOf((String)entry.getKey()) > -1)
-          ((OutputStreamSubscriber)entry.getValue()).notifyStreamOutput(in);
-      }
-    }
-  }
-}
-
-
-
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Map;
+
+public class NotifyPrintWriter
+  extends AbstractDelegationPrintWriter
+{
+  private Map subscriberMap = null;
+  // Maps 'searchString' String Objects to StreamOutputSubscriber Objects 
+
+  public NotifyPrintWriter(PrintWriter inPrintWriter)
+  {
+    this(inPrintWriter, null);
+  }
+
+  public NotifyPrintWriter(PrintWriter inPrintWriter, Map inSubscriberMap)
+  {
+    super(inPrintWriter);
+    subscriberMap = inSubscriberMap;
+  }
+
+  public void registerSubscriber(OutputStreamSubscriber inSubscriber,
+                                 String inSearchString)
+  {
+    subscriberMap.put(inSearchString, inSubscriber);
+  }
+
+  public void setSubscriberMap(Map in)
+  {
+    subscriberMap = in;
+  }
+
+  protected void doSomething(String in)
+  {
+    if (subscriberMap != null)
+    {
+      for (Iterator iter = subscriberMap.entrySet().iterator(); iter.hasNext();)
+      {
+        Map.Entry entry = (Map.Entry)iter.next();      
+        if (in.indexOf((String)entry.getKey()) > -1)
+          ((OutputStreamSubscriber)entry.getValue()).notifyStreamOutput(in);
+      }
+    }
+  }
+}
+
+
+

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/NotifyPrintWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriber.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriber.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriber.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriber.java Fri Aug 12 08:12:28 2005
@@ -1,6 +1,6 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-public interface OutputStreamSubscriber
-{
-  public void notifyStreamOutput(String streamOutput);
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+public interface OutputStreamSubscriber
+{
+  public void notifyStreamOutput(String streamOutput);
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriberAdapter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriberAdapter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriberAdapter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriberAdapter.java Fri Aug 12 08:12:28 2005
@@ -1,39 +1,39 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.rmi.RemoteException;
-
-/**
- * Adapter: OutputStreamSubscriber --> RemoteOutputStreamSubscriber
- *  
- */
-public class OutputStreamSubscriberAdapter
-  implements OutputStreamSubscriber
-{
-
-  private RemoteOutputStreamSubscriber remoteOutputStreamSubscriber = null;
-
-  public OutputStreamSubscriberAdapter(OutputStreamSubscriber in)
-  {
-    try
-    {
-      remoteOutputStreamSubscriber = 
-        new RemoteOutputStreamSubscriberAdapter(in);
-    } catch (RemoteException ex)
-    {
-      // won't happen
-      ex.printStackTrace();
-    }
-  }
-
-  public void notifyStreamOutput(String streamOutput)
-  {
-    try 
-    {
-      remoteOutputStreamSubscriber.notifyStreamOutput(streamOutput);
-    } catch (RemoteException ex)
-    {
-      // might happen, if it does we won't recover
-      ex.printStackTrace();
-    }
-  }
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.rmi.RemoteException;
+
+/**
+ * Adapter: OutputStreamSubscriber --> RemoteOutputStreamSubscriber
+ *  
+ */
+public class OutputStreamSubscriberAdapter
+  implements OutputStreamSubscriber
+{
+
+  private RemoteOutputStreamSubscriber remoteOutputStreamSubscriber = null;
+
+  public OutputStreamSubscriberAdapter(OutputStreamSubscriber in)
+  {
+    try
+    {
+      remoteOutputStreamSubscriber = 
+        new RemoteOutputStreamSubscriberAdapter(in);
+    } catch (RemoteException ex)
+    {
+      // won't happen
+      ex.printStackTrace();
+    }
+  }
+
+  public void notifyStreamOutput(String streamOutput)
+  {
+    try 
+    {
+      remoteOutputStreamSubscriber.notifyStreamOutput(streamOutput);
+    } catch (RemoteException ex)
+    {
+      // might happen, if it does we won't recover
+      ex.printStackTrace();
+    }
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/OutputStreamSubscriberAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriber.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriber.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriber.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriber.java Fri Aug 12 08:12:28 2005
@@ -1,11 +1,11 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface RemoteOutputStreamSubscriber
-  extends Remote
-{
-  public void notifyStreamOutput(String streamOutput)
-    throws RemoteException;
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface RemoteOutputStreamSubscriber
+  extends Remote
+{
+  public void notifyStreamOutput(String streamOutput)
+    throws RemoteException;
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriber.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriberAdapter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriberAdapter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriberAdapter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriberAdapter.java Fri Aug 12 08:12:28 2005
@@ -1,28 +1,28 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-
-/**
- * Adapter: RemoteOutputStreamSubscriber --> OutputStreamSubscriber
- *  
- */
-public class RemoteOutputStreamSubscriberAdapter
-  extends UnicastRemoteObject
-  implements RemoteOutputStreamSubscriber
-{
-
-  private OutputStreamSubscriber outputStreamSubscriber = null;
-
-  public RemoteOutputStreamSubscriberAdapter(OutputStreamSubscriber in)
-    throws RemoteException
-  {
-    outputStreamSubscriber = in;
-  }
-
-  public void notifyStreamOutput(String streamOutput)
-    throws RemoteException
-  {
-    outputStreamSubscriber.notifyStreamOutput(streamOutput);
-  }
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+/**
+ * Adapter: RemoteOutputStreamSubscriber --> OutputStreamSubscriber
+ *  
+ */
+public class RemoteOutputStreamSubscriberAdapter
+  extends UnicastRemoteObject
+  implements RemoteOutputStreamSubscriber
+{
+
+  private OutputStreamSubscriber outputStreamSubscriber = null;
+
+  public RemoteOutputStreamSubscriberAdapter(OutputStreamSubscriber in)
+    throws RemoteException
+  {
+    outputStreamSubscriber = in;
+  }
+
+  public void notifyStreamOutput(String streamOutput)
+    throws RemoteException
+  {
+    outputStreamSubscriber.notifyStreamOutput(streamOutput);
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/RemoteOutputStreamSubscriberAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/XMLFileListCopy.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/XMLFileListCopy.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/XMLFileListCopy.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/XMLFileListCopy.java Fri Aug 12 08:12:28 2005
@@ -1,89 +1,89 @@
-package org.apache.beehive.test.tools.tch.util.io;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-import org.apache.beehive.test.tools.tch.util.xml.DomUtils;
-import org.apache.beehive.test.tools.tch.util.xml.NestedXMLProcessingException;
-
-/**
- * Gets filenames from a file and copies these files from some src to some dest.
- * Parses a file that looks somewhat like this:
- * <root>
- *   <file name="foo.xml"/>
- *   <file name="blah.xml"/>
- *   <file name="another-one.txt"/>
- * </root>
- *
- */
-public class XMLFileListCopy
-{
-  private static final String FILE_ELEMENT_NAME = "file";
-  private static final String FILE_NAME_ATTRIBUTE = "name";
-
-  private Document root = null;
-
-  public XMLFileListCopy(File xmlFileList) throws NestedXMLProcessingException
-  {
-    root = DomUtils.instantiateDom(xmlFileList, false);
-  }
-
-  public void copyFiles(File sourceDir, File destDir) throws IOException
-  {
-    NodeList fileEntries = root.getElementsByTagName(FILE_ELEMENT_NAME);
-    int numFileEntries = fileEntries.getLength();
-    for (int i = 0; i < numFileEntries; i++)
-    {
-      Node fileEntry = fileEntries.item(i);
-      String fileName =
-        fileEntry
-          .getAttributes()
-          .getNamedItem(FILE_NAME_ATTRIBUTE)
-          .getNodeValue();
-      TchUtils.copyFile(
-        new File(sourceDir, fileName),
-        new File(destDir, fileName));
-    }
-  }
-
-  //=======================================================================
-  //testing
-
-  public static void main(String[] args) throws Exception
-  {
-    String projectHome =
-      org.apache.beehive.test.tools.tch.util.env.Environment.get("BLACK_HOME");
-    String src = org.apache.beehive.test.tools.tch.util.env.Environment.get("BLACK_SRC");
-    XMLFileListCopy xcopy =
-      new XMLFileListCopy(
-        new File(
-          projectHome
-            + "/"
-            + src
-            + "/"
-            + "java/"
-            + "org/"
-            + "apache/"
-            + "beehive/"
-	    + "tch/"
-            + "util/"
-            + "io/"
-            + "file-list.xml"));
-    xcopy.copyFiles(new File("."), new File("foo"));
-  }
-}
-
-class LogLevel
-{
-  static LogLevel MAX_LOG_LEVEL = new LogLevel(),
-    MED_LOG_LEVEL = new LogLevel(),
-    MIN_LOG_LEVEL = new LogLevel();
-  private LogLevel()
-  {
-  }
-}
+package org.apache.beehive.test.tools.tch.util.io;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+import org.apache.beehive.test.tools.tch.util.xml.DomUtils;
+import org.apache.beehive.test.tools.tch.util.xml.NestedXMLProcessingException;
+
+/**
+ * Gets filenames from a file and copies these files from some src to some dest.
+ * Parses a file that looks somewhat like this:
+ * <root>
+ *   <file name="foo.xml"/>
+ *   <file name="blah.xml"/>
+ *   <file name="another-one.txt"/>
+ * </root>
+ *
+ */
+public class XMLFileListCopy
+{
+  private static final String FILE_ELEMENT_NAME = "file";
+  private static final String FILE_NAME_ATTRIBUTE = "name";
+
+  private Document root = null;
+
+  public XMLFileListCopy(File xmlFileList) throws NestedXMLProcessingException
+  {
+    root = DomUtils.instantiateDom(xmlFileList, false);
+  }
+
+  public void copyFiles(File sourceDir, File destDir) throws IOException
+  {
+    NodeList fileEntries = root.getElementsByTagName(FILE_ELEMENT_NAME);
+    int numFileEntries = fileEntries.getLength();
+    for (int i = 0; i < numFileEntries; i++)
+    {
+      Node fileEntry = fileEntries.item(i);
+      String fileName =
+        fileEntry
+          .getAttributes()
+          .getNamedItem(FILE_NAME_ATTRIBUTE)
+          .getNodeValue();
+      TchUtils.copyFile(
+        new File(sourceDir, fileName),
+        new File(destDir, fileName));
+    }
+  }
+
+  //=======================================================================
+  //testing
+
+  public static void main(String[] args) throws Exception
+  {
+    String projectHome =
+      org.apache.beehive.test.tools.tch.util.env.Environment.get("BLACK_HOME");
+    String src = org.apache.beehive.test.tools.tch.util.env.Environment.get("BLACK_SRC");
+    XMLFileListCopy xcopy =
+      new XMLFileListCopy(
+        new File(
+          projectHome
+            + "/"
+            + src
+            + "/"
+            + "java/"
+            + "org/"
+            + "apache/"
+            + "beehive/"
+	    + "tch/"
+            + "util/"
+            + "io/"
+            + "file-list.xml"));
+    xcopy.copyFiles(new File("."), new File("foo"));
+  }
+}
+
+class LogLevel
+{
+  static LogLevel MAX_LOG_LEVEL = new LogLevel(),
+    MED_LOG_LEVEL = new LogLevel(),
+    MIN_LOG_LEVEL = new LogLevel();
+  private LogLevel()
+  {
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/XMLFileListCopy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/file-list.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/file-list.xml?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/file-list.xml (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/file-list.xml Fri Aug 12 08:12:28 2005
@@ -1,4 +1,4 @@
-<root>
-  <file name="setenv.sh"/>
-  <file name="build.xml"/>
+<root>
+  <file name="setenv.sh"/>
+  <file name="build.xml"/>
 </root>

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/io/file-list.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/MilliTimes.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/MilliTimes.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/MilliTimes.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/MilliTimes.java Fri Aug 12 08:12:28 2005
@@ -1,23 +1,23 @@
-package org.apache.beehive.test.tools.tch.util.time;
-
-/**
- * Just some constants that I'm sick of typing.  
- *  
- */
-
-
-public interface MilliTimes {
-
-  // ============================================================
-  // Constants
-  
-  public static final long
-    MILLIS  = 1,
-    SECONDS = MILLIS * 1000,
-    MINUTES = SECONDS * 60,
-    HOURS   = MINUTES * 60,
-    DAYS    = HOURS * 24,
-    WEEKS   = DAYS * 7,
-    MONTHS  = DAYS * 30,  //more or less
-    YEARS   = DAYS * 365; //    " "
-}
+package org.apache.beehive.test.tools.tch.util.time;
+
+/**
+ * Just some constants that I'm sick of typing.  
+ *  
+ */
+
+
+public interface MilliTimes {
+
+  // ============================================================
+  // Constants
+  
+  public static final long
+    MILLIS  = 1,
+    SECONDS = MILLIS * 1000,
+    MINUTES = SECONDS * 60,
+    HOURS   = MINUTES * 60,
+    DAYS    = HOURS * 24,
+    WEEKS   = DAYS * 7,
+    MONTHS  = DAYS * 30,  //more or less
+    YEARS   = DAYS * 365; //    " "
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/MilliTimes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/Time.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/Time.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/Time.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/Time.java Fri Aug 12 08:12:28 2005
@@ -1,117 +1,117 @@
-package org.apache.beehive.test.tools.tch.util.time;
-
-import java.io.Serializable;
-
-/**
- * Convenience wrapper for a representation of an amount of time.  
- * We have a slight problem here right now in that this class is sometimes 
- * used for an absolute amount of time and sometimes for a relative amount.
- *  
- */
-
-public class Time 
-  implements MilliTimes, Cloneable, Serializable 
-{
-
-  // ============================================================
-  // Variables
-
-  private long mMillis;
-  
-  // ============================================================
-  // Constructors
-
-  public Time() {
-    this(now());
-  }
-  
-  public Time(long in) {
-    init(in);
-  }
-
-  public Time(long in, long inUnits) {
-    init(in * inUnits);
-  }
-  
-  public Time(Time in) {
-    init(in.get());
-  }
-
-  // ============================================================
-  // Factory methods
-
-  public static long now() {
-    return System.currentTimeMillis();
-  }
-  
-  public static Time getFuture(Time in) {
-    return getFuture(in.get());
-  }
-
-  public static Time getFuture(long inMillis) {
-    return new Time(inMillis + System.currentTimeMillis());
-  }
-  
-  // ============================================================
-  // Public methods
-
-  public void init(long in) {
-    mMillis = in;
-  }
-  
-  public void setFuture(Time inHowFar) {
-    init(inHowFar.get() + System.currentTimeMillis());
-  }
-  
-  public boolean isPast() {
-    return System.currentTimeMillis() > mMillis;
-  }    
-  
-  public long get() {
-    return mMillis;
-  }
-
-  public long get(long inUnits) {
-    return get() / inUnits;
-  }
-
-
-  public void sleepFor() {
-    try {
-      Thread.sleep(mMillis);
-    } catch(Exception e) {
-      e.printStackTrace();
-    }
-  }
-
-  // ============================================================
-  // Cloneable implementation
-
-  public Object clone() {
-    return new Time(mMillis);
-  }
-  
-  // ============================================================
-  // Object implementation
-
-  public String toString() {
-
-    if (mMillis >= 2 * DAYS) {
-      return mMillis/DAYS + " days";
-    } else
-    
-    if (mMillis >= 2 * HOURS) {
-      return mMillis/HOURS + " hours";
-    } else
-    
-    if (mMillis >= 2 * MINUTES) {
-      return mMillis/MINUTES + " minutes";
-    } else 
-
-    if (mMillis >= 2 * SECONDS) {
-      return mMillis/SECONDS + " seconds";
-    } else
-
-    return mMillis + " milliseconds";
-  }
-}
+package org.apache.beehive.test.tools.tch.util.time;
+
+import java.io.Serializable;
+
+/**
+ * Convenience wrapper for a representation of an amount of time.  
+ * We have a slight problem here right now in that this class is sometimes 
+ * used for an absolute amount of time and sometimes for a relative amount.
+ *  
+ */
+
+public class Time 
+  implements MilliTimes, Cloneable, Serializable 
+{
+
+  // ============================================================
+  // Variables
+
+  private long mMillis;
+  
+  // ============================================================
+  // Constructors
+
+  public Time() {
+    this(now());
+  }
+  
+  public Time(long in) {
+    init(in);
+  }
+
+  public Time(long in, long inUnits) {
+    init(in * inUnits);
+  }
+  
+  public Time(Time in) {
+    init(in.get());
+  }
+
+  // ============================================================
+  // Factory methods
+
+  public static long now() {
+    return System.currentTimeMillis();
+  }
+  
+  public static Time getFuture(Time in) {
+    return getFuture(in.get());
+  }
+
+  public static Time getFuture(long inMillis) {
+    return new Time(inMillis + System.currentTimeMillis());
+  }
+  
+  // ============================================================
+  // Public methods
+
+  public void init(long in) {
+    mMillis = in;
+  }
+  
+  public void setFuture(Time inHowFar) {
+    init(inHowFar.get() + System.currentTimeMillis());
+  }
+  
+  public boolean isPast() {
+    return System.currentTimeMillis() > mMillis;
+  }    
+  
+  public long get() {
+    return mMillis;
+  }
+
+  public long get(long inUnits) {
+    return get() / inUnits;
+  }
+
+
+  public void sleepFor() {
+    try {
+      Thread.sleep(mMillis);
+    } catch(Exception e) {
+      e.printStackTrace();
+    }
+  }
+
+  // ============================================================
+  // Cloneable implementation
+
+  public Object clone() {
+    return new Time(mMillis);
+  }
+  
+  // ============================================================
+  // Object implementation
+
+  public String toString() {
+
+    if (mMillis >= 2 * DAYS) {
+      return mMillis/DAYS + " days";
+    } else
+    
+    if (mMillis >= 2 * HOURS) {
+      return mMillis/HOURS + " hours";
+    } else
+    
+    if (mMillis >= 2 * MINUTES) {
+      return mMillis/MINUTES + " minutes";
+    } else 
+
+    if (mMillis >= 2 * SECONDS) {
+      return mMillis/SECONDS + " seconds";
+    } else
+
+    return mMillis + " milliseconds";
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/time/Time.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/Beautifier.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/Beautifier.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/Beautifier.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/Beautifier.java Fri Aug 12 08:12:28 2005
@@ -1,22 +1,22 @@
-package org.apache.beehive.test.tools.tch.util.xml;
-
-import java.io.File;
-
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-
-public class Beautifier
-{
-  public static void main(String[] args) throws Exception
-  {
-  	File f = new File(args[0]);
-  	System.out.println("Beatifying " + f);
-  	String content =  TchUtils.getContentsAsString(f);
-  	File dest = new File(f.getParent(), "beautiful-" + f.getName());
-  	System.out.println("Wriging to " + dest);
-  	if (!dest.exists())
-  	{
-  	  DomUtils.writeDom(content, dest);
-  	}
-  	System.out.println("Done\n");
-  }
-}
+package org.apache.beehive.test.tools.tch.util.xml;
+
+import java.io.File;
+
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+
+public class Beautifier
+{
+  public static void main(String[] args) throws Exception
+  {
+  	File f = new File(args[0]);
+  	System.out.println("Beatifying " + f);
+  	String content =  TchUtils.getContentsAsString(f);
+  	File dest = new File(f.getParent(), "beautiful-" + f.getName());
+  	System.out.println("Wriging to " + dest);
+  	if (!dest.exists())
+  	{
+  	  DomUtils.writeDom(content, dest);
+  	}
+  	System.out.println("Done\n");
+  }
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/Beautifier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/CircularInheritanceException.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/CircularInheritanceException.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/CircularInheritanceException.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/CircularInheritanceException.java Fri Aug 12 08:12:28 2005
@@ -1,32 +1,32 @@
-package org.apache.beehive.test.tools.tch.util.xml;
-
-
-/**
- */
-public class CircularInheritanceException extends Exception
-{
-  private String elementType = null;
-  private String inheritancePath = null;
-  
-  public CircularInheritanceException(String inElementType, String inInheritancePath)
-  {
-  	elementType = inElementType;
-  	inheritancePath = inInheritancePath;
-  }
-  /**
-   * @return
-   */
-  public String getElementType()
-  {
-    return elementType;
-  }
-
-  /**
-   * @return
-   */
-  public String getInheritancePath()
-  {
-    return inheritancePath;
-  }
-
-}
+package org.apache.beehive.test.tools.tch.util.xml;
+
+
+/**
+ */
+public class CircularInheritanceException extends Exception
+{
+  private String elementType = null;
+  private String inheritancePath = null;
+  
+  public CircularInheritanceException(String inElementType, String inInheritancePath)
+  {
+  	elementType = inElementType;
+  	inheritancePath = inInheritancePath;
+  }
+  /**
+   * @return
+   */
+  public String getElementType()
+  {
+    return elementType;
+  }
+
+  /**
+   * @return
+   */
+  public String getInheritancePath()
+  {
+    return inheritancePath;
+  }
+
+}

Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/util/xml/CircularInheritanceException.java
------------------------------------------------------------------------------
    svn:eol-style = native