Ian Zilla's project

janak [2002-12-20 15:45:08]
Ian Zilla's project
Filename
smartevents/ArchMutation.java
smartevents/BodyBlock.java
smartevents/Buildable.java
smartevents/ComponentStatus.java
smartevents/Context.java
smartevents/DASADA-Arch-Mutation-Schema.xsd
smartevents/DASADA-Component-Status-Schema.xsd
smartevents/DASADA-Context-Schema.xsd
smartevents/DASADA-Function-Schema.xsd
smartevents/HeaderBlock.java
smartevents/MethodCall.java
smartevents/README.txt
smartevents/SEventDriver.java
smartevents/SmartEvent.java
smartevents/SmartEventFactory.java
diff --git a/smartevents/ArchMutation.java b/smartevents/ArchMutation.java
new file mode 100644
index 0000000..64d4a87
--- /dev/null
+++ b/smartevents/ArchMutation.java
@@ -0,0 +1,46 @@
+/*
+ * ArchMutation.java
+ *
+ * Created on December 18, 2002, 10:20 AM
+ */
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class ArchMutation extends BodyBlock implements Buildable {
+
+    private boolean created = false;
+    private boolean deleted = false;
+    private boolean attached = false;
+    private boolean detached = false;
+    private boolean changed = false;
+
+    /** Creates a new instance of ArchMutation */
+    public ArchMutation() {
+    }
+
+    public void buildXML(String fileName) {
+    }
+
+    public boolean isCreated() {
+        return false;
+    }
+
+    public boolean isDeleted() {
+        return false;
+    }
+
+    public boolean isAttached() {
+        return false;
+    }
+
+    public boolean isDetached() {
+        return false;
+    }
+
+    public boolean isChanged() {
+        return false;
+    }
+
+}
diff --git a/smartevents/BodyBlock.java b/smartevents/BodyBlock.java
new file mode 100644
index 0000000..cf641db
--- /dev/null
+++ b/smartevents/BodyBlock.java
@@ -0,0 +1,20 @@
+/*
+ * BodyBlock.java
+ *
+ * Created on December 18, 2002, 10:00 AM
+ */
+
+/**
+ *
+ * @author  Ian Zilla
+ */
+public abstract class BodyBlock implements Buildable {
+
+    /** Creates a new instance of BodyBlock */
+    public BodyBlock() {
+    }
+
+    public abstract void buildXML(String fileName);
+
+
+}
\ No newline at end of file
diff --git a/smartevents/Buildable.java b/smartevents/Buildable.java
new file mode 100644
index 0000000..bf1675c
--- /dev/null
+++ b/smartevents/Buildable.java
@@ -0,0 +1,15 @@
+/*
+ * Buildable.java
+ *
+ * Created on December 18, 2002, 9:33 AM
+ */
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public interface Buildable {
+
+    public void buildXML(String fileName);
+
+}
diff --git a/smartevents/ComponentStatus.java b/smartevents/ComponentStatus.java
new file mode 100644
index 0000000..e5e3ff2
--- /dev/null
+++ b/smartevents/ComponentStatus.java
@@ -0,0 +1,69 @@
+/*
+ * ComponentStatus.java
+ *
+ * Created on December 18, 2002, 10:29 AM
+ */
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class ComponentStatus extends BodyBlock implements Buildable {
+
+    private String statusCodeType;
+    private String sourceApplication;
+    private String description;
+
+    /** Creates a new instance of ComponentStatus */
+    public ComponentStatus(String fileName, String type, String application, String description) {
+        setStatusCodeType(type);
+        setSourceApp(application);
+        setDescription(description);
+        buildXML(fileName);
+    }
+
+    public void buildXML(String fileName) {
+        // write ComponentStatus XML here
+        System.out.println("Building ComponentStatus XML for file: " + fileName);
+        try {
+            BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+            out.write("<dasada-component-status>\n");
+            out.write("\t<stCodeType>" + this.getStatusCodeType() + "</stCodeType>\n");
+            out.write("\t<sourceApp>" + this.getSourceApp() + "</sourceApp>\n");
+            out.write("\t<description>" + this.getDescription() + "</description>\n");
+            out.write("</dasada-component-status>\n");
+            out.close();
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void setStatusCodeType(String codeType) {
+        statusCodeType = codeType;
+    }
+
+    public String getStatusCodeType() {
+        return statusCodeType;
+    }
+
+    public void setSourceApp(String application) {
+        sourceApplication = application;
+    }
+
+    public String getSourceApp() {
+        return sourceApplication;
+    }
+
+    public void setDescription(String s_description) {
+        description = s_description;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+}
\ No newline at end of file
diff --git a/smartevents/Context.java b/smartevents/Context.java
new file mode 100644
index 0000000..04295f5
--- /dev/null
+++ b/smartevents/Context.java
@@ -0,0 +1,102 @@
+/*
+ * Context.java
+ *
+ * Created on December 18, 2002, 9:58 AM
+ */
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class Context extends HeaderBlock {
+
+    // source info
+    private String source_ip;
+    private int source_port;
+
+    // ordering info
+    private String ordering_timeStamp;
+    private long ordering_seqNum;
+
+    // version info
+    private String version;
+
+    /** Creates a new instance of Context */
+    public Context(String fileName, String ip, int port, String timeStamp, long seqNum, String version) {
+        setSourceIP(ip);
+        setSourcePort(port);
+        setOrderingTimeStamp(timeStamp);
+        setOrderingSeqNumber(seqNum);
+        setVersion(version);
+        buildXML(fileName);
+    }
+
+    public void buildXML(String fileName) {
+        // write the Context XML here
+        System.out.println("Building Context XML for file: " + fileName);
+        try {
+            BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
+            out.write("<dasada-context>\n");
+            out.write("\t<source>\n");
+            out.write("\t\t<host>\n");
+            out.write("\t\t\t<ip-address>" + this.getSourceIP() + "</ip-address>\n");
+            out.write("\t\t\t<ip-port>" + this.getSourcePort() + "</ip-port>\n");
+            out.write("\t\t</host>\n");
+            out.write("\t</source>\n");
+            out.write("\t<ordering>\n");
+            out.write("\t\t<timestamp>" + this.getOrderingTimeStamp() + "</timestamp>\n");
+            out.write("\t\t<seqNum>" + this.getOrderingSeqNumber() + "</seqNum>\n");
+            out.write("\t</ordering>\n");
+            out.write("\t<version>" + this.getVersion() + "</version>\n");
+            out.write("</dasada-context>\n");
+            out.close();
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void setSourceIP(String ip) {
+        source_ip = ip;
+    }
+
+    public String getSourceIP() {
+        return source_ip;
+    }
+
+    public void setSourcePort(int port) {
+        source_port = port;
+    }
+
+    public int getSourcePort() {
+        return source_port;
+    }
+
+    public void setOrderingTimeStamp(String timeStamp) {
+        ordering_timeStamp = timeStamp;
+    }
+
+    public String getOrderingTimeStamp() {
+        return ordering_timeStamp;
+    }
+
+    public void setOrderingSeqNumber(long seqNum) {
+        ordering_seqNum = seqNum;
+    }
+
+    public long getOrderingSeqNumber() {
+        return ordering_seqNum;
+    }
+
+    public void setVersion(String s_version) {
+        version = s_version;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+}
diff --git a/smartevents/DASADA-Arch-Mutation-Schema.xsd b/smartevents/DASADA-Arch-Mutation-Schema.xsd
new file mode 100644
index 0000000..2c3e39d
--- /dev/null
+++ b/smartevents/DASADA-Arch-Mutation-Schema.xsd
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by phil gross (columbia university) -->
+<xs:schema targetNamespace="http://www.psl.cs.columbia.edu/2001/12/DASADA-Arch-Mutation-Schema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.psl.cs.columbia.edu/2001/12/DASADA-Arch-Mutation-Schema" xmlns:instance="http://www.ics.uci.edu/pub/arch/xArch/instance.xsd" xmlns:properties="http://www.cs.cmu.edu/~acme/pub/xAcme/properties.xsd" xmlns:acmeproperties="http://www.cs.cmu.edu/~acme/pub/xAcme/acmeProperties.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
+	<xs:import namespace="http://www.cs.cmu.edu/~acme/pub/xAcme/properties.xsd" schemaLocation="http://www.cs.cmu.edu/~acme/pub/xAcme/properties.xsd"/>
+	<xs:import namespace="http://www.cs.cmu.edu/~acme/pub/xAcme/acmeProperties.xsd" schemaLocation="http://www.cs.cmu.edu/~acme/pub/xAcme/acmeProperties.xsd"/>
+	<xs:element name="dasada-architecture-mutation">
+		<xs:annotation>
+			<xs:documentation>SOAP Block describing architecturally significant changes</xs:documentation>
+		</xs:annotation>
+		<xs:complexType>
+			<xs:choice>
+				<xs:element name="created">
+					<xs:complexType>
+						<xs:sequence>
+							<xs:choice>
+								<xs:element name="newComponent" type="instance:ComponentInstance"/>
+								<xs:element name="newConnector" type="instance:ConnectorInstance"/>
+								<xs:element name="newInterface" type="instance:InterfaceInstance"/>
+								<xs:element name="newProperty" type="properties:Property"/>
+								<xs:element name="newSubArch" type="instance:SubArchitecture"/>
+								<xs:element name="newBinding" type="instance:InterfaceInstanceMapping"/>
+								<xs:element name="newGauge">
+									<xs:complexType>
+										<xs:sequence>
+											<xs:element name="name" type="instance:XMLLink"/>
+											<xs:element name="type" type="xs:string"/>
+										</xs:sequence>
+									</xs:complexType>
+								</xs:element>
+							</xs:choice>
+							<xs:element name="context" type="instance:XMLLink"/>
+						</xs:sequence>
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="deleted">
+					<xs:complexType>
+						<xs:choice>
+							<xs:element name="deletedComponent" type="instance:XMLLink"/>
+							<xs:element name="deletedConnector" type="instance:XMLLink"/>
+							<xs:element name="deletedInterface" type="instance:XMLLink"/>
+							<xs:element name="deletedProperty" type="instance:XMLLink"/>
+							<xs:element name="deletedSubArch" type="instance:XMLLink"/>
+							<xs:element name="deletedBinding" type="instance:XMLLink"/>
+							<xs:element name="deletedGauge" type="instance:XMLLink"/>
+						</xs:choice>
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="attached">
+					<xs:complexType>
+						<xs:choice>
+							<xs:element name="attachedConnector">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="roleName" type="instance:XMLLink"/>
+										<xs:element name="portName" type="instance:XMLLink"/>
+									</xs:sequence>
+								</xs:complexType>
+							</xs:element>
+							<xs:element name="attachedGauge">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="name" type="xs:string"/>
+										<xs:element name="property" type="instance:XMLLink"/>
+										<xs:element name="mapping" type="xs:string"/>
+									</xs:sequence>
+								</xs:complexType>
+							</xs:element>
+						</xs:choice>
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="detached">
+					<xs:complexType>
+						<xs:choice>
+							<xs:element name="detachedConnector">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="roleName" type="instance:XMLLink"/>
+										<xs:element name="portName" type="instance:XMLLink"/>
+									</xs:sequence>
+								</xs:complexType>
+							</xs:element>
+							<xs:element name="detachedGauge">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="name" type="xs:string"/>
+										<xs:element name="property" type="instance:XMLLink"/>
+									</xs:sequence>
+								</xs:complexType>
+							</xs:element>
+						</xs:choice>
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="changed">
+					<xs:complexType>
+						<xs:choice>
+							<xs:element name="changedPropertyValue">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="propertyValue" type="acmeproperties:PropertyValue"/>
+										<xs:element name="property" type="instance:XMLLink"/>
+									</xs:sequence>
+								</xs:complexType>
+							</xs:element>
+						</xs:choice>
+					</xs:complexType>
+				</xs:element>
+			</xs:choice>
+		</xs:complexType>
+	</xs:element>
+</xs:schema>
diff --git a/smartevents/DASADA-Component-Status-Schema.xsd b/smartevents/DASADA-Component-Status-Schema.xsd
new file mode 100644
index 0000000..c772993
--- /dev/null
+++ b/smartevents/DASADA-Component-Status-Schema.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+<xs:element name="dasada-component-status" type="DasadaComponentStatusType">
+	<xs:annotation>
+		<xs:documentation>Component Status information for a probe event</xs:documentation>
+	</xs:annotation>
+</xs:element>
+<xs:complexType name="DasadaComponentStatusType">
+	<xs:sequence>
+		<xs:element name="stCodeType" type="xs:string"/>
+		<xs:element name="sourceApp" type="xs:string"/>
+		<xs:element name="description" type="xs:string"/>
+	</xs:sequence>
+</xs:complexType>
+</xs:schema>
\ No newline at end of file
diff --git a/smartevents/DASADA-Context-Schema.xsd b/smartevents/DASADA-Context-Schema.xsd
new file mode 100644
index 0000000..452a229
--- /dev/null
+++ b/smartevents/DASADA-Context-Schema.xsd
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Phil G (CU) -->
+<xs:schema targetNamespace="http://www.psl.cs.columbia.edu/2001/12/DASADA-Context-Schema" xmlns:dcs="http://www.psl.cs.columbia.edu/2001/12/DASADA-Context-Schema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.psl.cs.columbia.edu/2001/12/DASADA-Context-Schema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+	<xs:element name="dasada-context" type="DasadaContextType">
+		<xs:annotation>
+			<xs:documentation>Context information for a probe event</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:simpleType name="TriggerType">
+		<xs:restriction base="xs:string">
+			<xs:enumeration value="Push"/>
+			<xs:enumeration value="Pull"/>
+			<xs:enumeration value="Periodic"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<xs:complexType name="ResourceLocationType">
+		<xs:annotation>
+			<xs:documentation>specific resource id (ip/port or location string)</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="ip-address" type="xs:string"/>
+			<xs:element name="ip-port" type="xs:positiveInteger"/>
+			<xs:element name="location" type="xs:string" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="ProcessInfoType">
+		<xs:sequence>
+			<xs:element name="pid" type="xs:positiveInteger"/>
+			<xs:element name="name" type="xs:string" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="DasadaContextType">
+		<xs:sequence>
+			<xs:element name="source">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="host" type="ResourceLocationType" minOccurs="0"/>
+						<xs:element name="adl" minOccurs="0">
+							<xs:complexType>
+								<xs:sequence>
+									<xs:element name="entitySystem" type="xs:string"/>
+									<xs:element name="entityName" type="xs:string"/>
+								</xs:sequence>
+							</xs:complexType>
+						</xs:element>
+						<xs:element name="sw-env" minOccurs="0">
+							<xs:complexType>
+								<xs:sequence>
+									<xs:element name="procInfo" type="ProcessInfoType"/>
+									<xs:element name="threadInfo" type="ProcessInfoType" minOccurs="0"/>
+									<xs:element name="stack" minOccurs="0">
+										<xs:complexType>
+											<xs:sequence>
+												<xs:element name="stackFrame" type="ProcessInfoType" maxOccurs="unbounded"/>
+											</xs:sequence>
+										</xs:complexType>
+									</xs:element>
+								</xs:sequence>
+							</xs:complexType>
+						</xs:element>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+			<xs:element name="ordering">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="timestamp" type="xs:dateTime" minOccurs="0"/>
+						<xs:element name="seqNum" type="xs:long" minOccurs="0"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+			<xs:element name="version" type="xs:string" minOccurs="0"/>
+			<xs:element name="focus" minOccurs="0">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="trigger" type="TriggerType"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+</xs:schema>
diff --git a/smartevents/DASADA-Function-Schema.xsd b/smartevents/DASADA-Function-Schema.xsd
new file mode 100644
index 0000000..5f1c08b
--- /dev/null
+++ b/smartevents/DASADA-Function-Schema.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Phil G (CU) -->
+<xs:schema targetNamespace="http://www.psl.cs.columbia.edu/2001/12/DASADA-Function-Schema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.psl.cs.columbia.edu/2001/12/DASADA-Function-Schema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+	<xs:element name="dasada-function-call" type="DasadaFunctionCallType">
+		<xs:annotation>
+			<xs:documentation>Comment describing your root element</xs:documentation>
+		</xs:annotation>
+	</xs:element>
+	<xs:complexType name="Variable">
+		<xs:sequence>
+			<xs:element name="name" type="xs:string"/>
+			<xs:element name="type" type="xs:string"/>
+			<xs:element name="value" type="xs:anyType"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="DasadaFunctionCallType">
+		<xs:sequence>
+			<xs:element name="name" type="xs:string"/>
+			<xs:element name="package" type="xs:string" minOccurs="0"/>
+			<xs:element name="returnValue" type="Variable"/>
+			<xs:element name="parameters">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="parameter" type="Variable" maxOccurs="unbounded"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+			<xs:element name="this" type="Variable" minOccurs="0"/>
+			<xs:element name="exceptionChain" minOccurs="0">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="exception" type="Exception" maxOccurs="unbounded"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="Exception">
+		<xs:sequence>
+			<xs:element name="name" type="xs:string"/>
+			<xs:element name="message" type="xs:string" minOccurs="0"/>
+			<xs:element name="lineNumber" type="xs:positiveInteger" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+</xs:schema>
diff --git a/smartevents/HeaderBlock.java b/smartevents/HeaderBlock.java
new file mode 100644
index 0000000..717be8e
--- /dev/null
+++ b/smartevents/HeaderBlock.java
@@ -0,0 +1,19 @@
+/*
+ * HeaderBlock.java
+ *
+ * Created on December 18, 2002, 9:53 AM
+ */
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public abstract class HeaderBlock implements Buildable {
+
+    /** Creates a new instance of HeaderBlock */
+    public HeaderBlock() {
+    }
+
+    public abstract void buildXML(String fileName);
+
+}
diff --git a/smartevents/MethodCall.java b/smartevents/MethodCall.java
new file mode 100644
index 0000000..776e2b2
--- /dev/null
+++ b/smartevents/MethodCall.java
@@ -0,0 +1,119 @@
+/*
+ * MethodCall.java
+ *
+ * Created on December 18, 2002, 10:10 AM
+ */
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.util.StringTokenizer;
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class MethodCall extends BodyBlock implements Buildable{
+
+    private String name;
+    private String inPackage;
+    private String retValName;
+    private String retValType;
+    private String retValValue;
+    private String[] parameters;
+
+    /** Creates a new instance of MethodCall */
+    public MethodCall(String fileName, String name, String pckg, String rvName,
+                        String rvType, String rvValue, String[] params) {
+        setName(name);
+        setPackage(pckg);
+        setRVName(rvName);
+        setRVType(rvType);
+        setRVValue(rvValue);
+        setParameters(params);
+        buildXML(fileName);
+    }
+
+    public void buildXML(String fileName) {
+        // write MethodCall XML
+        System.out.println("Building MethodCall XML for file: " + fileName);
+        try {
+            BufferedWriter out = new BufferedWriter(new FileWriter(fileName, true));
+            out.write("<dasada-function-call>\n");
+            out.write("\t<name>" + this.getName() + "</name>\n");
+            out.write("\t<package>" + this.getPackage() + "</package>\n");
+            out.write("\t<returnValue>\n");
+            out.write("\t\t<name>" + this.getRVName() + "</name>\n");
+            out.write("\t\t<type>" + this.getRVType() + "</type>\n");
+            out.write("\t\t<value>" + this.getRVValue() + "</value>\n");
+            out.write("\t</returnValue>\n");
+            out.write("\t<parameters>\n");
+            // there could be many parameters so go through them all
+            String[] temp = this.getParameters();
+            for (int i = 0; i < temp.length; i++) {
+                StringTokenizer s = new StringTokenizer(temp[i], "," + " ");
+                String t_name = s.nextToken();
+                String t_type = s.nextToken();
+                String t_val = s.nextToken();
+                out.write("\t\t<parameter>\n");
+                out.write("\t\t\t<name>" + t_name + "</name>\n");
+                out.write("\t\t\t<type>" + t_type + "</type>\n");
+                out.write("\t\t\t<value>" + t_val + "</value>\n");
+                out.write("\t\t</parameter>\n");
+            }
+            out.write("\t</parameters>\n");
+            out.write("</dasada-function-call>\n");
+            out.close();
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void setName(String s_name) {
+        name = s_name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setPackage(String s_inPackage) {
+        inPackage = s_inPackage;
+    }
+
+    public String getPackage() {
+        return inPackage;
+    }
+
+    public void setRVName(String rvName) {
+        retValName = rvName;
+    }
+
+    public String getRVName() {
+        return retValName;
+    }
+
+    public void setRVType(String rvType) {
+        retValType = rvType;
+    }
+
+    public String getRVType() {
+        return retValType;
+    }
+
+    public void setRVValue(String rvVal) {
+        retValValue = rvVal;
+    }
+
+    public String getRVValue() {
+        return retValValue;
+    }
+
+    public void setParameters(String[] params) {
+        parameters = params;
+    }
+
+    public String[] getParameters() {
+        return parameters;
+    }
+}
\ No newline at end of file
diff --git a/smartevents/README.txt b/smartevents/README.txt
new file mode 100644
index 0000000..232bdce
--- /dev/null
+++ b/smartevents/README.txt
@@ -0,0 +1,15 @@
+//README.txt
+// Ian Zilla – iaz6@columbia.edu
+
+How to run (on Windows):
+1. compile source code (javac *.java)
+2. java SEventDriver (output is written to C:\psl\events\smartevents\ as a text file)
+note:  basic info needed to create the events is hard-coded into the driver.
+
+Major issues:
+1. The overall SmartEvent schema is not complete.  A SOAP-based schema should be made to
+hold a header block of XML and one or more body blocks of XML.  Once that is complete, the
+file which has output written to it from the toolkit can be changed from .txt to .xml.
+2. In the toolkit, ArchMutations is stubbed out, so that needs to be implemented.
+3. The toolkit currently just builds the Context, MethodCall, and ComponentStatus Events from a
+SmartEvent structure.  It should also be able to parse SmartEvent XML to create the structure.
diff --git a/smartevents/SEventDriver.java b/smartevents/SEventDriver.java
new file mode 100644
index 0000000..d2a5100
--- /dev/null
+++ b/smartevents/SEventDriver.java
@@ -0,0 +1,42 @@
+/*
+ * SEventDriver.java
+ *
+ * Created on December 18, 2002, 9:43 PM
+ */
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class SEventDriver {
+
+    /** Creates a new instance of SEventDriver */
+    public SEventDriver() {
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args) {
+        // build a MethodCallEvent
+        long seq_num = 0;
+        String[] params = new String[2];
+        params[0] = "boo, int, 10";
+        params[1] = "ooh, long, 553345";
+        SmartEventFactory fact = new SmartEventFactory();
+        // create a MethodCall Event
+        SmartEvent methodCall = fact.buildMethodCallEvent("C:\\psl\\events\\smartevents\\meth-call-event.txt", "128.14.59.132",
+                                            4321, "12/25/2002", seq_num++, "1.0.0", "setFoo", "myPackage", "true",
+                                             "boolean", "1", params);
+
+        // create a ComponentStatus Event
+        SmartEvent compStatus = fact.buildComponentStatusEvent("C:\\psl\\events\\smartevents\\comp-status-event.txt", "128.14.59.132",
+                                            5432, "12/25/2002", seq_num++, "1.0.0", "ERROR", "java",
+                                            "version 1.4.1");
+
+        // Add another BodyBlock to the ComponentStatus Event.
+        // In this case it is another ComponentStatus Event, but it
+        // could have been another type of BodyBlock.
+        fact.addComponentStatusBlock(compStatus, "OK", "java", "version 1.4.1");
+    }
+}
diff --git a/smartevents/SmartEvent.java b/smartevents/SmartEvent.java
new file mode 100644
index 0000000..0266749
--- /dev/null
+++ b/smartevents/SmartEvent.java
@@ -0,0 +1,51 @@
+/*
+ * SmartEvent.java
+ *
+ * Created on December 18, 2002, 9:48 AM
+ */
+
+import java.util.ArrayList;
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class SmartEvent implements Buildable {
+
+    private String fileName;
+    private HeaderBlock header;
+    private ArrayList bodyBlocks;
+
+    /** Creates a new instance of SmartEvent */
+    public SmartEvent(String file_name) {
+        fileName = file_name;
+        bodyBlocks = new ArrayList();
+    }
+
+    public String getFileName() {
+        return fileName;
+    }
+
+    public void setHeader(HeaderBlock h_header) {
+        header = h_header;
+    }
+
+    public HeaderBlock getHeader() {
+        return header;
+    }
+
+    public void addBodyBlock(BodyBlock bodyBlock) {
+        bodyBlocks.add(bodyBlock);
+    }
+
+    public BodyBlock getBodyBlock(int i) {
+        return (BodyBlock)bodyBlocks.get(i);
+    }
+
+    public ArrayList getAllBodyBlocks() {
+        return bodyBlocks;
+    }
+
+    public void buildXML(String fileName) {}
+
+}
diff --git a/smartevents/SmartEventFactory.java b/smartevents/SmartEventFactory.java
new file mode 100644
index 0000000..b2bbb59
--- /dev/null
+++ b/smartevents/SmartEventFactory.java
@@ -0,0 +1,69 @@
+/*
+ * SmartEventFactory.java
+ *
+ * Created on December 18, 2002, 10:33 AM
+ */
+
+import java.util.ArrayList;
+
+/**
+ *
+ * @author  Ian Zilla -- PSL Group Fall 2002
+ */
+public class SmartEventFactory {
+
+    private ArrayList smartEvents;
+
+    /** Creates a new instance of SmartEventFactory */
+    public SmartEventFactory() {
+        smartEvents = new ArrayList();
+    }
+
+    public SmartEvent buildMethodCallEvent(String fileName, String c_ip, int c_port, String c_timeStamp,
+                                            long c_seqNum, String c_version, String m_name, String m_pckg,
+                                             String m_rvName, String m_rvType, String m_rvVal, String[] m_params) {
+        SmartEvent se = new SmartEvent(fileName);
+        Context context = new Context(se.getFileName(), c_ip, c_port, c_timeStamp, c_seqNum, c_version);
+        MethodCall mc = new MethodCall(se.getFileName(), m_name, m_pckg, m_rvName, m_rvType, m_rvVal, m_params);
+        se.setHeader((Context)context);
+        se.addBodyBlock((MethodCall)mc);
+        smartEvents.add((SmartEvent)se);
+        return se;
+    }
+
+    public SmartEvent buildArchMutationEvent() {
+        return null;
+    }
+
+    public SmartEvent buildComponentStatusEvent(String fileName, String c_ip, int c_port, String c_timeStamp,
+                                                 long c_seqNum, String c_version, String cs_type, String cs_app,
+                                                  String cs_description ) {
+        SmartEvent se = new SmartEvent(fileName);
+        Context context = new Context(se.getFileName(), c_ip, c_port, c_timeStamp, c_seqNum, c_version);
+        ComponentStatus cs = new ComponentStatus(se.getFileName(), cs_type, cs_app, cs_description);
+        se.setHeader(context);
+        se.addBodyBlock(cs);
+        smartEvents.add(se);
+        return se;
+    }
+
+    public void addMethodCallBlock(SmartEvent se, String m_name, String m_pckg, String m_rvName,
+                                    String m_rvType, String m_rvVal, String[] m_params) {
+        MethodCall mc = new MethodCall(se.getFileName(), m_name, m_pckg, m_rvName, m_rvType, m_rvVal, m_params);
+        se.addBodyBlock(mc);
+    }
+
+    public void addArchMutationBlock(SmartEvent se) {
+        ;
+    }
+
+    public void addComponentStatusBlock(SmartEvent se, String cs_type, String cs_app, String cs_description) {
+        ComponentStatus cs = new ComponentStatus(se.getFileName(), cs_type, cs_app, cs_description);
+        se.addBodyBlock(cs);
+    }
+
+    public ArrayList getSmartEvents() {
+        return smartEvents;
+    }
+
+}