Mercurial > hg > Members > nobuyasu > jungle-network
view src/jungle/test/codesegment/operation/ShowAttribute.java @ 66:29127ac788a6
move some files
author | one |
---|---|
date | Tue, 20 Aug 2013 17:38:09 +0900 |
parents | bf3dc481cc9b |
children |
line wrap: on
line source
package jungle.test.codesegment.operation; import java.nio.ByteBuffer; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle; 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.core.Children; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error; import jungle.app.bbs.JungleManager; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ShowAttribute extends CodeSegment { Receiver arg1 = ids.create(CommandType.TAKE); public ShowAttribute() { arg1.setKey("show"); } public void run() { System.out.println("--ShowAttribute--"); Jungle jungle = JungleManager.getJungle(); JungleTree tree = jungle.getTreeByName("tree"); Node node = tree.getRootNode(); Children<Node> chs = node.getChildren(); System.out.println("children size : "+chs.size()); for(Node n : chs) { ByteBuffer b = n.getAttributes().get("key1"); System.out.println(new String(b.array())); } System.exit(0); } }