Multiple classes can be sent to MP

ktn10 [2001-05-03 23:08:29]
Multiple classes can be sent to MP
-only command line interface for adding multiple classes to Oracle is working at present.
Filename
Oracle.java
OracleSienaInterface.java
README.txt
SchemaFragment.java
SchemaFragmentToXML.java
SchemaInterface.java
SendOracleReply.java
SendWorklet.java
oracle.prop
oracleDB.properties
oracleDB.script
diff --git a/Oracle.java b/Oracle.java
index cf7b8fc..96bd9cf 100644
--- a/Oracle.java
+++ b/Oracle.java
@@ -122,7 +122,7 @@ public class Oracle implements IOracle
 		System.err.println("Error while intializing the database: "+ e);
 		System.exit(1);
 	    }
-
+
 	String nsName = null;
 	if(namespace != null)
 	    {
@@ -164,43 +164,19 @@ public class Oracle implements IOracle
 	boolean classExists = false;
 	boolean isPersistent = false;
 	String instanceName = null;
+	Vector moduleVector = new Vector();
+	StringTokenizer tk = new StringTokenizer(moduleInfo, ", ", false);
 	if(moduleInfo.length() > 0)
 	    {
-		StringTokenizer tk = new StringTokenizer(moduleInfo, ", ", false);
-		try
-		    {
-			// get the className
-			className = tk.nextToken();
-		    }
-		catch (Exception e)
-		    {
-			throw new InvalidSchemaFormatException("The database for the Oracle "
-							       + "is incorrectly formatted for the "
-							       + "element " + name + ". The line for"
-							       + " this tag is: " + moduleInfo + " and"
-							       + " the error was: " + e);
-		    }
-
-		// try to get the class for this className
-
-		className = rootPath + File.separator + moduleDir + File.separator + className;
-		classFile = new File(className);
-		classExists = classFile.exists();
-		if(classExists == false)
-		    {
-			throw new InvalidSchemaFormatException("There is no class named "+ className
-							       + " for the XMLModule for the tag "
-							       + name);
-		    }
-		isPersistent = false;
+	    isPersistent = false;
 		try
 		    {
-			// get if this is persistent or not
+		    // get if this is persistent or not
 			isPersistent = Boolean.valueOf(tk.nextToken()).booleanValue();
 		    }
 		catch (Exception e)
 		    {
-			throw new InvalidSchemaFormatException("This schema definition for tag "
+			throw new InvalidSchemaFormatException("This schema definition for tag "
 							       + name + " is incorrectly formatted."
 							       +"The line for this tag is: "
 							       + moduleInfo + ", and the error was "
@@ -224,16 +200,60 @@ public class Oracle implements IOracle
 			    }

 		    }
+
+		try
+		    {
+			// get the className
+			className = tk.nextToken();
+		    }
+		catch (Exception e)
+		    {
+			throw new InvalidSchemaFormatException("The database for the Oracle "
+							       + "is incorrectly formatted for the "
+							       + "element " + name + ". The line for"
+							       + " this tag is: " + moduleInfo + " and"
+							       + " the error was: " + e);
+		    }
+
+		// try to get the class for this className
+
+		className = rootPath + File.separator + moduleDir + File.separator + className;
+		classFile = new File(className);
+		classExists = classFile.exists();
+		if(classExists == false)
+		    {
+			throw new InvalidSchemaFormatException("There is no class named "+ className
+							       + " for the XMLModule for the tag "
+							       + name);
+		    }
+		moduleVector.addElement(className);
+
+		while(tk.hasMoreElements())
+	    {
+	        className = tk.nextToken();
+
+		// try to get the class for this className
+
+		    className = rootPath + File.separator + moduleDir + File.separator + className;
+		    classFile = new File(className);
+		    classExists = classFile.exists();
+		    if(classExists == false)
+		    {
+			    throw new InvalidSchemaFormatException("There is no class named "+ className
+							       + " for the XMLModule for the tag "
+							       + name);
+		    }
+		    moduleVector.addElement(className);
+	    }
 		//className = className.substring(className.lastIndexOf(File.separator)+1, className.length());
-		if(className == null)
-		    className = "";
-		fragment.setModuleName(className);
+
+		fragment.setModuleName(moduleVector);
 		fragment.setIsPersistent(isPersistent);
 		fragment.setInstanceName(instanceName);
 	    }
 	else
 	    {
-		fragment.setModuleName("");
+		fragment.setModuleName(null);
 		fragment.setIsPersistent(false);
 		fragment.setInstanceName("");
 	    }
@@ -272,7 +292,7 @@ public class Oracle implements IOracle
 				    {
 					System.out.println("Property file 'oracle.prop' does not exist..");
 					System.exit(2);
-				    }
+				    }
 				fileName = args[0] + File.separator + "psl" + File.separator + "oracle" + File.separator + "oracle.prop";
 			    }
 			String file = args[1];
@@ -317,7 +337,7 @@ public class Oracle implements IOracle
     {
 	log.println("Oracle: " + msg);
     }
-
+
 }


diff --git a/OracleSienaInterface.java b/OracleSienaInterface.java
index 6e40804..0036871 100644
--- a/OracleSienaInterface.java
+++ b/OracleSienaInterface.java
@@ -27,7 +27,7 @@ public class OracleSienaInterface implements Runnable, Notifiable
     PrintWriter log = null;
     static String rootPath = null;
     static String propFile = null;
-
+
     //static String oraclePath = null;
     // PrintWriter log = new PrintWriter(System.err);

