various pre-demo tweaks

png3 [2001-06-02 19:35:33]
various pre-demo tweaks
Filename
Metaparser.java
ParserThread.java
SienaListenerThread.java
SmartEventSchema.xsd
SubParser.java
Validator.java
metaparser.properties
schema.xsd
diff --git a/Metaparser.java b/Metaparser.java
index 61860c1..b4a7f68 100644
--- a/Metaparser.java
+++ b/Metaparser.java
@@ -10,7 +10,7 @@ import siena.SienaException;
  *  Creates a SienaListenerThread, and establishes a few
  *  thread intercommunication data structures.
  *  If SienaListener gets a query from the Event Distiller,
- *  it starts a new SEParserThread.  The SEParserThread
+ *  it starts a new ParserThread.  The ParserThread
  *  directs the data input of a subordinate Validator.
  *  This initial Validator validates against the smartevent
  *  schema.  When it encounters an unknown tag, the schema and
@@ -31,7 +31,10 @@ import siena.SienaException;
  *  FleXML PI.  Requires actual streaming validation.
  *
  *  $Log$
- *  Revision 2.5  2001-03-14 08:17:13  png3
+ *  Revision 2.6  2001-06-02 19:35:33  png3
+ *  various pre-demo tweaks
+ *
+ *  Revision 2.5  2001/03/14 08:17:13  png3
  *  various changes towards working demo
  *
  *  Revision 2.4  2001/02/05 06:35:16  png3
@@ -58,7 +61,7 @@ public class Metaparser {
   private static final String fn = "Metaparser";
   // should allow this from command line also...
   private static final String prop = "metaparser.properties";
-  static boolean debug = false;
+  static boolean debug = true;
   private static String seSchema = null;
   static PrintWriter log = null;
   static PrintWriter dbg = null;
diff --git a/ParserThread.java b/ParserThread.java
index 4039c8c..6384174 100644
--- a/ParserThread.java
+++ b/ParserThread.java
@@ -24,7 +24,10 @@ import psl.tagprocessor.TagProcessor;
   * Spawns Validators/SubParsers to validate subcomponents.
   *
   * $Log$
-  * Revision 2.11  2001-04-18 20:12:29  png3
+  * Revision 2.12  2001-06-02 19:35:33  png3
+  * various pre-demo tweaks
+  *
+  * Revision 2.11  2001/04/18 20:12:29  png3
   * synchronization III: insertion of null object unnecessary and removed
   *
   * Revision 2.10  2001/04/18 19:55:18  png3
@@ -71,7 +74,8 @@ class ParserThread extends DefaultHandler
   boolean debug = false;
   int depth = 0;

-  WVM wvm = null;
+  // Demo temp
+  // WVM wvm = null;
   String moduleName = null;

   // for SmartEventSchema
@@ -166,13 +170,12 @@ class ParserThread extends DefaultHandler
       if (moduleName != null) {

 	prDbg(fn+"module "+moduleName+" should be coming");  // debug
-	/*
-	// fake!
+	// DemoTemp
 	prDbg(fn+"waiting for worklet arrival:" + MPUtil.timestamp());
 	Thread.currentThread().sleep(1000);
 	prDbg(fn+"worklet arrived:" + MPUtil.timestamp());
-	*/

+	/*
         synchronized (_wklArrivals) {
 	  if (_wklArrivals.containsKey(requestID)) {
 	    prDbg(fn+"worklet had already arrived:"+
@@ -190,6 +193,7 @@ class ParserThread extends DefaultHandler
 	    prDbg(fn+"worklet arrived:" + d);
 	  }
 	}
+	*/

 	try {
 	// Let Simin work his magic
@@ -230,9 +234,13 @@ class ParserThread extends DefaultHandler

 	prDbg(fn+"Resulting Hashtable is: " + ht);
 	// TODO what's my number?
-	KXNotification edAlert = KXNotification.EDInputKXNotification(
-					"psl.metaparser.ParserThread", 0, ht);
-	slt.publish(edAlert);
+	// Demo Temp
+	AttributeValue av = (AttributeValue)ht.get("Status");
+	if ((av == null) || !(av.stringValue().equals("Running"))) {
+	  KXNotification edAlert = KXNotification.EDInputKXNotification(
+					  "psl.metaparser.ParserThread", 0, ht);
+	  slt.publish(edAlert);
+	}

      }

@@ -244,8 +252,9 @@ class ParserThread extends DefaultHandler
       return;
     }
     prDbg(fn+"shutting down wvm");
-    // don't shutdown if fake
-    wvm.shutdown();
+    // don't shutdown if Demo temp
+    // wvm.shutdown();
+
     if (debug) dbg.println(fn+"Done parsing");
   }

@@ -293,12 +302,11 @@ class ParserThread extends DefaultHandler
       // retrieve subparser
       requestID = String.valueOf(System.currentTimeMillis());

