e.setOptional("false");
	public void handleEventFromFrax(SienaObject e) {		   System.err.println("DS METHOD CALL: FRAX");		   String protocol = e.getProtocol();		   String data = e.getData();		   String optional = e.getOptional();		   StringTokenizer st;			String type;			    Parser p = null;			    String token;			    try {				SAXBuilder builder = new SAXBuilder();				data = e.getData();				Document doc = builder.build( new StringReader(data) );				//Document doc = builder.build( new StringReader(xmlsample));				System.err.println("I just got this event:");				System.err.println(doc);				type = doc.getRootElement().getAttribute("type").getValue();				if (type.equals("dir")) {				    p = new DirParser(doc, data);				    //p = new DirParser(doc, xmlsample);				    SourceTuple t = p.parseDoc();				    int tupleID = addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());				    // invoke VEM with t.getProtocol(), t.getUrl()				    vem = VemNotif.getInstance();				    vobj = vem.getShape(t.getProtocol(),t.getUrl());				    setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				    // create a table of links and images				    try {					String tableName = "table" + tupleID;					statement.executeQuery("create table " +							       tableName +							       " (url varchar(255), type varchar(255), classtype varchar(255), subtype varchar(255), shape varchar(255), shape2d varchar(255) )");					data = t.getOpt()[2];					st = new StringTokenizer(data, " \n");					while ( st.hasMoreTokens() ) {					    token = st.nextToken();					    statement.executeQuery("insert into " +								   tableName +								   " values ('" +								   token +								   "', 'FILE', null, null, null, null)");					}					// invoke VEM with t.getUrl(), token					vem = VemNotif.getInstance();					vobj = vem.getShape(t.getProtocol(),t.getUrl());					setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());					printTable(tableName);				    } catch(SQLException e1) {					if (e1.getErrorCode() != 0) {					    System.err.println("ERROR: FAILS TO CREATE TABLE");					    System.exit(1);					}					System.err.println(e1);				    } catch (Exception e2) {					System.err.println(e2);				    }				} else if (type.equals("html")) {				    p = new HtmlParser(doc,data);				    //p = new HtmlParser(doc,xmlsample);				    SourceTuple t = p.parseDoc();				    int tupleID = addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());				    // invoke VEM with t.getProtocol(), t.getUrl()				    vem = VemNotif.getInstance();				    vobj = vem.getShape(t.getProtocol(),t.getUrl());				    setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				    // create a table of links and images				    try {					String tableName = "table" + tupleID;					statement.executeQuery("create table " +							       tableName +							       " (url varchar(255), type varchar(255), classtype varchar(255), subtype varchar(255), shape varchar(255), shape2d varchar(255) )");					int idx1 = 0;					int idx2 = 0;					data = t.getOpt()[2];					System.err.println("get into loop");					System.err.println(data);					while ( idx2 < data.length() ) {					    idx1 = data.indexOf("<Source>", idx1)+8;					    idx2 = data.indexOf("</Source>", idx2);					    if (idx1>=data.length() || idx2>=data.length()						|| idx1<=7 || idx2 <=0)						break;						System.err.println("The index is: " + idx1 + " " + idx2);					    token = data.substring(idx1,idx2);					    statement.executeQuery("insert into " +								   tableName +								   " values ('" +								   token +								   "', 'IMAGE', null, null, null, null)");					    // invoke VEM with t.getUrl(), token					    vem = VemNotif.getInstance();					    vobj = vem.getLinkShape(t.getUrl(),token);					    setLinkShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), vobj.getProtocol(), t.getUrl(), token);					    System.err.println("one iteration " + idx1 + " " + idx2);					    idx2 = idx2 + 8; //advance the counter past the word "source"					}					System.err.println("out of loop");					data = t.getOpt()[4];					st = new StringTokenizer(data, " \n");					while ( st.hasMoreTokens() ) {					    token = st.nextToken();					    statement.executeQuery("insert into " +								   tableName +								   " values ('" +								   token +								   "', 'LINK', null, null, null, null)");					    // invoke VEM with t.getUrl(), token					    vem = VemNotif.getInstance();					    vobj = vem.getLinkShape(t.getUrl(),token);					    setLinkShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), vobj.getProtocol(), t.getUrl(), token);					}					printTable(tableName);				    } catch(SQLException e1) {					if (e1.getErrorCode() != 0) {					    System.err.println("ERROR: FAILS TO CREATE TABLE");					    System.exit(1);					}					System.err.println(e1);				    } catch (Exception e2) {					System.err.println(e2);				    }				} else if (type.equals("image")) {				    p = new ImageParser(doc);				    SourceTuple t = p.parseDoc();				    addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());				    // invoke VEM with t.getProtocol(), t.getUrl()				    vem = VemNotif.getInstance();				    vobj = vem.getShape(t.getProtocol(),t.getUrl());				    setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				} else if (type.equals("txt")) {				    p = new TxtParser(doc);				    SourceTuple t = p.parseDoc();				    addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());				    // invoke VEM with t.getProtocol(), t.getUrl()				    vem = VemNotif.getInstance();				    vobj = vem.getShape(t.getProtocol(),t.getUrl());				    setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				} else if (type.equals("other")) {				    p = new OtherParser(doc);				    SourceTuple t = p.parseDoc();				    addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());				    // invoke VEM with t.getProtocol(), t.getUrl()				    vem = VemNotif.getInstance();				    vobj = vem.getShape(t.getProtocol(),t.getUrl());				    setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				} else {				    System.err.println("Type Not Found.");				}			    } catch (Exception ex) {				// check if bscw type				if (data != null) {				    if (-1 != data.indexOf("<BSCW>")) {					p = new BscwParser(data);					SourceTuple t = p.parseDoc();					addSourceTuple(t.getProtocol(), t.getUrl(), t.getSize(), t.getType(), t.getCreated(), t.getLastMod(), t.getSrc(), t.getOpt());					// invoke VEM with t.getProtocol(), t.getUrl()					vem = VemNotif.getInstance();					vobj = vem.getShape(t.getProtocol(),t.getUrl());					setShape(vobj.getClasstype(), vobj.getSubclass(), vobj.getShape(), vobj.getShape2D(), t.getProtocol(), t.getUrl());				    } else {					ex.printStackTrace();				    }				} else {				    ex.printStackTrace();				}			    }			    printTable("SOURCE");				if (optional.trim().equals("true")) {					e.setFromComponent("client");					e.setMethod("c_getRoom");					e.setData(e.getAddress());					handleGetRoomRequest(e);				}			    System.err.println("END OF DS METHOD CALL PROCESS");	}