@@ -107,7 +107,7 @@ public class OracleSienaInterface implements Runnable, Notifiable
      */
     public static void main(String[] args)
     {
-	if((args.length < 1) || (args.length > 2) )
+	if((args.length < 1) || (args.length > 2) )
 	    {
 		System.out.println("Usage: java psl.oracle.OracleSienaInterface <root path> [senp://<host>:<port>]");
 		System.exit(1);
@@ -202,7 +202,7 @@ public class OracleSienaInterface implements Runnable, Notifiable
     {
 	Hashtable publishEvent = new Hashtable();
 	SchemaFragment fragment = new SchemaFragment();
-	String moduleName = "";
+	Vector moduleName = new Vector();
 	Oracle oracle = new Oracle(propFile);
 	String msg = null;
 	boolean result = false;
@@ -210,8 +210,7 @@ public class OracleSienaInterface implements Runnable, Notifiable
 	int srcID = this.hashCode();
 	publishEvent.put("MPRequestID", new AttributeValue(MPRequestID));
 	publishEvent.put("MPHostname", new AttributeValue(MPHost));
-
-	try
+    try
 	    {
 		fragment = oracle.getFragment(query, rootPath);
 	    }
@@ -255,7 +254,7 @@ public class OracleSienaInterface implements Runnable, Notifiable
 	    {
 		se.printStackTrace();
 	    }
-	if(moduleName.length() > 0)
+	if(!moduleName.isEmpty())
 	    {
 		SendOracleReply sor = new SendOracleReply();
 		sor.sendReply(MPRequestID, MPHost, MPRequestID, moduleName);
diff --git a/README.txt b/README.txt
index 3155327..7c30415 100644
--- a/README.txt
+++ b/README.txt
@@ -34,9 +34,7 @@ There are two modes of operations for Oracle:

    The query must be represented in XML format:

-     <FleXML:schemaQuery version="1.0" name="NAMESPACE:ELEMENT">   		                   <xPath>
-                        PATH
-                   </xPath>	              </FleXML:schemaQuery>
+     <schemaQuery version="1.0" name="NAMESPACE:ELEMENT"><xpath>PATH</xpath></schemaQuery>

    where NAMESPACE and PATH are optional but at least one of them
    is required.
diff --git a/SchemaFragment.java b/SchemaFragment.java
index f5f5313..8e2aa39 100644
--- a/SchemaFragment.java
+++ b/SchemaFragment.java
@@ -1,86 +1,174 @@
-/**
- * Title: SchemaFragment
- * Description: Defines an object which is used to store a schema
- *              definition and module information. It stores element name,
- *              schema fragment, modulename associated with an element, if
- *              a module is persistent or  not and instance name if it is
- *              persistent. (Metaparser will keep an instance if a module
- *              if it is persistent).
- * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
-  *                              All Rights Reserved.
- * @author Kanan Naik
- * @version 1.0
- */
-
-package psl.oracle;
-
-public class SchemaFragment
-{
-    String name;
-    String description;
-    String moduleName = null;
-    boolean isPersistent = false;
-    String instanceName = null;
-
-    public SchemaFragment()
-    {
-	name = null;
-	description = null;
-        moduleName = null;
-        isPersistent = false;
-        instanceName = null;
-    }
-
-    public String toString()
-    {
-        return "\n" + description + "\n" + moduleName + "," + isPersistent
-               + "," + instanceName;
-    }
-
-    public String getName()
-    {
-	return name;
-    }
-    public void setName(String name)
-    {
-       	this.name = name;
-    }
-
-    public String getDescription()
-    {
-	return description;
-    }
-    public void setDescription(String description)
-    {
-	this.description = description;
-    }
-
-    public String getModuleName()
-    {
-	return moduleName;
-    }
-    public void setModuleName(String module)
-    {
-	this.moduleName = module;
-    }
-
-    public boolean isPersistent()
-    {
-	return isPersistent;
-    }
-    public void setIsPersistent(boolean persistent)
-    {
-	this.isPersistent = persistent;
-    }
-
-    public String getInstanceName()
-    {
-	return instanceName;
-    }
-    public void setInstanceName(String instance)
-    {
-	this.instanceName = instance;
-    }
-}
-
-
+/**
+
+ * Title: SchemaFragment
+
+ * Description: Defines an object which is used to store a schema
+
+ *              definition and module information. It stores element name,
+
+ *              schema fragment, modulename associated with an element, if
+
+ *              a module is persistent or  not and instance name if it is
+
+ *              persistent. (Metaparser will keep an instance if a module
+
+ *              if it is persistent).
+
+ * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
+
+  *                              All Rights Reserved.
+
+ * @author Kanan Naik
+
+ * @version 1.0
+
+ */
+
+package psl.oracle;
+
+import java.util.*;
+
+public class SchemaFragment
+
+{
+
+    String name;
+
+    String description;
+
+    Vector moduleName = null;
+
+    boolean isPersistent = false;
+
+    String instanceName = null;
+
+
+
+    public SchemaFragment()
+
+    {
+
+	name = null;
+
+	description = null;
+
+        moduleName = new Vector();
+
+        isPersistent = false;
+
+        instanceName = null;
+
+    }
+
+
+
+    public String toString()
+
+    {
+        String moduleString = "";
+	    for(Enumeration e = moduleName.elements();e.hasMoreElements();)
+        {
+            if(moduleString == "")
+                 moduleString = e.nextElement().toString();
+            else
+                 moduleString = moduleString + "," + e.nextElement();
+        }
+        return "\n" + description + "\n" + isPersistent + "," + instanceName
+                    + "," + moduleString;
+
+    }
+
+
+
+    public String getName()
+
+    {
+
+	return name;
+
+    }
+
+    public void setName(String name)
+
+    {
+
+       	this.name = name;
+
+    }
+
+
+
+    public String getDescription()
+
+    {
+
+	return description;
+
+    }
+
+    public void setDescription(String description)
+
+    {
+
+	this.description = description;
+
+    }
+
+
+
+    public Vector getModuleName()
+
+    {
+    	return moduleName;
+    }
+
+    public void setModuleName(Vector module)
+
+    {
+    if(module != null)
+	    this.moduleName = module;
+
+    }
+
+
+
+    public boolean isPersistent()
+
+    {
+
+	return isPersistent;
+
+    }
+
+    public void setIsPersistent(boolean persistent)
+
+    {
+
+	this.isPersistent = persistent;
+
+    }
+
+
+
+    public String getInstanceName()
+
+    {
+
+	return instanceName;
+
+    }
+
+    public void setInstanceName(String instance)
+
+    {
+
+	this.instanceName = instance;
+
+    }
+
+}
+
+
+
+
+
diff --git a/SchemaFragmentToXML.java b/SchemaFragmentToXML.java
index 12687a7..73af04f 100644
--- a/SchemaFragmentToXML.java
+++ b/SchemaFragmentToXML.java
@@ -1,59 +1,125 @@
-/**
- * Title: SchemaFragmentToXML
- * Description: This class is used to convert object SchemaFragment
- *              in XML that will be sent to Metaparser.
- * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
- *                              All Rights Reserved.
- * Company:      <p>
- * @author Kanan Naik
- * @version 1.0
- */
-
-package psl.oracle;
-
-public class SchemaFragmentToXML
-{
-
-  /**
-   * Constructor
-   */
-  public SchemaFragmentToXML()
-  {
-  }
-
-  /**
-   * This method will be called to convert given SchemaFragment object into
-   * XML. The format of resultant XML will be: <?xml version="1.0"><FleXML:
-   * schemaFrag version="1.0" name="ELEMENT NAME"><schema>FRAGMENT</schema>
-   * <module type="TYPE" persistent="true|false" instance="INSTANCE NAME">
-   * MODULE NAME</module></FleXML:schemaFrag>
-   */
-  public String toXML(SchemaFragment sf)
-  {
-    String xmlForm = null;
-    String initBuffer = "<schemaFrag version=\"1.0\" name=\"";
-    String name = sf.getName();
-    String fragment = sf.getDescription();
-    String moduleName = sf.getModuleName();
-    boolean persistent = sf.isPersistent();
-    String instanceName = sf.getInstanceName();
-    String buffer = null;
-    if(moduleName.length() > 0)
-    {
-      buffer = name + "\"> <subschema>" + fragment + "</subschema> <module type=\"java1.3\""
-                    + " cacheable=\"" + persistent + "\" instance"
-                    + "=\"" + instanceName + "\">" + moduleName + "</module> "
-                    + "</schemaFrag>";
-    }
-    else
-    {
-      buffer = name + "\"> <schema>" + fragment + "</schema> <module type=\"\""
-                    + " cacheable=\"\" instance"
-                    + "=\"" + instanceName + "\">" + moduleName + "</module> "
-                    + "</schemaFrag>";
-    }
-    xmlForm = initBuffer.concat(buffer);
-    return xmlForm;
-  }
-}
-
+/**
+
+ * Title: SchemaFragmentToXML
+
+ * Description: This class is used to convert object SchemaFragment
+
+ *              in XML that will be sent to Metaparser.
+
+ * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
+
+ *                              All Rights Reserved.
+
+ * Company:      <p>
+
+ * @author Kanan Naik
+
+ * @version 1.0
+
+ */
+
+package psl.oracle;
+
+import java.util.*;
+import java.lang.*;
+
+public class SchemaFragmentToXML
+
+{
+
+
+
+  /**
+
+   * Constructor
+
+   */
+
+  public SchemaFragmentToXML()
+
+  {
+
+  }
+
+
+
+  /**
+
+   * This method will be called to convert given SchemaFragment object into
+
+   * XML. The format of resultant XML will be: <?xml version="1.0"><FleXML:
+
+   * schemaFrag version="1.0" name="ELEMENT NAME"><schema>FRAGMENT</schema>
+
+   * <module type="TYPE" persistent="true|false" instance="INSTANCE NAME">
+
+   * MODULE NAME</module></FleXML:schemaFrag>
+
+   */
+
+  public String toXML(SchemaFragment sf)
+
+  {
+
+    String xmlForm = null;
+
+    String initBuffer = "<schemaFrag version=\"1.0\" name=\"";
+
+    String name = sf.getName();
+
+    String fragment = sf.getDescription();
+
+    Vector moduleName = sf.getModuleName();
+
+    boolean persistent = sf.isPersistent();
+
+    String instanceName = sf.getInstanceName();
+
+    String buffer = null;
+
+    String moduleString = "";
+	for(Enumeration e = moduleName.elements();e.hasMoreElements();)
+    {
+       if(moduleString == "")
+           moduleString = e.nextElement().toString();
+       else
+           moduleString = moduleString + "," + e.nextElement();
+    }
+    if(moduleString.length() > 0)
+
+    {
+
+      buffer = name + "\"> <subschema>" + fragment + "</subschema> <module type=\"java1.3\""
+
+                    + " cacheable=\"" + persistent + "\" instance"
+
+                    + "=\"" + instanceName + "\">" + moduleString + "</module> "
+
+                    + "</schemaFrag>";
+
+    }
+
+    else
+
+    {
+
+      buffer = name + "\"> <schema>" + fragment + "</schema> <module type=\"\""
+
+                    + " cacheable=\"\" instance"
+
+                    + "=\"" + instanceName + "\">" + moduleString + "</module> "
+
+                    + "</schemaFrag>";
+
+    }
+
+    xmlForm = initBuffer.concat(buffer);
+
+    return xmlForm;
+
+  }
+
+}
+
+
+
diff --git a/SchemaInterface.java b/SchemaInterface.java
index 9335a60..a7660c1 100644
--- a/SchemaInterface.java
+++ b/SchemaInterface.java
@@ -1,799 +1,1487 @@
-/*
- * Title: SchemaInterface
- * Description:  Interface for a user to add schema fragments and module information
- *               to oracle database (HSQL). User can enter a file name(.xsd format).
- *               Its format will be validated using IBM's SAX parser and then
- *               user will be prompt to enter module information for each tag.
- *               (module name, isPersistent and instance name). User can skip
- *               this information for individual tag or for all tags to store
- *               the default values or null values. The tags are stored in format
- *               of namespace:element name(if namespace is available) and
- *               element name,path. These are the keys for the database.
- * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
- *                              All Rights Reserved.
- * @author Kanan Naik
- * @version 1.0
- */
-
-package psl.oracle;
-
-import java.util.*;
-import java.io.*;
-import java.lang.*;
-
-// import com.ibm.xml.parsers.*;
-
-import org.apache.xerces.parsers.*;
-import org.xml.sax.*;
-
-
-/**
- * Intializes database interface
- */
-
-public class SchemaInterface
-{
-    String moduleInfo = null;
-    String defaultModuleInfo = null;
-    String moduleDir = null;
-    static DBInterface db = null;
-    String dbName = "oracleDB";
-    String dbLoc = null;
-    PrintWriter log = null;
-    static String rootPath = null;
-
-
-    public SchemaInterface()
-    {
-	//code to read parameters from the property file
-	File file = new File(rootPath + File.separator + "oracle.prop");
-	// File file = new File("oracle.prop");
-	if(!file.exists())
-	    {
-		file = new File(rootPath + File.separator + "psl" + File.separator + "oracle" + File.separator + "oracle.prop");
-		if(!file.exists())
-		    {
-			System.out.println ("File 'oracle.prop' does not exist");
-			System.exit(1);
-		    }
-	    }
-	Properties property = new Properties();
-	try
-	    {
-		property.load(new FileInputStream(file));
-	    }
-	catch(FileNotFoundException ffe)
-	    {
-		System.err.println("Exception: " + ffe);
-		System.exit(0);
-	    }
-	catch(IOException ioe)
-	    {
-		System.err.println("Exception: "+ ioe);
-		System.exit(1);
-	    }
-	moduleInfo = property.getProperty("defaultModuleInfo");
-	if(moduleInfo == null || moduleInfo.length() < 1)
-	    {
-		System.out.println("Parameter 'defaultModuleInfo' must be set in 'oracle.prop' file.");
-		System.exit(0);
-	    }
-	defaultModuleInfo = moduleInfo;
-	dbLoc = property.getProperty("dbLocation");
-	if(dbLoc == null || dbLoc.length() < 1)
-	    {
-		System.out.println("Parameter 'dbLocation' must be set in 'oracle.prop' file.");
-		System.exit(2);
-	    }
-	moduleDir = property.getProperty("moduleDir");
-        if(moduleDir == null || moduleDir.length() < 1)
-	    {
-		System.out.println("Parameter 'moduleDir' must be set in 'oracle.prop' file.");
-		System.exit(2);
-	    }
-
-	//property file code end here
-	try
-	    {
-		//dbName = dbLoc + File.separator + dbName;
-		db = new DBInterface(dbName);
-	    }
-	catch(Exception e)
-	    {
-		System.err.println("Exception in database: " + e);
-		db.shutdown();
-		System.exit(1);
-	    }
-    }
-
-
-
-
-    /** Prompts user to add information like module name, if
-  	* persistent or not and instance name. Instance name is only
-  	* stored if a module is persistent. A user can press "Enter" to
-  	* store a null value for current tag or he can enter "1" to
-  	* store a default value for a module or he can enter "2" to
-  	* store default values for rest of the tags in the file.
-  	*/
-
-    protected String askModuleInfo(String name)
-    {
-    	String line = null;
-	int index1 = defaultModuleInfo.indexOf(',');
-    	int index2 = defaultModuleInfo.indexOf(',', index1+1);
-	if(index1==-1)
-	    {
-		System.err.println("Format of 'defaultModuleInfo' in 'oracle.prop' is not proper: <module path>,<if persistent>,<instance>"        );
-		System.exit(1) ;
-	    }
-    	String moduleName = defaultModuleInfo.substring(0, index1);
-    	String isPersistent = null;
-    	if(index2 == -1)
-	    isPersistent = defaultModuleInfo.substring(index1+1, defaultModuleInfo.length());
-    	else
-	    isPersistent = defaultModuleInfo.substring(index1+1, index2);
-    	if(!(isPersistent.equals("true") || isPersistent.equals("false")))
-	    {
-		System.out.println("Format of 'defaultModuleInfo' in 'oracle.prop' is not proper.");
-		System.exit(1);
-	    }
-    	String instanceName = "null";
-    	if(index2 == -1)
-	    instanceName = null;
-    	else
-	    instanceName = defaultModuleInfo.substring(index2+1, defaultModuleInfo.length());
-	String defIsPersistent = isPersistent;
-
-    	while(true)
-	    {
-        	line = getString();
-        	line = line.trim();
-        	if(line.equals("") == true)
-		    {
-			moduleInfo = null;
-			return moduleInfo;
-		    }
-        	try
-		    {
-          		int input=Integer.valueOf(line).intValue();
-          		if(input < 1 || input > 2)
-			    {
-				System.out.println("Valid values are 1 or 2. Please try again!");
-				continue;
-			    }
-          		else
-			    {
-				if(input == 1)
-				    {
-					return defaultModuleInfo;
-				    }
-				if(input == 2)
-				    {
-					moduleInfo = "skip";
-	      				return moduleInfo;
-				    }
-			    }
-		    }
-        	catch(Exception ex)
-		    {
-          		String fileName = null;
-		        File classFile = null;
-        		boolean classExists = false;
-		        StringTokenizer st = new StringTokenizer(line, ",");
-			if(st.hasMoreElements())
-			    {
-				moduleName = st.nextToken();
-				fileName = rootPath + File.separator + moduleDir + File.separator + moduleName;
-				// png 12 March 2001
-				// tagprocessors are actually either multiple class files or a .jar file
-				// removing check
-
-				  classFile = new File(fileName);
-				  classExists = classFile.exists();
-				  if(classExists == false)
-				  {
-				  System.out.println("No class exists with the name: " + fileName
-				  +" Please enter again.");
-				  moduleName = defaultModuleInfo.substring(0, index1);
-				  continue;
-				  }
-
-				if(st.hasMoreElements())
-				    {
-					isPersistent = st.nextToken();
-				    }
-				else
-				    {
-					System.out.println("Number of parameters is not valid");
-					continue;
-				    }
-				isPersistent = isPersistent.trim();
-				if(!(isPersistent.equals("true") || isPersistent.equals("false")))
-				    {
-					System.out.println("Value of isPersistent is niether true nor false OR "
-							   +"you have entered an instance name for a non "
-							   +"persistent module");
-					isPersistent = defIsPersistent;
-					continue;
-				    }
-				boolean instance = st.hasMoreElements();
-				if(instance && (isPersistent.equals("true")== true))
-				    {
-					instanceName = st.nextToken();
-				    }
-				else if(!instance && (isPersistent.equals("true")== true))
-				    {
-					System.out.println("Instance name must be present if a module "
-							   + "is persistent");
-					continue;
-				    }
-				moduleInfo = moduleName+","+isPersistent+","+instanceName;
-				return moduleInfo;
-			    }
-		    }
-	    }
-    }
-
-
-    /**
- 	* This method is used to remove a record from the database. User has
- 	* to specified a key value in order to delete an entry. The key format
- 	* can be either namespace:element or element,path.
- 	*/
-
-    protected void removeFragment()throws UnknownTagException
-    {
-    	System.out.println("Enter the key value of a Schema fragment you want to "
-			   + "remove. Format: <namespace>:<tag name> OR <tag "
-			   + "name>,<path>");
-	String name = getString();
-    	name = name.trim();
-	String key = "0." + name;
-    	Object data = db.get(key);
-	if(data == null)
-	    {
-        	throw new UnknownTagException("There is no schema entry for the "
-					      + "tag " + name + " in the Oracle.");
-	    }
-    	ElementInfo e1 = ElementInfo.getElementInfo((String)data);
-	int version = -1;
-    	String newVersion = String.valueOf(version);
-	newVersion = newVersion.trim();
-    	int index = key.indexOf('.');
-	String newKey = newVersion + "." + key.substring(index+1, key.length());
-    	db.remove(key);
-	e1.setKey(newKey);
-    	System.out.println("Deleting " + name);
-	db.put(newKey, e1.toString());
-    }
-
-
-
-    /** This method is called when a user wants to add schema
-  	* fragments to the database. User is promted to enter
-  	* data for every element name. .xsd file entered by a user
-  	* will be validated using IBM's SAX parser.
-  	*/
-
-    protected void addFragments()
-	throws IOException, FileNotFoundException
-    {
-    	System.out.println("Enter the name of a Schema document(.xsd format)");
-	String moduleInfo = defaultModuleInfo;
-    	String fileName = getString();
-	BufferedReader inLine = null;
-    	BufferedWriter outLine = null;
-	try
-	    {
-		inLine = new BufferedReader(new FileReader(fileName));
-		outLine = new BufferedWriter(new FileWriter("oracletemp.txt"));
-	    }
-	catch (Exception e)
-	    {
-		System.err.println("Error on file read/write:" + e.getMessage());
-		e.printStackTrace();
-	    }
-	String line  = inLine.readLine();
-    	String mainBuffer = "";
-	if(line != null)
-    	    line = line.trim();
-	else
-	    {
-        	System.out.println("Format of .xsd file is not valid. Tag <schema> "
-				   + "is expected.");
-	        db.shutdown();
-		System.exit(1);
-	    }
-    	while(line != null)
-	    {
-        	outLine.write(line, 0, line.length());
-		mainBuffer = mainBuffer + line;
-		outLine.write("\n");
-        	line = inLine.readLine();
-	    }
-	outLine.close();
-    	inLine.close();
-	FileInputStream is = new FileInputStream("oracletemp.txt");
-        //Verify the format of schema file.
-    	try
-	    {
-        	SAXParser parser = new SAXParser();
-	        parser.parse(new InputSource(is));
-	    }
-    	catch(Exception e)
-	    {
-		System.err.println(e);
-        	return;
-	    }
-    	System.out.println("Schema document validation is successfull.");
-	is.close();
-    	processFile("oracletemp.txt", mainBuffer);
-    	return;
-    }
-
-
-    /**
-	* .xsd file is processed by this method. It will generate a proper
-	* key value by computing a path for each element. It also parses
-	* a file to store a schema fragment for each element.
-	*/
-
-    public void processFile(String fileName, String mainBuffer)throws IOException,
-    FileNotFoundException
-    {
-    	BufferedReader inLine = new BufferedReader(new FileReader(fileName));
-	String line = inLine.readLine();
-    	String mainPath = "";
-	int level = -1;
-    	int index = -1;
-	int index1 = -1;
-    	int index2 = -1;
-	int j = -1;
-    	int i = -1;
-	Vector element = new Vector(10);
-    	Hashtable paths = new Hashtable();
-	String elementName = null;
-    	String typeName = null;
-	String namespace = null;
-    	while(line != null)
-	    {
-		index = line.indexOf("element");
-        	if(index != -1) //element
-		    {
-			j=index+8;
-			if(line.length() > j + 4 )
-			    {
-				while (line.charAt(j) == ' ')
-				    {
-					j++;
-				    }
-				if((line.charAt(j) == 'n') && (line.charAt(j+1) == 'a') &&
-				   (line.charAt(j+2) == 'm') && (line.charAt(j+3) == 'e'))
-				    {
-					level = level + 1;
-					ElementInfo e11 = new ElementInfo();
-					e11.setFragment(mainBuffer);
-					element.add(level, e11);
-					index1 = line.indexOf("<");
-					index2 = line.indexOf(":");
-					if((index1 != -1) && (index2 != -1) && (index2 < index))
-					    {
-						namespace = line.substring(index1+1, index2);
-						namespace = namespace.trim();
-					    }
-					else
-					    {
-						namespace = null;
-					    }
-					index1 = line.indexOf('"');
-					if(index1 != -1)
-					    index2 = line.indexOf('"', index1+1);
-					else
-					    {
-						index1 = line.indexOf("'");
-						index2 = line.indexOf("'", index1+1);
-					    }
-					elementName = line.substring(index1+1, index2);
-					for(i=0; i<=level; i++)
-					    {
-						ElementInfo e = (ElementInfo) element.get(i);
-						element.set(i, e);
-					    }
-					ElementInfo e1 = (ElementInfo)element.get(level);
-					mainPath = mainPath.concat("/" + elementName);
-					if(paths.get(elementName) == null)
-					    {
-						e1.setPath(mainPath);
-					    }
-					else
-					    {
-						String temp = (String)paths.get(elementName);
-						e1.setPath(temp);
-					    }
-					e1.setKey("0." + elementName + "," + e1.getPath());
-					element.set(level, e1);
-					index1 = line.indexOf("/>");
-					ElementInfo e = (ElementInfo) element.get(level);
-					if(index1 != -1)
-					    {
-						addToDB(e);
-					    }
-					if(namespace != null)
-					    {
-						e.setKey("0." + namespace + ":" + elementName);
-						if(index1 != -1)
-						    {
-							addToDB(e);
-						    }
-					    }
-					if(index1 != -1)
-					    {
-						element.remove(level);
-						int indexPath = mainPath.indexOf("/" + elementName);
-						mainPath = mainPath.substring(0, indexPath);
-						level --;
-					    }
-				    }
-				else if((line.charAt(j) == 'r') && (line.charAt(j+1) == 'e') &&
-					(line.charAt(j+2) == 'f')) //if element ref found
-				    {
-					index1 = line.indexOf('"');
-					if (index1 == -1)
-					    {
-						index1 = line.indexOf("'");
-					    }
-					index2 = line.indexOf('"', index1+2);
-					if(index2 == -1)
-					    {
-						index2 = line.indexOf("'", index1+2);
-					    }
-					elementName = line.substring(index1+1, index2);
-					int indexPath = mainPath.lastIndexOf('/');
-					String parent =mainPath.substring(indexPath+1, mainPath.length());
-					String path = (String)paths.get(parent);
-					if( path != null)
-					    path = path.concat("/" + elementName);
-					else
-					    path = mainPath.concat("/" + elementName);
-					paths.put(elementName, path);
-					for(i=0; i<=level; i++)
-					    {
-						ElementInfo e = (ElementInfo) element.get(i);
-						element.set(i, e);
-					    }
-				    }
-			    }  //name not found
-			else if((line.indexOf("element>")) != -1)
-			    {
-				for(i=0; i<=level; i++)
-				    {
-					ElementInfo e = (ElementInfo) element.get(i);
-					element.set(i, e);
-				    }
-				ElementInfo e = (ElementInfo) element.get(level);
-				String key = e.getKey();
-				addToDB(e);
-				index = key.indexOf(':');
-				index1 = key.indexOf("0.");
-				if(index != -1) //namespace is not null
-				    {
-					elementName = key.substring(index+1, key.length());
-					e.setKey("0." + elementName + "," + e.getPath());
-					addToDB(e);
-				    }
-				else
-				    {
-					index = key.indexOf(',');
-					elementName = key.substring(index1+2, index);
-				    }
-				int inNamespace = elementName.indexOf(':');
-				String tagName = elementName.substring(inNamespace+1, elementName.length());
-				int indexPath = mainPath.indexOf("/" + tagName);
-				mainPath = mainPath.substring(0, indexPath);
-				element.remove(level);
-				level --;
-			    }
-		    } //element found
-		else if(line.indexOf(" name=") != -1) //check for type
-		    {
-			String type = null;
-			if(line.indexOf("type name=") != -1)
-			    {
-				index = line.indexOf("type name=");
-				type = "type";
-			    }
-			else if(line.indexOf("complexType name=") != -1)
-			    {
-				index = line.indexOf("complexType name=");
-				type = "complexType";
-			    }
-			else if(line.indexOf("simpleType name=") != -1)
-			    {
-				index = line.indexOf("simpleType name=");
-				type = "simpleType";
-			    }
-			if(type != null) //avoid "attribute name"
-			    {
-				index1 = line.indexOf("<");
-				index2 = line.indexOf(":");
-				if((index1 != -1) && (index2 != -1) && (index2 < index))
-				    {
-					namespace = line.substring(index1+1, index2);
-					namespace = namespace.trim();
-				    }
-				else
-				    {
-					namespace = null;
-				    }
-				index1 = line.indexOf('"');
-				if (index1 == -1)
-				    {
-					index1 = line.indexOf("'");
-				    }
-				index2 = line.indexOf('"', index1+2);
-				if(index2 == -1)
-				    {
-					index2 = line.indexOf("'", index1+2);
-				    }
-				typeName = line.substring(index1+1, index2);
-				level = level + 1;
-				element.add(level, new ElementInfo());
-				for(i=0; i<=level; i++)
-				    {
-					ElementInfo e = (ElementInfo) element.get(i);
-					element.set(i, e);
-				    }
-				ElementInfo e1 = (ElementInfo)element.get(level);
-				String key = null;
-				if(namespace != null)
-				    key = "0." + namespace + ":" + type + "=" + typeName;
-				else
-				    key = "0." + type + "=" + typeName;
-				e1.setKey(key);
-				element.set(level, e1);
-				index1 = line.indexOf("/>");
-				if(index1 != -1)
-				    {
-					ElementInfo e = (ElementInfo) element.get(level);
-					addToDB(e);
-				    }
-			    }
-			else
-			    {
-				for(i=0; i<=level; i++)
-				    {
-					ElementInfo e = (ElementInfo) element.get(i);
-					element.set(i, e);
-				    }
-			    }
-		    }
-	        else if((line.indexOf("</type>") != -1) || (line.indexOf("simpleType>") != -1)
-			|| (line.indexOf("complexType>")!= -1) || (line.indexOf(":type>") != -1))
-		    {
-			for(i=0; i<=level; i++)
-			    {
-				ElementInfo e = (ElementInfo) element.get(i);
-				element.set(i, e);
-			    }
-			ElementInfo e = (ElementInfo) element.get(level);
-			if(e.getKey().indexOf("ype=") != -1) //to avoid  <type> </type> kind of constructs
-			    {
-				addToDB(e);
-				element.remove(level);
-				level --;
-			    }
-		    }
-	        else //element and type are not found
-		    {
-			for(i=0; i<=level; i++)
-			    {
-				ElementInfo e = (ElementInfo) element.get(i);
-				element.set(i, e);
-			    }
-		    }
-	        line = inLine.readLine();
-	    }
-	return;
-    }
-
-
-    /**
-  	* This method is used to increase the version value for the tags.
-  	*/
-
-    public String modifyKeyValue(String key, int version)
-    {
-	int index = key.indexOf('.');
-	version++;
-	String newVersion = String.valueOf(version);
-	newVersion = newVersion.trim();
-	String newKey = newVersion + "." + key.substring(index+1, key.length());
-	return newKey;
-    }
-
-
-
-    /**
-	* This method is called by processFile() method. It receives
-	* an element information in form of a key and a fragment. It stores
-	* an element in the database. This method also allows a user to
-	* modify or overwrite an existing element. The previous entry will
-	* be stored with a corresponding version number (depending upon the
-	* number of times an entry was modified).
-	*/
-
-    public void addToDB(ElementInfo element)
-    {
-    	String key = element.getKey();
-	int index = key.indexOf("0.");
-	String displayKey = key.substring(index+2, key.length());
-	if(moduleInfo == null)
-	    moduleInfo = "";
-	if(db.get(key) != null)
-	    {
-		System.out.println("Object: " + displayKey + " already exists. Enter '0' to skip"
-				   +" and '1' to modify this tag.");
-	        while (true)
-		    {
-			try
-			    {
-				int input = -1;
-				input=Integer.valueOf(getString().trim()).intValue();
-				if(input < 0 || input > 1)
-				    {
-					System.out.println("Valid values are 0 or 1. Please try again!");
-					continue;
-				    }
-				else
-				    {
-					if(input == 1)
-					    {
-						Object data = db.get(key);
-						ElementInfo e1 = ElementInfo.getElementInfo((String)data);
-						int version = e1.getVersion();
-						String newKey = modifyKeyValue(key, version);
-						version++;
-						element.setVersion(version);
-						db.remove(key);
-						e1.setKey(newKey);
-						db.put(newKey, e1.toString());
-						addToDB(element);
-					    }
-					break;
-				    }
-			    }
-			catch(NumberFormatException e)
-			    {
-				System.out.println("Not an integer number. Please try again!");
-				continue;
-			    }
-		    }
-	    }
-	else
-	    {
-		if(moduleInfo.equals("skip") == false)
-		    {
-		        System.out.println("Enter information about an element " + key
-					   + " in format: <modulename>, <isPersistent>,"
-					   +"<instancename>. Press an 'Enter' to store null "
-					   + "value, enter  '1' for default value: <Default.class>,<false>. "
-					   +"To skip all tags enter '2'");
-		        moduleInfo = askModuleInfo(key);
-		        if((moduleInfo == null) || (moduleInfo.equals("skip") == false))
-		            element.setModuleInfo(moduleInfo);
-		        else
-		            element.setModuleInfo(defaultModuleInfo);
-		    }
-	        else
-		    {
-		        element.setModuleInfo(defaultModuleInfo);
-		    }
-		System.out.println("Adding: " + key + "  " + element.toString()+ "\n\n");
-		db.put(key, element.toString());
-	    }
-    }
-
-
-
-    /**
- *  Read an input from command line
- */
-
-    public static String getString()
-    {
-	String result = null;
-	try
-	    {
-		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
-		result = br.readLine();
-	    }
-	catch (Exception e)
-	    {
-		System.err.println("Exception in getString:" + e.getMessage());
-	    }
-	return result;
-    }
-
-
-    /**
-   * Provides user the options for adding or removing an entry in the
-   * database.
-   */
-
-    public static void main(String[] args)
-    {
-	if(args.length != 1)
-	    {
-		System.out.println("Usage: java psl.oracle.SchemaInterface <root path>");
-		System.exit(1);
-	    }
-	rootPath = args[0];
-	SchemaInterface schemaInterface1 = new SchemaInterface();
-	int input=0;
-	while(true)
-	    {
-		System.out.println("Choose one from the following options:");
-		System.out.println("1: Add schema fragments from .xsd file to the database");
-		System.out.println("2: Remove a schema fragment from the database");
-		System.out.println("3: Exit");
-		try
-		    {
-			input=Integer.valueOf(getString().trim()).intValue();
-			if(input < 1 || input > 3)
-			    System.out.println("Valid values are [1-3]. Please try again!");
-			else
-			    {
-				switch(input)
-				    {
-				    case 1:
-					try
-					    {
-						schemaInterface1.addFragments();
-					    }
-					catch(Exception e)
-					    {
-						System.err.println("The following exception occurred: " );e.printStackTrace();
-					    }
-					break;
-				    case 2:
-					try
-					    {
-						schemaInterface1.removeFragment();
-					    }
-					catch(UnknownTagException ex)
-					    {
-					    }
-					catch(Exception e)
-					    {
-						System.err.println("The following exception occurred: "); e.printStackTrace();
-					    }
-					break;
-				    case 3:
-					{
-					    db.shutdown();
-					    System.exit(1);
-					}
-				    }
-			    }
-		    }
-		catch(NumberFormatException e)
-		    {
-			System.out.println("Not an integer number. Please try again!");
-		    }
-	    }
-    }
-
-    /**
-  * Writes messages to a log file
-  */
-
-    public void printLog(String msg)
-    {
-	log.println("SchemaInterface: " + msg);
-    }
-
-}
-
-
-
+/*
+
+ * Title: SchemaInterface
+
+ * Description:  Interface for a user to add schema fragments and module information
+
+ *               to oracle database (HSQL). User can enter a file name(.xsd format).
+
+ *               Its format will be validated using IBM's SAX parser and then
+
+ *               user will be prompt to enter module information for each tag.
+
+ *               (module name, isPersistent and instance name). User can skip
+
+ *               this information for individual tag or for all tags to store
+
+ *               the default values or null values. The tags are stored in format
+
+ *               of namespace:element name(if namespace is available) and
+
+ *               element name,path. These are the keys for the database.
+
+ * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
+
+ *                              All Rights Reserved.
+
+ * @author Kanan Naik
+
+ * @version 1.0
+
+ */
+
+
+
+package psl.oracle;
+
+
+
+import java.util.*;
+
+import java.io.*;
+
+import java.lang.*;
+
+
+
+// import com.ibm.xml.parsers.*;
+
+
+
+import org.apache.xerces.parsers.*;
+
+import org.xml.sax.*;
+
+
+
+
+
+/**
+
+ * Intializes database interface
+
+ */
+
+
+
+public class SchemaInterface
+
+{
+
+    String moduleInfo = null;
+
+    String defaultModuleInfo = null;
+
+    String moduleDir = null;
+
+    static DBInterface db = null;
+
+    String dbName = "oracleDB";
+
+    String dbLoc = null;
+
+    PrintWriter log = null;
+
+    static String rootPath = null;
+
+
+
+
+
+    public SchemaInterface()
+
+    {
+
+	//code to read parameters from the property file
+
+	File file = new File(rootPath + File.separator + "oracle.prop");
+
+	// File file = new File("oracle.prop");
+
+	if(!file.exists())
+
+	    {
+
+		file = new File(rootPath + File.separator + "psl" + File.separator + "oracle" + File.separator + "oracle.prop");
+
+		if(!file.exists())
+
+		    {
+
+			System.out.println ("File 'oracle.prop' does not exist");
+
+			System.exit(1);
+
+		    }
+
+	    }
+
+	Properties property = new Properties();
+
+	try
+
+	    {
+
+		property.load(new FileInputStream(file));
+
+	    }
+
+	catch(FileNotFoundException ffe)
+
+	    {
+
+		System.err.println("Exception: " + ffe);
+
+		System.exit(0);
+
+	    }
+
+	catch(IOException ioe)
+
+	    {
+
+		System.err.println("Exception: "+ ioe);
+
+		System.exit(1);
+
+	    }
+
+	moduleInfo = property.getProperty("defaultModuleInfo");
+
+	if(moduleInfo == null || moduleInfo.length() < 1)
+
+	    {
+
+		System.out.println("Parameter 'defaultModuleInfo' must be set in 'oracle.prop' file.");
+
+		System.exit(0);
+
+	    }
+
+	defaultModuleInfo = moduleInfo;
+
+	dbLoc = property.getProperty("dbLocation");
+
+	if(dbLoc == null || dbLoc.length() < 1)
+
+	    {
+
+		System.out.println("Parameter 'dbLocation' must be set in 'oracle.prop' file.");
+
+		System.exit(2);
+
+	    }
+
+	moduleDir = property.getProperty("moduleDir");
+
+        if(moduleDir == null || moduleDir.length() < 1)
+
+	    {
+
+		System.out.println("Parameter 'moduleDir' must be set in 'oracle.prop' file.");
+
+		System.exit(2);
+
+	    }
+
+
+
+	//property file code end here
+
+	try
+
+	    {
+
+		//dbName = dbLoc + File.separator + dbName;
+
+		db = new DBInterface(dbName);
+
+	    }
+
+	catch(Exception e)
+
+	    {
+
+		System.err.println("Exception in database: " + e);
+
+		db.shutdown();
+
+		System.exit(1);
+
+	    }
+
+    }
+
+
+
+
+
+
+
+
+
+    /** Prompts user to add information like module name, if
+
+  	* persistent or not and instance name. Instance name is only
+
+  	* stored if a module is persistent. A user can press "Enter" to
+
+  	* store a null value for current tag or he can enter "1" to
+
+  	* store a default value for a module or he can enter "2" to
+
+  	* store default values for rest of the tags in the file.
+
+  	*/
+
+
+
+    protected String askModuleInfo(String name)
+
+    {
+    	String line = null;
+	    while(true)
+	    {
+        	line = getString();
+        	line = line.trim();
+        	if(line.equals("") == true)
+		    {
+			moduleInfo = null;
+			return moduleInfo;
+		    }
+        	try
+		    {
+          		int input=Integer.valueOf(line).intValue();
+          		if(input < 1 || input > 2)
+			    {
+				System.out.println("Valid values are 1 or 2. Please try again!");
+				continue;
+			    }
+          		else
+			    {
+				if(input == 1)
+				    {
+					return defaultModuleInfo;
+				    }
+				if(input == 2)
+				    {
+					moduleInfo = "skip";
+	      				return moduleInfo;
+				    }
+			    }
+		    }
+        	catch(Exception ex)
+		    {
+		        String isPersistent = "false";
+		        String moduleName = null;
+          		String fileName = null;
+          		String instanceName = null;
+		        File classFile = null;
+        		boolean classExists = false;
+        		Vector moduleVector = new Vector();
+		        StringTokenizer st = new StringTokenizer(line, ",");
+			    if(st.hasMoreElements())
+			        isPersistent = st.nextToken();
+				else
+				    {
+					System.out.println("Number of parameters is not valid");
+					continue;
+				    }
+				isPersistent = isPersistent.trim();
+				if(!(isPersistent.equals("true") || isPersistent.equals("false")))
+				    {
+					System.out.println("Value of isPersistent is niether true nor false OR "
+							   +"you have entered an instance name for a non "
+							   +"persistent module");
+					continue;
+				    }
+				boolean instance = st.hasMoreElements();
+				if(instance && (isPersistent.equals("true")== true))
+				    {
+					instanceName = st.nextToken();
+				    }
+				else if(!instance && (isPersistent.equals("true")== true))
+				    {
+					System.out.println("Instance name must be present if a module "
+							   + "is persistent");
+					continue;
+				    }
+				if(st.hasMoreElements())
+				    moduleName = st.nextToken();
+				else
+				{
+				    System.out.println("At least one module must present with "
+                                    + "instance name");
+					continue;
+				}
+				fileName = rootPath + File.separator + moduleDir + File.separator + moduleName;
+  			    classFile = new File(fileName);
+  			    classExists = classFile.exists();
+  			    if(classExists == false)
+				  {
+				  System.out.println("No class exists with the name: " + fileName
+				  +" Please enter again.");
+    			  continue;
+	    		  }
+	    		moduleVector.addElement(moduleName);
+	    		boolean mainLoop = false;
+	    	    while(st.hasMoreElements())
+	    	    {
+				    moduleName = st.nextToken();
+				    fileName = rootPath + File.separator + moduleDir + File.separator + moduleName;
+  			        classFile = new File(fileName);
+  			        classExists = classFile.exists();
+  			        if(classExists == false)
+				    {
+				    System.out.println("No class exists with the name: " + fileName
+				    +" Please enter again.");
+				    mainLoop = true;
+    			    break;
+	    		    }
+	    		    moduleVector.addElement(moduleName);
+	    		}
+	    		if(mainLoop)
+	    		    continue;
+	    		String moduleString = "";
+	    		for(Enumeration e =
+moduleVector.elements();e.hasMoreElements();)
+                {
+                    if(moduleString == "")
+                        moduleString = e.nextElement().toString();
+                    else
+                        moduleString = moduleString + "," + e.nextElement();
+                }
+                if (instanceName != null)
+				    moduleInfo = isPersistent+","+instanceName+","+moduleString;
+				else
+				    moduleInfo = isPersistent+","+moduleString;
+				return moduleInfo;
+    	    }
+	    }
+    }
+
+
+
+
+
+    /**
+
+ 	* This method is used to remove a record from the database. User has
+
+ 	* to specified a key value in order to delete an entry. The key format
+
+ 	* can be either namespace:element or element,path.
+
+ 	*/
+
+
+
+    protected void removeFragment()throws UnknownTagException
+
+    {
+
+    	System.out.println("Enter the key value of a Schema fragment you want to "
+
+			   + "remove. Format: <namespace>:<tag name> OR <tag "
+
+			   + "name>,<path>");
+
+	String name = getString();
+
+    	name = name.trim();
+
+	String key = "0." + name;
+
+    	Object data = db.get(key);
+
+	if(data == null)
+
+	    {
+
+        	throw new UnknownTagException("There is no schema entry for the "
+
+					      + "tag " + name + " in the Oracle.");
+
+	    }
+
+    	ElementInfo e1 = ElementInfo.getElementInfo((String)data);
+
+	int version = -1;
+
+    	String newVersion = String.valueOf(version);
+
+	newVersion = newVersion.trim();
+
+    	int index = key.indexOf('.');
+
+	String newKey = newVersion + "." + key.substring(index+1, key.length());
+
+    	db.remove(key);
+
+	e1.setKey(newKey);
+
+    	System.out.println("Deleting " + name);
+
+	db.put(newKey, e1.toString());
+
+    }
+
+
+
+
+
+
+
+    /** This method is called when a user wants to add schema
+
+  	* fragments to the database. User is promted to enter
+
+  	* data for every element name. .xsd file entered by a user
+
+  	* will be validated using IBM's SAX parser.
+
+  	*/
+
+
+
+    protected void addFragments()
+
+	throws IOException, FileNotFoundException
+
+    {
+
+    	System.out.println("Enter the name of a Schema document(.xsd format)");
+
+	String moduleInfo = defaultModuleInfo;
+
+    	String fileName = getString();
+
+	BufferedReader inLine = null;
+
+    	BufferedWriter outLine = null;
+
+	try
+
+	    {
+
+		inLine = new BufferedReader(new FileReader(fileName));
+
+		outLine = new BufferedWriter(new FileWriter("oracletemp.txt"));
+
+	    }
+
+	catch (Exception e)
+
+	    {
+
+		System.err.println("Error on file read/write:" + e.getMessage());
+
+		return;
+
+	    }
+
+	String line  = inLine.readLine();
+
+    	String mainBuffer = "";
+
+	if(line != null)
+
+    	    line = line.trim();
+
+	else
+
+	    {
+
+        	System.out.println("Format of .xsd file is not valid. Tag <schema> "
+
+				   + "is expected.");
+
+	        db.shutdown();
+
+		System.exit(1);
+
+	    }
+
+    	while(line != null)
+
+	    {
+
+        	outLine.write(line, 0, line.length());
+
+		mainBuffer = mainBuffer + line;
+
+		outLine.write("\n");
+
+        	line = inLine.readLine();
+
+	    }
+
+	outLine.close();
+
+    	inLine.close();
+
+	FileInputStream is = new FileInputStream("oracletemp.txt");
+
+        //Verify the format of schema file.
+
+    	try
+
+	    {
+
+        	SAXParser parser = new SAXParser();
+
+	        parser.parse(new InputSource(is));
+
+	    }
+
+    	catch(Exception e)
+
+	    {
+
+		System.err.println(e);
+
+        	return;
+
+	    }
+
+    	System.out.println("Schema document validation is successfull.");
+
+	is.close();
+
+    	processFile("oracletemp.txt", mainBuffer);
+
+    	return;
+
+    }
+
+
+
+
+
+    /**
+
+	* .xsd file is processed by this method. It will generate a proper
+
+	* key value by computing a path for each element. It also parses
+
+	* a file to store a schema fragment for each element.
+
+	*/
+
+
+
+    public void processFile(String fileName, String mainBuffer)throws IOException,
+
+    FileNotFoundException
+
+    {
+
+    	BufferedReader inLine = new BufferedReader(new FileReader(fileName));
+
+	String line = inLine.readLine();
+
+    	String mainPath = "";
+
+	int level = -1;
+
+    	int index = -1;
+
+	int index1 = -1;
+
+    	int index2 = -1;
+
+	int j = -1;
+
+    	int i = -1;
+
+	Vector element = new Vector(10);
+
+    	Hashtable paths = new Hashtable();
+
+	String elementName = null;
+
+    	String typeName = null;
+
+	String namespace = null;
+
+    	while(line != null)
+
+	    {
+
+		index = line.indexOf("element");
+
+        	if(index != -1) //element
+
+		    {
+
+			j=index+8;
+
+			if(line.length() > j + 4 )
+
+			    {
+
+				while (line.charAt(j) == ' ')
+
+				    {
+
+					j++;
+
+				    }
+
+				if((line.charAt(j) == 'n') && (line.charAt(j+1) == 'a') &&
+
+				   (line.charAt(j+2) == 'm') && (line.charAt(j+3) == 'e'))
+
+				    {
+
+					level = level + 1;
+
+					ElementInfo e11 = new ElementInfo();
+
+					e11.setFragment(mainBuffer);
+
+					element.add(level, e11);
+
+					index1 = line.indexOf("<");
+
+					index2 = line.indexOf(":");
+
+					if((index1 != -1) && (index2 != -1) && (index2 < index))
+
+					    {
+
+						namespace = line.substring(index1+1, index2);
+
+						namespace = namespace.trim();
+
+					    }
+
+					else
+
+					    {
+
+						namespace = null;
+
+					    }
+
+					index1 = line.indexOf('"');
+
+					if(index1 != -1)
+
+					    index2 = line.indexOf('"', index1+1);
+
+					else
+
+					    {
+
+						index1 = line.indexOf("'");
+
+						index2 = line.indexOf("'", index1+1);
+
+					    }
+
+					elementName = line.substring(index1+1, index2);
+
+					for(i=0; i<=level; i++)
+
+					    {
+
+						ElementInfo e = (ElementInfo) element.get(i);
+
+						element.set(i, e);
+
+					    }
+
+					ElementInfo e1 = (ElementInfo)element.get(level);
+
+					mainPath = mainPath.concat("/" + elementName);
+
+					if(paths.get(elementName) == null)
+
+					    {
+
+						e1.setPath(mainPath);
+
+					    }
+
+					else
+
+					    {
+
+						String temp = (String)paths.get(elementName);
+
+						e1.setPath(temp);
+
+					    }
+
+					e1.setKey("0." + elementName + "," + e1.getPath());
+
+					element.set(level, e1);
+
+					index1 = line.indexOf("/>");
+
+					ElementInfo e = (ElementInfo) element.get(level);
+
+					if(index1 != -1)
+
+					    {
+
+						addToDB(e);
+
+					    }
+
+					if(namespace != null)
+
+					    {
+
+						e.setKey("0." + namespace + ":" + elementName);
+
+						if(index1 != -1)
+
+						    {
+
+							addToDB(e);
+
+						    }
+
+					    }
+
+					if(index1 != -1)
+
+					    {
+
+						element.remove(level);
+
+						int indexPath = mainPath.indexOf("/" + elementName);
+
+						mainPath = mainPath.substring(0, indexPath);
+
+						level --;
+
+					    }
+
+				    }
+
+				else if((line.charAt(j) == 'r') && (line.charAt(j+1) == 'e') &&
+
+					(line.charAt(j+2) == 'f')) //if element ref found
+
+				    {
+
+					index1 = line.indexOf('"');
+
+					if (index1 == -1)
+
+					    {
+
+						index1 = line.indexOf("'");
+
+					    }
+
+					index2 = line.indexOf('"', index1+2);
+
+					if(index2 == -1)
+
+					    {
+
+						index2 = line.indexOf("'", index1+2);
+
+					    }
+
+					elementName = line.substring(index1+1, index2);
+
+					int indexPath = mainPath.lastIndexOf('/');
+
+					String parent =mainPath.substring(indexPath+1, mainPath.length());
+
+					String path = (String)paths.get(parent);
+
+					if( path != null)
+
+					    path = path.concat("/" + elementName);
+
+					else
+
+					    path = mainPath.concat("/" + elementName);
+
+					paths.put(elementName, path);
+
+					for(i=0; i<=level; i++)
+
+					    {
+
+						ElementInfo e = (ElementInfo) element.get(i);
+
+						element.set(i, e);
+
+					    }
+
+				    }
+
+			    }  //name not found
+
+			else if((line.indexOf("element>")) != -1)
+
+			    {
+
+				for(i=0; i<=level; i++)
+
+				    {
+
+					ElementInfo e = (ElementInfo) element.get(i);
+
+					element.set(i, e);
+
+				    }
+
+				ElementInfo e = (ElementInfo) element.get(level);
+
+				String key = e.getKey();
+
+				addToDB(e);
+
+				index = key.indexOf(':');
+
+				index1 = key.indexOf("0.");
+
+				if(index != -1) //namespace is not null
+
+				    {
+
+					elementName = key.substring(index+1, key.length());
+
+					e.setKey("0." + elementName + "," + e.getPath());
+
+					addToDB(e);
+
+				    }
+
+				else
+
+				    {
+
+					index = key.indexOf(',');
+
+					elementName = key.substring(index1+2, index);
+
+				    }
+
+				int inNamespace = elementName.indexOf(':');
+
+				String tagName = elementName.substring(inNamespace+1, elementName.length());
+
+				int indexPath = mainPath.indexOf("/" + tagName);
+
+				mainPath = mainPath.substring(0, indexPath);
+
+				element.remove(level);
+
+				level --;
+
+			    }
+
+		    } //element found
+
+		else if(line.indexOf(" name=") != -1) //check for type
+
+		    {
+
+			String type = null;
+
+			if(line.indexOf("type name=") != -1)
+
+			    {
+
+				index = line.indexOf("type name=");
+
+				type = "type";
+
+			    }
+
+			else if(line.indexOf("complexType name=") != -1)
+
+			    {
+
+				index = line.indexOf("complexType name=");
+
+				type = "complexType";
+
+			    }
+
+			else if(line.indexOf("simpleType name=") != -1)
+
+			    {
+
+				index = line.indexOf("simpleType name=");
+
+				type = "simpleType";
+
+			    }
+
+			if(type != null) //avoid "attribute name"
+
+			    {
+
+				index1 = line.indexOf("<");
+
+				index2 = line.indexOf(":");
+
+				if((index1 != -1) && (index2 != -1) && (index2 < index))
+
+				    {
+
+					namespace = line.substring(index1+1, index2);
+
+					namespace = namespace.trim();
+
+				    }
+
+				else
+
+				    {
+
+					namespace = null;
+
+				    }
+
+				index1 = line.indexOf('"');
+
+				if (index1 == -1)
+
+				    {
+
+					index1 = line.indexOf("'");
+
+				    }
+
+				index2 = line.indexOf('"', index1+2);
+
+				if(index2 == -1)
+
+				    {
+
+					index2 = line.indexOf("'", index1+2);
+
+				    }
+
+				typeName = line.substring(index1+1, index2);
+
+				level = level + 1;
+
+				element.add(level, new ElementInfo());
+
+				for(i=0; i<=level; i++)
+
+				    {
+
+					ElementInfo e = (ElementInfo) element.get(i);
+
+					element.set(i, e);
+
+				    }
+
+				ElementInfo e1 = (ElementInfo)element.get(level);
+
+				String key = null;
+
+				if(namespace != null)
+
+				    key = "0." + namespace + ":" + type + "=" + typeName;
+
+				else
+
+				    key = "0." + type + "=" + typeName;
+
+				e1.setKey(key);
+
+				element.set(level, e1);
+
+				index1 = line.indexOf("/>");
+
+				if(index1 != -1)
+
+				    {
+
+					ElementInfo e = (ElementInfo) element.get(level);
+
+					addToDB(e);
+
+				    }
+
+			    }
+
+			else
+
+			    {
+
+				for(i=0; i<=level; i++)
+
+				    {
+
+					ElementInfo e = (ElementInfo) element.get(i);
+
+					element.set(i, e);
+
+				    }
+
+			    }
+
+		    }
+
+	        else if((line.indexOf("</type>") != -1) || (line.indexOf("simpleType>") != -1)
+
+			|| (line.indexOf("complexType>")!= -1) || (line.indexOf(":type>") != -1))
+
+		    {
+
+			for(i=0; i<=level; i++)
+
+			    {
+
+				ElementInfo e = (ElementInfo) element.get(i);
+
+				element.set(i, e);
+
+			    }
+
+			ElementInfo e = (ElementInfo) element.get(level);
+
+			if(e.getKey().indexOf("ype=") != -1) //to avoid  <type> </type> kind of constructs
+
+			    {
+
+				addToDB(e);
+
+				element.remove(level);
+
+				level --;
+
+			    }
+
+		    }
+
+	        else //element and type are not found
+
+		    {
+
+			for(i=0; i<=level; i++)
+
+			    {
+
+				ElementInfo e = (ElementInfo) element.get(i);
+
+				element.set(i, e);
+
+			    }
+
+		    }
+
+	        line = inLine.readLine();
+
+	    }
+
+	return;
+
+    }
+
+
+
+
+
+    /**
+
+  	* This method is used to increase the version value for the tags.
+
+  	*/
+
+
+
+    public String modifyKeyValue(String key, int version)
+
+    {
+
+	int index = key.indexOf('.');
+
+	version++;
+
+	String newVersion = String.valueOf(version);
+
+	newVersion = newVersion.trim();
+
+	String newKey = newVersion + "." + key.substring(index+1, key.length());
+
+	return newKey;
+
+    }
+
+
+
+
+
+
+
+    /**
+
+	* This method is called by processFile() method. It receives
+
+	* an element information in form of a key and a fragment. It stores
+
+	* an element in the database. This method also allows a user to
+
+	* modify or overwrite an existing element. The previous entry will
+
+	* be stored with a corresponding version number (depending upon the
+
+	* number of times an entry was modified).
+
+	*/
+
+
+
+    public void addToDB(ElementInfo element)
+
+    {
+
+    	String key = element.getKey();
+
+	int index = key.indexOf("0.");
+
+	String displayKey = key.substring(index+2, key.length());
+
+	if(moduleInfo == null)
+
+	    moduleInfo = "";
+
+	if(db.get(key) != null)
+
+	    {
+
+		System.out.println("Object: " + displayKey + " already exists. Enter '0' to skip"
+
+				   +" and '1' to modify this tag.");
+
+	        while (true)
+
+		    {
+
+			try
+
+			    {
+
+				int input = -1;
+
+				input=Integer.valueOf(getString().trim()).intValue();
+
+				if(input < 0 || input > 1)
+
+				    {
+
+					System.out.println("Valid values are 0 or 1. Please try again!");
+
+					continue;
+
+				    }
+
+				else
+
+				    {
+
+					if(input == 1)
+
+					    {
+
+						Object data = db.get(key);
+
+						ElementInfo e1 = ElementInfo.getElementInfo((String)data);
+
+						int version = e1.getVersion();
+
+						String newKey = modifyKeyValue(key, version);
+
+						version++;
+
+						element.setVersion(version);
+
+						db.remove(key);
+
+						e1.setKey(newKey);
+
+						db.put(newKey, e1.toString());
+
+						addToDB(element);
+
+					    }
+
+					break;
+
+				    }
+
+			    }
+
+			catch(NumberFormatException e)
+
+			    {
+
+				System.out.println("Not an integer number. Please try again!");
+
+				continue;
+
+			    }
+
+		    }
+
+	    }
+
+	else
+
+	    {
+
+		if(moduleInfo.equals("skip") == false)
+
+		    {
+
+		        System.out.println("Enter information about an element " + key
+
+					   + " in format: <isPersistent>,[<instancename>],<modulename>"
+					   +"[<modulename> ... ]. Press an 'Enter' to store null "
+
+					   + "value, enter  '1' for default value: <Default.class>,<false>. "
+
+					   +"To skip all tags enter '2'");
+
+		        moduleInfo = askModuleInfo(key);
+
+		        if((moduleInfo == null) || (moduleInfo.equals("skip") == false))
+
+		            element.setModuleInfo(moduleInfo);
+
+		        else
+
+		            element.setModuleInfo(defaultModuleInfo);
+
+		    }
+
+	        else
+
+		    {
+
+		        element.setModuleInfo(defaultModuleInfo);
+
+		    }
+
+		System.out.println("Adding: " + key + "  " + element.toString()+ "\n\n");
+
+		db.put(key, element.toString());
+
+	    }
+
+    }
+
+
+
+
+
+
+
+    /**
+
+ *  Read an input from command line
+
+ */
+
+
+
+    public static String getString()
+
+    {
+
+	String result = null;
+
+	try
+
+	    {
+
+		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+
+		result = br.readLine();
+
+	    }
+
+	catch (Exception e)
+
+	    {
+
+		System.err.println("Exception in getString:" + e.getMessage());
+
+	    }
+
+	return result;
+
+    }
+
+
+
+
+
+    /**
+
+   * Provides user the options for adding or removing an entry in the
+
+   * database.
+
+   */
+
+
+
+    public static void main(String[] args)
+
+    {
+
+	if(args.length != 1)
+
+	    {
+
+		System.out.println("Usage: java psl.oracle.SchemaInterface <root path>");
+
+		System.exit(1);
+
+	    }
+
+	rootPath = args[0];
+
+	SchemaInterface schemaInterface1 = new SchemaInterface();
+
+	int input=0;
+
+	while(true)
+
+	    {
+
+		System.out.println("Choose one from the following options:");
+
+		System.out.println("1: Add schema fragments from .xsd file to the database");
+
+		System.out.println("2: Remove a schema fragment from the database");
+
+		System.out.println("3: Exit");
+
+		try
+
+		    {
+
+			input=Integer.valueOf(getString().trim()).intValue();
+
+			if(input < 1 || input > 3)
+
+			    System.out.println("Valid values are [1-3]. Please try again!");
+
+			else
+
+			    {
+
+				switch(input)
+
+				    {
+
+				    case 1:
+
+					try
+
+					    {
+
+						schemaInterface1.addFragments();
+
+					    }
+
+					catch(Exception e)
+
+					    {
+
+						System.err.println("The following exception occurred: " );e.printStackTrace();
+
+					    }
+
+					break;
+
+				    case 2:
+
+					try
+
+					    {
+
+						schemaInterface1.removeFragment();
+
+					    }
+
+					catch(UnknownTagException ex)
+
+					    {
+
+					    }
+
+					catch(Exception e)
+
+					    {
+
+						System.err.println("The following exception occurred: "); e.printStackTrace();
+
+					    }
+
+					break;
+
+				    case 3:
+
+					{
+
+					    db.shutdown();
+
+					    System.exit(1);
+
+					}
+
+				    }
+
+			    }
+
+		    }
+
+		catch(NumberFormatException e)
+
+		    {
+
+			System.out.println("Not an integer number. Please try again!");
+
+		    }
+
+	    }
+
+    }
+
+
+
+    /**
+
+  * Writes messages to a log file
+
+  */
+
+
+
+    public void printLog(String msg)
+
+    {
+
+	log.println("SchemaInterface: " + msg);
+
+    }
+
+
+
+}
+
+
+
+
+
+
+
diff --git a/SendOracleReply.java b/SendOracleReply.java
index 5a721ce..d6e59d8 100644
--- a/SendOracleReply.java
+++ b/SendOracleReply.java
@@ -1,49 +1,82 @@
-/**
- * Title: SendOracleReply
- * Description: This class will be used to implement a mechanism to
- *              send the modules or module URI to Metaparser. At present
- *              it is not used but it will be modify to incorporate
- *              Worklets functionality or other mechanism used to transfer
- *              the data to Metaparser.
- * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
- *                              All Rights Reserved.
- * Company:      <p>
- * @author Kanan Naik
- * @version 1.0
- */
-
-
-
-package psl.oracle;
-
-import java.io.*;
-
-public class SendOracleReply
-{
-  /**
-   * Constructor
-   */
-  public SendOracleReply()
-  {
-  }
-
-  /**
-   * This method must be called in order to send back the Schemafragment
-   * object.
-   */
-
-  public String sendReply(String key, String MPHost, String name, String moduleName)
-  {
-    String msg = null;
-    String fileName = moduleName;
-    File classFile = new File(fileName);
-    boolean classExists = classFile.exists();
-    if(classExists == false)
-    {
-      msg = "Exception occured at Oracle: Module name specified does not exists.";
-      return msg;
-    }
-    SendWorklet.send(key, MPHost, name, fileName);
-    return null;
-  }
-}
+/**
+
+ * Title: SendOracleReply
+
+ * Description: This class will be used to implement a mechanism to
+
+ *              send the modules or module URI to Metaparser. At present
+
+ *              it is not used but it will be modify to incorporate
+
+ *              Worklets functionality or other mechanism used to transfer
+
+ *              the data to Metaparser.
+
+ * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
+
+ *                              All Rights Reserved.
+
+ * Company:      <p>
+
+ * @author Kanan Naik
+
+ * @version 1.0
+
+ */
+
+
+
+
+
+
+
+package psl.oracle;
+
+
+
+import java.io.*;
+import java.util.*;
+
+
+public class SendOracleReply
+
+{
+
+  /**
+
+   * Constructor
+
+   */
+
+  public SendOracleReply()
+
+  {
+
+  }
+
+
+
+  /**
+
+   * This method must be called in order to send back the Schemafragment
+
+   * object.
+
+   */
+
+
+
+  public String sendReply(String key, String MPHost, String name, Vector moduleName)
+
+  {
+
+    String msg = null;
+
+    SendWorklet.send(key, MPHost, name, moduleName);
+
+    return null;
+
+  }
+
+}
+
diff --git a/SendWorklet.java b/SendWorklet.java
index c6568e5..f4c2363 100644
--- a/SendWorklet.java
+++ b/SendWorklet.java
@@ -1,48 +1,96 @@
-/*
- * Title: SendWorklet
- * Description:  This class is used to send a Worklet to MP. This Worklet
- *               carries tag-processors with it.
- * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
- *                              All Rights Reserved.
- * @author Kanan Naik
- * @version 1.0
- */
-
-package psl.oracle;
-
-import psl.worklets.*;
-import psl.codetransfer.*;
-
-import java.util.*;
-
-public class SendWorklet {
-
-    static WVM wvm;
-
-    public SendWorklet (String host, String name)
-    {
-	wvm = new WVM(this, host, name);
-    }
-
-    public static void send(String key, String rHost, String rName, String moduleName) {
-    //WVM wvm = new WVM(this, host, name);
-    {
-      // this code block creates the Vector of classfile locations to send out
-      Worklet wkl = new Worklet(null);
-      //System.out.println("module " +moduleName);
-      Vector v = new Vector();
-      v.add(moduleName);
-      System.out.println("Creating CFRWJ");
-      CFRWJ wj = new CFRWJ(key, v, rHost, rName);
-
-      System.out.println("Adding CFRWJ to WKL");
-      wkl.addJunction(wj);
-
-      System.out.println("Deploying WKL w/ CFRWJ");
-      wkl.deployWorklet(wvm);
-    }
-  }
-
-}
-
-
+/*
+
+ * Title: SendWorklet
+
+ * Description:  This class is used to send a Worklet to MP. This Worklet
+
+ *               carries tag-processors with it.
+
+ * Copyright (c) 2000: The Trustees of Columbia University and the City of New York.
+
+ *                              All Rights Reserved.
+
+ * @author Kanan Naik
+
+ * @version 1.0
+
+ */
+
+
+
+package psl.oracle;
+
+
+
+import psl.worklets.*;
+
+import psl.codetransfer.*;
+
+
+
+import java.util.*;
+
+
+
+public class SendWorklet {
+
+
+
+    static WVM wvm;
+
+
+
+    public SendWorklet (String host, String name)
+
+    {
+
+	wvm = new WVM(this, host, name);
+
+    }
+
+
+
+    public static void send(String key, String rHost, String rName, Vector moduleName) {
+
+    //WVM wvm = new WVM(this, host, name);
+
+    {
+
+      // this code block creates the Vector of classfile locations to send out
+
+      Worklet wkl = new Worklet(null);
+
+      //System.out.println("module " +moduleName);
+
+      //Vector v = new Vector();
+
+      //v.add(moduleName);
+
+      System.out.println("Creating CFRWJ");
+
+      CFRWJ wj = new CFRWJ(key, moduleName, rHost, rName);
+
+
+
+      System.out.println("Adding CFRWJ to WKL");
+
+      wkl.addJunction(wj);
+
+
+
+      System.out.println("Deploying WKL w/ CFRWJ");
+
+      wkl.deployWorklet(wvm);
+
+    }
+
+  }
+
+
+
+}
+
+
+
+
+
diff --git a/oracle.prop b/oracle.prop
index dda9438..27fd15a 100644
--- a/oracle.prop
+++ b/oracle.prop
@@ -1,4 +1,4 @@
 dbLocation=psl/oracle
 moduleDir=psl/oracle/modules
-defaultModuleInfo=tagprocessor.jar,false
+defaultModuleInfo=false,tagprocessor.jar

diff --git a/oracleDB.properties b/oracleDB.properties
index ecda3d6..19ac9fa 100644
--- a/oracleDB.properties
+++ b/oracleDB.properties
@@ -1,4 +1,4 @@
-#Hypersonic SQL database
-#Wed Apr 04 16:50:17 EDT 2001
-version=1.4
-modified=no
+#Hypersonic SQL database
+#Thu May 03 19:09:10 EDT 2001
+version=1.4
+modified=no
diff --git a/oracleDB.script b/oracleDB.script
index a33a2b8..5a166df 100644
--- a/oracleDB.script
+++ b/oracleDB.script
@@ -1,75 +1,97 @@
-CREATE TABLE ORACLEDB(KEY VARCHAR,ELEMENT VARCHAR)
-GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC
-GRANT ALL ON CLASS "org.hsql.Library" TO PUBLIC
-CREATE USER SA PASSWORD "" ADMIN
-CREATE ALIAS DAYNAME FOR "org.hsql.Library.dayname"
-CREATE ALIAS SPACE FOR "org.hsql.Library.space"
-CREATE ALIAS SUBSTRING FOR "org.hsql.Library.substring"
-CREATE ALIAS SQRT FOR "java.lang.Math.sqrt"
-CREATE ALIAS ABS FOR "java.lang.Math.abs"
-CREATE ALIAS POWER FOR "java.lang.Math.pow"
-CREATE ALIAS CHAR FOR "org.hsql.Library.character"
-CREATE ALIAS CONCAT FOR "org.hsql.Library.concat"
-CREATE ALIAS PI FOR "org.hsql.Library.pi"
-CREATE ALIAS SECOND FOR "org.hsql.Library.second"
-CREATE ALIAS TRUNCATE FOR "org.hsql.Library.truncate"
-CREATE ALIAS MONTH FOR "org.hsql.Library.month"
-CREATE ALIAS LOWER FOR "org.hsql.Library.lcase"
-CREATE ALIAS ATAN2 FOR "java.lang.Math.atan2"
-CREATE ALIAS REPEAT FOR "org.hsql.Library.repeat"
-CREATE ALIAS DAYOFMONTH FOR "org.hsql.Library.dayofmonth"
-CREATE ALIAS TAN FOR "java.lang.Math.tan"
-CREATE ALIAS RADIANS FOR "java.lang.Math.toRadians"
-CREATE ALIAS FLOOR FOR "java.lang.Math.floor"
-CREATE ALIAS NOW FOR "org.hsql.Library.now"
-CREATE ALIAS ACOS FOR "java.lang.Math.acos"
-CREATE ALIAS DAYOFWEEK FOR "org.hsql.Library.dayofweek"
-CREATE ALIAS CEILING FOR "java.lang.Math.ceil"
-CREATE ALIAS DAYOFYEAR FOR "org.hsql.Library.dayofyear"
-CREATE ALIAS LCASE FOR "org.hsql.Library.lcase"
-CREATE ALIAS WEEK FOR "org.hsql.Library.week"
-CREATE ALIAS SOUNDEX FOR "org.hsql.Library.soundex"
-CREATE ALIAS ASIN FOR "java.lang.Math.asin"
-CREATE ALIAS LOCATE FOR "org.hsql.Library.locate"
-CREATE ALIAS EXP FOR "java.lang.Math.exp"
-CREATE ALIAS MONTHNAME FOR "org.hsql.Library.monthname"
-CREATE ALIAS YEAR FOR "org.hsql.Library.year"
-CREATE ALIAS LEFT FOR "org.hsql.Library.left"
-CREATE ALIAS ROUNDMAGIC FOR "org.hsql.Library.roundMagic"
-CREATE ALIAS BITOR FOR "org.hsql.Library.bitor"
-CREATE ALIAS LTRIM FOR "org.hsql.Library.ltrim"
-CREATE ALIAS COT FOR "org.hsql.Library.cot"
-CREATE ALIAS COS FOR "java.lang.Math.cos"
-CREATE ALIAS MOD FOR "org.hsql.Library.mod"
-CREATE ALIAS SIGN FOR "org.hsql.Library.sign"
-CREATE ALIAS DEGREES FOR "java.lang.Math.toDegrees"
-CREATE ALIAS LOG FOR "java.lang.Math.log"
-CREATE ALIAS SIN FOR "java.lang.Math.sin"
-CREATE ALIAS CURTIME FOR "org.hsql.Library.curtime"
-CREATE ALIAS DIFFERENCE FOR "org.hsql.Library.difference"
-CREATE ALIAS INSERT FOR "org.hsql.Library.insert"
-CREATE ALIAS DATABASE FOR "org.hsql.Library.database"
-CREATE ALIAS MINUTE FOR "org.hsql.Library.minute"
-CREATE ALIAS HOUR FOR "org.hsql.Library.hour"
-CREATE ALIAS IDENTITY FOR "org.hsql.Library.identity"
-CREATE ALIAS QUARTER FOR "org.hsql.Library.quarter"
-CREATE ALIAS CURDATE FOR "org.hsql.Library.curdate"
-CREATE ALIAS BITAND FOR "org.hsql.Library.bitand"
-CREATE ALIAS USER FOR "org.hsql.Library.user"
-CREATE ALIAS UCASE FOR "org.hsql.Library.ucase"
-CREATE ALIAS RTRIM FOR "org.hsql.Library.rtrim"
-CREATE ALIAS LOG10 FOR "org.hsql.Library.log10"
-CREATE ALIAS RIGHT FOR "org.hsql.Library.right"
-CREATE ALIAS ATAN FOR "java.lang.Math.atan"
-CREATE ALIAS UPPER FOR "org.hsql.Library.ucase"
-CREATE ALIAS ASCII FOR "org.hsql.Library.ascii"
-CREATE ALIAS RAND FOR "java.lang.Math.random"
-CREATE ALIAS LENGTH FOR "org.hsql.Library.length"
-CREATE ALIAS ROUND FOR "org.hsql.Library.round"
-CREATE ALIAS REPLACE FOR "org.hsql.Library.replace"
-INSERT INTO ORACLEDB VALUES('0.to,/smtp/to','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
-INSERT INTO ORACLEDB VALUES('0.from,/smtp/from','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
-INSERT INTO ORACLEDB VALUES('0.subject,/smtp/subject','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
-INSERT INTO ORACLEDB VALUES('0.sent,/smtp/sent','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
-INSERT INTO ORACLEDB VALUES('0.received,/smtp/received','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
-INSERT INTO ORACLEDB VALUES('0.smtp,/smtp','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
+CREATE TABLE ORACLEDB(KEY VARCHAR,ELEMENT VARCHAR)
+GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC
+GRANT ALL ON CLASS "org.hsql.Library" TO PUBLIC
+CREATE USER SA PASSWORD "" ADMIN
+CREATE ALIAS DAYNAME FOR "org.hsql.Library.dayname"
+CREATE ALIAS SPACE FOR "org.hsql.Library.space"
+CREATE ALIAS SUBSTRING FOR "org.hsql.Library.substring"
+CREATE ALIAS SQRT FOR "java.lang.Math.sqrt"
+CREATE ALIAS ABS FOR "java.lang.Math.abs"
+CREATE ALIAS POWER FOR "java.lang.Math.pow"
+CREATE ALIAS CHAR FOR "org.hsql.Library.character"
+CREATE ALIAS CONCAT FOR "org.hsql.Library.concat"
+CREATE ALIAS PI FOR "org.hsql.Library.pi"
+CREATE ALIAS SECOND FOR "org.hsql.Library.second"
+CREATE ALIAS TRUNCATE FOR "org.hsql.Library.truncate"
+CREATE ALIAS MONTH FOR "org.hsql.Library.month"
+CREATE ALIAS LOWER FOR "org.hsql.Library.lcase"
+CREATE ALIAS ATAN2 FOR "java.lang.Math.atan2"
+CREATE ALIAS REPEAT FOR "org.hsql.Library.repeat"
+CREATE ALIAS DAYOFMONTH FOR "org.hsql.Library.dayofmonth"
+CREATE ALIAS TAN FOR "java.lang.Math.tan"
+CREATE ALIAS RADIANS FOR "java.lang.Math.toRadians"
+CREATE ALIAS FLOOR FOR "java.lang.Math.floor"
+CREATE ALIAS NOW FOR "org.hsql.Library.now"
+CREATE ALIAS ACOS FOR "java.lang.Math.acos"
+CREATE ALIAS DAYOFWEEK FOR "org.hsql.Library.dayofweek"
+CREATE ALIAS CEILING FOR "java.lang.Math.ceil"
+CREATE ALIAS DAYOFYEAR FOR "org.hsql.Library.dayofyear"
+CREATE ALIAS LCASE FOR "org.hsql.Library.lcase"
+CREATE ALIAS WEEK FOR "org.hsql.Library.week"
+CREATE ALIAS SOUNDEX FOR "org.hsql.Library.soundex"
+CREATE ALIAS ASIN FOR "java.lang.Math.asin"
+CREATE ALIAS LOCATE FOR "org.hsql.Library.locate"
+CREATE ALIAS EXP FOR "java.lang.Math.exp"
+CREATE ALIAS MONTHNAME FOR "org.hsql.Library.monthname"
+CREATE ALIAS YEAR FOR "org.hsql.Library.year"
+CREATE ALIAS LEFT FOR "org.hsql.Library.left"
+CREATE ALIAS ROUNDMAGIC FOR "org.hsql.Library.roundMagic"
+CREATE ALIAS BITOR FOR "org.hsql.Library.bitor"
+CREATE ALIAS LTRIM FOR "org.hsql.Library.ltrim"
+CREATE ALIAS COT FOR "org.hsql.Library.cot"
+CREATE ALIAS COS FOR "java.lang.Math.cos"
+CREATE ALIAS MOD FOR "org.hsql.Library.mod"
+CREATE ALIAS SIGN FOR "org.hsql.Library.sign"
+CREATE ALIAS DEGREES FOR "java.lang.Math.toDegrees"
+CREATE ALIAS LOG FOR "java.lang.Math.log"
+CREATE ALIAS SIN FOR "java.lang.Math.sin"
+CREATE ALIAS CURTIME FOR "org.hsql.Library.curtime"
+CREATE ALIAS DIFFERENCE FOR "org.hsql.Library.difference"
+CREATE ALIAS INSERT FOR "org.hsql.Library.insert"
+CREATE ALIAS DATABASE FOR "org.hsql.Library.database"
+CREATE ALIAS MINUTE FOR "org.hsql.Library.minute"
+CREATE ALIAS HOUR FOR "org.hsql.Library.hour"
+CREATE ALIAS IDENTITY FOR "org.hsql.Library.identity"
+CREATE ALIAS QUARTER FOR "org.hsql.Library.quarter"
+CREATE ALIAS CURDATE FOR "org.hsql.Library.curdate"
+CREATE ALIAS BITAND FOR "org.hsql.Library.bitand"
+CREATE ALIAS USER FOR "org.hsql.Library.user"
+CREATE ALIAS UCASE FOR "org.hsql.Library.ucase"
+CREATE ALIAS RTRIM FOR "org.hsql.Library.rtrim"
+CREATE ALIAS LOG10 FOR "org.hsql.Library.log10"
+CREATE ALIAS RIGHT FOR "org.hsql.Library.right"
+CREATE ALIAS ATAN FOR "java.lang.Math.atan"
+CREATE ALIAS UPPER FOR "org.hsql.Library.ucase"
+CREATE ALIAS ASCII FOR "org.hsql.Library.ascii"
+CREATE ALIAS RAND FOR "java.lang.Math.random"
+CREATE ALIAS LENGTH FOR "org.hsql.Library.length"
+CREATE ALIAS ROUND FOR "org.hsql.Library.round"
+CREATE ALIAS REPLACE FOR "org.hsql.Library.replace"
+INSERT INTO ORACLEDB VALUES('1.from,/smtp/from','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.smtp,/smtp','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.sent,/smtp/sent','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.received,/smtp/received','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.subject,/smtp/subject','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.to,/smtp/to','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.to,/smtp/to','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.from,/smtp/from','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.subject,/smtp/subject','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('1.sent,/smtp/sent','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('2.to,/smtp/to','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('3.to,/smtp/to','2[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]true,adas,,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('2.from,/smtp/from','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('2.subject,/smtp/subject','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]true,dasd,,tagprocessor.jar,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('4.to,/smtp/to','3[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('0.to,/smtp/to','4[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]true,abc,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('3.from,/smtp/from','2[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]true,asda,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('0.from,/smtp/from','3[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('3.subject,/smtp/subject','2[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('0.subject,/smtp/subject','3[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('1.sent,/smtp/sent','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]tagprocessor.jar,false')
+INSERT INTO ORACLEDB VALUES('0.sent,/smtp/sent','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('1.received,/smtp/received','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('0.received,/smtp/received','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('1.smtp,/smtp','0[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]')
+INSERT INTO ORACLEDB VALUES('2.smtp,/smtp','1[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('3.smtp,/smtp','2[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,tagprocessor.jar,tagprocessor.jar,tagprocessor.jar')
+INSERT INTO ORACLEDB VALUES('0.smtp,/smtp','3[**]<?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.\u0009Copyright 2000 Trustees of Columbia University\u0009in 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>[**]false,RuleResult.class,TagProcessor.class,TagProcessorImpl.class,tagprocessor.jar')