-      prDbg(fn+"creating new WVM("+slt.hostname+","+requestID+")");
-      /*
-      // fake!
+      // Demo temp
+      // prDbg(fn+"creating new WVM("+slt.hostname+","+requestID+")");
       System.out.println("WVM created");
-      */
-      wvm = new WVM(this, slt.hostname, requestID);
+      // Demo temp
+      // wvm = new WVM(this, slt.hostname, requestID);

       Notification n = new Notification();
       n.putAttribute("Hostname", slt.hostname);
@@ -310,13 +318,12 @@ class ParserThread extends DefaultHandler
       n.putAttribute("MPQuery", MPUtil.makeQuery(qName));
       prDbg(fn+"sending request to Oracle:" + n);
       try {
-      /*
-	// fake!
+	// DemoTemp
 	prDbg(fn+"going to sleep: " + MPUtil.timestamp());
 	Thread.currentThread().sleep(1000);
 	prDbg(fn+"awake again: " + MPUtil.timestamp());
 	moduleName="tagprocessor.jar";
-      */
+      /*
 	slt.publish(n);
 	Object lockObj = new Object();
 	Metaparser.waitList.put(requestID, lockObj);
@@ -331,6 +338,7 @@ class ParserThread extends DefaultHandler
 	// XMLSchema subSchema = MPUtil.extractSchema(oracleResp);
 	MPUtil.extractSchema(oracleResp);
 	moduleName = MPUtil.extractModuleName(oracleResp);
+	*/

 	// we have a new schema.  parse it out, suck it in...
 	currentVal = new Validator(xml, new PipedWriter(),
@@ -339,7 +347,7 @@ class ParserThread extends DefaultHandler
 	// mega-hack -- defies description
 	// extracted XML is sitting in file schema.xsd
 	currentVal.send("<"+qName+
-		" xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'" +
+		" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
   		" xsi:noNamespaceSchemaLocation='schema.xsd'>");
       } catch (Exception e) {
 	prLog(fn+"Exception with Oracle communication: " + e);
diff --git a/SienaListenerThread.java b/SienaListenerThread.java
index 2ddc919..1c2cb60 100644
--- a/SienaListenerThread.java
+++ b/SienaListenerThread.java
@@ -10,7 +10,10 @@ import siena.*;
   * Spawns ParserThreads.
   *
   * $Log$
-  * Revision 2.5  2001-03-14 08:17:13  png3
+  * Revision 2.6  2001-06-02 19:35:33  png3
+  * various pre-demo tweaks
+  *
+  * Revision 2.5  2001/03/14 08:17:13  png3
   * various changes towards working demo
   *
   * Revision 2.4  2001/02/05 06:35:16  png3
@@ -49,7 +52,8 @@ class SienaListenerThread implements Runnable {
     this.sienaURL = sienaURL;
     this.log = log;
     this.dbg = dbg;
-    debug = (dbg == null);
+    debug = (dbg != null);
+    System.err.println("SLT started debug = " + debug);

     try {
       hostname = InetAddress.getLocalHost().getHostName();
@@ -57,6 +61,7 @@ class SienaListenerThread implements Runnable {
       log.println("slt_ctor: can't get local host name:" + uhe);
       return;
     }
+    prDbg("SLT starting up");
   }

   // TODO: not thread safe, but we're going to un-Thread this anyway...
@@ -102,10 +107,10 @@ class SienaListenerThread implements Runnable {
     // create filters
     // #1, stuff coming from ED
     Filter f1 = new Filter();
-    f1.addConstraint("Source", "EventDistiller");
+    // f1.addConstraint("Source", "EventDistiller");
     f1.addConstraint("Type", "DataToMetaparser");
     // debug
-    if (dbg != null) dbg.println("adding ED filter " + f1);
+    if (dbg != null) dbg.println("adding DataToMetaparser filter " + f1);
     try {
       synchronized (this) {
 	s.subscribe(f1,
@@ -116,7 +121,7 @@ class SienaListenerThread implements Runnable {
 	);
       }
     } catch (SienaException se) {
-      log.println(fn + ": SienaException adding filter 1:");
+      log.println(fn + ": SienaException adding DataToMetaparserfilter:");
       log.println(se);
       return;
     }
@@ -188,7 +193,7 @@ class SienaListenerThread implements Runnable {
   // synchronized wrapper
   synchronized public void publish(Notification n) {
     final String fn = "SLT_publish: ";
-    if (dbg != null) { dbg.println("publishing " + n); } // debug
+    prDbg("publishing " + n);
     try {
       s.publish(n);
     } catch (SienaException se) {
diff --git a/SmartEventSchema.xsd b/SmartEventSchema.xsd
index 6ac552b..9d50bc3 100644
--- a/SmartEventSchema.xsd
+++ b/SmartEventSchema.xsd
@@ -44,7 +44,7 @@
 	      </element>

 	      <!-- UTC timestamp -->
-	      <element name="time" type="timeInstant"/>
+	      <element name="time" type="string"/>
 	      <!-- tells KX system not to attempt to parse/distill XML -->
 	      <element name="kxOpaque" type="boolean" minOccurs="0"/>
 	      <!-- optional identifying info, e.g. probe name -->
diff --git a/SubParser.java b/SubParser.java
index 5a36f4f..1d9f17f 100644
--- a/SubParser.java
+++ b/SubParser.java
@@ -1,229 +1,232 @@
-package psl.metaparser;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-import org.apache.xerces.parsers.*;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/** Validating subordinate parser thread.
-  *
+package psl.metaparser;
+
+import org.xml.sax.*;
+import org.xml.sax.helpers.*;
+import org.apache.xerces.parsers.*;
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+/** Validating subordinate parser thread.
+  *
   * $Log$
-  * Revision 2.5  2001-02-05 06:35:16  png3
+  * Revision 2.6  2001-06-02 19:35:33  png3
+  * various pre-demo tweaks
+  *
+  * Revision 2.5  2001/02/05 06:35:16  png3
   * Post California version
-  *
-  * Revision 2.4  2001/01/30 10:16:55  png3
-  * Almost working...
-  *
-  * Revision 2.3  2001/01/29 04:04:48  png3
-  * Added package psl.metaparser statements.  Can you say "Oops?"
-  *
-  * Revision 2.2  2001/01/28 17:52:17  png3
-  * New version of Metaparser: fully multithreaded.  PrintWriter logs.
-  *
-  */
-public class SubParser extends DefaultHandler implements Runnable {
-
-  Locator loc;
-  int depth = 0;
-  static final String spc = "  ";
-  PipedReader pr = null;
-  // XMLSchema schema = null;
-  String inst = "";
-  // parent
-  Validator v = null;
-
-  SubParser(PipedWriter pw, String inst,
-  	Validator v) throws IOException {
-
-    final String fn = inst+"_SP_ctor: ";
-
-    this.inst = inst;
-    // schema = s;
-    this.v = v;
-    try {
-      pr = new PipedReader(pw);
-    } catch (IOException ioe) {
-      v.prLog(fn+"Error creating PipedReader:" + ioe);
-      throw ioe;
-    }
-  }
-
-  public void printMsg(String m) {
-    for (int i = 0; i < depth; ++i) {
-      System.err.print(spc);
-    }
-    System.err.println(inst + ": " + m);
-  }
-
-  public void run() {
-
-    final String fn = inst+"_SP_run: ";
-
-    SAXParser p = new SAXParser();
-    try {
-      p.setFeature("http://xml.org/sax/features/validation", true);
-      p.setFeature("http://xml.org/sax/features/namespaces", true);
-      p.setFeature("http://apache.org/xml/features/validation/schema", true);
-    } catch (SAXNotSupportedException snse) {
-      v.prLog(fn+"Feature not supported:" + snse.getMessage());
-      return;
-     } catch (SAXNotRecognizedException snre) {
-      v.prLog(fn+"Exception setting feature:" + snre.getMessage());
-      return;
-    }
-    p.setContentHandler(this);
-    p.setErrorHandler(this);
-
-    v.prDbg(fn+"starting to parse");
-    try {
-      p.parse(new InputSource(pr));
-    } catch (Exception e) {
-      v.prLog(fn+"Exception during parsing:" + e.getMessage());
-      return;
-    }
-    v.prDbg(fn+"Done parsing");
-  }
-
-  public void setDocumentLocator(Locator loc) {
-
-    final String fn = inst+"_SP_setDocLoc: ";
-
-    v.prDbg(fn+"SetDocumentLocator:");
-    this.loc = loc;
-  }
-
-  public void startDocument() {
-
-    final String fn = inst+"_SP_startDoc: ";
-
-    v.prDbg(fn+"StartDocument");
-  }
-
-  public void endDocument() throws SAXException {
-
-    final String fn = inst+"_SP_endDoc: ";
-
-    v.prDbg(fn+"EndDocument");
-  }
-
-  public void startElement(
-          String namespaceURI, String localName, String qName, Attributes atts)
-            throws SAXException {
-
-    final String fn = inst+"_SP_startElm: ";
-
-    v.prDbg(fn+"StartElement (" + MPUtil.printLoc(loc) + "):" + qName);
-    for (int i = 0; i < atts.getLength(); i++) {
-      String aname = atts.getQName(i);
-      String type  = atts.getType(i);
-      String value = atts.getValue(i);
-
-      v.prDbg(fn+"   " + aname + "(" + type + ")" + "=" + value);
-    }
-    ++depth;
-  }
-
-  public void endElement(String namespaceURI, String localName, String qName)
-  	throws SAXException {
-
-    final String fn = inst+"_SP_endElm: ";
-
-    --depth;
-    v.prDbg(fn+"EndElement:" + qName);
-  }
-
-  public void startPrefixMapping(String prefix, String uri) throws SAXException {
-
-    final String fn = inst+"_SP_startPM: ";
-
-    v.prDbg(fn+"startPrefixMapping: prefix:" + prefix);
-    v.prDbg(fn+"\turi:" + uri);
-  }
-
-  public void endPrefixMapping(String prefix) throws SAXException {
-
-    final String fn = inst+"_SP_endPM: ";
-
-    v.prDbg(fn+"EndPrefixMapping:" + prefix);
-  }
-
-  public void skippedEntity(String entity) throws SAXException {
-
-    final String fn = inst+"_SP_skippedEntity: ";
-
-    v.prDbg(fn+"skippedEntity:" + entity);
-  }
-
-  public void characters(char[] cbuf, int start, int len) {
-
-    final String fn = inst+"_SP_CData: ";
-
-    v.prDbg(fn+"Characters:" + new String(cbuf, start, len));
-  }
-
-  public void ignorableWhitespace(char[] cbuf, int start, int len) {
-
-    final String fn = inst+"_SP_WS: ";
-
-    v.prDbg(fn+"IgnorableWhiteSpace");
-  }
-
-  public void processingInstruction(String target, String data)
-          throws SAXException {
-
-    final String fn = inst+"_SP_PI: ";
-
-    v.prDbg(fn+"ProcessingInstruction:" + target + " " + data);
-    if (target.toLowerCase().equals("flexml")) {
-      ++depth;
-      v.prDbg(fn+"Found FleXML tag!");
-      ++depth;
-      StringTokenizer st = new StringTokenizer(data);
-      while (st.hasMoreTokens()) {
-        String piAttr = st.nextToken();
-        StringTokenizer st2 = new StringTokenizer(piAttr, "= \"");
-	if (st2.countTokens() != 2) {
-	  v.prDbg(fn+"Malformed PI Attribute: " + piAttr);
-	} else {
-	  String piaName = st2.nextToken();
-	  String piaVal = st2.nextToken();
-	  printMsg(piaName + " = " + piaVal);
-	  if (piaName.toLowerCase().equals("type")) {
-	    if (piaVal.toLowerCase().equals("schemafrag")) {
-	      ++depth;
-	      v.prDbg(fn+"*** found schemaFrag PI ***");
-	      --depth;
-	    }
-	  }
-	}
-      }
-      depth -= 2;
-    }
-
-  }
-
-  public void warning(SAXParseException e) throws SAXException {
-
-    final String fn = inst+"_SP_warning: ";
-
-    v.prLog(fn+"Warning:" + e.getMessage());
-  }
-
-  public void error(SAXParseException e) throws SAXException {
-
-    final String fn = inst+"_SP_error: ";
-
-    throw new SAXException(e.getMessage());
-  }
-
-  public void fatalError(SAXParseException e) throws SAXException {
-
-    final String fn = inst+"_SP_fatalError: ";
-
-    v.prLog(fn+"Fatal error");
-    throw new SAXException(e.getMessage());
-  }
-
-}
+  *
+  * Revision 2.4  2001/01/30 10:16:55  png3
+  * Almost working...
+  *
+  * Revision 2.3  2001/01/29 04:04:48  png3
+  * Added package psl.metaparser statements.  Can you say "Oops?"
+  *
+  * Revision 2.2  2001/01/28 17:52:17  png3
+  * New version of Metaparser: fully multithreaded.  PrintWriter logs.
+  *
+  */
+public class SubParser extends DefaultHandler implements Runnable {
+
+  Locator loc;
+  int depth = 0;
+  static final String spc = "  ";
+  PipedReader pr = null;
+  // XMLSchema schema = null;
+  String inst = "";
+  // parent
+  Validator v = null;
+
+  SubParser(PipedWriter pw, String inst,
+  	Validator v) throws IOException {
+
+    final String fn = inst+"_SP_ctor: ";
+
+    this.inst = inst;
+    // schema = s;
+    this.v = v;
+    try {
+      pr = new PipedReader(pw);
+    } catch (IOException ioe) {
+      v.prLog(fn+"Error creating PipedReader:" + ioe);
+      throw ioe;
+    }
+  }
+
+  public void printMsg(String m) {
+    for (int i = 0; i < depth; ++i) {
+      System.err.print(spc);
+    }
+    System.err.println(inst + ": " + m);
+  }
+
+  public void run() {
+
+    final String fn = inst+"_SP_run: ";
+
+    SAXParser p = new SAXParser();
+    try {
+      p.setFeature("http://xml.org/sax/features/validation", true);
+      p.setFeature("http://xml.org/sax/features/namespaces", true);
+      p.setFeature("http://apache.org/xml/features/validation/schema", true);
+    } catch (SAXNotSupportedException snse) {
+      v.prLog(fn+"Feature not supported:" + snse.getMessage());
+      return;
+     } catch (SAXNotRecognizedException snre) {
+      v.prLog(fn+"Exception setting feature:" + snre.getMessage());
+      return;
+    }
+    p.setContentHandler(this);
+    p.setErrorHandler(this);
+
+    v.prDbg(fn+"starting to parse");
+    try {
+      p.parse(new InputSource(pr));
+    } catch (Exception e) {
+      v.prLog(fn+"Exception during parsing:" + e.getMessage());
+      return;
+    }
+    v.prDbg(fn+"Done parsing");
+  }
+
+  public void setDocumentLocator(Locator loc) {
+
+    final String fn = inst+"_SP_setDocLoc: ";
+
+    v.prDbg(fn+"SetDocumentLocator:");
+    this.loc = loc;
+  }
+
+  public void startDocument() {
+
+    final String fn = inst+"_SP_startDoc: ";
+
+    v.prDbg(fn+"StartDocument");
+  }
+
+  public void endDocument() throws SAXException {
+
+    final String fn = inst+"_SP_endDoc: ";
+
+    v.prDbg(fn+"EndDocument");
+  }
+
+  public void startElement(
+          String namespaceURI, String localName, String qName, Attributes atts)
+            throws SAXException {
+
+    final String fn = inst+"_SP_startElm: ";
+
+    v.prDbg(fn+"StartElement (" + MPUtil.printLoc(loc) + "):" + qName);
+    for (int i = 0; i < atts.getLength(); i++) {
+      String aname = atts.getQName(i);
+      String type  = atts.getType(i);
+      String value = atts.getValue(i);
+
+      v.prDbg(fn+"   " + aname + "(" + type + ")" + "=" + value);
+    }
+    ++depth;
+  }
+
+  public void endElement(String namespaceURI, String localName, String qName)
+  	throws SAXException {
+
+    final String fn = inst+"_SP_endElm: ";
+
+    --depth;
+    v.prDbg(fn+"EndElement:" + qName);
+  }
+
+  public void startPrefixMapping(String prefix, String uri) throws SAXException {
+
+    final String fn = inst+"_SP_startPM: ";
+
+    v.prDbg(fn+"startPrefixMapping: prefix:" + prefix);
+    v.prDbg(fn+"\turi:" + uri);
+  }
+
+  public void endPrefixMapping(String prefix) throws SAXException {
+
+    final String fn = inst+"_SP_endPM: ";
+
+    v.prDbg(fn+"EndPrefixMapping:" + prefix);
+  }
+
+  public void skippedEntity(String entity) throws SAXException {
+
+    final String fn = inst+"_SP_skippedEntity: ";
+
+    v.prDbg(fn+"skippedEntity:" + entity);
+  }
+
+  public void characters(char[] cbuf, int start, int len) {
+
+    final String fn = inst+"_SP_CData: ";
+
+    v.prDbg(fn+"Characters:" + new String(cbuf, start, len));
+  }
+
+  public void ignorableWhitespace(char[] cbuf, int start, int len) {
+
+    final String fn = inst+"_SP_WS: ";
+
+    v.prDbg(fn+"IgnorableWhiteSpace");
+  }
+
+  public void processingInstruction(String target, String data)
+          throws SAXException {
+
+    final String fn = inst+"_SP_PI: ";
+
+    v.prDbg(fn+"ProcessingInstruction:" + target + " " + data);
+    if (target.toLowerCase().equals("flexml")) {
+      ++depth;
+      v.prDbg(fn+"Found FleXML tag!");
+      ++depth;
+      StringTokenizer st = new StringTokenizer(data);
+      while (st.hasMoreTokens()) {
+        String piAttr = st.nextToken();
+        StringTokenizer st2 = new StringTokenizer(piAttr, "= \"");
+	if (st2.countTokens() != 2) {
+	  v.prDbg(fn+"Malformed PI Attribute: " + piAttr);
+	} else {
+	  String piaName = st2.nextToken();
+	  String piaVal = st2.nextToken();
+	  printMsg(piaName + " = " + piaVal);
+	  if (piaName.toLowerCase().equals("type")) {
+	    if (piaVal.toLowerCase().equals("schemafrag")) {
+	      ++depth;
+	      v.prDbg(fn+"*** found schemaFrag PI ***");
+	      --depth;
+	    }
+	  }
+	}
+      }
+      depth -= 2;
+    }
+
+  }
+
+  public void warning(SAXParseException e) throws SAXException {
+
+    final String fn = inst+"_SP_warning: ";
+
+    v.prLog(fn+"Warning:" + e.getMessage());
+  }
+
+  public void error(SAXParseException e) throws SAXException {
+
+    final String fn = inst+"_SP_error: ";
+
+    throw new SAXException(e.getMessage());
+  }
+
+  public void fatalError(SAXParseException e) throws SAXException {
+
+    final String fn = inst+"_SP_fatalError: ";
+
+    v.prLog(fn+"Fatal error");
+    throw new SAXException(e.getMessage());
+  }
+
+}
diff --git a/Validator.java b/Validator.java
index 14f7f33..d7e44d9 100644
--- a/Validator.java
+++ b/Validator.java
@@ -1,193 +1,196 @@
-package psl.metaparser;
-
-import java.io.*;
-import org.xml.sax.*;
-
-/** Input controller.  Selectively feeds data to a SubParser.
-  *
+package psl.metaparser;
+
+import java.io.*;
+import org.xml.sax.*;
+
+/** Input controller.  Selectively feeds data to a SubParser.
+  *
   * $Log$
-  * Revision 2.4  2001-02-05 06:35:16  png3
+  * Revision 2.5  2001-06-02 19:35:33  png3
+  * various pre-demo tweaks
+  *
+  * Revision 2.4  2001/02/05 06:35:16  png3
   * Post California version
-  *
-  * Revision 2.3  2001/01/30 10:16:55  png3
-  * Almost working...
-  *
-  * Revision 2.2  2001/01/29 04:04:48  png3
-  * Added package psl.metaparser statements.  Can you say "Oops?"
-  *
-  * Revision 2.1  2001/01/28 17:52:17  png3
-  * New version of Metaparser: fully multithreaded.  PrintWriter logs.
-  *
-  */
-class Validator {
-
-  BufferedReader br = null;
-  PipedWriter pos = null;
-  int curLine = 0;
-  int curCol = 0;
-  String buf = null;
-  SubParser sp = null;
-  String inst = null;
-  boolean debug;
-  PrintWriter log = null;
-  PrintWriter dbg = null;
-
-  // used for SubParsers: have we reached the "outermost" tag yet?
-  int depth;
-  String element;
-
-  synchronized void setDepth(int d) {depth = d;}
-  synchronized int getDepth() {return depth;}
-  synchronized void setElement(String e) {element = e;}
-  synchronized String getElement() {return element;}
-
-  synchronized void prLog(String m) {log.println(m);}
-  synchronized void prDbg(String m) {if (debug) dbg.println(m);}
-
-  Validator(String s, PipedWriter o, String inst,
-  	boolean debug)
-    throws IOException {
-
-    final String fn = inst+"_ctor_1: ";
-
-    try {
-      br = new BufferedReader(new StringReader(s));
-      sp = new SubParser(o, inst, this);
-    } catch (IOException ioe) {
-      System.err.println(fn + "I/O Exception:" + ioe);
-      throw ioe;
-    }
-
-    this.debug = debug;
-    try {
-      String f1 = inst+".log";
-      String f2 = inst+".dbg";
-      log = new PrintWriter(new FileWriter(f1), true);
-      log.println("Log started " + MPUtil.timestamp());
-      if (debug) {
-	dbg = new PrintWriter(new FileWriter(f2), true);
-	dbg.println("Debug Log started " + MPUtil.timestamp());
-      }
-    } catch (IOException ioe) {
-      System.err.println(fn + "unable to open log files");
-      System.err.println(ioe);
-      return;
-    }
-
-    this.inst = inst;
-    pos = o;
-    curLine = 0;
-    curCol = 1;
-
-    prDbg(fn+"Starting subParser");
-    Thread t = new Thread(sp);
-    t.start();
-  }
-
-  Validator(String s, PipedWriter o, String inst,
-  	boolean debug, Locator l) throws IOException {
-
-    this(s, o, inst, debug);
-
-    final String fn = inst+"_ctor_2: ";
-
-    skip(l);
-
-    prDbg(fn+"Validator buffer:" + buf);
-    prDbg(fn+"Validator(" + curCol + "):"
-    	+ buf.substring(curCol-1));
-
-  }
-
-  void skip(Locator l) throws IOException {
-
-    final String fn = inst+"_skip: ";
-
-    prDbg(fn+"skip(" + MPUtil.printLoc(l) + ")");
-    int tgtLine = l.getLineNumber();
-    try {
-      while (curLine < tgtLine) {
-        buf = br.readLine();
-	curLine++;
-      }
-    } catch (IOException ioe) {
-      prLog(fn+"Error in skip:"+ioe);
-      throw ioe;
-    }
-    curCol = l.getColumnNumber();
-  }
-
-
-  void send(String s) throws IOException {
-
-    final String fn = inst+"_send: ";
-
-    try {
-      prDbg(fn+"sending:" + s);
-      pos.write(s);
-    } catch (IOException ioe) {
-      prLog(fn+"Error in send:"+ioe);
-      throw ioe;
-    }
-  }
-
-  void flush(Locator l) throws IOException {
-
-    final String fn = inst+"_flush: ";
-
-    int tgtLine = l.getLineNumber();
-    int tgtCol = l.getColumnNumber();
-    // prDbg(fn+"req to flush " + tgtLine +":"+tgtCol);
-    // prDbg(fn+"cur= " + curLine +":"+curCol);
-
-    try {
-      if (tgtLine > curLine) {
-        if (buf != null) {
-	  String s = buf.substring(curCol-1);
-	  prDbg(fn+"flushing:" + s);
-	  pos.write(s);
-	}
-	curCol = 1;
-	while (tgtLine > curLine+1) {
-	  buf = br.readLine();
-	  prDbg(fn+"flushing:" + buf);
-	  pos.write(buf);
-	  curLine++;
-	}
-	buf = br.readLine();
-	curLine++;
-      }
-      // prDbg(fn+"cur= " + curLine +":"+curCol);
-      // prDbg(fn+"buf=" + buf);
-      if (buf != null) {
-        String s =buf.substring(curCol-1, tgtCol-1);
-	prDbg(fn+"flushing:" + s);
-	pos.write(s);
-      }
-      curCol = tgtCol;
-    } catch (IOException ioe) {
-      prLog(fn+"Error in flush:"+ioe);
-      throw ioe;
-    }
-  }
-
-  void close(boolean flush) throws IOException {
-
-    final String fn = inst+"_close: ";
-
-    prDbg(fn+"closing(" + flush + ")");
-    try {
-      if (flush) {
-	String s = buf.substring(curCol-1);
-	prDbg(fn+"flushing:" + s);
-	pos.write(s);
-      }
-      br.close();
-      pos.close();
-    } catch (IOException ioe) {
-      prLog(fn+"Error in close:"+ioe);
-      throw ioe;
-    }
-  }
-
-}
+  *
+  * Revision 2.3  2001/01/30 10:16:55  png3
+  * Almost working...
+  *
+  * Revision 2.2  2001/01/29 04:04:48  png3
+  * Added package psl.metaparser statements.  Can you say "Oops?"
+  *
+  * Revision 2.1  2001/01/28 17:52:17  png3
+  * New version of Metaparser: fully multithreaded.  PrintWriter logs.
+  *
+  */
+class Validator {
+
+  BufferedReader br = null;
+  PipedWriter pos = null;
+  int curLine = 0;
+  int curCol = 0;
+  String buf = null;
+  SubParser sp = null;
+  String inst = null;
+  boolean debug;
+  PrintWriter log = null;
+  PrintWriter dbg = null;
+
+  // used for SubParsers: have we reached the "outermost" tag yet?
+  int depth;
+  String element;
+
+  synchronized void setDepth(int d) {depth = d;}
+  synchronized int getDepth() {return depth;}
+  synchronized void setElement(String e) {element = e;}
+  synchronized String getElement() {return element;}
+
+  synchronized void prLog(String m) {log.println(m);}
+  synchronized void prDbg(String m) {if (debug) dbg.println(m);}
+
+  Validator(String s, PipedWriter o, String inst,
+  	boolean debug)
+    throws IOException {
+
+    final String fn = inst+"_ctor_1: ";
+
+    try {
+      br = new BufferedReader(new StringReader(s));
+      sp = new SubParser(o, inst, this);
+    } catch (IOException ioe) {
+      System.err.println(fn + "I/O Exception:" + ioe);
+      throw ioe;
+    }
+
+    this.debug = debug;
+    try {
+      String f1 = inst+".log";
+      String f2 = inst+".dbg";
+      log = new PrintWriter(new FileWriter(f1), true);
+      log.println("Log started " + MPUtil.timestamp());
+      if (debug) {
+	dbg = new PrintWriter(new FileWriter(f2), true);
+	dbg.println("Debug Log started " + MPUtil.timestamp());
+      }
+    } catch (IOException ioe) {
+      System.err.println(fn + "unable to open log files");
+      System.err.println(ioe);
+      return;
+    }
+
+    this.inst = inst;
+    pos = o;
+    curLine = 0;
+    curCol = 1;
+
+    prDbg(fn+"Starting subParser");
+    Thread t = new Thread(sp);
+    t.start();
+  }
+
+  Validator(String s, PipedWriter o, String inst,
+  	boolean debug, Locator l) throws IOException {
+
+    this(s, o, inst, debug);
+
+    final String fn = inst+"_ctor_2: ";
+
+    skip(l);
+
+    prDbg(fn+"Validator buffer:" + buf);
+    prDbg(fn+"Validator(" + curCol + "):"
+    	+ buf.substring(curCol-1));
+
+  }
+
+  void skip(Locator l) throws IOException {
+
+    final String fn = inst+"_skip: ";
+
+    prDbg(fn+"skip(" + MPUtil.printLoc(l) + ")");
+    int tgtLine = l.getLineNumber();
+    try {
+      while (curLine < tgtLine) {
+        buf = br.readLine();
+	curLine++;
+      }
+    } catch (IOException ioe) {
+      prLog(fn+"Error in skip:"+ioe);
+      throw ioe;
+    }
+    curCol = l.getColumnNumber();
+  }
+
+
+  void send(String s) throws IOException {
+
+    final String fn = inst+"_send: ";
+
+    try {
+      prDbg(fn+"sending:" + s);
+      pos.write(s);
+    } catch (IOException ioe) {
+      prLog(fn+"Error in send:"+ioe);
+      throw ioe;
+    }
+  }
+
+  void flush(Locator l) throws IOException {
+
+    final String fn = inst+"_flush: ";
+
+    int tgtLine = l.getLineNumber();
+    int tgtCol = l.getColumnNumber();
+    // prDbg(fn+"req to flush " + tgtLine +":"+tgtCol);
+    // prDbg(fn+"cur= " + curLine +":"+curCol);
+
+    try {
+      if (tgtLine > curLine) {
+        if (buf != null) {
+	  String s = buf.substring(curCol-1);
+	  prDbg(fn+"flushing:" + s);
+	  pos.write(s);
+	}
+	curCol = 1;
+	while (tgtLine > curLine+1) {
+	  buf = br.readLine();
+	  prDbg(fn+"flushing:" + buf);
+	  pos.write(buf);
+	  curLine++;
+	}
+	buf = br.readLine();
+	curLine++;
+      }
+      // prDbg(fn+"cur= " + curLine +":"+curCol);
+      // prDbg(fn+"buf=" + buf);
+      if (buf != null) {
+        String s =buf.substring(curCol-1, tgtCol-1);
+	prDbg(fn+"flushing:" + s);
+	pos.write(s);
+      }
+      curCol = tgtCol;
+    } catch (IOException ioe) {
+      prLog(fn+"Error in flush:"+ioe);
+      throw ioe;
+    }
+  }
+
+  void close(boolean flush) throws IOException {
+
+    final String fn = inst+"_close: ";
+
+    prDbg(fn+"closing(" + flush + ")");
+    try {
+      if (flush) {
+	String s = buf.substring(curCol-1);
+	prDbg(fn+"flushing:" + s);
+	pos.write(s);
+      }
+      br.close();
+      pos.close();
+    } catch (IOException ioe) {
+      prLog(fn+"Error in close:"+ioe);
+      throw ioe;
+    }
+  }
+
+}
diff --git a/metaparser.properties b/metaparser.properties
index 90f1cb5..0976e41 100644
--- a/metaparser.properties
+++ b/metaparser.properties
@@ -1,2 +1,2 @@
-sienaURL=senp://localhost:4321
+sienaURL=senp://localhost:7130
 debug=true
diff --git a/schema.xsd b/schema.xsd
index c34aa0e..bddf15b 100644
--- a/schema.xsd
+++ b/schema.xsd
@@ -1 +1,96 @@
-<?xml version="1.0" encoding="UTF-8"?><schema>  <?FleXML type="schemaFrag" name="sendmail/biff" version="1.0"?>    <annotation>      <documentation>        Schema fragment for data from sendmail/biff probes.	Copyright 2000 Trustees of Columbia University	in the City of New York.  All rights reserved.      </documentation>    </annotation>   <element name="smtp">    <complexType>      <sequence>        <element name="to" type="string"/>        <element name="from" type="string"/>        <element name="subject" type="string"/>        <element name="sent" type="timeInstant"/>        <element name="received" type="timeInstant" minOccurs="0"/>      </sequence>    </complexType>  </element>  <?FleXML type="/schemaFrag"?></schema>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+<schema
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:se="http://www.psl.cs.columbia.edu/2001/01/SE01"
+	elementFormDefault="qualified"> -->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema">
+  <?FleXML type="schemaFrag" name="activeInterface" version="1.0"?>
+    <annotation>
+      <documentation>
+        Schema fragment for data from Active Interface.
+	Copyright 2001 Trustees of Columbia University
+	in the City of New York.  All rights reserved.
+      </documentation>
+    </annotation>
+
+  <element name="event">
+    <complexType>
+      <sequence>
+
+	<element name="packager">
+	  <complexType>
+	    <attribute name="value" type="string"/>
+	  </complexType>
+	</element>
+	<element name="timestamp">
+	  <complexType>
+	    <attribute name="value" type="string"/>
+	  </complexType>
+	</element>
+
+	<element name="parameters">
+	  <complexType>
+	    <sequence>
+
+	      <element name="callback">
+		<complexType>
+		  <attribute name="type" type="string"/>
+		</complexType>
+	      </element>
+	      <element name="object">
+		<complexType>
+		  <attribute name="value" type="string"/>
+		</complexType>
+	      </element>
+	      <element name="class">
+		<complexType>
+		  <attribute name="name" type="string"/>
+		</complexType>
+	      </element>
+	      <element name="method">
+		<complexType>
+		  <attribute name="name" type="string"/>
+		</complexType>
+	      </element>
+	      <element name="parameters">
+		<complexType>
+		  <sequence>
+
+		    <element name="param" minOccurs="0" maxOccurs="unbounded">
+		      <complexType>
+			<attribute name="type" type="string"/>
+			<attribute name="value" type="string"/>
+		      </complexType>
+		    </element>
+
+		    <element name="SERVICE_DYNAMICS">
+		      <complexType>
+			<sequence>
+
+			  <element name="Service" type="string"/>
+			  <element name="State" type="string" minOccurs="0"/>
+			  <element name="Exception_msg" type="string" minOccurs="0"/>
+			  <element name="Status_title" type="string" minOccurs="0"/>
+			  <element name="Status_message" type="string" minOccurs="0"/>
+			  <element name="Status" type="string" minOccurs="0"/>
+			  <element name="Progress" type="string" minOccurs="0"/>
+
+			</sequence>
+		      </complexType>
+		    </element>
+
+		  </sequence>
+		</complexType>
+	      </element>
+
+	    </sequence>
+	  </complexType>
+	</element>
+
+      </sequence>
+    </complexType>
+  </element>
+  <?FleXML type="/schemaFrag"?>
+</schema>