Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 113:6a35bd6e5887
change Attribute
author | one |
---|---|
date | Tue, 16 Sep 2014 07:48:34 +0900 |
parents | 98e256d9fd57 |
children | a6250c32451f |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultJungleTreeEditor.java src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/PathNodeIterator.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/Query.java src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/SearchQuery.java |
diffstat | 5 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultJungleTreeEditor.java Mon Sep 15 16:31:53 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultJungleTreeEditor.java Tue Sep 16 07:48:34 2014 +0900 @@ -34,10 +34,10 @@ private final TreeEditor editor; private final TreeOperationLog log; - public DefaultJungleTreeEditor(TreeNode root) - { - this(root,txManager,_editor,new DefaultTreeOperationLog()); - } +// public DefaultJungleTreeEditor(TreeNode root) +// { +// this(root,txManager,_editor,new DefaultTreeOperationLog()); +// } public DefaultJungleTreeEditor(TreeNode _root,TransactionManager _txManager,TreeEditor _editor) {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Mon Sep 15 16:31:53 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Tue Sep 16 07:48:34 2014 +0900 @@ -117,5 +117,4 @@ }; } - }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/PathNodeIterator.java Mon Sep 15 16:31:53 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/PathNodeIterator.java Tue Sep 16 07:48:34 2014 +0900 @@ -47,7 +47,11 @@ node = children.at(0).b(); childNumber = 1; searchStack.push(childNumber); - } else if (children != null && children.size() > childNumber) { + } else if (node == root) { + node = null; // no more node + children = null; + return new Pair<TreeNode, NodePath>(now, currentPath); + }else if (children != null && children.size() > childNumber) { childNumber = searchStack.pop(); node = children.at(childNumber).b(); path = path.tail().add(childNumber); @@ -58,15 +62,15 @@ children = node.getChildren(); childNumber = searchStack.pop(); for (; children.size() == childNumber;) { - path = path.tail(); - node = nodeStack.pop(); - children = node.getChildren(); - childNumber = searchStack.pop(); if (node == root) { node = null; // no more node children = null; return new Pair<TreeNode, NodePath>(now, currentPath); } + path = path.tail(); + node = nodeStack.pop(); + children = node.getChildren(); + childNumber = searchStack.pop(); } if (node != null && childNumber < children.size()) { path = path.add(childNumber);
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/Query.java Mon Sep 15 16:31:53 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/Query.java Tue Sep 16 07:48:34 2014 +0900 @@ -6,6 +6,4 @@ public interface Query { boolean condition(TreeNode _node); - - }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/SearchQuery.java Mon Sep 15 16:31:53 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/query/SearchQuery.java Tue Sep 16 07:48:34 2014 +0900 @@ -41,7 +41,7 @@ } public List<Pair<String, String>> indexCondition() { - return query.indexCondition(); + return null;//query.indexCondition(); } }