comparison rep/xml/SessionXMLDecoder.java @ 317:c83a3faec487

*** empty log message ***
author kono
date Tue, 07 Oct 2008 21:48:31 +0900
parents 4768984ea4bc
children 5893fd8c0f50
comparison
equal deleted inserted replaced
316:77f443f6dc9f 317:c83a3faec487
5 import javax.xml.parsers.DocumentBuilder; 5 import javax.xml.parsers.DocumentBuilder;
6 import javax.xml.parsers.DocumentBuilderFactory; 6 import javax.xml.parsers.DocumentBuilderFactory;
7 7
8 import org.w3c.dom.Document; 8 import org.w3c.dom.Document;
9 import org.w3c.dom.Element; 9 import org.w3c.dom.Element;
10 import org.w3c.dom.Node;
11 import org.w3c.dom.NodeList; 10 import org.w3c.dom.NodeList;
12 import org.xml.sax.InputSource; 11 import org.xml.sax.InputSource;
13 12
14 import rep.Editor; 13 import rep.Editor;
15 import rep.Session; 14 import rep.Session;
76 if(elementEditor.getChildNodes().getLength() > 2){ 75 if(elementEditor.getChildNodes().getLength() > 2){
77 NodeList nodelistEditorFile = elementEditor.getElementsByTagName("file"); 76 NodeList nodelistEditorFile = elementEditor.getElementsByTagName("file");
78 Element elementFile = (Element) nodelistEditorFile.item(0); 77 Element elementFile = (Element) nodelistEditorFile.item(0);
79 String file = elementFile.getFirstChild().getNodeValue(); 78 String file = elementFile.getFirstChild().getNodeValue();
80 79
81 Editor editor = new Editor(); 80 Editor editor = new Editor(null, false, 0);
82 editor.setHost(host);/* editor.setPort(port)*/; editor.setName(file); editor.setEID(Integer.parseInt(eid)); 81 editor.setHost(host);/* editor.setPort(port)*/; editor.setName(file); editor.setEID(Integer.parseInt(eid));
83 session = new Session(editor); 82 session = new Session(editor);
84 session.addEditor(editor); 83 session.addEditor(editor);
85 sessionlist.addSession(session); 84 sessionlist.addSession(session);
86 85
87 }else { 86 }else {
88 Editor editor = new Editor(); 87 Editor editor = new Editor(null, false, 0);
89 editor.setHost(host);/* editor.setPort(port)*/; editor.setName(null); editor.setEID(Integer.parseInt(eid)); 88 editor.setHost(host);/* editor.setPort(port)*/; editor.setName(null); editor.setEID(Integer.parseInt(eid));
90 if(session != null){ 89 if(session != null){
91 session.addEditor(editor); 90 session.addEditor(editor);
92 //sessionlist.addSession(session);
93 } 91 }
94 } 92 }
95 } 93 }
96 } 94 }
97 return sessionlist; 95 return sessionlist;