Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 265:b3a04bc21b23 Implementation_of_communication
add UnDefineNode
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/benchMark/JungleBenchMark.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/benchMark/JungleBenchMark.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,8 +3,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeAttributes; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/DefaultJungle.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/DefaultJungle.java Tue Dec 13 03:16:12 2016 +0900 @@ -10,12 +10,12 @@ import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.DefaultTreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/Jungle.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/Jungle.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree; import java.util.Iterator;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/commandline/commandline.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/commandline/commandline.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.omnigraffle.OmniGraffleCreater; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/App.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/App.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/Children.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/core/Children.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.core; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/List.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/data/list/List.java Tue Dec 13 03:16:12 2016 +0900 @@ -42,11 +42,11 @@ } - public T index(int num) { + public T get(int index) { int count = 0; Node<T> currentNode = head.getNext(); while (currentNode != null) { - if (count == num) return currentNode.getAttribute(); + if (count == index) return currentNode.getAttribute(); currentNode = currentNode.getNext(); count++; } @@ -106,11 +106,11 @@ } public T tail() { - return index(length() - 1); + return get(length() - 1); } public T head() { - return index(0); + return get(0); } public List<T> deleteLast() {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/JungleNodeIterator.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/JungleNodeIterator.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.query; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import java.util.Iterator; import java.util.Stack;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/Query.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/query/Query.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.query; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; public interface Query { boolean condition(TreeNode node);
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/TreeContext.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/TreeContext.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNode.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; - -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; - - -public interface TreeNode extends Comparable<TreeNode> { - public TreeNodeChildren getChildren(); - - public TreeNodeAttributes getAttributes(); - - public TreeNode createNewNode(); - - public Either<Error, TreeNode> appendRootNode(); -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeAttributes.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; - -import jp.ac.u_ryukyu.ie.cr.jungle.core.Attributes; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; - -import java.nio.ByteBuffer; -import java.util.Iterator; - -public interface TreeNodeAttributes extends Attributes -{ - public Either<Error,TreeNode> delete(String key); - public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,TreeNode> put(String key,ByteBuffer value); - public TreeMap<String,ByteBuffer> getAttributesAsRawMap(); - public Iterator<String> getKeys(); - public boolean contain(String key); - public Iterator<String> getFilteringKey(java.util.List<String> filter); -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/impl/TreeNodeChildren.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.store.impl; - -import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; - -public interface TreeNodeChildren extends Children -{ - public Either<Error,TreeNode> addNewChildAt(int pos); - public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,TreeNode> deleteChildAt(int pos); - public Either<Error,TreeNode> addNewChildAt(int pos,TreeNode newChild); - public Either<Error,TreeNode> replaceNode(int pos,TreeNode replacement); - Either<Error,TreeNode> moveChild(int pos, String move); - public List<TreeNode> getChildrenAsRawList(); -} \ No newline at end of file
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/IndexCreater.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/IndexCreater.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,8 +2,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import java.util.Iterator;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/ParentIndex.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/index/ParentIndex.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,8 +1,8 @@ package jp.ac.u_ryukyu.ie.cr.jungle.store.index; import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import java.util.Iterator; import java.util.Optional;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingAttributes.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingAttributes.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.store.logger; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeAttributes; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.DeleteAttributeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.PutAttributeOperation;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingChildren.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingChildren.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.AppendChildAtOperation; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.ChildMoveOperation; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.DeleteChildAtOperation;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingNode.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/logger/LoggingNode.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.ReplaceRootNodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/nodepath/DefaultNodePath.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/nodepath/DefaultNodePath.java Tue Dec 13 03:16:12 2016 +0900 @@ -52,6 +52,11 @@ } @Override + public int get(int index) { + return path.get(index); + } + + @Override public DefaultNodePath add(int pos) { List<Integer> newPath = path.addLast(pos); return new DefaultNodePath(newPath);
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/nodepath/NodePath.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/nodepath/NodePath.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,6 +4,7 @@ public interface NodePath extends Iterable<Integer> { + public int get(int index); public NodePath add(int pos); public Pair<Integer,NodePath> pop(); public NodePath tail();
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,8 +2,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree; import jp.ac.u_ryukyu.ie.cr.jungle.query.JungleNodeIterator; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,9 +2,9 @@ import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/AppendChildAtOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/AppendChildAtOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/ChildMoveOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/ChildMoveOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.store.operations; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteAttributeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteAttributeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import java.nio.ByteBuffer; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteChildAtOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/DeleteChildAtOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import java.nio.ByteBuffer; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/NodeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/NodeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import java.nio.ByteBuffer; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/PutAttributeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/PutAttributeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/ReplaceRootNodeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/operations/ReplaceRootNodeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; public class ReplaceRootNodeOperation implements NodeOperation {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/AppendChildAt.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/AppendChildAt.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteAttribute.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteAttribute.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteChildAt.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/DeleteChildAt.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/MoveChild.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/MoveChild.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/NodeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/NodeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/PutAttribute.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/PutAttribute.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import java.nio.ByteBuffer; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/replaceRootNodeAt.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/trasnformer/replaceRootNodeAt.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTransactionManager.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTransactionManager.java Tue Dec 13 03:16:12 2016 +0900 @@ -6,7 +6,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeContext.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeContext.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNode.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.transaction; - - -import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; - -import java.nio.ByteBuffer; -import java.rmi.dgc.VMID; - -public class DefaultTreeNode implements TreeNode { - private List<TreeNode> children; - private TreeMap<String, ByteBuffer> attrs; - final String nodeId = new VMID().toString(); - - private static final List<TreeNode> NIL_LIST = new List<>(); - - public DefaultTreeNode() { - this(NIL_LIST, new TreeMap<>()); - } - - public DefaultTreeNode(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { - attrs = _attrs; - children = _children; - } - - @Override - public DefaultTreeNodeChildren getChildren() { - return new DefaultTreeNodeChildren(children, attrs); - } - - @Override - public DefaultTreeNodeAttribute getAttributes() { - return new DefaultTreeNodeAttribute(children, attrs); - } - - @Override - public DefaultTreeNode createNewNode() { - return new DefaultTreeNode(); - } - - public DefaultTreeNode clone() { - return new DefaultTreeNode(children, attrs); - } - - @Override - public Either<Error, TreeNode> appendRootNode() { - TreeNodeChildren newRootChildren = new DefaultTreeNodeChildren(NIL_LIST, new TreeMap<>()); - Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> either = newRootChildren.addNewChildAt(0,this); - return either; - } - - @Override - public int compareTo(TreeNode o) { - return this.hashCode() - o.hashCode(); - } -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeAttribute.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.transaction; - -import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; -import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditorError; -import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; - -import java.nio.ByteBuffer; -import java.util.Iterator; -import java.util.Optional; - -public class DefaultTreeNodeAttribute implements TreeNodeAttributes { - public List<TreeNode> children; - public TreeMap<String, ByteBuffer> attrs; - - - public DefaultTreeNodeAttribute(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { - children = _children; - attrs = _attrs; - } - - @Override - public TreeMap<String, ByteBuffer> getAttributesAsRawMap() { - return attrs; - } - - @Override - public Either<Error, TreeNode> delete(String _key) { - if (_key == null) { - return DefaultEither.newA(NodeEditorError.NULL_VALUE_NOT_ALLOWED); - } - - if (null == attrs.get(_key)) { - return DefaultEither.newA(NodeEditorError.DELETE_KEY_NOT_FOUND); - } - - TreeMap<String, ByteBuffer> newMap = attrs.delete(_key); - TreeNode newNode = new DefaultTreeNode(children, newMap); - return DefaultEither.newB(newNode); - } - - @Override - public Either<Error, TreeNode> put(String _key, ByteBuffer _value) { - if (_key == null || _value == null) { - return DefaultEither.newA(NodeEditorError.NULL_VALUE_NOT_ALLOWED); - } - - TreeMap<String, ByteBuffer> newMap = attrs.put(_key, _value); - TreeNode newNode = new DefaultTreeNode(children, newMap); - return DefaultEither.newB(newNode); - } - - @Override - public ByteBuffer get(String _key) { - if (_key == null) { - return null; - } - Optional<ByteBuffer> op = attrs.get(_key); - if (op.isPresent()) { - return op.get(); - } - return null; - } - - @Override - public String getString(String key) { - ByteBuffer attribute = get(key); - if (attribute != null) - return new String(attribute.array()); - return null; - } - - @Override - public Iterator<String> getKeys() { - return attrs.keys(); - } - - @Override - public Iterator<String> getFilteringKey(java.util.List<String> filter) { - - return new Iterator<String>() { - private Iterator<String> keys = attrs.keys(); - private String next = init(); - - private String init() { - while (keys.hasNext()) { - String key = keys.next(); - if (filter.contains(key)) - continue; - return key; - } - return null; - } - - @Override - public boolean hasNext() { - return next != null; - } - - @Override - public String next() { - String tmp = next; - next = init(); - return tmp; - } - }; - } - - - @Override - public boolean contain(String key) { - return attrs.get(key) != null; - } -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DefaultTreeNodeChildren.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -package jp.ac.u_ryukyu.ie.cr.jungle.transaction; - - -import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditorError; -import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; -import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; -import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; -import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; - -import java.nio.ByteBuffer; -import java.util.Iterator; - -public class DefaultTreeNodeChildren implements TreeNodeChildren { - - public List<TreeNode> children; - public TreeMap<String, ByteBuffer> attrs; - - public DefaultTreeNodeChildren(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { - children = _children; - attrs = _attrs; - } - - private boolean boundaryCheck(int _pos) { - int size = children.length(); - if (size < _pos) { - return false; - } - - return true; - } - - @Override - public List<TreeNode> getChildrenAsRawList() { - return children; - } - - @Override - public Either<Error, TreeNode> addNewChildAt(int _pos) { - if (!boundaryCheck(_pos) || _pos < 0) { - return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); - } - - List<TreeNode> newChildren = children.add(_pos, new DefaultTreeNode()); - TreeNode newNode = new DefaultTreeNode(newChildren, attrs); - return DefaultEither.newB(newNode); - } - - @Override - public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> deleteChildAt(int _pos) { - if (!boundaryCheck(_pos) || _pos < 0 || size() == 0) { - return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); - } - - List<TreeNode> newChildren = children.delete(_pos); - TreeNode newNode = new DefaultTreeNode(newChildren, attrs); - - return DefaultEither.newB(newNode); - } - - @Override - public int size() { - return children.length(); - } - - @Override - public Iterator<TreeNode> iterator() { - return children.iterator(); - } - - @Override - public Either<Error, TreeNode> replaceNode(int _pos, TreeNode _replacement) { - int size = children.length(); - if (!(0 <= _pos && _pos < size)) { - return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); - } - TreeNode replacement = _replacement; - - List<TreeNode> newChildren = children.replace(_pos, replacement); - TreeNode node = new DefaultTreeNode(newChildren, attrs); - return DefaultEither.newB(node); - } - - @Override - public Either<Error, TreeNode> moveChild(int pos, String move) { - int size = children.length(); - TreeNode child = children.index(pos); - List<TreeNode> newChildren; - if (move.equals("up") && pos != 0) { - children = children.delete(pos); - newChildren = children.add((pos - 1), child); - } else if (move.equals("down") && pos < size - 1) { //sizeは0から始まるため -1する - children = children.delete(pos); - newChildren = children.add((pos + 1), child); - } else { - return DefaultEither.newA(new DefaultError()); - } - TreeNode newNode = new DefaultTreeNode(newChildren, attrs); - return DefaultEither.newB(newNode); - } - - @Override - public Either<Error, TreeNode> at(int _pos) { - if (children.length() < _pos + 1) { - return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); - } - - TreeNode Node = children.index(_pos); - - return DefaultEither.newB(Node); - } - - @Override - public Either<Error, TreeNode> addNewChildAt(int _pos, TreeNode _newChild) { - if (!boundaryCheck(_pos) || _pos < 0) { - return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); - } - List<TreeNode> newChildren = children.add(_pos, _newChild); - TreeNode newNode = new DefaultTreeNode(newChildren, attrs); - - return DefaultEither.newB(newNode); - } - -}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DifferenceTreeContext.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/DifferenceTreeContext.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/TransactionManager.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/TransactionManager.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; public interface TransactionManager
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/jungleTreeEditor/DefaultDifferenceJungleTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/jungleTreeEditor/DefaultDifferenceJungleTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,10 +1,14 @@ package jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.DefaultTreeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; +import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.AppendChildAt; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.TransactionManager; @@ -12,6 +16,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.util.IterableConverter; import java.nio.ByteBuffer; @@ -41,7 +46,27 @@ private Either<Error, JungleTreeEditor> _edit(final NodePath _path, NodeEditor _e) { Either<Error, LoggingNode> either = editor.edit(root, _path, _e); - return null; + if(either.isA()){ + return DefaultEither.newA(either.a()); + } + + LoggingNode newLogging = either.b(); + OperationLog newLog = newLogging.getOperationLog(); + TreeNode newNode = newLogging.getWrap(); + + IterableConverter.Converter<TreeOperation,NodeOperation> converter = new IterableConverter.Converter<TreeOperation,NodeOperation>(){ + @Override + public TreeOperation conv(NodeOperation _b){ + return new DefaultTreeOperation(_path,_b); + } + }; + + Iterable<TreeOperation> iterable = new IterableConverter<>(newLog,converter); + DefaultTreeOperationLog treeOperationLog = new DefaultTreeOperationLog(iterable,newLog.length()); + TreeOperationLog newTreeOpLog = log.append(treeOperationLog); + + JungleTreeEditor newEditor = new DefaultDifferenceJungleTreeEditor(newNode,txManager,editor,newTreeOpLog); + return DefaultEither.newB(newEditor); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/jungleTreeEditor/DefaultJungleTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/jungleTreeEditor/DefaultJungleTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/DefaultDifferenceTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/DefaultDifferenceTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,10 +1,13 @@ package jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; +import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traverser; +import jp.ac.u_ryukyu.ie.cr.jungle.traverser.*; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; @@ -13,12 +16,65 @@ */ public class DefaultDifferenceTreeEditor implements TreeEditor { private Traverser traverser; + public DefaultDifferenceTreeEditor(Traverser traverser) { - this. traverser = traverser; + this.traverser = traverser; } @Override - public Either<Error, LoggingNode> edit(TreeNode root, NodePath path, NodeEditor transformer) { - return null; + public Either<Error, LoggingNode> edit(TreeNode root, NodePath path, NodeEditor editor) { + Evaluator evalutor ; + if (path.get(0) == -2) + evalutor = new LastNodeEvaluator(); + else + evalutor = new DefaultEvaluator(path); + Either<Error, Traversal> either = traverser.traverse(root, evalutor); + + if (either.isA()) { + return DefaultEither.newA(either.a()); + } + Traversal t = either.b(); + return clone(t, editor); + } + + private Either<Error, LoggingNode> clone(Traversal t, NodeEditor editor) { + // copying nodes from bottom to root + + List<Direction<TreeNode>> path = new List<>(); + for (Direction<TreeNode> direction : t) { + path = path.addLast(direction); + } + + // target + Direction<TreeNode> targetDirection = path.head(); + TreeNode target = targetDirection.getTarget(); + Either<Error, LoggingNode> either = editor.edit(target); + if (either.isA()) { + return DefaultEither.newA(either.a()); + } + + LoggingNode newWrap = either.b(); + + // top + int pos = targetDirection.getPosition(); + TreeNode child = newWrap.getWrap(); + + + for (Direction<TreeNode> parentDirection : path.deleteHead()) { + + TreeNodeChildren chs = parentDirection.getTarget().getChildren(); + + Either<Error, TreeNode> ret = chs.replaceNode(pos, child); + if (ret.isA()) { + return DefaultEither.newA(ret.a()); + } + + child = ret.b(); + pos = parentDirection.getPosition(); + } + + TreeNode newRoot = child; + LoggingNode logNode = editor.wrap(newRoot, newWrap.getOperationLog()); + return DefaultEither.newB(logNode); } }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/DefaultTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/DefaultTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,8 +3,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultEvaluator;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/TreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/editor/treeEditor/TreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/DefaultTreeNode.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,63 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.nio.ByteBuffer; +import java.rmi.dgc.VMID; + +public class DefaultTreeNode implements TreeNode { + private List<TreeNode> children; + private TreeMap<String, ByteBuffer> attrs; + final String nodeId = new VMID().toString(); + + private static final List<TreeNode> NIL_LIST = new List<>(); + + public DefaultTreeNode() { + this(NIL_LIST, new TreeMap<>()); + } + + public DefaultTreeNode(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { + attrs = _attrs; + children = _children; + } + + @Override + public DefaultTreeNodeChildren getChildren() { + return new DefaultTreeNodeChildren(children, attrs); + } + + @Override + public DefaultTreeNodeAttribute getAttributes() { + return new DefaultTreeNodeAttribute(children, attrs); + } + + @Override + public boolean isDefine() { + return false; + } + + @Override + public DefaultTreeNode createNewNode() { + return new DefaultTreeNode(); + } + + public DefaultTreeNode clone() { + return new DefaultTreeNode(children, attrs); + } + + @Override + public Either<Error, TreeNode> appendRootNode() { + TreeNodeChildren newRootChildren = new DefaultTreeNodeChildren(NIL_LIST, new TreeMap<>()); + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> either = newRootChildren.addNewChildAt(0,this); + return either; + } + + @Override + public int compareTo(TreeNode o) { + return this.hashCode() - o.hashCode(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/DefaultTreeNodeAttribute.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,116 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditorError; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.nio.ByteBuffer; +import java.util.Iterator; +import java.util.Optional; + +public class DefaultTreeNodeAttribute implements TreeNodeAttributes { + public List<TreeNode> children; + public TreeMap<String, ByteBuffer> attrs; + + + public DefaultTreeNodeAttribute(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { + children = _children; + attrs = _attrs; + } + + @Override + public TreeMap<String, ByteBuffer> getAttributesAsRawMap() { + return attrs; + } + + @Override + public Either<Error, TreeNode> delete(String _key) { + if (_key == null) { + return DefaultEither.newA(NodeEditorError.NULL_VALUE_NOT_ALLOWED); + } + + if (null == attrs.get(_key)) { + return DefaultEither.newA(NodeEditorError.DELETE_KEY_NOT_FOUND); + } + + TreeMap<String, ByteBuffer> newMap = attrs.delete(_key); + TreeNode newNode = new DefaultTreeNode(children, newMap); + return DefaultEither.newB(newNode); + } + + @Override + public Either<Error, TreeNode> put(String _key, ByteBuffer _value) { + if (_key == null || _value == null) { + return DefaultEither.newA(NodeEditorError.NULL_VALUE_NOT_ALLOWED); + } + + TreeMap<String, ByteBuffer> newMap = attrs.put(_key, _value); + TreeNode newNode = new DefaultTreeNode(children, newMap); + return DefaultEither.newB(newNode); + } + + @Override + public ByteBuffer get(String _key) { + if (_key == null) { + return null; + } + Optional<ByteBuffer> op = attrs.get(_key); + if (op.isPresent()) { + return op.get(); + } + return null; + } + + @Override + public String getString(String key) { + ByteBuffer attribute = get(key); + if (attribute != null) + return new String(attribute.array()); + return null; + } + + @Override + public Iterator<String> getKeys() { + return attrs.keys(); + } + + @Override + public Iterator<String> getFilteringKey(java.util.List<String> filter) { + + return new Iterator<String>() { + private Iterator<String> keys = attrs.keys(); + private String next = init(); + + private String init() { + while (keys.hasNext()) { + String key = keys.next(); + if (filter.contains(key)) + continue; + return key; + } + return null; + } + + @Override + public boolean hasNext() { + return next != null; + } + + @Override + public String next() { + String tmp = next; + next = init(); + return tmp; + } + }; + } + + + @Override + public boolean contain(String key) { + return attrs.get(key) != null; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/DefaultTreeNodeChildren.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,125 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + + +import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditorError; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultError; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.nio.ByteBuffer; +import java.util.Iterator; + +public class DefaultTreeNodeChildren implements TreeNodeChildren { + + public List<TreeNode> children; + public TreeMap<String, ByteBuffer> attrs; + + public DefaultTreeNodeChildren(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { + children = _children; + attrs = _attrs; + } + + private boolean boundaryCheck(int _pos) { + int size = children.length(); + if (size < _pos) { + return false; + } + + return true; + } + + @Override + public List<TreeNode> getChildrenAsRawList() { + return children; + } + + @Override + public Either<Error, TreeNode> addNewChildAt(int _pos) { + if (!boundaryCheck(_pos) || _pos < 0) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + List<TreeNode> newChildren = children.add(_pos, new DefaultTreeNode()); + TreeNode newNode = new DefaultTreeNode(newChildren, attrs); + return DefaultEither.newB(newNode); + } + + @Override + public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> deleteChildAt(int _pos) { + if (!boundaryCheck(_pos) || _pos < 0 || size() == 0) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + List<TreeNode> newChildren = children.delete(_pos); + TreeNode newNode = new DefaultTreeNode(newChildren, attrs); + + return DefaultEither.newB(newNode); + } + + @Override + public int size() { + return children.length(); + } + + @Override + public Iterator<TreeNode> iterator() { + return children.iterator(); + } + + @Override + public Either<Error, TreeNode> replaceNode(int _pos, TreeNode _replacement) { + int size = children.length(); + if (!(0 <= _pos && _pos < size)) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + TreeNode replacement = _replacement; + + List<TreeNode> newChildren = children.replace(_pos, replacement); + TreeNode node = new DefaultTreeNode(newChildren, attrs); + return DefaultEither.newB(node); + } + + @Override + public Either<Error, TreeNode> moveChild(int pos, String move) { + int size = children.length(); + TreeNode child = children.get(pos); + List<TreeNode> newChildren; + if (move.equals("up") && pos != 0) { + children = children.delete(pos); + newChildren = children.add((pos - 1), child); + } else if (move.equals("down") && pos < size - 1) { //sizeは0から始まるため -1する + children = children.delete(pos); + newChildren = children.add((pos + 1), child); + } else { + return DefaultEither.newA(new DefaultError()); + } + TreeNode newNode = new DefaultTreeNode(newChildren, attrs); + return DefaultEither.newB(newNode); + } + + @Override + public Either<Error, TreeNode> at(int _pos) { + if (children.length() < _pos + 1) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + + TreeNode Node = children.get(_pos); + + return DefaultEither.newB(Node); + } + + @Override + public Either<Error, TreeNode> addNewChildAt(int _pos, TreeNode _newChild) { + if (!boundaryCheck(_pos) || _pos < 0) { + return DefaultEither.newA(NodeEditorError.INDEX_OUT_OF_BOUNDS); + } + List<TreeNode> newChildren = children.add(_pos, _newChild); + TreeNode newNode = new DefaultTreeNode(newChildren, attrs); + + return DefaultEither.newB(newNode); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/TreeNode.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,17 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + + +public interface TreeNode extends Comparable<TreeNode> { + public TreeNodeChildren getChildren(); + + public TreeNodeAttributes getAttributes(); + + public boolean isDefine(); + + public TreeNode createNewNode(); + + public Either<Error, TreeNode> appendRootNode(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/TreeNodeAttributes.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,19 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + +import jp.ac.u_ryukyu.ie.cr.jungle.core.Attributes; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; + +import java.nio.ByteBuffer; +import java.util.Iterator; + +public interface TreeNodeAttributes extends Attributes +{ + public Either<Error,TreeNode> delete(String key); + public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,TreeNode> put(String key,ByteBuffer value); + public TreeMap<String,ByteBuffer> getAttributesAsRawMap(); + public Iterator<String> getKeys(); + public boolean contain(String key); + public Iterator<String> getFilteringKey(java.util.List<String> filter); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/TreeNodeChildren.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,16 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + +import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; + +public interface TreeNodeChildren extends Children +{ + public Either<Error,TreeNode> addNewChildAt(int pos); + public Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error,TreeNode> deleteChildAt(int pos); + public Either<Error,TreeNode> addNewChildAt(int pos,TreeNode newChild); + public Either<Error,TreeNode> replaceNode(int pos,TreeNode replacement); + Either<Error,TreeNode> moveChild(int pos, String move); + public List<TreeNode> getChildrenAsRawList(); +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/transaction/node/UnDefineNode.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,65 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.transaction.node; + +import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; +import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; +import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; + +import java.nio.ByteBuffer; +import java.rmi.dgc.VMID; + +/** + * Created by e115731 on 2016/12/13. + */ +public class UnDefineNode implements TreeNode { + private List<TreeNode> children; + private TreeMap<String, ByteBuffer> attrs; + final String nodeId = new VMID().toString(); + + private static final List<TreeNode> NIL_LIST = new List<>(); + + public UnDefineNode() { + this(NIL_LIST, new TreeMap<>()); + } + + public UnDefineNode(List<TreeNode> _children, TreeMap<String, ByteBuffer> _attrs) { + attrs = _attrs; + children = _children; + } + + @Override + public DefaultTreeNodeChildren getChildren() { + return new DefaultTreeNodeChildren(children, attrs); + } + + @Override + public DefaultTreeNodeAttribute getAttributes() { + return new DefaultTreeNodeAttribute(children, attrs); + } + + @Override + public boolean isDefine() { + return false; + } + + @Override + public DefaultTreeNode createNewNode() { + return new DefaultTreeNode(); + } + + public DefaultTreeNode clone() { + return new DefaultTreeNode(children, attrs); + } + + @Override + public Either<Error, TreeNode> appendRootNode() { + TreeNodeChildren newRootChildren = new DefaultTreeNodeChildren(NIL_LIST, new TreeMap<>()); + Either<jp.ac.u_ryukyu.ie.cr.jungle.util.Error, TreeNode> either = newRootChildren.addNewChildAt(0,this); + return either; + } + + @Override + public int compareTo(TreeNode o) { + return this.hashCode() - o.hashCode(); + } +}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluator.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultEvaluator.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; public class DefaultEvaluator implements Evaluator { private final NodePath path;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/DefaultTraverser.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.core.Children; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditorError; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Evaluator.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Evaluator.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.traverser; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; public interface Evaluator {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/InterfaceTraverser.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/InterfaceTraverser.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.traverser; import jp.ac.u_ryukyu.ie.cr.jungle.store.NulIterator; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.query.JungleNodeIterator; import jp.ac.u_ryukyu.ie.cr.jungle.query.Query;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/LastNodeEvaluator.java Tue Dec 13 03:16:12 2016 +0900 @@ -0,0 +1,13 @@ +package jp.ac.u_ryukyu.ie.cr.jungle.traverser; + + +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; + +public class LastNodeEvaluator implements Evaluator { + + @Override + public Evaluation evaluate(TreeNode _current, int _pos) { + + return null; + } +}
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traversal.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traversal.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.traverser; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; public interface Traversal extends Iterable<Direction<TreeNode>> {
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traverser.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/traverser/Traverser.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,6 +1,6 @@ package jp.ac.u_ryukyu.ie.cr.jungle.traverser; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/DefaultJungleTree.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/DefaultJungleTree.java Tue Dec 13 03:16:12 2016 +0900 @@ -8,8 +8,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.DefaultJungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTransactionManager;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/DefferenceListJungleTree.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/DefferenceListJungleTree.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeListWriter; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTransactionManager; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.DefaultDifferenceJungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/JungleTree.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/tree/JungleTree.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/core/NetworkDefaultJungle.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/core/NetworkDefaultJungle.java Tue Dec 13 03:16:12 2016 +0900 @@ -8,12 +8,12 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.Journal; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungleNetwork.transaction.NetworkDefaultJungleTree;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkAppendChildAtOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkAppendChildAtOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkDeleteAttributeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkDeleteAttributeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkDeleteChildAtOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkDeleteChildAtOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungleNetwork.operations; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkNodeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkNodeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkNodePath.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkNodePath.java Tue Dec 13 03:16:12 2016 +0900 @@ -34,6 +34,11 @@ } @Override + public int get(int index) { + return path.get(index); + } + + @Override public NetworkNodePath add(int _pos) { LinkedList<Integer> newPath = copyPath(); newPath.add(_pos);
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkPutAttributeOperation.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/operations/NetworkPutAttributeOperation.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; import jp.ac.u_ryukyu.ie.cr.jungle.store.Command; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.NodeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import org.msgpack.annotation.Message;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungle.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungle.java Tue Dec 13 03:16:12 2016 +0900 @@ -7,11 +7,11 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import java.util.Enumeration;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungleTree.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungleTree.java Tue Dec 13 03:16:12 2016 +0900 @@ -12,8 +12,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungleTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentJungleTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentTransactionManager.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentTransactionManager.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeListWriter; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.TransactionManager;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentTreeContext.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/persistent/PersistentTreeContext.java Tue Dec 13 03:16:12 2016 +0900 @@ -5,7 +5,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkDefaultJungleTree.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkDefaultJungleTree.java Tue Dec 13 03:16:12 2016 +0900 @@ -11,8 +11,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.util.DefaultEither;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkDefaultJungleTreeEditor.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkDefaultJungleTreeEditor.java Tue Dec 13 03:16:12 2016 +0900 @@ -5,7 +5,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.TreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.DefaultTreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkTransactionManager.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transaction/NetworkTransactionManager.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeList; import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeListWriter; import jp.ac.u_ryukyu.ie.cr.jungle.store.TreeContext; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.TreeOperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.operations.TreeOperation; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeContext;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transformer/NetworkAppendChildAt.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/transformer/NetworkAppendChildAt.java Tue Dec 13 03:16:12 2016 +0900 @@ -5,7 +5,7 @@ * This code same AppendChildAt. */ -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.NodeEditor;
--- a/src/test/java/DefaultJungleTreeTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/DefaultJungleTreeTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/deleteTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/deleteTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -18,11 +18,11 @@ List<Integer> newList = list.delete(5); Assert.assertEquals(newList.length(),9); newList = newList.deleteHead(); - int attribute = newList.index(1); + int attribute = newList.get(1); Assert.assertEquals(attribute,2); Assert.assertEquals(newList.length(),8); newList = newList.deleteLast(); - attribute = newList.index(6); + attribute = newList.get(6); Assert.assertEquals(attribute,8); Assert.assertEquals(list.length(),10); }
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/listAdd.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/listAdd.java Tue Dec 13 03:16:12 2016 +0900 @@ -21,15 +21,15 @@ } for (int count = 0; count < 10; count++) { - int num = list.index(count); - int num2 = list2.index(count); + int num = list.get(count); + int num2 = list2.get(count); Assert.assertEquals(num,count); Assert.assertEquals(num2,count); } List<Integer> newList = list.add(5, 50); - int num = list.index(5); - int num2 = newList.index(5); + int num = list.get(5); + int num2 = newList.get(5); Assert.assertEquals(num,5); Assert.assertEquals(num2,50);
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/replaceTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/data/list/replaceTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -16,9 +16,9 @@ } List<Integer> newList = list.replace(5, 15); Assert.assertEquals(list.length(), 10); - int attribute = list.index(5); + int attribute = list.get(5); Assert.assertEquals(attribute, 5); - attribute = newList.index(5); + attribute = newList.get(5); Assert.assertEquals(newList.length(), 10); Assert.assertEquals(attribute, 15); }
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/ChildrenTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/ChildrenTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,7 +1,7 @@ package jp.ac.u_ryukyu.ie.cr.jungle.core; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNodeChildren; import junit.framework.Assert; import junit.framework.TestCase;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetNodeOfPathTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetNodeOfPathTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetOldTreeTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/GetOldTreeTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,7 +4,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/ParentTest.java Tue Dec 13 00:25:29 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -/*package jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core; - -import org.junit.Ignore; -import org.junit.Test; - -import junit.framework.Assert; -import junit.framework.TestCase; - -@Ignore -public abstract class ParentTest<T extends Parent<?>> extends TestCase -{ - public abstract T instance(); - - @Test - public void testGetChildren() - { - T instance = instance(); - Children<?> children = instance.getChildren(); - Assert.assertNotNull(children); - } -} -*/ \ No newline at end of file
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/impl/treeeditor/DefaultTreeEditorTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/impl/treeeditor/DefaultTreeEditorTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,12 +2,12 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.DefaultTreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.AppendChildAt; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.PutAttribute; import jp.ac.u_ryukyu.ie.cr.jungle.tests.util.TestUtil; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultEvaluator; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.Traversal;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/AppendChildAtTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/AppendChildAtTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,9 +3,9 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.AppendChildAt; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; import junit.framework.Assert; import junit.framework.TestCase;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteAttributeAtTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteAttributeAtTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,10 +2,10 @@ import java.nio.ByteBuffer; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.DeleteAttribute; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; import junit.framework.Assert;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteChildAtTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/DeleteChildAtTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,9 +1,9 @@ package jp.ac.u_ryukyu.ie.cr.jungle.core.nodeeditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.DeleteChildAt; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error; import junit.framework.Assert;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/PutAttributeTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/PutAttributeTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,10 +2,10 @@ import java.nio.ByteBuffer; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.logger.LoggingNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.trasnformer.PutAttribute; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import org.junit.Assert;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/ReplaceRootNodeAt.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/nodeeditor/ReplaceRootNodeAt.java Tue Dec 13 03:16:12 2016 +0900 @@ -2,7 +2,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.tree.JungleTree;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultAttributesTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultAttributesTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,11 +1,11 @@ package jp.ac.u_ryukyu.ie.cr.jungle.impl.node; import jp.ac.u_ryukyu.ie.cr.jungle.core.AttributesTest; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import org.junit.Assert;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultChildrenTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/DefaultChildrenTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,9 +3,9 @@ import jp.ac.u_ryukyu.ie.cr.jungle.core.ChildrenTest; import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNodeChildren; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNodeChildren; import jp.ac.u_ryukyu.ie.cr.jungle.data.treemap.TreeMap; import org.junit.Assert;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/FilteringKeyTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/FilteringKeyTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -1,8 +1,8 @@ package jp.ac.u_ryukyu.ie.cr.jungle.impl.node; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNodeAttributes; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNodeAttributes; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import org.junit.Assert; import org.junit.Test;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/GetNodePath.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/impl/node/GetNodePath.java Tue Dec 13 03:16:12 2016 +0900 @@ -5,8 +5,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/index/parentIndexTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/index/parentIndexTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -3,7 +3,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.DefaultJungle; import jp.ac.u_ryukyu.ie.cr.jungle.Jungle; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.store.index.ParentIndex; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/tests/util/TestUtil.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/tests/util/TestUtil.java Tue Dec 13 03:16:12 2016 +0900 @@ -6,8 +6,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/InterfaceTraverserTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/InterfaceTraverserTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -5,8 +5,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.NullJournal; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.jungleTreeEditor.JungleTreeEditor; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.InterfaceTraverser;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/TraverserTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/traverse/TraverserTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -4,8 +4,8 @@ import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.DefaultNodePath; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; -import jp.ac.u_ryukyu.ie.cr.jungle.transaction.DefaultTreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.DefaultTreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.*; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/DataWriteBufferTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/DataWriteBufferTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -8,7 +8,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeListReader; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.DefaultTreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/PersistentJournalTest.java Tue Dec 13 00:25:29 2016 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/PersistentJournalTest.java Tue Dec 13 03:16:12 2016 +0900 @@ -8,7 +8,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.persistent.ChangeListReader; import jp.ac.u_ryukyu.ie.cr.jungle.store.nodepath.NodePath; import jp.ac.u_ryukyu.ie.cr.jungle.transaction.editor.treeEditor.DefaultTreeEditor; -import jp.ac.u_ryukyu.ie.cr.jungle.store.impl.TreeNode; +import jp.ac.u_ryukyu.ie.cr.jungle.transaction.node.TreeNode; import jp.ac.u_ryukyu.ie.cr.jungle.traverser.DefaultTraverser; import jp.ac.u_ryukyu.ie.cr.jungle.util.Either; import jp.ac.u_ryukyu.ie.cr.jungle.util.Error;