Mercurial > hg > Members > tatsuki > jungle-bench
comparison src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/xml/extendXmlTree.java @ 13:7c544969d4c9
add TransactionPersocondMeasurement
author | one |
---|---|
date | Wed, 26 Nov 2014 13:00:26 +0900 |
parents | 33b15ef21dcd |
children | 89478f2ea07f |
comparison
equal
deleted
inserted
replaced
12:33b15ef21dcd | 13:7c544969d4c9 |
---|---|
30 | 30 |
31 private extendXmlTree() { | 31 private extendXmlTree() { |
32 | 32 |
33 } | 33 } |
34 | 34 |
35 static int personCount = 10; | 35 static int personCount = 200; |
36 | 36 |
37 public static JuGrix createJuGrix(boolean useIndex) throws ParserConfigurationException, SAXException, | 37 public static JuGrix createJuGrix(boolean useIndex) throws ParserConfigurationException, SAXException, |
38 FileNotFoundException, IOException { | 38 FileNotFoundException, IOException { |
39 Jungle jungle = new DefaultJungle(null, "hoge", new DefaultTreeEditor(new DefaultTraverser())); | 39 Jungle jungle = new DefaultJungle(null, "hoge", new DefaultTreeEditor(new DefaultTraverser())); |
40 JungleTree readXmlTree = jungle.createNewTree("Person"); | 40 JungleTree readXmlTree = jungle.createNewTree("Person"); |
41 // JungleTree readXmlTree = readXml("Person", jungle); | 41 //JungleTree readXmlTree = readXml("Person", jungle); |
42 JungleTree orgTree = readXml("Organization", jungle); | 42 JungleTree orgTree = readXml("Organization", jungle); |
43 JungleTree roleTree = readXml("Role", jungle); | 43 JungleTree roleTree = readXml("Role", jungle); |
44 JungleTreeEditor editor = readXmlTree.getTreeEditor(); | 44 JungleTreeEditor editor = readXmlTree.getTreeEditor(); |
45 NodePath path = new DefaultNodePath(); | 45 NodePath path = new DefaultNodePath(); |
46 editor = editor.addNewChildAt(path, 0).b(); | 46 editor = editor.addNewChildAt(path, 0).b(); |
47 editor = editor.putAttribute(path.add(0), "element", ByteBuffer.wrap("Persons".getBytes())).b(); | 47 editor = editor.putAttribute(path.add(0), "element", ByteBuffer.wrap("Persons".getBytes())).b(); |
48 System.out.println("Create Tree-------------------------------"); | |
48 for (int count = 0; count < personCount; ++count) { | 49 for (int count = 0; count < personCount; ++count) { |
49 editor = extendsTree(editor, orgTree, roleTree, count); | 50 editor = extendsTree(editor, orgTree, roleTree, count); |
50 System.out.println("Count = " + count); | |
51 } | 51 } |
52 editor.success(); | 52 editor.success(); |
53 System.out.println("end-------------------------------"); | |
53 int PersonCount = readXmlTree.getRootNode().getChildren().at(0).b().getChildren().size(); | 54 int PersonCount = readXmlTree.getRootNode().getChildren().at(0).b().getChildren().size(); |
54 System.out.println("PersonCount = " + PersonCount); | 55 System.out.println("PersonCount = " + PersonCount); |
55 JuGrix jugrix = new JuGrix(useIndex, readXmlTree, orgTree, roleTree); | 56 JuGrix jugrix = new JuGrix(useIndex, readXmlTree, orgTree, roleTree); |
56 return jugrix; | 57 return jugrix; |
57 } | 58 } |