Mercurial > hg > Database > jungle-network
view src/jungle/test/codesegment/practice/StartJungleCodeSegment.java @ 24:2a378b94cc55
use NetworkDefaultTreeEditor
author | one |
---|---|
date | Sun, 30 Jun 2013 04:32:37 +0900 |
parents | 506388c02b4b |
children |
line wrap: on
line source
package jungle.test.codesegment.practice; import java.io.IOException; import java.nio.ByteBuffer; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.DefaultTreeOperation; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.PutAttributeOperation; import jungle.test.datasegment.store.operations.DefaultTreeOperationContainer; import alice.codesegment.CodeSegment; public class StartJungleCodeSegment { public static void main(String[] args) { System.out.println("--StartJungleCodeSegment--"); JungleManager jm = new JungleManager(); JungleTree tree = jm.createNewTree("tree"); JungleTreeEditor editor = tree.getTreeEditor(); DefaultNodePath path = new DefaultNodePath(); path = path.add(0); editor.addNewChildAt(path, 0); editor.success(); TestPutAttributeCodeSegment cs = new TestPutAttributeCodeSegment(); DefaultTreeOperation treeOp = cs.getSampleOperation("message0"); DefaultTreeOperationContainer treeOperationContainer = new DefaultTreeOperationContainer(); try { treeOperationContainer.unconvert(treeOp); } catch (IOException e) { e.printStackTrace(); } cs.ods.update("local", "log", treeOperationContainer); } }