Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 111:5df5505e1c1e
change Index type
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungle.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungle.java Mon Sep 15 14:07:06 2014 +0900 @@ -82,7 +82,7 @@ }; DefaultTreeNode root = new DefaultTreeNode(); - TreeMap<String,TreeMap<String, List<TreeNode>>> index = TreeMap.empty(Ord.stringOrd); + TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index = TreeMap.empty(Ord.stringOrd); ChangeSet set = new DefaultChangeSet(root,null,list,uuid,name,0,index); DefaultTreeContext tc = new DefaultTreeContext(root,set); JungleTree newTree = new DefaultJungleTree(tc,uuid,journal.getWriter(),editor);
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungleTree.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/DefaultJungleTree.java Mon Sep 15 14:07:06 2014 +0900 @@ -47,7 +47,7 @@ DefaultTransactionManager txManager = new DefaultTransactionManager(writer,tc,repository,uuid); TreeNode root = tc.getTreeNode(); ChangeSet cs = tc.getChangeSet(); - TreeMap<String,TreeMap<String, List<TreeNode>>> newIndex = cs.getIndex(); + TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> newIndex = cs.getIndex(); return new DefaultJungleIndexTreeEditor(root,txManager,editor,newIndex); } @@ -74,7 +74,7 @@ } @Override - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { TreeContext tc = repository.get(); ChangeSet cs = tc.getChangeSet(); return cs.getIndex();
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/JungleTree.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/JungleTree.java Mon Sep 15 14:07:06 2014 +0900 @@ -14,6 +14,6 @@ public InterfaceTraverser getTraverser(); public JungleTreeEditor getLocalTreeEditor(); public TreeNode getRootNode(); - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(); + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(); public JungleTreeEditor getIndexTreeEditor(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/ChangeSet.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/ChangeSet.java Mon Sep 15 14:07:06 2014 +0900 @@ -18,6 +18,6 @@ public String getTreeName(); public long revision(); - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(); + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(); public Iterable<TreeOperation> getOperations(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/impl/logger/LoggingNode.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/impl/logger/LoggingNode.java Mon Sep 15 14:07:06 2014 +0900 @@ -49,7 +49,7 @@ } @Override - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { return null; } }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/AppendChildAt.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/AppendChildAt.java Mon Sep 15 14:07:06 2014 +0900 @@ -50,7 +50,7 @@ } @Override - public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { // TODO Auto-generated method stub return null; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/DeleteAttribute.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/DeleteAttribute.java Mon Sep 15 14:07:06 2014 +0900 @@ -46,7 +46,7 @@ } @Override - public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { // TODO Auto-generated method stub return null; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/DeleteChildAt.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/DeleteChildAt.java Mon Sep 15 14:07:06 2014 +0900 @@ -49,7 +49,7 @@ } @Override - public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { // TODO Auto-generated method stub return null; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/NodeEditor.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/NodeEditor.java Mon Sep 15 14:07:06 2014 +0900 @@ -16,5 +16,5 @@ { public Either<Error,Logging> edit(TreeNode _e); public Logging wrap(TreeNode node, OperationLog op); - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(); + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(); } \ No newline at end of file
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/PutAttribute.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/store/trasnformer/PutAttribute.java Mon Sep 15 14:07:06 2014 +0900 @@ -56,7 +56,7 @@ } @Override - public TreeMap<String, TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { // TODO Auto-generated method stub return null; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultChangeSet.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultChangeSet.java Mon Sep 15 14:07:06 2014 +0900 @@ -17,9 +17,9 @@ private final String uuid; private final String treeName; private final long revision; - private final TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private final TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public DefaultChangeSet(TreeNode _node,ChangeSet _prev,ChangeList _log,String _uuid, String _treeName, long _revision, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public DefaultChangeSet(TreeNode _node,ChangeSet _prev,ChangeList _log,String _uuid, String _treeName, long _revision, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { this.root = _node; this.previous = _prev; @@ -73,7 +73,7 @@ } @Override - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex() { + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex() { return index; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultJungleIndexTreeEditor.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultJungleIndexTreeEditor.java Mon Sep 15 14:07:06 2014 +0900 @@ -37,14 +37,14 @@ private final TreeNode root; private final TreeEditor editor; private final TreeOperationLog log; - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public DefaultJungleIndexTreeEditor(TreeNode _root,TransactionManager _txManager,TreeEditor _editor, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public DefaultJungleIndexTreeEditor(TreeNode _root,TransactionManager _txManager,TreeEditor _editor, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { this(_root,_txManager,_editor,new DefaultTreeOperationLog(), index); } - public DefaultJungleIndexTreeEditor(TreeNode newNode,TransactionManager _txManager,TreeEditor _editor,TreeOperationLog _log, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public DefaultJungleIndexTreeEditor(TreeNode newNode,TransactionManager _txManager,TreeEditor _editor,TreeOperationLog _log, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(newNode, _txManager, _editor , _log); this.root = newNode;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultTransactionManager.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/DefaultTransactionManager.java Mon Sep 15 14:07:06 2014 +0900 @@ -36,7 +36,7 @@ } @Override - public Either<Error,TransactionManager> commit(TreeNode _newRoot,final TreeOperationLog _log, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public Either<Error,TransactionManager> commit(TreeNode _newRoot,final TreeOperationLog _log, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { ChangeSet cs = tip.getChangeSet(); long currentRevision = cs.revision();
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/TransactionManager.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/transaction/TransactionManager.java Mon Sep 15 14:07:06 2014 +0900 @@ -11,7 +11,7 @@ public interface TransactionManager { - public Either<Error,TransactionManager> commit(TreeNode _newRoot,TreeOperationLog _log, TreeMap<String,TreeMap<String, List<TreeNode>>> index); + public Either<Error,TransactionManager> commit(TreeNode _newRoot,TreeOperationLog _log, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index); public String getUUID(); public long getRevision(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverser/InterfaceTraverser.java Mon Sep 15 14:07:06 2014 +0900 @@ -20,10 +20,10 @@ InterfaceTraverser traverser; TreeNode node; - TreeMap<String,TreeMap<String, List<TreeNode>>> index; + TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; JungleTreeEditor editor; - public InterfaceTraverser(TreeNode _root, TreeMap<String,TreeMap<String, List<TreeNode>>> indez, JungleTreeEditor editor) { + public InterfaceTraverser(TreeNode _root, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index, JungleTreeEditor editor) { this.node = _root; this.index = index; this.editor = editor;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/AppendChildAtIndex.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/AppendChildAtIndex.java Mon Sep 15 14:07:06 2014 +0900 @@ -13,9 +13,9 @@ public class AppendChildAtIndex extends AppendChildAt { - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public AppendChildAtIndex(int _pos, TreeMap<String,TreeMap<String, List<TreeNode>>> index) { + public AppendChildAtIndex(int _pos, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(_pos); this.index = index;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/DeleteAttributeIndex.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/DeleteAttributeIndex.java Mon Sep 15 14:07:06 2014 +0900 @@ -12,10 +12,10 @@ public class DeleteAttributeIndex extends DeleteAttribute { - TreeMap<String,TreeMap<String, List<TreeNode>>> index; + TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; private String key; - public DeleteAttributeIndex(String _key ,TreeMap<String,TreeMap<String, List<TreeNode>>> index) { + public DeleteAttributeIndex(String _key ,TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(_key); this.key = key; this.index = index;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/DeleteChildAtIndex.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/DeleteChildAtIndex.java Mon Sep 15 14:07:06 2014 +0900 @@ -12,8 +12,9 @@ public class DeleteChildAtIndex extends DeleteChildAt{ - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; - public DeleteChildAtIndex(int _pos, TreeMap<String,TreeMap<String, List<TreeNode>>> index) { + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; + + public DeleteChildAtIndex(int _pos, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(_pos); this.index = index; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/Logging.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/Logging.java Mon Sep 15 14:07:06 2014 +0900 @@ -15,5 +15,5 @@ public LoggingChildren getChildren(); public OperationLog getOperationLog(); public TreeNode getWrap(); - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(); + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(); }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/LoggingIndexAttributes.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/LoggingIndexAttributes.java Mon Sep 15 14:07:06 2014 +0900 @@ -23,9 +23,9 @@ private final TreeNode wrap; private final OperationLog log; - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public LoggingIndexAttributes(TreeNode _wrap, OperationLog _log,TreeMap<String,TreeMap<String, List<TreeNode>>> index) { + public LoggingIndexAttributes(TreeNode _wrap, OperationLog _log,TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(_wrap, _log); this.wrap = _wrap; this.log = _log;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/LoggingIndexNode.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/LoggingIndexNode.java Mon Sep 15 14:07:06 2014 +0900 @@ -16,14 +16,14 @@ private final TreeNode wrap; private final OperationLog log; - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public LoggingIndexNode(TreeNode wrap ,TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public LoggingIndexNode(TreeNode wrap ,TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { this(wrap,new DefaultOperationLog(),index); } - public LoggingIndexNode(TreeNode wrap,OperationLog log, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public LoggingIndexNode(TreeNode wrap,OperationLog log, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(wrap, log); this.wrap = wrap; @@ -32,7 +32,7 @@ } @Override - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(){ + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(){ return index; }
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/PutAttributeIndex.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/PutAttributeIndex.java Mon Sep 15 14:07:06 2014 +0900 @@ -17,9 +17,9 @@ public class PutAttributeIndex extends PutAttribute { - private TreeMap<String,TreeMap<String, List<TreeNode>>> index; + private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index; - public PutAttributeIndex(String _key,ByteBuffer _value, TreeMap<String,TreeMap<String, List<TreeNode>>> index) + public PutAttributeIndex(String _key,ByteBuffer _value, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index) { super(_key, _value); this.index = index; @@ -42,7 +42,7 @@ } @Override - public TreeMap<String,TreeMap<String, List<TreeNode>>> getIndex(){ + public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(){ return index; } }
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverse/BruteForceTraverserTest.java Sat Sep 13 19:23:31 2014 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/traverse/BruteForceTraverserTest.java Mon Sep 15 14:07:06 2014 +0900 @@ -83,4 +83,5 @@ return parent; } -}*/ +} +*/ \ No newline at end of file